4

A user on our site wanted to backup a game. For an unrooted device, the usual route to backup is either with Google Cloud Sync, or with adb. Both depends on the attribute allowBackup in the app manifest. If it is false, it won't be backup. That was my understanding, until now.

When reading the manifest of the game, I came across two entries for allowBackup. First one set to false (line 6), and the last one to true (line 70). I am trying to understand which one should I, an end-user, be concerned with to ascertain if the game/app can indeed be backup by adb or Google? An explanation, however brief, would be nice as to why there are two allowBackup attributes, and can there be more than those two in an app/game?

Another confusing thing is that for regular apps (non-gaming apps), the attribute was always written as android:allowBackup=<FLAG>, but for the game here, it is game_display_name:allowBackup=<FLAG>. Is this convention game-specific? This part of the question is optional for you to answer.

2
  • 1
    follow up/extension: how do mobile switch apps handle allowBackup=false? for example Huawei Backup "Back up your apps, including app data such as accounts" - there are lot of such migrating apps for several OEMs claiming this
    – alecxs
    Jan 2, 2021 at 19:46
  • 1
    @alecxs it is a good question in itself. I don't think I can answer without having a device at hand whose OEM offers such a feature. OnePlus definitely doesn't promise app data migration. play.google.com/store/apps/details?id=com.oneplus.backuprestore
    – Firelord
    Jan 2, 2021 at 20:00

1 Answer 1

4

I don't know what tool you used for decompiling AndroidManifest.xml but both apktool and Jadx do not show an game_display_name:allowBackup=... entry.

No matter what allowBackup entries you have the only entry that matters is the one in the <application> tag. See Android documentation: https://developer.android.com/guide/topics/manifest/application-element#allowbackup

The other one may be added by the developers because they have not read the documentation carefully.

However the game you are refferring to has a second relevant entry for backup: android:fullBackupContent:

This attribute points to an XML file that contains full backup rules for Auto Backup. These rules determine what files get backed up.

When I look at this XML file I see the following content:

<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
    <exclude domain="sharedpref" path="appsflyer-data" />
</full-backup-content>

From my understanding of this file format that means that the file(s) in /data/data/com.ironhorsegames.idlewasteland/shared_prefs/appsflyer-data* are excluded from backup.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .