[MOD] Kernel Permissive Patcher for Android

Zackptg5

Recognized Developer
Sep 18, 2014
4,081
6,649
263
zackptg5.com
Didnt mount the system this time; still reads as Enforcing. I've attached a copy of the recovery.log
Okay, just pushed a change to fix one error but your header is messed up - the permissive entry is in there twice. I don't know if that's you issue or not but I'd recommend restoring original boot img (if you didn't make a back up, extract boot.img from your rom zip an flash img in twrp), then flash the zip.

The multiple entry thing wasn't from my zip though (I tested it to make sure it wouldn't do that).

All this does is add/remove the "androidboot.selinux=permissive" from your cmdline (which you can see in the recovery log). If it's present, you should be in permissive mode
 

☆KØŁØЯΛĐØ☆

Senior Member
Oct 20, 2016
196
98
0
Indianapolis
Okay, just pushed a change to fix one error but your header is messed up - the permissive entry is in there twice. I don't know if that's you issue or not but I'd recommend restoring original boot img (if you didn't make a back up, extract boot.img from your rom zip an flash img in twrp), then flash the zip.

The multiple entry thing wasn't from my zip though (I tested it to make sure it wouldn't do that).

All this does is add/remove the "androidboot.selinux=permissive" from your cmdline (which you can see in the recovery log). If it's present, you should be in permissive mode
Okay very cool. I appreciate you helpin me out bud. Will do that whenever I get home from work
 

☆KØŁØЯΛĐØ☆

Senior Member
Oct 20, 2016
196
98
0
Indianapolis
@Zackptg5 After various attempts, SELinux still remains Enforced. I must be doing something wrong & not noticing where. Would you mind giving me a run down on how to edit the cmdline? I know this is elementary but somethin is amiss here. Be it the tools I'm using, the distro, possible file extension error, or maybe I just haven't found the correct way to edit. I'm still learning but this sh*t is bugging the hell out of me.
 

Zackptg5

Recognized Developer
Sep 18, 2014
4,081
6,649
263
zackptg5.com
@Zackptg5 After various attempts, SELinux still remains Enforced. I must be doing something wrong & not noticing where. Would you mind giving me a run down on how to edit the cmdline? I know this is elementary but somethin is amiss here. Be it the tools I'm using, the distro, possible file extension error, or maybe I just haven't found the correct way to edit. I'm still learning but this sh*t is bugging the hell out of me.
If you look at the recovery lot, the last cmdline entry is what your cmdline headers are and in the last log you sent, you had the permissive line in there so I'm thinking that there might be something else in your rom setting it to enforcing. What room are you on?

You can edit the boot img on your PC, use osm0sis's image kitchen: https://forum.xda-developers.com/showthread.php?t=2073775
to unpack it. Then edit the boot.img-cmdline file in the split_img folder with a text editor.
Repack and flash boot.img in twrp
Editing it in the device itself is way more complicated (you can go through the zip for that)
 

☆KØŁØЯΛĐØ☆

Senior Member
Oct 20, 2016
196
98
0
Indianapolis
If you look at the recovery lot, the last cmdline entry is what your cmdline headers are and in the last log you sent, you had the permissive line in there so I'm thinking that there might be something else in your rom setting it to enforcing. What room are you on?

You can edit the boot img on your PC, use osm0sis's image kitchen: https://forum.xda-developers.com/showthread.php?t=2073775
to unpack it. Then edit the boot.img-cmdline file in the split_img folder with a text editor.
Repack and flash boot.img in twrp
Editing it in the device itself is way more complicated (you can go through the zip for that)
I'm not running any custom ROM. I am, however, rooted [obviously] with Magisk & have the boot.img patched but that shouldn't really make a difference. My system obviously has the ability to switch to permissive but I'm with you, I think something else is causing it to start enforced. Any ideas what it could be?
 
Last edited:

Zackptg5

Recognized Developer
Sep 18, 2014
4,081
6,649
263
zackptg5.com
I'm not running any custom ROM. I am, however, rooted [obviously] with Magisk & have the boot.img patched but that shouldn't really make a difference. My system obviously has the ability to switch to permissive but I'm with you, I think something else is causing it to start enforced. Any ideas what it could be?
Not really. Magisk hides permissive mode so it's worth checking magisk log to see any mention of that but it should still show up as permissive in terminal though
 

☆KØŁØЯΛĐØ☆

Senior Member
Oct 20, 2016
196
98
0
Indianapolis
Not really. Magisk hides permissive mode so it's worth checking magisk log to see any mention of that but it should still show up as permissive in terminal though
I edited the cmdline & removed the second permissive argument that you pointed out. However when I repacked it using the AIK-mobile, it sent me into a bootloop. Unsure what was at fault there but I did notice that the default.prop in the ramdisk had what appeared to be a symlink to the prop.default in the /system. Would editing that file (prop.default) to make it unsecure have any effect? Have been pondering that for about an hour now
 

S8Activelopers

New member
Mar 11, 2020
4
0
0
Austin, Texas
Just tried this on an S8 active (G892A) and got a message from AT&T saying they found unauthorized software on my phone and to take my phone into at&t. Tried flashing with Flashfire. I wonder if flashing w/ TWRP would make a difference.
 

Smil3yWulf

Senior Member
Jan 25, 2015
57
1
28
Its an Samsung SM-T280 tablet.. 5.1 android.when i go to to about on settings its says enforcing. I even try setenforce permissive. Then i do getenforce i get enforcing