lundi 23 septembre 2019

How to retrieve the Sqlite database of an Android application to your computer (Windows/Linux)

In order to retrieve the database from the Android device to your computer, use the following commands :

adb exec-out run-as your.package.name cat /data/data/your.package.name/databases/yourdatabasename.db > C:\DestinationFolderOnYourComputer\yourdatabasename.db

adb exec-out run-as your.package.name cat /data/data/your.package.name/databases/yourdatabasename.db-shm > C:\DestinationFolderOnYourComputer\yourdatabasename.db-shm

adb exec-out run-as your.package.name cat /data/data/your.package.name/databases/yourdatabasename.db-wal > C:\DestinationFolderOnYourComputer\yourdatabasename.db-wal

Then you can open the database on your computer by using SQLiteDatabaseBrowser for example.