Everyone ecxited about xposed framework released for lollipop.. But there are many facing problems installing framework because of SELinux set to enforce by default.
You can check you Selinux status in settings - About phone
You can set the SELinux to Permissive temporarily by running the bellow two commands in Terminal emulator
su
setenforce 0
But it SElinux will change to default once you hard reboot your phone.. In order to keep it in permissive, you need to soft reboot always whenever reboot needed and it's quite annoying..
So I found a workaround to Set the SELinux to permissive on boot itself.
For this you need to have init.d support.. If you don't have just install it via universal init.d tool available in xda.. (just do a search, u will get it) install universal init.d and activate init.d..
Then go to /etc/init.d directory, create a file and rename it as "08setperm" (without quotes) and add the below lines in the file and save it..
#!/system/sh
setenforce 0
And give full permission (rwxrwxrwx) .. Use root Explorer to edit and give permissions..
Now hard reboot your phone and you can see SELinux is set to "permissive" on boot itself..
Now install Xposed framework by following the steps mentioned in the official xposed thread..
This method is tested in moto G and working fine for me... I'm not responsible for anything if happened with your mobile after trying this..
Ps: if you flash any new nightly or new rom, you need to add the file in to init.d directory again..
I posted this using my mobile. So pardon me if any formatting issues..
Hit thanks if i helped you..
Very obviously, can't set permissive on Galaxy S5. Hopefully soon though.
Thanks, I was looking for the enforce command to make a script. It worked perfectly for me on an S4.
LGtMgG2t said:
Thanks, I was looking for the enforce command to make a script. It worked perfectly for me on an S4.
Click to expand...
Click to collapse
Press thanks button dude instead of saying it..
Doesn't work on Z3 Compact (D5803) CM12 nightly.
Nexus 6
"Alright So i have everything down according to your installation guide, When i want to set the file "08setperm" is when root browser tells me that the operation failed even though it has SU Granted."
Okay so I did some tinkering, Got it to work Reboot but after the 2nd Reboot it Boot-looped, On my Nexus But it can work .
Scriptkiddie7 said:
"Alright So i have everything down according to your installation guide, When i want to set the file "08setperm" is when root browser tells me that the operation failed even though it has SU Granted."
Okay so I did some tinkering, Got it to work Reboot but after the 2nd Reboot it Boot-looped, On my Nexus But it can work .
Click to expand...
Click to collapse
Upgrade your root Explorer or super Su and try
Using the commands below should get permissive even after reboot
per http://forum.xda-developers.com/showpost.php?p=58887725&postcount=230
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "echo 0 > /sys/fs/selinux/enforce" >> /system/su.d/permissive.sh
chmod 755 > /system/su.d/permissive.sh
Zwulf said:
Doesn't work on Z3 Compact (D5803) CM12 nightly.
Click to expand...
Click to collapse
Which part didn't work? As far as I can tell, we don't have init.d support on the Z3 Compact yet. Was it the Universal init.d Tool that didn't work for you?
mattdm said:
Which part didn't work? As far as I can tell, we don't have init.d support on the Z3 Compact yet. Was it the Universal init.d Tool that didn't work for you?
Click to expand...
Click to collapse
CM has init.d support buddy.
aalupatti said:
Using the commands below should get permissive even after reboot
per http://forum.xda-developers.com/showpost.php?p=58887725&postcount=230
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "echo 0 > /sys/fs/selinux/enforce" >> /system/su.d/permissive.sh
chmod 755 > /system/su.d/permissive.sh
Click to expand...
Click to collapse
Doesn't work this way. You should have read following posts.
Solution:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Click to expand...
Click to collapse
Works!
Finally got a permissive system on reboot.
Edit: Doesn't help to get XPosed working on my Z3C though.
Another z3c here on the latest nightly, none of these methods even give me permissive status on boot...
EDIT: I lied I just had to install SuperSu
Solution:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Click to expand...
Click to collapse
This method worked for me also thank you sir :good:
Just dd the kernel partition and hex-edit the kernel command line (androidboot.selinux=permissive).
So i am using Xperia Z2 with CM12.
Now, the issue with this particular CM12 is that, in case if we do a soft reboot then xposed starts working but networks vanishes. The Network comes back upon a normal restart but with soft reboot the issue comes back.
I have used these steps to
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Make permissive survive a normal reboot but it doesnt work till i do a soft reboot. any help?
Exact same issue for me
I have same phone with CM12, when I soft reboot
1st soft reboot: no network
2nd soft reboot: screen goes black after unlocking the device
in last 2 days of multiple soft reboots, i got one soft reboot where xposed and network everything worked.
manu44 said:
So i am using Xperia Z2 with CM12.
Now, the issue with this particular CM12 is that, in case if we do a soft reboot then xposed starts working but networks vanishes. The Network comes back upon a normal restart but with soft reboot the issue comes back.
I have used these steps to
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Make permissive survive a normal reboot but it doesnt work till i do a soft reboot. any help?
Click to expand...
Click to collapse
Ok, so..
I want script who started on boot(set permissive), because i do not have soft reboot after every normal reboot to working Xposed. How to do it? I have CM12 Nightly on Xperia Z1.
If i wrote in terminal this script:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Click to expand...
Click to collapse
It's work on every boot phone or once?
Code:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Work cm12. No need soft reboot:good::good:
@UP:
Only wrote this in Terminal and all is it?
Rygiel98 said:
@UP:
Only wrote this in Terminal and all is it?
Click to expand...
Click to collapse
SuperSu + android terminal or adb shell
Related
Hey guys,
I had a nasty issue with Bi-Winning a couple weeks ago where I pushed custom framework and totally forgot about permissions. Apparently when you don't set the proper permissions it can really slow things down.
So I figured this could easily be avoided. So because of that and our CWM "Fix Permissions" option doesn't really do anything, I wrote this script to fix it!
Upon every boot, it will scan /system/app, /system/framework/, and /data/app and set the proper permissions for all the files in there.
Users
note if you're on Trigger 2.9.1+ or Bi-Winning V1+ you do NOT have to do this. It's built into your ROM already.
Flash the attached zip named "CWM_Flash_Permissions_Script.zip"
Ironically, it may not have the correct permissions after you flash it, so then do either of the following
1) Do these commands in ADB to set the correct permissions
Code:
adb shell
mount -o rw,remount /dev/block/stl9 /system
busybox chmod 777 /system/etc/init.d/*
or
2) Open up Root Explorer (or something similar)
navigate to /system/etc/init.d/
in there find the new file S30edt_perms
long press, and set the permissions
make it look like this
Code:
x x x
x x x
x x x
Here's the init.d script, it's really simple, but also effective
Code:
#!/system/bin/sh
# Permission script
# Written by Einherjar Dev Team
# www.edtdev.com
logFile=/data/edt/logs/S30edt_perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
mount -o rw,remount /dev/block/stl9 /system
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo " setting permissions (644) for $file" >> $logFile
chmod 644 $file
done
echo "chmodding init.d folder"
chmod 777 /system/etc/init.d
for file in /system/etc/init.d/*; do
echo " setting permissions (777) for $file" >> $logFile
chmod 777 $file
done
echo "Permissions set" >> $logFile
Very cool, thanks roman.
Very cool to post the code too... lets us linux newbs get our learn on!
Poser said:
Very cool, thanks roman.
Very cool to post the code too... lets us linux newbs get our learn on!
Click to expand...
Click to collapse
I'm a Linux noobie myself!
birgertime said:
I'm a Linux noobie myself!
Click to expand...
Click to collapse
[slight OT] Just getting wifi working on an old ideapad y510 in slackware was an epic struggle... (wicd my arse)
[back on topic] I wish more devs would post script contents (though we can easily download and look in vi or notepad)... it helps the learning curve immensely
grateful for all the work EDT and rest of dev community does. We all are.
Question: What does the fix permissions CWM do then?
Poser said:
[slight OT] Just getting wifi working on an old ideapad y510 in slackware was an epic struggle... (wicd my arse)
[back on topic] I wish more devs would post script contents (though we can easily download and look in vi or notepad)... it helps the learning curve immensely
grateful for all the work EDT and rest of dev community does. We all are.
Question: What does the fix permissions CWM do then?
Click to expand...
Click to collapse
I have no clue, lol. Never bothered looking at it
edit: I hate vi.
roman im gonna add S30edt_perms.zip to my rom ..ill add you to credits
birgertime said:
I have no clue, lol. Never bothered looking at it
edit: I hate vi.
Click to expand...
Click to collapse
lol.
Vi is about as stripped down as you can get when it comes to text based editors... (I know its blasphemous... but I dig notepad++, shhh... dont tell)
I get "Bad Mode"
gamefreakgcb said:
I get "Bad Mode"
Click to expand...
Click to collapse
Hmm, ok you might need super user permissions do this and let me knkow if it works:
1) type in "adb shell"
2) type in su (don't press enter yet)
3) turn your screen on & unlock it
4) press enter on the su prompt, then his yes on the screen
then try that chmod command again.
birgertime said:
Hmm, ok you might need super user permissions do this and let me knkow if it works:
1) type in "adb shell"
2) type in su (don't press enter yet)
3) turn your screen on & unlock it
4) press enter on the su prompt, then his yes on the screen
then try that chmod command again.
Click to expand...
Click to collapse
Gave permission, still "Bad Mode"
gamefreakgcb said:
Gave permission, still "Bad Mode"
Click to expand...
Click to collapse
bad mode in the command line? gotta give me something more here
if it' s when you run chmod +x try this one:
Code:
busybox chmod 777 /system/etc/init.d/*
birgertime said:
bad mode in the command line? gotta give me something more here
if it' s when you run chmod +x try this one:
Code:
busybox chmod 777 /system/etc/init.d/*
Click to expand...
Click to collapse
When I do that, I get
chmod: /system/etc/init.d/S01edt_systcl: Read-only file system
chmod: /system/etc/init.d/S20edt_gps: Read-only file system
chmod: /system/etc/init.d/S30edt_perms: Read-only file system
chmod: /system/etc/init.d/S50edt_zipalign: Read-only file system
chmod: /system/etc/init.d/S98edt_tweaks: Read-only file system
chmod: /system/etc/init.d/S99edt_complete: Read-only file system
gamefreakgcb said:
When I do that, I get
chmod: /system/etc/init.d/S01edt_systcl: Read-only file system
chmod: /system/etc/init.d/S20edt_gps: Read-only file system
chmod: /system/etc/init.d/S30edt_perms: Read-only file system
chmod: /system/etc/init.d/S50edt_zipalign: Read-only file system
chmod: /system/etc/init.d/S98edt_tweaks: Read-only file system
chmod: /system/etc/init.d/S99edt_complete: Read-only file system
Click to expand...
Click to collapse
Oh crap, thanks for pointing that out man. Easy fix
do this
Code:
mount -o rw,remount /dev/block/stl9 /system
busybox chmod 777 /system/etc/init.d/*
should work like a charm
by the way, next time you flash a newer edt rom, they already have this fix built in. since you overwrote the file, you'll need to run the above commands to set the correct permissions as they get messed up sometimes when modifying them.
That did the trick, thanks.
The script in the .zip says
Code:
# Permission script
# Written by Roman (birgertime)
# www.edtdev.com
logFile=/data/edt/logs/S30edt_perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo "setting permissions for $file" >> $logFile
chmod 0644 $file
done
echo "Permissions set" >> $logFile
Which is different than the OP. I'm confused.
MikeyMike01 said:
The script in the .zip says
Code:
# Permission script
# Written by Roman (birgertime)
# www.edtdev.com
logFile=/data/edt/logs/S30edt_perms.log
if [ -f $logFile ]; then
rm $logFile
fi
touch $logFile
echo "Setting permissions" >> $logFile
for file in /system/app/* /system/framework/* /data/app/*; do
echo "setting permissions for $file" >> $logFile
chmod 0644 $file
done
echo "Permissions set" >> $logFile
Which is different than the OP. I'm confused.
Click to expand...
Click to collapse
I notice that before... but got side tracked and forgot to mention something... I just pulled the one from in Bi-Winning V2 and have been ADB Push'ing that.
EDIT: Also noticed that the one that's in Dan_Brutal "Metrik Part 1- Pepperkake" is the wrong one.
Does this works on hd2 android? i really need this..
haysnamrip said:
Does this works on hd2 android? i really need this..
Click to expand...
Click to collapse
Should work on any Android that can run scripts
i flashed and its working.. no more changing permission after run fix_permissins on terminal emulator..
Hey Roman, thanks for yet another improvement for this phone!
Simple question: can I just download and push the S30edt_perms.zip to etc/int.d? And is this any good for CM7 based ROMs? I just checked and that file isn't in my init.d folder on Trigger Redux.
Thanks!
Sent from my rough sketch of a Vibrant on a brick.
I'm trying to make a script that will do a modification to the build.prop on boot.
Usually I flash the cm7 nightly and I pull the build.prop, modify it and push it back before the first boot. The idea is to make it easier for flashing roms on the go. Using custom_backup_list.txt seems to be a viable option but it will keep an old build.prop indefinitely.
Some of the properties that I want to change are
Code:
windowsmgr.max_events_per_sec=100
ro.sf.lcd_density=201
ro.config.ringtone=_Mosquito 16bit.mp3
ro.config.alarm_alert=Alarm_Beep_02.ogg
From what I read today CM7 looks for inituser.sh file at two different locations:
Code:
/sd-ext/userinit.sh
/data/local/userinit.sh
As of now I have tried without success doing the following
Make a userinit.sh script at /data/local with the following code
Code:
#!/system/bin/sh
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
setprop windowsmgr.max_events_per_sec 100
setprop ro.sf.lcd_density 201
setprop ro.config.ringtone "_Mosquito 16bit.mp3"
setprop ro.config.alarm_alert Alarm_Beep_02.ogg
I'm not sure if there's something wrong in the above code, or CM7 is not running the scripts on boot.
EDIT: after adb push the file I do
Code:
adb shell
chmod 755 /data/local/userinit.sh
I've been trying for several hours now. Still get issue with stuck at X.
This is my updated script. Not sure what is wrong...
Using CM7 nightly36
cavs intersectraven
ss4n1 script
dtapp2sd
this is my userinit.sh at /data/local
Code:
#!/system/bin/sh
file=/system/.bproped
if [ -f "$file" ]; then
echo "Done already"
else
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=202/g' /system/build.prop
sed -i '/ro.config.ringtone/d' /system/build.prop
sed -i '/ro.config.alarm_alert/d' /system/build.prop
echo "ro.telephony.call_ring.delay=1000" >> /system/build.prop
echo "ro.config.ringtone=_Mosquito 16bit.mp3" >> /system/build.prop
echo "ro.config.alarm_alert=Alarm_Beep_02.ogg" >> /system/build.prop
echo "windowsmgr.max_events_per_sec=100" >> /system/build.prop
echo > /system/.bproped
fi;
exit 0
I know where you're coming from. Takes a while to customize your phone manually after each nightly, so I actually have a custom script similar to what you're doing, which updates build.prop and other config files (hosts, gps.conf, etc). Only mine is run within the update.zip, using the recovery shell /sbin/sh.
For your method, you can try this ...
Code:
#!/system/bin/sh
MODIFIED=`cat /system/build.prop|grep "zeus_chingon"`
if [ "$MODIFIED" ];
then
echo "Done already"
else
mount -o remount,rw /system
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=202/g' /system/build.prop
RINGTONE=`cat /system/build.prop|grep "ro.config.ringtone"`
sed -i 's/$RINGTONE/ro.config.ringtone=_Mosquito_16bit.mp3/g' /system/build.prop
ALARM=`cat /system/build.prop|grep "ro.config.alarm_alert"`
sed -i 's/$ALARM/ro.config.alarm_alert=Alarm_Beep_02.ogg/g' /system/build.prop
echo "ro.telephony.call_ring.delay=1000" >> /system/build.prop
echo "windowsmgr.max_events_per_sec=100" >> /system/build.prop
echo "# Modified by zeus_chingon" >> /system/build.prop
mount -o remount,ro /system
fi
EDIT:
My own custom script is HERE. Feel free to modify for your own use.
ch33kybutt said:
I know where you're coming from. Takes a while to customize your phone manually after each nightly, so I actually have a custom script similar to what you're doing, which updates build.prop and other config files (hosts, gps.conf, etc). Only mine is run within the update.zip, using the recovery shell /sbin/sh.
For your method, you can try this ...
Code:
#!/system/bin/sh
MODIFIED=`cat /system/build.prop|grep "zeus_chingon"`
if [ "$MODIFIED" ];
then
echo "Done already"
else
mount -o remount,rw /system
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=202/g' /system/build.prop
RINGTONE=`cat /system/build.prop|grep "ro.config.ringtone"`
sed -i 's/$RINGTONE/ro.config.ringtone=_Mosquito_16bit.mp3/g' /system/build.prop
ALARM=`cat /system/build.prop|grep "ro.config.alarm_alert"`
sed -i 's/$ALARM/ro.config.alarm_alert=Alarm_Beep_02.ogg/g' /system/build.prop
echo "ro.telephony.call_ring.delay=1000" >> /system/build.prop
echo "windowsmgr.max_events_per_sec=100" >> /system/build.prop
echo "# Modified by zeus_chingon" >> /system/build.prop
mount -o remount,ro /system
fi
EDIT:
My own custom script is HERE. Feel free to modify for your own use.
Click to expand...
Click to collapse
Thanks for your help, I end up using your zip file with some modification. The problem that I keep encountering is that using the /data/local/userinit.sh method it get stuck on boot at X.
I saw in your buildprop.sh some settings like
Code:
ro.HOME_APP_ADJ=1
ro.HOME_APP_MEM=3072
what does each one do?
I use LauncherPro if that have anything to do with it.
ro.HOME_APP_ADJ determines oom_adj value and ro.HOME_APP_MEM determines memory threshold, for your chosen launcher app. In short, these settings help to keep the launcher resident in memory and thus reduce homescreen lag.
One thing you have know about the ro.* settings in build.prop, are that they are writeable one-time only, i.e. once any ro.* value has been set, it becomes read-only and you cannot use setprop to change it further.
So it seems that your orginal buildprop.sh script add to the first line of build prop by using the
Code:
sed -i '1i\Something' /system/build.prop;
to put it in "higher priority" so that it get run first and overlook the second occurence that might occur in the build.prop afterwards?
So if i want to add something to line number n it would be
sed -i 'ni\something' .......
zeus_chingon said:
So it seems that your orginal buildprop.sh script add to the first line of build prop by using the
Code:
sed -i '1i\Something' /system/build.prop;
to put it in "higher priority" so that it get run first and overlook the second occurence that might occur in the build.prop afterwards?
So if i want to add something to line number n it would be
sed -i 'ni\something' .......
Click to expand...
Click to collapse
That's correct.
Build.prop
Hi All,
By default my System folder didn't had the build.prop. i extracted it from the CM7 Rom made some changes and copied it to System folder and rebooted.
Changes ringtone(default) Playa.ogg to Rigel.ogg.
After reboot still Playa.ogg as my default ringtone.
What is figured was my Phone isnt including build.prop file
Any suggestions?
Thanx
Wildfire Rooted(CM7 Nightly 2.3.5)
I'm on OE2. I rooted and ran into the no deep sleep after rooting issue.
I've tried running this in Terminal and rebooting, but it didn't work:
mount -o rw,remount /system /system
mkdir /system/su.d
chmod 0700 /system/su.d
echo "#!/tmp-mksh/tmp-mksh" > /system/su.d/000000deepsleep
echo "echo 'temporary none' > /sys/class/scsi_disk/0:0:0:1/cache_type" >> /system/su.d/000000deepsleep
echo "echo 'temporary none' > /sys/class/scsi_disk/0:0:0:2/cache_type" >> /system/su.d/000000deepsleep
chmod 0700 /system/su.d/000000deepsleep
reboot
Click to expand...
Click to collapse
I've tried clearing cache by booting into stock recovery, and that didn't work.
My next step is to flash stock recovery in Flashfire, but I can't find the OE2 ATT Stock Recovery anywhere. Does anyone have it or anyone have any other ideas I can try?
Thanks!
My OP3T is rooted running currently on OOS 4.0.
I'm unable to find etc/selinux/config folder in OP3T. Hence couldn't set the SELinuxMode to permissive.
Any help is appreciated
gopinath_shiva said:
My OP3T is rooted running currently on OOS 4.0.
I'm unable to find etc/selinux/config folder in OP3T. Hence couldn't set the SELinuxMode to permissive.
Any help is appreciated
Click to expand...
Click to collapse
https://forum.xda-developers.com/showthread.php?t=2524485
or via Terminal:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Fir3start3r said:
https://forum.xda-developers.com/showthread.php?t=2524485
or via Terminal:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Click to expand...
Click to collapse
please note that that will trigger dm-verity (if it isn't disabled already) and safetynet.
Usually when I see this question here, it's someone trying to run ViPER4Android.
If so, all you need to do is create a file like "viper4android.sh" with this inside:
Code:
#! /system/bin/sh
supolicy --live "allow audioserver audioserver_tmpfs:file { read write execute };"
Put it in /su/su.d and set the permission on that file to 0700. This will allow it to run without having to set the kernel to permissive.
Spasticdroid said:
Usually when I see this question here, it's someone trying to run ViPER4Android.
If so, all you need to do is create a file like "viper4android.sh" with this inside:
Code:
#! /system/bin/sh
supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };"
Put it in /su/su.d and set the permission on that file to 0700. This will allow it to run without having to set the kernel to permissive.
Click to expand...
Click to collapse
Yes you're right. I'm doing this due to issue with V4A. The thing is I am unable to install Viper Audio driver. Whenever I tried to install, I am receiving an error like "driver install failed i/o error".
I found the one of the fix to above is setting SELinuxMode to permissive. Though I tried setting SELinuxMode to permissive through terminal via setenforce 0 , its not working either.
gopinath_shiva said:
Yes you're right. I'm doing this due to issue with V4A. The thing is I am unable to install Viper Audio driver. Whenever I tried to install, I am receiving an error like "driver install failed i/o error".
I found the one of the fix to above is setting SELinuxMode to permissive. Though I tried setting SELinuxMode to permissive through terminal via setenforce 0 , its not working either.
Click to expand...
Click to collapse
http://www.theandroidsoul.com/install-viper4android-nougat/ use this tut. (SELinuxMode = permissive -> not needed)
Fir3start3r said:
http://www.theandroidsoul.com/install-viper4android-nougat/ use this tut. (SELinuxMode = permissive -> not needed)
Click to expand...
Click to collapse
Thanks to the link. I followed the tutorial. Now i got error says busybox installation found on your device doesn't work. Any thoughts
gopinath_shiva said:
Thanks to the link. I followed the tutorial. Now i got error says busybox installation found on your device doesn't work. Any thoughts
Click to expand...
Click to collapse
Flash SuperSU (2.79...) again and download Busybox from Playstore -> open the app and press install
gopinath_shiva said:
Thanks to the link. I followed the tutorial. Now i got error says busybox installation found on your device doesn't work. Any thoughts
Click to expand...
Click to collapse
If the variant of Busybox from the Play Store doesn't work, try the one by @@osm0sis here named Busybox Installer. His version has never given me any problems whatsoever on the devices I used it with, which is the Moto X Pure on Marshmallow and the OnePlus 3T on Nougat.
I've updated my original post on the su.d script. It turns out that the entry is a bit different for this phone. The correct one to use is:
Code:
#! /system/bin/sh
supolicy --live "allow audioserver audioserver_tmpfs:file { read write execute };"
You'll also might have to use FX Compatible Mode to "Compatible" in V4A, otherwise it won't always work as it should.
This is a script based on this great post https://forum.xda-developers.com/showpost.php?p=70357867&postcount=734
I've compiled te steps needed for fix automation on this script, to spare some time.
First of all you need to be root to run this
You can run this script from any file manager (as root) no command line access needed.
Need to have ASUS camera previously installed, once the app is installed, just run the script (I have it saved on my SD card).
Be aware, after script finish to run your phone will reboot.
fixcamera.sh
Code:
echo "Fixing Camera..."
echo "Start..."
echo "Re-mount /system as rw file system..."
mount -o rw,remount /system
cd /system/priv-app
echo "Creating /system/priv-app/AsusCamera"
mkdir AsusCamera
echo "Updating permissions"
chmod 755 AsusCamera
echo "Copying AsusCamera base.apk to /system/priv-app/AsusCamera"
cp /data/app/com.asus.camera-1/base.apk /system/priv-app/AsusCamera
echo "Uninstalling Asus Camera"
cd /data/app/
rm -rf com.asus.camera-1
echo "Setting permissions"
chmod 644 /system/priv-app/AsusCamera/base.apk
res=`cat /system/build.prop |grep ro.epad.mount_point.microsd=/storage/sdcard1`
if [ -z $res ]
then
echo "ro.epad.mount_point.microsd=/storage/sdcard1" >> /system/build.prop
fi
echo "Installing Asus Camera base.apk"
cd /system/priv-app/AsusCamera/
pm install base.apk
reboot
Be sure to set proper permissions to script file.
It worked for me on CM 7.1.1 and Latest 7.1.1 LineageOs releases.
Haven't tried it with other Zenfone models, but you can take your chances.
NOTE: Asus Camera app will just dissapear on every update, so after every install, you need first install Asus Camera from market and run this.