0

I am using android studio to develop my first android app.

I am plugging in my phone, and testing my app on there to test changes as I go.

I am using a sqlite database. How do I view this database, the tables, and the contents (rows) of those tables?

Upon Google searching I found that this can be done when you root your phone. But surely you dont have to root your phone to view your databases when your developing an app?

Update:

People are using terminology assuming knowledge. If you want me to copy a database, explain how, if you want me to use adb, explain what it is. Otherwise it means not much to me. Thanks

5
  • copy your database from internal to external storage so that you can access it Commented Feb 24, 2015 at 8:41
  • use emulator and you can find your database at /data/data/{yourapp} Commented Feb 24, 2015 at 8:45
  • @kamran so once emulator is running, how do i find my database? Commented Feb 24, 2015 at 8:51
  • open the DDMS perspective --> file explorer --then data folder --->data--yourapp Commented Feb 24, 2015 at 9:01
  • The BEST solution was @Bob's answer at stackoverflow.com/questions/19194576/… Commented Jul 1, 2018 at 18:57

3 Answers 3

1

Pull the sqlite database named as XYZ.db from your simulator or device using adb shell command or GUI interface provided by the AndroidStudio. Then Open it using The Sqlite Browser. It's a killer app for sqlite browsing.

As android is shipped with the sqlite3, you could use command line to view the data base saved inside the device / emulator. Command reference is Listed Sqlite3 android command

If you feel lazy enough to discover how to pull files from emulator / device using adb pull, following answer may help you. how to pull

Sign up to request clarification or add additional context in comments.

Comments

0

At least in my case I needed to root my device. After that I installed SQLiteEditor. With this app you can modify and view your database. Or if you don't want to install a new app you can use a root explorer and enter directly into your installed app in the DB. Is inside /data/data/{yourapp}.

Comments

0

Copy your database to your system

  1. Using copy or paste Or
  2. Using adb pull command

Then Googled for sqlitestudio-2.1.4, download and run , browse your database ,,then you can see your database rows, column, value etc.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.