I am trying to connect through the console to the phone where I have my application installed so that I can query the database with SQL.
I was watching a tutorial in the show how it is done, however it did not work for me, I looked for extra information and found another example that does the same thing, so I tried again if I did something wrong, but the same error appears.
The steps are the following:
- go to directory
<sdk>/platform-tools/
- Write
adb shell
- Write
sqlite3 data/data/<package>/databases/<nombre-base-de-datos>
After this the following message should appear:
SQLite version 3.8.10.2 2015-05-20 18:17:19
Enter ".help" for usage hints.
sqlite>
When performing step 3 I get the error sqlite3: not found
The only thing that I have noticed that is different is that after step 2 in the tutorials the console prompt is # , root@android:/ #
while in mine it is $ , HWANE:/ $
, I don't know if that has something to do with it.
If you installed
Android Studio
, you can findsqlite3
inside/platform-tools
.If you entered
<sdk>/platform-tools/
there you can executesqlite3
, you do not need to perform steps 2 and 3.This is an example running: