[T-Mobile LG V10 General] AnonVendetta:
[MENTION=320962]famewolf[/MENTION]: Yes, you can use the Universal Init.d app for that if you wish. But I had trouble with it, like all scripts not executing, or no scripts executing at all. It also leaves you dependent on an app, which means Android must be fully booted for scripts to execute. I prefer native kernel/boot image support for this, and since I couldn't find what I needed elsewhere, I decided to do it myself. Noone has requested that I upload a zip or img, but I will now do so anyway. It is based on the v20L update, so don't install if you aren't running at least that or higher. It's amateurish, it has my SuperR project files in the zip, but no worries, they won't flash into your device.

I also said in Eliminater74's Nebula kernel thread, that his kernel has permissive and init.d. But this was incorrect. It worked that way for me because I was using my modded boot image before flashing his kernel, and somehow these things carried over. You can still get these features with his kernel though. First, flash the zip I'm providing. Then flash his Nebula kernel zip after that. I advise doing each separately, one by one, in that order. Then wipe cache and dalvik cache. Reboot. You can verify you are running his kernel by going to Settings, About phone, software info, kernel version.

You can verify permissive by typing 'getenforce' in a terminal app (root not required). 0 means permissive, 1 means enforcing. To check if init.d is working, just drop a script in /system/etc/init.d. You can use this for testing:

https://xdaforums.com/attachment.php?attachmentid=1612958

Just copy the file over, set permissions for the file to 777 or 755, reboot, then check /data in a root file manager. You should find a file there called Test.log.

I've had no issues so far. Let me know if this works, guys.

Oh, BTW, redistribution or public modification of the zip not allowed. Only link to this post, or to the attached file. And give credit. Modifications for private/personal use are allowed, I couldn't stop you anyway, but again, no redistribution. Extract a stock boot.bin from a KDZ, rename to boot.img, and do your own mods to it, if distribution is your plan.

How I made this:

1. Flashed stock 20L KDZ

2. Ran Dirty Cow exploit, which patches boot image as SELinux set to permissive

3. Backed up boot image with dd and TWRP

4. Copied boot.img to PC, added init.d support with SuperR's Kitchen

5. Created flashable zip

No other changes were made. My boot.img hasn't been patched by systemless SuperSU, systemless Xposed, Magisk, etc, but any of those can be applied to it. Use at your own risk. You guys could easily do this yourself in about an hour or 2. I'm a n00b at Android modding.

About SELinux: It is a mandatory access control system created by the NSA. With it certain actions are either allowed or not allowed, defined by policies/rules. Think of it as like an antivirus software. It can prevent attacks, malware infections, etc. It is so powerful that it can even limit what root can do. However, I've had issues with it in the past, I have a lot of root apps that don't work correctly when SELinux is in enforcing mode. I consider myself a power user, I would rather sacrifice a bit of security in exchange for power and convenience. By being a responsible user you can mitigate the effects of disabling Android's antivirus. Simply put, be careful and don't do dumb ****. It is a complex beast, and instead of trying to work with it, I effectively choose to disable it by forcing it into a mode where rule violations are logged but not enforced. Even when set to permissive it still passively runs in the background. By flashing my zip you acknowledge that you are essentially disabling a critical Android security mechanism, and you accept responsibilities for any issues that occur as a result.

About init.d: Very simple, it lets your device automatically run scripts on boot. There are lots of scripts you can use, or you can write your own.