yashsingh1/xdaforums huggingface dataset:
[Galaxy Note 4 Android Development (Snapdragon)] _alexndr:
No Phil, you're wrong. Selinux toggling is allowed even in ORIGINAL, untouched Samsung's sources :cool: Hint coming from Samsung's sources also:

// If build is user build [COLOR="Red"]and[/COLOR] enforce option is set, selinux is always enforcing

Word "and" should be read as logical && - we can still achieve false as final result, modifying just config files :cool:

In the attachment you can find all "sources" needed to enable selinux toggling. It is very interesting that [MENTION=3084245]Chenglu[/MENTION]'s change in selinuxfs.c is not required. No changes in the kernel's source code are required at all! You just need to compile the kernel from original sources using just different config + patched sepolicy in ramdisk of course.

And YES, it works in pure stock as well! You can try before you compile it yourself :)

>> KERNEL_N910FXXU1COI3_SELinux_toggle.tar.md5 << (related screenshots are in post #73)

BTW: I also highly recommend using kernel with original zImage, just with patched sepolicy. But if somebody REALLY need permissive kernel for some reasons - it is the best and the most secure solution, because the kernel is enforcing by default (for daily use) and permissive just "on demand"
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
I was aware of that flag, but didn't follow sources or try it after what I read about Android 5.1.1 code

Thanks for the tip, really. I will follow the code and if it looks like the correct option, I will compile one

However, since you did compile it already, it is useless I do the same.

When Samsung releases new updates, I will, while still providing the stock boot images with patched sepolicy

Thanks again for the feedback as I have no more time to follow up with sources
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
By the way, that flag is really removed in Android sources, only present in Samsung

I verified AOSP sources and that flag support is absent. Toggling SE is hard coded in kernel and init process which is disabled in any user build

The always permissive fix works even on latest M sources while the toggle option won't, so probably will be removed soon by Samsung

Anyway, it seems it should work with Samsung for now
[Galaxy Note 4 Android Development (Snapdragon)] cstratz:
Sorry, but can anybody tell me how NTFS (ntfs-3g) works? - I have seen it on the downloads, but I still do not know how I can use it to get access to my 1.7 TB OTG HD formatted with NTFS... I have used the Paragon app, but this does not work, though it tells me the kernel (v1.1) is permissive... Is there another app to use with "ntfs-3g" or shall I copy it somewhere into the root-folders of the Note 4? - And if so: where to?

---------- Post added at 23:15 ---------- Previous post was at 22:58 ----------

Sometimes a solution is very easy. Have you ever taken into consideration, that one of the files you have flashed is corrupt, or the file-system itself? (Sorry only an idea of a beginner...)
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
https://play.google.com/store/apps/details?id=eu.chainfire.stickmount
[Galaxy Note 4 Android Development (Snapdragon)] cstratz:
Great! ... "ST1750LM000 HN-M171RAD" Seagate 1.7 TB harddrive in "Anker® USB 3.0 & eSATA Hard Drive Enclosure for 9,5mm & 12,5mm 2,5 Zoll SATA-I, SATA-II, SATA-III HDD and SSD" successfully mounted with StickMount Pro. - Now plays full HD .AVIs and .MKVs! - What a day! :good::victory: - v2.0 of the kernel also works since about 2 hours! (Really seems to be a bit quicker than v1.1.) I am very excited! You have made me (and many other people too) very happy, Phil!
[Galaxy Note 4 Android Development (Snapdragon)] seavers11:
Which kernel did i need when want to use Viper4android?
[Galaxy Note 4 Android Development (Snapdragon)] yussuf007:
Permissive or enforced whit dr ketan patch
[Galaxy Note 4 Android Development (Snapdragon)] thay:
You need to run kernel with permissive mode
[Galaxy Note 4 Android Development (Snapdragon)] seavers11:
Which Dr. Ketan Patch?
[Galaxy Note 4 Android Development (Snapdragon)] yussuf007:
In the thems and apps forum you will find, but here is a link http://xdaforums.com/note-4/themes-apps/viper-sound-mode-stock-kernel-t3157772
[Galaxy Note 4 Android Development (Snapdragon)] mocassino:
anyone knows if there's a base rom with the rooted enforced kernel?

I would love a simply deodexed rom with that one!

:o
[Galaxy Note 4 Android Development (Snapdragon)] yussuf007:
Alexenders have but atm it use a permissive kernel i think, but flash it and then flash the enforced kernel and last one flash superSU 2.52
[Galaxy Note 4 Android Development (Snapdragon)] _alexndr:
Exact post containing DL link to the latest, recommended deodexed version:

http://xdaforums.com/showthread.php?p=63234985

Updating SuperSU is not mandatory as it contains SuperSU 2.50 and patched enforcing kernel already
[Galaxy Note 4 Android Development (Snapdragon)] nemkate:
Is it for Emotroid ROM?
[Galaxy Note 4 Android Development (Snapdragon)] user2k10:
I have a N910F running STOCK 4.4.4, is there a modified kernel that I can use with this android version, or the above files?

If not what other options do I have, I can flash from recovery the CF-autoroot for 4.4.4, but then I will have knox errors when booting?

Thanks!
[Galaxy Note 4 Android Development (Snapdragon)] yussuf007:
Thx to correcting me.
[Galaxy Note 4 Android Development (Snapdragon)] Vuska:
With this kernel... permissive one. Can i change the rate of usb charging ?
[Galaxy Note 4 Android Development (Snapdragon)] yussuf007:
Can you change the charging rate in stock kernel? I think no.

And now come the suprise its an stock kernel.
[Galaxy Note 4 Android Development (Snapdragon)] Joey2o11:
aaaa
[Galaxy Note 4 Android Development (Snapdragon)] KeTuRr74:
Sorry for noob question but as i understand i need to :

Flash TWRP or another recovery with Odin

Boot into recovery and flash SuperSU

Flash the Kernel COI3 Permissive from recovery

Reboot

This is right ?
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
To be sure what causes an issue, if it happens :

- flash kernel in odin or custom recovery

- reboot

- all ok?

- flash superSU 2.52 in custom recovery
[Galaxy Note 4 Android Development (Snapdragon)] KeTuRr74:
This is because i got my Note 4 today and updated it to 5.1.1 grrr

And i only dont want to brick as its the first time that i do something different for rooting this one. Actually i always use CF Auto Root but as i cant, i wanted to be sure these steps are right. Thanks anyway
[Galaxy Note 4 Android Development (Snapdragon)] dellabest:
Hi [MENTION=4666971]Phil3759[/MENTION],

How can I use your Enforced Kernel with Kyubi N5 Port? for example I have tried to flash it but I've lost baseband, no signal and auto reboot after some minutes.

Can you help me?

Thank you

Edit: I have already updated SuperSU at v.2.52 obviously
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
Anything needing root or permissive selinux goes in corresponding app dev. Apps need to upgrade to support root on enforced kernels with 5.1.1 and even more with Marshallow
[Galaxy Note 4 Android Development (Snapdragon)] dellabest:
But I haven't apps that require root at the moment, ROM has just been installed. Why the baseband?

With alexndr DevBase I haven't issues
[Galaxy Note 4 Android Development (Snapdragon)] ali.ali0770:
Is this kernel work on N910G on 5.1.1 ???
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
the enforcing kernel is just the stock bootimage, nothing changed
[Galaxy Note 4 Android Development (Snapdragon)] dellabest:
Maybe I wasn't so clear.

BTW, Is it possible to make your Enforced Kernel compatible with Kyubi N5 Port?

Thank you
[Galaxy Note 4 Android Development (Snapdragon)] pt.jcosta:
which the kernel difference enforced for permissive? I install any of them on my 910F with rom kyubi? in which one can have better battery life?

Thanks...
[Galaxy Note 4 Android Development (Snapdragon)] Crimsonthunder:
All have the same battery life because they are pure stock besides the Selinux and root implementation.
[Galaxy Note 4 Android Development (Snapdragon)] pt.jcosta:
which the kernel difference enforced for permissive?
[Galaxy Note 4 Android Development (Snapdragon)] Jeddix:
I know that english is not your primary language but the differences are pretty much the first thing that you see if you would read the first post in this thread ;).
[Galaxy Note 4 Android Development (Snapdragon)] sefrcoko:
Selinux is like a security policy. Enforcing the policy means the device is basically more secure -- permissive is less secure.
[Galaxy Note 4 Android Development (Snapdragon)] Sushilstps:
This method also worked for me.
[Galaxy Note 4 Android Development (Snapdragon)] Xokoz:
[MENTION=4666971]Phil3759[/MENTION] COJ3 is released, are u gonna build kernel for that?:D
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
can you provide a fast download link for German firmware :)
[Galaxy Note 4 Android Development (Snapdragon)] rambo21es:
deleted
[Galaxy Note 4 Android Development (Snapdragon)] jagnik:
will this kernel work on sm-n910g ?
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
it is a modified tar.md5 with modified and pre-rooted system. You should know what you post

Anyone can provide a proper fast link, with original FULL firmware?

I won't download anything not official or packed in modified packages as these are meant to be spread and people do trust my builds!

edit: found what I need, don't bother
[Galaxy Note 4 Android Development (Snapdragon)] Vuska:
[MENTION=4666971]Phil3759[/MENTION] : Can v2 work with N910G ?
[Galaxy Note 4 Android Development (Snapdragon)] rambo21es:
Sorry, I saw that link in a known Spanish forum and I thought it was the original one.

I've deleted the links of my post, if you want, you can delete them in your quote.
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
Updated to COJ3

Check OP for download links
[Galaxy Note 4 Android Development (Snapdragon)] egonet:
Is there a difference beetween stock enforced BOJ3 kernel from this thread and from [MENTION=5150393]_alexndr[/MENTION]'s DevBase repository?

https://www.androidfilehost.com/?w=files&flid=41293

I have downloaded KERNEL_N910FXXU1COJ3_Stock_patched.zip 2 days ago to root my stock N910FXXU1COJ3_N910FOXA1COJ3_DBT firmware with SperSu 2.52. Everything works well in enforcing mode, including private mode

Is it worth to update it to this one?
[Galaxy Note 4 Android Development (Snapdragon)] ivanox1972:
Hi, I need help to avoid bootloop...

I have stock not rooted coi3 and no recovery...

What steps to perform and how?

1. root then recovery

2. recovery then root

please give me instructions what order is ok and how to install

I have done...
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
post 2
[Galaxy Note 4 Android Development (Snapdragon)] theresident:
And which recovery? I just saw TWRP for N4 until now. Is there a CWM based recovery?
[Galaxy Note 4 Android Development (Snapdragon)] AMoosa:
It installed find with TWRP for me.
[Galaxy Note 4 Android Development (Snapdragon)] Dean-xXx:
[MENTION=4666971]Phil3759[/MENTION]

Any chance for the permissive COJ3?
[Galaxy Note 4 Android Development (Snapdragon)] _alexndr:
I needed stock enforced kernel Oct-28-2015 (to put in COJ3 DevBase) so I did it myself. AFAIK we are using same method to patch sepolicy:

http://xdaforums.com/apps/supersu/wip-android-6-0-marshmellow-t3219344

It is not possible until Samsung will release COJ3 kernel sources. At this moment the newest are COI3, unfortunately...

http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=n910f
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
For sources, I guess there are very little changes kernel wise, if any relevant...

For the method:

- I use xiaolu mkboot tools under Ubuntu to unpack/repack

- I patch the sepolicy on a Galaxy S4 Qualcomm (i9505) with 4.4.2 and ensure permissions are correctly set when manually replacing policy file

No other changes.

If we are doing the same, I won't necessarily update this thread until I need to update ROM for my country my self.

