this is just from memory so it may be wrong, but can't twrp back up to an sdcard? From there you can probably unpack the files on your ubuntu machine to make sure they made it.
Android
DROID DOES
Welcome to the droidymcdroidface-iest, Lemmyest (Lemmiest), test, bestest, phoniest, pluckiest, snarkiest, and spiciest Android community on Lemmy (Do not respond)! Here you can participate in amazing discussions and events relating to all things Android.
The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:
Rules
1. All posts must be relevant to Android devices/operating system.
2. Posts cannot be illegal or NSFW material.
3. No spam, self promotion, or upvote farming. Sources engaging in these behavior will be added to the Blacklist.
4. Non-whitelisted bots will be banned.
5. Engage respectfully: Harassment, flamebaiting, bad faith engagement, or agenda posting will result in your posts being removed. Excessive violations will result in temporary or permanent ban, depending on severity.
6. Memes are not allowed to be posts, but are allowed in the comments.
7. Posts from clickbait sources are heavily discouraged. Please de-clickbait titles if it needs to be submitted.
8. Submission statements of any length composed of your own thoughts inside the post text field are mandatory for any microblog posts, and are optional but recommended for article/image/video posts.
Community Resources:
We are Android girls*,
In our Lemmy.world.
The back is plastic,
It's fantastic.
*Well, not just girls: people of all gender identities are welcomed here.
Our Partner Communities:
This https://stackoverflow.com/questions/29442630/copy-full-disk-image-from-android-to-computer is telling me that adb pull is what you want
What do you want to back up exactly?
You can backup all your saved stored data if you want like pictures, music, downloaded items, etc. You can use ADB for that.
But the installed apps? Why bother?
Just download the latest official ROM for your device from the manufacturer. If anything goes bad, you can reinstall the ROM.
If you aren't 100% sure how to do this, you probably should not be doing it.
Even if they are 100% sure how to do it, they must backup their device.
Is your device rooted already? If it is, then you can copy the entire disk to a Linux PC using dd. If it's not rooted then your only option is to copy your personal files and nothing else.
Note, i am kinda a noob but,
Universal Android debloater is a pretty safe tool to use if in recommended option. So I don't think there is a need for a backup. However since UAD uses adb to disable things if your os breaks, you can restore the last disabled packages via fastboot.
For backups, can't twrp backups be copied via USB? If your phone is famous enough you can find stock images on its site or on XDA developer website.
Lastly try this: QFIL tool (video for my phone but steps should be the same for backing up: https://www.youtube.com/watch?v=G9LoaPrbGx0&list=WL&index=62)
However, do note that QFIL tool is a very powerful tool and it's very easy to softbrick the device if you don't know what you are doing. Find a video for your device to be double sure.
Any kind of backup of apps and their data requires root.
If you don't have root, rooting will wipe all data.
TWRP used to be able to create an image of your system, but the practicality of that is long gone (not sure if it can still do it).
The most pragmatic approach is to root, install Swift Backup or Neo Backup. Have it backup your apps/Config to a local folder. Then have that folder synced to a home machine using a network sync tool like FolderSync, Syncthing, etc.
If you want an image to restore so you can revert, it can be done. I'm just not sure of the use-case anymore with the size of partitions.
Long ago I used an automatic imaging process weekly, back when partitions where much smaller. I never once used one of those image backups.