This is a flashable zip that enables init.d scripts to run depending on the root method you have installed.
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. Also note that if you're trying to create the init.d folder, the original directory when using magisk is actually /sbin/.core/mirror/system/etc. It goes without saying that this could break safetynet (honestly though, just copy your script to /sbin/.core/img/.core/service.d or post-fs-data.d instead and set permissions to 0755 rather than creating an init.d directory - using the in-house magisk solution is always the better option. Magisk users have almost no reason to create an init.d directory)
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.
What it does:
If it does, place it in addon/AnyKernel3/tools/arm (or x86 - whichever your architecture is - probably arm)
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.
BACKUP BOOT AND SYSTEM PARTITIONS BEFORE FLASHING
Compatibility: Any device magisk is compatible with
Confirmed working (boot img method):
Nexus 5x
Verizon LG G2
Oneplus 3/3T
Oneplus 5T
Nexus 9
Redmi Note
Zuk Edge
Axon 7 (A2017U)
Nexus 5
SM-N900T
SM-T350
LeEco Pro 3
Confirm your device works and I'll add it to the list!
Special thanks to: @osm0sis, @CosmicDan, @Ricky Divjakovski, @JustArchi
Source: https://github.com/Zackptg5/Init.d-Injector
Download
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. Also note that if you're trying to create the init.d folder, the original directory when using magisk is actually /sbin/.core/mirror/system/etc. It goes without saying that this could break safetynet (honestly though, just copy your script to /sbin/.core/img/.core/service.d or post-fs-data.d instead and set permissions to 0755 rather than creating an init.d directory - using the in-house magisk solution is always the better option. Magisk users have almost no reason to create an init.d directory)
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.
What it does:
- Search for sysinit in any rc file. If found and seclabel is intact and equal to target seclabel for my init rc script, then that seclabel will be set to permissive in sepolicy if needbe instead of using my solution
- 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
- Adds magiskpolicy to sbin. It's more up to date and complete than setools so why not?
If it does, place it in addon/AnyKernel3/tools/arm (or x86 - whichever your architecture is - probably arm)
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.
BACKUP BOOT AND SYSTEM PARTITIONS BEFORE FLASHING
Compatibility: Any device magisk is compatible with
Confirmed working (boot img method):
Nexus 5x
Verizon LG G2
Oneplus 3/3T
Oneplus 5T
Nexus 9
Redmi Note
Zuk Edge
Axon 7 (A2017U)
Nexus 5
SM-N900T
SM-T350
LeEco Pro 3
Confirm your device works and I'll add it to the list!
Special thanks to: @osm0sis, @CosmicDan, @Ricky Divjakovski, @JustArchi
Source: https://github.com/Zackptg5/Init.d-Injector
Download
Last edited: