To uninstall, just flash the zip again and it'll restore everything to how it was before
If magisk: boot scripts will be installed that will run all exectuable scripts in init.d as post-fs-data except any that end in '-ls' which will be run as late start.
The rest of this is for non-magisk/supersu installs
Otherwise: the boot img and part of the system will be modified to enable init.d support by using @osm0sis's anykernel2.
What it does:
- Search for sysinit in any rc file. If found and seclabel is intact, then that seclabel will be set to permissive in sepolicy if needbe
- If sysinit with seclabel isn't found, a custom rc file and system/bin/script file will be installed and sepolicy will be patched accordingly to add init.d support. Init.d scripts will be run the same way as with magisk installs above
- Backup/remove any setools present in bin and xbin and then add setools to sbin. These tools include: sepolicy-inject, sesearch, seinfo. All have been ported to android by Xmikos and can be found here: https://github.com/xmikos/setools-android
I am not responsible for any oddities that happen to your device because of this, use common sense. For example, if you know your device has a weird boot img, check first.
With the setools, you can use init.d boot scripts that search and inject sepolicy changes. Check Xmikos's github linked above for more details on their usage
BACKUP BOOT AND SYSTEM PARTITIONS BEFORE FLASHING
Current weird boot imgs supported natively are:
LG bump devices (like my G2)
Devices that require boot img avb-signing (v1)
FOR OTHER WEIRD BOOT IMAGES:
If you have a weird boot image not listed above like sony ELF, rockchip KRNL, etc, go here: https://github.com/osm0sis/AnyKernel...nary-inclusion to see which binaries are required
Then get the binaries from the AIK Mobile zip here: https://forum.xda-developers.com/sho....php?t=2073775
Then just copy those binaries to the tools folder of the init.d-injector zip, rezip it, and flash it
Confirmed working (boot img method):
Verizon LG G2
Axon 7 (A2017U)
LeEco Pro 3
Confirm your device works and I'll add it to the list!
Special thanks to: @osm0sis, @CosmicDan, @Ricky Divjakovski, @JustArchi
- v1.3 - Unity v1.5.4 update, redid ak2 logic - redo scripting (uses initd.sh rather than sysinit) (has capability to run init.d scripts as post-fs-data (default) and late_start (add '-ls' to the end of the name of it)) (use this logic for all system installs - magisk uses magisk boot scripts but does the same thing), updatd so it'll work with sysover if user chooses
- v1.2.1 - Unity v1.5.3 update
- v1.2 - Unity v1.5.2 update
- v1.1 - Use late start for magisk (liveboot is still post-fs-data) due to auto mount occurring after post-fs-data
- v1.0 - Completely redone with unity/ak2 hybrid template for maximal device compatibility