我在通过命令提示符连接Android上的Sqlite数据库时遇到了错误。
以下是我遵循的步骤:
- I have created Sqlite DB through java program in android. Created table and inserted data into it. Executed query to get data. Everything fine!!!!
Tried to conned to DB though Command Prompt :
D:\adt-bundle-windows-x86-20131030\adt-bundle-windows-x86-20131030\sdk\platform-tools> adb shell adb shell root@generic:/ # sqlite3 /data/data/package-name/databases/SampleDB.db sqlite3 /data/data/package-name/databases/Samp ant.encryptdata/databases/Samp <leDB.db SQLite version 3.7.11 2012-03-20 11:35:50 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .tables .tables SQL Error: unable to open database "/data/data/com.congnizant.encryptdata/databases/SampleDB.db": unable to open database file 1|root@generic:/ #
实际上我想发布屏幕截图以便更好地理解,但我不知道为什么它无法工作(可能是因为我的办公室防火墙)。
Permision for SampleDB is '-rw-rw----';
那么我做错了什么?
注意: 数据库存在一个示例表,我可以读写该表。