Can't mount /system R/W in either TWRP or OFox - Redmi Note 9S / Note 9 Pro (Indian Model) Question

I wanted to delete some files from the system like some useless system apps/themes etc. I was trying to root my phone with magisk. The magisk would install but I couldn't make any kind of changes because I found it was read-only! Now if I want it to mount read-write, it just won't. Any solutions, anyone?
Resmi Note 9S Curtana, OFox R11 installed with xiaomi.eu 12.0.1.0, android 11

Try this script from this thread.

You can't mount system because of dynamic partitions (super partition). The script linked above doesn't mount system rw, it just makes a new super partition.
The real way to make edits to dynamic partitions is with adb remount which replaces the old 'mount -o rw, remount /system' method.
The practical way to make edits is systemlessly with a magisk module.
Adb remount info
Dynamic partitions info

jwchips said:
You can't mount system because of dynamic partitions (super partition). The script linked above doesn't mount system rw, it just makes a new super partition.
The real way to make edits to dynamic partitions is with adb remount which replaces the old 'mount -o rw, remount /system' method.
The practical way to make edits is systemlessly with a magisk module.
Adb remount info
Dynamic partitions info
Click to expand...
Click to collapse
I feel superdumb but @jwchips , where am I supposed to put those commands- in custom recovery terminals, in Windows command prompt or in a terminal emulator app?

Plz someone teach me step by step. I can't rw system by root explorer in miui rom, but I can do it in aosp rom. I don't know what causing this result. Since android 2 to android 11. Every upgrade time I struggle a lot. Now I spend 2 mouth to search internet but for code noob like me, get nothing. I'm still study it hope a newvice tutorial post.

same problem here, ive tried different zips and also doing it manually, no success

Azamsm said:
I wanted to delete some files from the system like some useless system apps/themes etc. I was trying to root my phone with magisk. The magisk would install but I couldn't make any kind of changes because I found it was read-only! Now if I want it to mount read-write, it just won't. Any solutions, anyone?
Resmi Note 9S Curtana, OFox R11 installed with xiaomi.eu 12.0.1.0, android 11
Click to expand...
Click to collapse
Why not try debloater magisk?
GitHub - sunilpaulmathew/De-Bloater: An application using the power of Magisk to debloat unwanted system apps!
An application using the power of Magisk to debloat unwanted system apps! - GitHub - sunilpaulmathew/De-Bloater: An application using the power of Magisk to debloat unwanted system apps!
github.com

Related

Setting system root as RW default

Hey there?
I've got a question which I can't seem to find anywhere else and YES I have searched this forum and google. However, I may miss it.
Anyway, I've mapped my android phone as a network drive using Samba and changed the smb.conf file to show the System Root directory as well. However, system root is default set as R/O so to mange files USING my computer I need to change the permission to R/W using a file manager (such as root explorer). This is annoying, as I have to keep doing this in order to write to certail directories.
What I wish to do is create a massive guide on all of this to help out the community, however I need one little bit of information.
I would like the / directory (root) to be mounted as R/W as default so that I can quickly edit files on my PC without having to constantly change it to R/O.
If this has been answered before, I do apologize.
Thanks in advance.
Regards,
xxSHABSxx
EDIT:
To make things a bit clearer.
I want something that will automatically mount my phone's root dir into rw upon boot, without custom apps/having to manually mount as rw everytime it reboots. And yes I understand there are apps that do this.
Yes, the root file system is read-only, but it's also volatile. It's restored from the initramfs in the boot image each time you reboot the phone, so only mounting it writeable, doesn't do you very much anyway.
In /init.rc you find a line:
Code:
mount rootfs rootfs / ro remount
This remounts your root read-only. Remove this, and it'll stay writeable. But again, all edits to the root file system are volatile. To change this, you must flash a new boot.img
An easier way would be a root-app remounting it writable again after boot.
kuisma said:
Yes, the root file system is read-only, but it's also volatile. It's restored from the initramfs in the boot image each time you reboot the phone, so only mounting it writeable, doesn't do you very much anyway.
In /init.rc you find a line:
Code:
mount rootfs rootfs / ro remount
This remounts your root read-only. Remove this, and it's stay writeable. But again, all edits to the root file system are volatile. To change this, you must flash a new boot.img
An easier way would be a root-app remounting it writable again after boot.
Click to expand...
Click to collapse
Ahh I figured as much, since Google didn't offer any solutions to me. And flashing is way much more effort than simply having an app that does it for you.
Anyway thanks for the reply!
xxshabsxx said:
Ahh I figured as much, since Google didn't offer any solutions to me. And flashing is way much more effort than simply having an app that does it for you.
Click to expand...
Click to collapse
Or do like I did, move the root to a real ext3 non-volatile file system instead.

