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

Discover how to focus on operators for Reactive Programming and how they are essential to react to data in your application.  Brought to you in partnership with Wakanda

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!

Learn how divergent branches can appear in your repository and how to better understand why they are called “branches".  Brought to you in partnership with Wakanda

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 best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

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

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

{{ parent.tldr }}

{{ parent.urlSource.name }}