Skip to content

Instantly share code, notes, and snippets.

@alphacat2018
Created December 2, 2016 12:08
Show Gist options
  • Save alphacat2018/4fcd56bc50dd9d285188af980f983f14 to your computer and use it in GitHub Desktop.
Save alphacat2018/4fcd56bc50dd9d285188af980f983f14 to your computer and use it in GitHub Desktop.
Push database file into an unrooted android device
/*assume you have created a database file outside*/
adb push /sdcard/database.db newDatabase.db
adb shell
adb run-as my.package
adb cp /sdcard/database.db /data/data/my.package/databases/database.db
Until now,you should have replaced the original database.db successfully.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment