16

I'm trying desperately to push an app with adb on the /system/app folder (to install the PlayStore on my low cost tablet). So I tried to remount the /system partition with root rights:

mount -o remount,rw /system

But it gives me the same response every time:

mount: Read-only filesystem

And I also tried with command:

mount -o remount,rw -t ext4 /dev/block/actc /system

but it's the same thing... And I really don't understand why, even with the root user, I can't modify this...

So if someone has an idea, it could save one person in distress :p

3
  • 1
    I have the same problem with Android 4.4.2, Nexus 4. When I make this command kernel adds the folowing message in dmesg: EXT4-fs (mmcblk0p21): re-mounted. Opts: (null). Why (null)? I explicitly requested rw!
    – Dmitry
    Commented Apr 18, 2014 at 13:28
  • did you ever figure this out? I'm having the same problem. Using a samsung galaxy tab. Commented Jan 29, 2015 at 3:03
  • @JacobMinshall and @Dmitry, if you're still interested, try running `/system/bin/mount explicitly, rather than implicitly running the xbin one. That worked for me.
    – Jon Coombs
    Commented May 31, 2015 at 0:55

6 Answers 6

14

The syntax of mount command usually requires you specify the target:

mount -o remount,rw /system /system

This output could be useful for us to better understand your problem:

cat /proc/mounts

As a last resort, as you have root you can try saving raw image of system, mount it on your box and push the app there, then flash it back on your device. To save raw system image:

dd if=<block device mounted on /system> of=<output file>

If you go that way make sure you keep the original system image in case something goes wrong.

3
  • hope I got dd command in the stock rom ...
    – Wang
    Commented Oct 20, 2016 at 22:15
  • @Wang I've never seen dd missing but there are probably some incomplete system images on some devices, in that case you can use cat /block/device > output-file
    – zeiky.dev
    Commented Dec 4, 2016 at 15:55
  • Of course all commands shown in this answer require root permissions, so you have to execute them with prepended su command.
    – Robert
    Commented Mar 7, 2023 at 10:50
2

For me...nothing was working and finally this worked:

adb root
adb remount
1
  • 2
    "adbd cannot run as root in production builds"
    – Vadzim
    Commented Aug 31, 2017 at 14:21
1

I'm not sure how generally applicable this is, but I had the same problem and found that this reddit comment solved it for me (on Android Lollikat, which is cm11):

http://www.reddit.com/r/cyanogenmod/comments/2m9t61/how_do_i_remount_system_rw_on_cm11_m12/

Basically, I had to remount by explicitly using /system/bin/mount -o ... rather than just mount -o .... I'm guessing that at some point the version in /system/xbin started taking priority and for some reason that version fails silently. (I say "at some point" because link2sd didn't start complaining about RO until recently.) It looks like it should be possible to edit the PATH to fix this so as to not have to use the command line every time I or an app needs to do this. I'm not sure how yet, though.

FWIW, here's the actual script for my device (s5360 on cm11 / LolliKat). It runs from anywhere but I ended up storing it in /system/xbin so it's globally available to shells.

#!/system/bin/sh
echo "Remounting /system as RW (read/write)..."
/system/bin/mount -o remount,rw /system
mount | grep yaff

That last line is just to give quick feedback as to whether it actually worked or not (since my internal partitions are yaff2). The line before it could be made more explicit as any one of these, but on my device this isn't necessary:

/system/bin/mount -o remount,rw /system /system
/system/bin/mount -o remount,rw /system /system
/system/bin/mount -o remount,rw /dev/block/mtdblock8 /system
/system/bin/mount -o remount,rw -t yaffs2 /dev/block/mtdblock8 /system
1
  • mount -o remount,rw /system worked for me. My device is Nexus 5 with Android 5.1.1 LMY48B Commented Jun 19, 2016 at 14:28
0

Do you have an insecure kernel (boot.img)? Write access to the system partition is usually blocked by the kernel at boot. You may need to flash a modified kernel to be able to obtain write access to /system with adb.

Can you mount /system as r/w in the OS? Then you could push the file to the SD card using adb or just normal USB (MTP or Mass Storage depending on the device) and then copy it to the proper location and set permissions using terminal on the device or a root-enabled file manager. Then reboot and it should be there and installed.

2
  • I think when we try to access /system that means it is not rooted yet. They whole point of using root adb shell is to push something like su to /system to root it.
    – Wang
    Commented Oct 20, 2016 at 22:14
  • @Wang the OP clearly stated that he already had root
    – zeiky.dev
    Commented Dec 4, 2016 at 15:53
0

I found I could mount the system in rw using TWRP's Recovery mode, hitting "Mount" and selecting "System", making sure "Mount as read-only" is unchecked. Then I could copy APK's to the system/app folder using TWRP's built-in file manager.

All my other attempts at mounting as rw using ADB or terminal emulator failed. Didn't try using BusyBox.

From memory, that has worked for me in the past.

0

I had a similar problem. I had success when I used Busybox (not to be confused with the Toybox system app):

busybox mount -o remount,rw /system 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .