How to check database on not rooted android device

The following solution works only for apps that are debuggable. It may not work well on all devices, since ​​run-as command doesn’t work on some devices, especially with Jelly Bean.

  1. ​Create a *.bat file and copy the following scripts ​​

    adb shell run-as [package] chmod 777 /data/data/[package]/databases/

    adb shell run-as [package] chmod 777 /data/data/[package]/databases/[db_file_name]

    adb shell run-as [package] cp /data/data/[package]/databases/[db_file_name] /sdcard/

    adb pull /sdcard/[db_file_name]

  2. ​Change [package] to the desired application package

  3. Change [db_file_name] to the desired db name Run the bat file and
    you should see the copied database in the same folder as the bat
    file

The above solution assumes:

  • You are working on Windows
  • The device is connected and visible under
    “adb devices”

Leave a Comment