Browse SQLite database from Android Studio

Mohamad Arafat picture Mohamad Arafat · Mar 19, 2015 · Viewed 46k times · Source

I would like to know is there any SQLite plugin for Android Studio which will allow user to browse the created database?

Answer

Gabriele Mariotti picture Gabriele Mariotti · Jul 17, 2015

UPDATE July 2020

With Android Studio 4.1 (Canary 6 and higher), you can inspect, query, and modify your app's databases using the new Database Inspector.

You can find the official doc here.


Currently there isn't an official plugin for DB Inspection in your apps.

  • You can use the DDMS : Tools > Android > Android Device Monitor as described in @Subhalaxmi's answer

  • There is a beta plugin provided by idescout that you can try here.

  • There is the Stetho tool (open source and free) provided by Facebook

I suggest you using the Stetho open-sourced tool provided by Facebook. It is simple to implement and very powerful.

Just add the dependencies in your build.gradle

dependencies {
    // Stetho core
    compile 'com.facebook.stetho:stetho:1.3.1'       

    //Optional network helper
    compile 'com.facebook.stetho:stetho-okhttp:1.3.1'       
}

Then just initialize the tool in your Application class:

Stetho.initialize(Stetho.newInitializerBuilder(this)
        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
        .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
        .build());

Finally just open Chrome on your pc and navigare in chrome://inspect.

Here you can display the database in the app (with read/write capabilities), and you can run queries.

enter image description here

You can find more info about Stetho here: