Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Ionic: How to Access or Browse SQLite Database

DZone's Guide to

Ionic: How to Access or Browse SQLite Database

The article has instructions on how you can access or browse SQLite database embedded in your android app.

· Mobile Zone
Free Resource

Get gorgeous, multi-touch charts for your iOS application with just a few lines of code.

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

Make sure you have connected your mobile phone to your laptop/desktop. Check with command “adb devices” to see that your device (phone) is listed.

The 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 the following command to copy the database file to current directory:

adb pull /sdcard/database_name 


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

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

That is it!

.Net developers: use Highcharts, the industry's leading interactive charting library, without writing a single line of JavaScript.

Topics:
app ,android ,command ,database ,browser ,android app ,cordova ,adb ,sqlite

Published at DZone with permission of Ajitesh Kumar, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}