Backup and restore (TWRP-style)
-
Hello,
I'm not really well informed. When I put the micro SD card into my cell phone, only fat32 was possible as a file system. Unfortunately, that's not so good because of the lack of a rights system and the limitation to file sizes of a maximum of 4GB.I hope ext4 will be possible at some point.
Best regards
Charly -
@Charly I see, could this be a device-specific issue? It seems to have been done before here for example: https://xdaforums.com/t/tutorial-howto-convert-your-external-sd-card-from-fat-exfat-to-ext4-3-ways.2480963/
Or did you mean Ubuntu Touch specifically is unable to deal with ext4-formatted SDs?
-
@GooglyBear
Hello.
On my Xiaomi Redmi Note 9 Pro (24.04-2.x), I inserted a 64GB SD card formatted in ext4 by my Fedora 43 desktop.
The card is visible in FileManager+, I was able to add a file to it, and I imagine it would be usable for your rsync...
I run this one as root and it's look good
rsync -avh --size-only --checksum --ignore-times /home/phablet/ /media/phablet/f6466442-e8e6-46bb-b918-89996720569e/phablet-backup/ -
Hello forum,
I have had the micro SD card in my x23 cell phone for 3 years. I think back then only fat32 was possible. I don't know if anything has changed.
I will try out whether an ext4 formatted memory card is possible.
Best regards
Charly -
@Charly
Hello.
If I understood correctly, UT formats the SD card in FAT, but on my phone, it was able to use ext4 without any issues. Let me know if it works for you too. -
@Vlad-Nirky said in Backup and restore (TWRP-style):
UT formats the SD card in FAT
I'd think that using a command line tool it could be possible to use other formats.
-
@gpatel-fr
Yes, I was thinking to the SD app present in Lomiri panel. -
looking at the 'ciborium' code, it is hardcoding only exfat at one point, when checking on dynamic insertion of a sdcard. I will not be able to do any tests on that since my phone can't accept a new sdcard without removing the battery.
-
@Moem Thanks for your input, backing up your
homedirectory is definitely a great idea and is what people normally opt for.Below I'll try and summarise what I've learnt for solving my problem, which might help people facing a similar problem.
Please remember I have not tried restoring yet to see if every single thing on the list was backed up, the one thing that's certain is if you have files in the
homedirectory and you back up that, those are safe (you can always check they successfully made it to your computer by browsing inside the folder).Backing up your
homedirectory- Connect phone to computer.
- Make sure the
adbcommand is working (runadb devicesto see if there's any output etc.). - Run
adb pull /home.
You should receive some output about whether all your files made it to your computer, and obviously you can check for yourself by browsing them on your PC.
Why should I backup
userdatainstead of justhome?If you want to take it a step further, I'd recomment backing up the entire
userdatafolder, which also contains thehomefolder mentioned previously: as far as I've been able to gather just by asking other users on UBPorts' Telegram servers, this includes the items on the list below.Things inside
userdatawhich are useful to back up- the settings you changed in the settings app
- your fingerprints for unlocking your phone
- the apps currently installed on your device
- the apps' data: for example, all the apps and everything else needed to run your Waydroid container exactly in the state it is in now
- packages installed via
nixandsnap
Backing up
userdataDo the same but run
adb pull /userdata.
Basically if you ever lose your userdata you just need to replace your current/userdatafolder on your phone with the previous backup of/userdataon your computer.While I would probably simply run something like
adb shell 'rm -rf /userdata && mkdir -p /userdata' && adb push /path/to/userdata /userdatafor restore, do not run it unless you know what you're doing, I have not verified this to be working and need to check with people more knowledgeable than me on UT to confirm/fix.This is the best I have for now, I'll update / add to this if I come across anything better

-
@GooglyBear
With this procedure, are Waydroid's specific directory rights preserved? -
@Vlad-Nirky The truth is I have no idea, only way is to test it I guess. I also assume I'll have to run
adb rootfirst to download all files.The
adbuser documentation (https://android.googlesource.com/platform/packages/modules/adb/+/refs/heads/main/docs/user/adb.1.md) doesn't seem to be of much use in answering this question. -
@Charly said in Backup and restore (TWRP-style):
If you copy to an ext4 usb stick and use rsync with sudo, all different rights should be applied correctly.
This might help I suppose, and there's probably a way to configure
rsyncto work via cable. We'll see... -
@GooglyBear
I'll try...
Hum. No, the pull don't have access to waydroid data folder.adb pull /home/phablet/.local/share/waydroid
/home/phablet/.local/share/waydroid/: 0 files pulled, 0 skipped.