Which allowBackup attribute is useful to understand if an app can be backup?


Question

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.


Answer

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.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes