3

Do you know if there is a way to connected SQLite Studio (or similar) to the database via adb (emulator for Android), so I can see graphically my data via the laptop?

Thanks in advance

Enrico
  • 41
  • 1
  • 4

2 Answers2

2

Actually you can use DbAndroid plugin (it's free, GPL'ed) that is shipped with SQLiteStudio (3.0.7). It will let you to connect to your android database without pulling or pushing the database file from/to an emulator or a device. It makes direct connection to the database in your application. Any changes to database made in SQLiteStudio will immediately be reflected in your running application.

Long story short - you add a jar file to your project as dependency, add few lines to inid/deinit the connector, then you add your database in SQLiteStudio and use it just as any other database.

There's a full manual on how to do it on SQLiteStudio's wiki page about this plugin: http://wiki.sqlitestudio.pl/index.php/DbAndroid

There's also a video demonstration on how to do it (also at that site). It's a bit too much to paste all of it here.

If you have any further problems with it, I'm happy to help (author here). You can also ask on SQLiteStudio's forum - I watch it often.

Googie
  • 5,742
  • 2
  • 19
  • 31
  • 1
    Thanks Googie I just red it and it looks very interesting. However in the wiki they always refer to an external device connected via USB cable or via WiFi (network IP). In my case I just use an emulator: would it be possible to use dbAndroid plugin? – Enrico Feb 21 '16 at 00:34
  • Yes. You can consider emulator as a device constantly connected to your computer via USB. The plugin uses `adb decives` command to look up for devices, so your emulator should appear there as well. – Googie Feb 21 '16 at 09:49
1

You can use Sqlite Studio to see your data: http://sqlitestudio.pl/

For internal storage you can get the database via adb:
adb pull /data/data/app_name/databases/db_name yourpath

If your database is in external just open it with Sqlite Studio.

huseyin
  • 1,367
  • 16
  • 19
  • 2
    HI Andromeda. Thanks for ur fast reply. What should I add in the file path filed in Squite Studio if I want to add the database from the emulator? – Enrico Feb 20 '16 at 18:17
  • Hi Andromeda, do you have any tips on what I should add in the file path in order to connect to the database? – Enrico Nov 22 '16 at 19:32
  • I could not understand what do you mean by saying adding in the file path. Clearly define your purpose to help you. You can pull out your db and can open with Sqlite Studio as mentioned before. Or you can see and make some operations from Adb by connecting to sqlite3 and '.help' to see useful commands related. https://developer.android.com/studio/command-line/sqlite3.html – huseyin Nov 28 '16 at 05:51