If it was me, I wouldn't have updated since COH4 (my ROM). I am not a ROM flasher and any 5.1.1 kernel is perfectly exchangeable with any 5.1.1 stock ROM for now, so people shouldn't really care that much

People should remember that newer is not always better and if it is working, better let it, at least for business use. Not the majority of geek members on xda though...
[Galaxy Note 4 Android Development (Snapdragon)] _alexndr:
So method is exactly the same (as it does not matter which device we use to patch if it has same architecture and 32 bit Android)

IMHO: For bussiness use I would highly recommend update to COJ3 as it is critical security update (Stagefright fix). See here (especially attachment in post #1147):

http://xdaforums.com/showthread.php?p=63529246

... and then check your ROM using Stagefright Detector ;)
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
I thought this was fixed with any 5.1.1 Android release.

Also, all other Stagefright detectors show system is safe, except the Zimperium version you linked which shows two lib vulnerabilities!
[Galaxy Note 4 Android Development (Snapdragon)] misulik79:
I'm in COI3 and it's not fixed
[Galaxy Note 4 Android Development (Snapdragon)] Crimsonthunder:
Deleted.
[Galaxy Note 4 Android Development (Snapdragon)] Jeddix:
Update to COJ3 ;)
[Galaxy Note 4 Android Development (Snapdragon)] carlinho77:
Hi [MENTION=4666971]Phil3759[/MENTION], why there isn't the Permessive version for COJ3 ?

Thanks.
[Galaxy Note 4 Android Development (Snapdragon)] Dedzdedz:
Hey guys will this kernel work with stock rom?

Sent from my non rooted SM-N910F

32GB Samsung SDcard

Spigen silver tough Armor

Ex Smart Ultra 6 (1 month)

Ex Note 2 N7100

Ex note 2 N7105

Ex a whole lot of androids
[Galaxy Note 4 Android Development (Snapdragon)] glowerita:
Of course! It's based on stock kernel. :)
[Galaxy Note 4 Android Development (Snapdragon)] Dedzdedz:
Thank you :)

Sent from my non rooted SM-N910F

32GB Samsung SDcard

Spigen silver tough Armor

Ex Smart Ultra 6 (1 month)

Ex Note 2 N7100

Ex note 2 N7105

Ex a whole lot of androids
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
Added Permissive COJ3. Compiled from latest COJ3 Samsung sources + repack with corresponding COJ3 ramdisk

By the way, it is a waste of time. There are quiet no changes since COH4 at kernel and ramdisk level

Probably most relevant changes are in the ROM
[Galaxy Note 4 Android Development (Snapdragon)] Vuska:
Already try COJ3 permissive, it work on N910G

But i test with stagefright... there's one Vulnerable.

How to fix that ?
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
Are you on COJ3 ROM too in addition to kernel?

Only COJ3 ROM fixed the last 2 vulnerabilities left in COI3. I doubt it is kernel related as no relevant changes in kernel are present

First you need teh COJ3 whole ROM.

Now, try enforced COJ3 kernel with Stagefright detector. If it is secured and when you switch to the permissive one it fails, there are 2 possibilities:

- selinux is needed for a complete protection

- samsung didn't release the complete COJ3 sources

I opted to not release the SE toggle kernel as most users won't understand how to use it. Also, if you need an app with permissive rights, chances are it is a start on boot app and you'll need an init.d script to toggle to permissive mode

People needing the toggle should be able to compile the kernel themselves or use a custom one from another source
[Galaxy Note 4 Android Development (Snapdragon)] Battlehero:
[MENTION=4666971]Phil3759[/MENTION]

Hi,

Would it be possible for me to include your kernel in our Kyubi ROM port, with the appropriate credits?

Kind regards, Battlehero.
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
Sure, and it is valid for any dev wanting to include it
[Galaxy Note 4 Android Development (Snapdragon)] mpcjanssen:
In the faq it refers to post 1 for WiFi password issues. Maybe i am blind but i can't see anything explaining it or mentioning a fix.
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
Fixed in the FAQ

