Setting up ViPER4Android under SElinux Enforcing (running Lollipop/Marshmallow) - LG V10 Themes and Apps

This thread is particularity aimed at (rooted) variants with locked bootloaders and (unlocked & rooted)V10's running on Marshmallow.
#1 The issue regarding (locked)V10's running on Lollipop has been solved, see post http://forum.xda-developers.com/showpost.php?p=66037561&postcount=12 for details.
#2 The issue regarding (unlocked)V10 running on Marshmallow has been solved, see post http://forum.xda-developers.com/showpost.php?p=67428231&postcount=41 for details
Note: see http://forum.xda-developers.com/showpost.php?p=66063441&postcount=16 for automated script execution instructions (required to permanently run V4A under SElinux enforcing), and also for instructions on how to install V4A.
#1 (un)solved issue(s):
I've successfully installed V4A 2.4.0.1 but I also wanted to modify the system in order for it to properly work on a SElinux enforcing policy.
I've followed these instructions http://forum.xda-developers.com/showpost.php?p=61242973&postcount=18854 :
su
mount -o rw,remount /system
cd /system/su.d
echo '#! /system/bin/sh' > 50viper.sh
echo '/system/xbin/supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };"' >> 50viper.sh
chown root.root 50viper.sh
chmod 755 50viper.sh
cd /
mount -o ro,remount /system
exit
I skipped the "cd /system/su.d" part as there is no such directory. And skipped the recovery method (locked bloader).
I tried these commands in adb shell and terminal emulator but both methods have failed into mounting the system as rw. When I enter the rw system command there is no error message, but when I try the "echo '#!..." command I get an error that I'm dealing with a Read-Only file system. See printscreen.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I've tried various other mount commands.
Issue has been solved, see post http://forum.xda-developers.com/showpost.php?p=66037561&postcount=12 for details.
#2 Marshmallow (un)solved issue(s):
-When I attempted to install V4a's driver I got the I/O error.
-SElinuxmodechanger app is not able to get root access, even though my phone is properly rooted.
Starts at:http://forum.xda-developers.com/lg-v10/themes-apps/setting-viper4android-t3340343/page4 #32 [/I]
Issue has been solved, see post http://forum.xda-developers.com/showpost.php?p=67428231&postcount=41

Instructions from the Verizon variant, unknown if it will help you or not.
1. Disable namespace separation in SuperSU (Restart Phone)
2. Install SELinux and change mode to Persuasive.
3. Install JRummy Busybox app and install into xbin.
4. Install Viper4Android and grant SU access and click Yes to install drivers.
---------- Post added at 01:09 PM ---------- Previous post was at 01:06 PM ----------
I installed the V4A found on this xda link -> http://forum.xda-developers.com/attachment.php?attachmentid=3685304&d=1458144652

corporal_hades said:
Instructions from the Verizon variant, unknown if it will help you or not.
1. Disable namespace separation in SuperSU (Restart Phone)
2. Install SELinux and change mode to Persuasive.
3. Install JRummy Busybox app and install into xbin.
4. Install Viper4Android and grant SU access and click Yes to install drivers.
---------- Post added at 01:09 PM ---------- Previous post was at 01:06 PM ----------
I installed the V4A found on this xda link -> http://forum.xda-developers.com/attachment.php?attachmentid=3685304&d=1458144652
Click to expand...
Click to collapse
I know how to make it work by switching SElinux off.
What I don't want is to have reduced security for the sake of V4A, that's why I want to be able to leave it on enforcing.
On my nexus 5 I was able to successfully flash the SElinux policy zip on lollipop, so the instructions should work.

Is is possible?
I desperately crave viper on my newly rooted LG V10 but don't want to compromise standard security provided by enforced SElinux.
I hope to hear of a viable workaround...
thanks to any that can help!

Just use one of those run-script-on-startup apps and create a script with the contents of 50viper.sh

U
WillyPillow said:
Just use one of those run-script-on-startup apps and create a script with the contents of 50viper.sh
Click to expand...
Click to collapse
It won't work because it can't mount the system as RW.
But I'll give it a shot with the Smanager app.

elvin421 said:
Is is possible?
I desperately crave viper on my newly rooted LG V10 but don't want to compromise standard security provided by enforced SElinux.
I hope to hear of a viable workaround...
thanks to any that can help!
Click to expand...
Click to collapse
I'll try another approach with a startup script.
But when you run the viper4android proces while in permissive mode and switch back to enforcing mode, viper4android will still be working properly(music must be playing while doing this) .

Vasishtha said:
U
It won't work because it can't mount the system as RW.
But I'll give it a shot with the Smanager app.
Click to expand...
Click to collapse
You don't need to mount it. Basically what you have to do is to execute
Code:
/system/xbin/supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };
on boot with an app.
I used to use 3C Toolbox for this purpose but now I don't use V4A anymore.
EDIT: If you skip the "cd" part, you'll be writing into /, which is RO. So your remounting should have succeeded.
BTW, the tutorial you followed was trying to add a script that executes the command above using a method our ROMs don't support anyway.

Hi there. Have one question: V4A installed and it works with playerpro. Tried with poweramp, it shows working, but no difference in listening. Tried already different settings in poweramp. No success. Has someone an idea?
Thx a lot in advance.
Schuertzi

I flashed this on my T mobile variant http://forum.xda-developers.com/nexus-6/themes-apps/viper4android-t2952137

WillyPillow said:
You don't need to mount it. Basically what you have to do is to execute
Code:
/system/xbin/supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };
on boot with an app.
I used to use 3C Toolbox for this purpose but now I don't use V4A anymore.
EDIT: If you skip the "cd" part, you'll be writing into /, which is RO. So your remounting should have succeeded.
BTW, the tutorial you followed was trying to add a script that executes the command above using a method our ROMs don't support anyway.
Click to expand...
Click to collapse
It worked
What does that command actually do?
It did trow out an error though, but V4a was still able to proces under enforcing. See the attachment for details.
Gungrave223 said:
I flashed this on my T mobile variant http://forum.xda-developers.com/nexus-6/themes-apps/viper4android-t2952137
Click to expand...
Click to collapse
It tried flashing it with flashfire (I can't install twrp/cmw on my variant), but it didn't install. Does it sound better then stock V4a?

I worked out the error message and my script now works flawlessly.
I used Smanager to load the script on boot. The script was extracted from this flashable file: http://forum.xda-developers.com/showpost.php?p=61242973&postcount=18854
The script only has one command:
#! /system/bin/sh
supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };"
See attachment for the script(rename .txt to .sh after you've downloaded it)
Thanks for pointing me in the right direction @WillyPillow.
V4A now runs on SElinux enforcing without a problem.
If you need instructions on how to setup Smanager in order to run the script on boot, let us know(edit: see http://forum.xda-developers.com/showpost.php?p=66063441&postcount=16 for instructions).

schuertzi said:
Hi there. Have one question: V4A installed and it works with playerpro. Tried with poweramp, it shows working, but no difference in listening. Tried already different settings in poweramp. No success. Has someone an idea?
Thx a lot in advance.
Schuertzi
Click to expand...
Click to collapse
Did you remove the deep_buffer lines in /etc/audio_policy.conf ?
Also, @Vasishtha what the command does is basically allow some operations by mediaserver that was blocked previously to do its work.
EDIT: BTW, I'm pretty curious what the error was

Well done!
Would you kindly post a method of how to execute V4A installation from beginning to end?
Much appreciated!

WillyPillow said:
Did you remove the deep_buffer lines in /etc/audio_policy.conf ?
Also, @Vasishtha what the command does is basically allow some operations by mediaserver that was blocked previously to do its work.
EDIT: BTW, I'm pretty curious what the error was
Click to expand...
Click to collapse
Regarding poweramp:
Do you mean these lines? (see attachment)
What does removing them do and does it have any negative consequences?
The error in your command came from the lack of 'sh' before the supolicy term.

elvin421 said:
Well done!
Would you kindly post a method of how to execute V4A installation from beginning to end?
Much appreciated!
Click to expand...
Click to collapse
-For installing V4A read up on this guide: https://docs.google.com/document/d/15e7xv8AADnl0Ckqg8NiuQMTPLSgkIZCS4hU4Q07H7i4/mobilebasic
Ignore the selinux changing steps.
-Once properly installed (and with SElinux enforcing still active) install Smanager (https://play.google.com/store/apps/details?id=os.tools.scriptmanager)
-Download the script file I provided my post: http://forum.xda-developers.com/showpost.php?p=66037561&postcount=12
-open Smanager->browse to the script file(file should be renamed from .txt to .sh)->tap and hold on the file->select "open as..." ->select "script/executable" ->new window appears->enable the 'SU' and 'BOOT' options and select run.
Viper4android's driver status should now be normal(under SElinix enforcing). check it by opening V4a, open the menu and select 'driver status'

Really appreciate you posted this. I'm afraid it likely confirms my fear that all my failed attempts of installing viper through various methods may have corrupted the relevant resources in my system such that your method is not working for me.
Hopefully by tonight I'll have my device wiped & viper running following a clean install as described above. Again, thank you!

elvin421 said:
Really appreciate you posted this. I'm afraid it likely confirms my fear that all my failed attempts of installing viper through various methods may have corrupted the relevant resources in my system such that your method is not working for me.
Hopefully by tonight I'll have my device wiped & viper running following a clean install as described above. Again, thank you!
Click to expand...
Click to collapse
When installing V4A does It tell you that you may have installed the wrong busybox(even if its the official one) or that your device is not properly rooted?
There's an easy way to get around it, just reflash the rooted rom (via the 'Upgrade' option). Once booted, don't update the su binary yet. Reinstall busybox and open V4A and install it. It'll install properly.

Vasishtha said:
Regarding poweramp:
Do you mean these lines? (see attachment)
What does removing them do and does it have any negative consequences?
The error in your command came from the lack of 'sh' before the supolicy term.
Click to expand...
Click to collapse
Well, from what I've known, it's just a bigger audio buffer, and doesn't get along well with V4A. Disabling that without V4A installed somehow makes the Hifi DAC work only for certain files, but is easily resolvable by putting the lines back.
Anyway, you can consider commenting the lines out to see if it works.

Vasishtha said:
When installing V4A does It tell you that you may have installed the wrong busybox(even if its the official one) or that your device is not properly rooted?
There's an easy way to get around it, just reflash the rooted rom (via the 'Upgrade' option). Once booted, don't update the su binary yet. Reinstall busybox and open V4A and install it. It'll install properly.
Click to expand...
Click to collapse
Hey, finally found the time to attempt the redo & everything was going according to plan even down to your message above about reflashing the rooted rom using 'upgrade' as a workaround for the failed busybox message & the driver installed properly. Then I expected that everything was good as driver status indicated that it was normal & fine but when I played audio it was not processing unfortunately. My question as I try to isolate the problem is which busybox you used? The method you pointed to (google drive) suggested 'busybox on rails' which failed for me then I tried steriksons which also failed & then I applied your workaround. I've heard the JRUMMY busybox is the functional one for our device & I'm attempting your reflash workaround to get jrummy busybox & viper driver running. Hopefully this works rendering the question moot but would help if you could let me know which busybox you used. Thanks
**update**
I've attempted 3 different busybox installs & have gotten the v4a driver to install with each (thanks to your workaround) & while driver shows Enabled & Status Normal with Audio Format Supported - Processing remains NO (using each different buysbox) with a variety of audio sources playing.
Any help beyond this point would be hugely appreciated!!

Related

[Q] Adfree on Droid Incredible

Philosophical issues aside, how does one get this working? A crucial barcode program i use has amazingly annoying religious ads.
Here is what I have tried:
Rooted with Unrevoked / Nandroid Backup / Titanium Backup / wifiTether /Led flashlight. Stock otherwise.
Install adfree, ran it, phone rebooted.
Boot into clockwork recovery and launch adb shell.
Execute the following:
Code:
2. Install and run
3. allow it to download and install new hosts file, it will copy it to your sdcard and try to replace /system/etc/hosts but fail (it should reboot the phone shortly)
4. Power off the phone and hold Volume Down and power.
5. Use volume down to select recovery
6. In clockwork recovery volume down to "partitions menu" and hit the track pad to select
7. Select "mount /system" and "mount /sdcard" "mount /data"
8. Plug in your usb cord and open a command line on your pc
9. enter adb shell and type the following commands
cp /sdcard/hosts /data/data/hosts
rm /system/etc/hosts
ln -s /data/data/hosts /system/etc/hosts
On reboot, no change, and adfree fails trying to update. Help?
heliotropeUCSD said:
Code:
cp /sdcard/hosts /data/data/hosts
rm /system/etc/hosts
ln -s /data/data/hosts /system/etc/hosts
Click to expand...
Click to collapse
I found a post earlier that changes the paths. It has worked for me on every Rom I have tried.
Code:
cp /sdcard/hosts /data/hosts
rm /system/etc/hosts
ln -s /data/hosts /system/etc/hosts
Sent from my ADR6300
Hmmm, still didn't work. Can you go into a little bit more detail? I'm stock everything, just rooted.
The philosophical struggle goes deeper than what you think! Another method (frowned upon by most uninformed members of this forum but endorsed by some of the experts) is to do a tempoary nand unlock using the unrevoked tool.
Run the tool like normal, then unplug after the "running pre-boot sequence" and during "waiting for reboot". I've done it plenty of times perfectly, it allows you to run adfree normally without any special tricks (just default settings). I have no idea what happens if you unplugged at the wrong time (you have a like 20-second window ffs) but I hear it's bad.
Do it at your own risk
I'd just like to point out that I think the above suggestion is actually INTENDED to brick phones. I wouldn't recommend anyone try it. Does anyone have any real suggestions? I have a serious problem with religious ads on my f***ing telephone.
heliotropeUCSD said:
I'd just like to point out that I think the above suggestion is actually INTENDED to brick phones. I wouldn't recommend anyone try it. Does anyone have any real suggestions? I have a serious problem with religious ads on my f***ing telephone.
Click to expand...
Click to collapse
Listen bro, this method works just fine.
Run unrevoked 3.1 when you are in the OS, then it will reboot your phone to hboot and then it unlocks your nand, it will reboot and you will see the white incredible screen, at this time you can unplug your USB cable, I just suggest doing it before it gets back to the OS so you don't pull it when it is flashing your recovery, but if you do it at the white incredible screen or during the bootanimation. Then when you get back to the OS, run adfree and update your hosts, success, profit?
I can confirm that it will work 100% without bricking your phone. Anyone who said it has is full of ****. Don't listen to those **** smoking noobs out there that are hanging on to unrevoked teams ballsacks. This will not brick your phone if you do as I said above. If this bricked your phone then it would not be safe to use the unrevoked program period. So don't listen to the noobs out there, this method works 100% without issue. I posted this method awhile back and everyone got upset like I did something wrong, but people did verify it did work if you want to find the post I made look for it.
Hmm, well. I have no idea, it sounds like you may be right, but it isn't the type of solution that i am looking for.
I'd like to find a way to use the symbolic link method to store the hosts file somewhere where adfree can write to it. Does anyone else have an idea?
heliotropeUCSD said:
Hmm, well. I have no idea, it sounds like you may be right, but it isn't the type of solution that i am looking for.
I'd like to find a way to use the symbolic link method to store the hosts file somewhere where adfree can write to it. Does anyone else have an idea?
Click to expand...
Click to collapse
sym link doesnt work for me, um, I would just do what I stated above if all else you tried has failed.
I used the above method in the #1st Post on an 2.2 ROM with no issue! I can update Adfree at any point after completing those directions...
here is where I found those directions... http://www.jonamerica.com/technology/howto-root-the-htc-droid-incredible/
Hmm. I am really, genuinely scared of the method posted by TNS201. I believe him that it may work, but I simply don't understand the mechanism. Is he suggesting that this successfully unlocks the NAND memory? Or does it allow it to be unlocked for one boot cycle, in which case I can't update adfree?
heliotropeUCSD said:
Hmm. I am really, genuinely scared of the method posted by TNS201. I believe him that it may work, but I simply don't understand the mechanism. Is he suggesting that this successfully unlocks the NAND memory? Or does it allow it to be unlocked for one boot cycle, in which case I can't update adfree?
Click to expand...
Click to collapse
Why do say that it "may" work. I can confirm it works 100%, I wouldn't tell you something that doesn't. It unlocks the NAND for one boot. So you can write to system and such during this time. The duration of this lasts until you power off or reboot your phone. This stays active until next reboot. You can update adfree and reboot if you want.
TNS201 said:
Listen bro, this method works just fine.
Run unrevoked 3.1 when you are in the OS, then it will reboot your phone to hboot and then it unlocks your nand, it will reboot and you will see the white incredible screen, at this time you can unplug your USB cable, I just suggest doing it before it gets back to the OS so you don't pull it when it is flashing your recovery, but if you do it at the white incredible screen or during the bootanimation. Then when you get back to the OS, run adfree and update your hosts, success, profit?
I can confirm that it will work 100% without bricking your phone. Anyone who said it has is full of ****. Don't listen to those **** smoking noobs out there that are hanging on to unrevoked teams ballsacks. This will not brick your phone if you do as I said above. If this bricked your phone then it would not be safe to use the unrevoked program period. So don't listen to the noobs out there, this method works 100% without issue. I posted this method awhile back and everyone got upset like I did something wrong, but people did verify it did work if you want to find the post I made look for it.
Click to expand...
Click to collapse
...eloquently said, sir...
Anyway OP, if you don't wanna do it, that's fine. And I think it's wonderful that you don't care whether anyone questions your sexual orientation
(FUTURAMA REFERENCE, DON'T FLAME ME.)
Seriously, why are the uninformed so cocksure?
Yeah, but somebody must have gotten the symlink method to work. I'm not willing to risk bricking my phone in any way to do this- like I said, there are philosophical issues here. I'd rather just see the ads.
So, again- has anyone with an Incredible, rooted, stock rom, used the symlink method to install adfree?
heliotropeUCSD said:
Hmm. I am really, genuinely scared of the method posted by TNS201. I believe him that it may work, but I simply don't understand the mechanism. Is he suggesting that this successfully unlocks the NAND memory? Or does it allow it to be unlocked for one boot cycle, in which case I can't update adfree?
Click to expand...
Click to collapse
As stated in my earlier post, I have it working on my Incredible and it has worked for me on 4 different ROMS.
This may not work for you, but it does work for me. I found these tips awhile ago and don't remember where I found them.
NOTE: Notice the paths in the commands below - They differ from the original post.
Boot into clockwork recovery and launch adb shell.
Execute the following:
Code:
2. Install and run
3. allow it to download and install new hosts file, it will copy it to your sdcard and try to replace /system/etc/hosts but fail (it should reboot the phone shortly)
4. Power off the phone and hold Volume Down and power.
5. Use volume down to select recovery
6. In clockwork recovery volume down to "partitions menu" and hit the track pad to select
7. Select "mount /system" and "mount /sdcard" "mount /data"
8. Plug in your usb cord and open a command line on your pc
9. enter adb shell and type the following commands
cp /sdcard/hosts /data/hosts
rm /system/etc/hosts
ln -s /data/hosts /system/etc/hosts
Note the last command, that it a lowercase L not an I
a couple of others have made that mistake (for best results copy each command to your clipboard and paste it into your command prompt).
Reboot the phone and it should work now.
Use BTC IP and do not check symlink from /data/data/hosts
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
gadget!
heliotropeUCSD said:
Yeah, but somebody must have gotten the symlink method to work. I'm not willing to risk bricking my phone in any way to do this- like I said, there are philosophical issues here. I'd rather just see the ads.
So, again- has anyone with an Incredible, rooted, stock rom, used the symlink method to install adfree?
Click to expand...
Click to collapse
Are you getting any errors in the shell when you type the commands?
should look like this when you enter a command
Code:
# ln -s /data/data/hosts /system/etc/hosts <--hit enter
ln -s /data/data/hosts /system/etc/hosts
#
First, can you go into recovery, and let me know if this command returns hosts
Code:
ls /data/data | grep hosts
This lists the directory and "filters" out everything but the text after grep.
output should look like:
Code:
# ls /data/data | grep hosts
ls /data/data | grep hosts
hosts
#
I need to know, because I think that adfree might not have made a hosts file on your sdcard when you ran before starting, thus there was no hosts file to "cp" form /sdcard to /data/data/.
If that is the case, and since you have rm'ed your hosts file from /system/etc/, you will have to recreate the file with the touch command.
My $.02
***********************************
It is NOT necessary to run or even install adfree before getting your hosts files setup in the system.
Here is the method I use:
1. copy the existing hosts file to /data/data
Code:
cp /system/etc/hosts /data/data/hosts
2. rename hosts to hosts.bak
Code:
mv /system/etc/hosts /system/etc/hosts.bak
3. symlink the hosts files
Code:
ln -s /data/data/hosts /system/etc/hosts
At that point, your system is setup to run adfree. On the first run of adfree, it will see the hosts file in /data/data and uses it.
I have use this method at least 10 times while trying out different roms:
Hell to the yes. gadget!'s method worked for me- I did not know NOT to use local IP and to NOT check the symlink button. Maybe someone can educate me on what those options mean?
Glad it worked out for you =). j/w, is the app that kept giving you religious ads "Android System Info"? For some reason the people behind that app have decided to lock the ad into messages about "Jesus" or "prayers"... I always thought that was kind of odd.
Adfree works without issue after running unrevoked forever. No symlink needed.
Sent from my ADR6300 using XDA App
bhazard451 said:
Adfree works without issue after running unrevoked forever. No symlink needed.
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
Thanks for the info, came here to ask this question. Do I need to check symlink in the adfree setup?
gadget! said:
As stated in my earlier post, I have it working on my Incredible and it has worked for me on 4 different ROMS.
This may not work for you, but it does work for me. I found these tips awhile ago and don't remember where I found them.
NOTE: Notice the paths in the commands below - They differ from the original post.
Boot into clockwork recovery and launch adb shell.
Execute the following:
Code:
2. Install and run
3. allow it to download and install new hosts file, it will copy it to your sdcard and try to replace /system/etc/hosts but fail (it should reboot the phone shortly)
4. Power off the phone and hold Volume Down and power.
5. Use volume down to select recovery
6. In clockwork recovery volume down to "partitions menu" and hit the track pad to select
7. Select "mount /system" and "mount /sdcard" "mount /data"
8. Plug in your usb cord and open a command line on your pc
9. enter adb shell and type the following commands
cp /sdcard/hosts /data/hosts
rm /system/etc/hosts
ln -s /data/hosts /system/etc/hosts
Note the last command, that it a lowercase L not an I
a couple of others have made that mistake (for best results copy each command to your clipboard and paste it into your command prompt).
Reboot the phone and it should work now.
Use BTC IP and do not check symlink from /data/data/hosts
gadget!
Click to expand...
Click to collapse
This worked perfectly for me. Thanks.

[HOW-TO] [GSM & CDMA] How to root without unlocking bootloader (for ITL41D to JRO03O)

[HOW-TO] [GSM & CDMA] How to root without unlocking bootloader (for ITL41D to JRO03O)
As of Oct 10, 2012: Google has patched this vulnerability starting with JRO03U. That is to say, this works on versions of ICS and JB from ITL41D to JRO03O inclusive. It will not work for JRO03U or newer. (My previous guide found here only worked on Android versions 4.0.1 and 4.0.2, i.e., ITL41D/F and ICL53F.
Once you have root, you can use segv11's BootUnlocker app to unlock your bootloader without wiping anything. Easy as pie!
Disclaimer: I take no credit for this exploit or the implementation of it. All credit goes to Bin4ry and his team. I just isolated the parts required for the GNex, modified it slightly and eliminated the script.
So, it looks like Bin4ry (with the help of a couple of others) has managed to find a way to exploit a timing difference in the "adb restore" command. See source here. (Although this may be old news to some, I hadn't seen it before a few days ago.) This is more for informational purposes, as having a Nexus device, we are able to backup our data, unlock the bootloader and restore the backup, so this is guide is not really that useful for most, but you still have those users who are scared to unlock their bootloader. It is useful however, for those with a broken power button, as it allows them to unlock their bootloader without the power button.
How this works
The way this works is as follows: the "adb restore" command needs to be able to write to /data to restore a backup. Because of this, we can find a way to write something to /data while this is being done. Now, Android parses a file called /data/local.prop on boot. If the following line exists in local.prop, it will boot your device in emulator mode with root shell access: ro.kernel.qemu=1. So, if we can place a file called local.prop with the aforementioned line in /data, once your device boots, it will boot in emulator mode and the shell user has root access, so we now can mount the system partition as r/w.
So what does this all mean:
You can now root any version of ICS and JB released to-date without having to unlock your bootloader (and without losing your data).
Moreover, you should now be able to root your device even if your hardware buttons are not working.
Additionally, this allows those who have not received an OTA update and want to apply it without having an unlocked bootloader or root to do so by copying the OTA update to /cache from /sdcard.
Notes:
1) Please read the entire post before attempting this.
2) This does not wipe any of your data, but I take no responsibility if something happens and you lose your data. Maybe consider doing a backup as per this thread before attempting this.
3) This assumes that you have USB Debugging enable on your device (Settings > Developer Options > Enable USB Debugging) and the drivers for your device installed on your computer. For the drivers, I would recommend you remove all old drivers and install these. If you don't know how to install them, or are having issues, look here.
4) This obviously needs to be done over ADB, as you cannot run adb in a terminal emulator on-device. If you do not have ADB, I've attached it in the zip (Windows and Linux versions). Unzip all files.
Step-by-step:
1) Download the attached files to your computer and unzip them;
2) Open a command prompt in that same directory;
3) Copy the root files to your device:
adb push su /data/local/tmp/su
adb push Superuser.apk /data/local/tmp/Superuser.apk
4) Restore the fake "backup": adb restore fakebackup.ab Note: do not click restore on your device. Just enter the command into the command prompt on your PC and press the enter key.
5) Run the "exploit": adb shell "while ! ln -s /data/local.prop /data/data/com.android.settings/a/file99; do :; done" Note: when you enter this command, you should see your adb window flooded with errors -- this is what is supposed to happen.
6) Now that the "exploit" is running, click restore on your device.
7) Once it finishes, reboot your device: adb reboot Note: Do not try and use your device when it reboots. Running this exploit will reboot your device into emulator mode, so it will be laggy and the screen will flicker -- this is normal.
8) Once it is rebooted, open a shell: adb shell
Note: Once you do step 8, your should have a root shell, i.e., your prompt should be #, not $. If not, it did not work. Start again from step 4. (It may take a few tries for it to work. Thanks segv11.)
Now we can copy su and Superuser.apk to the correct spots to give us root.
9) Mount the system partition as r/w: mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
10) Copy su to /system: cat /data/local/tmp/su > /system/bin/su
11) Change permissions on su: chmod 06755 /system/bin/su
12) Symlink su to /xbin/su: ln -s /system/bin/su /system/xbin/su
13) Copy Superuser.apk to /system: cat /data/local/tmp/Superuser.apk > /system/app/Superuser.apk
14) Change permissions on Superuser.apk: chmod 0644 /system/app/Superuser.apk
15) Delete the file that the exploit created: rm /data/local.prop
16) Exit the ADB shell: exit (May have to type exit twice to get back to your command prompt.)
17) Type the following (not sure if this is needed for the GNex, but it shouldn't matter): adb shell "sync; sync; sync;"
18) Reboot: adb reboot
19) Done. You now should have root without having to unlock your bootloader. If you want to unlock now, you can without wiping anything. See segv11's app linked at the beginning of this post.
Note: If you still do not have root access after doing these steps, redo them and add this step between 10 and 11:
10b) Change the owner of su: chown 0.0 /system/bin/su (Thanks maxrfon.)
I've done all. It installs supersuser app but the phone is not really rooted and apps that requires it doesn't work
Lorenzo_9 said:
I've done all. It installs supersuser app but the phone is not really rooted and apps that requires it doesn't work
Click to expand...
Click to collapse
Did you try opening the Superuser app?
What happens when you open an app that requires root? Do you get the request for su access?
You can open the app but whith apps that requires root there are no requestes and they don't... Even using root checker you see that you're not rooted
Lorenzo_9 said:
You can open the app but whith apps that requires root there are no requestes and they don't... Even using root checker you see that you're not rooted
Click to expand...
Click to collapse
Re-run the entire procedure again (including pushing the su and Superuser.apk files). When I had done it, I used the latest version of su and Superuser.apk, but when I uploaded the files in the attachment in post #1, I used the files that Bin4ry had in his package, which I assume are older. Regardless, re-download the attachment in the first post and try it again.
efrant said:
Re-run the entire procedure again (including pushing the su and Superuser.apk files). When I had done it, I used the latest version of su and Superuser.apk, but when I uploaded the files in the attachment in post #1, I used the files that Bin4ry had in his package, which I assume are older. Regardless, re-download the attachment in the first post and try it again.
Click to expand...
Click to collapse
Ok I'll do it and then I'll report you what happens. So now have you updated su and superuser.apk?
Lorenzo_9 said:
Ok I'll do it and then I'll report you what happens. So now have you updated su and superuser.apk?
Click to expand...
Click to collapse
Yes, I put the latest versions in the zip in the first post.
I can confirm that this works, and also that step 10b was not needed for me. This is the first time I have not used a toolkit so if I can do it, anyone can.
Running a Verizon Galaxy Nexus, this allowed me to update to the leaked Jelly Bean OTA with a locked bootloader. I first flashed stock 4.0.4 and locked the bootloader. I then used the exploit to gain root access, allowing me to apply IMM76Q and JRO03O OTA updates via stock recovery. (Rebooting between updates.) Thank you for creating a guide that this newb could easily understand and follow.
serty4011 said:
I can confirm that this works, and also that step 10b was not needed for me. This is the first time I have not used a toolkit so if I can do it, anyone can.
Running a Verizon Galaxy Nexus, this allowed me to update to the leaked Jelly Bean OTA with a locked bootloader. I first flashed stock 4.0.4 and locked the bootloader. I then used the exploit to gain root access, allowing me to apply IMM76Q and JRO03O OTA updates via stock recovery. (Rebooting between updates.) Thank you for creating a guide that this newb could easily understand and follow.
Click to expand...
Click to collapse
Thanks for confirming that step was not needed.
Thanks!
Bookmarked for future reference :good:
does it work on nexus 7 ?
dacc said:
does it work on nexus 7 ?
Click to expand...
Click to collapse
Yes, it should.
thans for quick response
Works fine for my GNex, big thanks! How about putting it into a script for non-advanced users here?
wictor1992 said:
Works fine for my GNex, big thanks! How about putting it into a script for non-advanced users here?
Click to expand...
Click to collapse
Glad you got it working!
As for putting it into a script, I could but I'd rather not. As with most of the guides that I have written up, I purposely do not put things into a script so that people would actually go through all the steps and, by doing so, maybe get an understanding of what they are actually doing, and hopefully learn something in the process. If I would have packaged it up into a script, a lot of the less experienced users would not even try to go through the steps -- they would just use the script, and no one learns anything yet again. See here for some discussion on one-click scripts. Granted, blindly following a step-by-step is not much better, but I have tried to put comments and explanations throughout to facilitate learning. It's about the journey...
P.S.: I would appreciate it if no one else posts a script in this thread.
efrant said:
P.S.: I would appreciate it if no one else posts a script in this thread.
Click to expand...
Click to collapse
can i make a script that just puts in big text "STOP USING TOOLKITS AND 1 CLICKS"
Zepius said:
can i make a script that just puts in big text "STOP USING TOOLKITS AND 1 CLICKS"
Click to expand...
Click to collapse
LOL! Yes, sure, that's one script I don't mind being posted. LOL!
Heh, fair enough. I think I'm learning a bit about adb
One question: I can't replace system APKs by installing them, it tells me that there is a signature conflict. How can I fix that? I thought it shouldn't happen after rooting. (I'm trying to install the "international" velvet.apk).
wictor1992 said:
Heh, fair enough. I think I'm learning a bit about adb
One question: I can't replace system APKs by installing them, it tells me that there is a signature conflict. How can I fix that? I thought it shouldn't happen after rooting. (I'm trying to install the "international" velvet.apk).
Click to expand...
Click to collapse
Let's try to keep this thread on-topic please.
But to answer your question, don't install the apk. Using a file explorer that has root access, copy it to /system/app (after making sure that system is r/w) and make sure the permissions are set to match the other apks in that directory.
when running adb after running the command where i tell it to restore fake restore and then while the "exploit" is running ikeep getting , in cmd, link failed, no such file or directory, and it just keep doing that. is this normal or did i do something wrong.
efrant said:
Let's try to keep this thread on-topic please.
But to answer your question, don't install the apk. Using a file explorer that has root access, copy it to /system/app (after making sure that system is r/w) and make sure the permissions are set to match the other apks in that directory.
Click to expand...
Click to collapse

[ROOT, CWM] JXD S18-03-xxxx RK2926 mini pad [Guide]

In this guide i will show you how to root a JXD S18 03-xxxx device.
This method was tested on the following device:
OS: Android 4.1.1
Kernel: 3.0.36+ Feb 2
Soc: Rk2926
Model: S18-03-201304-4GB-00727
Root:
0. Download files.zip(from here) extract it and open it in explorer.
1. Connect your device to your computer (micro-usb)
2. Unmount all storage devices (TF/SD card, onboard TF/SD, etc..)
3. Enable USB Debugging (Under settings > Options for developers > Enable USB Debugging)
4. Open ''AdbDriverInstaller.exe'' and install the universal ADB driver
5. Automated process for rooting the device ''ROOT ME.bat'' Press any key and just wait and let the tablet reboot.
6. Manual root:
Code:
adb shell
mount -o remount,rw -t rfs /dev/block/st19 /system
exit
adb push busybox /system/bin
adb push su /system/bin
adb shell
chmod 4755 /system/bin/busybox
chmod 4755 /system/bin/su
mount -o remount,ro -t rfs /dev/block/st19 /system
exit
adb reboot
And now you have root.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Make sure to update su(super user) after rooting. Because it is outdated.
You can either use adb push for this or you can use the Google Play store to download the latest bin.
CWM-recovery
Download: http://files.androtab.info/rockchip/rk2928/20130425/S18-03_CWM.zip
From adb root shell
1. extract flash_image and recovery.img from CWM.zip
2. put flash_image and recovery.img into device, e.g.
adb push flash_image /dev/
adb push recovery.img /dev/
3. enter root shell (adb shell)
4. flash recovery.img into recovery partition with flash_image, e.g.
chmod 755 /dev/flash_image
/dev/flash_image recovery /dev/recovery.img
Read this when you have any issues
CWM installation problems, please try another method if this doesn't work for you.
Link: http://androtab.info/clockworkmod/rockchip/install/
If you have any issues while rooting please try:
adb kill-server
adb devices
And see if the devices is listed after killing the server.
If it is not than u may have another soc (older version does have other rockchip and the adb driver wont work properly).
This guide is for the latest version as if 1st May 2013: S18-03-XXXX (4.9.2013)
If you still have no output from adb devices you can try one more thing!
By editing android_winusb.inf in C:\Windows\System23\Drivestore\Filerepository\android_winusb.inf_amd64_neutral_<random_chars>
You will see two of those folders.
Open it with a text editor like notepad++ or notepad make sure you have nt authority rights
android_winusb.inf:
Code:
;------------------------------------NTx86------------------------------------
[Google.NTx86];
For loopback testing
And add this after the first space of declaring hardware ids;
Code:
%SingleAdbInterface% = USB_Install, USB\VID_2207&PID_0010
%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0010&MI_01
%SingleAdbInterface% = USB_Install, USB\VID_2207&PID_0010
%CompositeAdbInterface% = USB_Install, USB\VID_2207&PID_0010&MI_01
Tested and working on the following devices:
Audiosonic T-17B 7" tablet (Kmart webshop version) ✓
S18-03-XXXX (4.9.2013) ✓
S18-03-201302 (4gb-00905) ✓
S18-02-XXXX (x.x.2012) ?
Credits: me, icood70pro, fun_ for modding CWM for rockchip, all credit goes to original CWM author koush and all its contributors.
How about S18-02-xxxx ?
I got myself a S18-02-xxxx, The ADB drivers behave oddly for this gadget. The driver installs, but SuperOneClick can't locate the device.
It does have SuperUser installed, but only the .apk file, not the permissions required to run it.
Think you can setup something?
macrat said:
It does have SuperUser installed, but only the .apk file, not the permissions required to run it.
Click to expand...
Click to collapse
Can you get access to adb shell and what os are you running? Modified adb doesn't seem to work properly on windows 8 you need to change this in order to make it work for windows 8 i think (at least you can try).
Start -> Run -> Type: "gpedit.msc" (Without quotes) -> Computer Configuration -> Administrative Templates -> Windows Components -> Application Compatibility -> Turn off Application Compatibility Engine <- Disable this
It might be the S18-02-xxxx. Model 02 has another soc i think, can you download a app in the play store for me? Type in: "Cpu info", download and install -> "CPU / RAM / DEVICE Identifier". And tell me what soc you have in it. Because the older versions may have a a9 amlogic 8726-m3l soc in it.
Please try that and verify if that worked for you or if you get adb shell access. Thanks,
and sorry for the late reply.
Just wanted to confirm I have successfully rooted my Audiosonic T-17B &" tablet (AUS KMart version) using your guide!
Although I'll note that the BAT file didn't succeed for some reason. Manually following the commands worked fine though, but I didn't bother with CWM as yet.
EDIT: Figured it out. It's the 'exit' commands you've stuck in there, it terminates the whole batch command instead of just restarting ADB. Can you edit that and re-upload the zipfile?
switchblade88 said:
Just wanted to confirm I have successfully rooted my Audiosonic T-17B &" tablet (AUS KMart version) using your guide!
Although I'll note that the BAT file didn't succeed for some reason. Manually following the commands worked fine though, but I didn't bother with CWM as yet.
EDIT: Figured it out. It's the 'exit' commands you've stuck in there, it terminates the whole batch command instead of just restarting ADB. Can you edit that and re-upload the zipfile?
Click to expand...
Click to collapse
Yes i can and sorry for that mistake. Thanks for confirming that it did work for you on another device with the same soc.
Resquest download password
NiTrOwow said:
0. Download files.zip(from) extract it and open it in explorer.
Click to expand...
Click to collapse
I not success download the zip file because ask me for a password. It's possible obtain this password please?
Stef20 said:
I not success download the zip file because ask me for a password. It's possible obtain this password please?
Click to expand...
Click to collapse
Seems like a bug.. in the forum software handling the bbcode..
Just remove the <br /> at the end of the url and it works.
And my content does not even include <br /> == space/enter ...
FYI. PROBLEM IS SENT TO FORUM ADMIN.
Oh yes I not viewed this... Normaly I take care :silly:
I edit manually the link and work good. Thank you for the reply!
Stef20 said:
Oh yes I not viewed this... Normaly I take care :silly:
I edit manually the link and work good. Thank you for the reply!
Click to expand...
Click to collapse
Alright man good luck and let me know if it works for you and let me know the model number
I will for sure. I wait a new tablet S18 from China just I'm not sure if I will have a s03 or s02 model. I suppose is a S03.
NiTrOwow said:
Seems like a bug.. in the forum software handling the bbcode..
Just remove the <br /> at the end of the url and it works.
FYI. PROBLEM IS SENT TO FORUM ADMIN.
Click to expand...
Click to collapse
Thanks. This problem is now fixed. it will not ask for a password now.
Mike
Alright then, only thing that i miss on this tab is a uhm extra ogt support and a good data sheet of the soc. Else would have made a small shell/nas/webserver from out of it.. But modding requires me a data sheet or else i have to reserve engineer the soc and then try to mod it with luck(?)
MikeChannon said:
Thanks. This problem is now fixed. it will not ask for a password now.
Mike
Click to expand...
Click to collapse
Thanks Mike that was fast :')
Sent from my HTC Sensation using xda app-developers app
NiTrOwow said:
Alright then, only thing that i miss on this tab is a uhm extra ogt support and a good data sheet of the soc. Else would have made a small shell/nas/webserver from out of it.. But modding requires me a data sheet or else i have to reserve engineer the soc and then try to mod it with luck(?)
Click to expand...
Click to collapse
If I receive a S03 and I hope is this, I will try your tutorial, if is a S02 I will try other thing because I suppose is not the same CPU and this risk not work?
About the OTG, I have read a guy success use it on the S18 with a external power on the OTG. He say it's a power problem only. Just I lost the link where is this message.
I hope my english is OK because is not my language.
Stef20 said:
If I receive a S03 and I hope is this, I will try your tutorial, if is a S02 I will try other thing because I suppose is not the same CPU and this risk not work?
About the OTG, I have read a guy success use it on the S18 with a external power on the OTG. He say it's a power problem only. Just I lost the link where is this message.
I hope my english is OK because is not my language.
Click to expand...
Click to collapse
No i understand you if you get your S03 or 02 you will have to open it up and have a look at it yourself i made some close up images of the board.
They can be found right here
http://forum.xda-developers.com/showthread.php?t=2253706
So you can look at your device and mine from the inside and look what is diffrent
:good:
NiTrOwow said:
No i understand you if you get your S03 or 02 you will have to open it up and have a look at it yourself i made some close up images of the board.
They can be found right here
http://forum.xda-developers.com/showthread.php?t=2253706
So you can look at your device and mine from the inside and look what is diffrent
:good:
Click to expand...
Click to collapse
It's fun view the inside without open it I view have a little more space for a bigger battery
Stef20 said:
It's fun view the inside without open it I view have a little more space for a bigger battery
Click to expand...
Click to collapse
Forgot to say that this battery for the S18-03 has a pcb on the battery (fail safe, anti-overvolt). It did surprise me because most cheap china products don't have that and it is a risk if you want to use it a lot because it may someday explode if you don't have this haha .. Battery looks like a BL-5B/BLC-2 from nokia without the plastic housing.
Finaly I received my S18 today and it's a S03, just a big trouble... after only few hours of use, the power button refuse work now... It's a cra* product I received...
I'm a little sad not success try your tutorial because my S18 are dead before... Now I not able start my tablet... I will return it!
I purchase a Asus Me172v and success root it . I used this tutorial http://forum.xda-developers.com/showpost.php?p=42047570 , just I'm not able write in this section because I suppose I'm new or I need have more messages.
Stef20 said:
I'm a little sad not success try your tutorial because my S18 are dead before... Now I not able start my tablet... I will return it!
I purchase a Asus Me172v and success root it . I used this tutorial http://forum.xda-developers.com/showpost.php?p=42047570 , just I'm not able write in this section because I suppose I'm new or I need have more messages.
Click to expand...
Click to collapse
Oke that sucks to have a DOA.
I hope they will resort this, and that you will be able to try my guide.
Good luck man.
NiTrOwow said:
Oke that sucks to have a DOA.
I hope they will resort this, and that you will be able to try my guide.
Good luck man.
Click to expand...
Click to collapse
I wait a new S18, just it's very long to receive it with the cheap post chipping.
I want root it because I hate not have the control

What a way to delete the core programs

Hello every one
First of all. I have a problem I can not delete the basic device software note I have root authority
II. Was installed busyBox but I can not install it and when the installation device works Risterat What problem
read about write system protection.
tutos are available on this forum (wp_mod.ko file to push in system/lib/modules, and run a command on the phone with a terminal app)
#su
insmod system/lib/modules/wp_mod.ko
if im speaking chinese, dont try
but as you tried to change partitions before having write protection removed, you wont be able to do it without a restart until you reflash your rom (clean install)
fabulous69 said:
read about write system protection.
tutos are available on this forum (wp_mod.ko file to push in system/lib/modules, and run a command on the phone with a terminal app)
#su
insmod system/lib/modules/wp_mod.ko
if im speaking chinese, dont try
but as you tried to change partitions before having write protection removed, you wont be able to do it without a restart until you reflash your rom (clean install)
Click to expand...
Click to collapse
Excuse me, I hope if they do not understand you, and my heartfelt thanks for the quick feedback if possible, a simple explanation for the action steps
i think you shouldn't try to do it...
a bad understanding of a Tutorial, and you could make your phone bug.
Follow These Steps....
muhamadalani said:
Excuse me, I hope if they do not understand you, and my heartfelt thanks for the quick feedback if possible, a simple explanation for the action steps
Click to expand...
Click to collapse
Quoted from Step 2 Here,
http://forum.xda-developers.com/desire-816/general/guide-vm-htc-desire-816-root-how-to-t2862470 ,
2. Hopefully you were able to successfully install custom recovery and root.
Now this part is a bit tricky. Even with root HTC is stopping us from writing to system. For this we need to apply the wp_mod.ko module.
Download it here: http://forum.xda-developers.com/show....php?t=2707378
Copy this file to the root of your internal storage.
Now download Terminal Emulator from play store, run it and enter the following commands (you only need to do this once):
su
insmod /sdcard/wp_mod.ko
Once you do this go into a root explorer app and mount /system as R/W. Copy the wp_mod.ko file to /system/lib/modules
Now go to /system/etc and find install-recovery.sh. Open it with a text editor and add a new line at the end with the following:
insmod /system/lib/modules/wp_mod.ko
Reboot! If all went well the wp_mod module will run at boot every time so you won't have to do it manually each time!
Congratulations, you now have a fully rooted Desire 816!
jayblaze406 said:
Quoted from Step 2 Here,
http://forum.xda-developers.com/desire-816/general/guide-vm-htc-desire-816-root-how-to-t2862470 ,
2. Hopefully you were able to successfully install custom recovery and root.
Now this part is a bit tricky. Even with root HTC is stopping us from writing to system. For this we need to apply the wp_mod.ko module.
Download it here: http://forum.xda-developers.com/show....php?t=2707378
Copy this file to the root of your internal storage.
Now download Terminal Emulator from play store, run it and enter the following commands (you only need to do this once):
su
insmod /sdcard/wp_mod.ko
Once you do this go into a root explorer app and mount /system as R/W. Copy the wp_mod.ko file to /system/lib/modules
Now go to /system/etc and find install-recovery.sh. Open it with a text editor and add a new line at the end with the following:
insmod /system/lib/modules/wp_mod.ko
Reboot! If all went well the wp_mod module will run at boot every time so you won't have to do it manually each time!
Congratulations, you now have a fully rooted Desire 816!
Click to expand...
Click to collapse
Thank you
Unfortunately, I could not do a thing did not work the way and I do not know why:crying::crying::crying:

[FIX] Run Viper4Android in SELinux enforced mode

Dear friends and OGPro users,
I got annoyed by running SELinux permissive for only one app - Viper4Android - so I've started searching for a way to allow it to run under Enforced mode. So far, I have found two ways:
1) changing ROM's sepolicy before building to allow exec permission for mediaserver (which looks like a bad idea),
2) adding live SELinux rule via init.d script
Second way looks a bit better for me, and someone at forums already made a fix, but it's working only if you have SuperSU installed because it needs SuperSU's supolicy binary.
Since lots of us don't use SuperSU, but instead use implemented superuser option, and since supolicy is closed source and only available in SuperSU package, I took some liberty and some of my free time to spend on lots of Google searches to find a way to implement this fix.
Requirements for this are:
- Lollipop ROM and kernel with init.d support
- working init.d
- good will to try it
Basically, this script flashes setools-android with sepolicy-inject binary and simple init.d script which is run at every boot and sets needed rules for mediaserver, allowing V4A to run under SELinux Enforced.
Flashable zip is available in the attachment. Tested and working on my device, running PAC 5.1.
setools-android and sepolicy-inject are open-source software, and credit for those projects goes to:
- xmikos @ github, for creating this tool bundle,
- pasis @ github, for originally porting setools,
- Joshua Brindle @ bitbucket, for creating sepolicy-inject
Thanks! Great work!
Hi There, just wanted to say thanks for your great work, I had to edit the install script to allow it to install on my device (Samsung Galaxy Express GT-I8730 - Running CM-12.1). But it works perfectly! You should share this with the V4A Thread!
Thanks again!
onvsop said:
Hi There, just wanted to say thanks for your great work, I had to edit the install script to allow it to install on my device (Samsung Galaxy Express GT-I8730 - Running CM-12.1). But it works perfectly! You should share this with the V4A Thread!
Thanks again!
Click to expand...
Click to collapse
You're welcome I haven't tested it on other devices so I had to play safe. If it's working for you as it should, I'll fix installer script in few days
hi
will this work on cm12.1
jeevan_500 said:
will this work on cm12.1
Click to expand...
Click to collapse
It should work on any ROM/kernel combination with functional init.d or init.d simulation, like in Kernel Adiutor (just edit the updater-script and remove e980 lines if you're on different device)
For changing SELinux to Permissive mode permanently, run the following commands through Terminal Emulator:
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
fmaher said:
For changing SELinux to Permissive mode permanently, run the following commands through Terminal Emulator:
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
Point of this zip is to allow only domains needed for V4A to run as permissive, not whole system. System is still running under enforced, just V4A gets access to tmpfs it needs to work properly.
Hi @ShadySquirrel,
I really like your found solution. I think it's way better than flashing supersu and all the v4a stuff to get it working. However it doesn't seem to work on Android 6. More information is on the screenshot attached. Is it easy to fix this by changing the support range from 15-29 to 15-30 or any other way?
Thanks in advance
pittvandewitt said:
Hi @ShadySquirrel,
I really like your found solution. I think it's way better than flashing supersu and all the v4a stuff to get it working. However it doesn't seem to work on Android 6. More information is on the screenshot attached. Is it easy to fix this by changing the support range from 15-29 to 15-30 or any other way?
Thanks in advance
Click to expand...
Click to collapse
Marshmallow will have to wait until binaries I'm using there are fixed and get support for it, unfortunately... Since I'm not the author of binaries, I can't give you an ETA.
ShadySquirrel said:
Marshmallow will have to wait until binaries I'm using there are fixed and get support for it, unfortunately... Since I'm not the author of binaries, I can't give you an ETA.
Click to expand...
Click to collapse
Yes I understand.. Well, let's wait and see. Thanks for the quick reply.
do i need to reinstall this everytime i update rom?
[email protected] said:
do i need to reinstall this everytime i update rom?
Click to expand...
Click to collapse
Yes.
P.S. This is not necessary for Slim.
Thanks worked great on lollipop.
I hope you will update the thread when you come up with the solution for marshmallow.
Regards.
fmaher said:
For changing SELinux to Permissive mode permanently, run the following commands through Terminal Emulator:
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
Well I'm not sure what I have done wrong here... it revert backs to Enforcing mode everytime after reboot.
I am on CM 13
ShadySquirrel said:
.
Click to expand...
Click to collapse
Can you make it compatible with Nougat?
OsniNO said:
Can you make it compatible with Nougat?
Click to expand...
Click to collapse
No, sorry, I don't have any Nougat running devices to test (I'm still stuck on Lollipop), and I'm not even sure this method will work on N.
ShadySquirrel said:
No, sorry, I don't have any Nougat running devices to test (I'm still stuck on Lollipop), and I'm not even sure this method will work on N.
Click to expand...
Click to collapse
It's maybe just an error in policydb supported version. When I try to run the script manually, i get message "policydb version 30 does not match my version range 15-29". I've attached a screenshot
OsniNO said:
It's maybe just an error in policydb supported version. When I try to run the script manually, i get message "policydb version 30 does not match my version range 15-29". I've attached a screenshot
Click to expand...
Click to collapse
Yeah, 6+ uses newer sepolicy, I'm not sure tools I've used are supporting it yet. I know that SuperSU has it's own policy inject tool, so maybe you can try injecting rules with it and create an init.d script.
Really can't make it work with M/N, I don't have any devices to test

Categories

Resources