The second Wind (Parallel SU) - SuperSU

Hello, new user here.
Since I stuggled with root on my Phone and somehow managed to maintain it, I thought, I 'd share you the stuff I did with you.
I put the TL;DR between hide, if you want to read the story behind my struggle anyway, you are welcome.
I am better with explaining stories then explaining things.
Spoiler
I am using a Samsung S4 mini, Stock ROM and just don't want to flash a cROM.
But I wanted more functions to do - a swiss knife like my old GT-S3650, which was able to boot a PC from.
Most of the things I want to use need root, so why not rooting this sleep S4 mini baby?
And I managed to root it using Kingroot. And all of the things I want to use worked.
After a few days, I noticed network traffic, even with the most network apps and Sync disabled.
Weird? Yes. So I installed "Shark" on my Phone and "Wireshark" on my PC, and started logging.
I noticed an increase of Jabber (the protocol) and a lot of request on domains from China.
Some requests even included my IMEI, how I am connected to the Internet, etc... pretty private Stuff.
I found most of the sources, the IMEI sending App was Shark itself.
Used Lucky Patcher to get rid of it and /etc/hosts blocked the DNS with Hosts Editor.
Did the same with some Kingroot DNS.
But then I asked myself: "Can Kingroot still root my phone, even when cut of the web?".
So I UNROOTED my Phone from Kingroot. Bad idea. Really bad one.
After I ran Kingroot again, it told me, it didn't have a network connection.
I have no idea how I was able to edit the hosts file without SU.
Rerooted the Phone, even if it left a bitter taste of having unwanted network traffic.
This is which made me want to switch to SuperSU.
I tried to mount system as RW prior and installing SuperSU over Kingroot SU. And it failed.
I even tried to make my own uninstall script to uninstall KR by unpacking the Kingroot APK and look what it does.
Not working, the script failed (I am not used to Linux), so I stayed at Kingroot.
While I was working on Kingroot, I was thinking about the idea of having 2 SU Apps, which everyone said it won't work.
But I wanted it to make work - and this is actually the focus on this topic.
During tests, it didn't work as intended, so I stopped working on it and forgot it overtime, resting within my /system.
Days passed, Weeks and Months and I lived with Kingroot, forgot all the trouble and access to/from China.
Recently, I started SuperSU - it was still on my phone. This "cannot install su binary" nagged me and thought:
Oh, why not use this instead.
And then there was SuperSuME... which I didn't want to use, since I was able to brick BlueStacks with it.
But I really wanted to get rid of Kingroot and use SuperSU. This was yesterday.
My phone still has warranty and I think I have Odin here (just in case), but not the 100% exact ROM file.
So I did SuperSuME anyway -I always could return the phone and claim it "broken after OTA update", lol.
Well, SuperSuME did it's Job better then expected and no bricks. Nice Job.
While playing around with SuperSU, I did another mistake.
And here we are... at the main topic.
TD;TR for those who didn't want to read the story:
I rooted my phone 2 times with Kingroot and finally wanted to switch to SuperSU.
After I accidentally broke Kingroot the first time, blocked it's Internet access and unrooted afterwards, I got stuck with a unrooted phone and Kingroot failed to root it.
I was lucky to fix that problem and rooted again with Kingroot.
After months, I used SuperSUME to change that. After SuperSU was installed, i made the mistake of unticking "Enable Superuser". Bad idea.
Tapping "Enable" again, it failed to update the su-binary. oh god. I unrooted again.
While traversing through my directories to start Kingroot again to root, I found my "shadow copy" of SU.
Wut? Shadow copy? Let me explain:
After my first unroot, I wanted to have a SU backup anyway at all costs, just in case I accidentally messup root again.
Now after hours I think I know why it doesn't work.. the normal way, of course.
I installed SuperSU, went into /data/data (or where ever SuperSU has its files) and took a look at them.
Unpacked the SuperSU APK on the PC and gathered all "needed" (I think were needed) files.
I hexedited the most SU binaries from SU to ZU and changed all other referenced binaries as well.
I am sorry about that, Chainfire. I was just testing things.
SU => ZU
SUpolicy => ZUpolicy
setup_su => setup_zu
99SuperSUDaemon => 99SuperZUDaemon
daemonsu => daemonzu
zygote => zugote
I had no idea what sukernel was for, so I left that out.
Why call it ZU? "Sun Tzu" thats why. Known as "Sunzi", he wrote Book about "the Art of War".
After I made sure everything is properly renamed and edited, I moved them onto my phone in the right directories required and chmod them.
I don't know much about that, I just copied the chmod numbers from Kingroot SU and some weird script I found on the web.
Tried to run it using JuiceSSH local terminal, and BAM!! the SuperSU box popped up.
But pressing "Allow" accepted it and nothing else happened.
It became stuck after ZU... it did nothing, but the daemon was running as daemonzu and daemonsu at the same time..
JuiceSSH popped up in SuperSU (while it told me the SU bin was outdated), though.
So I was on the right track, but a piece of the puzzle was missing, so I stopped delving deeper into it.
And forgot about it until about yesterday - where I disabled "Superuser" in SuperSU.
Midwhile the su binary changed from Kingroot SU to SuperSU SU.
Note: It should really ask "Do you want to disable Superuser? SuperSU will delete su binary" Yes/NO.
As I found those files, I started JuiceSSH and typed "zu".
This time, ZU somehow worked like it should.
It spawned a root shell. OMG...
I guess it somehow requires something else needed, which wasn't working while Kingroot was active.
I tried "Root Checker" and it failed. I had no "official" root. But still root available in JuiceSSH.
Somehow I managed to restore SuperSU to normal status. Guess this thing can latch onto an active root user or so.. no idea.
I even screenshotted this, cause I couldn't believe it. If you want, I can post those.
I have now a working second su on my phone, which is hidden from most apps.
But I think it is not perfect, it relies on something SuperSU does or installs during installation.
I apologize again to Chainfire for editing his stuff.
So, now my questions:
1. How can I make it perfect to run standalone, only using SuperSU as a GUI for (Allow/Deny)?
1b. Can we make it part of SuperSU? As a special function: "Install Stealth SU"?
2. Can we use that for something else? -> Probably for this? http://forum.xda-developers.com/apps/supersu/suhide-t3450396
3. Why must the binary be called SU? I know it's for the most apps to do their job and somehow Linux standard.

Related

[Q] Superuser/SuperSU issues

Here is a problem I have and I am wondering if anyone else has experienced it and/or solved it:
Phone: Bell SGS i9000
FW: CM9 Nightly (currently May 30) all "stock" (no custom kernels etc)
I installed SuperSU some time ago as it seemed to have more utility than Superuser. I noticed after a flash that Superuser would take back "control" of the su binary and I'd have to manually re-assign it to SuperSU. I decided, after doing some research to see if it was OK, to freeze Superuser in Ti Backup. So far so good.
I noticed today though, that none of my scheduled backups in Ti Backup have taken place for a while, so I launched the app to see what gives. It was at that point I discovered that TB couldn't get su privileges from the system. I launched SuperSU and it attempted to update the su binary - and failed.
Since TB froze the Superuser apk, I can't uninstall it. I also cannot unfreeze it in TB because it cannot get su!
I'm a bit stuck.
I have ROM Toolbox, which appears to work OK, as well as ROM Manager, and both seem to be able to use su commands without issue (I told SuperSU to remember the granting of su permission when I first started using it) I don't have any other apps that regularly use su permissions (not that I know of) so everything else seems fine.
I'd like to fix the updating binary issue with SuperSU though, so I can once again grant TB su and then fix everything.
Anyone have any ideas? I've already tried re-flashing Superuser from recovery, still shows as frozen. I tried unfreezing from ROM Toolbox, but it fails.
I'm stuck and I'm at the limit of my understanding and experience with this. Anyone who can help will receive my eternal gratitude - and a pint if you're ever in my town!
Try to delete tb then reflash the rom without any wipe
Sent from my GT-I9100 using Tapatalk 2

Can't even install XPosed (Flashfire Issue?)

So I got around to "rooting" my "LG G4" (H525) via that one click tool called Kingroot.
So far so fine.
Pretty much all applications that require root will will allow it...
Except for one:
FlashFire....
It keeps telling me that root access was not possible,
that I shall't install SuperSU.
[However SuperSU will error out right on the start telling me to `update the binary']
=> What binary ? Why update it (just got the newest SuperSU from the Playstore)?
Trying to flash said binary using any Flashify merly showed me the lovely "your device is bricked" bugdroid...
Any idead from someone with similar FlashFire / SuperSU problems ?
Thanks in advance:
-Rye-
Do you have a custom recovery/twrp?
Sent from my HTC One M9 using Tapatalk
Nope, all stock.
(Part of the reason why this confuses me so much... I changed nothing... except for Root)
KingRoot is intentionally designed to serve two purposes. The first is to give you root access through their app. The second, which they don't warn you about, is to prevent you from managing that root access any other way than through their app.
They have written their app specifically to force you to use their root manager and to prevent you from uninstalling it and installing any other SU app. They went so far as to specifically block installation of SuperSU because they're upset that it replaces their app (which is blatantly absurd and hypocritical). If that's acceptable to you, then certainly do it their way.
However, because they place such restriction on root access (which seems to be a self-contradictory philosophy) then it directly interferes with the installation of more powerful root apps like flashing utilities and Xposed itself.
At this point there are two options. Either you can find a utility that breaks their stranglehold on your device and follow the specific instructions to remove their app and install something that's not restrictive, or you can restore your device to pre-root condition and root it again yourself using the open, non-restrictive methods made available to the community. Each method may be about as complicated as the other.

Issues installing BusyBox

Hey guys, so I'm trying to install BusyBox on my new Nexus 6 running stock 6.0, rooted. When I try to install via Stericson's installer I got from the Play store, I get:
"We could not verify the integrity of the binary selected..." flashes for a moment, then:
"BusyBox installer was not allowed root access. This may be an issue with Superuser, open Superuser and make sure that you are allowing root access. This application will not work without root access."
I've made sure that the app is allowed root access, and have also tried deleting it from SuperSu so it would prompt me and I could grant it access again, but still the same issue. I'm not sure what the deal is, it seems like I could be having root issues? I appear to have root since I am able to use TiBu, but something seems funky. For example usually when I open FKUpdater it says "FKUpdater has been granted super user access..." and then "Unable to acquire ROOT access." Other times it only says "Unable to acquire ROOT access." I haven't tried flashing a kernel with it because I don't want to at the moment while I figure this other issue out, so I'm not sure if it's falsely reporting the root error.
So, I looked into things further and it seems like I may have some sort of permissions issue. I tried using JRummy's BusyBox installer, but that fails also and just tells me to try installing a different version of BusyBox. It also includes a script for fixing permissions, and when I run it I get "error: only position independent executables (PIE) are supported" and "/data/user/0/com.crummy.busybox.installer/files/temp.sh[118]: sync: can't be executed: permission denied."
Permissions for /data/user/0/com.crummy.busybox.installer are set to drwxr-x--x, as is /system. Also /system is only showing 58 MB free but I don't think that's a problem...
Any ideas? I'm totally stumped...
set your SElinux to be permissive(via app or terminal command)

Need Help with Z3 Compact

***UPDATE***
I removed Kingroot through their app and unrooted my phone. I tried another one click root, Kingoroot (I know, quite similar names.) The SU which this one installs, isn't restricting me and I successfully set read/write to /system.
I still would prefer to be using superSU but I get a binary occupied message, and the kingouser app doesn't have an option to switch SU app.
For anyone else struggling with kingroot not letting apps work properly, try kingo, who knows.
-----------------------------------------------------------------------------
I have the Z3 Compact, and I HAVE NO ACCESS to a PC, and thus have rooted my phone with King root (which was a terrible idea but any root is better than no root)
I have this issue, where King root in some way shape or form is not allowing anything that requires write permission to /storage access to it.
This is not allowing me to install/use things like busybox, lucky patcher, freedom, and is also, stopping me from using terminal emulator to do things such as mount -o rw,remount,/system or anything else. I tried to use a system I found on XDA to replace Kingroots superuser to SuperSU to get around this, however, the replace_kinguser method, fails with no write permission, and also, fails to remove kinguser from /system/apps/kinguser because that doesn't exist as a directory and I think Kingroot may have made changes to their superuser handler.
I really, really need help getting Kingroot out, and superSU in. Without the use of a PC. Considering I do, have root, there must be something I can do.
I also can't set system to write with ES file explorer or pretty much any other method on the first ten pages of Google.
Any time I try to set /system to r/w I get permission denied.
I'm running, android 5.0.2
Also, BOOTLOADER UNLOCK ALLOWED? NO
So I don't think I can flash a custom recovery of any kind.

Magisk Manager with built-in su

Hi all!
I might be asking a stupid question, so forgive me if I do.
The situation is the following... I have a TVBOX Q96 HOME 4K (cheap Chinese one based on RK3229) that is pre-rooted. All applications using root work fine. However, there is no "superuser" manager installed on it in order to disallow certain apps to gain root access. In the past I already had a similar situation with some other box and when I installed SuperSU apk the device hasn't boot anymore. I that case I got a stock firmware and could unbrick it, but now I can't find any ROM for this device in order to play with it.
So, the question is... is it possible to install Magisk Manager in order to manage access to the built-in su? Older version I tried correctly identify the device as rooted (with SuperSU 2.76), but do not offer me a Superuser menu where I could manage access to the su of the apps. Neither I get a prompt when an app is requesting access to su.
Any solution to my problem?
No, you will not be able to use the Magisk Manager to manage superuser access for SuperSU.
Any idea what might cause the device to not boot anymore after installing SuperSU.apk?
I compared the installed su binary with the one from chainfire's UPDATE-SuperSU-v2.76-20160630161323.zip (arm7), and they are identical. What does installing an apk alone to the system beside managing the access for the apps?
I have to admit I don't know exactly what happens "behind the scene".
I have absolutely no idea why installing the SuperSU apk would cause your device not to boot... Sorry.
Edit: Wait... You write "installing an apk alone to the system". You're not installing it as a regular app, but to the /system partition? If so, that's what might be causing issues.
Sorry to mislead you... I wrongly expressed myself.
I'm not installing it as a system app - I have installed it (on previous box) as an ordinary user app and as I said the system couldn't boot anymore afterwards (I had to reflash the ROM to unbrick it).
BTW... this is a known issue with these Chinese TVBOXes. There are couple of posts also here in XDA about it and nobody knows AFAIK what is the root cause.

Categories

Resources