0

I am trying to remount the /system partition from a shell, and tried both commands suggested in this post, but it does not work. Here are the script commands I am issuing:

adb shell mount | grep -e "system"
echo
adb shell "su -c 'adb shell mount -o rw,remount /system'"
echo
adb shell mount | grep -e "system"
echo

I get:

/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0

error: device not found

/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0

@Bo Lawson- I tried the command you suggested. Here are the relevant lines from my script; /system remains in ro.

adb shell mount | grep -e "system"

echo
adb shell su -c mount -o remount,rw /system
echo
adb shell mount | grep -e "system"
echo

Here is the output...

sansari@ubuntu:~$ ./module_script 
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0


/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,relatime,data=ordered 0 0

@Bo Lawson - Thanks. You are absolutely right. I got the result I wanted. No explanation is necessary; I am just grateful for your help.

  • You do not need to repeat adb shell. So it would look like adb shell su -c mount -o remount,rw /system – Bo Lawson Oct 3 '15 at 23:17
  • What about mounting the system partition directly mount -o rw,remount /dev/block/platform/msm_sdcc.1/by-name/system /system – Bo Lawson Oct 4 '15 at 2:24
  • I had tried the latest command you suggested before; I tried it again just now and do not get write access. I assume I can see all the replies from the prompt regardless of successful execution or not? What I am asking is if there is an option to print more verbose feedback maybe we can figure out what is wrong with the command(s) we issue. As it is, nothing prints to the screen. – user3326293 Oct 4 '15 at 19:12
  • After the mount command if you put (without [ ]) [ echo $? ] it will give you the return code of the previous command. That will let you know if it was a success or failure. As far as logs and good to know how to do this will put a verbose logcat on your desktop Linux [ adb logcat -v long > ~/Desktop/logcat.txt ] – Bo Lawson Oct 4 '15 at 21:48
  • In the logcat I see: [ 10-04 21:48:37.116 13281:13281 E/MTPRx ] Status for mount/Unmount :unmountable. Isn't it strange that I can log in and mount it rw, but from the shell I have issue? – user3326293 Oct 5 '15 at 2:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.