Read only file system on Android
I recently rooted my Droid X and everything seems to be working perfectly. I made some changes to
build.prop and when I do
adb push build.prop /system/ I get the following error:
failed to copy 'c:\build.prop' to '/system//build.prop': Read-only file system.
How can I fix this?
Got this off an Android forum where I asked the same question. Hope this helps somebody else.
On a terminal emulator on the phone:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
Then on the cmd prompt, do the
Not all phones and versions of android have things mounted the same.
Limiting options when remounting would be best.
Simply remount as rw (Read/Write):
# mount -o rw,remount /system
Once you are done making changes, remount to ro (read-only):
# mount -o ro,remount /system
Read more... Read less...
works for me and seems to be the simplest solution.
While I know the question is about the real device, in case someone got here with a similar issue in the emulator, with whatever tools are the latest as of Feb, 2017, the emulator needs to be launched from the command line with:
For anything to be writable to the
/system. Without this flag no combination of
mount will allow one to write to
After the emulator is launched with that flag, a single
adb remount after
adb root is sufficient to get permissions to push to
Here's an example of the command line I use to run my emulator:
./emulator -writable-system -avd Nexus_5_API_25 -no-snapshot-load -qemu
The value for the
-avd flags comes from:
I think the safest way is remounting the /system as read-write, using:
mount -o remount,rw /system
and when done, remount it as read-only:
mount -o remount,ro /system
On my Samsung galaxy mini S5570 (after got root on cellphone):
Fist, as root, I ran:
systemctl start adb
as a normal user:
adb shell su
Grant root permissions on touch screen
list all mount points that we have and we can see, in my case, that /dev/stl12 was mounted on /system as ro (ready only), so we just need do:
mount -o rw,remount /dev/stl12 /system
Try the following on the command prompt:
>adb remount >adb push framework-res_old.apk /system/framework-res.apk