yashsingh1/xdaforums huggingface dataset:
[Magisk] mmoogle:
Possibly - I'm still seeing quite a few /magisk/phh/su processes even after killing root in Magisk manager. I though it was supposed to go through and nuke all of those?

Snip from "ps |grep root" after toggling root:

root 4465 1 5656 828 __skb_recv 0000000000 S logcat
root 6648 1 2796 96 __skb_recv 0000000000 S /magisk/phh/su
root 7820 2 0 0 VosWDThrea 0000000000 S VosWDThread
root 7821 2 0 0 VosMCThrea 0000000000 S VosMCThread
root 7822 2 0 0 VosTXThrea 0000000000 S VosTXThread
root 7823 2 0 0 VosRXThrea 0000000000 S VosRXThread
root 7824 2 0 0 VosTlshimR 0000000000 S VosTlshimRxThre
root 7856 2 0 0 wlan_loggi 0000000000 S wlan_logging_th
root 9432 2 0 0 cpe_worker 0000000000 D cpe-worker-thre
root 9465 2 0 0 cpe_worker 0000000000 D cpe-worker-thre
root 10121 2 0 0 irq_thread 0000000000 S irq/448-msm_hs_
root 10981 1 2796 108 do_wait 0000000000 S /magisk/phh/su
root 11021 10981 2796 52 do_wait 0000000000 S /magisk/phh/su
root 11024 11021 5544 844 pipe_wait 0000000000 S sh
root 11280 1 2796 108 do_wait 0000000000 S /magisk/phh/su
root 11327 11280 2796 52 do_wait 0000000000 S /magisk/phh/su
root 11329 11327 5544 908 pipe_wait 0000000000 S sh
root 13439 1 1912036 27492 SyS_epoll_ 0000000000 S eu.chainfire.recently:root
root 13476 1 2796 104 do_wait 0000000000 S /magisk/phh/su
root 13485 13476 2796 56 do_wait 0000000000 S /magisk/phh/su
root 13486 13485 5544 904 pipe_wait 0000000000 S /system/bin/sh
root 13549 13439 5544 844 sigsuspend 0000000000 S sh
root 13558 13549 5420 1092 __skb_recv 0000000000 S /system/bin/logcat
root 15226 1 2796 108 do_wait 0000000000 S /magisk/phh/su
root 15232 15226 2796 52 do_wait 0000000000 S /magisk/phh/su
root 15233 15232 5544 924 pipe_wait 0000000000 S sh
root 16046 2 0 0 worker_thr 0000000000 S kworker/0:3
[Magisk] chrisc93:
Hmm, that is strange. Thanks for the dump, I'll continue to look into this.
[Magisk] sansnil:
The only good thing about Monday is that I got to some AP testing now that the weekend is history...

So I took my N6 out with v6 and had some interesting results. I tried a few things:

1) Root disabled, Xposed enabled - AP transaction fail

2) Root disabled, Xposed disabled (and rebooted of course) - AP transaction fail

Case #2 surprised me as that used to work so I took a cue from the SuperUser app discussion and disabled SuperUser with TB. Rebooted to be sure and got:

3) Root disabled, Xposed disabled, SuperUser app disabled - AP transaction failed

Perplexed, I opened to AP to see if I could add a card. I went so far as to get the camera looking for the new card and then backed out since it looked like it would let me add a card. So then:

4) Same config as #3 above, but after playing with the AP app - you guessed it...SUCCESSFUL AP transaction

So pushing my luck I went for:

5) Root disabled, Xposed ENABLED, SuperUser app disabled, AP app refresh - SUCCESSFUL AP transaction

It's starting to feel like the AP app needs to be opened to force a re-check on root (or whatever) to clear it to work. It must periodically check for root so you have to wait until it checks wo/root to clear. The only thing scenario I didn't have time to check but wish I had was if it would work with the SuperUser app enabled. I'm thinking it would.
[Magisk] waylo:
This is it! I think you figured it out!

In the past I'd just tapped it and it would fail. This time i unmounted root and tried adding a new card, and then aborted it. Then right afterwards, I tried doing the transaction. This is the first time it worked!

I didn't end the superuser process either.

Now the question is how long it'll stay activated if I don't actively expose it to a rooted state. And if there's an easier way to force root check other than adding a card.
[Magisk] elreydenj:
Great find! Thank you.
[Magisk] CSX321:
[MENTION=4470081]topjohnwu[/MENTION] [MENTION=724527]sansnil[/MENTION] [MENTION=2562936]waylo[/MENTION] Brilliant! For the first time ever, I got Pay to work using Magisk on my Nexus 5. I started with stock MOB30Y, flashed Magisk v1, phh Superuser v1, and ElementalX kernel. Rebooted and installed the phh Superuser app. Unmounted root in Magisk Manager. Went into Pay and started to add a card then cancelled. Bingo...bought a Mt. Dew from the machine here at work.
[Magisk] waylo:
Just as a follow-up, about 2.5 hours later I went back to the vending machine to test out another transaction. I actually FORGOT to unmount root. I just stuck the phone next to the reader, and AP just accepted the transaction.

So the timing of the voiding/reverification of AP remains a bit of mystery, but at least we know we can force re-verify the app prior to transactions.
[Magisk] sansnil:
Wow, even with root enabled! The plot thickens. :)

I wonder how long it will stay cleared... I was assuming it was on a regular basis (eg startup, every hour etc) but perhaps it's not very frequent.
[Magisk] SirVilhelm:
Just to clarify, do you have to try and add a card with root disabled or just open the app?
[Magisk] waylo:
Opening the app is not enough. You initiate the process of adding a card, cancel it, then go forth with the transaction.

Afterwards, it may work for a period of time if you do another transaction without trying to add a card.
[Magisk] henry_gale:
Sorry, dumb question - Uninstalling the preinstalled keyboards (Japanese, Korean, Indian, Pinyin, etc) with Titanium would affect the system partition and therefore AP, correct? They would be deleted from /system/app/KoreanIME/ right?
[Magisk] sansnil:
It would definitely modify the system partition. Whether or not it would affect AP is less clear. My opinion isn't authoritative but my guess would be no impact to AP but system OTA updates would fail.
[Magisk] MrBrady:
In my opinion, no. I have run Pure Nexus (AOSP-based ROM without all the extra keyboards), plus custom layers, plus build.prop mods and Android Pay works fine as long as the device isn't rooted (was rooted, then unrooted to use AP). I'll be testing with Magisk soon.
[Magisk] ThePurpleK:
In that case, I wonder whether it would be possible to increase the time between checks by hooking into a process.
[Magisk] biff6789:
I'm not so sure this is true... Yesterday I successfully completed a transaction on my Nexus 6P (latest 6.0.1 build, magisk v6, magisk manager v1.2, phh root (magisk version 17), systemless xposed with half a dozen modules - basically everything that can break AP I got going on here). Having a Nexus I've been unable to get things working until yesterday. All I did was the following:

1) Rebooted the phone. The very first instant I could unlock my phone after the reboot I went right into Magisk and shut off just root. You can tell if you do it quick enough if Superuser gives you a notification that the binary is out of date (because it can't see it)

2) Went into Dev Options -> Running services and scanned for anything root. There was nothing in 'running services' but Superuser was sitting there in 'cached processes' so I killed it. I personally doubt AP scans for any and every root app here since there are just too many

3) Walked up the register, OPENED JUST THE AP APP, BUT DID NOT TRY ADDING A CARD and the transaction went through without a hitch. I used a card I had added several weeks back.

^^ It's either one or a combination of just those 3 things above. Either AP or the OS itself scans for root sometime shortly after a reboot, AP scans for certain root things on your phone quickly when you open it, or at some point in the process AP or the OS looks for certain active root application processes. At no point in the process did I ever try to add a card. A little trial and error and we should be able to narrow down which of the 3 items above is required to pass the check. Once we get that far hopefully some simple logic or timing delays could be added to Magisk to get it working seamlessly.
[Magisk] CSX321:
I don't think we necessarily disagree with you. I think the key thing is just that the most recent check AP does must pass before you make a payment. We've found that trying to add a card seems to reliably force a refresh of that check. It's quite possible that what you did also results in the most recent check passing.
[Magisk] garthybarthy:
Confirmed AP to be working, tested transaction today and it went through fine.

Samsung Galaxy S6 Flat

Griffin Rom 6.0.1 MM

Arter 21.1 Custom Kernel

Xposed 86.5 Enabled

Magisk V4 with PHH SU, root disabled via toggle.

Thanks very much [MENTION=4470081]topjohnwu[/MENTION]
[Magisk] bmg1001:
I wonder if there is a way to force an AP refresh without having to do the add card and cancel process.
[Magisk] waylo:
Agreed. I suppose 'beating' the root startup processes is one way to hide root from AP, which probably checks upon first run/boot.

The superuser process is definitely not part of the check. It is definitely still running when I make my AP transactions.
[Magisk] sansnil:
I've seen a number of posts from people on non-Nexus devices that don't seem to need to have to nudge AP into doing a root check and I'm remembering someone (apologies to whomever) who posed the question a while back if the problem Nexus devices were having could be caused by AP being installed as a system app versus a user app on other devices. Is that difference correct (let alone if it helps with AP)? I was thinking AP would always be a system app.
[Magisk] biff6789:
Ok cool. So to test this a bit further since my post on the prior page I tried another test and think I can confirm that a check happens right at boot. Here's what I did:

1) Disabled root right at boot. Added a new card (I clean flashed last night so I had to add it again; unrelated). Once the card was added I toggled root back on again via Magisk (i.e. root re-enabled).

2) Then with root enabled I tried to get AP to tell me it couldn't verify my phone by adding another card. But oddly it let me try add a card just fine even though root was enabled, which is consistent with the earlier user who forgot to turn root off for several hours and had a transaction work. I force closed AP several times then re-opened it trying to get it to tell me it couldn't verify, but every time it let me add a card without issue. Weird.

3) Rebooted and let root load at boot then opened AP and it finally told me it couldn't verify my system. Perfect, this is the result I wanted. Now that the most recent AP check has told me I failed, I rebooted again.

4) After reboot I once again blocked root as soon as possible. Then I tried to use AP WITHOUT OPENING THE APP and the transaction went through perfectly.

So that strongly suggests that a check runs at boot and passing that check seems to last for some period of time, even if you remount root again and open the AP app from scratch. Perhaps the next version of Magisk could by default disable root for the first 5 minutes after a boot. Then root could flip back on again. The user could also override this via Magisk if they need root for some reason right away at boot.
[Magisk] waylo:
Great troubleshooting on the boot process.

Interesting thought [MENTION=724527]sansnil[/MENTION] re: system app status. AP is a system app on my G5 as it comes pre-installed. I don't think it must be a system app as it is install-able by anyone using the Playstore.
[Magisk] bouchigo:
Used latest Magisk v6 on my Nexus 6P with Official Nougat today at McDonald's and it worked with no problems :good:
[Magisk] thechilipepper:
Just adding to the cacophony of praise: I got AP to work on stock Nexus ROM!

You do have to toggle root off, and then try to add a card, cancel, and then pay. I don't believe that it works beyond a day, as adding a card is the first thing I checked when I first installed Magisk at night. The next day I tried to pay and it did not work. So I don't believe that AP only checks at boot. Perhaps midnight as well? x hourly intervals?

In any case, here are all the details:

Device Model: Nexus 5X

Android Version: 6.0.1

Magisk Version: v5

Root solution: phh's superuser 17

Xposed Status: never installed

ROM: Nexus Stock ROM

Android Pay App Ver: 1.5.130002920

Android Pay Transaction: Success! (after trying to add a card and canceling)
[Magisk] Droidphilev:
Hi,

Good that some people can anrrow it down for AP but still i think something is broken in last versions of Magisk. I have an app that i try to use (not AP) and it worked fine in the version of Magisk with the 'minutes field' and disable button. All later versions of Magisk don't work anymore. (The app i want to use was not updated in the mean time so no way they 'fixed' it). I always test with exact the same rom etc and always a fresh install.
[Magisk] M@XLOL:
If you wouldn't mind sharing the steps you took this is relevant to my interests.
[Magisk] AchillesTheGod:
What? I thought Xposed wasn't out for Android Nougat yet.
[Magisk] bouchigo:
If you are starting fresh (wiping data) it's easier, but you don't have to, I didn't :good:

I'm assuming you are currently running Magisk, if not, then get rid of any other root method you've installed. I'm also assuming you are already on Official Nougat, if not, it's ok.

Removal of old Magisk (either before or after getting on to Nougat; if you wiped data when going to Nougat, then Magisk should already be removed and proceed to step 2 of the removal process):

Removal:

1. Flash Magisk uninstaller

2. Uninstall Magisk Manager

New Install:

1. Install Magisk v6

2. Install phh-superuser-17-magisk.zip

3. Boot into OS and install Magisk Manager v1.2

4. If you wiped data, or haven't installed Phh's Superuser, install it from the Playstore

That's it, you should be set to go :good:

I don't use Xposed.
[Magisk] AchillesTheGod:
My bad I thought it was a Xposed mod

---------- Post added at 06:51 AM ---------- Previous post was at 06:46 AM ----------

I can't find the Phh-superuser-17-magisk.zip only Magisk
[Magisk] Droidphilev:
I think you forgot to mention the Phh superuser app as Magisk won't work without it. :)
[Magisk] M@XLOL:
That's what I did except I'm running tupacs + version I'll test tomorrow and report back.
[Magisk] AchillesTheGod:
Where do I download the other zip.
[Magisk] bouchigo:
At the end of post #2 in this thread: http://xdaforums.com/android/software/mod-magisk-v1-universal-systemless-t3432382

I had it on there then I deleted it because if you don't wipe data it should still be there. I'll add it back in there to avoid confusion :good:
[Magisk] AchillesTheGod:
Alright. I removed super su and unrooted in the settings of SUPERSU. booted into TWRP. and installed it order you told me. .. I have no root access. Even installed the apk... Still can't add a card in Android pay. What gives. And Running Official Nougat.
[Magisk] bouchigo:
Are you sure you had a stock boot.img that wasn't modified by chainfire's SuperSU installation. Did you remove the su.img from /data?
[Magisk] AchillesTheGod:
I did have a modified boot.img. the only way to get twrp on nougat is with a modified boot.img. I hit no instead of yes when super su asked to restore my boot.img. I can almost guarantee. If I hit yes I would boot loop.
[Magisk] mobileman88:
The latest twrp 3.0.2-1 natively supports N. No need for custom boot.img anymore. It was released yesterday
[Magisk] AchillesTheGod:
So.. I'm going to have to install the default boot.img huh. Well.. I don't have to erase user data do I?
[Magisk] mobileman88:
Not at all. I did not lose any data at all upgrading to N. Rooted just fine too. Looking forward to Xposed and Gravity box for N to come.
[Magisk] Zen2209:
Work around

I'm using a Zenfone 2 (ZE551Ml) and I'm able to tap and pay with my phone without using Android Pay all together. Check if the bank your with has their own app and install it. After doing so check if there is a tap and pay system built with in the app and set it up. It should work absolutely fine with a rooted phone and xposed installed. :)
[Magisk] indocomsoft:
AP Working, Nexus 5X Stock

Device Model: LG Nexus 5X

Android Version: 6.0.1

Root solution: phh's superuser

Xposed Status: Enabled

ROM: Stock ROM

