Emui 9.1. The system partition does not go in rw

ernia66

Member
Sep 14, 2015
11
3
0
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?
 

Daniehabazin

Senior Member
Nov 14, 2008
256
80
48
Stockholm, Boca Raton or Zagreb
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?
it's the new filesystem called erofs (Extendable Read-Only File System)
 
  • Like
Reactions: oslo83

pvillasuso

Senior Member
Apr 16, 2007
1,672
705
143
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
 

oslo83

Senior Member
Jun 12, 2016
1,384
406
93
which is?
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 !
 
Last edited:

ernia66

Member
Sep 14, 2015
11
3
0
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 !

Unfortunately I am not able to do it
:crying:
 

ilos

Senior Member
Jun 17, 2007
1,523
244
0
Saint Priest
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
use search button pls, you will find the solution already posted
 

ernia66

Member
Sep 14, 2015
11
3
0
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 !
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?
 

ilos

Senior Member
Jun 17, 2007
1,523
244
0
Saint Priest
Shhh
Here Rootexplorer paying app does not help writing on erofs partitions...
- Or did you meant something else ?
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
 
Last edited:
  • Like
Reactions: oslo83

htaige

Member
Apr 17, 2012
13
2
0
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 !
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?
 

oslo83

Senior Member
Jun 12, 2016
1,384
406
93
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
 

kami888

New member
Jun 20, 2019
4
0
0
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
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.
 
Last edited:

kirukool

New member
May 12, 2011
4
1
0
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
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