yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] phhusson:
Some clarification here might be indeed helpful.

the "su" binary lives in the boot.img, so it doesn't depend on an APK.

Though the su binary will ask for an APK called "me.phh.superuser" for UI stuff.

The name is not certified, signed or whatever, so anyone can have an application of that name.

This might sound like a security problem, but it's not really one:

- On the playstore, only the applications signed with my very own private key can be named me.phh.superuser

- on FDroid, only the F-Droid team can make a new me.phh.superuser application

- On the device itself, only one application at a time can be called me.phh.superuser, and updates are checked with the public key.

And it might sound like a problem for having alternatives, but it's not because it is easy to change the package name (though it does need to rebuild the su binary and superuser.zip)
[Android Software/Hacking General [Developers Only]] GilliganBMT:
I am having problems with bootloops on my 6P when using superuser-r229.zip, I am running Chroma on 6.0.1 and ElementalX 22 with TWRP 3.0.2-2 and after flashing this it just sits there as the little google animation goes around and around. Once I restore my backed up boot.img it starts up just fine again. Did I miss somthing, is this not compatible with Chroma?

Ive heard good things about this with the combination of the Magisk systemless Xposed from topjohnwu, with Android Pay and I cant seem to get any of those to function properly. :(
[Android Software/Hacking General [Developers Only]] adrman:
Is Chroma still prerooted? It might just be a matter of removing all traces of the previous root first if it is. Also, if you're using Magisk, make sure to flash the modified version of phh from the Magisk thread.
[Android Software/Hacking General [Developers Only]] dl200010:
Is there a way to run bind command scripts on boot with this, or to add a /data/ folder to the path?
[Android Software/Hacking General [Developers Only]] Eddiemc:
[MENTION=1915408]phhusson[/MENTION]:

Great work, everything seems to be working like a charm.

Started on a unrooted custom rom:

flashed the zip, installed the app, everything seems perfect!
[Android Software/Hacking General [Developers Only]] GilliganBMT:
Yeah you'r correct, I got everything working this evening. I was very sick yesterday and took the day off of work, so I figured I'd play with my phone and I must have missed a bunch of steps in my misery, lol.
[Android Software/Hacking General [Developers Only]] dreamland2000:
I've just switched from cf su and I think everything went fine but when I check the phh su app the log is empty for apps that have su permission. Have I done something wrong? The steps I took were: -

*Flash phh su zip

*Remove cf su

*Install phh su from play store

*Reboot device.

(Currently using S6 flat with custom ROM/kernel)

Thanks
[Android Software/Hacking General [Developers Only]] fmc000:
Execute

su -v

in a terminal window to see if you have the expected "su" version.
[Android Software/Hacking General [Developers Only]] dreamland2000:
I get 2.77 SuperSU showing
[Android Software/Hacking General [Developers Only]] fmc000:
...which explains why the phh's superuser app doesn't get called ;)
[Android Software/Hacking General [Developers Only]] dreamland2000:
How can I change that?
[Android Software/Hacking General [Developers Only]] fmc000:
Well, you did not follow the correct procedure, you should have tried to "full unroot" from within the SuperSU before anything else and I'm not sure that at this point it would even work, because you have already flashed a different superuser.. This is what I'd do:

full nandroid backup;

reboot recovery and dirty reflash the ROM;

from the recovery filemanager remove /data/supersu.img (if memory serves me);

in the same session flash phh superuser;

reboot.

Worst case, restore the nandroid you've just taken.
[Android Software/Hacking General [Developers Only]] dreamland2000:
I managed to get it sorted by installing cf su then allowing that to remove phh su before using cf su to fully unroot, bit into recovery flash phh su zip then install phh app from play store. Root now working perfectly and no need for a dirty flash (phew). Thanks for your help though.
[Android Software/Hacking General [Developers Only]] Sam Nakamura:
Thanks, r229 zip worked like charm on oxygenos 3.1 oneplus 2! Just did a unroot within the ccmt supersu and voila ☺️

? Sent from my lovely 1+2 ?
[Android Software/Hacking General [Developers Only]] tc0566:
I tried that, it wouldn't let me go back to chainfires kept failing to update the binaries . Had to restore my old backup and start over.
[Android Software/Hacking General [Developers Only]] Eddiemc:
Substratum/masquerade seems to need spesific config since it runs fine under supersu, but under phh superuser substratum doesn't work until selinux is set to permissive..

There's a bit around the issue here:

http://xdaforums.com/showthread.php?p=68590947
[Android Software/Hacking General [Developers Only]] phhusson:
Could you try with http://phhusson.free.fr/superuser-r241.zip ?
[Android Software/Hacking General [Developers Only]] Eddiemc:
Thanks for the quick response.

So I'm on the (latest?) superuser.zip linked to in the op atm.

Can I just flash that file on top or should I do anything first (uninstall etc?)
[Android Software/Hacking General [Developers Only]] phhusson:
You can install it on top of the previous
[Android Software/Hacking General [Developers Only]] Eddiemc:
Yes: solved.

I also cleaned data for substratum and removed the instances in shh superuser app.

When opening substratum the masquerade also asks for su (on the previous zip masquerade didn't until selinux was permissive)

Just applied a theme and it seems to work perfectly..
[Android Software/Hacking General [Developers Only]] phhusson:
Thanks. Fix pushed in https://github.com/phhusson/super-bootimg/commit/3b9b369e3af04a8e2881a3323c53831560f017dd

I'll probably release it later tonight after some N fixes.
[Android Software/Hacking General [Developers Only]] Eddiemc:
Nice work mate
[Android Software/Hacking General [Developers Only]] tc0566:
Can't uninstall chainfires supersu ..when using the full unroot option and rebooting it is still rooted and doesn't even remove the app... any help?
[Android Software/Hacking General [Developers Only]] phhusson:
r242 released, which fixes N (this was a regression) (thanks to [MENTION=3105310]jaben2[/MENTION] for testing and logging), and platform apps (thanks to [MENTION=2430157]Eddiemc[/MENTION] for testing and logging)
[Android Software/Hacking General [Developers Only]] Pkt_Lnt:
On my Nexus 7 2013 r241 flashed successfully, but r242 returns an error during flash. Here is the recovery log. MM 6.0.1 Pure Nexus, August security update, TWRP 3.0.2-0, ElementalX kernel, no Xposed or Magisk .
[Android Software/Hacking General [Developers Only]] FoxysWorkplace:
Sorry: phh's SuperUser works on N but NOT Magisk

Edit: I've been told by a Senior Member this is wrong...

To the best of my knowledge there is no N support for Magisk (Regardless of the modified phh's SuperUser module.) :crying:

I personally flashed latest official Magisk to the final N preview build for Nexus 6 after flashing latest official ElementalX and nothing else (after boot failed trying to do it with the modified phh's SuperUser module) and based on logcat output I'd say the Magisk zip's installer script patches the init.rc in the boot partition's ramdisk in a manner that works with Marshmallow but is destructive to Nougat (which may use a different layout within init.rc than Marshmallow does.) :confused:

I've skimmed the Magisk thread and there is no mention that I saw about anyone planning any kind of N support yet. That being said, if my hypothesis is correct, this should be something I can fix. Please don't ask me here as this thread is for phh's SuperUser,

NOT

Magisk. ;) Just PM me or something or I may post about this on the Magisk thread later tonight so that I can receive any requests there. If there is an interest I'll take a swing at it in a purely unofficial capacity.

If I'm wrong and anybody reading this has gotten phh's SuperUser to work on N as a Magisk module

( ★ did the version the latest modification was forked from even support N yet, I assume this thread would be the place to ask this, regardless of Magisk itself having support ★ )

or knows of a beta/unofficial Magisk targeting N please correct me! :angel:

Hack the Planet,​

FøxysWorkplace​
[Android Software/Hacking General [Developers Only]] GilliganBMT:
I haven't heard of N support yet either but I could have missed something as well. Ive kinda just been hanging out here on M until a few things like this catch up. Though I'd definitely be willing to test out some N betas of Magisk.
[Android Software/Hacking General [Developers Only]] Lrs121:
There is no issue with magisk and the magisk Superuser zip, Not the one here, with the N beta on the nexus 6. Also the magisk thread is the place to get information regarding ANYTHING related to magisk. That will help reduce cluttering and information scattering
[Android Software/Hacking General [Developers Only]] FoxysWorkplace:
Apology / Request For More Information

I apologize for the clutter Lrs121, I should have realized asking in bold would not stop anyone from replying to that part of my post in this thread. Next time I will know better and create multiple separate post's when my post is relevant to multiple threads.

Also, you wrote "Not the one here" as if intending to include a link but did not. If you mean the most recent official Magisk thread the only thing I can think of would be that my download of the zip from the pinned post was corrupted in transmission. I will fetch it again and check hashes because it did not work when I tried it less than 2 days ago on a fresh flash of all partitions which otherwise boots fine, and try again, MAKING ABSOLUTELY POSITIVE to post my results in THE CORRECT THREAD! ★ If you were going to link me someplace else than the pinned post of the official thread I'll be watching the post you already made for edits for the next hour or so... ★

Thank you very much for answering my question and again I take full responsibility for this clutter.

Hack the Planet,​

FøxysWorkplace​

---------- Post added at 11:48 PM ---------- Previous post was at 11:29 PM ----------

IF you have a device with factory images available for download such as a Nexus:

Follow the directions here to unroot from fastboot without erasing the Data partition! Simply supplement SuperSU with phh's SuperUser in the instructions given and ElementalX with the kernel of your choosing.

If your device does not have publicly available factory images:

★ Kindly direct your question to the section of XDA

that corresponds to your device

and to the thread of the

su that you are trying to uninstall

rather than in the general section on the thread for the su you are trying to install. ★

Thank You!

Hack the Planet,​

FøxysWorkplace​
[Android Software/Hacking General [Developers Only]] Lrs121:
Yah I should probably reread before posting sometimes. I have a bad tendency to overlook the obvious.

Ah my wording probably could be better like usual. For the zips I meant the Superuser zip that is included in the magisk thread not the one that is build on superuser.phh.me.

I can put a copy of the magisk Superuser zip up on my website if needed if the corruption continues and see if that helps. The process I went through involved fully removing SuperSU first, flashing magisk, then flashing the magisk modified Superuser, and installing the Superuser app.

There's no need to worry about the "clutter" it is relevant. It's another bad habit I've developed from the threads ive created going way off the rails.
[Android Software/Hacking General [Developers Only]] drawde40599:
How

"update.zip can be configured

In the update.zip, there is a config.txt"

I don't understand how to do this and the search function is broken AT the moment . If someone has a sec that can help
[Android Software/Hacking General [Developers Only]] PunchUp:
Extract or open the zip. There's a text file inside it called config. You need to edit it according to your needs (and then repack in case you extracted).
[Android Software/Hacking General [Developers Only]] drawde40599:
Thank you

I tried doing that with solid explorer ( extract then archive into a zip ) and TWRP kicked it back with errors . Maybe I'm doing it wrong

So config default is "eng verity crypt" if I wanted to change to nocrypt I would delete "eng verity crypt" and replace with just the word "nocrypt" right ?
[Android Software/Hacking General [Developers Only]] PunchUp:
I think some apps fail to zip it back properly. I had the same issue.

And you need to do "eng verity nocrypt"
[Android Software/Hacking General [Developers Only]] phhusson:
:'(

Thanks for the report.
[Android Software/Hacking General [Developers Only]] adrman:
FX Explorer has the same issue. Use Root Explorer.
[Android Software/Hacking General [Developers Only]] yosmokinman:
[MENTION=1915408]phhusson[/MENTION] r242 now flashes and works fine on my N7 (2013) running Nougat where previously 229 wouldn't flash only 197 would.

A Marsmallow/Nougat issue it seems from the posts above maybe?

Here's the successful twrp flashed log of r242 on Nougat if it could help compared to the M **** Or the error log I posted for 229. though you did fix that problem.
[Android Software/Hacking General [Developers Only]] ezio84:
Just fyk, superuser-r242.zip works well on stock N (NRD90U) for 6p.

I'm using it with eng and noverity, but crypt enabled.
[Android Software/Hacking General [Developers Only]] Sam Nakamura:
Is there a need to update the binaries by reflashing the zip file to higher version? R229 to R242?

? Sent from my lovely 1+2 ?

▫️ powered by Phh's Superuser ▫️
[Android Software/Hacking General [Developers Only]] androcraze:
As long as you have root and it's working, no.
[Android Software/Hacking General [Developers Only]] stokholm:
Are you sure you don't want AdAway write to /system/etc/hosts after running the "su --bind" command (and a reboot)? Please read on. :)

Because this is what I found out on my Nexus 6P:

With SuperSU (with AdAway pointed to /system/etc/hosts):

mount -o bind /su/etc/hosts /system/etc/hosts works.

mount -o bind /data/data/hosts /system/etc/hosts does NOT work.

With (phh's) SuperUser (with AdAway pointed to /system/etc/hosts):

mount -o bind /su/etc/hosts /system/etc/hosts isn't possible, because we lack the /su mount.

mount -o bind /data/data/hosts /system/etc/hosts does NOT work.

su --bind /data/data/hosts:/system/etc/hosts does NOT work.

I did my own detective work, and I think none of the "mount -o bind" work on /data/data, because a non-root user doesn't have access to /data/data (but I'm not sure about this). AdAway applies the hosts file fine in both SuperSU and SuperUser, and /data/data/hosts gets written - EVEN though you point AdAway to /system/etc/hosts. That's how "mount -o bind" works (for those who don't know).

But the "su --bind" command doesn't work for me at all or I don't understand it. Does it not work like "mount -o bind"? I tried to point AdAway to /system/etc/hosts (because that's what you do with "mount -o bind"). But AdAway writes to /system/etc/hosts instead of /data/data/hosts. I did reboot after running "su --bind". [MENTION=1915408]phhusson[/MENTION], what do you say? :)

A bonus question. How do I "undo" a "su --bind" command?
[Android Software/Hacking General [Developers Only]] androcraze:
BIND works for /data/data/hosts on my N5. /system/etc/hosts stays unchanged, and /data/data/hosts has the proper entries after using BIND. I do have to report "Yes" when asked if I want to create a symbolic link by AdAway. I'm not seeing a symbolic link with /system/etc/hosts though after I do.
[Android Software/Hacking General [Developers Only]] stokholm:
Well that proves one thing. That my hypothesis, about the permissions of /data/data being a cause of failure, is not true. Either that or the N5 has a different permission setup (which I doubt).

But frankly selecting yes when AdAway asks to create symlink in /system/etc/hosts, which already has a bind to /data/data/hosts - that's just a mess. What does that even do? I'm so confused.

How do you even know that /system/etc/hosts is not overwritten? Are you sure it's not just a symlink to /data/data/hosts? What is the output of the terminal command "ls -l /system/etc/hosts"?
[Android Software/Hacking General [Developers Only]] androcraze:
How to differentiate between a BIND and symbolic listing? This isn't what I'm used to seeing under Linux as symbolic, so my thought was it's BIND. Is that incorrect?
[Android Software/Hacking General [Developers Only]] stokholm:
Just as I thought. You have a symbolic link. That means you modified your system partition. Your original hosts file has been overwritten with a symbolic link. (Edit: You should confirm this with TWRP.)

EDIT

Okay, here's the deal. I got it working. You really need to follow phh's directions. Who would have thought? :o It's described well enough here - I just couldn't find that description before.

This is what it has to look like when set up and working:

angler:/ # ls -l /system/etc/hosts /data/data/hosts
-rw-r--r-- 1 root root 2106340 2016-09-09 19:49 /data/data/hosts
-rw-r--r-- 1 root root 2106340 1970-10-28 22:07 /system/etc/hosts

Here's what you need to do:

If you already created the symlink you need to flash your system.img again. Actually I'm not sure what happens if you create a symlink on a bind that's already functional. A reboot may be enough to remove the symlink.

If you attempted this procedure before, unsuccessfully, delete /data/su/binds and reboot.

Run the command "su --bind /data/data/hosts:/system/etc/hosts" (don't run as root or it won't work).

Open AdAway, change target host file to "/data/data/hosts".

Apply hosts file, but DON'T create the symlink. AdAway will say it's disabled, but fear not.

Upon reboot /data/data/hosts will have been copied to tmpfs and a 'mount -o bind' will be made to /system/etc/hosts. You can confirm in TWRP (by copying /system/etc/hosts to /sdcard), that /system/etc/hosts is really unchanged. Or running "umount /system/etc/hosts" should also reveal the original hosts file in its place (remember to reboot after unmounting though, to create the mount again).

When updating the hosts file in AdAway it will forever ask you to create a symlink which you need to forever deny. And it will again say it's disabled, which it isn't.
[Android Software/Hacking General [Developers Only]] androcraze:
OK.

I know AdAway wouldn't survive a reset (with BIND) without answering ""yes" to the link prompt. I was under the impression that it was just a snafu in the setup, and AdAway just ignored the link and accepted the BIND.

Well, I'm back to /su/etc/hosts then. I have a flashable zip to fix or remove then.
[Android Software/Hacking General [Developers Only]] stokholm:
Isn't /su/etc/ a SuperSU thing? I thought /data/su.img was mounted to /su. I don't have /su anymore as completely removed SuperSU (unrooted).
[Android Software/Hacking General [Developers Only]] androcraze:
This has been my procedure:

http://xdaforums.com/showpost.php?p=65324998&postcount=268

It's all arbitrary.... It's just a link to a unique location where hosts can reside and work. I really don't care where. PHH recommended /data/data/, and I prefer that instead of making phony folders, but I'll take anything as long as it works for EVERYBODY.

What do I need to change to make fit what you're talking about?

The good news is that they've just pushed Marshmallow security updates, and I get to play with a new ROM this eve.

Give me your suggestions, and I'll play with a fresh install this evening.
[Android Software/Hacking General [Developers Only]] stokholm:
You probably didn't see my edit to post post #714?
[Android Software/Hacking General [Developers Only]] cyberdionisio:
Works perfect on my Oppo Find 7a with CM13 0909 nightly. Thanks!
[Android Software/Hacking General [Developers Only]] tohtorin:
Does this superuser support systemless install wirhout magisk? How to run mount binds on boot? I would like to see /su supersu style img mount where to execute scripts.

Can I flash this on top of EX kernel so it work with ElementalX?

I like magisk but its too complicated framework for few single mount bind commands.
[Android Software/Hacking General [Developers Only]] OmegaBlaze:
[MENTION=1915408]phhusson[/MENTION] I recently flashed the latest Factory image (7.0) on my 6P through bootloader.

I booted into recovery and flashed the 242.zip.

Everything booted up good, but I found out that I was encrypted.

How would I stop this from happening in the future?
[Android Software/Hacking General [Developers Only]] apatal:
Sorry for OT, but is there a benefit to using AdAway? I just replaced my local host file with the one I downloaded from GitHub and that works well enough.

---------- Post added at 11:46 PM ---------- Previous post was at 11:43 PM ----------

Before flashing, do this:

(1) Extract zip file

(2) Edit the config.txt to say "eng noverity nocrypt"

(3) Re-zip everything

That should keep you unencrypted. Hope this helps.
[Android Software/Hacking General [Developers Only]] adrman:
That's exactly what adaway does, either directly as you did it or via a bind mount.
[Android Software/Hacking General [Developers Only]] headcheese:
i'm confused which img should i flash. eng, noverity??

i had supersu but just flashed the new 6p build so i lost root and recovery and want to try this instead. right now i am encrypted and i need a pin to boot the phone. i would like to keep it this way.

the boot.img gets flashed in fastboot yes?
[Android Software/Hacking General [Developers Only]] PunchUp:
eng would be good for you I think. You may try user too, but it could have compatibility issues with some apps.

And yes, since you don't have a recovery, fastboot is the way to go
[Android Software/Hacking General [Developers Only]] headcheese:
thanks. just flashed the eng and looks like i am still encrypted and was able to grant root to titanium!
[Android Software/Hacking General [Developers Only]] drawde40599:
I tried agn with root explorer and it fails to flash in TWRP still .
[Android Software/Hacking General [Developers Only]] PunchUp:
Well, I cannot recommend you any app because I just do it using Ubuntu's archive manager.

Anyway, try the attached zip. I've edited the config file to eng verity nocrypt.
[Android Software/Hacking General [Developers Only]] stokholm:
Has anyone had luck running a Wakelock Detector kind of app (without it being installed as a system app)?

Wakelock Detector didn't have to be installed as a system app with SuperSU, but with Superuser it says it needs to. I'm wondering if there are any working alternatives that doesn't need to be installed as system apps.
[Android Software/Hacking General [Developers Only]] PunchUp:
WLD works fine on my device without being installed as a system app.
[Android Software/Hacking General [Developers Only]] stokholm:
Maybe because I'm on Nougat it doesn't work? Or are you on Nougat too? Nexus 6P by the way.
[Android Software/Hacking General [Developers Only]] Pkt_Lnt:
WLD works as user or system app just fine on MM, but not as a user app on Nougat for me, complains like crazy and FCs. Will not install as system app via TiBi or Root Explorer.
[Android Software/Hacking General [Developers Only]] stokholm:
Okay, thanks. I wrote an email to the dev, making him aware if this. Hope we can get it working.

Edit: Just saw this in OP. Too late to pull back the email. :(
[Android Software/Hacking General [Developers Only]] Pkt_Lnt:
I sent a crash report from the app when it crashed too.