Why can't I push sqlite on Android using adb command?
I have a rooted Nexus S and it doesn't have Sqlite, so I searched for it and found that I need to use this command:
adb push sqlite3 /sdcard/
However, it gave me this error:
failed to copy 'sqlite3' to '/sdcard//sqlite3': Read-only file system
So this means that / the system is readable only. Then I searched it and found that I need to remount my / system folder as rw. I used this command in adb shell:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock5 /system
I still can't hit Sqlite3 and it will give the same error as before in the command prompt window. Then I typed
root@android:/ # mount
But all I can see is / system is installed differently:
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 rw,relatime,barrier=
1,data=ordered 0 0
How can I mount my system folder as "rw" and push sqlite3 to my android phone?
source to share
Perhaps you can try another place. The script I used for my phone was placed on / data / local / after the tmp folder was created:
adb shell "cd /data/local && mkdir tmp"
adb push sqlite3 /data/local/tmp/.
adb shell "chmod 755 /data/local/tmp/sqlite3"
adb shell "cp /data/local/tmp/sqlite3 /system/bin/sqlite3"
adb shell "cd /data/local/tmp && rm *"
source to share
In fact, two answers are required. If we only install
adb shell "cd /data/local && mkdir tmp"
adb push sqlite3 /data/local/tmp/.
adb shell "chmod 755 /data/local/tmp/sqlite3"
adb shell "cp /data/local/tmp/sqlite3 /system/bin/sqlite3"
adb shell "cd /data/local/tmp && rm *"
We have the same error
Read-only file system
So, before copying sqlite3 to / system / bin / sqlite 3, we must add the following line:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock5 /system
source to share