lunedì 11 gennaio 2010

Access android database from the shell

It is very important knowing what we save in the database of our application. To check easily the stored data you can access the database following these steps:

  1. Launch the emulator

  2. Launch the Windows command prompt and go under the "Tools" directory in the android sdk folder

  3. Type "adb shell"

  4. Type "cd data/data"

  5. You find the list of all applications. Enter in your application folder (for example "mypackage.myapp")

  6. Type "cd databases". You find all the databases. 

  7. Launch "sqlite3 <name_of_database>

Type ".help" to have all the instructions.
With the command ".tables" you can list all the database's tables.

Now you can write your query: select * from <name_of_table>.

Nessun commento:

Posta un commento