[Q] 4.0.3 HTC Temp Root Question

Hello everybody,
i have gained root access to my phone via backup/restore method through adb where local.prop is stored in /data/. So when i log onto my phone with adb i have root access. I copied busybox, su and the superuser.apk to the right place and removed the local.prop file again. After a reboot I was hoping to remove some crapware off my phone but to my surprise the binaries i copied vanished from the filesystem. So the phone reverted the changes by itself. I did this process several times copying busybox and su to various places referred to by $PATH, but it´s everytime the same after i reboot. The files are gone.
After the first attempts failed i tried to make changes to my phone while logged in as root. I wanted to uninstall unnecessary packages with "pm uninstall" but that failed also. The command just responds "failed". Even when /system is mounted rw (it remounts itself to ro after a while though). I´ve also made changes to /init.rc but they are also gone after a reboot as other changes i´ve made. Basically i wasn´t able to accomplish anything with root access no matter what i did.
So what i want to know is how this black magic works andy why i cant do anything with root. I know how to achieve real root through htc dev and various other methods.
Thanks for reading!
nasenstueber said:
Hello everybody,
i have gained root access to my phone via backup/restore method through adb where local.prop is stored in /data/. So when i log onto my phone with adb i have root access. I copied busybox, su and the superuser.apk to the right place and removed the local.prop file again. After a reboot I was hoping to remove some crapware off my phone but to my surprise the binaries i copied vanished from the filesystem. So the phone reverted the changes by itself. I did this process several times copying busybox and su to various places referred to by $PATH, but it´s everytime the same after i reboot. The files are gone.
After the first attempts failed i tried to make changes to my phone while logged in as root. I wanted to uninstall unnecessary packages with "pm uninstall" but that failed also. The command just responds "failed". Even when /system is mounted rw (it remounts itself to ro after a while though). I´ve also made changes to /init.rc but they are also gone after a reboot as other changes i´ve made. Basically i wasn´t able to accomplish anything with root access no matter what i did.
So what i want to know is how this black magic works andy why i cant do anything with root. I know how to achieve real root through htc dev and various other methods.
Thanks for reading!
Click to expand...
Click to collapse
is your RECOVERY.img
and beside i dont really think your /system is fully mounted rw
mauricio.valladolid said:
is your RECOVERY.img
and beside i dont really think your /system is fully mounted rw
Click to expand...
Click to collapse
Thanks for the reply. i use mount -o remount,rw /system as mount command to get read/write permission on /system. If there is something more to do please let me know. And if the behavior i ve seen is caused by the recovery.img is there something i can do about it?
nasenstueber said:
Thanks for the reply. i use mount -o remount,rw /system as mount command to get read/write permission on /system. If there is something more to do please let me know. And if the behavior i ve seen is caused by the recovery.img is there something i can do about it?
Click to expand...
Click to collapse
why dont you just install ext4 recovery and flash supersu.zip?
I really dont get it why are you trying to do it the hard way

Nougat sytem patition read only - Help needed

After the flash of V20a EUR-xx I would like to change my bootanimation and make some changes in my build.prop.
But it's not possible because the system partition is read only and it's not possible for me to change.
Root explorer did not work.
For this reason for example the use of faster GPS is not possible
Any help to make the system partition writable would be great.
Regards
mkpcxxl
Edit: Found solution by myself. Flashed no-verity-opt-encrypt-4.1.zip and now it works.
+
looking for help with that too. Nothing works: terminal on android; app mount system rw; adb shell; root explorers.
Same here ...
Tried TWRP 3.0.2.1 - Beta 1
... TWRP 3.0.2.1
no-verity-opt-encrypt-4.1
SuperSU v2.78
SuperSU v2.78 SR4
Normal wipe, Format data, etc. etc. ....
Can´t get the system to R/W
FX File Explorer lets me turn system to R/W with root but nothing is permanent ( build.prop entries ) and deletes are overwritten and not permanent
SD maid wont let me delete bloat apps ....
Anyone an idea?
Hey guys. I know how to mount system as R/W (It's not forever but you can operate on system files).
App "Root Explorer" can mount system. Thanks to @marco_wack

Emui 9.1. The system partition does not go in rw

Hello. I installed emui 9.1 on my mate20pro with the dload method. I unlocked the bootloader again and rooted the system with patched recovery. The phone is rooted, but the system partition remains in ro. I have tried various apps to mount the system in rw, but without success. I have also tried some commands found on the net both through adb and emulator, but nothing to do. I have also tried using rootexplorer which has been granted root permissions, but fails to modify anything, nor to insert or delete files within the system folders. What can be done?
ernia66 said:
Hello. I installed emui 9.1 on my mate20pro with the dload method. I unlocked the bootloader again and rooted the system with patched recovery. The phone is rooted, but the system partition remains in ro. I have tried various apps to mount the system in rw, but without success. I have also tried some commands found on the net both through adb and emulator, but nothing to do. I have also tried using rootexplorer which has been granted root permissions, but fails to modify anything, nor to insert or delete files within the system folders. What can be done?
Click to expand...
Click to collapse
it's the new filesystem called erofs (Extendable Read-Only File System)
So there's nothing to do?
Sorry OP if this is off topic , but its about magisk and root in 9.1
I have the "system partition remains in ro" issue too , its annoying yes , but I have a bigger problem
When "rooted" , the phone app ( dialer ), and the contacts app both get broken and crash .. So I have to fastbootflash twrp and lose root to make those apps to work normally again
Anyone with the same problem ?
I need root so I can change and use the font ( I like ) with a magisk module
ernia66 said:
So there's nothing to do?
Click to expand...
Click to collapse
Magisk can already 'replace on the fly' file from /system systemless-y.
It dies already support erofs.
Check Magisk documentations.
There is also a way to mount custom erofs partition....
which is?
ernia66 said:
which is?
Click to expand...
Click to collapse
Build your own erofs partitions (cf. erofs.mkfs)
Unmount stock ones and mount yours.
I just did some test 48h ago on erofs /cust and it seems to work...
-Mounting other file system type on same folder could even work !
oslo83 said:
Build your own erofs partitions (cf. erofs.mkfs)
Unmount stock ones and mount yours.
I just did some test 48h ago on erofs /cust and it seems to work...
-Mounting other file system type on same folder could even work !
Click to expand...
Click to collapse
Unfortunately I am not able to do it
:crying:
pvillasuso said:
Sorry OP if this is off topic , but its about magisk and root in 9.1
I have the "system partition remains in ro" issue too , its annoying yes , but I have a bigger problem
When "rooted" , the phone app ( dialer ), and the contacts app both get broken and crash .. So I have to fastbootflash twrp and lose root to make those apps to work normally again
Anyone with the same problem ?
I need root so I can change and use the font ( I like ) with a magisk module
Click to expand...
Click to collapse
use search button pls, you will find the solution already posted
ilos said:
use search button pls, you will find the solution already posted
Click to expand...
Click to collapse
Shhh
Here Rootexplorer paying app does not help writing on erofs partitions...
- Or did you meant something else ?
Magisk Doc. :
https://topjohnwu.github.io/Magisk/
So far, out-of-the-box, Magisk is already ready to replace systemless-ly files and paths on /system easily when used with modules.
-Module just need a a small tweak to add Magisk systemless-ly compatibility to other erofs partitions like /cust
Another way would be to bind or mount...
ilos said:
use search button pls, you will find the solution already posted
Click to expand...
Click to collapse
Wow , what , where ???
I did search but maybe I didnt use the right keywords for such an specific issue
Any extra help , would be very appreciated !
oslo83 said:
Build your own erofs partitions (cf. erofs.mkfs)
Unmount stock ones and mount yours.
I just did some test 48h ago on erofs /cust and it seems to work...
-Mounting other file system type on same folder could even work !
Click to expand...
Click to collapse
I'd like to create my own partition but I don't know how to do it. Is there any online guide for beginners that I can try?
oslo83 said:
Shhh
Here Rootexplorer paying app does not help writing on erofs partitions...
- Or did you meant something else ?
Click to expand...
Click to collapse
my reply was not for you but for the off topic before my reply: contact, ph app and message force close after root.
as I said, there is already a solution about force close.
Anyway I can only write in /system/etc and some over folders
oslo83 said:
Build your own erofs partitions (cf. erofs.mkfs)
Unmount stock ones and mount yours.
I just did some test 48h ago on erofs /cust and it seems to work...
-Mounting other file system type on same folder could even work !
Click to expand...
Click to collapse
Hi, I saw that you managed to get a custom erofs partition mounted using magisk. I was wondering if the same could be done for the/product folder because that would allow me to fix the DPI scaling issues found on EMUI 9.0-9.1. Would it be possible to see the code for your magisk module?
Ok, So.
After having a look at what I did with this WorkInProgress...
So far there is 2 main way I thought about and played with:
Method A
A1/
Using the mkfs.erofs tool to make your custom erofs partition and mount it over the original one. (mayne umount it before)
Thanks @ph03n!x for his work on mkfs.erofs.
Thanks @ante0 for his android arm build.
A2/
I did not yet tryed to flash via fastboot or adb these modded erofs images.
Method B
What I'm actually doing is just mounting systemless-y with a magisk module whole folders over erofs one ;
In post-fs-data.sh, I'm doing:
mount -o bind $MODDIR/cust /cust
mount -o bind $MODDIR/version /version
With a ~150MB custom /cust it is working ; It should be tryed/perfected for bigger folders.
Another way, to not replace/spoof the whole folders could be to mount the whole list of custom files at their respective path (-to be tested)
PS: I'm not sure if update-binary module's file should be modded with some:
mount /cust 2>/dev/null
@ line 42
Sources:
https://forum.xda-developers.com/huawei-p30-pro/how-to/erofs-mounting-accessing-img-t3944193
oslo83 said:
Ok, So.
After having a look at what I did with this WorkInProgress...
So far there is 2 main way I thought about and played with:
Method A
A1/
Using the mkfs.erofs tool to make your custom erofs partition and mount it over the original one. (mayne umount it before)
Thanks @ph03n!x for his work on mkfs.erofs.
Thanks @ante0 for his android arm build.
A2/
I did not yet tryed to flash via fastboot or adb these modded erofs images.
Method B
What I'm actually doing is just mounting systemless-y with a magisk module whole folders over erofs one ;
In post-fs-data.sh, I'm doing:
mount -o bind $MODDIR/cust /cust
mount -o bind $MODDIR/version /version
With a ~150MB custom /cust it is working ; It should be tryed/perfected for bigger folders.
Another way, to not replace/spoof the whole folders could be to mount the whole list of custom files at their respective path (-to be tested)
PS: I'm not sure if update-binary module's file should be modded with some:
mount /cust 2>/dev/null
@ line 42
Sources:
https://forum.xda-developers.com/huawei-p30-pro/how-to/erofs-mounting-accessing-img-t3944193
Click to expand...
Click to collapse
I'm rather new to this trying to do something similar on my EMUI9.1 using Magisk, I'm having a problem that i can replace anything in most other folders without much problem like /etc/ for example, but when i try to substitute /vendor/, whatever i put it the folder does not only fail to get substituted, it even disappears from the $MODDIR/system/vendor folder upon restart!
I.e. let's say I create a new file in $MODDIR/system/etc. Upon restart i'm successfully seeing that same file appear /etc.
However when I create a new file under $MODDIR/system/vendor, Upon restart i'm not seeing that under /vendor. ALSO the file is gone from $MODDIR/system/vendor like it was never there.
Any idea what is happening? I've also tried manually mounting in the post-fs-data.sh, where i put the following:
mount -o bind $MODDIR/system/vendor /vendor
That actually caused my system to freeze on the loading screen. I had to reset magisk to non-modded settings in order to get it to run again.
Any help's appreciated.
pvillasuso said:
Sorry OP if this is off topic , but its about magisk and root in 9.1
I have the "system partition remains in ro" issue too , its annoying yes , but I have a bigger problem
When "rooted" , the phone app ( dialer ), and the contacts app both get broken and crash .. So I have to fastbootflash twrp and lose root to make those apps to work normally again
Anyone with the same problem ?
I need root so I can change and use the font ( I like ) with a magisk module
Click to expand...
Click to collapse
i got the solution of above problem from this https://forum.xda-developers.com/huawei-p30-pro/how-to/guide-magisk-root-p30-pro-bl-code-t3938285
Hi I have almost the same issue after updating to EMUI 9.1 the phone hardbricked. It only shows as fastboot on my PC I tried flashing but not sending the img files please help

Build.prop file accidentally got empty and haven't rebooted yet. Any ways to restore it?

Build.prop file accidentally got empty and haven't rebooted yet. Any ways to restore it?
Am i screwed?
You have a customer recovery? Then you can dirty flash your rom
I definitely would have done that if i did.
But TWRP was never released for my phone (poco x3 gt)
Depends the device and android version I guess...
I would do getprop and edit the output to build.prop form.
Notice to chmod the file correctly, 644 or whatever..
I think you can reboot safely because build.prop is inside super partition and therefore read-only.
of course you can download stock ROM from xiaomifirmwareupdater and extract build.prop from super.img, but it's more easy to flash super.img from fastboot.
aIecxs said:
I think you can reboot safely because build.prop is inside super partition and therefore read-only.
of course you can download stock ROM from xiaomifirmwareupdater and extract build.prop from super.img, but it's more easy to flash super.img from fastboot.
Click to expand...
Click to collapse
Nvm my phone just got an OTA update.
I just have to restore the root now
aIecxs said:
I think you can reboot safely because build.prop is inside super partition and therefore read-only.
Click to expand...
Click to collapse
And it's empty like how? Weird crap anyway... ok now, so who cares...
Idk but /system /vendor /product /system_ext /odm are ro dynamic partitions inside super partition, either OP did re-duplicate blocks with e2fsck -E unshare_blocks and disabled avb/dm-verity to allow remount rw / system_root (would break OTA), or it simply wasn't written to build.prop at all (magisk systemless overlay)? "empty" could also mean does not exist/no permissions...
https://github.com/Yuyuko1024/device_xiaomi_chopin/blob/lineage-18.1/rootdir/etc/fstab.mt6891
TWRP is available btw
https://forum.xda-developers.com/t/twrp-unofficial-3-6-0-poco-x3-gt-redmi-note-10-pro-5g.4369207

Categories

Resources