Search code examples
androidsqlitesqlitestudio

SqliteStudio AndroidDb: successful setup but fails to connect


I'm running SqliteStudio 3.0.7 on Ubuntu 15.10. I can't seem to get the USB/sqlite3 mode working for the Android Studio (2.1.1) emulator, nor for Genymotion, on a 4.4.4 ROM (sdk 19).

AFAIK the app is built in debug mode; I only run it using Studio's "debug" button, and I can access the database over adb shell with the sqlite3 command.

On the Android Studio emulator, I can see my application in the "Application" dropdown, but the Database dropdown stays empty. After running sqlitestudio -d and opening the debug console with F12, I see the following console error:

DEBUG:    Warning from notify manager: "Cannot connect to device emulator-5554, because the application ....MyApp is not debuggable."
DEBUG:    Could not open db connection "android://emulator-5554:@/my.corp.myapp/"

With Genymotion, the Database dropdown is populated correctly, but in the following screen my Android database URL appears network rather than USB. The "test connection" button displays only the red error exclamation icon. The URL is as follows; no error message is generated in the console.

android://192.168.56.101%3A5555:@/my.corp.myapp/myapp.db

Thoughts and suggestions are appreciated!

UPDATE:

Attempting again on a hardware device (instead of emulator) reports that my application is not debuggable -- but it is; I'm debugging it. SqliteStudio debug log follows:

[13:35:43.083] WARNING:  Cannot connect to device "034c1ab776f500000000" / "my.corp.myapp.debug" 
Details:
 "run-as: exec failed for echo Error:Permission denied"
[13:35:43.083] DEBUG:    Warning from notify manager: "Cannot connect to device 034c1ab776f500000000, because the application my.corp.myapp.debug is not debuggable."
[13:35:43.083] DEBUG:    Could not open db connection "android://034c1ab776f500000000:@/my.corp.myapp.debug/"

Solution

  • This is a bug in Android plugin for SQLiteStudio, filed at http://bugs.sqlitestudio.pl/?id=3122 , to be fixed in next plugin version.