android手機出現sqlite3 not found的解決方案

來源:互聯網
上載者:User

標籤:

解決方案如下:

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的解決方案

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.