[CM12] How to make xposed framework work on MOTO G - Moto G General

Hi
Xposed is here. if you are wondering it does not work for you its because the SELinux status is set as Enforcing which doesnt allow xposed framework to modify at system level. though some modules are not compatible yet
Bonus : Also if you are using Viper4Android it wont work unless the SELinux is Permissive
there is a workaround for this. 3rd being the easiest and permanent fix
1. Terminal method
Code:
Su
Setenforce permissive
soft reboot to make xposed to work
OR
2. Using SELinux Mode Changer APP
Use this app SELinux Mode Changer
change it to Permissive and soft reboot to make xposed to work
Else
3. With a modified Kernel(CM12 only) easiest method
Here is the modified Kernel which is set to permissive by default.
it is a boot.img not flashable.zip
How to flash
1. Flash this using TWRP(TWRP can flash img files now ) or apps like RASHR can be used to flash boot.img
for more info check this https://source.android.com/devices/tech/security/selinux/validate.html#switching_to_permissive
Tested with BlissPop 13th release works as intended
i have used BlissPop kernel. it is as good as CM12 Kernel
Better to have a backup(Not mandatory its upto you)
All credits to original developers

reversegear said:
Hi
Xposed is here. if you are wondering it does not work for you its because the SELinux status is set as Enforcing which doesnt allow xposed framework to modify at system level. though some modules are not compatible yet
Bonus : Also if you are using Viper4Android it wont work unless the SELinux is Permissive
there is a workaround for this. 3rd being the easiest and permanent fix
1. Terminal method
Code:
Su
Setenforce permissive
soft reboot to make xposed to work
OR
2. Using SELinux Mode Changer APP
Use this app SELinux Mode Changer
change it to Permissive and soft reboot to make xposed to work
Else
3. With a modified Kernel(CM12 only) easiest method
Here is the modified Kernel which is set to permissive by default.
it is a boot.img not flashable.zip
How to flash
1. Flash this using TWRP(TWRP can flash img files now ) or apps like RASHR can be used to flash boot.img
for more info check this https://source.android.com/devices/tech/security/selinux/validate.html#switching_to_permissive
Tested with BlissPop 13th release works as intended
i have used BlissPop kernel. it is as good as CM12 Kernel
Better to have a backup(Not mandatory its upto you)
All credits to original developers
Click to expand...
Click to collapse
Hi,
great post, thanks!
I have two questions:
- Can you provide more information about this kernel please?. Is stock cm12 kernel, only with SeLinux changed?
I don´t use cm12 because SeLinux is set to enforcing and have problems restoring nandroid backup with TWRP (no problems with philz recovery).
- I don´t have tested, but i think that if you make init.d script that change SeLinux, you would´t have to make soft reboot.
Regards.

SergioSanchezR said:
Hi,
great post, thanks!
I have two questions:
- Can you provide more information about this kernel please?. Is stock cm12 kernel, only with SeLinux changed?
I don´t use cm12 because SeLinux is set to enforcing and have problems restoring nandroid backup with TWRP (no problems with philz recovery).
- I don´t have tested, but i think that if you make init.d script that change SeLinux, you would´t have to make soft reboot.
Regards.
Click to expand...
Click to collapse
1. as i said kernel i used is from BLISSPOP rom from 13th experimental build. i dont think Bliss Team made any changes to the kernel. i guess you can flash custom kernel like optimus / Attacked on top of the modded kernel because both provide only Zimage. so that SELinux status is retained to Permissive
2. i Tried init.d script unfortunately it wont work on CM based rom so i thought of modifying in boot.img itself
Hope this helps

Cool !!
wow!, the terminal method is vv easy method. Works perfectly!!

SELinux-Status: Moderat
Hi!
I used the Terminal method.
However, the SELinux-Status is now: Moderat (see screenshot).
Can you please instruct?
THX

Related

[Q] SELinux Enforced on boot

Hi all,
Got a Canadian Samsung Galaxy Note 4 yesterday, in replacement of my aging Nexus 4.
While I was a comfortable poweruser with my Nexus 4 (Xposed mods, Franco Kernel, double tap to wake, LTE-enabled modem, etc.), I never had to toy with SELinux, and as such I've been reading a lot on these forums. Also, since this is my first Samsung device, I learned to use Odin, pretty nifty tool!
The steps I've taken:
Rooted with CF-Auto-Root through the Odin PDA method (with the correct, Canadian .tar)
Installed TWRP 2.8.1.0 through the Odin PDA method (with the correct, Canadian .tar)
Installed BusyBox through Stericson's installer
Made a nandroid backup up with TWRP
Updated the SuperSU binary manually to 2.16 through TWRP
With Flashify, made a kernel backup
With Flashify (Flash Boot Image), flashed stockish twistedumbrella kernel (with the correct, Canadian .img) for Permissive SELinux
Edited my build.prop, to disable KNOX and SELinux, by adding the following lines at the end of the file
Code:
(SELinux disable)
ro.build.selinux=0
(KNOX disable)
ro.config.tima=0
ro.config.knox=0
Rebooted
When I check SELinux status through getenforce Terminal Emulator, I get Enforcing. When i enter setenforce permissive, I get Permissive.
Did I miss a step or do something incorrectly?
Thanks for the help
EDIT:
So JC3M4N helped me out: he suggested trying su 0 setenforce 0 or su system setenforce 0. Personally, the second one worked for me, but YMMV. Hoping this helps someone.
Is this for lollipop?
Can You Help Me Doing the same with lollipop and different variant?

SELinux - Enforced or Permissive on Stock Rooted?

So I'm running -
Unlocked Bootloader
Stock Rooted Rom (w/ Chainfire modified boot image)
Stock Kernel
TWRP
Xposed
Is SELinux in Enforcing Mode or Permissive Mode on my phone? How do I find out? And if I'm in Permissive, is there a way for me to change it to Enforcing?
Thanks!
byproxy said:
So I'm running -
Unlocked Bootloader
Stock Rooted Rom (w/ Chainfire modified boot image)
Stock Kernel
TWRP
Xposed
Is SELinux in Enforcing Mode or Permissive Mode on my phone? How do I find out? And if I'm in Permissive, is there a way for me to change it to Enforcing?
Thanks!
Click to expand...
Click to collapse
You can check in Settings --> About Phone.
SELinux is in Enforcing mode by default, so unless you changed it, it will still be in Enforcing.

[HELP] Howto remove Knox and get SELinux permissive?

Hi
I got J510F (2016) stock rom (andrroid 6) , stock kernel is rooted already but I can't get SELinux permissive its always stay in enforcement and can't change Any idea ???
thanks for help
Try using selinuxmodechanger.apk install it as system app
Kcjbj
Firstly u have to install busy box in system/bin then install selinux mode changer apk

ViperFx

Did somebody manage to properly run ViperFX? I found a thread over at en.miui.com, with a flashable zip but no instructions. On my old smartphone I had to remove AudioFX and cmaudio befor flashing ViperFX, and also set selinux to permissive. I tried the same with my redmi but it didn't work. Also setting selinux to permissive causes problems with my password recognition, oddly.
Also there is a thread at 4pda with an attachment, which however I cant donwload or which is removed.
So, anybody got ViperFX running and can give a propper instruction, would be very welcome!
I use ViperFX as Magisk Module, it works fine with LOS13 by jacoghi 05.06 ROM build, just flash it after you've flash Magisk v12. It works good as well with xiaomi.eu(as i've used it on xiaomi.eu 8.1.3.0 ROM build before). And yes, i think you have to set SELinux to Permissive for it to work properly. You can download it from this link.
Hello.
I run V4A in stock 8.2.4.0 with no problem, downloaded from official site http://vipersaudio.com/blog/
I put a simple script to set selinux to permissive in tasker at device boot, and everything work´s OK.
No problem here with password or anything else.
Sorry for my english.
jmsonicbox said:
Hello.
I run V4A in stock 8.2.4.0 with no problem, downloaded from official site http://vipersaudio.com/blog/
I put a simple script to set selinux to permissive in tasker at device boot, and everything work´s OK.
No problem here with password or anything else.
Sorry for my english.
Click to expand...
Click to collapse
Upload your script to use it and others users
Thanks

Camera starting slow

Hi all.
After updating to Oreo the camera is slow on starting.
I have tried other camera apps but it's the same. Even Gcam after rooting does the same.
Is it possible to speed up the startup?
Thanks.
belean_cristian said:
Hi all.
After updating to Oreo the camera is slow on starting.
I have tried other camera apps but it's the same. Even Gcam after rooting does the same.
Is it possible to speed up the startup?
Thanks.
Click to expand...
Click to collapse
If you are rooted with Magisk, you can install the Magisk SELinux Permissive Script module (this will change your SELinux mode to permissive) and the camera start-up lag will be gone.
cmk7128 said:
If you are rooted with Magisk, you can install the Magisk SELinux Permissive Script module (this will change your SELinux mode to permissive) and the camera start-up lag will be gone.
Click to expand...
Click to collapse
Confirm works great , also Viper module
I got the same problem, bro.
Saw this thread and did installed the Magisk SELinux Permissive Script module, the lag's now gone .
fantasticlord said:
I got the same problem, bro.
Saw this thread and did installed the Magisk SELinux Permissive Script module, the lag's now gone .
Click to expand...
Click to collapse
Good to hear that.
---------- Post added at 01:45 PM ---------- Previous post was at 01:39 PM ----------
euricoalex said:
Confirm works great , also Viper module
Click to expand...
Click to collapse
Yes. Personally I am waiting for the Dolby Atmos mod (by ahrion) to be compatible with Oreo.
cmk7128 said:
If you are rooted with Magisk, you can install the Magisk SELinux Permissive Script module (this will change your SELinux mode to permissive) and the camera start-up lag will be gone.
Click to expand...
Click to collapse
It worked like a charm. Thanks. I hated how slow it was opening
cmk7128 said:
If you are rooted with Magisk, you can install the Magisk SELinux Permissive Script module (this will change your SELinux mode to permissive) and the camera start-up lag will be gone.
Click to expand...
Click to collapse
Can i ask which version of magisk and Magisk SELinux Permissive Script module did u use? Coz when I'm installing, it says need magisk v4.0+. I used magisk v5.5.3
Latest.. i think, 1.1
The latest Magisk version is 15.2
mat_yan said:
Can i ask which version of magisk and Magisk SELinux Permissive Script module did u use? Coz when I'm installing, it says need magisk v4.0+. I used magisk v5.5.3
Click to expand...
Click to collapse
I installed SELinux Permissive Script v1.1 using Magisk v15.1 and Magisk Manager v5.5.2.
The trick function, but isn't there another solution without create security problems setting SElinux to permissive?
Hi, can someone please tell me how can i install Magisk SELinux Permissive Script and how to open it, i dowloand Magisk SELinux Permissive Script from xda and intall it from magisk and reboot my phone but how can i open it, please help me
Sefa142 said:
Hi, can someone please tell me how can i install Magisk SELinux Permissive Script and how to open it, i dowloand Magisk SELinux Permissive Script from xda and intall it from magisk and reboot my phone but how can i open it, please help me
Click to expand...
Click to collapse
There isn't anything to open, you'll need some app to toggle permissive/enforce, if you want to do that.
Do you people know that switching selinux to permissive TURNS OFF SECURITY FEATURES in android? Basically every software can read into every other. This is a very huge issue! Not a solution!
Same thread again and again. When are people gonna use the search function?
Ok then, please provide a link to a thread speaking about this issue. Your reply is useless, destructive, and meaningless. Why do you even write someting like that?
pr0bot said:
Ok then, please provide a link to a thread speaking about this issue. Your reply is useless, destructive, and meaningless. Why do you even write someting like that?
Click to expand...
Click to collapse
It wasn't even necessary to search, it's on the first page already, about 6 topics below this question. https://forum.xda-developers.com/mi-a1/help/properly-fixing-oreo-magisk-camera-lag-t3729709
I installed a Magisk module that's a fix for the issue of the camera, and it worked flawlessly
Can you help me how to install magisk and how to do it with steps?
Now it looks like Magisk SELinux Permissive Script is discontinued:
https://forum.xda-developers.com/apps/magisk/module-magisk-selinux-permissive-script-t3577549
and Magisk SELinux Manager should be used instead.
Has some tried it (Magisk SELinux Manager)? If so, how did s/he install it?

Categories

Resources