Android Studio browsing of SQLite databases

6,308 views
Skip to first unread message

Adam Brown

unread,
Jan 24, 2014, 7:49:17 PM1/24/14
to adt...@googlegroups.com
I saw that back in October of last year InteliJ added  Android SQLite support to their Database Support plugin:

But that doesn't appear to be present in Android Studio (as of 0.4.3).

I was wondering if there were plans for integrating this? It would be fantastically useful to have 1 click access inside the Android tab in AS to visually inspect your applications Databases.

Mark Murphy

unread,
Jan 24, 2014, 7:52:27 PM1/24/14
to adt...@googlegroups.com
On Fri, Jan 24, 2014, at 16:49, Adam Brown wrote:
> I saw that back in October of last year InteliJ added Android
> SQLite support to their Database Support plugin:
> http://blog.jetbrains.com/idea/2013/10/intellij-idea-13-eap-and-android-sqlite-database/
>
> But that doesn't appear to be present in Android Studio (*as of 0.4.3*).

It is part of the commercial IDEA Ultimate Edition, not the open source
Community Edition.

> I was wondering if there were plans for integrating this?

I suspect that your discussions would need to start at JetBrains, to
make this plugin (and the ones it depends upon) open source.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_: Version 5.5... And
Still Going Strong!

Adam Brown

unread,
Jan 24, 2014, 7:53:59 PM1/24/14
to adt...@googlegroups.com
Ah damn, that's too bad. Are there any plans for developing a DB browser for AS?

Siva Velusamy

unread,
Jan 24, 2014, 8:20:50 PM1/24/14
to adt...@googlegroups.com
Nope. There are going to be certain features that are only available
in IntelliJ Ultimate Edition.
> --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to adt-dev+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Adam Brown

unread,
Jan 24, 2014, 8:28:19 PM1/24/14
to adt...@googlegroups.com
Siva, not that Jetbrains would develop one for Android Studio, but that Google would, since that would be an extremely useful tool for app developers.

Xavier Ducrohet

unread,
Jan 24, 2014, 8:49:59 PM1/24/14
to adt...@googlegroups.com
It would be good, but it's low on our priority list for now.
--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Alex Baker

unread,
Jan 25, 2014, 6:17:18 PM1/25/14
to adt...@googlegroups.com
Does the AS canary build get new features before IDEA Ultimate? If so, approximately how long does it take before they're available in Ultimate?

Adam Brown

unread,
Jan 25, 2014, 6:19:39 PM1/25/14
to adt...@googlegroups.com
AS is based off of IDEA CE (Community Edition) the open source version of IDEA Ultimate (which is not open source). So yes, AS may get some features faster. But any feature Jetbrians doesn't commit to IDEA CE will never come to AS.



You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/Jqw9VslC_Vw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.

Daniele Segato

unread,
Jan 27, 2014, 9:34:33 AM1/27/14
to adt...@googlegroups.com
There are many software that offer SQLite database editing and browsing capabilities.

For Linux I use sqliteman.

You just need to extract the sqlite database file from the device and open it with the tool.
On real device you do not have direct access to the database file but it's very easy to develop a snipped of code that copy your database file to a public position and extract it.

In some of my project I keep a development activity in the debug variant (using gradle) for this kind of tasks.


I agree would be helpful to have something integrated in Android Studio but I don't see this as a key feature for now.

Regards,
Daniele

Steven Stamps

unread,
Nov 4, 2014, 1:13:43 PM11/4/14
to adt...@googlegroups.com
This is yet another example of the true cost of building on top of a proprietary product.
a)  you are at the mercy of the owner's priorities, agenda and (sometimes poor) judgement
b)  you are frequently placed on a "slippery slope" that forces you to buy into the commercial product if you want to get "real" work done
c)  a strong open source ecosystem never materializes around the tool, even if there is a "community edition", because the open source developers know they will be marginalized

Daniele's point is technically correct.  There are many other ways to work around this problem, but that is missing the entire point of an IDE.  It is supposed to make things fast/efficient/frictionless/natural for the programmer.  IDEs are supposed to enable and sustain high programmer velocity during many longs days of coding.

As an example, SQLite is an important architectural component of many Android apps.  Examining the database contents frequently during development is an important debugging and validation actiity.  Human eyes during initial development are always needed to validate even the best test-first frameworks.  It is a one-step frictionless effort in Eclipse, using a free plug-in, which is completely reliable and a pleasure to use.

BTW, I have been using AS on a fairly large/complex project for about 4 months.  I migrated the project from Eclipse to AS when Google made it clear that they were not going to continue their commitment to the Eclipse platform.  Although I am a loyal Google/Android soldier, I can tell you that:
- AS is less stable than Eclipse, at least for my large project/app
- debugging is not nearly as robust or reliable as Eclipse
- developing/debugging with an actual piece of hardware (beats the pants off of any emulator) is 10x better in Eclipse
- there are dozens of UX/GUI characteristics that were elegantly designed and implemented in Eclipse (to create/facilitate the actual writing of Java code), that are either missing or just downright destructive to programmer flow and productivity in AS

On the flip side, it is obvious that Google is putting in way more effort into the Android-specific features of AS than they ever did with Eclipse.  It just turned out (thus far) to be a giant step backward for those of us who actually write a lot of Java code and/or build complex profession/expert tablet applications.

I'll reserve final judgement on AS until it is formally released as a product.  I know they still have a VERY long way to go.

Unfortunately, the IntelliJ/proprietary problem will never go away.  :(

    Best...

Jake Wharton

unread,
Nov 4, 2014, 7:17:49 PM11/4/14
to adt...@googlegroups.com
You forgot to preface that whole thing with "It is my opinion that..."  FTFY.

--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steven D Stamps

unread,
Nov 4, 2014, 7:27:05 PM11/4/14
to adt...@googlegroups.com
You are so correct!  My apologies to all for omitting that critical piece of information.
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/Jqw9VslC_Vw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.

Steven Stamps

unread,
Nov 6, 2014, 9:15:46 AM11/6/14
to adt...@googlegroups.com
I took a moment to do a little more research on this question, and came up with the following solution.
It provides 1-button browsing of a live SQLite database while it is still on the device and being modified by your app.
No IntelliJ upgrade license or purchase is required.

Since the device monitor shipped with the sdk is based upon Eclipse, you can use the Questoid SQLite Browser
from the device monitor.

1)  Go to:
    https://code.google.com/p/android-sqlite-browser-for-eclipse/wiki/HowTo

2)  Click on the Google Drive download.

3)  Move the downloaded jar into (note that this path is for a 64-bit development box):
    [YourAndroidSdkDirectory]/tools/lib/monitor-x86_64/plugins/AndroidSQLiteBrowser_1.0.1.jar

4)  Restart your device monitor

Usage notes:
- don't forget that you must change permissions on the SQLite file before you can browse it
- the Questoid DDL parser is more strict than the Android SQLite parser in regard to punctuation.
  i.e.  Multiple constraints on a table require commas in Questoid, but are forgiven by SQLite
- just select the [name].db in File Explorer and click on the Questoid glyph in the tool bar,
  else Window - Show View -> Other -> Questoid

Hope this makes your coding day a little smoother...


On Friday, January 24, 2014 6:49:17 PM UTC-6, Adam Brown wrote:

Shii Itsu

unread,
Apr 21, 2015, 3:56:29 PM4/21/15
to adt...@googlegroups.com

Thanks Steve. 

This feature is very useful for debugging complicated DB issues. The GitHub page is linking to the source code (which is nice) but should provide a ready-made jar. I was able to find it at http://android-sqlite-browser-for-eclipse.googlecode.com/svn/wiki/HowTo.wiki. Works great.

IntelliJ's Ultimate IDE has this feature but it didn't quite work for me... wasted too much time with random bugs that were clearly not tested before shipping (things like missing IntelliJ cache directories that their plugin tries to load up... or that the plugin keeps overriding whatever package name / db name I provide in the settings dialog).

Steven D Stamps

unread,
Apr 23, 2015, 11:51:25 PM4/23/15
to adt...@googlegroups.com
Glad it helped.

I'm a principal software engineer at Zynga these days, so use the technique all the time.

    Best...
--
Reply all
Reply to author
Forward
0 new messages