FORUMS
Remove All Ads from XDA

Patching Sepolicy with Supolicy Tool, modifed file not produced.

641 posts
Thanks Meter: 290
 
Post Reply Email Thread
8th January 2018, 10:54 AM |#21  
ashyx's Avatar
Recognized Contributor
Thanks Meter: 7,990
 
Donate to Me
More
Quote:
Originally Posted by dawnc

Can you please tell me how to manually patch init by supersu ?
I've googled a lot, but haven't found a way to manually patch init by supersu.
My model is Honor v10, there isn't a custom recovery, so i have to make a boot.img with supersu inside to get root.

Upload your boot.img
 
 
8th January 2018, 02:21 PM |#22  
Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by ashyx

Upload your boot.img

This is my stock boot.img(Honor V10 Emui8.0 with oreo8.0)
This is my modified boot.img(I replace init with which i get from @mankindtw 's mate 10 's root boot.img)

But i don't know how to patch init by my own, i found many threads about patching sepolicy with a rooted phone, but found none about how to patch init.
8th January 2018, 10:52 PM |#23  
ashyx's Avatar
Recognized Contributor
Thanks Meter: 7,990
 
Donate to Me
More
Quote:
Originally Posted by dawnc

This is my stock boot.img(Honor V10 Emui8.0 with oreo8.0)
This is my modified boot.img(I replace init with which i get from @mankindtw 's mate 10 's root boot.img)

But i don't know how to patch init by my own, i found many threads about patching sepolicy with a rooted phone, but found none about how to patch init.

I've unpacked your stock boot.img which seems to be a standard AOSP image, but cannot locate the sepolicy file?
And neither does there seem to be a zImage as its 0kb

Possibly there is a problem with my unpacking method.
Which tool do you use to unpack these images?
9th January 2018, 01:37 AM |#24  
Member
Thanks Meter: 8
 
More
Quote:
Originally Posted by ashyx

I've unpacked your stock boot.img which seems to be a standard AOSP image, but cannot locate the sepolicy file?
And neither does there seem to be a zImage as its 0kb

Possibly there is a problem with my unpacking method.
Which tool do you use to unpack these images?


For newest huawei emui8.0, it has different partitions, there's no more boot.img, they are ramdisk.img kernel.img vendor.img...
There's no sepolicy in the ramdisk.img, they placed sepolicy in vender.img /etc/selinix/precompiled_sepolicy.

I unpack the ramdisk.img and vendor.img with bootimg.exe https://github.com/cofface/android_bootimg

And i've described what i did here https://forum.xda-developers.com/app...ui8-0-t3732319

After all , do we have a way to patch init manually just like patching sepolicy using supolicy on a rooted phone?
9th January 2018, 05:15 AM |#25  
ashyx's Avatar
Recognized Contributor
Thanks Meter: 7,990
 
Donate to Me
More
Quote:
Originally Posted by dawnc

For newest huawei emui8.0, it has different partitions, there's no more boot.img, they are ramdisk.img kernel.img vendor.img...
There's no sepolicy in the ramdisk.img, they placed sepolicy in vender.img /etc/selinix/precompiled_sepolicy.

I unpack the ramdisk.img and vendor.img with bootimg.exe https://github.com/cofface/android_bootimg

And i've described what i did here https://forum.xda-developers.com/app...ui8-0-t3732319

After all , do we have a way to patch init manually just like patching sepolicy using supolicy on a rooted phone?

I can manually patch the ramdisk. Could you upload the unpatched sepolicy file?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes