標籤:
解決方案如下:
1、如果/system目錄為不可讀寫的,需要掛載為讀寫:
C:\Users\easteq>adb shell
[email protected]:/ # mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
2、把sqlite3檔案 push到裝置中,sqlite3可以自己去下載(需要的話可在此下載:http://download.csdn.net/detail/xiaoyaovsxin/4969923):
[email protected]:/ #exit
C:\Users\easteq>adb push F:\sqlite3_not_found\sqlite3 /system/xbin
ps:如果不行試如下方法
a、將先前儲存其他位置的sqlite3 在DDMS面板中通過右上方手機表徵圖(push a file onto the device) 將檔案push到sdcard中,準確的是在/mnt/sdcard
b、然後在命令列敲入 cat /mnt/sdcard/sqlite3 > /system/xbin/sqlite3 複製檔案
3、需要修改sqlite3的許可權:
C:\Users\easteq>adb shell
[email protected]:/ # chmod 4755 /system/xbin/sqlite3
4、進行sqlite3的測試:
[email protected]:/ #sqlite3
如果出現如下提示:
link_image[1957]: 2684 could not load needed library ‘libncurses.so‘ for ‘sqlit
e3‘ (load_library[1112]: Library ‘libncurses.so‘ not found)CANNOT LINK EXECUTABL
E
,則還需要push libncurses.so檔案,
方法是:
[email protected]:/ #exit
C:\Users\easteq>adb push F:\sqlite3_not_found\libncurses.so /system/lib
2178 KB/s (185136 bytes in 0.083s)
libncurses.so也可以自己去下載
5、還原/system 為唯讀(任選)
[email protected]:/ #mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
進入到你的資料庫裡面去:
[email protected]:/ # cd /data/data/com.test/databases
這樣就可以對你的資料庫進行操作了。
android手機出現sqlite3 not found的解決方案