From 5d9314f134ddd3dc4c853e398ac90ba247fb2e4f Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 13 Jun 2016 18:42:42 -0400 Subject: Imported Upstream version 3.1.0 --- Plugins/DbAndroid/DbAndroid.pro | 12 + Plugins/DbAndroid/DbAndroid_de.qm | Bin 0 -> 23 bytes Plugins/DbAndroid/DbAndroid_de.ts | 337 ++++++++++++++++++++++++ Plugins/DbAndroid/DbAndroid_es.qm | Bin 0 -> 23 bytes Plugins/DbAndroid/DbAndroid_es.ts | 337 ++++++++++++++++++++++++ Plugins/DbAndroid/DbAndroid_fr.qm | Bin 0 -> 23 bytes Plugins/DbAndroid/DbAndroid_fr.ts | 337 ++++++++++++++++++++++++ Plugins/DbAndroid/DbAndroid_it.qm | Bin 0 -> 23 bytes Plugins/DbAndroid/DbAndroid_it.ts | 337 ++++++++++++++++++++++++ Plugins/DbAndroid/DbAndroid_pl.qm | Bin 0 -> 12615 bytes Plugins/DbAndroid/DbAndroid_pl.ts | 342 +++++++++++++++++++++++++ Plugins/DbAndroid/DbAndroid_pt_BR.qm | Bin 0 -> 23 bytes Plugins/DbAndroid/DbAndroid_pt_BR.ts | 337 ++++++++++++++++++++++++ Plugins/DbAndroid/DbAndroid_ru.qm | Bin 0 -> 34 bytes Plugins/DbAndroid/DbAndroid_ru.ts | 337 ++++++++++++++++++++++++ Plugins/DbAndroid/DbAndroid_sk.qm | Bin 0 -> 27 bytes Plugins/DbAndroid/DbAndroid_sk.ts | 337 ++++++++++++++++++++++++ Plugins/DbAndroid/DbAndroid_zh_CN.qm | 1 + Plugins/DbAndroid/DbAndroid_zh_CN.ts | 337 ++++++++++++++++++++++++ Plugins/DbAndroid/SQLiteStudioRemote.jar | Bin 0 -> 28513 bytes Plugins/DbAndroid/adbmanager.cpp | 12 +- Plugins/DbAndroid/adbmanager.h | 4 +- Plugins/DbAndroid/android.png | Bin 0 -> 657 bytes Plugins/DbAndroid/dbandroid.cpp | 49 ++++ Plugins/DbAndroid/dbandroid.h | 7 + Plugins/DbAndroid/dbandroid.json | 7 +- Plugins/DbAndroid/dbandroid.qrc | 9 +- Plugins/DbAndroid/dbandroidjsonconnection.cpp | 18 +- Plugins/DbAndroid/dbandroidpathdialog.cpp | 1 + Plugins/DbAndroid/dbandroidshellconnection.cpp | 11 +- 30 files changed, 3135 insertions(+), 34 deletions(-) create mode 100644 Plugins/DbAndroid/DbAndroid_de.qm create mode 100644 Plugins/DbAndroid/DbAndroid_de.ts create mode 100644 Plugins/DbAndroid/DbAndroid_es.qm create mode 100644 Plugins/DbAndroid/DbAndroid_es.ts create mode 100644 Plugins/DbAndroid/DbAndroid_fr.qm create mode 100644 Plugins/DbAndroid/DbAndroid_fr.ts create mode 100644 Plugins/DbAndroid/DbAndroid_it.qm create mode 100644 Plugins/DbAndroid/DbAndroid_it.ts create mode 100644 Plugins/DbAndroid/DbAndroid_pl.qm create mode 100644 Plugins/DbAndroid/DbAndroid_pl.ts create mode 100644 Plugins/DbAndroid/DbAndroid_pt_BR.qm create mode 100644 Plugins/DbAndroid/DbAndroid_pt_BR.ts create mode 100644 Plugins/DbAndroid/DbAndroid_ru.qm create mode 100644 Plugins/DbAndroid/DbAndroid_ru.ts create mode 100644 Plugins/DbAndroid/DbAndroid_sk.qm create mode 100644 Plugins/DbAndroid/DbAndroid_sk.ts create mode 100644 Plugins/DbAndroid/DbAndroid_zh_CN.qm create mode 100644 Plugins/DbAndroid/DbAndroid_zh_CN.ts create mode 100644 Plugins/DbAndroid/SQLiteStudioRemote.jar create mode 100644 Plugins/DbAndroid/android.png (limited to 'Plugins/DbAndroid') diff --git a/Plugins/DbAndroid/DbAndroid.pro b/Plugins/DbAndroid/DbAndroid.pro index 2895c7f..e70547f 100644 --- a/Plugins/DbAndroid/DbAndroid.pro +++ b/Plugins/DbAndroid/DbAndroid.pro @@ -51,3 +51,15 @@ FORMS += \ RESOURCES += \ dbandroid.qrc + +TRANSLATIONS += \ + DbAndroid_it.ts\ + DbAndroid_zh_CN.ts\ + DbAndroid_sk.ts\ + DbAndroid_de.ts\ + DbAndroid_ru.ts\ + DbAndroid_pt_BR.ts\ + DbAndroid_fr.ts\ + DbAndroid_es.ts\ + DbAndroid_pl.ts + diff --git a/Plugins/DbAndroid/DbAndroid_de.qm b/Plugins/DbAndroid/DbAndroid_de.qm new file mode 100644 index 0000000..9dad8df Binary files /dev/null and b/Plugins/DbAndroid/DbAndroid_de.qm differ diff --git a/Plugins/DbAndroid/DbAndroid_de.ts b/Plugins/DbAndroid/DbAndroid_de.ts new file mode 100644 index 0000000..d33c59d --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_de.ts @@ -0,0 +1,337 @@ + + + + + DbAndroid + + + Invalid or incomplete Android Database URL. + + + + + Android database URL + + + + + Select Android database + + + + + Select ADB + + + + + Using Android Debug Bridge: %1 + + + + + You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. For more details read plugin's documentation on <a href="%1">SQLiteStudio's wiki page.</a> + + + + + Could not find Android Debug Bridge application. <a href="%1">Click here</a> to point out the location of the ADB application, otherwise the %2 plugin will not support USB cable connections, only the network connection.. + + + + + Invalid ADB + + + + + The selected ADB is incorrect. +Would you like to select another one, or leave it unconfigured? + + + + + Select another ADB + + + + + Leave unconfigured + + + + + Save jar file + + + + + Get Android connector JAR file + + + + + DbAndroidInstance + + + Connection with Android database '%1' lost. + + + + + DbAndroidJsonConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Failed to create port forwarding for device %1 for port %2. + + + + + Could not connect to network host: %1:%2 + + + + + Cannot connect to %1:%2, because password is invalid. + + + + + Error while parsing response from Android: %1 + + + + + Generic error from Android: %1 + + + + + + Missing 'columns' in response from Android. + + + + + Response from Android has missing data for column '%1' in row %2. + + + + + DbAndroidPathDialog + + + Android database URL + + + + + Connection method + + + + + USB cable - port forwarding + + + + + USB cable - sqlite3 command + + + + + Network (IP address) + + + + + Device + + + + + IP address + + + + + Port + + + + + Remote access password + + + + + <p>This is password configured in the SQLiteStudio service being embeded in the Android application.</p> + + + + + Application + + + + + Filter + + + + + Database + + + + + Create a new database directly on the device. + + + + + Delete currently selected database from the device. The currently selected database is the one picked in the list on the left of this button. + + + + + Enter valid IP address. + + + + + Pick Android device. + + + + + Pick Android database. + + + + + Selected Android application is unknown, or not debuggable. + + + + + Create new database + + + + + Please provide name for the new database. +It's the name which Android application will use to connect to the database: + + + + + + + Invalid name + + + + + Database with the same name (%1) already exists on the device. +The name must be unique. + + + + + Could not create database '%1', because could not connect to the device. + + + + + Could not create database '%1'. +Details: %2 + + + + + Delete database + + + + + Are you sure you want to delete database '%1' from %2? + + + + + + Error deleting + + + + + Could not connect to %1 in order to delete database '%2'. + + + + + Could not delete database named '%1' from the device. +Android device refused deletion, or it was impossible. + + + + + DbAndroidShellConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device. + + + + + Cannot connect to device %1, because the application %2 is not debuggable. + + + + + Cannot connect to device %1, because '%2' command doesn't seem to be available on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. Details: %3 + + + + + Cannot get list of databases for application %1. Details: %2 + + + + + + Could not execute query on database '%1': %2 + + + + + QObject + + + Cannot bind argument '%1' of the query, because it's value is missing. + + + + diff --git a/Plugins/DbAndroid/DbAndroid_es.qm b/Plugins/DbAndroid/DbAndroid_es.qm new file mode 100644 index 0000000..9dad8df Binary files /dev/null and b/Plugins/DbAndroid/DbAndroid_es.qm differ diff --git a/Plugins/DbAndroid/DbAndroid_es.ts b/Plugins/DbAndroid/DbAndroid_es.ts new file mode 100644 index 0000000..11a6466 --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_es.ts @@ -0,0 +1,337 @@ + + + + + DbAndroid + + + Invalid or incomplete Android Database URL. + + + + + Android database URL + + + + + Select Android database + + + + + Select ADB + + + + + Using Android Debug Bridge: %1 + + + + + You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. For more details read plugin's documentation on <a href="%1">SQLiteStudio's wiki page.</a> + + + + + Could not find Android Debug Bridge application. <a href="%1">Click here</a> to point out the location of the ADB application, otherwise the %2 plugin will not support USB cable connections, only the network connection.. + + + + + Invalid ADB + + + + + The selected ADB is incorrect. +Would you like to select another one, or leave it unconfigured? + + + + + Select another ADB + + + + + Leave unconfigured + + + + + Save jar file + + + + + Get Android connector JAR file + + + + + DbAndroidInstance + + + Connection with Android database '%1' lost. + + + + + DbAndroidJsonConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Failed to create port forwarding for device %1 for port %2. + + + + + Could not connect to network host: %1:%2 + + + + + Cannot connect to %1:%2, because password is invalid. + + + + + Error while parsing response from Android: %1 + + + + + Generic error from Android: %1 + + + + + + Missing 'columns' in response from Android. + + + + + Response from Android has missing data for column '%1' in row %2. + + + + + DbAndroidPathDialog + + + Android database URL + + + + + Connection method + + + + + USB cable - port forwarding + + + + + USB cable - sqlite3 command + + + + + Network (IP address) + + + + + Device + + + + + IP address + + + + + Port + + + + + Remote access password + + + + + <p>This is password configured in the SQLiteStudio service being embeded in the Android application.</p> + + + + + Application + + + + + Filter + + + + + Database + + + + + Create a new database directly on the device. + + + + + Delete currently selected database from the device. The currently selected database is the one picked in the list on the left of this button. + + + + + Enter valid IP address. + + + + + Pick Android device. + + + + + Pick Android database. + + + + + Selected Android application is unknown, or not debuggable. + + + + + Create new database + + + + + Please provide name for the new database. +It's the name which Android application will use to connect to the database: + + + + + + + Invalid name + + + + + Database with the same name (%1) already exists on the device. +The name must be unique. + + + + + Could not create database '%1', because could not connect to the device. + + + + + Could not create database '%1'. +Details: %2 + + + + + Delete database + + + + + Are you sure you want to delete database '%1' from %2? + + + + + + Error deleting + + + + + Could not connect to %1 in order to delete database '%2'. + + + + + Could not delete database named '%1' from the device. +Android device refused deletion, or it was impossible. + + + + + DbAndroidShellConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device. + + + + + Cannot connect to device %1, because the application %2 is not debuggable. + + + + + Cannot connect to device %1, because '%2' command doesn't seem to be available on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. Details: %3 + + + + + Cannot get list of databases for application %1. Details: %2 + + + + + + Could not execute query on database '%1': %2 + + + + + QObject + + + Cannot bind argument '%1' of the query, because it's value is missing. + + + + diff --git a/Plugins/DbAndroid/DbAndroid_fr.qm b/Plugins/DbAndroid/DbAndroid_fr.qm new file mode 100644 index 0000000..c02994c Binary files /dev/null and b/Plugins/DbAndroid/DbAndroid_fr.qm differ diff --git a/Plugins/DbAndroid/DbAndroid_fr.ts b/Plugins/DbAndroid/DbAndroid_fr.ts new file mode 100644 index 0000000..f5b2509 --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_fr.ts @@ -0,0 +1,337 @@ + + + + + DbAndroid + + + Invalid or incomplete Android Database URL. + + + + + Android database URL + + + + + Select Android database + + + + + Select ADB + + + + + Using Android Debug Bridge: %1 + + + + + You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. For more details read plugin's documentation on <a href="%1">SQLiteStudio's wiki page.</a> + + + + + Could not find Android Debug Bridge application. <a href="%1">Click here</a> to point out the location of the ADB application, otherwise the %2 plugin will not support USB cable connections, only the network connection.. + + + + + Invalid ADB + + + + + The selected ADB is incorrect. +Would you like to select another one, or leave it unconfigured? + + + + + Select another ADB + + + + + Leave unconfigured + + + + + Save jar file + + + + + Get Android connector JAR file + + + + + DbAndroidInstance + + + Connection with Android database '%1' lost. + + + + + DbAndroidJsonConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Failed to create port forwarding for device %1 for port %2. + + + + + Could not connect to network host: %1:%2 + + + + + Cannot connect to %1:%2, because password is invalid. + + + + + Error while parsing response from Android: %1 + + + + + Generic error from Android: %1 + + + + + + Missing 'columns' in response from Android. + + + + + Response from Android has missing data for column '%1' in row %2. + + + + + DbAndroidPathDialog + + + Android database URL + + + + + Connection method + + + + + USB cable - port forwarding + + + + + USB cable - sqlite3 command + + + + + Network (IP address) + + + + + Device + + + + + IP address + + + + + Port + + + + + Remote access password + + + + + <p>This is password configured in the SQLiteStudio service being embeded in the Android application.</p> + + + + + Application + + + + + Filter + + + + + Database + + + + + Create a new database directly on the device. + + + + + Delete currently selected database from the device. The currently selected database is the one picked in the list on the left of this button. + + + + + Enter valid IP address. + + + + + Pick Android device. + + + + + Pick Android database. + + + + + Selected Android application is unknown, or not debuggable. + + + + + Create new database + + + + + Please provide name for the new database. +It's the name which Android application will use to connect to the database: + + + + + + + Invalid name + + + + + Database with the same name (%1) already exists on the device. +The name must be unique. + + + + + Could not create database '%1', because could not connect to the device. + + + + + Could not create database '%1'. +Details: %2 + + + + + Delete database + + + + + Are you sure you want to delete database '%1' from %2? + + + + + + Error deleting + + + + + Could not connect to %1 in order to delete database '%2'. + + + + + Could not delete database named '%1' from the device. +Android device refused deletion, or it was impossible. + + + + + DbAndroidShellConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device. + + + + + Cannot connect to device %1, because the application %2 is not debuggable. + + + + + Cannot connect to device %1, because '%2' command doesn't seem to be available on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. Details: %3 + + + + + Cannot get list of databases for application %1. Details: %2 + + + + + + Could not execute query on database '%1': %2 + + + + + QObject + + + Cannot bind argument '%1' of the query, because it's value is missing. + + + + diff --git a/Plugins/DbAndroid/DbAndroid_it.qm b/Plugins/DbAndroid/DbAndroid_it.qm new file mode 100644 index 0000000..9dad8df Binary files /dev/null and b/Plugins/DbAndroid/DbAndroid_it.qm differ diff --git a/Plugins/DbAndroid/DbAndroid_it.ts b/Plugins/DbAndroid/DbAndroid_it.ts new file mode 100644 index 0000000..73f4429 --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_it.ts @@ -0,0 +1,337 @@ + + + + + DbAndroid + + + Invalid or incomplete Android Database URL. + + + + + Android database URL + + + + + Select Android database + + + + + Select ADB + + + + + Using Android Debug Bridge: %1 + + + + + You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. For more details read plugin's documentation on <a href="%1">SQLiteStudio's wiki page.</a> + + + + + Could not find Android Debug Bridge application. <a href="%1">Click here</a> to point out the location of the ADB application, otherwise the %2 plugin will not support USB cable connections, only the network connection.. + + + + + Invalid ADB + + + + + The selected ADB is incorrect. +Would you like to select another one, or leave it unconfigured? + + + + + Select another ADB + + + + + Leave unconfigured + + + + + Save jar file + + + + + Get Android connector JAR file + + + + + DbAndroidInstance + + + Connection with Android database '%1' lost. + + + + + DbAndroidJsonConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Failed to create port forwarding for device %1 for port %2. + + + + + Could not connect to network host: %1:%2 + + + + + Cannot connect to %1:%2, because password is invalid. + + + + + Error while parsing response from Android: %1 + + + + + Generic error from Android: %1 + + + + + + Missing 'columns' in response from Android. + + + + + Response from Android has missing data for column '%1' in row %2. + + + + + DbAndroidPathDialog + + + Android database URL + + + + + Connection method + + + + + USB cable - port forwarding + + + + + USB cable - sqlite3 command + + + + + Network (IP address) + + + + + Device + + + + + IP address + + + + + Port + + + + + Remote access password + + + + + <p>This is password configured in the SQLiteStudio service being embeded in the Android application.</p> + + + + + Application + + + + + Filter + + + + + Database + + + + + Create a new database directly on the device. + + + + + Delete currently selected database from the device. The currently selected database is the one picked in the list on the left of this button. + + + + + Enter valid IP address. + + + + + Pick Android device. + + + + + Pick Android database. + + + + + Selected Android application is unknown, or not debuggable. + + + + + Create new database + + + + + Please provide name for the new database. +It's the name which Android application will use to connect to the database: + + + + + + + Invalid name + + + + + Database with the same name (%1) already exists on the device. +The name must be unique. + + + + + Could not create database '%1', because could not connect to the device. + + + + + Could not create database '%1'. +Details: %2 + + + + + Delete database + + + + + Are you sure you want to delete database '%1' from %2? + + + + + + Error deleting + + + + + Could not connect to %1 in order to delete database '%2'. + + + + + Could not delete database named '%1' from the device. +Android device refused deletion, or it was impossible. + + + + + DbAndroidShellConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device. + + + + + Cannot connect to device %1, because the application %2 is not debuggable. + + + + + Cannot connect to device %1, because '%2' command doesn't seem to be available on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. Details: %3 + + + + + Cannot get list of databases for application %1. Details: %2 + + + + + + Could not execute query on database '%1': %2 + + + + + QObject + + + Cannot bind argument '%1' of the query, because it's value is missing. + + + + diff --git a/Plugins/DbAndroid/DbAndroid_pl.qm b/Plugins/DbAndroid/DbAndroid_pl.qm new file mode 100644 index 0000000..96c4b9a Binary files /dev/null and b/Plugins/DbAndroid/DbAndroid_pl.qm differ diff --git a/Plugins/DbAndroid/DbAndroid_pl.ts b/Plugins/DbAndroid/DbAndroid_pl.ts new file mode 100644 index 0000000..f2f781c --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_pl.ts @@ -0,0 +1,342 @@ + + + + + DbAndroid + + + Invalid or incomplete Android Database URL. + Niepoprawny lub niekompletny URL Bazy Androida + + + + Android database URL + URL bazy Androida + + + + Select Android database + Wybierz bazÄ™ Androida + + + + Select ADB + Wybierz ADB + + + + Using Android Debug Bridge: %1 + Używam nastÄ™pujÄ…cego Android Debug Bridge: %1 + + + + You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. For more details read plugin's documentation on <a href="%1">SQLiteStudio's wiki page.</a> + Możesz pobrać plik JAR konektora Android z menu NarzÄ™dzia. Jest on wymagany do 2 z 3 obsÅ‚ugiwanych połączeÅ„ wtyczki Android. Po wiÄ™cej szczegółów przeczytaj dokumentacjÄ™ na <a href="%1">stronie wiki SQLiteStudio.</a> + + + + Could not find Android Debug Bridge application. <a href="%1">Click here</a> to point out the location of the ADB application, otherwise the %2 plugin will not support USB cable connections, only the network connection.. + Nie można znaleźć aplikacji Android Debug Bridge. <a href="%1">Kliknij tutaj</a> aby wskazać poÅ‚ożenie aplikacji ADB, inaczej wtyczka %2 nie bÄ™dzie obsÅ‚ugiwać połączeÅ„ przez kabel USB, tylko połączenia przez sieć. + + + + Invalid ADB + Niepoprawny ADB + + + + The selected ADB is incorrect. +Would you like to select another one, or leave it unconfigured? + Wybrany ADB jest niepoprawny. +Chcesz wybrać inny, czy zostawić go nieskonfigurowanego? + + + + Select another ADB + Wybierz inny ADB + + + + Leave unconfigured + Zostaw nieskonfigurowany + + + + Save jar file + Zapisz plik jar + + + + Get Android connector JAR file + Pobierz plik JAR konektora Android + + + + DbAndroidInstance + + + Connection with Android database '%1' lost. + Połączenie z bazÄ… Androida '%1' utracone. + + + + DbAndroidJsonConnection + + + Cannot connect to device %1, because it's not visible to your computer. + Nie można połączyć siÄ™ z urzÄ…dzeniem %1, ponieważ nie jest ono widoczne dla twojego komputera. + + + + Failed to create port forwarding for device %1 for port %2. + Nie powiodÅ‚o siÄ™ stworzenie portu przekierowujÄ…cego dla urzÄ…dzenia %1 dla portu %2. + + + + Could not connect to network host: %1:%2 + Nie udaÅ‚o siÄ™ połączyć z adresem sieciowym: %1:%2 + + + + Cannot connect to %1:%2, because password is invalid. + Nie można połączyć z %1:%2, ponieważ podano niepoprawne hasÅ‚o. + + + + Error while parsing response from Android: %1 + Błąd podczas analizy odpowiedzi z Androida: %1 + + + + Generic error from Android: %1 + Błąd ogólny z Androida: %1 + + + + + Missing 'columns' in response from Android. + Brauje 'columns' w odpowiedzi z Androida. + + + + Response from Android has missing data for column '%1' in row %2. + Brakuje danych w kolumnie '%1' w wierszy %2 w odpowiedź z Androida. + + + + DbAndroidPathDialog + + + Android database URL + URL bazy Androida + + + + Connection method + Metoda połączenia + + + + USB cable - port forwarding + Kabel USB - przekierowanie portu + + + + USB cable - sqlite3 command + Kabel USB - polecenie sqlite3 + + + + Network (IP address) + Sieć (adres IP) + + + + Device + UrzÄ…dzenie + + + + IP address + Adres IP + + + + Port + Port + + + + Remote access password + HasÅ‚o zdalnego dostÄ™pu + + + + <p>This is password configured in the SQLiteStudio service being embeded in the Android application.</p> + <p>HasÅ‚o to jest konfigurowane w serwisie SQLiteStudio, który jest osadzany w aplikacji Androida.</p> + + + + Application + Aplikacja + + + + Filter + Filtr + + + + Database + Baza danych + + + + Create a new database directly on the device. + Stwórz nowÄ… bazÄ™ danych bezpoÅ›rednio na urzÄ…dzeniu. + + + + Delete currently selected database from the device. The currently selected database is the one picked in the list on the left of this button. + UsuÅ„ aktualnie wybranÄ… bazÄ™ danych z urzÄ…dzenia. Aktualnie wybrana baza to ta wybrana z listy po lewej stronie od tego przycisku. + + + + Enter valid IP address. + Wprowadź poprawny adres IP. + + + + Pick Android device. + Wybierz urzÄ…dzenie Android. + + + + Pick Android database. + Wybierz bazÄ™ danych Android. + + + + Selected Android application is unknown, or not debuggable. + Wybierana aplikacja Android jest nieznana, lub niedebugowalna. + + + + Create new database + Stwórz nowÄ… bazÄ™ + + + + Please provide name for the new database. +It's the name which Android application will use to connect to the database: + ProszÄ™ podać nazwÄ™ dla nowej bazy. +Jest to nazwa, którÄ… aplikacja Androida bÄ™dzie używać przy łączeniu z bazÄ… danych: + + + + + + Invalid name + Niepoprawna nazwa + + + + Database with the same name (%1) already exists on the device. +The name must be unique. + Baza danych z takÄ… samÄ… nazwÄ… (%1) już istnieje na urzÄ…dzeniu. +Nazwa musi być unikalna. + + + + Could not create database '%1', because could not connect to the device. + Nie można stworzyć bazy danych '%1', ponieważ nie udaÅ‚o siÄ™ połączyć z urzÄ…dzeniem. + + + + Could not create database '%1'. +Details: %2 + Nie można stworzyć bazy danych: '%1'. +Szczegóły: %2 + + + + Delete database + UsuÅ„ bazÄ™ danych + + + + Are you sure you want to delete database '%1' from %2? + Czy na pewno chcesz usunąć bazÄ™ danych '%1' z %2? + + + + + Error deleting + Błąd usuwania + + + + Could not connect to %1 in order to delete database '%2'. + Nie można połączyć siÄ™ z %1 w celu usuniÄ™cia bazy danych '%2'. + + + + Could not delete database named '%1' from the device. +Android device refused deletion, or it was impossible. + Nie można usunąć bazy o nazwie '%1' z urzÄ…dzenia. +UrzÄ…dzenie Android odmówiÅ‚o usuniÄ™cia, lub byÅ‚o to niemożliwe. + + + + DbAndroidShellConnection + + + Cannot connect to device %1, because it's not visible to your computer. + Nie można połączyć siÄ™ z urzÄ…dzeniem %1, ponieważ nie jest ono widoczne dla twojego komputera. + + + + Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device. + Nie można połączyć siÄ™ urzÄ…dzeniem %1, ponieważ wyglÄ…da na to, że aplikacja %2 nie jest zainstalowana na tym urzÄ…dzeniu. + + + + Cannot connect to device %1, because the application %2 is not debuggable. + Nie można połączyć siÄ™ urzÄ…dzeniem %1, ponieważ aplikacja %2 nie debugowalna. + + + + Cannot connect to device %1, because '%2' command doesn't seem to be available on the device. + Nie można połączyć siÄ™ urzÄ…dzeniem %1, ponieważ wyglÄ…da na to, że polecenie '%2' nie jest dostÄ™pne na tym urzÄ…dzeniu. + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. + Nie można połączyć siÄ™ urzÄ…dzeniem %1, ponieważ nie ma prawa dostÄ™pu do bazy danych '%2' na tym urzÄ…dzeniu. + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. Details: %3 + Nie można połączyć siÄ™ urzÄ…dzeniem %1, ponieważ nie ma prawa dostÄ™pu do bazy danych '%2' na tym urzÄ…dzeniu. Szczegóły: %3 + + + + Cannot get list of databases for application %1. Details: %2 + Nie można pobrać listy baz danych dla aplikacji %1. Szczegóły: %2 + + + + + Could not execute query on database '%1': %2 + Nie można wykonać polecenia na bazie '%1': %2 + + + + QObject + + + Cannot bind argument '%1' of the query, because it's value is missing. + Nie można podpiąć argumentu '%1' zapytania, ponieważ nie ma dla niego wartoÅ›ci. + + + diff --git a/Plugins/DbAndroid/DbAndroid_pt_BR.qm b/Plugins/DbAndroid/DbAndroid_pt_BR.qm new file mode 100644 index 0000000..c02994c Binary files /dev/null and b/Plugins/DbAndroid/DbAndroid_pt_BR.qm differ diff --git a/Plugins/DbAndroid/DbAndroid_pt_BR.ts b/Plugins/DbAndroid/DbAndroid_pt_BR.ts new file mode 100644 index 0000000..46ce2a9 --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_pt_BR.ts @@ -0,0 +1,337 @@ + + + + + DbAndroid + + + Invalid or incomplete Android Database URL. + + + + + Android database URL + + + + + Select Android database + + + + + Select ADB + + + + + Using Android Debug Bridge: %1 + + + + + You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. For more details read plugin's documentation on <a href="%1">SQLiteStudio's wiki page.</a> + + + + + Could not find Android Debug Bridge application. <a href="%1">Click here</a> to point out the location of the ADB application, otherwise the %2 plugin will not support USB cable connections, only the network connection.. + + + + + Invalid ADB + + + + + The selected ADB is incorrect. +Would you like to select another one, or leave it unconfigured? + + + + + Select another ADB + + + + + Leave unconfigured + + + + + Save jar file + + + + + Get Android connector JAR file + + + + + DbAndroidInstance + + + Connection with Android database '%1' lost. + + + + + DbAndroidJsonConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Failed to create port forwarding for device %1 for port %2. + + + + + Could not connect to network host: %1:%2 + + + + + Cannot connect to %1:%2, because password is invalid. + + + + + Error while parsing response from Android: %1 + + + + + Generic error from Android: %1 + + + + + + Missing 'columns' in response from Android. + + + + + Response from Android has missing data for column '%1' in row %2. + + + + + DbAndroidPathDialog + + + Android database URL + + + + + Connection method + + + + + USB cable - port forwarding + + + + + USB cable - sqlite3 command + + + + + Network (IP address) + + + + + Device + + + + + IP address + + + + + Port + + + + + Remote access password + + + + + <p>This is password configured in the SQLiteStudio service being embeded in the Android application.</p> + + + + + Application + + + + + Filter + + + + + Database + + + + + Create a new database directly on the device. + + + + + Delete currently selected database from the device. The currently selected database is the one picked in the list on the left of this button. + + + + + Enter valid IP address. + + + + + Pick Android device. + + + + + Pick Android database. + + + + + Selected Android application is unknown, or not debuggable. + + + + + Create new database + + + + + Please provide name for the new database. +It's the name which Android application will use to connect to the database: + + + + + + + Invalid name + + + + + Database with the same name (%1) already exists on the device. +The name must be unique. + + + + + Could not create database '%1', because could not connect to the device. + + + + + Could not create database '%1'. +Details: %2 + + + + + Delete database + + + + + Are you sure you want to delete database '%1' from %2? + + + + + + Error deleting + + + + + Could not connect to %1 in order to delete database '%2'. + + + + + Could not delete database named '%1' from the device. +Android device refused deletion, or it was impossible. + + + + + DbAndroidShellConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device. + + + + + Cannot connect to device %1, because the application %2 is not debuggable. + + + + + Cannot connect to device %1, because '%2' command doesn't seem to be available on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. Details: %3 + + + + + Cannot get list of databases for application %1. Details: %2 + + + + + + Could not execute query on database '%1': %2 + + + + + QObject + + + Cannot bind argument '%1' of the query, because it's value is missing. + + + + diff --git a/Plugins/DbAndroid/DbAndroid_ru.qm b/Plugins/DbAndroid/DbAndroid_ru.qm new file mode 100644 index 0000000..7431612 Binary files /dev/null and b/Plugins/DbAndroid/DbAndroid_ru.qm differ diff --git a/Plugins/DbAndroid/DbAndroid_ru.ts b/Plugins/DbAndroid/DbAndroid_ru.ts new file mode 100644 index 0000000..efc50ff --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_ru.ts @@ -0,0 +1,337 @@ + + + + + DbAndroid + + + Invalid or incomplete Android Database URL. + + + + + Android database URL + + + + + Select Android database + + + + + Select ADB + + + + + Using Android Debug Bridge: %1 + + + + + You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. For more details read plugin's documentation on <a href="%1">SQLiteStudio's wiki page.</a> + + + + + Could not find Android Debug Bridge application. <a href="%1">Click here</a> to point out the location of the ADB application, otherwise the %2 plugin will not support USB cable connections, only the network connection.. + + + + + Invalid ADB + + + + + The selected ADB is incorrect. +Would you like to select another one, or leave it unconfigured? + + + + + Select another ADB + + + + + Leave unconfigured + + + + + Save jar file + + + + + Get Android connector JAR file + + + + + DbAndroidInstance + + + Connection with Android database '%1' lost. + + + + + DbAndroidJsonConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Failed to create port forwarding for device %1 for port %2. + + + + + Could not connect to network host: %1:%2 + + + + + Cannot connect to %1:%2, because password is invalid. + + + + + Error while parsing response from Android: %1 + + + + + Generic error from Android: %1 + + + + + + Missing 'columns' in response from Android. + + + + + Response from Android has missing data for column '%1' in row %2. + + + + + DbAndroidPathDialog + + + Android database URL + + + + + Connection method + + + + + USB cable - port forwarding + + + + + USB cable - sqlite3 command + + + + + Network (IP address) + + + + + Device + + + + + IP address + + + + + Port + + + + + Remote access password + + + + + <p>This is password configured in the SQLiteStudio service being embeded in the Android application.</p> + + + + + Application + + + + + Filter + + + + + Database + + + + + Create a new database directly on the device. + + + + + Delete currently selected database from the device. The currently selected database is the one picked in the list on the left of this button. + + + + + Enter valid IP address. + + + + + Pick Android device. + + + + + Pick Android database. + + + + + Selected Android application is unknown, or not debuggable. + + + + + Create new database + + + + + Please provide name for the new database. +It's the name which Android application will use to connect to the database: + + + + + + + Invalid name + + + + + Database with the same name (%1) already exists on the device. +The name must be unique. + + + + + Could not create database '%1', because could not connect to the device. + + + + + Could not create database '%1'. +Details: %2 + + + + + Delete database + + + + + Are you sure you want to delete database '%1' from %2? + + + + + + Error deleting + + + + + Could not connect to %1 in order to delete database '%2'. + + + + + Could not delete database named '%1' from the device. +Android device refused deletion, or it was impossible. + + + + + DbAndroidShellConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device. + + + + + Cannot connect to device %1, because the application %2 is not debuggable. + + + + + Cannot connect to device %1, because '%2' command doesn't seem to be available on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. Details: %3 + + + + + Cannot get list of databases for application %1. Details: %2 + + + + + + Could not execute query on database '%1': %2 + + + + + QObject + + + Cannot bind argument '%1' of the query, because it's value is missing. + + + + diff --git a/Plugins/DbAndroid/DbAndroid_sk.qm b/Plugins/DbAndroid/DbAndroid_sk.qm new file mode 100644 index 0000000..1776294 Binary files /dev/null and b/Plugins/DbAndroid/DbAndroid_sk.qm differ diff --git a/Plugins/DbAndroid/DbAndroid_sk.ts b/Plugins/DbAndroid/DbAndroid_sk.ts new file mode 100644 index 0000000..4483977 --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_sk.ts @@ -0,0 +1,337 @@ + + + + + DbAndroid + + + Invalid or incomplete Android Database URL. + + + + + Android database URL + + + + + Select Android database + + + + + Select ADB + + + + + Using Android Debug Bridge: %1 + + + + + You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. For more details read plugin's documentation on <a href="%1">SQLiteStudio's wiki page.</a> + + + + + Could not find Android Debug Bridge application. <a href="%1">Click here</a> to point out the location of the ADB application, otherwise the %2 plugin will not support USB cable connections, only the network connection.. + + + + + Invalid ADB + + + + + The selected ADB is incorrect. +Would you like to select another one, or leave it unconfigured? + + + + + Select another ADB + + + + + Leave unconfigured + + + + + Save jar file + + + + + Get Android connector JAR file + + + + + DbAndroidInstance + + + Connection with Android database '%1' lost. + + + + + DbAndroidJsonConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Failed to create port forwarding for device %1 for port %2. + + + + + Could not connect to network host: %1:%2 + + + + + Cannot connect to %1:%2, because password is invalid. + + + + + Error while parsing response from Android: %1 + + + + + Generic error from Android: %1 + + + + + + Missing 'columns' in response from Android. + + + + + Response from Android has missing data for column '%1' in row %2. + + + + + DbAndroidPathDialog + + + Android database URL + + + + + Connection method + + + + + USB cable - port forwarding + + + + + USB cable - sqlite3 command + + + + + Network (IP address) + + + + + Device + + + + + IP address + + + + + Port + + + + + Remote access password + + + + + <p>This is password configured in the SQLiteStudio service being embeded in the Android application.</p> + + + + + Application + + + + + Filter + + + + + Database + + + + + Create a new database directly on the device. + + + + + Delete currently selected database from the device. The currently selected database is the one picked in the list on the left of this button. + + + + + Enter valid IP address. + + + + + Pick Android device. + + + + + Pick Android database. + + + + + Selected Android application is unknown, or not debuggable. + + + + + Create new database + + + + + Please provide name for the new database. +It's the name which Android application will use to connect to the database: + + + + + + + Invalid name + + + + + Database with the same name (%1) already exists on the device. +The name must be unique. + + + + + Could not create database '%1', because could not connect to the device. + + + + + Could not create database '%1'. +Details: %2 + + + + + Delete database + + + + + Are you sure you want to delete database '%1' from %2? + + + + + + Error deleting + + + + + Could not connect to %1 in order to delete database '%2'. + + + + + Could not delete database named '%1' from the device. +Android device refused deletion, or it was impossible. + + + + + DbAndroidShellConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device. + + + + + Cannot connect to device %1, because the application %2 is not debuggable. + + + + + Cannot connect to device %1, because '%2' command doesn't seem to be available on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. Details: %3 + + + + + Cannot get list of databases for application %1. Details: %2 + + + + + + Could not execute query on database '%1': %2 + + + + + QObject + + + Cannot bind argument '%1' of the query, because it's value is missing. + + + + diff --git a/Plugins/DbAndroid/DbAndroid_zh_CN.qm b/Plugins/DbAndroid/DbAndroid_zh_CN.qm new file mode 100644 index 0000000..be651ee --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_zh_CN.qm @@ -0,0 +1 @@ +<¸dÊÍ!¿`¡½Ý \ No newline at end of file diff --git a/Plugins/DbAndroid/DbAndroid_zh_CN.ts b/Plugins/DbAndroid/DbAndroid_zh_CN.ts new file mode 100644 index 0000000..14e84d3 --- /dev/null +++ b/Plugins/DbAndroid/DbAndroid_zh_CN.ts @@ -0,0 +1,337 @@ + + + + + DbAndroid + + + Invalid or incomplete Android Database URL. + + + + + Android database URL + + + + + Select Android database + + + + + Select ADB + + + + + Using Android Debug Bridge: %1 + + + + + You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. For more details read plugin's documentation on <a href="%1">SQLiteStudio's wiki page.</a> + + + + + Could not find Android Debug Bridge application. <a href="%1">Click here</a> to point out the location of the ADB application, otherwise the %2 plugin will not support USB cable connections, only the network connection.. + + + + + Invalid ADB + + + + + The selected ADB is incorrect. +Would you like to select another one, or leave it unconfigured? + + + + + Select another ADB + + + + + Leave unconfigured + + + + + Save jar file + + + + + Get Android connector JAR file + + + + + DbAndroidInstance + + + Connection with Android database '%1' lost. + + + + + DbAndroidJsonConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Failed to create port forwarding for device %1 for port %2. + + + + + Could not connect to network host: %1:%2 + + + + + Cannot connect to %1:%2, because password is invalid. + + + + + Error while parsing response from Android: %1 + + + + + Generic error from Android: %1 + + + + + + Missing 'columns' in response from Android. + + + + + Response from Android has missing data for column '%1' in row %2. + + + + + DbAndroidPathDialog + + + Android database URL + + + + + Connection method + + + + + USB cable - port forwarding + + + + + USB cable - sqlite3 command + + + + + Network (IP address) + + + + + Device + + + + + IP address + + + + + Port + + + + + Remote access password + + + + + <p>This is password configured in the SQLiteStudio service being embeded in the Android application.</p> + + + + + Application + + + + + Filter + + + + + Database + + + + + Create a new database directly on the device. + + + + + Delete currently selected database from the device. The currently selected database is the one picked in the list on the left of this button. + + + + + Enter valid IP address. + + + + + Pick Android device. + + + + + Pick Android database. + + + + + Selected Android application is unknown, or not debuggable. + + + + + Create new database + + + + + Please provide name for the new database. +It's the name which Android application will use to connect to the database: + + + + + + + Invalid name + + + + + Database with the same name (%1) already exists on the device. +The name must be unique. + + + + + Could not create database '%1', because could not connect to the device. + + + + + Could not create database '%1'. +Details: %2 + + + + + Delete database + + + + + Are you sure you want to delete database '%1' from %2? + + + + + + Error deleting + + + + + Could not connect to %1 in order to delete database '%2'. + + + + + Could not delete database named '%1' from the device. +Android device refused deletion, or it was impossible. + + + + + DbAndroidShellConnection + + + Cannot connect to device %1, because it's not visible to your computer. + + + + + Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device. + + + + + Cannot connect to device %1, because the application %2 is not debuggable. + + + + + Cannot connect to device %1, because '%2' command doesn't seem to be available on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. + + + + + Cannot connect to device %1, because '%2' database cannot be accessed on the device. Details: %3 + + + + + Cannot get list of databases for application %1. Details: %2 + + + + + + Could not execute query on database '%1': %2 + + + + + QObject + + + Cannot bind argument '%1' of the query, because it's value is missing. + + + + diff --git a/Plugins/DbAndroid/SQLiteStudioRemote.jar b/Plugins/DbAndroid/SQLiteStudioRemote.jar new file mode 100644 index 0000000..f7df136 Binary files /dev/null and b/Plugins/DbAndroid/SQLiteStudioRemote.jar differ diff --git a/Plugins/DbAndroid/adbmanager.cpp b/Plugins/DbAndroid/adbmanager.cpp index ed012a1..462e91f 100644 --- a/Plugins/DbAndroid/adbmanager.cpp +++ b/Plugins/DbAndroid/adbmanager.cpp @@ -175,13 +175,13 @@ bool AdbManager::testAdb(const QString& adbPath, bool quiet) return res; } -bool AdbManager::execBytes(const QStringList& arguments, QByteArray* stdOut, QByteArray* stdErr) +bool AdbManager::execBytes(const QStringList& arguments, QByteArray* stdOut, QByteArray* stdErr, bool forceSafe) { if (!ensureAdbRunning()) return false; QProcess proc; - if (arguments.join(" ").size() > 800) + if (forceSafe || arguments.join(" ").size() > 800) { if (!execLongCommand(arguments, proc, stdErr)) return false; @@ -250,11 +250,11 @@ bool AdbManager::ensureAdbRunning() return true; } -bool AdbManager::exec(const QStringList& arguments, QString* stdOut, QString* stdErr) +bool AdbManager::exec(const QStringList& arguments, QString* stdOut, QString* stdErr, bool forceSafe) { QByteArray* out = stdOut ? new QByteArray() : nullptr; QByteArray* err = stdErr ? new QByteArray() : nullptr; - bool res = execBytes(arguments, out, err); + bool res = execBytes(arguments, out, err, forceSafe); if (stdOut) { @@ -292,14 +292,14 @@ bool AdbManager::execLongCommand(const QStringList& arguments, QProcess& proc, Q args.removeFirst(); // remove the shell itself // Escape remaining arguments for the script - QString cmd = " '" + args.replaceInStrings("'", "'\''").join("' '") + "'"; + QString cmd = " '" + args.replaceInStrings("'", "'\\''").join("' '") + "'"; // Now, the temporary file for the script QTemporaryFile tmpFile("SQLiteStudio-XXXXXX.sh"); if (!tmpFile.open()) { if (stdErr) - *stdErr = encode(QString("Could not create temporary file: %1").arg(tmpFile.fileName())); + *stdErr = encode(QString("Could not create temporary file: %1 (%2)").arg(tmpFile.fileName(), tmpFile.errorString())); return false; } diff --git a/Plugins/DbAndroid/adbmanager.h b/Plugins/DbAndroid/adbmanager.h index adeca90..6bd70d3 100644 --- a/Plugins/DbAndroid/adbmanager.h +++ b/Plugins/DbAndroid/adbmanager.h @@ -29,8 +29,8 @@ class AdbManager : public QObject QString findAdb(); bool testCurrentAdb(); bool testAdb(const QString& adbPath, bool quiet = false); - bool execBytes(const QStringList& arguments, QByteArray* stdOut = nullptr, QByteArray* stdErr = nullptr); - bool exec(const QStringList& arguments, QString* stdOut = nullptr, QString* stdErr = nullptr); + bool execBytes(const QStringList& arguments, QByteArray* stdOut = nullptr, QByteArray* stdErr = nullptr, bool forceSafe = false); + bool exec(const QStringList& arguments, QString* stdOut = nullptr, QString* stdErr = nullptr, bool forceSafe = false); static QByteArray encode(const QString& input); static QString decode(const QByteArray& input); diff --git a/Plugins/DbAndroid/android.png b/Plugins/DbAndroid/android.png new file mode 100644 index 0000000..d5b4b05 Binary files /dev/null and b/Plugins/DbAndroid/android.png differ diff --git a/Plugins/DbAndroid/dbandroid.cpp b/Plugins/DbAndroid/dbandroid.cpp index 99150cd..9da066d 100644 --- a/Plugins/DbAndroid/dbandroid.cpp +++ b/Plugins/DbAndroid/dbandroid.cpp @@ -8,10 +8,12 @@ #include "statusfield.h" #include "services/dbmanager.h" #include "dbandroidconnectionfactory.h" +#include "iconmanager.h" #include #include #include #include +#include #include DbAndroid::DbAndroid() @@ -85,6 +87,8 @@ bool DbAndroid::init() connect(this, SIGNAL(invalidAdb()), this, SLOT(handleInvalidAdb())); connect(MAINWINDOW->getStatusField(), SIGNAL(linkActivated(QString)), this, SLOT(statusFieldLinkClicked(QString))); + connect(ICONMANAGER, SIGNAL(rescannedFor(QString)), this, SLOT(createJarAction(QString))); + connectionFactory = new DbAndroidConnectionFactory(this); adbManager = new AdbManager(this); @@ -95,6 +99,7 @@ bool DbAndroid::init() qDebug() << "Using ADB binary:" << cfg.DbAndroid.AdbPath.get(); adbValid = true; adbManager->getDevices(true); + showJarMessage(); } else { @@ -105,6 +110,10 @@ bool DbAndroid::init() void DbAndroid::deinit() { + if (jarAction) + MAINWINDOW->getToolsMenu()->removeAction(jarAction); + + safe_delete(jarAction); safe_delete(connectionFactory); safe_delete(adbManager); Q_CLEANUP_RESOURCE(dbandroid); @@ -163,9 +172,20 @@ void DbAndroid::handleValidAdb(bool showMessage) if (showMessage) notifyInfo(tr("Using Android Debug Bridge: %1").arg(cfg.DbAndroid.AdbPath.get())); + showJarMessage(); DBLIST->rescanInvalidDatabasesForPlugin(this); } +void DbAndroid::showJarMessage() +{ + if (!cfg.DbAndroid.JarDownloadNotified.get()) + { + notifyInfo(tr("You can grab Android connector JAR file from Tools menu. It's required for 2 of 3 connections supported by the Android plugin. " + "For more details read plugin's documentation on SQLiteStudio's wiki page.").arg(PLUGIN_MANUAL_URL)); + cfg.DbAndroid.JarDownloadNotified.set(true); + } +} + void DbAndroid::handleInvalidAdb() { notifyError(tr("Could not find Android Debug Bridge application. Click here to point out the location of the ADB application, " @@ -196,6 +216,10 @@ void DbAndroid::statusFieldLinkClicked(const QString& link) file = askForAdbPath(); } } + else if (link == PLUGIN_MANUAL_URL) + { + QDesktopServices::openUrl(QUrl(PLUGIN_MANUAL_URL)); + } } void DbAndroid::deviceListChanged() @@ -203,6 +227,31 @@ void DbAndroid::deviceListChanged() DBLIST->rescanInvalidDatabasesForPlugin(this); } +void DbAndroid::getJar() +{ + QString path = QFileDialog::getExistingDirectory(nullptr, tr("Save jar file")); + if (path.isEmpty()) + return; + + QString newPath = path + "/SQLiteStudioRemote.jar"; + QFile jarFile(":/dbandroid/SQLiteStudioRemote.jar"); + if (jarFile.copy(newPath)) { + notifyInfo("Android connector JAR file saved at " + newPath); + } else { + notifyError("Unable to save android connector JAR file at " + newPath); + } +} + +void DbAndroid::createJarAction(const QString& pluginName) +{ + if (pluginName != "" && pluginName != getName()) + return; + + QIcon* i = ICONMANAGER->getIcon("android"); + jarAction = MAINWINDOW->getToolsMenu()->addAction(*(i), tr("Get Android connector JAR file")); + connect(jarAction, SIGNAL(triggered()), this, SLOT(getJar())); +} + AdbManager* DbAndroid::getAdbManager() const { return adbManager; diff --git a/Plugins/DbAndroid/dbandroid.h b/Plugins/DbAndroid/dbandroid.h index 68893d0..20e9a67 100644 --- a/Plugins/DbAndroid/dbandroid.h +++ b/Plugins/DbAndroid/dbandroid.h @@ -8,10 +8,12 @@ class AdbManager; class DbAndroidConnectionFactory; +class QAction; CFG_CATEGORIES(DbAndroidConfig, CFG_CATEGORY(DbAndroid, CFG_ENTRY(QString, AdbPath, QString()) + CFG_ENTRY(bool, JarDownloadNotified, false) ) ) @@ -40,11 +42,14 @@ class DBANDROIDSHARED_EXPORT DbAndroid : public GenericPlugin, public DbPlugin private: void initAdb(); QString askForAdbPath(); + void showJarMessage(); AdbManager* adbManager = nullptr; DbAndroidConnectionFactory* connectionFactory = nullptr; bool adbValid = false; + QAction* jarAction = nullptr; + static_char* PLUGIN_MANUAL_URL = "http://wiki.sqlitestudio.pl/index.php/DbAndroid"; static_char* SELECT_ADB_URL = "select_adb://"; CFG_LOCAL_PERSISTABLE(DbAndroidConfig, cfg) @@ -54,6 +59,8 @@ class DBANDROIDSHARED_EXPORT DbAndroid : public GenericPlugin, public DbPlugin void handleInvalidAdb(); void statusFieldLinkClicked(const QString& link); void deviceListChanged(); + void getJar(); + void createJarAction(const QString& pluginName); signals: void adbReady(bool showMessage); diff --git a/Plugins/DbAndroid/dbandroid.json b/Plugins/DbAndroid/dbandroid.json index 0808bb4..9e36806 100644 --- a/Plugins/DbAndroid/dbandroid.json +++ b/Plugins/DbAndroid/dbandroid.json @@ -2,8 +2,9 @@ "type": "DbPlugin", "title": "Android SQLite", "description": "Provides support for remote SQLite databases on Android devices.", - "version": 10100, + "version": 10200, "author": "SalSoft", - "minAppVersion": 30006, - "gui": true + "minAppVersion": 30100, + "gui": true, + "loadByDefault": false } diff --git a/Plugins/DbAndroid/dbandroid.qrc b/Plugins/DbAndroid/dbandroid.qrc index 7646d2b..4a7cb48 100644 --- a/Plugins/DbAndroid/dbandroid.qrc +++ b/Plugins/DbAndroid/dbandroid.qrc @@ -1 +1,8 @@ - + + + SQLiteStudioRemote.jar + + + android.png + + diff --git a/Plugins/DbAndroid/dbandroidjsonconnection.cpp b/Plugins/DbAndroid/dbandroidjsonconnection.cpp index 05d6469..fb8087e 100644 --- a/Plugins/DbAndroid/dbandroidjsonconnection.cpp +++ b/Plugins/DbAndroid/dbandroidjsonconnection.cpp @@ -199,28 +199,12 @@ bool DbAndroidJsonConnection::connectToTcp(const QString& ip, int port) connectedState = true; - // Evaluate the connection and send the security token - static_qstring(pingCmd, "{ping:\"%1\"}"); - QDate date = QDateTime::currentDateTime().date(); - QString tokenString = "06fn43" + QString::number(date.dayOfYear()) + "3ig7ws" + QString::number(date.year()) + "53"; - QByteArray md5 = QCryptographicHash::hash(tokenString.toUtf8(), QCryptographicHash::Md5); - QByteArray token = md5.toBase64(); - - QByteArray response = send(pingCmd.arg(QString::fromLatin1(token)).toUtf8()); - if (response != PING_RESPONSE_OK) - { - qWarning() << "Connection to" << ip << ":" << port << "has failed, because response to PING was:" << response; - notifyWarn(tr("Cannot connect to SQLiteStudio service on Android device. The remote service is unavailable or invalid.")); - handleConnectionFailed(); - return false; - } - // Authenticate QString pass = dbUrl.getPassword(); if (!pass.isEmpty()) { static_qstring(passPharse, "{auth:\"%1\"}"); - response = send(passPharse.arg(pass.replace("\"", "\\\"")).toUtf8()); + QByteArray response = send(passPharse.arg(pass.replace("\"", "\\\"")).toUtf8()); if (response != PASS_RESPONSE_OK) { notifyWarn(tr("Cannot connect to %1:%2, because password is invalid.").arg(ip, QString::number(port))); diff --git a/Plugins/DbAndroid/dbandroidpathdialog.cpp b/Plugins/DbAndroid/dbandroidpathdialog.cpp index da1cf5c..10a6fb8 100644 --- a/Plugins/DbAndroid/dbandroidpathdialog.cpp +++ b/Plugins/DbAndroid/dbandroidpathdialog.cpp @@ -104,6 +104,7 @@ void DbAndroidPathDialog::init() handleDbCreationUpdate(false); updateState(); adjustSize(); + scheduleDbListUpdate(); } void DbAndroidPathDialog::updateUrl() diff --git a/Plugins/DbAndroid/dbandroidshellconnection.cpp b/Plugins/DbAndroid/dbandroidshellconnection.cpp index 1a76f8d..b39c19d 100644 --- a/Plugins/DbAndroid/dbandroidshellconnection.cpp +++ b/Plugins/DbAndroid/dbandroidshellconnection.cpp @@ -39,7 +39,7 @@ bool DbAndroidShellConnection::connectToAndroid(const DbAndroidUrl& url) } QString stdOut; - bool res = adbManager->exec(QStringList({"shell", "run-as", url.getApplication(), "echo", "1"}), &stdOut); + bool res = adbManager->exec(QStringList({"shell", "run-as", url.getApplication(), "ls"}), &stdOut); if (!res) { notifyWarn(tr("Cannot connect to device %1, because the application %2 doesn't seem to be installed on the device.").arg(url.getDevice(), url.getApplication())); @@ -172,6 +172,7 @@ DbAndroidConnection::ExecutionResult DbAndroidShellConnection::executeQuery(cons QStringList args = stdArguments; args.replace(2, connectionUrl.getApplication()); args << "databases/" + connectionUrl.getDbName(); +// args << "/data/data/" + connectionUrl.getApplication() + "/sqlitestudio_remote.sql"; args << AdbManager::encode(query); // In case of SELECT we want to union typeof() for all columns first, then original query @@ -186,7 +187,7 @@ DbAndroidConnection::ExecutionResult DbAndroidShellConnection::executeQuery(cons { firstHalfForTypes = true; args.removeLast(); - args << appendTypeQueryPart(query, columnNames); + args << AdbManager::encode(appendTypeQueryPart(query, columnNames)); } } @@ -194,7 +195,7 @@ DbAndroidConnection::ExecutionResult DbAndroidShellConnection::executeQuery(cons DbAndroidConnection::ExecutionResult results; QByteArray out; QByteArray err; - bool res = adbManager->execBytes(args, &out, &err); + bool res = adbManager->execBytes(args, &out, &err, true); if (!res) { results.wasError = true; @@ -234,7 +235,7 @@ QStringList DbAndroidShellConnection::findColumns(const QStringList& originalArg QString out; QString err; - bool res = adbManager->exec(tmpArgs, &out, &err); + bool res = adbManager->exec(tmpArgs, &out, &err, true); if (!res) { qCritical() << "Error querying columns in DbAndroidShellConnection::findColumns(): " << out << "\n" << err; @@ -331,7 +332,7 @@ QVariant DbAndroidShellConnection::valueFromString(const QByteArray& bytes, cons { static const QStringList types = QStringList({"null", "integer", "real", "text", "blob"}); - DataType dataType = static_cast(types.indexOf(AdbManager::decode(type))); + DataType dataType = static_cast(types.indexOf(AdbManager::decode(type).trimmed())); QByteArray decodedBytes = QByteArray::fromHex(bytes); switch (dataType) { -- cgit v1.2.3