How to backup F-Droid apps in case I lose my phone

Hi,

If I ever lose my phone, I know that all my Play store apps are backed up (in google one I think, and even just by connecting in my Gmail account I can check my library and reinstall them).

As there is no login in F-droid app store, how can I backup my apps to reinstall them fastly on a new phone ?

Does google one, or google play store, also backup the F-Droid apps or only the apps downloaded in the Play Store ?

Thank you

Some other external tool must be used, yes. Eg. If you have root you can use Neo Backup | F-Droid - Free and Open Source Android App Repository (to save in app data too)

Without root there are many apps that can extract the APKs (but not the app data, remember to use apps that allow backups, ref: https://gitlab.com/fdroid/fdroiddata/-/issues/2553 ) like App Manager - Android package manager | F-Droid - Free and Open Source Android App Repository

Note that Google does not backup APKs, as far as I know, it just reinstalls them from their own store. They might not backup F-Droids app since it appears as not installed by Play.

My main question is: do you mean the apps themselves, or the data of those apps? Because those are 2 pretty different things.

If you mean the apps themselves, I like this trick (but it requires the Android Developer tools):

# Write list of apps to file
adb shell "pm list packages" | sed 's/^package://' > installed_apps.txt
# Download and install each app in app list to device
while read -r app; do
    suggested_version_code="$(curl "https://f-droid.org/api/v1/packages/${app}" | jq -r ".suggestedVersionCode")"
    curl "https://f-droid.org/repo/${app}_${suggested_version_code}.apk" --output "${app}.apk"
    adb install "${app}.apk"
done < installed_apps.txt

The data of apps is more complicated. In theory, any app that opts into Android’s backup framework should have its data backed up to and restored from Google, but I have no clue if Android always does that even when the app wasn’t installed from Google Play. What Android is doing there is kinda “magic”, Seedvault shows a nice GUI but Google’s implementation is very in the background to the point I don’t know if you can see if any data was backed up at all.

Thanks for your replies.

I was meaning the apk and not specially the data inside.
I was affraid that if I lose phone and if use a new one, only the play store apk appears and I have to manually reinstall all the FDroid app (at least the ones that I remember), and also all the apps I installed myself without any app store.

The ADB hack is exactly what I was looking for, because it does no more no less the thing I want, but does it mean that I have to do it with computer, and manually each time I want to save them ?

I would prefer automatic backup each day or each time I install or uninstall an app.

Thats why I sticked with the solution of the App Manager you advised me.

Whereas there’s a lot of functions inside that I dont need, it seems that the backup function is exactly what I was looking for so thats good. “It seems” because I havent tried going on new phone and reinstall it to see if it works but I think thats OK.

Do you think backing up the list of downloaded APK could be a new feature for F-Droid ?

The list of Apps could be backed up (if we choose it) and attached to some random ID and password that we could write somewhere.

Thanks again

I’d suggest a ROM with Seedvault backup, and using adb to pull to a PC. Calyx, Graphene (not a recommendation), DivestOS come to mind. Yes, a PC or some other computer and storage is necessary, for a “lost phone” scenario backup/recovery.

OTOH, if you only care about apks not the data, then it’s not a biggie to reinstall whatever app you remember you “need” when starting to use a new replacement phone. If you don’t remember or miss an app, then it was just extra baggage anyway.

They promote that auto “cloud” backup stuff as convenience, but IMO it is also a lot of waste - bandwidth, programmer effort, storage.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.