9

Very simple question but confusing . i am using sqlite in my android app.

i want to know we can perform (create ,insert,update,delete) operation in sqlite by command prompt:-

path> adb shell

shell@android:/ $ sqlite3 /data/data/pack/databases/name

sqlite> operations.....

this all success with my emulator.

but i did same thing after attaching my google nexus device.

path> adb shell

error:-/system/bin/sh: sqlite3: not found

why its showing this error after closing the emulator and adding the device.

this means we can not read the database of device(not emulator) by cmd.

or is there any way to read device(not emulator)database by cmd.

Monty
  • 3,205
  • 8
  • 36
  • 61
  • See this(shows how to install sqlite on production device, only if you are root user) http://stackoverflow.com/a/5022363/1363495 – Gun2sh Jan 29 '15 at 06:33
  • http://stackoverflow.com/a/18472135/2114308 I used this and it worked – Phuong Dec 17 '15 at 03:11

1 Answers1

7

The sqlite3 program is normally not installed on production devices. To inspect or modify the database you would have to copy it over to your development machine and use the sqlite3 program from the Android SDK.

Henry
  • 42,982
  • 7
  • 68
  • 84