FORUMS
Remove All Ads from XDA

[MOD] Kernel Permissive Patcher for Android

2,161 posts
Thanks Meter: 12,646
 
By AdrianDC, Recognized Developer on 24th November 2016, 03:02 PM
Post Reply Email Thread


Code:
#include <std_disclaimer.h>
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */


About the project
Kernel Permissive Patcher is born out of an idea to ease the development of ROMs.
Its purpose is to append the permissive flag to a kernel command-line,
in order to disable the kernel selinux security on boot without user changes.

The project implements the logic from the MultiROM injection (originally by Tasssadar),
finds the bootimage of your device (boot naming similar to Chainfire's boot detection),
and extends the cmdline with the permissive flag if required.

The project also uses my version of libbootimg to support Sony ELF bootimages.

The objective of Kernel Permissive Patcher is therefore to simply enable permissive
on a regular kernel for developers and users who would require it.

Developer no longer need to recompile or edit their bootimages with permissive settings,
nor do users need to perform a setenforce command on boot if they really need it.

The patcher needs to be flashed again after a ROM / bootimage update.

Downloads (Unlocked Bootloader only)
kernel_permissive_patcher.zip : https://github.com/AdrianDC/kernel_p...ve_patcher.zip


Other related useful projects
Android Bootimage ADB Unsecure Patcher - http://forum.xda-developers.com/-/-t3618558

Source code
Project sources - https://github.com/AdrianDC/kernel_permissive_patcher (branch master)
libbootimg sources - https://github.com/multirom-dev/libbootimg (branch master)
MultiROM sources - https://github.com/AdrianDC/multirom_core (branch master)


Kernel Permissive Patcher created also thanks to :
- Tasssadar for the original MultiROM sources
- The MultiROM-Dev team for our evolution of MultiROM
- Chainfire for the boot detection
- Everyone involved in testing it

XDA:DevDB Information
Kernel Permissive Patcher, Tool/Utility for all devices (see above for details)

Contributors
Adrian DC

Version Information
Status: No Longer Updated

Created 2016-11-24
Last Updated 2019-08-06
The Following 45 Users Say Thank You to AdrianDC For This Useful Post: [ View ]
 
 
24th November 2016, 03:02 PM |#2  
AdrianDC's Avatar
OP Recognized Developer
Flag Île-de-France
Thanks Meter: 12,646
 
More
Reserved
Changelog
Code:
Kernel Permissive Patcher - 20/12/2016
======================================
* Fix the 32/64 bits dual support

Kernel Permissive Patcher - 18/12/2016
======================================
* Added support for Sony Stock ELF (64 bits) bootimages
* libbootimg changes from my recent updates

Kernel Permissive Patcher - 27/11/2016
======================================
* Add support for newer Sony ELF partitions
* Allows to patch Stock Sony ROMs on the Xperia Z2
* Updated in collaboration with Alexander Diewald

Kernel Permissive Patcher - 24/11/2016
======================================
* Initial public release on XDA

Devices confirmed
Code:
Sony Xperia SP (Huashan)
Sony Xperia T/TX/V (Mint, Hayabusa, Tsubasa)
Sony Xperia L (Taoshan)
Sony Xperia Z2 (Sirius)
Sony Xperia X Performance (Dora)

OnePlus One (Bacon)
...
The Following 15 Users Say Thank You to AdrianDC For This Useful Post: [ View ]
24th November 2016, 04:09 PM |#3  
dic1911's Avatar
Senior Member
Thanks Meter: 757
 
More
Thanks, this is really useful in some situation
24th November 2016, 06:44 PM |#4  
roozbeh158's Avatar
Senior Member
Flag Gonbad-e Qabus
Thanks Meter: 240
 
More
Wat do work?


Sent from my Redmi Note 3 using Tapatalk
25th November 2016, 12:24 AM |#5  
dic1911's Avatar
Senior Member
Thanks Meter: 757
 
More
Quote:
Originally Posted by roozbeh158

Wat do work?


Sent from my Redmi Note 3 using Tapatalk

Seriously? Please try to read the OP, this is rather short than most other threads, if you don't understand what's this for, you probably won't need this.

Quote:
Originally Posted by Adrian DC

About the project

Kernel Permissive Patcher is born out of an idea to ease development of ROMs,
its purpose is to append the permissive flag to a kernel command-line,
in order to disable the kernel security on boot without user changes.

The project implements the logic from the MultiROM injection (originally by Tasssadar),
finds the boot image of your device (boot naming similar to Chainfire's boot detection),
and extends the cmdline with the permissive flag if required.

The project also uses my version of libbootimg to support Sony ELF bootimages.

The objective of Kernel Permissive Patcher is therefore to simply enable permissive
on a regular kernel for developers and users who would require it.

The patcher needs to be flashed again after a ROM / boot image update.

26th October 2017, 11:49 AM |#6  
rgadge's Avatar
Senior Member
Flag New Delhi
Thanks Meter: 45
 
More
Hello AdrianDC,
First of all, thank you for this wonderful MOD, I can set my phone running in permissive mode without rooting it.
I have BlackBerry work and for the same reason I'm not rooting my phone.
I have OnePlus One your MOD worked fine with LineageOS but with the version sultanxda's CAF version this mod won't keep the SELinux permissive.
Please suggest if there is a way to find the root cause and fix it?
Thank you in advance.
18th November 2017, 09:00 PM |#7  
aaron74's Avatar
Senior Member
Flag Somewhere, Ohio
Thanks Meter: 735
 
Donate to Me
More
Well this work on samsung kernels? Note4?
2nd January 2018, 07:46 AM |#8  
Junior Member
Thanks Meter: 1
 
More
i flashed your zip file with my galaxy j2(j2lte) exynos and its not working still on enforcing status
23rd January 2018, 06:42 AM |#9  
Eversmile23's Avatar
Senior Member
Flag Rourkela
Thanks Meter: 43
 
More
Post S-ON problem.
Can I do Operations which are possible when a device is with 'S-OFF', by flashing this zip? I have got HTC desire 10 Lifestyle, which is bootloader unlocked but 'S-ON'. For example, when I write something on to my '/system' partition, the files vanish after a reboot.
24th January 2018, 10:59 AM |#10  
dic1911's Avatar
Senior Member
Thanks Meter: 757
 
More
Quote:
Originally Posted by Eversmile23

Can I do Operations which are possible when a device is with 'S-OFF', by flashing this zip? I have got HTC desire 10 Lifestyle, which is bootloader unlocked but 'S-ON'. For example, when I write something on to my '/system' partition, the files vanish after a reboot.

Nope, having a permissive kernel won't change this behavior
The Following 2 Users Say Thank You to dic1911 For This Useful Post: [ View ] Gift dic1911 Ad-Free
26th January 2018, 07:22 AM |#11  
hdc8899's Avatar
Member
Flag HK
Thanks Meter: 2
 
More
no working on s7 edge
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes