lundi 6 juillet 2015

Replace app SQLite database using ADB

I'm trying to replace the database of my app with ADB, on a rooted device. I follow these steps:

  1. $adb shell
  2. run-as my.app.package
  3. cd databases
  4. rm my_database.db
  5. chmod 777 .
  6. exit
  7. exit
  8. $adb push my_database.db /data/data/my.app.package/databases/my_database.db

The new database is copied successfully. But when open I launch my app again, it seems that the new database is deleted an created again. Why?

Thanks.

Aucun commentaire:

Enregistrer un commentaire