Why is Android not providing backup of app data?

Search This thread

TheMystic

Senior Member
Mar 18, 2017
784
381
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.
 

aIecxs

Senior Member
Feb 17, 2016
1,888
535
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.
 

TheMystic

Senior Member
Mar 18, 2017
784
381
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.
 

aIecxs

Senior Member
Feb 17, 2016
1,888
535
gitlab.com
Last edited:

TheMystic

Senior Member
Mar 18, 2017
784
381
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?
 

aIecxs

Senior Member
Feb 17, 2016
1,888
535
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
784
381
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: aIecxs

aIecxs

Senior Member
Feb 17, 2016
1,888
535
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
257
93
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: aIecxs

TheMystic

Senior Member
Mar 18, 2017
784
381
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
784
381
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
784
381
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
784
381

aIecxs

Senior Member
Feb 17, 2016
1,888
535
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
784
381
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.
 

aIecxs

Senior Member
Feb 17, 2016
1,888
535
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
784
381
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.
  • 1
    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.
    1
    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.
    1
    can you please provide pkgname (or google play link) of your file manager, so I can double check?
    1
    nope, you haven't answered the first one

    nor the last


    for another question, your answer was
    1. permissions
    2. permissions
    3. permissions


    so for File Manager backup

    why not test it yourself? you're contradictory claiming android would not differ between different kind of app data, but at the same time claiming only partially app data is restored. so what is true then? you're comparing sizes, so please tell me, is app data backed up or not? You gave the answer already...

    I have already replied to your first post that files in EXTERNAL_STORAGE are memory wasting garbage (and no app data). fairly enough, let's mention that has changed now with Android 11 scoped storage where it contains important data (but still no app data to be backed up)
    I'm talking of Google Backups, but you continue referring to ADB backups. The two are not the same. Google Backup is what over 98% users use.

    Setting up permissions and configuring 100s of apps is a time consuming exercise. It takes hours to set them all up, if you are particular about app permissions. On an iPhone, if I factory reset, all I have to do is to login to my iCloud account and choose to restore a backup. That is all I have to do. iOS takes care of everything else. That is how the experience should be for Android too.

    Just because I am not sure about 1 app, do you really think it makes sense to do a factory reset and test it? I showed you I have about 294 apps on my phone, but the backup includes only 90 apps in my case. Does that not tell you that the Google Backup leaves out a large majority of apps during the backup process?

    Even though this particular app was included in the backup, the size of it tells me it is unlikely to include all the remote connections I have set up within the app. Out of some 15 file managers I have installed in my phone, I see only 3 in the backup.

    What I know from my previous experience is what I have stated. It is not difficult to confirm as the numbers are clear.

    If an app has not been coded nicely enough to protect user data, it is not an excuse to stop it from being backed up. It also shows weaknesses in the how Android is designed. And as mentioned before, the data that I am referring to is nothing crucial. These are simply configurations set inside the app, and those set for the apps.

    All that said, since you claim there is very little work after a factory reset, why don't you give it a try? My device is in stock form and it is kind of a forbidden exercise for me, given how much time I know I'll have to put in after a factory reset.