yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] nicholseric:
Superuser.zip worked on unofficial cm12.1 for Galaxy Tab 3.0 8

root@lt01wifi:/system # tail -n 4 /init.rc
service su /sbin/su --daemon
class main
seclabel u:r:su_daemon:s0

root@lt01wifi:/system # cat /init.superuser.rc
# su daemon
service su_daemon /system/xbin/su --daemon
seclabel u:r:sudaemon:s0

on property:persist.sys.root_access=0
stop su_daemon

on property:persist.sys.root_access=2
stop su_daemon

on property:persist.sys.root_access=1
start su_daemon

on property:persist.sys.root_access=3
start su_daemon
root@lt01wifi:/system # which su
/sbin/su
root@lt01wifi:/system # uname -a
Linux localhost 3.0.31-tohenk+ #1 SMP PREEMPT Sat Oct 24 10:42:56 WIB 2015 armv7l GNU/Linux
root@lt01wifi:/system # grep ro.build build.prop
ro.build.id=LMY48W
ro.build.display.id=cm_lt01wifi-userdebug 5.1.1 LMY48W 943d78578c test-keys
ro.build.version.incremental=943d78578c
ro.build.version.sdk=22
ro.build.version.codename=REL
ro.build.version.all_codenames=REL
ro.build.version.release=5.1.1
ro.build.version.security_patch=2015-10-01
ro.build.version.base_os=
ro.build.date=Sat Oct 24 10:07:19 WIB 2015
ro.build.date.utc=1445656039
ro.build.type=userdebug
ro.build.user=toha
ro.build.host=Dev-PC
ro.build.tags=test-keys
ro.build.flavor=cm_lt01wifi-userdebug
# ro.build.product is obsolete; use ro.product.device
ro.build.product=lt01wifi
ro.build.description=lt01wifixx-user 4.4.2 KOT49H T310XXUBOD2 release-keys
ro.build.fingerprint=samsung/lt01wifixx/lt01wifi:4.4.2/KOT49H/T310XXUBOD2:user/release-keys
ro.build.characteristics=tablet
ro.build.selinux=1
root@lt01wifi:/system #

---------- Post added at 08:20 AM ---------- Previous post was at 07:34 AM ----------

Superuser did not work on meliusltespr aka sph-l600 aka Sprint Samsung Galaxy Mega 6.3 using philz touch cwm recovery 6.59.0, error after inflating update-binary was status 1 for superuser.zip
[Android Software/Hacking General [Developers Only]] phhusson:
Nice thanks. I'm currently tracking a problem with some recovery's busybox which doesn't have the mktemp command

Can you check if it's your case?

Nice, thanks!
[Android Software/Hacking General [Developers Only]] nicholseric:
looks like its there!

/tmp # mktemp --version
mktemp: unrecognized option `--version'

BusyBox v1.22.1 static (2014-12-22 15:11 -0800) multi-call binary.

Usage: mktemp [-dt] [-p DIR] [TEMPLATE]

Create a temporary file with name based on TEMPLATE and print its name.
TEMPLATE must end with XXXXXX (e.g. [/dir/]nameXXXXXX).
Without TEMPLATE, -t tmp.XXXXXX is assumed.

-d Make directory, not file
-q Fail silently on errors
-t Prepend base directory name to TEMPLATE
-p DIR Use DIR as a base directory (implies -t)
-u Do not create anything; print a name

Base directory is: -p DIR, else $TMPDIR, else /data/local/tmp

/tmp #

update_binary is failing failing silently here:

bootimg="$(grep -E '\b/boot\b' /etc/recovery.fstab |grep -oE '/dev/[a-zA-Z0-9_./-]*')"

looks like the regex \b isnt working:

/tmp # grep -E '\b/boot\b' /etc/recovery.fstab

/tmp # grep boot /etc/recovery.fstab

/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults

/tmp #

changing that to grep \/boot got things going

again on line 68 in bootimg.sh ?

if ! echo $INITRAMFS_FILES |grep -qE "\b$1\b";then

Dont worry about it, after all, this is a recovery I built to go with my ROM and I dont think anyone uses it. Plus, the only ROM using it is probably CM and CM has an open source su binary doesnt it?

I was able to dd TWRP 2.8.6.0 https://dl.twrp.me/melius/twrp-2.8.6.0-melius.img any newer version than that was too big for the stock recovery partition. With this recovery, I was able to flash superuser.zip and it worked as expected. I did this to unoficial CM12.1 http://xdaforums.com/galaxy-mega/orig-development/rom-cyanogenmod-12-1-09-10-15-t3199345 Given that CM is based on AOSP this probably means that it would be successfull on a factory ROM and any other AOSP ROM.
[Android Software/Hacking General [Developers Only]] toonlight:
Is iptables supposed to be working in superuser.zip? I clean installed Android M and then flashed superuser.zip (and downloaded your app). AFWall+ isn't working correctly. It appears to be able to successfully apply blocking rules, but I can't unblock things that I blocked previously.

When I first started AFWall+, it was in whitelist mode with nothing selected. I applied the rules and it successfully blocked everything. However now if I try whitelisting an app, or changing it to blacklist mode and not selecting anything, it doesn't work. So none of my apps can connect to the internet now unless I disable AFWall+ haha

Nexus 5 (stock 6.0.0 MRA58N + your root + xposed)
[Android Software/Hacking General [Developers Only]] phhusson:
It should work, and I've juste tested both whitelist and blacklist mode, they do work on a CAF 6.0.

Can you run adb logcat -s -b all auditd and give me back the results?
[Android Software/Hacking General [Developers Only]] toonlight:
Sure, I've attached the output. Happy to give any additional information.
[Android Software/Hacking General [Developers Only]] phhusson:
Thanks

SELinux doens't seem to be the problem here. Just to be sure, you did the log after trying to switch AFW+ configuration?

If you set to black list mode, and only then enable the firewall, everything is blocked as well?

Is everything blocked? i.e. if you try to access a server by IP it works?
[Android Software/Hacking General [Developers Only]] toonlight:
Hmm. I've re-installed the app and it appears to be working now. I'm not sure what was wrong, my only guess is that maybe XPrivacy was interfering with AFWall+ (made sure that /proc access wasn't blocked this time, though I'm not sure if it was before). Thanks for your help and sorry for taking your time on an issue that wasn't yours.

Edit: One thing that does show up in my logcat are requests to the sdcard from jp.naver.line (a messaging app called Line). The app gives an error when trying to open images stating "Can't use SD card." I know it can't be XPrivacy because I'm not blocking storage permissions, and I already tried reinstalling the app too :) Do you think this is an SELinux error?

I've attached a new log. I've also discovered that Swiftkey has the same sdcard errors (can't download languages). Perhaps this is a more general sdcard problem? Note that I don't actually have an sdcard (Nexus 5), it's just internal storage.
[Android Software/Hacking General [Developers Only]] phhusson:
I still think it can be my fault somehow. Either way, knowledge in both ways is always good

Welcome to Android's storage hell ;)

You most likely just need to restorecon -R /data
[Android Software/Hacking General [Developers Only]] toonlight:
This is what I get when I do that:

>adb shell restorecon -R /data
SELinux: Loaded file_contexts contexts from /file_contexts.
SELinux: Skipping restorecon_recursive(/data)

It doesn't seem to change anything. Am I doing something wrong?
[Android Software/Hacking General [Developers Only]] Lrs121:
I've been looking for that post, thank you. I'll try those steps and see if they work.

---------- Post added at 05:50 AM ---------- Previous post was at 05:44 AM ----------

I've been looking for that post, thank you. I'll try those steps and see what happens

This should not effect adb, nor will it enable it. You must enable adb in the developers options and make sure you have the drivers installed
[Android Software/Hacking General [Developers Only]] hp420:
Doesn't seem to be working for me with my n6. I've tried every kernel
[Android Software/Hacking General [Developers Only]] beren:
just to clarify, the noverity version is force encryption or not?

i am unencrypted, an want to stay like this...
[Android Software/Hacking General [Developers Only]] adrman:
noverity should force encryption. You want nocrypt, which should be noverity & nocrypt.
[Android Software/Hacking General [Developers Only]] mexiken:
Just to clarify:

nocrypt = no encryption but no r/rw of system.

Noverity: system r/rw but WILL force encryption

Correct???? No way to have no encryption and r/rw????
[Android Software/Hacking General [Developers Only]] cjkacz:
There is a way to run an overlay on N without layers manager app. If you have a saved overlay from a Marshmallow backup you can extract the overlay folder from the M ROM and put it in vendor/ in the N ROM. I did this using twrp file manager . When ROM boots it'll boot with your overlay installed.
[Android Software/Hacking General [Developers Only]] phhusson:
nocrypt should have system r/w, but I had a bug which made neither noverity nor nocrypt have r/w system.

Thanks to [MENTION=6062686]garrz[/MENTION] this has been fixed. Can someone retry latest (r189) noverity or nocrypt img?
[Android Software/Hacking General [Developers Only]] ShadowSoul:
r190 noverity and nocrypt are booth stuck at the google logo on my nexus 6p.
[Android Software/Hacking General [Developers Only]] Mr.Demous:
Stuck on google logo on my Nexus 6 as well. r190 noverity
[Android Software/Hacking General [Developers Only]] ANDR01DN00B:
What steps did you use to install the image?
[Android Software/Hacking General [Developers Only]] jayfallen:
N6 flashed r191 still no luck with system r/w...sad..
[Android Software/Hacking General [Developers Only]] hungmung:
I just flashed 191 on angler n and got adaway to apply so looking good so far will play around a little more in a bit to see how the rest works.
[Android Software/Hacking General [Developers Only]] mexiken:
I tried the nocrypt sir. Don't have r/rw. At least, not through File Explorer. Let me try another app.

Edit: Yea. Tried 4 different root explorers, no mounting of system. Can't delete any of the pre installed stuff via Titanium Backup or through deleting of system/app folders.
[Android Software/Hacking General [Developers Only]] RandomPooka:
Ok, I'm a bit fuzzy on the 4 flavors in the OP.

I get eng being permissive, and I'm viewing it as a last resort to be honest

As far as the rest are concerned.. That's where I get confused.

User sounds like the closest thing to the current systemless root I'm running on my N6/shamu. Enforcing selinux. It's the dm-verity and r/w talk that I'm seeing that's throwing me off.

Could someone possibly explain the functional differences a bit further for the three versions that aren't permissive?

---------- Post added at 12:53 PM ---------- Previous post was at 12:52 PM ----------

Ok, I'm less concerned about the decryption one, as I'm running encrypted from day one.

---------- Post added at 01:38 PM ---------- Previous post was at 12:53 PM ----------

Ok, I read the OP again, and finally caught that the verity and crypt versions are also permissive. At this point, I'm wondering if there's any reason at all that I shouldn't use the "user" version on shamu? I don't have any intentions on performing root actions beyond using titanium to back up and restore some of the user app data, and to maybe use Total Commander for browsing the Commander beyond just the sdcard
[Android Software/Hacking General [Developers Only]] CroW_D:
Could someone give me a copy from the 189 Boot.img cant find it anymore on the server. My mate told me the r/w works there..

Gesendet von meinem Nexus 6 mit Tapatalk
[Android Software/Hacking General [Developers Only]] Falitheman:
I tried the latest noverity (191), it gives me root access but doesnt turn off encryption, so i cant flash anything. i also tried the nocrypt (191) and im stuck on the boot animation. I'm using a nexus 6p btw
[Android Software/Hacking General [Developers Only]] adrman:
If we're talking about M, the term "permissive" as used in the OP, does not refer to selinux being permissive. Selinux is enforcing. Actually, the closest flavor to systemless root on your shamu would be the eng version. However, regarding the current root available for N, selinux IS permissive.
[Android Software/Hacking General [Developers Only]] RandomPooka:
So, how I'm reading this, there aren't any root solutions as of yet that retain selinux enforcing. Thanks for the response.
[Android Software/Hacking General [Developers Only]] adrman:
Where the N preview is concerned, I believe that is correct.
[Android Software/Hacking General [Developers Only]] minieod:
i know this is a little off topic from the actual boot.img .... but i used noverity-186 to get my n6p up and running with system root. its been working perfectly

except, twrp 3.0.0-1 from romracer (what i used, with no issue, while getting things set up) - now hangs at the twrp splash screen

are you other guys using twrp and lets you in? if so, mind sharing which version?

i echo that post ... 191 nocrypt gets me stuck at twrp splash, and also stuck at boot animation..... 191 noverity gets me stuck at twrp splash, but into OS....i also have full system root.....186 noverity gets me the same results as 191 noverity

when you say "so i cant flash anything" do you mean that you are stuck at twrp splash, or you get in, but need to decrypt

just hoping to combine this boot.img with some working version of twrp
[Android Software/Hacking General [Developers Only]] Lrs121:
Is this for the shield tablet series?
[Android Software/Hacking General [Developers Only]] minieod:
nope! talking about my nexus 6p running the N preview
[Android Software/Hacking General [Developers Only]] Falitheman:
I can get into twrp but it requires me to dycrpt. I actually had the same problem, but i realized the solution. All i had to do was enable secure start-up and boom. This should solve your problem of getting stuck at the splash screen. Im also using the same version of twrp as you
[Android Software/Hacking General [Developers Only]] parthabhatta:
nexus 5X on Android N - tried with su versions r191

su-eng - everything Ok but no read / write to system

su-eng-noverity - read / write to system allowed but TWRP stops at splash screen (MY phone is not encrypted)

su-eng-nocrypt - into bootloop

su-eng-user - didn't try

Need a noverity version whihc doesn't interfere with TWRP.

Regards
[Android Software/Hacking General [Developers Only]] ohad129:
Version 191 nocrypt works fine over my N6 preview N
[Android Software/Hacking General [Developers Only]] erispimp:
Thanks guys
[Android Software/Hacking General [Developers Only]] Lrs121:
Recovery logs and kmsg for each that don't work will help.
[Android Software/Hacking General [Developers Only]] phhusson:
If su-noverity boots, it means it is encrypted.

This is most likely the reason you're having a bootloop in nocrypt: you need to factory reset to switch from encrypted to not encrypted.
[Android Software/Hacking General [Developers Only]] Falitheman:
Are you saying to disable encryption we first have to flash nocrypt and then do a factory reset?:confused:
[Android Software/Hacking General [Developers Only]] Lrs121:
Yes. If your device was using a boot image that had force encryption enabled(like stock does), the just flashing the nocrypt image will not decrypt your device it must be factory reset. And in the rare case you may have to wipe the user data partition using fastboot
[Android Software/Hacking General [Developers Only]] xternal:
I have installed boot-bullhead-MHC19J-su-user-r191.img on my nexus 5x.

Having the issue with editing hosts file and adaway. I tried su --bind /data/data/hosts:/system/etc/hosts, however it says 'failed to open binds file'

Is this a known issue with the user install. Do I need to go to eng?

Cheers
[Android Software/Hacking General [Developers Only]] Lrs121:
I think you may need the eng version. User doesn't have access to /data
[Android Software/Hacking General [Developers Only]] phhusson:
Well su --bind is primarily targeted at "user" variant

But su is indeed not supposed to have access to /data/data, so one would have to put the file somewhere else.

As mentioned before, if doing it from adb, /data/local/tmp/ is a good place to put files.
[Android Software/Hacking General [Developers Only]] nicholseric:
In the N preview, to turn on the floating window feature, you need to have /system/etc/permissions/freeform.xml. Has any forther work or ideas formed around an overlay for adding files to system?

Also, just like post #208, I can not remove a bind using $su --bind '!/system/etc/permissions/freeform.xml'
[Android Software/Hacking General [Developers Only]] phhusson:
My lazyness suggestion would be to add the <feature/> line in android.software.live_wallpaper.xml and su--bind it

Also, --bind option never work as root, you're mentioning a # before your command, does it mean you're running it as root?

I really need to make an UI for bind edition/deletions...
[Android Software/Hacking General [Developers Only]] nicholseric:
Was jsut using # to signify that it was the command. It was really $su --bind '!/system/etc/permissions/freeform.xml'

I ended up deleting /data/su/bind and recreating my hosts bind. A gui for --init and --bind would be so great!

On a separate note, earlier I stated that setprop and local.prop did not work for setting my dpi to 360. What did work was as root, #wm density 360, and it is persistent.

---------- Post added at 10:24 PM ---------- Previous post was at 10:21 PM ----------

This got me the desired DPI!

#wm density 360
[Android Software/Hacking General [Developers Only]] nicholseric:
Yes, adding the relevant feature tag to a /data/local/tmp copy of the android.software.live_wallpaper.xml and su --binding it worked just fine. FYI, on the Nexus 6, freeform window looks best at 280 DPI and lower. No need to change /system.

http://arstechnica.com/gadgets/2016/03/this-is-android-ns-freeform-window-mode/
[Android Software/Hacking General [Developers Only]] Didgeridoohan:
Just curios if it's your app or one of the "others" that they're talking about here: http://source.android.com/security/advisory/2016-03-18.html
[Android Software/Hacking General [Developers Only]] phhusson:
It's KingoRoot.

I'm not using any security flaw, my root uses an unlocked bootloader.
[Android Software/Hacking General [Developers Only]] skulldreamz:
[MENTION=1915408]phhusson[/MENTION] sent you a pm
[Android Software/Hacking General [Developers Only]] nicholseric:
I swear there was a https://superuser.phh.me/stable/nexus/shamu/MMB29V yesterday and now I dont see it?

So I used superuser.zip with "user noverity encrypt" and I got an error with mount binding the hosts:

2|shell@shamu:/data $ su --bind /data/local/tmp/hosts:/system/etc/hosts

BIND: Distant file NOT unique. I refuse.

1|shell@shamu:/data $
[Android Software/Hacking General [Developers Only]] adrman:
Try this http://superuser.phh.me/nexus/shamu/MMB29V/
[Android Software/Hacking General [Developers Only]] ulao2:
please delete, wrong thread.
[Android Software/Hacking General [Developers Only]] adrman:
[MENTION=1915408]phhusson[/MENTION] Thanks for the updated Nexus images. :good: Regarding the superuser.zip and superuser170.zip on the top level of the build bot, I noticed they haven't been updated in some time. I was thinking of trying one on a custom kernel (I had been successful in the past), but wanted to inquire before proceeding, as I wasn't sure if they would yield the same results as the current images. Thanks again.
[Android Software/Hacking General [Developers Only]] nailyk:
Everything is working like a charm.

Galaxy nexus (maguro) fresh installation of AOSP 6.0.1 2016-04-04.

First, I'm sorry if I miss something reading the thread.

Just a thing: Your app is also available on f-droid. Maybe you can add the link or a note?

What should be done by the testers? I have a 'z3' in 'production' and a galaxy nexus maguro in test/devel. Can it be useful?

Thanks for the work and being open-source!
[Android Software/Hacking General [Developers Only]] phhusson:
Good point. Done

Just telling me that special/weird (like this extra-old) devices work, and telling me when apps doesn't work :)

Thanks for your feedback
[Android Software/Hacking General [Developers Only]] w1nst0n sm1th:
Can the zip be manually installed on unpacked file system ?

I succesfully rooted this way a cube i7 [remix os v 1.0] tablet.

I will soon receive a teclast x98 plus, based on android 5 or 5.1. I will keep it for experimentation. So i guess i want to test it on that tablet.
[Android Software/Hacking General [Developers Only]] w1nst0n sm1th:
Is it possible to add teclast x98 and x98 plus in boot bot [or bot something] in the repository ?
[Android Software/Hacking General [Developers Only]] nailyk:
Sorry but for me the url is not well parsed in your first post :o

I found something with my stone age phone:

I install cyanogenmod file manager and root is not detected (settings, general parameters, Access mode: cannot switch). But I'm pretty sure it is a file manager bug. It works fine on my z3 cm12.1.
[Android Software/Hacking General [Developers Only]] bifkit:
su --bind error

I get the same result on my Nexus 6 with shamu-MMB29V-su-user-r196.

Is there any more information on the --bind command syntax and requirements? I can't figure out what I'm doing wrong.
[Android Software/Hacking General [Developers Only]] JavaTiggy:
I was about to flash MMB29X on my N6 shamu with your eng boot img and saw that there is a new build MOB30D but no boot img yet. Just checking in. Thanks.
[Android Software/Hacking General [Developers Only]] androcraze:
I wonder if that "superuser-r170.zip" will work in the meantime....
[Android Software/Hacking General [Developers Only]] phhusson:
Thanks for the information. I updated it.

Yup it should work.

I put an updated version, though I kept r170 because it has been more widely tested.
[Android Software/Hacking General [Developers Only]] JavaTiggy:
Worked like a charm I am now rooted on MOB30D. Thank you
[Android Software/Hacking General [Developers Only]] hgoldner:
Just letting you know that from time to time I have run the boot patch successfully on an HTC 10 for Verizon. Earlier pre-release ROMs were more compliant; having issues with the device not always waking up on current pre-release ROMs. Other testers not having issues on the 10.
[Android Software/Hacking General [Developers Only]] MarkGbe:
N dev preview 2 out today, npc91k. Hoping a new set of boot images will appear for the whale.

Thanks for your work.
[Android Software/Hacking General [Developers Only]] phhusson:
Thanks for the info. It's currently downloading/generating.

Please note that I have no device to test with, so it is possibly not booting.

Also, as I've already mentioned before, this root for N preview is fully permissive.
[Android Software/Hacking General [Developers Only]] MarkGbe:
Thanks, i'll give it a test once it's there and report results.
[Android Software/Hacking General [Developers Only]] cyberbandit1998:
Got V2 up and running on N6 willing to test also.
[Android Software/Hacking General [Developers Only]] ]grimm[:
My apologies for the cross post, but the April monthly for the Pixel C, M5C14J, has been released as well.

The superuser.zip, which works without a hitch on my Nexus phones, doesn't seem to work on the Pixel C. I have tried applying it with TWRP and it gives me an error.

Cross post in Pixel C forum
[Android Software/Hacking General [Developers Only]] phhusson:
It is also in generation list.

As for the zip, could you retrieve /tmp/recovery.log ?
[Android Software/Hacking General [Developers Only]] MarkGbe:
Hmm yeah no boot. Tries a couple times and then goes to dead android recovery screen with read exclamation point. I can get back into bootloader and flash the stock boot.img and it is fine again. i tried the NPC56P noverity boot.img earlier this afternoon and the results were the same.
[Android Software/Hacking General [Developers Only]] phhusson:
Erf, ok.Thanks for testing.

Just in case, have you tested "eng" variant? (or "user" they are equivalent for N)

Would you be able to test ChainFire's SuperSU? (he properly changes SELinux policy on N unlike me, so he might have higher chances of success)

Anyway, I'll wait tomorrow. Hopefully some changes will be pushed to AOSP to help me debug this.
[Android Software/Hacking General [Developers Only]] abogrhen:
same for me

the 201 nocrypt

bootloops

then tried flashing stock boot img then supersu2.71

it worked
[Android Software/Hacking General [Developers Only]] MarkGbe:
eng variant same result, and superSU appears to work fine.