Skip to content Skip to sidebar Skip to footer

How To See The Data Stored In Sqlite In Android Studio Using Genymotion As Emulator

As i am having AMD processor in my laptop i am using GENYMOTION as an emulator. I have stored the data in sqlite as it is a plugin in android studio. But if i want to see the data

Solution 1:

  1. Go to Tools -> DDMS or click the Device Monitor icon next to SDK Manager in Tool bar.

  2. Device Monitor window will open. In File Explorer tab, click data -> data -> your project name. After that your databases file will open. Click pull a file from device icon. Save the file using .db extension.

  3. Open FireFox, Press Alt , Tools -> SQLiteManager.

  4. Follow Database -> connect to Database -> browse your database file and click ok. Your SQLite file will opened now.

Solution 2:

One of the things that hasn't changed on Android Studio is the Android Device Monitor. so this applies to AS and Eclipse.

1) Download the jar SQLite browser plugin from https://github.com/TKlerx/android-sqlite-browser-for-eclipse/releases

2) Put the jar in: [YourAndroidSdkDirectory]/tools/lib/monitor-x86_64/plugins/AndroidSQLiteBrowser_1.0.1.jar

3) Restart the Android Device Monitor.

4) Select the .db file inside the device(rooted) or the emulator and click on the SQLite browser on the top right corner next to the (+) new folder button.

5) Enjoy!

Solution 3:

pull database using adb commands

adb pull /data/data/com.android.packagename/databases/datebase.db

the db will be pulled to current location where terminal is pointing to

then open db using sqliteman

Solution 4:

Update Android studio to the latest version 3.0 and we have access to Device File Explorer in :

View -> Tools Window -> Device File Explorer

Official Documenation

enter image description here

To View sqlite database:

install Mozilla sqlite plugin adons or any other sqlite manager plugin to view the sqlite database.

Solution 5:

You can use IDEscout. It helps inspect any applications database realtime. You can also edit the database as your need.

All you need is download the IDEscout plugin for android studio. Then for connecting to your project:

  1. Add the dependency to your project level gradle.buid

    allprojects {
       repositories {
          jcenter()
          maven {
              url 'http://www.idescout.com/maven/repo/'
          }
       }
    }
    
  2. Add com.idescout.sql:sqlscout-server:2.0 as a dependency to your project's app module:

    compile'com.idescout.sql:sqlscout-server:2.0'
  3. In the onCreate method of your main Activity invoke the method com.idescout.sql.SqlScoutServer#create as follows:

    @OverridepublicvoidonCreate(Bundle savedInstanceState) {
        SqlScoutServer.create(this, getPackageName());
    

Here are some using views for live data visualization and editing

enter image description hereenter image description here

Post a Comment for "How To See The Data Stored In Sqlite In Android Studio Using Genymotion As Emulator"