phh's SuperUser/ OpenSource SELinux-capable SuperUser

Search This thread

doomed151

Senior Member
Dec 5, 2009
1,521
2,184
Ok, if running the command manually doesn't work, it most likely means it's an SELinux problem, and that your ROM has wrong SELinux.
Can you do, as su:
dmesg -c >/dev/null; mount -t ext4 -o loop,noatime,ro /stock_modules.img /system/lib/modules;dmesg -c
And give me the resulting output?
Here's the output on first attempt:
Code:
mount: Invalid argument
[  394.847789,5] type=1400 audit(1474904424.709:48): avc: denied { read } for uid=0 pid=13062 comm="mount" name="loop0" dev="tmpfs" ino=12543 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
[  394.848168,5] type=1400 audit(1474904424.709:49): avc: denied { open } for uid=0 pid=13062 comm="mount" path="/dev/block/loop0" dev="tmpfs" ino=12543 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
[  394.848294,5] type=1400 audit(1474904424.709:50): avc: denied { ioctl } for uid=0 pid=13062 comm="mount" path="/dev/block/loop0" dev="tmpfs" ino=12543 ioctlcmd=4c00 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
[  394.849694,6] type=1400 audit(1474904424.709:51): avc: denied { mounton } for uid=0 pid=13062 comm="mount" path="/system/lib/modules" dev="mmcblk0p47" ino=1851 scontext=u:r:su:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=1
[  394.849856,6] type=1400 audit(1474904424.709:52): avc: denied { use } for uid=0 pid=13065 comm="loop0" path="/stock_modules.img" dev="rootfs" ino=8984 scontext=u:r:kernel:s0 tcontext=u:r:su:s0 tclass=fd permissive=0
[  394.850117,4] EXT4-fs (loop0): unable to read superblock
and the second attempt:
Code:
ioctl LOOP_SET_FD failed: Device or resource busy
[  436.882578,5] type=1400 audit(1474904466.742:54): avc: denied { read } for uid=0 pid=13125 comm="mount" name="loop0" dev="tmpfs" ino=12543 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
[  436.883609,4] type=1400 audit(1474904466.742:55): avc: denied { open } for uid=0 pid=13125 comm="mount" path="/dev/block/loop0" dev="tmpfs" ino=12543 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
[  436.883871,4] type=1400 audit(1474904466.742:56): avc: denied { ioctl } for uid=0 pid=13125 comm="mount" path="/dev/block/loop0" dev="tmpfs" ino=12543 ioctlcmd=4c00 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
 

phhusson

Recognized Developer
Jul 23, 2009
2,489
4,796
Paris
Here's the output on first attempt:
Code:
mount: Invalid argument
[  394.847789,5] type=1400 audit(1474904424.709:48): avc: denied { read } for uid=0 pid=13062 comm="mount" name="loop0" dev="tmpfs" ino=12543 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
[  394.848168,5] type=1400 audit(1474904424.709:49): avc: denied { open } for uid=0 pid=13062 comm="mount" path="/dev/block/loop0" dev="tmpfs" ino=12543 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
[  394.848294,5] type=1400 audit(1474904424.709:50): avc: denied { ioctl } for uid=0 pid=13062 comm="mount" path="/dev/block/loop0" dev="tmpfs" ino=12543 ioctlcmd=4c00 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
[  394.849694,6] type=1400 audit(1474904424.709:51): avc: denied { mounton } for uid=0 pid=13062 comm="mount" path="/system/lib/modules" dev="mmcblk0p47" ino=1851 scontext=u:r:su:s0 tcontext=u:object_r:system_file:s0 tclass=dir permissive=1
[  394.849856,6] type=1400 audit(1474904424.709:52): avc: denied { use } for uid=0 pid=13065 comm="loop0" path="/stock_modules.img" dev="rootfs" ino=8984 scontext=u:r:kernel:s0 tcontext=u:r:su:s0 tclass=fd permissive=0
[  394.850117,4] EXT4-fs (loop0): unable to read superblock
and the second attempt:
Code:
ioctl LOOP_SET_FD failed: Device or resource busy
[  436.882578,5] type=1400 audit(1474904466.742:54): avc: denied { read } for uid=0 pid=13125 comm="mount" name="loop0" dev="tmpfs" ino=12543 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
[  436.883609,4] type=1400 audit(1474904466.742:55): avc: denied { open } for uid=0 pid=13125 comm="mount" path="/dev/block/loop0" dev="tmpfs" ino=12543 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
[  436.883871,4] type=1400 audit(1474904466.742:56): avc: denied { ioctl } for uid=0 pid=13125 comm="mount" path="/dev/block/loop0" dev="tmpfs" ino=12543 ioctlcmd=4c00 scontext=u:r:su:s0 tcontext=u:object_r:loop_device:s0 tclass=blk_file permissive=1
Ok, problem understood, I'll fix mounting from su soon.
Could you get dmesg right after booting to also get the error when called from init?
(I assume it is the same but from "init" instead of "su", but I'm not too sure)
 
  • Like
Reactions: doomed151

ilmank

Member
Dec 23, 2015
22
0
I rooted my phone with "phh's SuperUser 17 (Magisk Version) (2016.8.20)". It worked perfect. But now i need to unroot my phone becouse i will update android.
Can anyone please tell me how to unroot my phone if im rooted with "phh's SuperUser 17 (Magisk Version) (2016.8.20)"? i really couldn't find any guide or option.
 

Primokorn

Senior Member
Nov 17, 2012
11,562
7,754
OnePlus 8 Pro
If I'm asking it's because I think it could be related ;)
I'm seeing a lot of network errors in your log, and you most probably have "Package Verification" enabled, which needs to have a stable internet connection (or no connection at all) to work.
If you have a flaky connection, you'll see a timeout, which is normal.
New log with no Internet connection (data and WiFi). FYI I use microG instead of Gapps.
 

