yashsingh1/xdaforums huggingface dataset:
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
great kernel really enjoy all the awesomeness that it does with my zerolemon on my s3

my question is about selinux i've been trying to figure out how to set it to permissive but i haven't had any luck everywhere i've read they have mentioned using the selinux changer from the app store i've tried that but no luck

is there something I'm missing here? or can it not be done on 4.4 roms/kernels?

i'm using Quantum with this kernel
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Perseus:
I was under the impression that this was a Rom to Kernel issue. KT had changed in one of the prior KK version to passive only. I have since then tried 2 different KK roms and never had this issue.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] UnXKnown0:
EDIT

Create a text file with no extension and name it 00SELinux and insert it into system/etc/init.d with permissions 755 or rwxr-xr-x then reboot and check the setting to make sure. It always worked for KT on any ROM but It doesn't work on quantum(any ROM) for whatever reason.

#!/system/bin/sh

# SELinux Permissive

setenforce 0

getenforce 0
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] MrBrady:
Did a clean install of C-Rom 6.6 with the 5/13 KT kernel on my D2VZW. Are these stats good for a first day run?
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Perseus:
It depends on your usage pattern. For heavy usage, that sounds about right.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
I might need to hunt down that version. I've tried two different roms so far no luck getting SElinux to switch to permissive. From what I read it isn't possible.

Any other details you might be able to provide on the one that was set to passive?

You also mentioned two different kk roms could you provide names wouldn't mind checking them out.

When I go into settings about phone and scroll to the button the selinux option still says enforcing

Thanks! I gave it a try on quantum just for kicks like you said no go. I also loaded up TASK AOKP latest build and no luck using kt and the script you providing.

If anyone has anything else I'm interested in giving it a try.

Do you have SELinux running in permissive on your current rom? If so could you let me know which rom it is?
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] polobunny:
Just dropping in, but the disparity between your results and other people results might be because of Knox state. Shouldn't be an issue to set SELinux to permissive with a knox-free bootloader, but with a knox-enabled bootloader it might be a different situation.

Good luck!
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
ahhhh okay i will look into updating my bootloader thanks for the tidbit
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Perseus:
Be Careful. Flashing older Bootloader will brick your phone. You may want to try SlimKat or C-Rom.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
cool i'll give those a go
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] polobunny:
As Perseus71 noted, flashing an older bootloader will result in a brick! I was just citing a possible reason why this could happen, not anything factual/tested/verified.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
oh i agree the fun part now is trying to find the right links to upgrade my bootloader :-\

i tried a hand full of roms yesterday evening no good on selinux being set to permissive
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] polobunny:
Check your bootloader version with Device Info and report here

https://play.google.com/store/apps/details?id=com.jphilli85.deviceinfo
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
so what I think I would like to do is flash the mjb bootloader with Knox disabled and selinux set to permissive then flash a new rom

I think I saw the files just need to hunt them down the files I thought I saw them the other day
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] polobunny:
wait wait wait wait wait

If you have LK3, there is no Knox in the bootloader, so it can't be that stopping you from setting SELinux to permissive!

Don't flash MJB, once you go there, you can't go back. Ever. In no way.

Edit: Is there a reason why you want SELinux to be set on permissive so bad?

Also I believe that's a ROM related issue, not really kernel related, so that's not the right thread for this.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Perseus:
I'd report this on the Rom's thread as this is partly their code as well. Are you willing to try other Roms as one of the work arounds ? Other Roms do not have this issue per se.

[MENTION=4325945]ktoonsez[/MENTION] had in past turned on SELINUX Passive for this reason. He had not done so since no one reported it. I am not sure if he is willing or plans to do so. If the SELINUX Mode Changer is not helping, I doubt any bootloader changes would help. If you choose to update your bootloader, do note it makes you open to the dreaded Warranty Bit. My bootloader has been MD5 ever since that update to 4.2 came out. I have never updated my bootloader and everything has been working great. (I do not intend to update my bootloader for any reason)
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
Lol okay I'm super lost then

---------- Post added at 02:39 PM ---------- Previous post was at 02:34 PM ----------

i reinstalled quantum out of frustration this morning just to get my phone back to a usable state

i'm willing to try different roms i tried 3 different kitkat roms last night

slimkat, validus, aokp all had selinux set to permissive

as long as it kitkat will work with app radio unchained and selinux is permissive mode i will run it
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Perseus:
I have C-Rom but have used SlimKat Extensively. What app is giving you issues due to SELinux ?
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
ah okay let me try something else i forgot to make that 00SELinux file when I did slimkat last night i just reinstalled it and going to set it up now

the program i'm trying to run is appradio unchained based on what I've read in the thread selinux needs to be set to permissive mode in order for the appradio device to communicate from the 7in captivate touchscreen back to the phone via bluetooth and mhl

if your interested is peaked check out appradio unchained here

http://xdaforums.com/showthread.php?t=2451980

---------- Post added at 03:53 PM ---------- Previous post was at 03:41 PM ----------

Yea still no luck
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] polobunny:
getenforce needs no parameter, it's to get the status of SELinux

setenforce 0 sets SELinux to permissive, but needs to be su, plus you need to make sure your init.d scripts are being ran.

Open terminal emulator (not through ADB), type su and press enter, type setenforce 0 then press enter, then type getenforce and see if it tells you it's set to permissive.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
Okay this is what I'm getting in terminal
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] polobunny:
Okay. Well that's why it's not working then. However I'm not sure at this point if it's a kernel issue or ROM issue to be honest.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Perseus:
Please take a Nandroid first. Then do a factory Reset and then flash SlimKat with the Gapps. Wipe Dalvik+Cache. Do not flash this kernel. Try your app. Post back here the results.

Honestly speaking, the app Developer needs to honestly update their code to take into consideration SELINUX. If the app isn't working then it isn't the Kernel or Rom's issue per se. It really should be at App level.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
ha yea this is the issue i've run into on a few roms

yea i feel the same but i dunno how to go about saying that with out sounding like an a$$hole

update your app!! but that's rude and unappreciated to me though :-|

i wanted to send over the article that chainfire put together but i figured I would look into a solution on my own

I'll do a factory reset on this one though won't add KT to it and see how it acts.

Fellas I really appreciate the help allowing me to pick your brains with this topic. I will keep you posted on what I come up with.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] polobunny:
I'm not sure it's feasible to circumvent the limitations of SELinux in this case sadly, which makes his plead somewhat... useless. :p worth a shot anyway, or maybe someone else ran into a similar issue who knows.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Perseus:
Google themselves have appealed to the develoeprs to update the apps to Kitkat Compatible. Perhaps that'd help. I'd present my SELINUX problem to them and ask for their help on that.

That's precisely the point. Google has delibaretely introduced SELINUX and Session enforcement so bad programming habits will be curbed and app data must stay in one place not all over your phone.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
looks like back to the drawing board i asked the developer of the app he's using a kitkat on a nexus4, selinux is enforcing application works fine for him just needs root permission. he believe it's a samsung related issue

http://xdaforums.com/showpost.php?p=53018680&postcount=4917

so now i'm in limbo

i do find it odd that if i try to run setenforce 0 from terminal it gives me error messages i guess i can dig into that see what turns up from that

down the rabbit hole i go...
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Perseus:
Did you Try the file from this Suggestion ? Or my Suggestion on changes to init.rc ?(You'd have to check if the changes persist a reboot)
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] DocHoliday77:
Ok, that was a lot to read to try and catch up, so forgive me if this is already covered.

But as for the SElinux issues you are having, im half suspecting it could be the firmware. You said you are on an older build right? SElinux wasnt introduced until the 4.3 firmware, so maybe updating would help.

Im assuming everyone else has theirs set to permissive, which would mean the kernel isnt the issue. And if its happening on every rom you try, but no one else has brought it up, I would be lead to believe its not the roms either. The only thing left then would be the firmware.

Of course I could be wrong, but in my experience if the kernel is done correctly, it will either show permissive, or not at all. The kt kernel does set to permissive for everyone else, right?
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
I do agree with your take it on it I don't mind flashing back to stock and starting with a clean slate. I'm just having trouble finding the right tarball to flash.

I'm thinking that when I got the phone I rooted it installed twrp backed up my rom then started flashing different 4.4 roms. I don't recall disabling anything related to Knox or SELinux

---------- Post added at 02:02 AM ---------- Previous post was at 01:46 AM ----------

Yea I made the file and updated it based on your last comment about it

Did a reboot still no luck on that front.

If I modify the init.rc file would I just add a line at the bottom to do setenforce 0 or do I point to the 00SELinix script?
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] DocHoliday77:
If you cant find the firmware here, go to sammobile.com/firmwares.

Youll need to make an account but they have much better download speeds than samsung-updates.com.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
Looking into this now
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Perseus:
For me, SELINUX has always been Set to Enforced with KT747. Both C-Rom or SlimKat have the same experience. The Mode changer does not work either.

Don't point to the script. The Script will get executed on its own. for the setenforce line, search if it exists already. Only if it does not exist, then you add it at bottom. If it does exist, you modify it.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
ah okay yea your in the boat i'm in also but selinux isn't something you need disabled

i added the setenforce line into the init.rc script and still no dice

