35

[GUIDE] Universal guide for making your partitions inside super read-writable ag...

 1 year ago
source link: https://forum.xda-developers.com/t/guide-universal-guide-for-making-your-partitions-inside-super-read-writable-again.4483933/page-3#post-87727851
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
@lebigmac
Are you aware of this dcript? It's an advanced version of dfe to disable encryption and switch system rw i think. Or am i wrong?
forum.xda-developers.com

[A/B][A-ONLY][SCRIPT][READ-ONLY][EROFS][ANDROID 10+] Universal Disable Force Encryption for RO and RW "NEO STABLE"

Disable Force Encryption NEO Do you all know what DFE is? no? Anyway. Basically, your device has an encrypted data section "/data" by default. Let's look at the advantages of google's solution that we will lose after disabling encryption: -...
forum.xda-developers.com forum.xda-developers.com
Edit: sorry, i thought i was on lebigmac's thread.
Last edited: Oct 22, 2022

Mr Hassan

Senior Member
Feb 14, 2016 OnePlus 10 Pro
@lebigmac
Are you aware of this dcript? It's an advanced version of dfe to disable encryption and switch system rw i think. Or am i wrong?
forum.xda-developers.com

[A/B][A-ONLY][SCRIPT][READ-ONLY][EROFS][ANDROID 10+] Universal Disable Force Encryption for RO and RW "NEO STABLE"

Disable Force Encryption NEO Do you all know what DFE is? no? Anyway. Basically, your device has an encrypted data section "/data" by default. Let's look at the advantages of google's solution that we will lose after disabling encryption: -...
forum.xda-developers.com forum.xda-developers.com

You founded unique thing but idt its for rw

You founded unique thing but idt its for rw

Yeah, i know it's not directly to make system rw, but this script ( dfe-neo) works on A12+ so it could help decrypt EROFS before trying rw script. Also help with getting TWRP working unencrypted on op9pro.

Mr Hassan

Senior Member
Feb 14, 2016 OnePlus 10 Pro
Yeah, i know it's not directly to make system rw, but this script ( dfe-neo) works on A12+ so it could help decrypt EROFS before trying rw script. Also help with getting TWRP working unencrypted on op9pro.

Did you try by your self in op9 os12?
Coz i asked from them he said its not for rw

Reactions: IamTheBRAVE

No i didn't. Like i said, the script is not for rw. But the devs could find a workaround on a EROFS system.
maybe...

Reactions: Mr Hassan

Mr Hassan

Senior Member
Feb 14, 2016 OnePlus 10 Pro
No i didn't. Like i said, the script is not for rw. But the devs could find a workaround on a EROFS system.
maybe...

I'm badly waiting for erofs convert to ext4

Reactions: IamTheBRAVE

lebigmac

Senior Member
Jan 31, 2017 1,201
@lebigmac
Are you aware of this dcript? It's an advanced version of dfe to disable encryption and switch system rw i think. Or am i wrong?
forum.xda-developers.com

[A/B][A-ONLY][SCRIPT][READ-ONLY][EROFS][ANDROID 10+] Universal Disable Force Encryption for RO and RW "NEO STABLE"

Disable Force Encryption NEO Do you all know what DFE is? no? Anyway. Basically, your device has an encrypted data section "/data" by default. Let's look at the advantages of google's solution that we will lose after disabling encryption: -...
forum.xda-developers.com forum.xda-developers.com

Hi thanks for the heads up. Yes of course I know that thread by my nemesis.
The DFE work is commendable but I cannot condone any blatant intellectual property theft that may have been perpetrated against me by this person (...)
If this person gives me a public apology for his blatant IP theft and deletes all the material that infringes on my copyrights from the internet then of course I would be willing to forgive him and work together with him on a more robust RW solution (or other interesting projects) for everyone to enjoy

Edit: sorry, i thought i was on lebigmac's thread.

I know why you thought it was my thread. The words in this thread (including the thread title) are eerily similar to those in my project thread (link in my signature below)... This will inevitably lead to confusion... Maybe @Yuki1001 can try to be a little bit more original and try his best effort to come up with his own words maybe? Maybe you should ask him about this issue...

The more original and unique RW solutions we got that are not stolen from each-other the happier I and the whole open source community will be

Last edited: Oct 22, 2022

Reactions: Mr Hassan

lebigmac

Senior Member
Jan 31, 2017 1,201
Hi @Yuki1001 do you have any idea why I keep getting this error when running the make_ext4fs binary?
Code:
error: build_directory_structure: cannot lookup security context for /system_ext/lost+found
even though I clearly have this line in my context file:
/system_ext/lost+found u:object_r:system_file:s0

And how important is the fs_config file? Can I just skip that?

Thanks!
Last edited: Oct 29, 2022
Hi @Yuki1001 do you have any idea why I keep getting this error when running the make_ext4fs binary?
Code:
error: build_directory_structure: cannot lookup security context for /system_ext/lost+found
even though I clearly have this line in my context file:
/system_ext/lost+found u:object_r:system_file:s0

And how important is the fs_config file? Can I just skip that?

Thanks!

I'm not an expert but here's the content of system_ext/etc/selinux. (I'm on PA13, op9pro)
Maybe you should write it this way?
/(system_ext|system/system_ext)/lost+found u:object_r:system_file:s0

Attachments

  • Screenshot_20221029-074542_Solid_Explorer.png

    Screenshot_20221029-074542_Solid_Explorer.png
    508.3 KB · Views: 23

Reactions: lebigmac

Hi @Yuki1001 do you have any idea why I keep getting this error when running the make_ext4fs binary?
Code:
error: build_directory_structure: cannot lookup security context for /system_ext/lost+found
even though I clearly have this line in my context file:
/system_ext/lost+found u:object_r:system_file:s0

And how important is the fs_config file? Can I just skip that?

Thanks!

Maybe the problem could appears in some situations. Try these commands if they work.
I guess lost+found is illegal in your environment?

Code:
sed -i "s/\[/\\\[/g" config/*file_contexts

sed -i "s/+/\\+/g" config/*file_contexts
The fs_config contains the permission and ownerships of every file. Without them the system even cannot boot up! Different files and folders have their own permissions and ownerships.
1667205447778.png
Can I just skip that?

Obviously, NO.


EDIT: Happy Halloween!

Last edited: Oct 31, 2022

Reactions: lebigmac

midozalouk

Member
Mar 22, 2011
1-Can I just make modification to system image and that makes it rw without other images
?

2-Can i add the edited system img to super image without the rest of the steps? Using the lpmake command even it will not be read write?

JedidroidX

Senior Member
Jan 30, 2015
1-Can I just make modification to system image and that makes it rw without other images
?

2-Can i add the edited system img to super image without the rest of the steps? Using the lpmake command even it will not be read write?

Magisk has a module that I use which emulates read/write permissions to system partition. Its called OverlayFS and it works phenomenal. Currently using on Lineage 19.1 for the Oneplus 8T! Much more simple than flashing images, I recommend going this route for the sake of simplicity. It's worth a try! Happy flashing! I hope it helps accomplish your goal.

https://github.com/Magisk-Modules-Alt-Repo/magisk_overlayfs

Reactions: IamTheBRAVE

Unfortunately didn't work for me. Kernel does not support overlayfs. OnePlus 9pro A13 paranoid android

midozalouk

Member
Mar 22, 2011
Magisk has a module that I use which emulates read/write permissions to system partition. Its called OverlayFS and it works phenomenal. Currently using on Lineage 19.1 for the Oneplus 8T! Much more simple than flashing images, I recommend going this route for the sake of simplicity. It's worth a try! Happy flashing! I hope it helps accomplish your goal.

https://github.com/Magisk-Modules-Alt-Repo/magisk_overlayfs

that will involve rooting always
and i wont like to always to be rooted cuz of the stuped bank apps

i just need to do my modifications then unroot

and vice versa

1-Can I just make modification to system image and that makes it rw without other images
?

2-Can i add the edited system img to super image without the rest of the steps? Using the lpmake command even it will not be read write?

1. For super devices, unpack super, modify system then repack, then fastboot flash is ok. No root needed (when you have another rooted device).
2. The system image is EROFS not EXT4, so it's not possible to modify it (READ ONLY). Extract the erofs, do your modifications, and make_ext4fs. Repack the super and flash.

Ask if you have further questions.

Mr Hassan

Senior Member
Feb 14, 2016 OnePlus 10 Pro
1. For super devices, unpack super, modify system then repack, then fastboot flash is ok. No root needed (when you have another rooted device).
2. The system image is EROFS not EXT4, so it's not possible to modify it (READ ONLY). Extract the erofs, do your modifications, and make_ext4fs. Repack the super and flash.

Ask if you have further questions.

Can you make your whole method with script flashable like @lmabds etc have?

midozalouk

Member
Mar 22, 2011
1. For super devices, unpack super, modify system then repack, then fastboot flash is ok. No root needed (when you have another rooted device).
2. The system image is EROFS not EXT4, so it's not possible to modify it (READ ONLY). Extract the erofs, do your modifications, and make_ext4fs. Repack the super and flash.

Ask if you have further questions.
Can i just edit the system partition as ext4 and repack it with other erofs and flash it?
Can you make your whole method with script flashable like @lmabds etc have?

As I explained to @lebigmac, this solution requires you to switchs between 2 platforms, so a single device cannot finish the whole process.

My rw unlock steps need to switch between different platforms (Windows and Linux).
Dump super -> use your lpunpack -> adb pull to Windows PC -> erofsunpackrust and make_ext4fs -> adb push to phone (Linux) -> e2fsck and lpmake -> adb pull new super image to PC -> fastboot flash.

So everything would easy if all steps can be done on a single platform (whether Windows or Linux).

Maybe I'll find make_ext4fs and erofsunpack exectuable for arm64 linux, then integrate the whole progress to the phone (Linux side).

Reactions: lebigmac

Can i just edit the system partition as ext4 and repack it with other erofs and flash it?

Until now the fstab I seen is supporting both erofs and ext4 to boot, so I guess it's ok.

Maybe you'd like to check your fstab?

Mr Hassan

Senior Member
Feb 14, 2016 OnePlus 10 Pro
As I explained to @lebigmac, this solution requires you to switchs between 2 platforms, so a single device cannot finish the whole process.


Maybe I'll find make_ext4fs and erofsunpack exectuable for arm64 linux, then integrate the whole progress to the phone (Linux side).

Brother do it if you can otherwise make script for linux no matter win or mobile
Linux is also good


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK