phh's SuperUser/ OpenSource SELinux-capable SuperUser

Search This thread

Alan90

Member
Feb 8, 2016
47
6
Good idea

A twist on SuperSU would suit me better using direct system viper anyway the point is both system and systemless are good for security ccmt I hope they replace SuperSU but pph I would like a separate build by you not needing magisk but equal to chain fire root SuperSU access
 

hakimarx

Member
Aug 27, 2009
28
3
i use cm 13 with magisk 18, root detected by ebanking app. either super su. i flash nethunter to my nexus 5 before
 

L_R_N

Member
May 2, 2013
19
3
Weird question: i need to root an old Android 4 device, and i find it impossible to install TWRP on it, and without TWRP i don't think i can install SuperUser (there's stock RockChip recovery, but it doesn't seem like it can install anything useful). But i might be able to obtain a firmware image and a RockChip tool to flash that directly onto the device. With some perseverance it should be possible to unpack that image and access partition images (boot.img, misc.img, recovery.img, system.img, etc).
So, the question is: would it be possible to just inject SuperUser into that boot.img right here, on my PC, then pack everything back and flash the whole thing?
 

androcraze

Senior Member
Jan 11, 2013
2,254
1,661
Weird question: i need to root an old Android 4 device, and i find it impossible to install TWRP on it, and without TWRP i don't think i can install SuperUser (there's stock RockChip recovery, but it doesn't seem like it can install anything useful). But i might be able to obtain a firmware image and a RockChip tool to flash that directly onto the device. With some perseverance it should be possible to unpack that image and access partition images (boot.img, misc.img, recovery.img, system.img, etc).
So, the question is: would it be possible to just inject SuperUser into that boot.img right here, on my PC, then pack everything back and flash the whole thing?

I don't have an answer, although it should work; you'd probably have better luck running under a Linux environment while attempting it.
 

ashyx

Inactive Recognized Contributor
Oct 14, 2012
15,055
9,947
Weird question: i need to root an old Android 4 device, and i find it impossible to install TWRP on it, and without TWRP i don't think i can install SuperUser (there's stock RockChip recovery, but it doesn't seem like it can install anything useful). But i might be able to obtain a firmware image and a RockChip tool to flash that directly onto the device. With some perseverance it should be possible to unpack that image and access partition images (boot.img, misc.img, recovery.img, system.img, etc).
So, the question is: would it be possible to just inject SuperUser into that boot.img right here, on my PC, then pack everything back and flash the whole thing?
If your device supports fastboot or your tool supports flashing images then use cf_autoroot.
Also I don't really understand what you mean by impossible to flash twrp?
For what reason is it impossible? Is it even available?
 
  • Like
Reactions: androcraze
Weird question: i need to root an old Android 4 device, and i find it impossible to install TWRP on it, and without TWRP i don't think i can install SuperUser (there's stock RockChip recovery, but it doesn't seem like it can install anything useful). But i might be able to obtain a firmware image and a RockChip tool to flash that directly onto the device. With some perseverance it should be possible to unpack that image and access partition images (boot.img, misc.img, recovery.img, system.img, etc).
So, the question is: would it be possible to just inject SuperUser into that boot.img right here, on my PC, then pack everything back and flash the whole thing?
You could use KingRoot. If successful you can downlown a app called supersume from playstore it will swap supersu in place of KR. That's how I rooted my S5 back in the day and my Android TV box.
Also towelroot if it's build before a certain date
 
Last edited:

KutiDaniel

New member
Apr 11, 2019
3
0
So, I've made a quick and dirty version of hidesu which hides su enough for current version of Pokemon Go. (noone cares about anything else anyway right? Oh right it also circumvents SafetyNet...)
I fully agree to what ChainFire says about circumventing SU detection (on http://xdaforums.com/showpost.php?p=68424605&postcount=2 )

The demo superuser.zip is available at http://phhusson.free.fr/superuser-r266-hidesu.zip (you'll notice this is not hosted on https://superuser.phh.me, so don't consider it a real release).
hidesu is enabled by default for the "com.google.android.gms.unstable" process (this is the one scanning for Pokemon Go and SafetyNet as far as I know)

I think this actually could be easily used to circumvent SafetyNet with Xposed enabled (we can make the process think it has the original /system), but that's out of the scope of this PoC.

(I have no clue how this compares to CF's suhide)

Is there a way to undo flashing after-effects? I flashed the zip, it uninstalled magisk and I can't reinstall. Says partition has been patched by an unrecognized app
 

ktmom

Retired Forum Moderator
Apr 22, 2015
5,176
3,387
Deep Space Station K7
Что с этим тек том делать..?
Translates to: "What to do with this tech ..?"

This is an English language forum. When you created an account, you agree to use English, even if that means you use an online translator before posting. You are permitted to post the English translation, then in the same post, include the untranslated text for clarity.

This is a method of obtaining root on a limited number of devices.

Это форум на английском языке. Создавая учетную запись, вы соглашаетесь использовать английский, даже если это означает, что вы используете онлайн-переводчик перед публикацией. Вам разрешено опубликовать перевод на английский язык, а затем в том же сообщении включить для перевода непереведенный текст.

Это метод получения рута на ограниченном количестве устройств.
 

Впся

Member
Oct 5, 2019
8
1
:):)
Translates to: "What to do with this tech ..?"

This is an English language forum. When you created an account, you agree to use English, even if that means you use an online translator before posting. You are permitted to post the English translation, then in the same post, include the untranslated text for clarity.

This is a method of obtaining root on a limited number of devices.



---------- Post added at 08:32 PM ---------- Previous post was at 08:28 PM ----------

phh's SuperUser/ OpenSou

:) Thank you
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 333
    Hi,

    IT MIGHT BRICK YOUR DEVICE.
    Always ensure you have a way back.


    Here is a thread about my fork of Koush's Superuser, to handle SELinux: https://github.com/seSuperuser/Superuser
    So I would like your help to make this SuperUser a proud opensource SU app!

    If you have an application that requires root, and which needs specific SELinux configuration please ask!


    Build bot: https://superuser.phh.me/
    Currently, four flavors of su are available on the build-bot:
    - "eng" which puts "su" in permissive mode. This is the most compatible mode, but you should trust the apps you give root to. This does NOT put SELinux in permissive mode.
    - "noverity" is eng and dm-verity disabled
    - "nocrypt" is eng, dm-verity and dm-crypt disabled
    - "user" is meant to give a safe su. su-apps won't be able to access to your Android Pay (for instance) informations, or keep persistent su access without your consent

    Please note that user is in heavy development and isn't up to its promises at the moment.

    I setup a build bot, which generates boot.img based on my solution, and pushes them to https://superuser.phh.me/

    I did this build bot in a way so it is easy to add new ROMs, so don't hesitate asking for new ROM/devices support.
    Supporting new devices might mean some additional work on http://github.com/seSuperuser/super-bootimg/ if they are using non-standard boot.img format, but the aim is to support as many devices as possible.
    You need to install the APK from PlayStore afterwards: https://play.google.com/store/apps/details?id=me.phh.superuser

    Bot-supported devices
    Here are some devices, but there are many more !
    - A *lot* of Archos devices
    - All Nexus-es, including Pixel C (if some Nexus is missing, just ask!)
    - nVidia Shield TV
    - nVidia Shield Tablet
    - Fairphone 2

    update.zip format
    The zip is available at https://superuser.phh.me/superuser.zip
    It should be able to root any device supported by super-bootimg from TWRP (and possibly other custom recoverys)
    You still need to install the APK afterwards. https://play.google.com/store/apps/details?id=me.phh.superuser https://f-droid.org/repository/brow...lob/master/known-imgs/nexus/hammerhead/MRA58N describes a firmware, nothing device-specific). This only requires to do some PRs to add a device, or on updated firmwares
    - Testers
    - UI designer: The current UI dates back from 4.1...? It is really ugly and not really usable.
    - Testers
    - Root-related devs: SELinux policies are still being written
    - Testers
    - Security reviewers
    - Testers

    Bug report
    If some app doesn't work, please ask me, not the dev.
    I consider I have to fix support for other apps, not the other way around.



    ChangeLog
    2016-01-31 r170: superuser.zip can be included in other update.zip
    2016-01-27 r166: Add support for Viper4Android
    2016-01-15 r162: Add su --bind and su --init commands
    2016-01-10 r154: Files are no longer copied multiple times. Fixes MultiROM, and multiple install for update.
    2016-01-06 r152: Fix support for ChromeOS-like format (Pixel C)
    2016-01-01 r144: Detect chromeos-style signature, and don't try to resign it in that case
    2015-12-30 r143: Improved compatibility with apps.
    2015-12-28 r142: Changed naming convention to include device name and release
    2015-12-28: Added "nocrypt" target
    2015-12-13: Added "noverity" target to buildbot
    2015-12-13: Add options for noencrypt, noverity
    2015-12-03: Fix TitaniumBackup
    2015-11-24: mount --bind to /system/xbin/su if it exists to override ROM's su
    2015-11-23: Fix CF.Lumen
    2015-11-14: Add super-bootimg's version in boot.img, several network/firewall-related permissions
    2015-11-11: Access to Android's services
    2015-11-10: Recursive su access
    2015-11-09: Fix pm disable command
    98
    So, I've made a quick and dirty version of hidesu which hides su enough for current version of Pokemon Go. (noone cares about anything else anyway right? Oh right it also circumvents SafetyNet...)
    I fully agree to what ChainFire says about circumventing SU detection (on http://xdaforums.com/showpost.php?p=68424605&postcount=2 )

    The demo superuser.zip is available at http://phhusson.free.fr/superuser-r266-hidesu.zip (you'll notice this is not hosted on https://superuser.phh.me, so don't consider it a real release).
    hidesu is enabled by default for the "com.google.android.gms.unstable" process (this is the one scanning for Pokemon Go and SafetyNet as far as I know)

    I think this actually could be easily used to circumvent SafetyNet with Xposed enabled (we can make the process think it has the original /system), but that's out of the scope of this PoC.

    (I have no clue how this compares to CF's suhide)
    61
    - Added a new "Smart mode" for notifications (shows a toast when screen is in use and notification when it's off)

    - Added a setting to notify only when access is denied

    - Removing an app from the list will require PIN (if it's set)

    (I haven't tested these new additions much. So, please let me know if something's wrong)

    - @Captain_Throwback some blank space will be removed now
    41
    @PunchUp One more request for the superuser app.

    An option to hide the app in the app drawer for those ROMs that integrate it in Settings. like Substratum does?

    I use Pure Nexus and it integrates phh superuser and Substation (as well as that "other" su). ;)

    Thanks
    Alright, now there's a setting available to hide the launcher icon
    Also, someone asked for the round icon. So, now there's one available for API 25+
    And some other minor bug fixes and improvements

    Plus, there's an "App shortcut" to quickly enable/disable Superuser. I'm currently not using Nougat. So if someone who is on 7.1.1 can test it, that'd be helpful :)
    29
    I don't think so, @PunchUp made an amazing work there :)
    Still waiting for your reply to the email so that I can finalise it :D

    It works great! Although I feel the full screen request activity is a little intrusive, I'll live with it to avoid the super long SuperSU dialog :p
    Full screen request? I think you're using an old build.


    Anyway, I did make some more changes a few weeks ago (after beta 9). Since the final release has gotten delayed a bit, here is a new build