Reputation: 15108
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
Upvotes: 0
Views: 180
Reputation: 8011
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
Upvotes: 1
Reputation: 3735
Copy your database to your system
Then Googled for sqlitestudio-2.1.4, download and run , browse your database ,,then you can see your database rows, column, value etc.
Upvotes: 0
Reputation: 2727
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}.
Upvotes: 0