Mounting /system as RW with root returns error - Android Q&A, Help & Troubleshooting

Hi guys! I've checked a bunch of threads for answers and to make sure I wasn't double posting, but if I am please direct me to the right place and I'll close this thread super quick!!
So I'm trying to mount /system as rw in order to delete an embedded application. BUT I keep getting stopped at every turn. I'm sure I'm missing something obvious, but any help would be super awesome.
- 1st try: Just mounting the system as rw -> mount: Operation not permitted
- 2nd try: Getting more information about system using grep and attempt to mount again -> mount: Operation not permitted
This is what I got so far (as root):
Code:
# mount -o rw,remount /system
mount -o rw,remount /system
mount: Operation not permitted
# mount | grep system
mount | grep system
/dev/block/dm-0 /system ext4 ro,seclabel,relatime,discard,data=ordered 0 0
# mount -o rw,remount /dev/block/dm-0 /system
mount -o rw,remount /dev/block/dm-0 /system
mount: Operation not permitted
Any thoughts on where I should go from here?
Oh for system information, I'm running 6.0.1.

Related

Cannot mount as read/write, Please help

Trying to push files from adb to my phone but it wont let me because its a read only system.
I've done adb shell mount -o rw,remount /dev/block/mtdblock3 /system but it does not work, I'm running windows 7 could this be a problem?
Make sure that USB Debugging is enabled on the phone.
Settings...Applications...Development
C:\Users\Jake\Desktop\android-sdk-windows\tools>adb shell mount -o rw,remount /d
ev/block/mtdblock3 /system
mount: mounting /dev/block/mtdblock3 on /system failed: Invalid argument
C:\Users\Jake\Desktop\android-sdk-windows\tools>
It is enabled.
Are you in recovery mode when you're trying this? Or booted regularly?
If you're in recovery mode you'd mount it like this:
mount -o rw /dev/block/mtdblock3 /system
Jboxen said:
C:\Users\Jake\Desktop\android-sdk-windows\tools>adb shell mount -o rw,remount /d
ev/block/mtdblock3 /system
mount: mounting /dev/block/mtdblock3 on /system failed: Invalid argument
C:\Users\Jake\Desktop\android-sdk-windows\tools>
Click to expand...
Click to collapse
follow my tutorial for ADB set-up. http://forum.xda-developers.com/showthread.php?p=6054534#post6054534
I noticed you dont have SDK in C:/ root....
or a simple command like this should mount it as read/write:
adb remount
its what i have been doing and seems to do the same thing with less commands, unless someone can point out the difference for me.
Otherwise, try
mount -o rw,remount /dev/block/mtd3 /system
That should do it. The /dev/block/mtdblock3 is only required in recovery.
ECLIPS3 said:
or a simple command like this should mount it as read/write:
adb remount
its what i have been doing and seems to do the same thing with less commands, unless someone can point out the difference for me.
Click to expand...
Click to collapse
I would also like to know the difference between the two commands:
adb remount
and
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
DeezNotes said:
I would also like to know the difference between the two commands:
adb remount
and
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Click to expand...
Click to collapse
i believe they both do the same thing. just one uses the same characters
Android22 said:
follow my tutorial for ADB set-up. http://forum.xda-developers.com/showthread.php?p=6054534#post6054534
I noticed you dont have SDK in C:/ root....
Click to expand...
Click to collapse
having the SDK in C:\ root is not a necessity. People do it because it is easy to do it that way.

[Q] Mount /system as r/w in stock recovery

I'm stuck in Recovery and trying to push a file to /system to try to fix things, however I'm not able to mount it as read/write using adb
$ mount -o remount,rw /dev/stl12 /system
mount -o remount,rw /dev/stl12 /system
mount: Operation not permitted
su
Permission denied
Any solution?

Removing Bloat Help

Ok so the Rezound has the bootloader unlocked and rooted with 1click method.
Root Explorer, and Root Checker verify.
Going into adb I am trying to adb rm /system/app/".apk"
It doesnt work.
I tried adb remount and it is not letting me and says operation not permitted.
If I type in adb shell I get the $, then type in su and get #
Titanium Backup. More than worth the money. You can freeze, remove, and backup anything/everything.
Sent from my ADR6425LVW using xda premium
Code:
adb shell
su
busybox mount -o rw,remount -t / rootfs
rm /system/app/NameOfApp.apk
busybox mount -o ro,remount -t / rootfs
adb shell
$ su
su
# busybox mount -o rw,remount -t yaffs2 /rootfs
busybox mount -o rw,remount -t yaffs2 /rootfs
mount: can't find /rootfs in /proc/mounts
# rm /system/app/com.mobitv.client.nfl2010.apk
rm /system/app/com.mobitv.client.nfl2010.apk
rm failed for /system/app/com.mobitv.client.nfl2010.apk, Read-only file system
Try ROM Toolbox. You can find it free in Market.
Code:
busybox mount -o rw,remount -t yaffs2 /dev/block/mmcblk029p /system
This Will Mount The System As "read/write" And Switch It To "ro" To Go Back To "read-only"
Xtreme Outcast said:
Code:
busybox mount -o rw,remount -t yaffs2 /dev/block/mmcblk029p /system
This Will Mount The System As "read/write" And Switch It To "ro" To Go Back To "read-only"
Click to expand...
Click to collapse
I would suggest to drop the extra bits that someone could mis-type and shorten this to
"busybox mount -o remount,rw /system"
It's worked for me and takes a little chance out of the equation. Just my opinion take it for what it's worth.
I Was In A Rush Yesterday That I Typed In The Wrong Code And Just Realized It Now When He Said It Didn't Work. It's All Fixed Thanks For The Suggestions Always Appreciated On My Posts Or Threads.

Curious: order of mount options making a difference, trying to remount /system r/w

Hey,
for years I've been remounting /system read-write with the following call from a root shell:
Code:
mount -o remount,rw /system
With Android 7.1.2 and specifically the SuperMan ROM on my SGS7 edge, this no longer works:
Code:
mount -o remount,rw /system
mount: '/dev/block/platform/155a0000.ufs/by-name/SYSTEM'->'/system': Device or resource busy
A bit of searching on the web revealed that the following, however, does work:
Code:
mount -o rw,remount /system
Can someone figure out why the order would matter?
I find this especially curious because e.g. the Synapse app seems to use remount,rw as well, at least I see the same error when trying to use it to remount the `/system` partition.
Thanks for any insights!

Android 9 (Pie) unable to unlock /system from read-only mode

Hi all,
Just upgraded my Mi8 with the new Miui 10 based on Android P.
I've TWRP-3.2.3-0918 as recovery and rooted with Magisk-v17.1
As root, in the same condition until the previous version (Android Oreo) i was able to remount the /system with
# mount -o rw,remount /system
but in this version i get an error
'/dev/block/platform/soc/1d84000.ufshc/by-name/system' is read-only
i've tried many ways but nothing ... i'm unable to remount the /system for writing ... see below my failed attempts
# l /dev/block/platform/soc/1d84000.ufshc/by-name/system
lrwxrwxrwx 1 root root 16 Jun 4 1970 /dev/block/platform/soc/1d84000.ufshc/by-name/system -> /dev/block/sde48
# l /dev/block/sde48
brw------- 1 root root 259, 38 Jun 4 1970 /dev/block/sde48
# mount -o rw,remount /dev/block/sde48 /system
mount: '/system' not in /proc/mounts
# mount -o rw,remount /dev/block/platform/soc/1d84000.ufshc/by-name/system /system
'/dev/block/platform/soc/1d84000.ufshc/by-name/system' is read-only
home # mkdir mio
home # mount -t ext4 /dev/block/platform/soc/1d84000.ufshc/by-name/system mio
mount: '/dev/block/platform/soc/1d84000.ufshc/by-name/system'->'mio': Device or resource busy
# mount -o remount,rw,bind /system /data/data/berserker.android.apps.sshdroid/home/mio <
mount: '/data/data/berserker.android.apps.sshdroid/home/mio' not in /proc/mounts
home # cat /proc/mounts | grep system
/dev/block/platform/soc/1d84000.ufshc/by-name/system /system ext4 ro,seclabel,relatime,discard,data=ordered 0 0
/dev/block/platform/soc/1d84000.ufshc/by-name/system /sbin/.core/mirror/system ext4 ro,seclabel,relatime,discard,data=ordered 0 0
home # mount -o remount,rw,bind /dev/block/platform/soc/1d84000.ufshc/by-name/system /data/data/berserker.android.apps.sshdroid/home/mio
mount: '/data/data/berserker.android.apps.sshdroid/home/mio' not in /proc/mounts
home # mount -o remount,rw,bind /dev/block/platform/soc/1d84000.ufshc/by-name/system /system
'/dev/block/platform/soc/1d84000.ufshc/by-name/system' is read-only
home # mount -o remount,rw /dev/block/platform/soc/1d84000.ufshc/by-name/system /system
'/dev/block/platform/soc/1d84000.ufshc/by-name/system' is read-only
home # getenforce
Enforcing
home # setenforce 0
home # getenforce
Permissive
home # mount -o remount,rw /dev/block/platform/soc/1d84000.ufshc/by-name/system /system <
'/dev/block/platform/soc/1d84000.ufshc/by-name/system' is read-only
i'm out of idea
Someone have some try to suggest ?
Thank you
*Bump*
i'm the only one that is trying to mount RW the /system on Pie ?
adb root
adb disable-verity
adb reboot
adb root
adb remount
doesn't work for me , disable-verity not found
poloolop said:
adb root
adb disable-verity
adb reboot
adb root
adb remount
Click to expand...
Click to collapse
Hi poloolop,
i thank you for the try but ...
1) i have already the dm-verity disabled
2) i need to remount the /system from the shell command line inside the smartphone and not from the adb connected from a pc
hope that someone can solve this question ...
Thorezz said:
Hi poloolop,
i thank you for the try but ...
1) i have already the dm-verity disabled
2) i need to remount the /system from the shell command line inside the smartphone and not from the adb connected from a pc
hope that someone can solve this question ...
Click to expand...
Click to collapse
Hi Thorezz,
I had the same problem with my Mi8 on Android Pie. Flashing recovery twrp-3.2.3-0908.img sloved this problem. Warn you, i had the first start of recovery in Chinese.
Hi Rallbomban,
rallbomban said:
Hi Thorezz,
I had the same problem with my Mi8 on Android Pie. Flashing recovery twrp-3.2.3-0908.img sloved this problem. Warn you, i had the first start of recovery in Chinese.
Click to expand...
Click to collapse
thanks for trying but ... i've the problem with the twrp-3.2.3-0918 so it's a twrp newer than yours ... i also I noticed that the adway apk is able to mount and change the hosts file using some function of magisk (that i already have in my rooted system) so it's possibile to do but i'm unable to find how to do !
waiting for someone that have this knowledge
I had problem with newer recovery and only flashing older recovery solve it. But in my situation even Adaway couldn't change hosts file.
mount -o rw,remount /
mount -o rw,remount /dev/root
all geany is simply
No sry that doesn't work.. You have to flash the dm-verity-zip
Hi A.S._id
A.S._id said:
mount -o rw,remount /
mount -o rw,remount /dev/root
Click to expand...
Click to collapse
for sure you haven't read my question ...
1) the /etc it's in the system partiontion
2) on the n failed try that i've done (and that you can read on top of the thread) there is also "mount -o rw,remount /system" exactly as your answer ... and this don't work
anyway thank you for the try
Hi LUKI508,
LUKI508 said:
No sry that doesn't work.. You have to flash the dm-verity-zip
Click to expand...
Click to collapse
in my magisk manager the flag "keep AVB 2.0/dm-verity" is unchecked ... it'snt the same ?
Thank you
Thorezz said:
Hi A.S._id
for sure you haven't read my question ...
1) the /etc it's in the system partiontion
2) on the n failed try that i've done (and that you can read on top of the thread) there is also "mount -o rw,remount /system" exactly as your answer ... and this don't work
anyway thank you for the try
Click to expand...
Click to collapse
for sure you haven't read my answer
mount point of system in android 9 Pie now in root, so mount must have isn't /system, but root "/"...
And I'm tried it in my tv box x96 max android 9 Pie...
Hi A.S._id,
A.S._id said:
for sure you haven't read my answer
mount point of system in android 9 Pie now in root, so mount must have isn't /system, but root "/"...
And I'm tried it in my tv box x96 max android 9 Pie...
Click to expand...
Click to collapse
Doh ...
At first i thinking that you was joking ... i have done an ssh connection to my MI8 and i checked if the things are as you write and ... not ... i can confirm that the /etc is a symlink to /system/etc and /system is an autonomous mount point as you can see below
Code:
:/ # l -d /etc
lrwxrwxrwx 1 root root 11 Jan 1 1970 /etc -> /system/etc
1|:/ # mount | grep system
/dev/block/sde48 on /system type ext4 (ro,seclabel,relatime,discard,data=ordered)
so this confirm what i told you (and you can see that this is mounted RO) but ... i've done a try and ....
Code:
:/ # mount -o rw,remount /
no errors !
but if i try to create a file in /etc
HTML:
:/etc # touch thorezz
touch: thorezz: Read-only file system
1|:/etc # >thorezz
/system/bin/sh: can't create thorezz: Read-only file system
so the remount of / work but the /etc that it's in the /system don't become RW
and i can confirm that your suggestion don't work ...
thank you
P.S: all this with user root and /etc in writable by root ... just in case you think about this
Code:
:/etc # l -d .
drwxr-xr-x 27 root root 4096 Mar 21 14:38 .
@Thorezz
console:/ # mount -o rw,remount /
[ [email protected]] EXT4-fs (mmcblk0p18): re-mounted. Opts: block_validity,delalloc,barrier,user_xattr,acl
console:/ # mount -o rw,remount /dev/root
[ [email protected]] EXT4-fs (mmcblk0p18): re-mounted. Opts: block_validity,delalloc,barrier,user_xattr,acl
ps. your fstab
that has into /system/vendor/etc/fstab.qcom and etc has into /system/vendor/ too :yes:
and i think for you mount must have
Code:
[B]mount -o rw,remount /vendor[/B]
A.S._id said:
@Thorezz
console:/ # mount -o rw,remount /
[ [email protected]] EXT4-fs (mmcblk0p18): re-mounted. Opts: block_validity,delalloc,barrier,user_xattr,acl
Click to expand...
Click to collapse
this work but don't solve the problem
console:/ # mount -o rw,remount /dev/root
[ [email protected]] EXT4-fs (mmcblk0p18): re-mounted. Opts: block_validity,delalloc,barrier,user_xattr,acl
Click to expand...
Click to collapse
this don't work because in my phone does not exist /dev/root
ps. your fstab
that has into /system/vendor/etc/fstab.qcom and etc has into /system/vendor/ too :yes:
and i think for you mount must have
Code:
[B]mount -o rw,remount /vendor[/B]
Click to expand...
Click to collapse
my /system/vendor/etc/fstab.qcom is like your with a little difference only in this line
yours
Code:
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc latemount,wait,check,reservedsize=128M,fileencryption=ice,quota
mine
Code:
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,noauto_da_alloc latemount,wait,check,reservedsize=128M,encryptable=ice,quota
i think that the parameter "fileencryption" and "encryptable" are synonyms
Code:
:/ # mount -o rw,remount /vendor
:/ # cd /etc
:/etc # >testfile
/system/bin/sh: can't create testfile: Read-only file system
nothing to do ... thank you for trying to help
any updates ?
---------- Post added at 09:41 PM ---------- Previous post was at 09:31 PM ----------
Try
mount -o rw,remount -t ext4 /full/path/to/modify
lapwat said:
any updates ?
Click to expand...
Click to collapse
nothing ... someone know the answer but take for self the correct procedure...
mount -o rw,remount -t ext4 /full/path/to/modify
Click to expand...
Click to collapse
[/QUOTE]
adding the filesystem type don't change the result ... the filesystem is autorecognized and re-mounted but without the write permission
thank you for the try
Thorezz said:
nothing ... someone know the answer but take for self the correct procedure...
adding the filesystem type don't change the result ... the filesystem is autorecognized and re-mounted but without the write permission
thank you for the try
Click to expand...
Click to collapse
I did
mount -o rw,remount /system/app/NQNfcNci
And it worked. Specify full path not only /system.
And you are right, ext4 option is not needed.
I found the solution
I know I am a bit late, but I was having issues modifying stuff in the /system/priv-app folder and every attempt of any mount call described up until now did NOT work.
BUT I found the solution: since I am using magisk (and you do too), the /system partition is somewhat "remapped" to /system_root.
So the solution is easy: just mount /system_root and you will be good to go:
Code:
mount -o rw,remount /system_root

Categories

Resources