Please note, this requires SELinux Permissive (included init.d script/instructions for PHH). It will not work on Enforcing, even with supolicy (I've tried. If anyone has an idea how to get it working with "soundserver" and setting supolicy "read write execute", please let me know)
Setting SELinux to Permissive is a security risk.
ViPER4Android for Mate 9
Slightly modified guitardedhero script.
Contains "Kernel" and "Profile" for V4A from auras76 kang rom
Note:
The following files are backed up automatically so you can easily revert with the removal script:
/system/lib/soundfx/libeffectproxy.so -> /system/lib/soundfx/libeffectproxy.so.bak
/system/etc/audio_effects.conf -> /system/etc/audio_effects.conf.bak
/vendor/etc/audio_effects.conf -> /vendor/etc/audio_effects.conf.bak
If those .bak files are not found the removal script won't run (to prevent running it without V4A installed, it would simply just remove the files leaving you with no files at all.)
It does not edit audio_policy.conf as it doesn't have the deep_buffer section in it, so no point in having it edited.
Requirements:
SuperRoot/SuperSU (No verity is probably needed as we're modifying both /system and /vendor)
A way to set SELinux to Permissive (SuperSU init.d/phh 'su --init' or SELinuxToggler, see 'Alternative'.)
If you're on Magisk use the V4A module instead
For SuperSU
If you use the one posted above
Simply flash the zip in TWRP and you should be good to go. It copies the 00selinux script directly to /system/etc/init.d/ and runs at boot so you'll have SELinux set to Permissive after flashing.
For PHH su
Flash the zip in TWRP, boot up fully.
Now open a terminal and issue the command
Code:
su --init /system/etc/init.d/00selinux
Then reboot.
To remove the phh init use 'su --init !/system/etc/init.d/00selinux'.
For Magisk
Search for Viper4Android in the Downloads section in Magisk Manager, it's a module so no need to download anything in this thread
Alternative:
(You still need root for this but no init script.)
SELinuxSwitch by @Ibuprophen
Download:
ViPER4Android 2.5.0.5
Dropbox Mirror
Removal script download:
Removal script
Removal script Dropbox Mirror
Thanks to V4A team,
guitardedhero for his script,
auras76 for the profiles/makers of said profiles,
Ibuprofen for The SELinux Switch.
@ante0 bro thanks for porting it... have a question, we have to mount system in terminal for writting in system partition,,, can i use init to mount system rw for all time so that i dont need to give command everytime
HassanMirza01 said:
@ante0 bro thanks for porting it... have a question, we have to mount system in terminal for writting in system partition,,, can i use init to mount system rw for all time so that i dont need to give command everytime
Click to expand...
Click to collapse
Yes, if you use supersu, make a script in /system/etc/init.d/
Code:
#!/system/bin/sh
mount -o rw,remount /system
Make sure it runs after any other scripts if they remount system to read only. Scripts are loaded in order, so name it accordingly.
If you use phh, place script where you want and from a terminal
Code:
su --init /path/to/script
I wanna put all this in my Kernel... Or boot.img...
I have root in my kernel using phh superuser... I dont want to add anything in system by myself, i want that a zip should do it... Will be best if kernel did all this... In MM, we dont need to do rw ourself, in N we needed...
Also, am not a dev, just a pro member, know how to edit and understand commands etc...
May I ask whats the difference between this and Viper4Arise.
HassanMirza01 said:
I wanna put all this in my Kernel... Or boot.img...
I have root in my kernel using phh superuser... I dont want to add anything in system by myself, i want that a zip should do it... Will be best if kernel did all this... In MM, we dont need to do rw ourself, in N we needed...
Also, am not a dev, just a pro member, know how to edit and understand commands etc...
Click to expand...
Click to collapse
I sent you a pm instead
ante0 said:
I sent you a pm instead
Click to expand...
Click to collapse
Sure bro... Am waiting... And i have somehow injected phh superuser r275 in boot.img... I will be thankful if u tell me the whole correct procedure to inject files of superuser zip in boot.img.... By flashing superuser r275 on stock boot, we can have root but on that root, titanium like apps didnot work :/
SlyUK said:
May I ask whats the difference between this and Viper4Arise.
Click to expand...
Click to collapse
Arise is based off of V4A, but with their own audio effects and a modified V4A app.
https://www.reddit.com/r/androidapps/comments/5dpvcz/slug/da6ux9k
SlyUK said:
May I ask whats the difference between this and Viper4Arise.
Click to expand...
Click to collapse
It's just a skin difference. Viper4Arise is themed by an arise member. The only difference is the theme.
ante0 said:
Arise is based off of V4A, but with their own audio effects and a modified V4A app.
https://www.reddit.com/r/androidapps/comments/5dpvcz/slug/da6ux9k
Click to expand...
Click to collapse
Hello,
Will V4A work on P9, P9 plus and P9 lite if we flash those files?
Coolyou said:
Hello,
Will V4A work on P9, P9 plus and P9 lite if we flash those files?
Click to expand...
Click to collapse
I don't know. But I don't see why it wouldn't.
Backup system and try.
You'll have to use the phh init script though as I don't think supersu works with P9 on emui5?
Edit: actually, if your audio_effects.conf file is not in /system/etc/ or /vendor/etc/ the script needs to be modified. And if your audio_policy.conf contains the deep_buffer section.
You guys can use this app for switching SELinux to Permissive - https://forum.xda-developers.com/android/apps-games/app-selinuxtoggler-t3574688
It was featured a few days back on XDA blog, hope it will help the users.
DJBhardwaj said:
You guys can use this app for switching SELinux to Permissive - https://forum.xda-developers.com/android/apps-games/app-selinuxtoggler-t3574688
It was featured a few days back on XDA blog, hope it will help the users.
Click to expand...
Click to collapse
Oh, he finally released it
I'll update OP, thanks for heads-up.
Works like a charm, thanks
hi..I'm on aura's rom. and I can't install drivers. can you please teach me how can I make it work..thanks
s2pfie said:
hi..I'm on aura's rom. and I can't install drivers. can you please teach me how can I make it work..thanks
Click to expand...
Click to collapse
assuming everything else but the driver is installed,
simply download Viper4android_2.5.0.5_mate9.zip, extract.
go to customize/lib, rename libv4a_fx_jb_NEON.so to libv4a_fx_jb_ics.so
copy it to your phone.
Use a root file manager and copy and paste to /system/lib/soundfx/libv4a_fx_jb_ics.so.
And set permissions of that file to 0644 (RW-R--R--).
Then reboot and open up viper4android again and see if still complains.
If it doesn't, go to "hamburger" menu in V4A and tap on Driver Status, it should say Status: Normal. If it says abnormal something else is wrong.
ante0 said:
assuming everything else but the driver is installed,
simply download Viper4android_2.5.0.5_mate9.zip, extract.
go to customize/lib, rename libv4a_fx_jb_NEON.so to libv4a_fx_jb_ics.so
copy it to your phone.
Use a root file manager and copy and paste to /system/lib/soundfx/libv4a_fx_jb_ics.so.
And set permissions of that file to 0644 (RW-R--R--).
Then reboot and open up viper4android again and see if still complains.
If it doesn't, go to "hamburger" menu in V4A and tap on Driver Status, it should say Status: Normal. If it says abnormal something else is wrong.
Click to expand...
Click to collapse
thanks bro but still an error occurred..still abnormal
update:
just flashed your zip now its normal..thank you
@ante0, I just wanted to give you a quick heads up...
There's a new app (currently being beta tested) that will supercede/replace The SELinux Toggler....
It's a new app called "The SELinux Switch". Though, it will look like "The SELinux Toggler" but, I had to recreate, pretty much, the whole app.
The reason i had to do this is, primarily, to completely sever it from the older package name (or Installation Directory) that was also being used by the "SELinuxModeChanger" app.
I also had made some minor enhancements and a few compatibility improvements but, there's still some more improvements to be made.
In addition, the app has been passing the beta testing extremely well (thankfully after about 6 +/- months into it) and it should be released soon but, when the app has completed the beta testing and, ready for its debut, it will be released under a whole new thread.
Thank you all for your time, understanding and, especially, your support for my development.
Please let me know if you have any questions or concerns.
______________
PLEASE NOTE: I welcome any member to help with further valuable information/clarification for any of my posts.
Has anybody used the ARISE aroma installer (twrp flashable zip)? I've used it on a few other devices, coming to the M9 from a Le Pro 3 and it works nice and easy and patches selinux permanently. It seems the way Huawei does things is much different though, so I'd be suprised if it works as easily as on other phones.
In the end, it's just installing 2.5.0.5 anyway with a few other tweaks and a whole bunch of IRS response profiles. So that part's not very different.
Just a quick heads-up @ante0...
The SELinux Toggler has now Officially been Discontinued for the launching of the new app...
[APP][TOOL][4.2+][OFFICIAL]The SELinux Switch by Ibuprophen
Those of you who currently has The SELinux Toggler, and want to switch to The SELinux Switch, please be sure to read the OP for instructions.
Thank you ALL!
______________
PLEASE NOTE: I welcome any member to help with further valuable information/clarification for any of my posts.
Related
**I did not write these scripts, just updated the flashable zip for our x86 Asus phones**
**All work done by @Paget96**
ORIGINAL Mod Thread here : http://forum.xda-developers.com/android/software-hacking/tweak-l-speed-v1-0-02-02-2015-t3020138
@Paget96 has added an x86 version to the original thread with the (more appropriate) fixes!! Go discuss there!
Big thanks to him. Use the v2.4 Test3 or greater "x86" file
Reqs:
1) Need root
2) Need Custom recovery (TWRP)
3) Need kernel with init.d support (like @TheSSJ 's here: http://forum.xda-developers.com/zenfone2/development/project-t-custom-kernel-zenfone-2-t3150822)
** Use v44 or greater for proper init.d support
Download zip from the original thread
and flash in recovery.
Then look at the original thread for config options while you're in there
Added the Emergency Uninstaller zip as well. (i think you still need to use this version, until an x86 version is up there too)
Ch-Ch-Ch-Ch-Changes
Jul 23 2015: OG thread updated by dev. Updated flashing instructions in OP (mods can probably lock this thread)
Jul 15 2015: Fixed script to properly set perms on /system/bin/LS; Added Emergency Uninstaller zip
Jul 14 2015: Initial upload. Needed to use the update-binary from Asus to work with our x86 architecture and replace all the set_perms with set_metadata's. Apparently the update-binaries from Asus don't include set_perms
I would have expected that some parts of my kernel would fight against this tweak, nice to see that it seems to work
Yean I don't know that some of the governor stuff is working 100%, still messing around with it .
Thanks man Been using TheSSJ kernel with this pack of tweak. Its awesome Thanks to both of you
Added in index, thanks for updating the mod!
taylor.fowler said:
@aziz07 Here you go.
Needed to use the update-binary from Asus to work with our x86 architecture and replace all the set_perms with set_metadata's. Apparently the update-binaries from Asus don't include set_perms
Click to expand...
Click to collapse
Thanks! Working A++
Edit: I tried running the script from terminal with no luck. I have to cleanup the alpha version first with the provided uninstaller by Paget96. Its a great idea to have the uninstaller zip working with x86.
++Uninstaller patched, permssions fixed, kudos @taylor.fowler
Need help can't get to run in terminal
Sent from my ASUS_Z00AD using Tapatalk
taylor.fowler said:
@aziz07 Here you go.
Needed to use the update-binary from Asus to work with our x86 architecture and replace all the set_perms with set_metadata's. Apparently the update-binaries from Asus don't include set_perms
Click to expand...
Click to collapse
how can i do that because not work for me
Have u guys tried with Kernel Adiutor?
su
LS > permission denied
selinux already permissive
chobztopz said:
su
LS > permission denied
selinux already permissive
Click to expand...
Click to collapse
I've got it too
The permission for LS file in system/bin is wrong. It should be 0755 (rwx rx rx) then it will done on terminal emulator
lordpipa said:
Have u guys tried with Kernel Adiutor?
Click to expand...
Click to collapse
I am using that.. But y u asked?
And guys only cleaner works it seems, he added logs for all option thankfully and only cleaner having log, others are blank, I can't run the options of LS..
mustatir said:
The permission for LS file in system/bin is wrong. It should be 0755 (rwx rx rx) then it will done on terminal emulator
Click to expand...
Click to collapse
Yep thanks, OP can you edit the updater script please...
After that script enable also same result, no log entered in those files..
Kernel samepage merging didn't came, no swap.. kernel auditor can enable kernel samepage merging even without this script. .. .
ansebovi said:
I am using that.. But y u asked?
And guys only cleaner works it seems, he added logs for all option thankfully and only cleaner having log, others are blank, I can't run the options of LS..
Yep thanks, OP can you edit the updater script please...
After that script enable also same result, no log entered in those files..
Kernel samepage merging didn't came, no swap.. kernel auditor can enable kernel samepage merging even without this script. .. .
Click to expand...
Click to collapse
Hrmph. I must have Ul'd the wrong version. I had the same issue. Will re-up in a couple hours.
@ansebovi cause u can use it for some of the init scripts.
Hmm, mine does all have logs. Yep, I had to set LS permissions to all in /system/bin folder. I think it might be because I still have the old alpha version files and I can't flash the uninstaller as it needs the x86 code.
Edit: ++Uninstaller patched, permssions fixed, kudos @taylor.fowler
Checked the updater-script. All functions are already available in TWRP itself, so normally you don't even need the updater-binary in the zip file, maybe this makes also the uninstaller work if you just delete the updater-binary from the zip file
TheSSJ said:
Checked the updater-script. All functions are already available in TWRP itself, so normally you don't even need the updater-binary in the zip file, maybe this makes also the uninstaller work if you just delete the updater-binary from the zip file
Click to expand...
Click to collapse
OK, so I fixed the updater-script (and found another error with setting the permissions on init.d). Apparently I had changed them to 0775 instead of 0755 :silly:
Also added the emergency uninstaller script too.
@TheSSJ I dont think that's how flashable zips work, but i tried anyhow. No dice...
taylor.fowler said:
@TheSSJ I dont think that's how flashable zips work, but i tried anyhow. No dice...
Click to expand...
Click to collapse
Bummer...was convinced this would work...twrp code at least shows that it executes updater-binary if present,otherwise it interprets the script itself...
Sorry!
Deprecated - Use the New ViPER4Android v2.7:
GO TO THE THREAD LINKED ABOVE. You don't need to flash any zips. Just install it as a regular apk, allow it to install the drivers, and you're good to go.
For magisk users: I made a zip on the repo that includes the original vdc's and my profile converter (will convert your old profiles to the new and better format).
For rootless users: I made a zip to install drivers and such
Zips can be found here
ALL SUPPORT QUESTIONS FOR 2.7 SHOULD BE AT THE THREAD ABOVE.
This is ViPER4Android FX and Xhifi Unity installers
These installers utilize my Unified installer that can install on Magisk OR System if Magisk is not detected (with Pixel support).
Credits of Originality:
- @zhuhang (Official Thread)
- @Osm0sis
- Viper's Audio (Official blog)
- @ViPER520
- @Team_DeWitt
Special Instructions:
If you already know which original v4a you want to use, just add 'old' for 2.3.4.0, 'mid' for 2.4.0.1, 'new' for 2.5.0.5, or 'mat' for material to the zipname prior to flashing.
If you already know if you want it installed as a user or system app, add "uapp" for user app or "sapp" to system app to zipname.
If you already know if you want to apply the libstdc++.so lib workaround, add "lib" or "nlib" to zipname (note that there are some devices that are already known to require it and so they'll apply workaround regardless of choice)
If you already know if your device/rom requires the v4a open/close/fc audioserver workaround, add "ocw" to zipname. Otherwise, add "nocw" to zipname
To skip volkeys (if your device isn't compatible with them), add "novk" to the zipname. Note that if you don't specify the above, defaults will be applied which are: sapp, new
Make sure there are no spaces in the zipname
Audio Mod Troubleshooting Guide
Downloads
XDA:DevDB Information
ViPER4Android FX Legacy/XHiFI [Unity], App for the XDA Community Apps
Contributors
ahrion, Zackptg5
Version Information
Status: Stable
Current Stable Version: v4.4
Stable Release Date: 2019-08-11
Created 2019-01-18
Last Updated 2020-01-01
great!
Hi, tried your two modules you've posted on my Nexus 6P stock ROM. March update. Both causing bootloop and using the uninstaller provided doesn't help. Have to use mount Magisk then go to file explorer in TWRP recovery and delete the modules from Magisk folder.
kartikb said:
Hi, tried your two modules you've posted on my Nexus 6P stock ROM. March update. Both causing bootloop and using the uninstaller provided doesn't help. Have to use mount Magisk then go to file explorer in TWRP recovery and delete the modules from Magisk folder.
Click to expand...
Click to collapse
Hmm. This is probably a kernel or magisk limitation with your rom. Are you running 11.6? Try to run it without the deep_buffer Remover because this is probably what bootloops your phone. It's only necessary when you've NEED it, otherwise it may cause adverse effects. Just install V4A and see if it works.
Currently magisk still has limited boot.img compatibility which causes so.e mods to not work properly or bootloops when it's not the mod itself.
ahrion said:
Hmm. This is probably a kernel or magisk limitation with your rom. Are you running 11.6? Try to run it without the deep_buffer Remover because this is probably what bootloops your phone. It's only necessary when you've NEED it, otherwise it may cause adverse effects. Just install V4A and see if it works.
Currently magisk still has limited boot.img compatibility which causes so.e mods to not work properly or bootloops when it's not the mod itself.
Click to expand...
Click to collapse
Hi, I'm on 11.6. I've tried both modules on their own and they both have caused boot loops unfortunately.
Thanks anyway..
kartikb said:
Hi, I'm on 11.6. I've tried both modules on their own and they both have caused boot loops unfortunately.
Thanks anyway..
Click to expand...
Click to collapse
Magisk limitation. @topjohnwu is always improving magisk. I do recommend may e trying another kernel for your device which may help compatibility.
Gave this module a go, and: it's a no go... Will not boot on my Nexus 6 running Vanilla ROM 7.1.1_r26, Franco Kernel r65 and Magisk v.11.6 - MagiskSU.
After flashing uninstaller the device still doesn't boot. Had to manually remove audmodlib from /magisk in TWRP to make it boot again. And it's in audmodlib the problem is. I did a quick test where I removed audmodlib after installation (kept v4afx in place) and it booted right up (with a non-functioning module, obviously).
Attaching installation and uninstallation recovery logs. Unfortunately I'm not at a computer with ADB, otherwise I would have captured a logcat of boot for you. Maybe later...
Didgeridoohan said:
Gave this module a go, and: it's a no go... Will not boot on my Nexus 6 running Vanilla ROM 7.1.1_r26, Franco Kernel r65 and Magisk v.11.6 - MagiskSU.
After flashing uninstaller the device still doesn't boot. Had to manually remove audmodlib from /magisk in TWRP to make it boot again. And it's in audmodlib the problem is. I did a quick test where I removed audmodlib after installation (kept v4afx in place) and it booted right up (with a non-functioning module, obviously).
Attaching installation and uninstallation recovery logs. Unfortunately I'm not at a computer with ADB, otherwise I would have captured a logcat of boot for you. Maybe later...
Click to expand...
Click to collapse
The only real thing in audmodlib is could be is service.sh or system.prop otherwise it would be the vendor file, which would mean that for some reason 11.6 is bugged for vendor file mounting. Try installing and remove those ONLY and and see if it fixes it.
If that fixes it then it's one of those two. And if you're cool can you see which one it is exactly.
ahrion said:
The only real thing in audmodlib is could be is service.sh or system.prop otherwise it would be the vendor file, which would mean that for some reason 11.6 is bugged for vendor file mounting. Try installing and remove those ONLY and and see if it fixes it.
If that fixes it then it's one of those two. And if you're cool can you see which one it is exactly.
Click to expand...
Click to collapse
There has been an issue with vendor mounting in Magisk, but I believe that was for devices with separate vendor partitions (Nexus 6P, Nexus 5X, etc). I haven't seen any commits on GitHub about it though (although I haven't been keeping that close attention), so I don't know if it's been fixed.
I did find the culprit though: it's system.prop. With that file removed from /magisk/audmodlib my device booted up just fine.
kartikb said:
Hi, I'm on 11.6. I've tried both modules on their own and they both have caused boot loops unfortunately.
Thanks anyway..
Click to expand...
Click to collapse
If you wanna try this is my module for Nexus phones. I use this in my Nexus 5X Stock and PureNexus
https://www.androidfilehost.com/?fid=529152257862713260
Sry ahrion for use your thread
Seyaru said:
If you wanna try this is my module for Nexus phones. I use this in my Nexus 5X Stock and PureNexus
https://www.androidfilehost.com/?fid=529152257862713260
Sry ahrion for use your thread
Click to expand...
Click to collapse
You are literally advertising your mods in everyone's threads. Stop this and make your own thread.
This is a magisk forum, not a system mod forum.
Didgeridoohan said:
There has been an issue with vendor mounting in Magisk, but I believe that was for devices with separate vendor partitions (Nexus 6P, Nexus 5X, etc). I haven't seen any commits on GitHub about it though (although I haven't been keeping that close attention), so I don't know if it's been fixed.
I did find the culprit though: it's system.prop. With that file removed from /magisk/audmodlib my device booted up just fine.
Click to expand...
Click to collapse
I will remove it with next release. Thank you man. This **** only started happening with 11.6. this was the reason Atmos was boot looping as well so I removed system.prop in Atmos.
Can you do me a favor and remove a few lines to see if it's just the specific lines? I think that certain lines don't play nice with your phone.
Remove the first part, low power audio tweaks, reboot and see if it works. If it doesn't then that's the culprit. If not then remove the first two on the other audio tweaks.
Seyaru said:
If you wanna try this is my module for Nexus phones. I use this in my Nexus 5X Stock and PureNexus
https://www.androidfilehost.com/?fid=529152257862713260
Sry ahrion for use your thread
Click to expand...
Click to collapse
Hi there, thanks for the suggestion. I've tried it already and it didn't work. Asked for drivers to be installed when I opened the app after installing the module and restarting the phone.
kartikb said:
Hi there, thanks for the suggestion. I've tried it already and it didn't work. Asked for drivers to be installed when I opened the app after installing the module and restarting the phone.
Click to expand...
Click to collapse
Enable permissive.
Turn off audiofx
ahrion said:
Enable permissive.
Turn off audiofx
Click to expand...
Click to collapse
I'll try again when I get a chance to. Thanks for the suggestion.
[UPDATED] ViPER4Android FX <2.5.0.5>
v1.1:
- Updated to Audio Modification Library (Magisk) v1.1
This should fix the boot loop issues seen in only Magisk v11.6
Download: Link - Mirror
Previous Changelogs (Unified installer):
HTML:
V1.0:
- Initial release
- Smali edits to automatically enable storage permissions
- Audio Modification Library v1.0 is included
- Unified installer that will install mod for both Magisk and System
- Pixel support included
- Magisk Template v3 support
kartikb said:
Hi, I'm on 11.6. I've tried both modules on their own and they both have caused boot loops unfortunately.
Thanks anyway..
Click to expand...
Click to collapse
Didgeridoohan said:
There has been an issue with vendor mounting in Magisk, but I believe that was for devices with separate vendor partitions (Nexus 6P, Nexus 5X, etc). I haven't seen any commits on GitHub about it though (although I haven't been keeping that close attention), so I don't know if it's been fixed.
I did find the culprit though: it's system.prop. With that file removed from /magisk/audmodlib my device booted up just fine.
Click to expand...
Click to collapse
Try 1.1.
ahrion said:
Try 1.1.
Click to expand...
Click to collapse
Thanks, I'll give it another go and report back.
Update: my phone reboots into Android fine now however it doesn't process audio on phone speaker.
kartikb said:
Thanks, I'll give it another go and report back.
Update: my phone reboots into Android fine now however it doesn't process audio on phone speaker.
Click to expand...
Click to collapse
Flash my deep buffer remover. Look in the magisk forum.
ahrion said:
Flash my deep buffer remover. Look in the magisk forum.
Click to expand...
Click to collapse
Thanks, it all finally works on my Nexus 6P. Now to try on my OnePlus 3..
AS OF 03/07/2018
Support and development of this module have been discontinued.
A replacement module can be found here : https://forum.xda-developers.com/apps/magisk/module-magisk-selinux-manager-t3760042
This is a very simple module that installs a post-fs-data.sh script which enables SELinux Permissive Mode. This is useful for certain audio mods and removes the need to understand Magisk's file system & boot logic. No need to create your own scripts, just flash and forget.
I have only tested this on my Verizon HTC 10, but this module is so simple and generic that it should work on any Android device with SELinux.
This module has been tested on and is compatible with Magisk v11.6-15.2.
Disclaimer & Recommendations: This module should be used as a last resort only if appropriate SELinux Permissions can not be generated and injected into the SELinux Policy using selinux-inject, supolicy or magiskpolicy. Putting your device into Permissive Mode will essentially disable all of the operating system level security built into Android and allow any app in any context to do whatever it wants. Actions requiring root access will still trigger your SU Manager App, but all apps have elevated privileges due to permissive and may be able to take malicious actions on your device without needing root access. If you find that this module fixes issues you are experiencing with an app I recommend contacting the app developer and trying to work with them to isolate the necessary SELinux Permissions and have them injected into the SELinux Policy at startup.
Here is a discussion of some of concerns to consider when running your device in Permissive Mode : https://forum.xda-developers.com/general/general/discussion-root-selinux-risks-t3607295
Github Repo : https://github.com/Jman420/magisk-permissive-script
Change Log :
v1.0 - Initial Release
v1.1 - Update to Module Template v1400
v1.2 - Update to Module Template v1500
thank you brother!
LeEco LePro 3 Atmos can work finally!
huaiyue said:
thank you brother!
Can you tell me how to install LeEco LePro 3 Atmos ?
I hava supersu systemless.
Click to expand...
Click to collapse
These two things are completely unrelated.
If you want to install something, you install it. There's not much more to that.
huaiyue said:
thank you brother!
Can you tell me how to install LeEco LePro 3 Atmos ?
I hava supersu systemless.
Click to expand...
Click to collapse
In Magisk, go to the Modules section, and select the "+", and select the zip you downloaded.
Jman420 said:
This is a very simple module that installs a post-fs-data.sh script which enables SELinux Permissive Mode. This is useful for certain audio mods and removes the need to understand Magisk's file system & boot logic. No need to create your own scripts, just flash and forget.
I have only tested this on my Verizon HTC 10, but this module is so simple and generic that it should work on any Android device with SELinux.
Github Repo : https://github.com/Jman420/magisk-permissive-script
Click to expand...
Click to collapse
LeEco LePro 3 Atmos can work
however
xposed systemless failed.
---------- Post added at 01:32 ---------- Previous post was at 01:31 ----------
ahrion said:
These two things are completely unrelated.
If you want to install something, you install it. There's not much more to that.
Click to expand...
Click to collapse
http://imgur.com/a/Sbf9p
dolby fc.
---------- Post added at 01:36 ---------- Previous post was at 01:32 ----------
jhedfors said:
In Magisk, go to the Modules section, and select the "+", and select the zip you downloaded.
Click to expand...
Click to collapse
thank you brother!
Thanks a lot
huaiyue said:
thank you brother!
LeEco LePro 3 Atmos can work finally!
Click to expand...
Click to collapse
Regarding your other post mentioning Xposed (which I'm not quoting cause it's a mess). I'm running on Nougat so I can't use Xposed and haven't tested with it. If you give me more details I can try to determine what the issue is. Logs, error messages, symptoms would all be helpful.
Thor™ said:
Thanks a lot
Click to expand...
Click to collapse
I aim to please
I don't understand why this mod is usefull. In the latest version of magisk, there is a semi enforce/permissive linux bypass. The system thinks it's enforced, but in reality is permissive. Or maybe I didn't fully understand it?
its working with s5neo?
I've just flashed this zip. This allows Viper4Android to run in enforcing mode:
https://www.dropbox.com/s/k9cnruw2e1t1d4t/ViPER4Android-supolicy.zip?dl=0
I forgot the source. Maybe Google it
matssa said:
I don't understand why this mod is usefull. In the latest version of magisk, there is a semi enforce/permissive linux bypass. The system thinks it's enforced, but in reality is permissive. Or maybe I didn't fully understand it?
Click to expand...
Click to collapse
I agree that Magisk hides the actual SELinux Mode in such a way that if Magisk Hide is enabled the 'getenforce' command always returns 'Enforcing'. But if you do not run the 'setenforce 0' command the SELinux mode will still be set to 'Enforcing' rather than 'Permissive'. This script puts the SELinux mode into 'Permissive' at startup. Magisk Hide will still hide the fact that you are in Permissive Mode, which I believe is the 'pseudo permissive' mode that Magisk describes. But I can not find any settings or commands within Magisk that enable Permissive Mode.
htr5 said:
I've just flashed this zip. This allows Viper4Android to run in enforcing mode:
https://www.dropbox.com/s/k9cnruw2e1t1d4t/ViPER4Android-supolicy.zip?dl=0
I forgot the source. Maybe Google it
Click to expand...
Click to collapse
It's just a shell script, the source is in the zip file. This is really helpful and is the direction I want to take this project. Permissive Mode is great in that it gets the Apps/Mods that we want to run to work, but I consider it the equivalent of using a sledgehammer to hammer in a finishing nail. I would much rather be able to grant the specific permissions that each App needs rather than enable all permissions for all apps (which is what permissive mode does).
I plan on trying to develop an App which will assist in managing and generating a script which uses 'supolicy' to inject individual SELinux Policy Permissions. I had planned on using the Dolby Atmos LePro3 build as a guinea pig to try to isolate which permissions it needs and put together the supolicy command for them. I've hit a bit of a roadblock in verifying my supolicy command due to the format that the SELinux Policy is stored in on the device. I've found a project called sedump (https://ge0n0sis.github.io/posts/2015/12/exploring-androids-selinux-kernel-policy/) which claims to deserialize the Binary SELinux Policy to a readable format, but I can't seem to get it to work... the process seems to complete, but it generates an empty file... If anyone has experience with SELinux I'd really appreciate any feedback.
cosmin691 said:
its working with s5neo?
Click to expand...
Click to collapse
Dunno, I've only got an HTC 10 for testing. Give it a shot, if it doesn't work just uninstall the Magisk Package. Remember to disable Magisk Hide if you are testing to make sure it actually put your phone into Permissive Mode by using the 'getenforce' command.
It works for oneplus 3t on freedom OS rom.
Jman420 said:
This is a very simple module that installs a post-fs-data.sh script which enables SELinux Permissive Mode. This is useful for certain audio mods and removes the need to understand Magisk's file system & boot logic. No need to create your own scripts, just flash and forget.
I have only tested this on my Verizon HTC 10, but this module is so simple and generic that it should work on any Android device with SELinux.
Github Repo : https://github.com/Jman420/magisk-permissive-script
Click to expand...
Click to collapse
this zip must be flashed using twrp rite ? or stock recovery also will do fine ? because i tried many times to flash recovery for samsung e5 5.1.1 but ended up with boot loop. now running all stock !!
X_GOD said:
this zip must be flashed using twrp rite ? or stock recovery also will do fine ? because i tried many times to flash recovery for samsung e5 5.1.1 but ended up with boot loop. now running all stock !!
Click to expand...
Click to collapse
Should be able to install it through Magisk Manager or TWRP. Let me know if you have problems.
matssa said:
I don't understand why this mod is usefull. In the latest version of magisk, there is a semi enforce/permissive linux bypass. The system thinks it's enforced, but in reality is permissive. Or maybe I didn't fully understand it?
Click to expand...
Click to collapse
Now, I have magisk 11.6 on EMUI marshmallows V4A driver was abnormal because Enforcing selinux. Same happened with SuperSU 2.79. When I changed to permissive mode using terminal emulato/kernerl aduitor init.d script emulator/su.d SuperSU script, V4A driver was normal and it was processing. I like Magisk a lot because of its xposed like modules. Now using jman420's permissive magisk module.
Thor™ said:
Now, I have magisk 11.6 on EMUI marshmallows V4A driver was abnormal because Enforcing selinux. Same happened with SuperSU 2.79. When I changed to permissive mode using terminal emulato/kernerl aduitor init.d script emulator/su.d SuperSU script, V4A driver was normal and it was processing. I like Magisk a lot because of its xposed like modules. Now using jman420's permissive magisk module.
Click to expand...
Click to collapse
Without this module, ARISE is working fine, processing in 48000 on my side, so for V4A I don't think this is necessary, at least on my side.
Sent from my OnePlus3 using XDA Labs
matssa said:
Without this module, ARISE is working fine, processing in 48000 on my side, so for V4A I don't think this is necessary, at least on my side.
Click to expand...
Click to collapse
For ARISE I used to flash permissive script by osm0sis. Otherwise no luck with V4A, AM3D and Dolby.
Thor™ said:
For ARISE I used to flash permissive script by osm0sis. Otherwise no luck with V4A, AM3D and Dolby.
Click to expand...
Click to collapse
Strange... Did you enable magisk hide? If not, that is the reason.
Sent from my OnePlus3 using XDA Labs
matssa said:
Strange... Did you enable magisk hide? If not, that is the reason.
Click to expand...
Click to collapse
No, I was using SuperSU 2.79. Same happened with MagiskSU.
Hello all
viper4android refreshes very rarely and can not keep up with nexus / pixels.
I have seen many guides that suggested deleting the configuration file in /etc/audio_effects.conf.
I think it's a horrible thing! in fact, just insert few strings into another file in /vendor/etc/audio_effects.conf
Under libraries sections:
v4a_fx {
path /system/lib/soundfx/libv4a_fx_ics.so
}
Under effects sections:
v4a_standard_fx {
library v4a_fx
uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b
}
it is very important that selinux is set to permissive mode.
Open a Shell :
$ su
# setenforce 0
P.S. install busybox first
MT88 said:
Hello all
viper4android refreshes very rarely and can not keep up with nexus / pixels.
I have seen many guides that suggested deleting the configuration file in /etc/audio_effects.conf.
I think it's a horrible thing! in fact, just insert few strings into another file in /vendor/etc/audio_effects.conf
Under libraries sections:
v4a_fx {
path /system/lib/soundfx/libv4a_fx_ics.so
}
Under effects sections:
v4a_standard_fx {
library v4a_fx
uuid 41d3c987-e6cf-11e3-a88a-11aba5d5c51b
}
it is very important that selinux is set to permissive mode.
Open a Shell :
$ su
# setenforce 0
Click to expand...
Click to collapse
Good guide but that setenforce 0 command doesn't stick after reboot as far as I know. To get it to stick you should use an app that does it or create a .sh file and add the permissive kernel code to it. Can't remember where the file goes though.
DEVILOPS 007 said:
Good guide but that setenforce 0 command doesn't stick after reboot as far as I know. To get it to stick you should use an app that does it or create a .sh file and add the permissive kernel code to it. Can't remember where the file goes though.
Click to expand...
Click to collapse
In viper's app there is an option "disable selinux".
You only have to go permissive with magisk and there's an module for it.
With SuperSU you can stay enforced.
Delete musicfx or audiofx and you're good.
Been trying for days to get viper to work,thanks man.works for me
coremania said:
You only have to go permissive with magisk and there's an module for it.
With SuperSU you can stay enforced.
Delete musicfx or audiofx and you're good.
Click to expand...
Click to collapse
personally I prefer to add two lines of code instead of installing an application that allows another application to work
Right very good guide, but you have to go and live permissive with it. The question is, what's better. If you root anyway ???
coremania said:
Right very good guide, but you have to go and live permissive with it. The question is, what's better. If you root anyway ???
Click to expand...
Click to collapse
this is a problem to be submitted to the viper developer
MT88 said:
personally I prefer to add two lines of code instead of installing an application that allows another application to work
Click to expand...
Click to collapse
Dev,you wouldn't happen to know how to get ATMOS working would you?
I prefer to go permissive as well, besides the fact that I'm always permissive even when I don't have V4A installed.
Also, you don't have to install an app, you just put a permissive script in your init.d(if not using Magisk). For Magisk, you put it in /magisk/.core/service.d/.
I've created my own flashable zips to do this, and since it's Magisk, as long as I don't clean flash, I never have to worry about it. [emoji41]
Sent from my Nexus 6P using Tapatalk
Curiousn00b said:
I prefer to go permissive as well, besides the fact that I'm always permissive even when I don't have V4A installed.
Also, you don't have to install an app, you just put a permissive script in your init.d(if not using Magisk). For Magisk, you put it in /magisk/.core/service.d/.
I've created my own flashable zips to do this, and since it's Magisk, as long as I don't clean flash, I never have to worry about it. [emoji41]
Click to expand...
Click to collapse
here we talk about viper. Magisk and company should be treated elsewhere. Just create an init file for selinux.
Not a Magisk module. If you're using Magisk, you can't stick the init.d script in /system/etc/init.d/ since the system won't being using that location IF you're using Magisk. That's why I included both locations just in case someone that's using Magisk came across the post.
Either way, I was still talking about Viper.
Sent from my Nexus 6P using Tapatalk
I've been using latest Magnum opus on 8.1 without any problems or changes needed to the system. And it works perfectly fine with viper+Dolby config
coremania said:
You only have to go permissive with magisk and there's an module for it.
With SuperSU you can stay enforced.
Delete musicfx or audiofx and you're good.
Click to expand...
Click to collapse
Maybe you can. Have never had ARISE or Viper work without permissive, on either Magisk or SuperSU.
Not maybe, supersu makes it possible to stay enforced with viper and dolby. With magisk Viper might be possible enforced but dolby will run only permissive with magisk.
Tested so many times.
coremania said:
Not maybe, supersu makes it possible to stay enforced with viper and dolby. With magisk Viper might be possible enforced but dolby will run only permissive with magisk.
Tested so many times.
Click to expand...
Click to collapse
Wrong.
snsone said:
Wrong.
Click to expand...
Click to collapse
After every reboot I guess
coremania said:
After every reboot I guess
Click to expand...
Click to collapse
Works after any reboot with enforcing, no need for permissive
Deleted
@snsone are you using android oreo? And if so, how are you doing that?
This script was made to 9.5.8 OP7 OxygenOS, some things can be different in future, so report if something is broken. Use at your own risk and feel free to experiment as this is a systemless mod.
First, the prerequisites:
1- Unlocked bootloader with Magisk and TWRP (you can use temporary TWRP if you please). If you don't know what is that, take a look at the XDA threads about it, it's easy. Please don't ask about "how to unlock bootloader" or "how to install Magisk".
2- Debloater (Terminal Emulator) Magisk module. Download it from Magisk Manager.
3- Any Terminal Emulator app.
4- import-debloat.txt config file. Download it here
5. Backup (yeah, this module doesn't change anything in /system and can be reverted at any time, but backups are always welcome)
6. Magisk Mount script. Download it from here
Magisk mount is needed to "reinstall" system apps by deleting the dummy folders from Magisk partition if something breaks.
If you have everything handy it should be a matter of few seconds to debloat.
Let's deal with useless system apps, temeletry, some ****ty apps. According from the @Tomatot- thread:
Tomatot- said:
-You'll get more privacy: I've removed Qualcomm telemetry, OnePlus telemetry as well as some Google Telemetry (but you can't expect too much as long as you use gapps)
-You'll get better battery life: less apps running in the background, less wakelocks, less services communicating with servers to send telemetry.
-You'll get better performance: for the same reasons. Don't expect a huge difference as our phone is very smooth already.
-The feeling of having a clean device. And this has no price.
Click to expand...
Click to collapse
Debloated apps list (It's the same Tomatot-'s Light app list):
Code:
AntHalService^=/system/app/AntHalService
AutoRegistration^=/system/app/AutoRegistration
BasicDreams^=/system/app/BasicDreams
BookmarkProvider^=/system/app/BookmarkProvider
BTtestmode^=/system/app/BTtestmode
PrintService^=/system/app/BuiltInPrintService
card^=/system/app/card
EasterEgg^=/system/app/EasterEgg
EgineeringMode^=/system/app/EngineeringMode
EngSpecialTest^=/system/app/EngSpecialTest
GooglePrint^=/system/app/GooglePrintRecommendationService
GoogleTTS^=/system/app/GoogleTTS
LogKitSdService^=/system/app/LogKitSdService
NetflixActivation^=/system/app/Netflix_Activation
NetflixStub^=/system/app/Netflix_Stub
NFCTestMode^=/system/app/NFCTestMode
OEMTCMA^=/system/app/oem_tcma
OEMAutoTestServer^=/system/app/OemAutoTestServer
OEMLogKit^=/system/app/OEMLogKit
OnePlusBugReport^=/system/app/OPBugReportLite
OnePlusCommonLogTool^=/system/app/OPCommonLogTool
OPSesAuthentication^=/system/app/OPSesAuthentication
PartnerBoorkmarksProvider^=/system/app/PartnerBookmarksProvider
PhotosOnline^=/system/app/PhotosOnline
PlayAutoInstallConfig^=/system/app/PlayAutoInstallConfig
QdcmFF^=/system/app/QdcmFF
RFTuner^=/system/app/RFTuner
SensorTestTool^=/system/app/SensorTestTool
SoterService^=/system/app/SoterService
Stk^=/system/app/Stk
Talkback^=/system/app/talkback
Traceur^=/system/app/Traceur
UIMRemoteClient^=/system/app/uimremoteclient
Video^=/system/app/Videos
WallpaperBackup^=/system/app/WallpaperBackup
WAPICertManage^=/system/app/WapiCertManage
WIFIRFTestApk^=/system/app/WifiRfTestApk
GoogleFeedback^=/system/priv-app/GoogleFeedback
OnePlusCellBroadcastReceiver^=/system/priv-app/OPCellBroadcastReceiver
Tag^=/system/priv-app/Tag
USBDrivers^=/system/etc/usb_drivers.iso
Reserve^=/system/reserve
RFToolkit^=/vendor/app/Rftoolkit
AmazonShittyApps^=/vendor/etc/apps
Account^=/system/app/Account
OPBackup^=/system/app/Backup
BackupRestoreRemoteService^=/system/app/BackupRestoreRemoteService
CarrierDefaultApp^=/system/app/CarrierDefaultApp
CTSShimPrebuilt^=/system/app/CtsShimPrebuilt
GoogleDrive^=/system/app/Drive
GoogleDuo^=/system/app/Duo
GooglePay^=/system/app/GooglePay
HTMLViewer^=/system/app/HTMLViewer
GooglePlayMusic^=/system/app/Music2
NVBackupUI^=/system/app/NVBackupUI
OnePlusPush^=/system/app/OPPush
YouTube^=/system/app/YouTube
BackupRestoreConfirmation^=/system/priv-app/BackupRestoreConfirmation
CallLogBackup^=/system/priv-app/CallLogBackup
CTSShimPrivPrebuilt^=/system/priv-app/CtsShimPrivPrebuilt
GoogleRestore^=/system/priv-app/GoogleRestore
GoogleBackupTransport^=/system/priv-app/GoogleBackupTransport
GoogleOneTimeInitializer^=/system/priv-app/GoogleOneTimeInitializer
ManagedPrivisioning^=/system/priv-app/ManagedProvisioning
OnePlusWizard^=/system/priv-app/OnePlusWizard
OPAppLocker^=/system/priv-app/OPAppLocker
OnePlusDeviceManager^=/system/priv-app/OPDeviceManager
OnePlusDeviceManagerProvider^=/system/priv-app/OPDeviceManagerProvider
SharedStorageBackup^=/system/priv-app/SharedStorageBackup
Let's start this!
1. Copy the import-debloat.txt config file to the folder /data/cache in the root. (you can copy it by a root explorer or reboot into recovery and copy it by TWRP file explorer)
2. Install the Debloater (Terminal Emulator) Magisk module using the Magisk Manager.
3. Open the terminal emulator app
> Type 'su' and press enter
> Grant root permissions
> Type debloat and press enter.
4. You will see the options to debloat in various categories which are self explanatory. As we have the config file which has a predefined app list to de-bloat stored in /data/cache folder in root already. Type 'i' which says import config and press enter 2 times.
5. Reboot 2 times and you're done most probably if nothing breaks.
Ta-dah! Fully debloated OOS. To keep the debloat after update the ROM, just reflash Magisk and you're fine. You don't need to do the procedure every update.
Read from here if something breaks (from @Sreekant)
If it breaks the system or causes boot-loop which shouldn't be the case as I'm using the OP7 9.5.8 and everything is fine, but well, **** happens. Don't worry! It's pretty easy to reinstall all of them in one click by TWRP.
Did you download the Magisk Mount script which I asked to earlier? If yes, just flash it with TWRP and the magisk will be mounted and accessible in TWRP file explorer. If you didn't download the script earlier, Just adb sideload it in recovery.
After mounting the Magisk in TWRP > Click on Advanced and go to file explorer.
Then delete the app folder of the system app you've uninstalled in /Magisk/terminal_debloater/system/app (/sbin/.core/img/terminal_debloater/system/app) or /Magisk/terminal_debloater/system/priv-app (/sbin/.core/img/terminal_debloater/system/priv-app) then that should undo it.
Click to expand...
Click to collapse
----------------------
Feel free to give any feedback about the script.
Special thanks to:
@Tomatot- (the apps list and some explanations are from his thread)
@Sreekantt (the thread base and original idea from debloat for Poco F1)
@topjohnwu (Magisk developer)
The Debloater (terminal) team
Hi, welcome and thanks for your work..as I understand , that is magisk module to use for debloat ? If you used script from Tomato, is it light debloat or which one. More info about that will be nice..thanks again
marko94 said:
Hi, welcome and thanks for your work..as I understand , that is magisk module to use for debloat ? If you used script from Tomato, is it light debloat or which one. More info about that will be nice..thanks again
Click to expand...
Click to collapse
I took the Light debloat from Tomatot and converted to Debloat (Terminal Emulator) module syntax. I will let it more clear in the thread.
I can convert the other two ones (Extreme and Invisible), specially Invisible would be fine to less experienced users.
Dan_Jacques said:
I took the Light debloat from Tomatot and converted to Debloat (Terminal Emulator) module syntax. I will let it more clear in the thread.
I can convert the other two ones (Extreme and Invisible), specially Invisible would be fine to less experienced users.
Click to expand...
Click to collapse
Yes, that will be cool.. also if we want edit some of script, for example we don't want debloat one app ,is it possible ? Thanks
marko94 said:
Yes, that will be cool.. also if we want edit some of script, for example we don't want debloat one app ,is it possible ? Thanks
Click to expand...
Click to collapse
Yes, just follow the syntax do add another system app to debloat:
Appname^=/system/path/to/appfolder
If you don't want to debloat some app, just erase the entry with the app that you don't want to remove.
You can find the system apps folder browsing /system/app and /system/priv-app. After every change to import-debloat.txt you have to run debloat and import again (to create the dummy empty folders.)
Edit it in Notepad++ to avoid format issues (at PC) or Quickedit (at cell phone).
Light it's the best choice.
Invisible it's to low and Extreme could be too hard on cleaning up. But it's up to you, of course.:good:
Dev any update for OB Q oos ? Thanks
Updated to Android 10 and doesnt appear to be working. Any debloat solutions for android 10 around?