(Obsolete) [Magisk] [2017.1.3] phh's SuperUser topjohnwu r2

Status
Not open for further replies.
Search This thread

topjohnwu

Senior Recognized Developer / Inactive RC
Jan 31, 2012
1,849
61,431
Taipei
Magisk Compatible phh's SuperUser

This thread is obsolete, please check Magisk OP for MagiskSU
Files removed to prevent confusion

Official thread to phh's SuperUser: phh's SuperUser/ OpenSource SELinux-capable SuperUser

Requirements
Magisk is required to be installed on your device!
Magisk - The Universal Systemless Interface
Features
  • phh's 100% open source root
  • Packed with my own sepolicy-injection tools, which support live patching to work on small boot image devices
  • Magisk compatible, no boot image modifications are required
  • su.d support (place scripts in /magisk/phh/su.d)
Instructions
You can install/update phh's SuperUser in Magisk Manager's Download section
If you have no root in the first place, please flash the zip in the attachment through custom recovery
A root solution is part of a proper Magisk installation.
After phh's SuperUser is installed, please install the SuperUser manager Application through the Play Store
phh's SuperUser Manager

Source
 
Last edited:

topjohnwu

Senior Recognized Developer / Inactive RC
Jan 31, 2012
1,849
61,431
Taipei
Changelog

Changelog
  • topjohnwu r2
    - Fix binary out-of-date issue
  • topjohnwu r1
    - Forked from phh main repo, improved daemon launching
    - Fixed Samsung no-suid issue
  • r266-2
    - Preserve /sbin binaries to prevent issues
  • r266
    - Allow priv-app to start root
    - Allow audioserver to execute from memory (for Call Recorder)
    - (Magisk) Change path to /sbin, now same as official phh
  • r259
    - Initial release on Magisk repo
 
Last edited:

ThomasC1970

New member
Aug 9, 2016
4
2
Magisk V1 + systemless xposed work with Android Pay.

You have stated in your Magisk thread that Android Pay won't work with Xposed enabled, old method is still needed.

Want to update you that I have used your Magisk V1 and your version of systemless Xposed with Andoid Pay for payment on 9 August and it work. Phone is Oneplus 3. I only use Magisk to unmount root. Never have to disable Xposed or reboot phone.
 
D

Deleted member 2736178

Guest
K I installed magisk v2 and phh su v2...unmounted root and tried to buy coffee at Starbucks... No luck! Got the usual message when device is rooted. I am stock Nexus 6p no mods and AP worked yesterday before installing magisk and phh

This is crazy
 

topjohnwu

Senior Recognized Developer / Inactive RC
Jan 31, 2012
1,849
61,431
Taipei
K I installed magisk v2 and phh su v2...unmounted root and tried to buy coffee at Starbucks... No luck! Got the usual message when device is rooted. I am stock Nexus 6p no mods and AP worked yesterday before installing magisk and phh

This is crazy
Are you using Xposed?
One of my testers tried and Xposed won't work.
 

Droidphilev

Senior Member
Like where you live there's no AP here :)

I'm trying to find a way to hide root from a streaming app. I can't get root disabled (pressing 'disable' does nothing) (stock debloated nexus 6), that's why i was trying to get it to work with SuperSU.

BTW: the try with SuperUser did not make any logs, just FYI.
 
  • Like
Reactions: Logiel

topjohnwu

Senior Recognized Developer / Inactive RC
Jan 31, 2012
1,849
61,431
Taipei
You have stated in your Magisk thread that Android Pay won't work with Xposed enabled, old method is still needed.

Want to update you that I have used your Magisk V1 and your version of systemless Xposed with Andoid Pay for payment on 9 August and it work. Phone is Oneplus 3. I only use Magisk to unmount root. Never have to disable Xposed or reboot phone.
Thanks for your feedback!
I hate that I cannot use Android Pay myself.

No tester report the same result. I'm lost
 
  • Like
Reactions: gloeyisk and Brkge

joeyddr

Senior Member
May 4, 2011
1,991
329
Google Pixel 6 Pro
The log in cache says disabling for 5 minutes , but it stays mounted. It also takes away root for apps like root explorer and busy box. I can open a terminal and su fine safety net fails, so it seems it half disables root on purenexus but never fully unmounts as df shoes the partition still mounted. Root comes back to all apps after 5 minutes
 
D

Deleted member 2736178

Guest
Are you using Xposed?
One of my testers tried and Xposed won't work.

No Xposed. just a clean unrooted system and this morning flashed TWRP->magiskV2->phh.zip->installed phh superuser from app store->went to starbucks->disabled root using magisk manager->tapped phone to POS terminal and phone tried to pay (got the vibration and AP showed on screen) but payment failed with the Unable to verify this device message.

Yesterday at 6:45pm Pacific time I used AP without issues
 

chrisc93

Senior Member
May 22, 2013
447
1,079
The log in cache says disabling for 5 minutes , but it stays mounted. It also takes away root for apps like root explorer and busy box. I can open a terminal and su fine safety net fails, so it seems it half disables root on purenexus but never fully unmounts as df shoes the partition still mounted. Root comes back to all apps after 5 minutes

I get the same behavior on PureNexus
 

agentdr8

Senior Member
Mar 4, 2007
3,648
1,896
Cowtown, CA
The log in cache says disabling for 5 minutes , but it stays mounted. It also takes away root for apps like root explorer and busy box. I can open a terminal and su fine safety net fails, so it seems it half disables root on purenexus but never fully unmounts as df shoes the partition still mounted. Root comes back to all apps after 5 minutes

I get the same behavior on PureNexus

@topjohnwu here's a logcat dump from my Nexus 5x running the latest Chroma rom, from the moment I hit the "Disable Root" button in the new Magisk Manager

Code:
08-09 09:34:51.652 19739 19739 D su      : starting daemon client 10201 10201
08-09 09:34:51.663 19741 19741 D su      : connecting client 19738 
08-09 09:34:51.678 19743 19743 D su      : remote pid: 19738 
08-09 09:34:51.690 19744 19744 D su      : remote pts_slave:  
08-09 09:34:51.703 19745 19745 D su      : remote uid: 10201 
08-09 09:34:51.714 19746 19746 D su      : remote req pid: 18133 
08-09 09:34:51.721 19747 19747 D su      : remote args: 1 
08-09 09:34:51.728 19751 19751 D su      : su invoked. 
08-09 09:34:51.733 19749 19749 D su      : waiting for child exit 
08-09 09:34:51.739 19752 19752 W su      : hacks: Testing (com.keramidas.TitaniumBackup:0:10054) 
08-09 09:34:51.764 19753 19753 D su      : db allowed 
08-09 09:34:51.776 19754 19754 W su      : hacks: Testing (com.keramidas.TitaniumBackup:10201), 44451 
08-09 09:34:51.792 19756 19756 D su      : 10201 /magisk/phh/su executing 0 /system/bin/sh using binary /system/bin/sh : sh 
08-09 09:34:51.822 19759 19759 I init    : type=1400 audit(0.0:6447): avc: denied { execute_no_trans } for path="/sbin/magic_mask.sh" dev="rootfs" ino=9569 scontext=u:r:init:s0 tcontext=u:object_r:rootfs:s0 tclass=file permissive=1
08-09 09:34:51.832 19759 19759 I magic_mask.sh: type=1400 audit(0.0:6448): avc: denied { setenforce } for scontext=u:r:init:s0 tcontext=u:object_r:kernel:s0 tclass=security permissive=1
08-09 09:34:51.832   352   352 W auditd  : type=1404 audit(0.0:6449): enforcing=0 old_enforcing=1 auid=4294967295 ses=4294967295
08-09 09:34:51.838 19760 19760 E su      : unable to read int: 0 
08-09 09:34:51.839 19761 19761 E su      : unable to read int: 0 
08-09 09:34:51.835 19762 19762 I getprop : type=1400 audit(0.0:6450): avc: denied { write } for path="pipe:[178468]" dev="pipefs" ino=178468 scontext=u:r:toolbox:s0 tcontext=u:r:init:s0 tclass=fifo_file permissive=1
08-09 09:34:51.842 19762 19762 I getprop : type=1400 audit(0.0:6451): avc: denied { getattr } for path="pipe:[178468]" dev="pipefs" ino=178468 scontext=u:r:toolbox:s0 tcontext=u:r:init:s0 tclass=fifo_file permissive=1
08-09 09:34:51.845 19759 19759 I magic_mask.sh: type=1400 audit(0.0:6452): avc: denied { append } for name="magisk.log" dev="mmcblk0p40" ino=15 scontext=u:r:init:s0 tcontext=u:object_r:cache_file:s0 tclass=file permissive=1
08-09 09:34:51.860 19763 19763 I Magisk  : Temp unroot for 60 seconds 
08-09 09:34:51.858 19759 19759 I magic_mask.sh: type=1400 audit(0.0:6453): avc: denied { execute } for name="busybox" dev="mmcblk0p45" ino=212578 scontext=u:r:init:s0 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=1
08-09 09:34:51.858 19764 19764 I magic_mask.sh: type=1400 audit(0.0:6454): avc: denied { execute_no_trans } for path="/data/busybox/busybox" dev="mmcblk0p45" ino=212578 scontext=u:r:init:s0 tcontext=u:object_r:system_data_file:s0 tclass=file permissive=1
08-09 09:34:51.902 19764 19764 I killall : type=1400 audit(0.0:6455): avc: denied { signal } for scontext=u:r:init:s0 tcontext=u:r:su_daemon:s0 tclass=process permissive=1
08-09 09:34:52.227   479   479 I SELinux : SELinux: Loaded service_contexts from /service_contexts.
08-09 09:34:52.229   479   479 I SELinux : avc:  received setenforce notice (enforcing=0)
08-09 09:34:52.232   479   479 I SELinux : avc:  received setenforce notice (enforcing=1)

