Open HuskyDG opened 2 years ago
Thanks for sharing your insights, I will look into it when I can.
This was koushsu init.rc implementation and @axonasif use it back in Magisk 21.x days, it used to work but now isn't anymore. He can't check because he don't have a device to test so I'll modify the init and see if it boot on my PS-x86 build when I have time. Thanks for reminding us about this
Find a way (Use u:r:su:s0
) to patch sepolicy and allow magisk
domain to be permissive (do all thing). Then launch magisk in u:r:magisk:s0
selinux context
In Topjohnwu's emulator.sh:
ln -sf ./magiskinit magiskpolicy
if [ -f /vendor/etc/selinux/precompiled_sepolicy ]; then
./magiskpolicy --load /vendor/etc/selinux/precompiled_sepolicy --live --magisk 2>&1
elif [ -f /sepolicy ]; then
./magiskpolicy --load /sepolicy --live --magisk 2>&1
else
./magiskpolicy --live --magisk 2>&1
fi
There's already one Also we already in permissive, just need to patch Magisk in.
There's already one Also we already in permissive, just need to patch Magisk in.
Oh i noticed that almost emulator has Permissive Selinux mode
Rusty-magisk don't stop boot process if magisk in post-fs-data are not completed
Follow topjohnwu's Magisk Documentation, in post-fs-data stage, boot process must be stopped until all Magisk jobs are completed or 40 seconds timeout is reached.
Also the road from post-fs-data to late_start happened in very short time and magisk post-fs-data jobs may not be completed yet, maybe there are processing post-fs-data module script but late_start was triggered. That can make some modules cannot be working well if the user install many module
Compare init.rc between Magisk on my phone and init.rc in rusty-magisk.