12

I'm trying to remount /system to copy some files to it. I tried the following with adb:

adb root
adb remount

The first command works fine (because my phone is rooted), but the second tells me that the operation is not permitted. If I open an adb shell and run su I can access the system folder without problems.

What could be the problem?

9
  • 2
    Could you please edit your question and add the exact error message? That might provide some clue.
    – Izzy
    Commented Sep 1, 2013 at 20:55
  • @Izzy It is the exact error message, there's nothing else in there.
    – Overv
    Commented Sep 1, 2013 at 22:23
  • 1
    Nothing about "not permitted on production devices" or the like? Usually, it should not even permit adb root, even if the device is rooted. Are you sure adb root worked?
    – Izzy
    Commented Sep 2, 2013 at 6:01
  • @Izzy Are there other ways to test if root worked?
    – Overv
    Commented Sep 2, 2013 at 10:12
  • adb shell, then type su -. If your rooting process was successful, you should see a popup on your device asking to approve the su request − and having confirmed that, your shell prompt should switch from a $ to a #.
    – Izzy
    Commented Sep 2, 2013 at 10:47

9 Answers 9

4

Some phones just don't allow remounting via adb remount.

Mount as RW:

adb shell su -c "mount -o rw,remount,rw /system"

Mount as RO:

adb shell su -c "mount -o ro,remount,ro /system"

Also you could use the Adbd Insecure app, but it's not free.

3
  • Chainfire mentions in the app description, that the APK is available for free from the XDA forum. I copied the link for convenience: forum.xda-developers.com/showthread.php?t=1687590
    – DBX12
    Commented Jun 19, 2019 at 6:25
  • su: invalid uid/gid '-c'
    – BuffK
    Commented Aug 20, 2020 at 13:36
  • 3
    mount: '/system' not in /proc/mounts
    – Dr.jacky
    Commented Nov 4, 2023 at 16:15
3

Some builds require the following adb commands to be run first

adb root
adb disable-verity
adb reboot

Then once device reboots,

adb root
adb remount
2
  • C:\Android\sdk\platform-tools>adb disable-verity disable-verity only works for userdebug builds
    – JDOaktown
    Commented Mar 17, 2021 at 21:15
  • After device reboot adb root results back to adbd cannot run as root in production builds Commented Apr 6 at 11:24
1

Could be that SELinux getting in the way. Try this:

getenforce

If it returns 1 or Enable, do:

setenforce 0

Then try your command again.

0

AFAIK, some devices have permanent (kernel-level I think) write-protection for the /system mount, so even if you're root, you still can't remount it in RW mode. You have to restart the device without this protection, which is done differently depending on the device.

1
  • This was about the Galaxy Nexus.
    – Overv
    Commented May 13, 2014 at 18:01
0

This seems to usually work for me:

adb root

You will see a message as Restarting adbd as root. Unplug the device from USB, connect again and enter:

adb remount

Troubleshooting:

adb shell

Confirm that you are root if you see # shell prompt.

0

I get the same error if I try to use adb remount. The reason is some kind of protection but can be bypassed by using a root shell.

The following should work (you may type exit to quit the shell):

adb shell
su -
mount -o remount,rw /system
0

Get adbd insecure from google play store. It helps give write access to custom ROMs that have it secured my the manufacturers.

0
0

Problem statement From the terminal, I connected to my STB using ADB connect IP address of the STB and after executing ADB root, I tried executing ADB remount. I was stuck with the below error message in my terminal.

Android 9 userdebug version execute ADB remount appear: remount of the / superblock failed: Permission denied remount failed

Pre-requisite: The first thing is you need to carry out the below pre-requisite setup,

  • Need to have a laptop either Mac or windows with ADB installed or in case it's not installed get it downloaded from ADB but if you have windows well and good.
  • USB to USB Male( Male -2- Mable cable).
  • One end of the USB is connected to the STB USB port (White Color port) and then another end is connected to your laptop USB port.
  • After the above setup is completed, from your command prompt or terminal type adb devices, if it lists the device connected with its serial number that means your connection setup is perfect.

Solution

  • First thing from the terminal type below command adb reboot fastboot //This will reboot your STB fastboot flashing unlock // After STB reboots and you see the google android preloader, run this command fastboot reboot //After the above command execute this.

  • Next adb root //After STB reboots and you see the google android preloader, run this command adb disable-verity //Immediately after that run this command adb reboot //Immediately after that run this command

  • Last //disable Selinux and mount dir adb root //After STB reboots and you see the google android preloader, run this command adb shell setenforce 0 //Immediately after that run this command adb remount //Immediately after that run this command

  • After the last set of commands you could see the remount works successfully, now either reboot your STB ie adb reboot

-1

Try running the command reboot disemmcwp and re-rooting after the reboot. Then do your thing

You must log in to answer this question.

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