Like the PN users above, it results in a half-unrooted state; apps like Titanium Backup can't obtain root, but the superuser daemons are still running:

Code:
root@bullhead:/ # getprop | grep magis                                         
[init.svc.magisk_pfs]: [stopped]
[init.svc.magisk_pfsd]: [stopped]
[init.svc.magisk_service]: [stopped]
[magisk.phhsu]: [0]
[magisk.post-fs-data]: [1]
[magisk.timeout]: [60]

root@bullhead:/ # ps | grep phh                                                
u0_a112   17151 540   1477496 43768 SyS_epoll_ 7fa11841b4 S me.phh.superuser

root@bullhead:/ # which su                                                     
/system/xbin/su
 
  • Like
Reactions: joeyddr

sherlock5545

Senior Member
Jun 26, 2012
1,200
383
London
Just flashed this on my 6P. When I disable root, it allows me to add a card on Android Pay, so I assume it's also going to work payments. I can't test it right now, but will report back when I have the chance. Looks promising though!

Sent from my Nexus 6P using Tapatalk
 
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 169
    Magisk Compatible phh's SuperUser

    This thread is obsolete, please check Magisk OP for MagiskSU
    Files removed to prevent confusion

    Official thread to phh's SuperUser: phh's SuperUser/ OpenSource SELinux-capable SuperUser

    Requirements
    Magisk is required to be installed on your device!
    Magisk - The Universal Systemless Interface
    Features
    • phh's 100% open source root
    • Packed with my own sepolicy-injection tools, which support live patching to work on small boot image devices
    • Magisk compatible, no boot image modifications are required
    • su.d support (place scripts in /magisk/phh/su.d)
    Instructions
    You can install/update phh's SuperUser in Magisk Manager's Download section
    If you have no root in the first place, please flash the zip in the attachment through custom recovery
    A root solution is part of a proper Magisk installation.
    After phh's SuperUser is installed, please install the SuperUser manager Application through the Play Store
    phh's SuperUser Manager

    Source
    30
    Changelog

    Changelog
    • topjohnwu r2
      - Fix binary out-of-date issue
    • topjohnwu r1
      - Forked from phh main repo, improved daemon launching
      - Fixed Samsung no-suid issue
    • r266-2
      - Preserve /sbin binaries to prevent issues
    • r266
      - Allow priv-app to start root
      - Allow audioserver to execute from memory (for Call Recorder)
      - (Magisk) Change path to /sbin, now same as official phh
    • r259
      - Initial release on Magisk repo
    17
    phh superuser Update
    This update fixes issues if binaries under /sbin is gone and require a restart (rarely, but possible).
    Update is live on Magisk Repo.
    15
    phh's superuser update
    Also live in Magisk Manager now!! Directly upgrade phh's superuser within the app
    Just a small note, old phh root (r259) will NOT work on Magisk v9 (not released yet). However the new phh root (r266) is backward compatible to v7
    14
    Nice, it seems that AP is much simpler than I initially thought it would be :)

    It looks like a perfect time for a new Magisk update with the fancy fresh new Magisk Manager.

    I won't disable root at the boot time, because AP seems to do checks in the background every some period of time. So I will make the process manually done by the user. I think it is possible to force AP to recheck the root status without the need of manually add a card, but since I cannot use AP in my country I cannot develop further. I hope maybe some developer can find some way to do so (maybe by sending an intent to the AP app?!), if the method is found I'll implement it into the Magisk Manager app.