11

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?

Flow
  • 18,464
  • 16
  • 79
  • 138
Overv
  • 231
  • 1
  • 2
  • 5
  • 2
    Could you please edit your question and add the exact error message? That might provide some clue. – Izzy Sep 01 '13 at 20:55
  • @Izzy It is the exact error message, there's nothing else in there. – Overv Sep 01 '13 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 Sep 02 '13 at 06:01
  • @Izzy Are there other ways to test if root worked? – Overv Sep 02 '13 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 Sep 02 '13 at 10:47
  • @Izzy Yep, that works fine. – Overv Sep 02 '13 at 12:07
  • OK. So do you consider your issue solved (i.e. was the question rather "How can I check whether rooting was successful?")? If so: Maybe you update your question, and then I sum up an answer? – Izzy Sep 02 '13 at 13:19
  • @Izzy No, my question is still about adb remount not working despite me being a super user. – Overv Sep 02 '13 at 16:54
  • Understood. So did it work from the shell after explicitly making yourself root (su -)? The adb root command AFAIK doesn't switch to a root shell, but should restart the ADB daemon in root mode, which officially is not supported on production builds – which could be the reason your original approach failed. – Izzy Sep 02 '13 at 18:11

9 Answers9

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.

jan
  • 395
  • 3
  • 11
2

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
Firelord
  • 25,084
  • 20
  • 124
  • 286
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.

Firelord
  • 25,084
  • 20
  • 124
  • 286
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
Firelord
  • 25,084
  • 20
  • 124
  • 286
aastefanov
  • 217
  • 1
  • 9
0

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

Firelord
  • 25,084
  • 20
  • 124
  • 286
joey c
  • 1
  • 1
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

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.

Firelord
  • 25,084
  • 20
  • 124
  • 286
PravinCG
  • 139
  • 3
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.

Firelord
  • 25,084
  • 20
  • 124
  • 286
sloosecannon
  • 368
  • 1
  • 6
-1

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

Firelord
  • 25,084
  • 20
  • 124
  • 286
Guest
  • 1