Why can't I push sqlite into Android using adb command?

Go To StackoverFlow.com

3

I have a rooted Nexus S and it doesn't have Sqlite installed so I googled it and found 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 that means the /system is read only. Then I searched it and found that I need to remount my /system folder as rw. I used this command in the adb shell:

mount -o rw,remount -t yaffs2 /dev/block/mtdblock5 /system

I still cannot push Sqlite3 and it produces the same error as before in the command line window. I then typed

root@android:/ # mount

But all I can see is the /system is mounted 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 the sqlite3 into my Android phone?

2012-04-04 07:04
by newguy


3

Maybe you can try another location. The script I used to root my phone was placing its stuff on the /data/local/ after creating a tmp folder:

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 *"
2012-04-04 07:08
by JScoobyCed
Thank you. That works for me - newguy 2012-04-04 07:52


3

In fact, the two answers are mandatory. If we set only

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 copy the sqlite3 to /system/bin/sqlite3, we must add the following line :

mount -o rw,remount -t yaffs2 /dev/block/mtdblock5 /system
2013-04-30 08:38
by mrroboaat
Ads