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

reversegear

Senior Member
Jul 17, 2011
2,279
1,607
193
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
 

Attachments

Last edited:

SergioSanchezR

Senior Member
Jan 30, 2015
67
403
0
Salamanca
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
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.
 

reversegear

Senior Member
Jul 17, 2011
2,279
1,607
193
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.
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
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone