Why is Android not providing backup of app data?

Search This thread

TheMystic

Senior Member
Mar 18, 2017
2,292
1
1,022
OnePlus 8T
Samsung Galaxy S22 Ultra
Hello community!

I think this is the best place to ask this question as this is a forum of default for all developers.

Why is Android not providing backup of app data?

On iOS, factory reset and restore is a breeze. The process is extremely simple, and there is absolutely no user intervention required after a factory reset. iOS simply puts everything in its place as if nothing happened. Same is true for macOS, WatchOS & iPadOS. This is just a wonderful implementation. The only limitation is if an existing app is no longer available on the Apple AppStore. In that case, the app data would still remain in the cloud (or iTunes backup), and can be easily restored if the app (.ipa file) is backed up using iTunes (or similar 3rd party software).

Can someone answer why the same is not available on Android, despite it being the more versatile software?

As far as I know, backup over ADB isn't reliable. And more importantly, ADB isn't for everyone.

Thanks.
 

alecxs

Forum Moderator
Staff member
Feb 17, 2016
5,086
8
5,301
gitlab.com
android is google. there exist native backup option to backup app data in google drive. adb backup is androids native backup option. it will save apps data to PC and can restored even to other devices.

so your question should be, why android provides solution to app developers protecting their app data from backup.
 
  • Like
Reactions: Izzysoft

TheMystic

Senior Member
Mar 18, 2017
2,292
1
1,022
OnePlus 8T
Samsung Galaxy S22 Ultra
android is google. there exist native backup option to backup app data in google drive. adb backup is androids native backup option. it will save apps data to PC and can restored even to other devices.

so your question should be, why android provides solution to app developers protecting their app data from backup.
The native backup solution doesn't backup most of the apps data. As a result, most things must be setup from scratch after a factory reset. The process isn't automatic and requires plenty of manual work. This is clear from the numbers below:

iMarkup_20220629_234830.png


iMarkup_20220629_234904.png


iMarkup_20220629_235122.png


Size of actual backup:

iMarkup_20220629_235023.png


It is clear that most apps are not backed up, and only a very few apps' data is included, which I believe is mostly Google stuff.


That said, why does Android allow developers to prevent their apps' data from being backed up? This doesn't make sense because the data belongs to the user, not the developer of the app.
 
  • Like
Reactions: scandiun

alecxs

Forum Moderator
Staff member
Feb 17, 2016
5,086
8
5,301
gitlab.com
Last edited:
  • Like
Reactions: scandiun

TheMystic

Senior Member
Mar 18, 2017
2,292
1
1,022
OnePlus 8T
Samsung Galaxy S22 Ultra
what you don't understand app data can be perfectly backed up. it's just the app developers they decide whether it's allowed or not. It's controlled in AndroidManifest.xml
android:allowBackup="true" API level < 30
android:debuggable="true" API level > 30
https://developer.android.com/about/versions/12/behavior-changes-12#adb-backup-restrictions

btw your screenshots refer to EXTERNAL_STORAGE
https://developer.android.com/training/data-storage
On iOS, the backup doesn't include apps' own data (those that are required for the app to run properly), instead only the data that the app has collected from the user, such as settings, login credentials, etc. So that when the user restores a backup, everything simply works like nothing happened. And this includes crucial apps like Banking apps too.

During the restore process, the system downloads the apps automatically from the Store that comes with the entire database, libraries and other files that the app needs to run properly, which isn't part of the backup. The user doesn't have to worry about any of these things as the system handles EVERYTHING automatically.

I don't understand why App Developers should have a say in whether the user specific data that they collect and store in their working directories should be part of the backups. That data belongs to the user and as such only the user should decide whether it needs to be backed up or not, just how it is in iOS.

On Android, where does the app save all of user configurations and files?
 

alecxs

Forum Moderator
Staff member
Feb 17, 2016
5,086
8
5,301
gitlab.com
I think we can track it down to simple rule.
if you wanna have control and responsibility about your phone in your hands, use android.
if you don't care a f** about what's stored in cloud - buy iPhone
 

TheMystic

Senior Member
Mar 18, 2017
2,292
1
1,022
OnePlus 8T
Samsung Galaxy S22 Ultra
I think we can track it down to simple rule.
if you wanna have control and responsibility about your phone in your hands, use android.
if you don't care a f** about what's stored in cloud - buy iPhone
You missed an important point: on iOS, user decides whether his data that is collected by an app should be backed up to the cloud or not. You get to control what to backup, and what not to backup. If user chooses to save in the cloud, Apple is pretty good in keeping that data secure. Most cases of breach are users' own stupidity.

With Android, it is absurd that the app developers make this decision for the users. And you are saying one should use Android if he wants to take control of this. I don't see a simple or reliable way to do that.
 
  • Like
Reactions: alecxs

alecxs

Forum Moderator
Staff member
Feb 17, 2016
5,086
8
5,301
gitlab.com
Yes because Android is highly customizeable. I know how to backup my data. There exist TWRP, Migrate, Titanium, and I never used any cloud. Btw the last thing I would backup is /storage/emulated/0/Android this is the first directory I always delete, and I never lost any app data (although I don't know what obb really contains as I never played games, used WhatsApp or any other memory wasting stuff)

It's okay if it is absurd to you, but sure it's not a technical reason. I have linked the documents explaining. To me it would scare me to dead if my device would re-install everything and becomes in the exact same state as before factory reset
 

x3r0.13urn

Senior Member
Nov 1, 2012
404
158
It's simple, main reason is GDPR, cmiiw

Data needs to be separated between application data (config, everything that is not stored any customer/user/client information) and user's data (login sessions, anything that might compromise customer/user/client information).

For most application data, it can be safely assumed, google, huawei, or any third party software, can back it up, stores it in any kind of their backup storage (cloud, ftp, you name it), and restores it as they wished. However, as the user's data, they cannot. At least without user's consent. And it's because of GDPR.

And @Alecxs is correct. Imagine if someone can restore your data in their phone, and then they were identified as you, imagine the horror. If you think no it's impossible, think again. If you think Apple is secure and that's not possible, think again.

And now, why many backup apps exist in play store that can do that? Simple, they don't provide any kind of agreement that they will store your data in their storage, it's always in your local storage or your own cloud storage (dropbox, drive, you name it). And because there isn't any clear protocol from android to do so (separated backup between application or user data), most of them needs to be operated under root.
 
  • Like
Reactions: alecxs

TheMystic

Senior Member
Mar 18, 2017
2,292
1
1,022
OnePlus 8T
Samsung Galaxy S22 Ultra
Yes because Android is highly customizeable. I know how to backup my data. There exist TWRP, Migrate, Titanium, and I never used any cloud. Btw the last thing I would backup is /storage/emulated/0/Android this is the first directory I always delete, and I never lost any app data (although I don't know what obb really contains as I never played games, used WhatsApp or any other memory wasting stuff)

It's okay if it is absurd to you, but sure it's not a technical reason. I have linked the documents explaining. To me it would scare me to dead if my device would re-install everything and becomes in the exact same state as before factory reset

Less than 2% of Android users install a custom recovery and/ or root their device. And a much smaller number use ADB to take care of a few things on their non-rooted device. I'm talking about backup solution for the remaining over 98% users.

Pretty much everyone knows how to backup their stuff. It's just that there is a lot of work to do and requires patience. An automated backup solution helps in saving plenty of time and unnecessary work for the user.

There are, however, some situations where the user is helpless. I was playing a game for a long time, spent a good amount of money on in-app purchases, and when I bought a new phone, there was no way to transfer all that stuff. That game provided no means (either using Google Play Games or Social Media integration) to backup the user account. I wrote to the developer several times, but never got any response. I even complained to Google, but nothing happened for a pretty long time. I stopped buying stuff in that game. Many months later, the developer finally allowed saving game data to Google Play Games. Although I could now move my stuff to my new device, it was just too late. I lost interest in that game. In my case, I still had the old device with me, and working fine. So I could save all my details to Google Play Games. Imagine if someone lost their device, or broke it, or sold it...for them all that money spent in that game would be gone.

'As with your scare me to death' statement, I think you haven't understood how backup & restore works on iOS. iOS will wipe everything on your phone, do a fresh installation of the OS, download all your apps again, and then restore user settings, login credentials, etc, which pretty much takes care of EVERYTHING. The user has no work to do here. But the system is fresh, and all the junk built up over time by both the system and the apps are now gone! It is NOT a system image and restore that will bring everything back, including the unwanted stuff. So your device isn't actually in the exact state like before. It is much leaner, cleaner and much more efficient. The exact same thing happens when you migrate to a new device. Only the things that matter are migrated, the rest are not.

Do note that the user has full control over which apps to backup, and therefore, which ones will be restored/ migrated.

can you give example app please, let's do reality check

If I factory reset my Android phone, the backup will only restore call logs, sms, contacts, and a few basic stuff. It will also download all my apps from the Google Play Store. But here ends the similarity. Beyond this, the user has to setup every app from scratch, with the exception of a few like Google's and Microsoft's cloud based apps. User also has to setup all the permissions for apps from scratch. There is a lot of work involved, which can be easily avoided if Android provided an automated way of getting this done.

User configuration files and login credentials belong to the user. You haven't explained why app developers can choose whether this information can be backed up or not. To me, it seems like Android has a big limitation in the way it is designed, and so is unable to provide a simple backup solution that takes care of these things like in iOS.
 

TheMystic

Senior Member
Mar 18, 2017
2,292
1
1,022
OnePlus 8T
Samsung Galaxy S22 Ultra
It's simple, main reason is GDPR, cmiiw

Data needs to be separated between application data (config, everything that is not stored any customer/user/client information) and user's data (login sessions, anything that might compromise customer/user/client information).

For most application data, it can be safely assumed, google, huawei, or any third party software, can back it up, stores it in any kind of their backup storage (cloud, ftp, you name it), and restores it as they wished. However, as the user's data, they cannot. At least without user's consent. And it's because of GDPR.

And @Alecxs is correct. Imagine if someone can restore your data in their phone, and then they were identified as you, imagine the horror. If you think no it's impossible, think again. If you think Apple is secure and that's not possible, think again.

And now, why many backup apps exist in play store that can do that? Simple, they don't provide any kind of agreement that they will store your data in their storage, it's always in your local storage or your own cloud storage (dropbox, drive, you name it). And because there isn't any clear protocol from android to do so (separated backup between application or user data), most of them needs to be operated under root.
GDPR? Seriously?

Is GDPR not applicable to Apple?

And GDPR is not about backup and restore. It is about collecting user data without authorization AND using it for purposes that benefit someone else.

For the purposes of backup, all data remains with the user account and not used for any purpose other than to restore the same to the user's device(s), subject to credentials verification.

By your logic, there cannot be any cloud based solution either, including emails!

As mentioned before, Apple is pretty good in taking care of their cloud services. And so is Google. Most cases of breach have been found to be a fault at the users' end. Someone keyed in their credentials in the wrong place and then complained that their account is compromised, their photos have been leaked - not Apple's fault.
 

TheMystic

Senior Member
Mar 18, 2017
2,292
1
1,022
OnePlus 8T
Samsung Galaxy S22 Ultra
please give me example app pkgname so I can double check
You can take any app on your phone which isn't cloud based. Take the file manager app for example. I have set up several remote connections on my file manager. There is no way this information will be restored from the stock Android backup. I will have to setup all remote connections again if I were to uninstall this app and reinstall it. Same holds true if I factory reset my phone or migrate my information to a new device. Android will only reinstall the app for me automatically. I will have to setup all remote connections manually, AND also setup all the custom configurations for the app that I have setup in System Settings.

Only if the app itself provides a built-in way to export all the configurations, will I be able to export them and import it back after a factory reset/ migration. Even then, the configurations (or permissions, etc) for the app under System Settings must be redone manually on Android.
 

TheMystic

Senior Member
Mar 18, 2017
2,292
1
1,022
OnePlus 8T
Samsung Galaxy S22 Ultra

alecxs

Forum Moderator
Staff member
Feb 17, 2016
5,086
8
5,301
gitlab.com
okay I am not going to test crappy google one backup on my daily driver, as I don't want to safe my phone to cloud for reason.

Haven't checked Nova Launcher but for File Manager I can say android:allowBackup="true" is allowed in AndroidManifest.xml, so adb backup and restore of app data will work (I can test it later)

Not sure what you mean with non-cloud based apps, are you trying to say these apps can't backed up from google drive? If so, who decides if an app is "cloud based" or not?
 

TheMystic

Senior Member
Mar 18, 2017
2,292
1
1,022
OnePlus 8T
Samsung Galaxy S22 Ultra
okay I am not going to test crappy google one backup on my daily driver, as I don't want to safe my phone to cloud for reason.

Haven't checked Nova Launcher but for File Manager I can say android:allowBackup="true" is allowed in AndroidManifest.xml, so adb backup and restore of app data will work (I can test it later)

Not sure what you mean with non-cloud based apps, are you trying to say these apps can't backed up from google drive? If so, who decides if an app is "cloud based" or not?
Most of the important/ critical information are already in the cloud for almost everyone. This includes emails, photos & videos, documents, etc. for those who use Cloud Storage (which is pretty much everyone, with an exception of an insignificant minority, insignificant being purely in terms of numbers).

Which also means that all login credentials are already with the service providers in encrypted form, in the cloud. So there isn't really anything critical in the app backups that isn't already there in the cloud. App specific configurations don't come under critical information, and as such all that data should never leave the device, unless it is part of the system backup. More importantly, that data belongs to the user, and there is no reason app developers should have a say in whether that should be available for backup or not. It simply shows that Android is most likely limited by its flawed design on this issue.

Pretty much everyone uses the built-in Backup feature provided by Google, and it makes sense to use that over others like Samsung Cloud because a Google backup is available on all brands of Android devices. I haven't used Samsung Backup or other OEM specific backups, but I guess they are pretty much the exact same like Google Backup, the only difference being the service provider.

By cloud based apps, I mean apps that save all data in the cloud, e.g. Gmail, Outlook, Google Keep, Microsoft OneNote, Google Drive, OneDrive, etc. Apps like file managers, launchers, clipboard managers that don't use a cloud, firewall apps, etc that work locally are the apps whose data must be backed up to the cloud. Again, by app data I mean the user configurations (e.g. remote/ cloud connections set up in a file manager) and login credentials that belong to the user, and not the app or its maker.
 

alecxs

Forum Moderator
Staff member
Feb 17, 2016
5,086
8
5,301
gitlab.com
user configurations (e.g. remote/ cloud connections set up in a file manager) and login credentials for com.alphainventor.filemanager can backed up, I don't see a problem here besides the fact the app developer seems to agree with your opinion and does allow it (there are good reasons for app developers to deny, I can give you example if you want)

lets stay at facts, regardless of your opinion post #2 applies. Android is providing backup of app data
 

TheMystic

Senior Member
Mar 18, 2017
2,292
1
1,022
OnePlus 8T
Samsung Galaxy S22 Ultra
user configurations (e.g. remote/ cloud connections set up in a file manager) and login credentials for com.alphainventor.filemanager can backed up, I don't see a problem here besides the fact the app developer seems to agree with your opinion and does allow it (there are good reasons for app developers to deny, I can give you example if you want)

lets stay at facts, regardless of your opinion post #2 applies. Android is providing backup of app data
Please, adb doesn't come under official backup feature provided on phones. ADB, root, custom recovery, etc. are for a niche of users who are an insignificant minority of the user base.

So, Android needs to provide a way or redesign itself where it's Backup & Restore function is just as seamless and effortless, as it is on iOS.

Do let me know what 'good reasons' app developers have to opt out of data backups. Hope they do realise that no one is interested in the app specific stuff, they only care for their own configuration files. And those who do, they know how to root and extract all app data.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Hello community!

    I think this is the best place to ask this question as this is a forum of default for all developers.

    Why is Android not providing backup of app data?

    On iOS, factory reset and restore is a breeze. The process is extremely simple, and there is absolutely no user intervention required after a factory reset. iOS simply puts everything in its place as if nothing happened. Same is true for macOS, WatchOS & iPadOS. This is just a wonderful implementation. The only limitation is if an existing app is no longer available on the Apple AppStore. In that case, the app data would still remain in the cloud (or iTunes backup), and can be easily restored if the app (.ipa file) is backed up using iTunes (or similar 3rd party software).

    Can someone answer why the same is not available on Android, despite it being the more versatile software?

    As far as I know, backup over ADB isn't reliable. And more importantly, ADB isn't for everyone.

    Thanks.
    2
    Not sure what you mean by 'embedded systems'. I have modified my previous post with more appropriate wordings.
    He means that phones and tablets are treated more like a broadband router or devices requiring Policies for employee personal use of business equipment, rather than being treated as a personal computer where you have root (administrator) access to all software and hardware.

    Everyone making apps for mobile devices (banks, Netflix, Disney, Spotify, Apple TV, etc.) demands device manufacturers to lock everything so their data is not leaked, copied or hacked. Things like Widevine or Samsung Knox require everything locked down or will not work because of this. And this will probably get worse with time. iPhones and Androids will get faster, more HDR screens, but will do narrower sorts of stuff.
    2
    because embedded systems are not personal computers.
    1
    android is google. there exist native backup option to backup app data in google drive. adb backup is androids native backup option. it will save apps data to PC and can restored even to other devices.

    so your question should be, why android provides solution to app developers protecting their app data from backup.
    1
    @sonic997 Titanium Backup hasn't received updates since 2019, is no longer working with latest versions of android. The only one that is working is Swift Backup.
    Thank you sir. I just checked swift backup. Good news is we can backup all apps but not partially like Helium. However, it still can't backup and restore data without root, which is disappointed.

    The point of disappointed is due to Google still refusing to open the privilege to users to access data without root. We must sacrifice encryption and security to unlock the bootloader and root to do the backup and install process.

    Okay, I know Google wants to earn money. So why Google won't offer a charged plan for backup and restore all apps with data, can't modified after backup. I think it can earn a lot. It's 2023 now....