1

I want to view data of a specific application and ideally modify the data and upload it back. I know the application data files are implicitly protected to prevent malicious application stealing passwords/accounts and other information.

However isn't there any API to back-up the data and load the back-up back? I would find this quite handy before doing un-revertible changes in applications as well.

Can I somehow read/write the entry without rooting the phone?

3
  • There's adb backup / adb restore for that. Problem still would be how to modify data in the backup files.
    – Izzy
    Commented Dec 26, 2014 at 21:01
  • Are they encrypted? Or of unknown format? Commented Dec 26, 2014 at 22:09
  • Depends. If you provide a password, they get encrypted (otherwise not). They can be converted to .tar, but I don't know for the opposite direction (converting a modified .tar back to an .ab).
    – Izzy
    Commented Dec 26, 2014 at 22:37

1 Answer 1

1

Reading and writing application data requires at least system permissions (user id 1000 or less) or explicit permissions (user id of the application itself).

Some applications share user ids (like free and pro versions of an application) to share the same data but as a normal, not system user, you are unable to even list the files inside the /data partition where all the application data is stored.

The backup procedure from android/google itself is done with system permissions as the system user (id 1000) and does only work on applications which explicitly set the allowBackup tag to true.

5
  • And such backup, if allowed is performed how? Could it be possible to modify the application flags? Commented Dec 26, 2014 at 22:30
  • The backup is done by the Google Play Services which is a system application. Remember it does only backup apps that were installed with the Play Store (you can connect applications to the Play Store so it thinks you installed them with the Play Store) and uploads all the data except the cache encrypted to the Google Servers and links it with your account. it is possible to modify those tags by decompiling the application (with apktool) and modifying the AndroidManifest.xml file. Recompile the app and if you're lucky it will install as an update. If not you have to completely reinstall it
    – GiantTree
    Commented Dec 26, 2014 at 22:34
  • Thank you for extensively helping me, but every answer brongs more questions. How can I connect application to google Play? Googling this gives lot of google play links that are irrelevant. How could I change the data once I send them in google servers? Commented Dec 26, 2014 at 23:06
  • You can't modify the backed up data. If you want to modify a third-party application's data then just root your device, back up the data and modify it to see the results. You can't just modify protected information which may cause the other application to crash. There is a reason for a protection like that.
    – GiantTree
    Commented Dec 26, 2014 at 23:33
  • Connecting an app to Google Play may be done with TitaniumBackup. I think it modifies the value of installedBy: of your application to the package name of the Play Store inside the packages.xml file which can be found in /data. This, of course, requires root access.
    – GiantTree
    Commented Dec 26, 2014 at 23:37

You must log in to answer this question.

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