Ionic – How to Access or Browse SQLite Database


The blog represents instructions on how could you access or browse SQLite database embedded in your android app. The way that works for me is to copy the database on to my system and access the same.

Make sure you connected your mobile phone to your laptop/desktop. Check with command “adb devices” to see that your device (phone) is listed. Following commands can be used to get the Cordova SQLite database on your hard-disk filesystem:

  • adb shell
  • run-as package-name-of-the-app
  • chmod 666 databases/database_name
  • exit
  • cp /data/data/package-name-of-app/databases/database_name /sdcard/
  • run-as┬ápackage-name-of-the-app
  • chmod 600 databases/database_name
  • exit; exit

Once you are on system command prompt, execute following command to copy the database file to current directory

adb pull /sdcard/database_name .

With above command, you should be able to find the database copied in current directory.

Use SQLite browser to open the database and browse the data.

That is it!

Ajitesh Kumar

Ajitesh Kumar

Ajitesh is passionate about various different technologies including programming languages such as Java/JEE, Javascript, PHP, .NET, C/C++, mobile programming languages etc and, computing fundamentals such as application security, cloud computing, API, mobile apps, google glass, big data etc.Recently, he has been digging deep into the field of data science and machine learning.

Follow him on Twitter and Google+.
Ajitesh Kumar

1 Comment

  1. Pingback: Android - ADB Shell Batch Scripting - Automate SQLite Database Copy - Bytes Cravings

Leave A Reply

Time limit is exhausted. Please reload the CAPTCHA.