Android Pay App Ver: 1.5.130002920

Android Pay Transaction: Success! after disabling root and trying to add a card and cancel
[Magisk] l1ttl3z:
Model: HTC 10

Android Version: 6.0.1

Root solution: phh's superuser

Xposed Status: Enabled

ROM: Bad Boyz

Safetynet: Pass

Android Pay App Ver: 1.5.130002920

Android Pay Transaction: Failed

I am able to use AP with this rom when i flash boot.img with dmverity disabled. I have tried every version of Magisk all with the same results.

Safetynet = Pass

AP Transaction = Failed
[Magisk] joeyddr:
have you tried disabling root and trying to add a card and cancel first
[Magisk] waylo:
Yes, this seems to be required on many phones, unless you can catch the phone IMMEDIATELY after boot and unmount root asap.
[Magisk] Pig Vomit:
Nexus 6P

Android 7.0 (OTA from DP5)

Root: phh superuser 17

Xposed: not installed

ROM: stock, except Magisk 6, phh superuser

Android Pay: v 1.5.130002920

AP works after clicking on "add card".

However, Magisk is *not* rerooting without a reboot. Anyone have any suggestions?

**********EDIT**********

I uninstalled phh app and Magisk Manager, then adb sideloaded the 1.1GB OTA, essentially going back to stock. Then reinstalled TWRP, Magisk V6 and phh 17, installed phh Superuser and Magisk manager apps. Now Magisk Manager seems to be rerooting just fine.

**********EDIT to my last EDIT!***********

So before posting, I just toggled the root switch in Magisk Manager to off, then after a few seconds, toggled it back on. Worked just fine.

Then, after I posted, I decided to use SafetyNet Helper to double check. So leaving the root toggle on, I checked with SafetyNet, and I failed. Toggled back on......and does not reroot without a reboot.

I also note that I can slide root toggle to ON, but if I close the app then reopen, it is back in the OFF position. I can toggle to ON, then reboot, and I regain root.

**************FINAL EDIT (embarrassed)**************

These issues were frustrating me, so today I redid everything. Only thing I did different than last time was wipe everything except userdata before sideloading the full OTA. Now it is working correctly, can unroot and root on the fly without reboot.

Although I had done a full unroot/uninstall of SuperSU before last time, I suppose it's possible something was left which was causing my problems.

Sure wish they'd release the 6P factory images for 7.0.
[Magisk] kryptikal:
Device: Nexus 6

Version: 6.0.1

Magisk: v6

Root: phh superuser 17

Xposed: v85 installed & active w/ 4 modules

Kernel: ElementalX 3.18

ROM: Pure Nexus 8-21 (& 8-3 gapps)

Android Pay: v 1.5.130002920

Outcome: Success (after clicking on "add card" then backing out)
[Magisk] k_l_o:
HTC 10/US UN-LOCKED

Android 6.0.1

LeeDrOid ROM

Magisk 6

phh superuser 17

NO Exposed

***performed the "add card" and cancelled***

Android Pay SUCCESS

UPDATE-----

Decided to see how far I'd get with Xposed. Installed the v86.5 Framework ONLY, no modules, couldn't get pass "add card" I'm not going to try with Xposed disabled w/reboot because it'll become a hassle.

------2nd UPDATE-----

Good News! (If anyone cares, that is...)

So I tried Xposed installed, again. After installing Xposed, also activated a module, I went into /data and found a super.img(I'm assuming Xposed installed the .img during installation because it wasn't there before.) which, then, I proceeded to delete because of the reading I've done. Rebooted and with Exposed ENABLED, Magisk ->Root UNMOUNTED -> AP -> "Add Card", and IT WORKED!!!! Stuck at my desk, don't know when I'll get a chance to make an AP purchase. Will update with results, eventually...

***YES!!! AP SUCCESSFUL!!!!
[Magisk] MrBrady:
Device Model: Nexus 6 (Shamu)

Android Version: 7.0 (Preview 5)