You shouldn't have issues with v2.0 kernels as the property is enabled in boot image ramdisk
[Galaxy Note 4 Android Development (Snapdragon)] therohanchawla:
This doesn't work on n910g...Gives an error saying that this is for trlte, trltexx not trltedt......

Would really appreciate a version for 910g....

Thanks in advance
[Galaxy Note 4 Android Development (Snapdragon)] Vuska:
I'm using N910G with dr.ketan L12... it's work.
[Galaxy Note 4 Android Development (Snapdragon)] therohanchawla:
Thanks for the reply...... But I try to flash i get the error every time....

How did you manage to flash odin or twrp.??

Would be thankful if you help me out

I am on stock TW rom....
[Galaxy Note 4 Android Development (Snapdragon)] Vuska:
I'm flashing by CWM from Cheng lu *as dr.ketan rom referenced*

No other special steps.

Dr.Ketan Rom is TW base.. but it mod to S6. *that's why you see i post from N920G
[Galaxy Note 4 Android Development (Snapdragon)] therohanchawla:
Flashed fine with CWM recovery.... Thanks for the tip
[Galaxy Note 4 Android Development (Snapdragon)] misulik79:
Hi. Can I flash the Root Permissive stock kernel with Odin and after that flash cf auto root from Odin?
[Galaxy Note 4 Android Development (Snapdragon)] therohanchawla:
AFAIK.... CF auto root has no version for 5.1.1....
[Galaxy Note 4 Android Development (Snapdragon)] Joey2o11:
I've been using the enforced kernel for a few months now without issue, until yesterday. I was prompted to download a security policy update, i've got them before so thought nothing of it and installed it. Turned phone on this morning and it now just boot loops, clearing cache didn't fix it. Figuring that the update knackered my phone, i reinstalled stock N910FXXU1COI3 rom and normal service was resumed. Happy days, so i then installed TWRP and flashed the enforced kernel and SuperSU 2.5.2 and rebooted. Now i'm back boot looping again. Does anyone more knowledgeable than me have any idea what the problem could be?
[Galaxy Note 4 Android Development (Snapdragon)] sefrcoko:
Same thing happened with me. I suspect the latest security policy update plugged the vulnerability exploited by supersu...
[Galaxy Note 4 Android Development (Snapdragon)] Joey2o11:
Ah damn it we shouldn't have installed it, wonder if there's a way to flash the old security policy. Then if we're prompted again decline the update

Update:

Tried wiping the updates as per this guide http://pocketnow.com/2014/10/21/samsung-galaxy-security-policy-update, then reflashed kernel let TWRP install supersu on reboot and.... bootloop :( I didn't see a supersu success message before it rebooted so i'm not convinced it installed. I've posted in the SuperSU beta thread to see if anyone there has any ideas http://xdaforums.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133/page290#post63907201
[Galaxy Note 4 Android Development (Snapdragon)] alandd86:
edited :D sorry found it

---------- Post added at 04:04 PM ---------- Previous post was at 03:20 PM ----------

i added the last line but still failed to connect :(

http://postimg.org/image/s5fz2simd/
[Galaxy Note 4 Android Development (Snapdragon)] Joey2o11:
At Phil3759's suggestion i updated to the latest COJ3 firmware. I flashed the ROM, then TWRP, installed the enforced Kernel and used the install root on reboot option in TWRP, result.. bootloop. Back into recovery mode and installed SuperSU 2.52 zip file, that fixed the bootloop, i'm now rooted again :) It would appear the root on reboot option in TWRP doesn't work.
[Galaxy Note 4 Android Development (Snapdragon)] cstratz:
Also sudden death/bootloops with Note 10.1 2014 (permissive kernel)!

Seems, that Samsung has deactivated all permissive kernels on all Samsung devices 'over night',

with a security-policy update. If you have no backup: all data lost after first reboot! ...

Great Samsung! ... "Hacked by Samsung" ... text, missed on boot

