Hacker News new | ask | show | jobs
by retrochameleon 798 days ago
Still trying to find a functional tool that makes it easy to take full backups and restore them to android devices since adb deprecated the "backup" command
2 comments

I don't think such a thing exists right now. I've been looking for it.

The best normie backup tool is probably Neo Backup on F-Droid, and it's buggy and lacks some important features. Titanium is dead. I've not been satisfied with any of the various closed-source paid apps on the Play Store.

Any true backup is going to require rooting your phone. It's not in google's interest to allow you, the user, to access core operating system files and configuration on their device.

If you don't 0wn it, you don't own it.

Here's what I do.

I install Magisk and the MagiskSSH module. This gives me a root ssh shell and I can rsync any file on the device, selinux context and all.

The system requires some excludes for remounted/mirrored directories, and then there's other things like cache directories that I don't need to backup, so I use a rsync filter file. rsync's --link-dest makes backups very very fast and reduces disk usage. I should really do this on a filesystem that does block-level de-duplication, but I don't really need to because it's efficient enough already. Each app has to be paused/frozen during the backup to ensure data integrity.

Restoring requires a bunch of hacky scripts. It's not pretty, but it works.

I have to send over the apk file and use Android's native "pm install" to install it from /data/local/tmp. There's some cases where this doesn't work and I have to install the app manually from the store or wherever (APEX and other mutli-apk crap).

Then my script freezes/disables the app, wipes the local data, copies the backup data, fixes the ownership, unfreezes the app, and it mostly usually sometimes works.

Figuring out all the commands to do this, like getting the AIDs of apps, is some dark art shit. I've been doing this since the very beginning on a G1.

Maybe some day I'll put my scripts out there and it will inspire someone to pick it up and make them easier to use, but it's never going to be a real solution.

Someone just needs to make a real backup app for Android.

Titanium Backup has been working fine for me to backup and restore various apps. Are there features missing or problems with TB's implementation on modern Android versions?
There are very well-known problems with Titanium Backup not being able to backup/restore newer APEX and multi-part APK types. It can also cause system configuration corruption/resets on certain special/meta backup items. Google for more info.

It may not even run on some Android 13 and later devices due to a common error of not being able to detect root status.

Google for more info.

if you use an AOSP based ROM, give Seedvault another look since they merged device2device-transfer in the beginning of the year https://github.com/seedvault-app/seedvault/pull/562
Seedvault is not a good backup solution. The devs who promote it don't have a lot of credibility. It basically doesn't work half the time and they know it, but pretend it's great to pad their resumes.
did you base your impression for 'half the time' on a version that can't skip the allowBackup=False app manifests via d2d ?
Even the core LineageOS and Graphine devs spend time disparaging it on reddit and twitter with comments like "It's not a very good app." and "Unfortunately Seedvault is still unreliable." Those are direct quotes.

I think it was back on LineageOS 16 that it was actually broken for the entire release. It wasn't even possible to do a basic backup at all.

Google for "site:reddit.com does seedvault even work" for dozens and dozens of examples.

why pad my opinions with outdated quotes if I can have first-hand experience? it's a good tip I gave on recent developments and your objections aren't convincing. Latest Lineage/Graphene both include in their forked seedvault repos a current enough version to check out d2d-transfer, give it another try.