yashsingh1/xdaforums huggingface dataset:
[Xposed General] :
kernel command line

androidboot.selinux=permissive

Just unpack the boot.img and upon repacking add the above to your kernel command line. Write the boot.img to your boot partition then reboot and it will be permanently set to permissive.
[Xposed General] Beakhole:
Would you have to repeat this after each time you flash a rom and kernel?
[Xposed General] :
Yes, unless the specified IMG/ROM includes it already by the developer handing it out.

A Rom will only affect this if it includes a non modified boot.img that will overwrite your current boot.img during its installation process. Otherwise it will not be affected.
[Xposed General] Beakhole:
Do you have any links to tutorials on how to do this? I can't seem to find anything on how to do this.
[Xposed General] :
https://github.com/xiaolu/mkbootimg_tools

Unpack boot.img:

mkboot boot.img bootfolder

Open file explorer and find file, img_info:

Look for cmdline and add androidboot.selinux=permissive or change it to permissive if it already exists:

Save your changes in img_info:

Repack boot.img:

mkboot bootfolder modboot.img

There are other ways to do this but this should help make it a bit more clearer for you and others.
[Xposed General] zombiegoaste:
Hi!

Tried disabling Selinux the hex editor way (cmdline now looks like bootopt=64S3,32N2,64N2 androidboot.selinux=permissive )

The system boots but Selinux remains Enforcing during the entire boot sequence (Supersu successfully takes over int the end, but I need to have it "permissive" very early on)

Any pointers as to what I might be doing wrong?

Android is Lollipop 5.0

Sources are not available.
[Xposed General] :
Mind sending me your image?
[Xposed General] zombiegoaste:
Of course I don't mind :)

Here

https://mega.nz/#!3ooCASoI!AmIk4vg_Xv9773pjKHLFRaJtotgOvp4LOtjkBLgqGP8

It is from Elephone P7000 stock, and I suspect that all the "selinux-disabling" logic has been purged from init binary (I will look into building my own from kernel sources of a closely related phone's Lolipop 5.0 ROM, but my coding skills suck so I will likely fail)
[Xposed General] androidlabs:
how to edit (rename) device name from SE linux

Sorry for my off topic question actually quite stuck with a problem and i think maybe you guys can help me out here. I am editing a stock rom Sm-N900L and converting it to Sm-N9005 i am almost done but in about phone i have change all the preferences where it says 900l to n9005 but can anyone tell me how to edit device name from Se linux? Because in about phone it shows

SE for Android Status

Enforcing

SEPF_SM-N900L 5.050_0017

Wed Jun 10 09:55:10 2015

I want to change it to

SE for Android Status

Enforcing

SEPF_SM-N9005 5.050_0017

Wed Jun 10 09:55:10 2015

Waiting for help.
[Xposed General] :
Hmm, that is a relatively interesting topic if you ask me. Selinux is typically prebuilt as you may already know during your porting experience. You could possibly attempt to hex edit the ascii character's while insuring the full bytes size of that file still remains the same before and after the changes then see if the modification would be allowed on your port. May even consider swapping out the selinux contents with the ones from your device. Mere thoughts of course as I don't think I have ever heard of anyone attempting to do what you seek to accomplish.
[Xposed General] androidlabs:
Thanks for the quick reply. would you please be more specific which file exactly shpuld i hex edit? I have seen many korean fix roms by Vietnamese guys with same editing they change device model from there and i want to do the same but i dont know know what exactly should i do :|
[Xposed General] :
Well, I have never done this particular mod before but let me grab my other device that has selinux and look into it real quick. If it's possible then it shouldn't be too difficult for me to discover it. Will let you know something if I find anything.
[Xposed General] androidlabs:
Yes please i am waiting for you to teach me , btw its 100% possible look at the attachment a Vietnamese guy edited it and also aded his signature.
[Xposed General] :
Hmm, seems my selinux doesn't have a "version" parsay lol. Though, I am running CM12.1 right now so that may be why. However, I would suggest taking a look at sepolicy in your ramdisk and using a hex editor to search for specific ASCII characters for a match inside sepolicy. Its definitely a starting point.
[Xposed General] androidlabs:
Don't u think it could be somewhare in secsettings.apk because i have moded the baseband version from there. Stock baseband inside the phone but its diplaying the latters in baseband version which i haved entered. Actually i am script kiddy can't understand the complex linux terms :-/ i can follow the directions well ?
[Xposed General] :
That seems plausible but I suspect the process varies on different devices.
[Xposed General] androidlabs:
I'll wait for you to confirm the procedure maybe tomorrow or maybe when you get free time. ? thanks for the help i really appropriate it.
[Xposed General] :
Taking a look at your mtk image. Using your image to add support for handling mtk ramdisks. Gonna also send you a pm with a link to download and see if it sets selinux to permissive.
[Xposed General] duniel:
Thanks for the idea to make an init.d script !
[Xposed General] zombiegoaste:
Thanks, but unfortunately, no success.

I suspect I need a different init binary.

I suspect binaries for ARM64 are more or less the same tho, so maybe I can find a new one (or build one from source, maybe even modify it to *always* set selinux to Permissive)

Got any ARM64-compatible init binaries ?
[Xposed General] Beakhole:
So at first I didn't know how to get my current boot.img. So I followed these steps to get the boot.img. Then, I used Android Image Kitchen for ARM to do the boot image unpacking and repacking right on my phone with the terminal. Using AIK, it unpacked the img into a ramdisk folder and split-img folder. Within the split-img was the cmdline file. I pasted in that code, saved, then repacked the two folders. Then I rebooted to TWRP and flashed the new boot.img file. Now I have permissive SELinux, no script required!! Thank you!
[Xposed General] :
osm0sis is a good man. His project will work just the same. Our projects aren't too different from one another, but glad you got it working. The ARM directory in the link I provided works on Android and Linux due to how I compiled all the binaries and the script written out to work with Bash instead of only working with Androids version of SH. Currently working on adding support in the ARM directory for MTK images since their ramdisks uses a special header.
[Xposed General] Beakhole:
Well I really appreciate your help. I couldn't have done this without your instructions. Messing with the ramdisk is something I'll probably be doing frequently from now on now that I know how to do it. :)

Also, can you remind me, will I have to redo this process each time I dirty flash a new rom and dirty flash my kernl over top of it?
[Xposed General] :
To put it simply, if your new boot.img is built with selinux not set to permissive then it will overwrite it and you will have to do it again. So make sure the new boot.img has it set to permissive first and you will be fine.
[Xposed General] Beakhole:
I asked because I don't build my own roms or kernels. I use Pure Nexus with ElementalX Kernel for the Nexus 6. I update my rom about once every week and a half so I just needed to know if I was going to do this regularly. So, thanks for the information! Now I know.
[Xposed General] Beakhole:
So the below commands are what I run right after I flash an updated rom and/or kernel. And they work flawlessly each time! So thanks!

su

aik
cat /dev/block/mmcblk0p37 > /data/local/AIK-mobile/current-boot.img
./unpackimg.sh current-boot.img
echo "androidboot.selinux=permissive" >> ./split_img/*.img-cmdline
./repackimg.sh
mv /data/local/AIK-mobile/image-new.img /storage/sdcard0/Mods/ROM/Images/"permissive-image-"`date +"%m-%d-%Y.img"`
rm -f current-boot.img
./cleanup.sh

Then I just flash the new permissive image and I'm done!
[Xposed General] 2x4:
I found out the hard way that SElinus would reset every time on the OPO and had to find out a way to get ViperFX working. Thanks!
[Xposed General] Cristiano Lira:
Could you do a flashable zip that sets SELinux to permissive and flashes the boot.img in the same time? Thank you.
[Xposed General] Beakhole:
Maybe. I'll start working on that today and let you know how it turns out.
[Xposed General] IronTechmonkey:
Thanks you very much for this. Even LMT Pie Launcher is now requiring but unable to set permissive even temporarily. For now I'm just using the console command after reboots but it is good to know there is another option. Out of official thanks today but will double back :)

Side note: XDA search engine cannot find this thread even if exact title or subcomponents are used. Sheeesh.
[Xposed General] Beakhole:
Have you tried this?
[Xposed General] IronTechmonkey:
No, although I have discovered sources describing similar combinations of commands. Since I can easily change the selinx mode at the tap of a button with Tasker I'm sticking with that although is nice to know about that additional resource. Thanks!
[Xposed General] Cristiano Lira:
And about the flashable zip to change the SELinux in the boot image permanently? Can you do it? Thanks.
[Xposed General] Beakhole:
I'm sorry, bro. I've tried and tried and can't seem to figure out how to do it. I'm not a dev by any means and am a novice when it comes to creating flashable zips. I'm sure that if I had more training in this field that I'd be able to do it but, unfortunately, I just don't have the necessary knowledge.
[Xposed General] Cristiano Lira:
Thank you for tour effort. [MENTION=6367467]SHM[/MENTION] Is it possible to make a flashable zip to change SELinux to permissive permanently in the boot image? Thanks.
[Xposed General] :
Most certainly. In many forms as well. Could make a flashable zip which would dump your boot.img, extract its contents, then repack with the additional cmdline, then write the modded boot.img back to the boot partition or you could make a flashable zip that copies a script over to /etc/init.d which sets selinux on each boot assuming the ROM supports init.d. There are other methods as well. Just depends on what you want.
[Xposed General] Cristiano Lira:
[MENTION=6367467]SHM[/MENTION] Can you, please, make a flashable zip that uses the first method you said (dump boot.img, extract it's content, repack, then write back)? Thanks.
[Xposed General] IronTechmonkey:
I'd be concerned that something that is unpacking zip, adding content, repacking and copying a file could leave a mess if the boot process was disrupted. Is it reasonable to assume that the init.d method is marginally more resistant to issues that may be caused by disruptions to startup activity?
[Xposed General] :
It wouldn't leave a mess. All the work would be done in the /tmp directory within TWRP. The script would simply dump the boot.img to the /tmp directory assuming the device has space for it while in the recovery or else you could dump it to cache using dd. Either way, it would then split the boot.img using additional binaries/scripts, then rebuild the boot.img with the proper offsets but with a simple change in the kernel cmdline by adding androidboot.selinux=permissive. When done, it would write it back to the partition. Simple and easy process. The flashable zip can clean it up later before rebooting.

However, if the ROM supports init.d. Then it would be easier just to push a script to /etc/init.d that would run the command, setenforce 0, on each boot thus giving you permissive.
[Xposed General] IronTechmonkey:
Thanks for the explanation. I can see how the file would not really be vulnerable in that case. Since I clean flash a new nightly about once a week for testing I'll probably still use my tasker tasks until I settle on a Snapshot or particularly good nightly, and at that point try doing this with init.d. Thanks again!
[Xposed General] :
If using CM12.1 then init.d support is definitely there. Running CM12.1 myself, and so far the only issue I am having is running a script that will export a defined variable. The variable always returns blank for me lol. A huge nuisance since I wish to use python on my phone.
[Xposed General] moonthemindfreak:
After my new flash when i try to install it fails and when i try through adb it say [INSTALL_FAILED_UID_CHANGED]

Help!!!
[Xposed General] dihan91:
What happens if I set Selinux to permissive on boot?

What's the function of this app, noob here. couldn't find in google.
[Xposed General] sir-harlekin:
not working on CM 12.1 without supersu. Is there a specific trick?

even i add

su

setenforce 0

to 08setperm --> not working
[Xposed General] HMZGUPUR:
Not working on cm12.1

Sony Xperia L CM12.1 (cm-12.1-20151125-NIGHTLY-taoshan)
[Xposed General] sir-harlekin:
I correct myself, can be done via Tasker very easy:

Profile: Event -> System -> Device Boot

Task: Run Shell -> su 0 sentenforce 0
[Xposed General] pavanjadhaw:
Where should I add the given lines of I have already these lines in file 08setperm plz help
[Xposed General] darsh11192:
Init.d folder under system-> etc
[Xposed General] Howinoh:
Great job

Thanks for your work. It works great for me.:good: I'm using an LG G2 with CM 13.
[Xposed General] smartyon:
Edit: I solve it from kernel Thank your post
[Xposed General] Dingjun:
not worked.

I got follow log, it looks like that selinux denied write to /sys folder at startup
[Xposed General] deathbytalkshow:
Google banned it from the Play Store, Google Play tries to completely discourage you from installing. But apparently you can still install it if you press on the arrow to drop down the "More Details."

[IMG="SElinux Danger"]http://i.imgur.com/EozzYbO.png?1[/IMG]
[Xposed General] pathaniya:
That picture was like Google has enslaved us. Thanks for the tip and thanks to all the developers and of course! XDA
[Xposed General] aryan0328:
Not to set selinux to permissive on galaxy j700f

Hi,

I have tested this manipulation but it doesn't work for me

My selinux always ENFORCING.

PLZ ANY Other solutions :)

---------- Post added at 01:56 PM ---------- Previous post was at 01:52 PM ----------

Hi,

I tested this manipulation on my device and after reboot the selinux always on ENFORCING.

PLZ do you have any other solution ?

Thank you :)
[Xposed General] pialletti:
Hello. I want to install linux on my motorola x force. with root. but it does not make me install. some solution? thank you. ah i marshmallow
[Xposed General] hellcat50:
You can disable this feature from google: lollipop: google settings - security - and then on the bottom

marshmallow: settings - google - security and then on the bottom
[Xposed General] tin2404:
In my MM 6.0.1 there is no : settings - google - security
[Xposed General] 5mohsen5:
None of these methods did not work on my phone.

samsung galaxy j200F (SM-j200F)

os ver: 5.1.1
[Xposed General] -CALIBAN666-:
you can try my method from link below,its simple and works good for me and others on different devices.

Good luck.

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

--SIGNATURE--
[Xposed General] krasCGQ:
On Samsung TouchWiz ROMs, you need to compile a kernel from Samsung source with disabled flag or this trick won't work.

After downloading source, extract the kernel source, and browse to security/selinux. Edit Makefile with text editor and find this flag:

EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=true

Change true to false then save. Compile it and flash.

Sent from my ASUS_Z00AD
[Xposed General] pgellen:
selinux

what is tasker and where can i get it?
[Xposed General] IronTechmonkey:
Tasker is in the google Play Store (I use the paid version). It is sort of a programming for non-programmers tool. Anything could do manually on the device you can do and automate in Tasker with tasks that perform a series of actions and profiles that set the conditions under which the tasks are performed. In this case I have a profile that runs a command shell command at boot and the command it runs is setenforce = 0.
[Xposed General] pgellen:
TASKER

jeez, were getting into stuff that goes over my head. you the only app, so far that im having a problem with is flashfire and, i would have thought that the fix would have been programmed into that. however, that being said, and chainfire being much more knowledgable than i, im lost. so, if i get tasker there is a applet thing that i can put the setenforce=0 and that will fix it? i understand that it has to be flashed in. are these "profiles" like a batch file?
[Xposed General] IronTechmonkey:
No, you build everything yourself, but often someone else has built something similar so there is template to follow. All I'm doing is having Tasker run the setenforce=0 command at startup, which has the same effect as if that command were run from a command prompt. If this would be the only thing you use it for I dont necessarily recommend it. If you want to explore it there is a link to a 7 day trial at the Play Store Tasker page.
[Xposed General] pgellen:
selinux

nah. i think you are right. the error only shows up on flashfire and i know im rooted. i dont know how busy you are on other threads but answer this if you have time. for the s3 sph-l710 what roms would you put on it?. what about aosp? i cant run dirty and i dont know about wicked but arent they actually all pretty much the same? how come on my s3 tribands i either lost cell and sound or on the last install of octos i lost bluetooth on the music but it worked fine for the phone. i don't want to go through that again. again, if you have time can you direct me to stock sph-l710 files. the md5's. just in case. haha most of this i would find on my own. so dont worry too much about it, ok.
[Xposed General] IronTechmonkey:
That is a lot of questions about devices and ROMs I'm not familiar with. Also off topic for an Xposed thread. The one bit of advise I can offer is to start with a well known and widely distributed and therefor well tested ROM, which means CM if it is available for your device. You'll have to do some research (which is different from asking someone to answer all of your questions ;)) for the rest.
[Xposed General] bmaz121:
Permissive SELinux

Yeh, OnePlus One did not work even from a terminal. Yog7das2k1 version
[Xposed General] 5mohsen5:
setenforce Or sentenforce ?!!!

what is your OS version ?
[Xposed General] sir-harlekin:
set enforce sorry. With Lollipop it was working. i dont know about MM.
[Xposed General] pgellen:
SElinux issues,

wow, thats a lot of info for this alzheimer's patient to wrap my brain around but im going to try this. how about a link to the best exposed site. something that i can clearly view the installer along with the plugins. i have ,, jeez, that other guy was thinking droid.. f droid wont work on a galaxy s3 sph-l710, will it? also., the init-d thing. is that a hidden system directory?
[Galaxy S3 Neo Q&A, Help & Troubleshooting] piter752:
Hello people, I would like to know if the S3 Neo is compatible with the gear, gear 2 or gear 2 Neo.

Aditionally, I would like to know if the S3 (I9300) has the kitkat update 4.4 or the jelly bean 4.3... Thanks pls answer ASAP.

This is urgent please answer fast. Thanks
[Galaxy S3 Neo Q&A, Help & Troubleshooting] MOP1398:
hi

s3 I9300 Will not give any official 4.4.4 kitkat and obviously no lollipop on this phone

neo already has the 4.4.2 official and it will be expect to get lollipop official

i don't know about any gadgets like gear
[Galaxy Note 4 Android Development (Snapdragon)] falcon67:
Link to Galaxy Note 4 SM-N910F 5.0.1 Lollipop:

http://www.sammobile.com/firmwares/download/43168/N910FXXU1BOB4_N910FOXA1BOB4_DBT/
[Galaxy Note 4 Android Development (Snapdragon)] malybru:
Mod Edit

This is not development

Thread is already here:

http://xdaforums.com/note-4/general/lollipop-variants-roll-t3029201

Thread closed

malybru

Forum Moderator
[General Topics] atomicshockwave:
someone PLEASE tell be there is going to be or is a GSM version of the p4000, it has 3g, fast processor, full keyboard and only 18mm i love it!!!! i would give my eye teath for it if it were GSM!!!!
[General Topics] AsGF2MX:
The HTC TyTN (HTC Hermes)...isn't that what this device is supposed to be heading up against?
[Shield Tablet General] Gamingmayr:
After installing the latest update (to version 2.2) I found, that nvidia included (at least) two "test-tools" (not sure if this is the correct name for it).

I found these:

Sensor Calibration Utility: Can be accessed via Settings->About tablet->a few quick taps on "Model number"

This will bring up the Sensor Calibration Utility where the touchscreen can be re-calibrated

(I already noticed this one since the lollipop update)

TDC:

similar to the Sensor Calibration Utility go to Settings->About Tablet and then quickly tap "Kernel version".

It should now open an App called TDC which contains two parts: TegraDiag and DiagList.

TegraDiag: After pressing the button "START TEST" it will perform a few tests checking if the hardware is working properly.

DiagList: Lets you choose different tests that can be run (I guess these are the same tests that are automatically started with the TegraDiag but can be run individually)

I made a short video briefly showing my findings:

https://www.youtube.com/watch?v=5vgpDecPf2g
[Shield Tablet General] Bogdacutu:
the tegradiag stuff was there on kitkat too
[Android Q&A, Help & Troubleshooting] Nadalista:
Hi everybody

I use Bluestacks on my pc and I want to root it to play clash of clans by xMod games..

and you know xMod games works only on the latest version of bluestacks 0.9.11.4119..

you put a tool that root bluestacks but elder version .. I want root bluestacks 0.9.11.4119 please ..

what about BSMultiTool ? will you support 0.9.11.4119 version ?​
[Android Q&A, Help & Troubleshooting] rrossim:
you have any answer ?
[Galaxy Grand 2 Q&A, Help & Troubleshooting] Jass AndroDude:
My stupid cousin flashed some . Img file.. Which made my phone into a bootloop.

It only shows the samsung name and goes on in an infinite loop.

I am shattered. My phone is just simply rooted and i run on stock rom 4.3 jb only.

I am a complete NOOB. I donno ****. No custom rom... Or cwm recovery.

I tried wiping cache and factory reset using stock recovery.

I beg u guys... Does any one know how to sovle this thing...?

Please guys i am shatterd... I am a pure noob..

Please explain in detail how to solve guys..

Please..
[Galaxy Grand 2 Q&A, Help & Troubleshooting] grohitsurana:
first get yourself prepared for flashing the stock firmware

find out these details first

1. what version of grand 2 are you using g7102 or g7102t or g7106 or g710

2.which country variant phone are you using that is from which country have you bought your phone from

these details are necessary for downloading the stock rom for your phone..

so first get these details first then i would guide you for further process

ps: these info will be at the back of your phone below your battery

& the coutry info will be the coutry were you are using your phone
[Galaxy Grand 2 Q&A, Help & Troubleshooting] Jass AndroDude:
I am using g7102.. Made in vietnam....but i am in the middleeast country.....bahrain.

Could u please help me through the complete proces....?

After googling it i camr to know that it is just a softbrick..even after wiping cache and doing a factoy reset...it still goes on in a boot loop...

Please dude....after hours of googling....every where i see the word odin!!!

I am also ok with installing the gennxt s5port rom for grand 2....

I trust you buddy!!!!

I dont have cwm recovry or sumthing...just stock recovery