Root solution: phh's magisk superuser 17

Xposed Status: Not Installed

ROM: Stock ROM

Kernel: Elemental X v4.07 (Aug. 2 Release)

Android Pay App Ver: 1.5.130002920

Magisk Ver: 6

Magisk Manager Ver: 1.2

Kernel Set to Permissive in Magisk Manager for Viper A.R.I.S.E. to work.

Android Pay Transaction: Success after disabling root and trying to add a card and cancel

EDIT:

Forgot to note that my phone was unlocked and I was using it prior to the purchase. Tried the purchase and it was rejected. Looked at my phone and Android Pay was requesting my screen lock password, even though it was unlocked previously. Once I put in my password and tried the transaction again, it went through fine.
[Magisk] bhughes3:
Device Model: Nexus 6P Angler

Android Version: 7.0 (OTA from Stock 6.0.1)

Root solution: phh's magisk superuser 17

Xposed Status: Not Installed

ROM: Stock ROM

Kernel: ElementalX N6P 3.04

Android Pay App Ver: 1.5.130002920

Magisk Ver: 6

Magisk Manager Ver: 1.2

Android Pay Transaction: Failed when only disabling root and tapping to attempt payment. Will try again with adding card and cancelling, then tapping to pay.
[Magisk] ohlin5:
Adding another confirmation of behavior for AP:

Device Model: Nexus 6P Angler

Android Version: 7.0 (Stock OTA zip, from PN 6.0.1)

Root solution: phh's magisk superuser 17

Xposed Status: Not Installed (Android N)

ROM: Stock ROM

Kernel: Stock

Android Pay App Ver: 1.5.130002920

Magisk Ver: 6

Magisk Manager Ver: 1.2

Android Pay Transaction: Started from enabled root status, and had been booted into Android for a couple days. Disabled root from within Magisk manager, successfully added card. re-enabled root, tried adding a 2nd card, failed all the way at the last step.

Then re-enabled root and immediately closed and tried tapping to pay = AP failed. Waited maybe 30 seconds, tried tapping to pay again = AP again failed. Opened AP and tried adding a card, just click the "+" then credit/debit card and then backed out. Finally tried tapping and paying again and worked this time.

So in short, yes AP only checks for root at certain times, and unfortunately one of those times isn't at tap to pay time ;)
[Magisk] rtthane:
Device Model: Nexus 5X

Android Version: 7.0

Root solution: phh's magisk superuser 17

Xposed Status: Not Installed

ROM: Tupac4u odex debloated stock

Kernel: Stock

Android Pay App Ver: 1.5.130002920

Magisk Ver: 6

Magisk Manager Ver: 1.2

Android Pay Transaction: Failed when only disabling root and tapping to attempt payment, but then opened AP app and selected add card, then cancel. Tried again, success!
[Magisk] l1ttl3z:
Wow it worked, thankx.

I noticed that with v6 my toggle for selinux is off and wont stay on. Im not sure what it does or if it is important but its been on with every other version.
[Magisk] topjohnwu:
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.
[Magisk] Droidphilev:
Thank you for the info! You think the update will fix hiding root for other apps than AP that still see root since V4?
[Magisk] itechy:
It does at the All 4 (a TvonDemand app) doesn't support rooted device. When root is unmounted it works fine :3
[Magisk] adomm420:
Toggles are grayed out in Magisk manager for me.
[Magisk] KaMyKaSii:
You gave superuser permission to Magisk Manager?
[Magisk] adomm420:
It didn't ask for it, tried to reintall the apk, and it didn't ask for root as well...
[Magisk] MrBrady:
Looks like you didn't install PHH Superuser from the Play Store.
[Magisk] adomm420:
I did
[Magisk] jhedfors:
Your screenshot shows the clockworkmod superuser app, not the PHH one.
[Magisk] adomm420:
It is phh's superuser. But I've found a problem, I've had installed wrong phh's superuser zip, but I fixed that, and it's working now.