While there are tons of posts about ADB, I think we can all agree it is an elusive beast.  Therefore asking if anyone can shed some light on the following:

Objective is to backup data from an app on **device #1**, change some database data in the app's database file stored in root/data/data/com.AppName.../apps/db, repackage the changes into an .ab and restore it to **device #2** which will have the same App installed.

I have managed to create a **.ab via adb backup** (without .apk), have manipulated the db data after unpacking it from the .ab and have packed everything back into a .ab ready for restore to a new target device.

However, the restore does not yield any change on the new target device where the app has been pre-installed. [This post][1] seems to suggest that the app has to be installed via adb in order to get the data loaded.... but I'm not sure I'm understanding that. 

I do have a copy of the .apk for the app which I could point the mentioned restore script to, but just not sure if thats the thing to do.

One more note is that **I am working with unrooted devices**. While I can see how adb backup could easily have read permission to app data, I never understood whether adb restore has permission by default to write app data to its destination under /root/data/data.

Sorry for the long post but just trying to be clear.

Thanks for any thoughts!


  [1]: https://android.stackexchange.com/questions/155957/cannot-restore-an-adb-backup-due-to-a-tarball-with-a-broken-header/247061#247061