Attachments

  • aosOjS4M.zip
    4.8 KB · Views: 21

Wlkchnbndgr

Senior Member
Aug 23, 2014
270
49
Herne
I rooted my phone with "phh's SuperUser 17 (Magisk Version) (2016.8.20)". It worked perfect. But now i need to unroot my phone becouse i will update android.
Can anyone please tell me how to unroot my phone if im rooted with "phh's SuperUser 17 (Magisk Version) (2016.8.20)"? i really couldn't find any guide or option.


Flash fresh Android IMG and done like in Op. (Fresh installiert)
 

jellyfeels

Senior Member
Mar 13, 2015
83
10
40
kuala lumpur
just want to ask, is there anyway to remove superuser from system or i need to flash the rom again? because the rom that i currently using have build in superuser. need to remove it before i can flash magisk
 
Last edited:

Robot76

Senior Member
Aug 26, 2015
1,427
792
Aotearoa
Sony Xperia 1
Sony Xperia 1 V
Not sure which app is to blame but I don't get prompts for Viper4arise 2.3.4.0
Is there any way to manually give that app supersu?
Yo! ViPER4Arise doesn't need or use SU, just normal permissions via settings/app/
ViPER4Arise has no business accessing system...
[emoji7]

For further troubleshooting, why not ask guitardedhero...

No SU:
47bd317233de1137a53d2845ea823571.jpg


A.R.I.S.E. Z3C SLiMM EliteKernel Phh.Superuser Rr.Xposed Substratum Systemless
 
Last edited:

GeekMcLeod

Senior Member
Apr 27, 2012
1,508
798
Niagara Falls
OnePlus 10 Pro
Yo! ViPER4Arise doesn't need or use SU, just normal permissions via settings/app/
ViPER4Arise has no business accessing system...
[emoji7]

For further troubleshooting, why not ask guitardedhero...

No SU:
47bd317233de1137a53d2845ea823571.jpg


A.R.I.S.E. Z3C SLiMM EliteKernel Phh.Superuser Rr.Xposed Substratum Systemless

It says I need it to install my driver. Before switching to magisk and phh, it was working fine.
 

Toutatis_

Senior Member
Oct 3, 2012
1,395
828
@PunchUp

Any chance you could change the position of the dial pad when we're prompted to enter our PIN code?

I wish it were at the bottom instead of the top. This placement is not very convenient, especially when you have a big display and/or only one hand available (I have a 6P).

Curious to read what other users think of this.

Cheers
 
Last edited:

Robot76

Senior Member
Aug 26, 2015
1,427
792
Aotearoa
Sony Xperia 1
Sony Xperia 1 V
It says I need it to install my driver. Before switching to magisk and phh, it was working fine.

Oooo... My bad...

Try this:
Disabling Viper4arise fx, and install the systemless ViPER4Android at the OP here...

Also try asking Joe Blogs at the ViPER4Android thread about your predicament, he's also familiar with Arise project..

Sorry, not much help am I...
[emoji7]

A.R.I.S.E. Z3C SLiMM EliteKernel Phh.Superuser Rr.Xposed Substratum Systemless
 
Last edited:
  • Like
Reactions: GeekMcLeod

PunchUp

Senior Member
Sep 18, 2013
4,282
2,879
@PunchUp

Any chance you could change the position of the dial pad when we're prompted to enter our PIN code?

I wish it were at the bottom instead of the top. This placement is not very convenient, especially when you have a big display and/or only one hand available (I have a 6P).

Curious to read what other users think of this.

Cheers
That's strange. I see a dialog on my device.
 
Last edited:

exchequer598

Senior Member
Jan 23, 2011
89
31
Chennai
inversekarma.in
@PunchUp

Any chance you could change the position of the dial pad when we're prompted to enter our PIN code?

I wish it were at the bottom instead of the top. This placement is not very convenient, especially when you have a big display and/or only one hand available (I have a 6P).

Curious to read what other users think of this.

Cheers
I totally agree. A dialpad on the bottom of the screen also makes it easier for one-hand operation.
 

ftarules

Senior Member
Jan 20, 2007
627
86
I've Magisk V6 installed on my Nexus 6P. If I want to flash the latest superuser zip from this forum, I think it's v259, do I just flash that or do I need to do anything special? I like the ability to toggle superuser in Magisk to let Android Pay work.
 

krelvinaz

Senior Member
Feb 20, 2008
2,729
649
Mesa AZ
Hmmm did some searching but didn't see anything like what happened after I rebooted my Nexus 5x this evening and root was lost with a notice from superuser that a binary update was needed??

Everything was working just fine for more than a week with the configuration.

Nexus 5x
Android 7.0 NRD90S

Was configured with a flash via TWRP v3.0.2-2 Bullhead of both:

Magisk-v6.zip
phh-superuser-17.magisk.zip

and the apps for both:

Magisk_Manger_v1.2.apk
phh's superuser apk v1.0.3.3

Has been working just fine for more than a week however after the reboot tonight, there was a notification from superuser that binary needed to be updated but clicking on the notification just took you to the app itself with no indication of or how to update.

Root was lost in the reboot.

It is not clear how the binary for superuser is to be updated as there doesn't appear to be a newer version available or mentioned anywhere.

BTW there are a number of "reviews" on the phh superuser app google page that others are seeing the same so it is not just me.

It is late, so I will check back tomorrow to see if this rings any bells or a solution is available.

Thanks!
 
  • Like
Reactions: meekrawb

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