my wife is on 4.3 with her sgs3 she's set in permissive mode on want to update her to kitkat and see if the issue i have comes up on hers but that's another project

just got kicks i have my work phone sgs1 cappy running 4.4 downloaded and installed the selinux mode changer app and set to permissive and it worked just fine. so testing out on the wife's phone sounds like a possiblity for the weekend

will keep you all posted with what i find out

again thank for the help and the ideas

always fun to pick peoples minds and not get trolled
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] DocHoliday77:
Oh ok. So it is the kernel then. Sorry, I dont use aosp/cm out of personal preference so im not familiar with these kernels. Ill download it and disable SElinux to see if that helps. Ill try to get it done within the next hour or so.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] DocHoliday77:
Ok, I've got two things you can try.

First try using the init.d script I have attached. Just change .txt to .sh and copy into your init.d folder and set permissions. Reboot and check selinux status.

If that doesn't work, then delete the script and try flashing the kernel. To be completely honest, I am not sure if the change I made will be enough. I know how to easily do it in the TW kernel, but in AOSP it is a little different. I seriously doubt the change I made will have any negative effect on booting up, but as always, I cannot guarantee and you flash at your own risk!

I did try to find some information online, but came up with nothing. It was a little disappointing, but in several threads I came across where people were asking for help with the same thing, the only answers they got were "why would you want to do that???", or "theres no good reason for you to do that", or "its just not necessasary"! I found it disappointing because it reminded me of when I got my first iPod (my first and last Apple product ever!). I went on some forums to see if it were possible to overclock, or make other changes, and the only responses I could get were the exact same things!

Honestly and IMO, "because I want to, and its my device" is all the reason anyone should need! Anyway, I didn't have the time to do much more searching, (didn't see any permissive aosp kernels around either, though I'm sure there must be some out there), so I just made the change that I know about and repackaged.

Sorry for the mini-rant! I hope one of these helps though! Good Luck! :cowboy:
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] ktoonsez:
Guys. Let me know if doc's kernel mod works. I have given it a try a fee times myself when I was bored and no luck. About a month ago CM just stopped responding to selinux changes. Even the simple command of setenforce 0 doesn't work anymore. Have not had the time to see what has changed in selinux to stop modifications and to be honest it does not interfere with anything, at least for me.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] DocHoliday77:
The more I think about it the more im hoping the script works! The only thing I changed was the reload_policy value in init.rc, but id be quite surprised to hear no one else has tried that before.

The script, if I did it right, should change the value in /sys/fs/selinux/enforce from 1 to 0.

Ive also seen where someone used a different command instead of setenforce. Ill try to find it again a little later and will post it in case anyone wants to try it out.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] polobunny:
Sorry for the big quote, but just want to say you don't need to rename the script to .sh for it to be ran. Can even have no extension. ;)
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
alright everyone this is what i've done so far

odin back to stock dlk3

reinstalled multiple 4.4.2 roms along with kt permissive mode from DocHoliday no good on that front still was unable to get selinux to switch to permissive

also tried the script no luck with that either

seems like this is a sgs3 4.4.2 issue

just for giggles i install slimkat 4.3.1 comes right up with permissive mode disabled by default on the default kernel that it comes with

this is pretty interesting

i'm open to more ideas for testing i'm making a backup of the 4.3.1 slimkat

thanks again everyone [MENTION=4081205]DocHoliday77[/MENTION] i know exactly how you feel i had a bit of that happen to me a long time ago on xda kinda been in the shadow till recently you guys have definitely been seeing how xda used to be i'm sure it was a bad patch that i got missed up with that's not the case with you all
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] DocHoliday77:
I know. I almost always use the .sh though, just because it makes it easy to tap on it to execute if I so choose for whatever reason.

If you care to check, can you reboot with that script and then open and check /sys/fs/selinux/enforce? If the script worked it should say 0. If it says 1, can you manually execute it and check again?
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
just gave a go on slimkat 4.4.2 still no good selinux still reports back as enforcing also checked the /sys/fs/selinux/enforcing file still reports back 1
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] mrrocketdog:
cm 4.3 also. maybe same trees or something ? IDK !?!

err on the side of kindness
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] ktoonsez:
The script does not work, tried that a month ago and again today.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] DocHoliday77:
Id be surprised if anything i come up with hadnt been tried already, but you never know for sure! Ill try a couple of things later tonight. Shoulda checked this first but at least on TW the sys folders permissions are only r-xr-xr-x. Maybe using chmod within the script to first make it writable... What do you think? Im guessing its been tried as well?
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] ktoonsez:
Ya, I tried setting it to 777 permissions and still nothing.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] DocHoliday77:
Ugh....demonic....LOL! <- that's what my auto correct replaced selinux with!

Anyway, I'm all for a more secure platform, but not at the expense of the freedom we've come to enjoy so much! Read in the portal yesterday that its only going to get worse too....

Thanks for letting me know that you tried that though. Kinda figured you did, but knowing for sure saves the extra work. I highly doubt ill be able to do much more to try and help with this though. My skills with kernels are quite limited and if you guys haven't been able to figure this out, I have very high doubts I'd be able to do so! If I do think of or find anything else ill still mention it just in case though.

Sorry I've not been able to do more! And thanks again ktoonsez for everything you do, but especially for making my Sprint KK Port such a success!!! :cowboy:
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] matrixzone:
[MENTION=4325945]ktoonsez[/MENTION]

Major kernel changes in the last couple of nightlies. Hope to see your magic again
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Nico3d3:
Yep, let's hope we'll have a new version soon with latest CM commit cause the 05/13/14 version doesn't work with the latest Nightly.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] berryman13:
please :)
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Phazonclash:
Android without KT747 isn't the same... my battery life isn't as good... my phone isn't as smooth... it lacks many kernel "tweaks", settings, optimizations...

Let's hope it will get updated :D
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] sdlopez83:
Would be awesome if you could hook us up again kt.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Danvdh:
patients guys, he's well aware :cowboy:

these things take time
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] talkingmonkeys:
Yea ktoonsez just wanted to say thank you also for the 3.4 kernel for tw. Awesome job man!
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Nico3d3:
It's all right, we can wait, at least we can use LeanKernel for now, it just got updated.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] ktoonsez:
Well that was a big old mess to sift thru!!!!!!!!! So Ill call this download a test just to make sure its all OK:

Download:

http://goo.gl/xrtgeY

Let me know :good:
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] MrBrady:
The kernel builds are not unified, correct? No D2LTE? So I couldn't flash this on my D2VZW?

Thanks for keeping this alive!
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] adrock74:
No display on new release. I can hear it unlock and lock, but nothing else
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] gomisensei:
Definitely boots and shows video now. ty
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Nico3d3:
Just flashed it on CM11 06-02 Nighly and everything work fine for now.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] adrock74:
Ive tried 3 times, re-downloaded, still nothing. it does boot as I can hear audio. Just no screen, Running Validus 5.2
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] gomisensei:
Are you sure you downloaded the fixed version from 5 or 6 posts up? We were all having that problem with the one from the download page, but then the test version KT posted worked for some of us. The problem was only with the latest nightlies of CM11.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] adrock74:
Yeah that was the one I used. I'm guessing it may be rom compatability idk
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] gomisensei:
That file was specifically to fix a problem between latest cm11 nightlies and the 5-13 kernel, where the video didn't work on boot.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] matrixzone:
Which ROM you are using? Think the latest test kernel will only work with CM ROM built after 6/1 and Slim 6/2. Can't confirm for other ROM's like Carbon, Liquid whats the release date

---------- Post added at 10:36 AM ---------- Previous post was at 10:34 AM ----------

Validus 5.2 is old, use the 5-13 kernel. The latest test kernel is only for latest CM nightlies
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] matrixzone:
Don't flash the test kernel on 5/26 phone will be stuck at the boot screen. Wait for the next AOKP buld
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] ktoonsez:
Guess I should have stated that it was for the people that wanted the new CM merged stuff. Too many replies here. So everything is good for the people on CM dated 6.1 and newer correct???
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] mrsubway:
Working great on cm110602!

Sent from a warranty crushed i747 running Quantum. F**k Knox. That is all.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] ktoonsez:
AWESOME!!!!!!!!!! I will put this in the OP and have the change log say 06.02 CM or newer :good:
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] Keland44:
so disabling selinux is possible??? :D
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] mrsubway:
Never had a reason to disable it.

Sent from a warranty crushed i747 running Quantum. F**k Knox. That is all.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] ktoonsez:
Change Log 06.01.2014

1. 100+ commits from CM

2. Ramdisk update

3. THIS VERSION IS ONLY MEANT FOR CM 11 DATED 06.02 OR NEWER!!!!!!!!!!!!!! If you are on any other ROM, it may not work until they have updated to latest.

4. This is the same file as the test from 06.01.
[AT&T, Rogers, Bell, Telus Samsung Galaxy S III] berryman13:
ABLABLABLA awesome for tip #4 haha.

So this fixes the display issue if it's with a CM 6.02 or newer ROM? I'm using AOKP 6/3 and in the past 2 aokp weeklies have not had success with kt747 - it would boot, show samsung for a split second and black.

Gonna give this a shot, 100+ commits sounds juicy. I'm sure it's all in quantum kernel or even the stock new cm kernel in aokp but this has ktweaker and thus is my favorite :)