Friends, I am working on Sqlite DB and I want to open, view or create databases through the ADB shell command. I've w开发者_开发百科ritten the following commands in command prompt
cd C:\android-sdk_r04-windows\android-sdk-windows\tools>
adb shell
I get a $
after step 2.
Any idea how I can get sqlite>
prompt instead and perform the following task?
Suppose I want to view the databases. I've written cd/data/data/(mypackage)/databases
sqlite3 (database)... after the $
but it says 'Database not found.'
How can I view the databases executed through my code?
Thanks in advance.
You can use sqlite3 command to connect to database from adb shell. Find example of sqlite3 form Android Developers. This will open an sql prompt where you can execute standard commands supported. Another link which explains creating a database, creating table and viewing its contents all from command prompt (adb shell) is here.
精彩评论