I'm trying to replace the database of my app with ADB
, on a rooted device.
I follow these steps:
$adb shell
run-as my.app.package
cd databases
rm my_database.db
chmod 777 .
exit
exit
$adb push my_database.db /data/data/my.app.package/databases/my_database.db
The new database is copied successfully.
But when I launch my app again, it seems that the new database is deleted and created again. Why?
Thanks.
I don't know exactly why but it is working now. I followed this steps:
Both databases versions are the same and I have no code in onUpgrade
method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With