0

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/"
Autumn
  • 3,214
  • 1
  • 20
  • 35
  • Can you try doing the same but on real device, not emulator? I mean install your app on an android device and try there. – Googie Jun 04 '16 at 13:39
  • Thanks @Googie, added hardware debug log. Sorry for the long delay; my tablet went AWOL for a while, and then I took a vacation. I've added a .debug suffix to my debug variant, to ensure that's the one that sqlitestudio is running. If you know what the "run-as" command is that it's trying to run, I can verify that from the shell. This is a chinese A33 tablet running 4.4.2, BTW. – Autumn Jul 08 '16 at 20:56
  • SQLiteStudio tries to run simple command on your android device in context of your application. To do so it runs: `adb shell run-as ls`. In result it gets something like that from ADB: `run-as: exec failed for ls Error:Permission denied`, which is weird, because then you would have no `ls` command on your android. Running `ls` should be perfectly fine. Can you test wheter this works for you? `adb shell run-as sqlite3 --version` – Googie Jul 09 '16 at 10:08
  • `run-as my.corp.myapp.debug sqlite3 --version` returns the version string `3.7.11 2012-03-20 11:35:50 00bb9c9ce4f465e6ac321ced2a9d0062dc364669`... which appears to be the same version referenced at http://wiki.sqlitestudio.pl/index.php/DbAndroid/ – Autumn Jul 14 '16 at 20:47
  • Okay, this needs a fix. Unfortunately I think you won't be able to connect with this version of android plugin. I've filed a bug report for this: http://bugs.sqlitestudio.pl/?id=3122 – Googie Jul 15 '16 at 09:37
  • Thanks @Googie. Does that mean you've replicated the issue? Urrr, if it's proper convention on SO to close this as answered, feel free to post the bug report as an answer. – Autumn Jul 15 '16 at 17:00

1 Answers1

1

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

Googie
  • 5,742
  • 2
  • 19
  • 31