(Enforced kernel, from here on my Note 4, still works.)
[Galaxy Note 4 Android Development (Snapdragon)] Joey2o11:
Now i'm back up and running again i've disabled the security policy auto update to stop it from happening again.
[Galaxy Note 4 Android Development (Snapdragon)] melina123:
How can I enable or install kcal controls on this kernel thx.
[Galaxy Note 4 Android Development (Snapdragon)] Crimsonthunder:
You can't. This feature has to be baked into the kernel. But this one is root enabled stock with zero features.
[Galaxy Note 4 Android Development (Snapdragon)] Ignition75:
Yep that's me, lost all data on first flash lol...

Sigh... :rolleyes:
[Galaxy Note 4 Android Development (Snapdragon)] Dolphin87:
I m new here

Can i use this kernel with 5.1.1 cok2/cok1 build ?
[Galaxy Note 4 Android Development (Snapdragon)] Ignition75:
Do I need to pay some money for the Mega link to start downloading? Been trying for about 24 hours now.

This is the only way I can bring my phone back by flashing this kernel through Odin, I'm stuck in stock recovery unable to do anything.
[Galaxy Note 4 Android Development (Snapdragon)] Crimsonthunder:
Load the Mega desktop page or download the Mega app through play store. You don't have to pay for anything.
[Galaxy Note 4 Android Development (Snapdragon)] cstratz:
N910F-Stock_Kernel_XXU1COJ3_Root_Enforced-PhilZ.zip

works on German Note 4 N910F with latest (DBT-) Firmware: N910FXXS1COK2

Deactivate (for to prevent automatically update of security permissions by Samsung) automatic update of security guidelines within security-settings, if you like. - This is for to be sure, that

this update will not cause bootloops, like in permissive kernel of many Samsung devices, during the last weeks. - I have not tested yet, if the update makes any changes to the N910FXXS1COK2

firmware, or to the (elder-) XXU1COJ3 kernel, from this thread... But will test that later, after having made a Nandroid backup first.

- update Firmware (e.g. with Kies 3)

- flash TWRP v2.8.7.0

- flash kernel (ZIP above) and SuperSU v2.52 beta (both together) with TWRP

- restart

- most of previously frozen apps are still frozen

- freeze/uninstall Knox (and KLMS agent) with Titanium, if you like, also freeze SecurityLogAgent, if still on your device (on my N910F it is away, probably because I have uninstalled it)

- on my device I did not need to edit /system/build.prop again, after this latest firmware-update

- use "NextApp SDFix" (-again) to remove write-protection on extSDCard
[Galaxy Note 4 Android Development (Snapdragon)] jagnik:
Can i use kernel on 910G ?
[Galaxy Note 4 Android Development (Snapdragon)] theresident:
So, without this kernel i can't root my N4 ( with 2.50 version of course)?

And can somebody give me link for CWM recovery,pls?
[Galaxy Note 4 Android Development (Snapdragon)] Rajada:
You can use any other kernel, since it have one patch to boot your rooted phone

There is life outside xda
[Galaxy Note 4 Android Development (Snapdragon)] _alexndr:
[MENTION=4666971]Phil3759[/MENTION]

I suppose you are very busy man, so feel free to add this link to the first page :good:

https://www.androidfilehost.com/?w=files&flid=45166
[Galaxy Note 4 Android Development (Snapdragon)] Phil3759:
Added to second post with download link

I just didn't find any useful extras in COK2, so skipped it

Furthermore, Chainfire is planning to drop support for 2.52 versions, that is system with sepolicy patching

So probably these has no future
[Galaxy Note 4 Android Development (Snapdragon)] srinathmc:
Does this kernel work for note 4 n910g
[Galaxy Note 4 Android Development (Snapdragon)] Dean-xXx:
COK2 sources have been released few hours ago.
[Galaxy Note 4 Android Development (Snapdragon)] Rajada:
COJ3 and COK2 are the same changelist, that means is the same kernel with the same sources. Total waste of time.

We are still awaiting sources of pok2