yashsingh1/xdaforums huggingface dataset:
[Magisk] topjohnwu:
Added FAQ in the OP

My tester with v2 phh root only, using the v2 unroot method and he got transmission working

However after he flashes Xposed, it won't let him to buy things (I've tried to kill all Xposed background services but it won't help)

So people who really want to try Android Pay, don't do other mods yet, please test with only:

Stock rom + Magisk v2 + this phh root v2

Thank you very much!

P.S. The temp unroot issues in custom roms shall be fixed in Magisk v3
[Magisk] joeyddr:
What about purenexus
[Magisk] SirVilhelm:
How do you go about installing it as a system app? I cannot install Magiskv2 app as a normal app.
[Magisk] soder:
You're right...

/Söder
[Magisk] voland66:
[MENTION=4470081]topjohnwu[/MENTION]: it is possible to execute shell commands as root even when root is unmounted. I guess it has to be the case to be able to remount root. But I wonder if one could somehow use that to allow root apps to run? Kind of creating a sandbox where for some white-listed apps su is in the path? Or modifying the apps (open source apps at least) to look in magisk directories is the only way to let them use root when root is not mounted?
[Magisk] habylab:
I completely forgot that Magisk is just for root really, and doesn't solve the issue of hiding Xposed (without a reboot)

Damn.
[Magisk] voland66:
Did you do the add card/backout trick after unmounting root?
[Magisk] sansnil:
Everyone has different experiences based on their device it seems but for me on my N6 systemless Xposed didn't trip up AP (root would of course). Your mileage may vary as noted.
[Magisk] habylab:
Sure. I see people with my device having success though, it's odd.
[Magisk] westeight:
I didn't. But at least I now know that my phone is being recognised as an Android pay device.

Will try the add card trick next time.. :)
[Magisk] westeight:
The Tasker Android Pay script works perfectly.

Auto unmounts root using Magisk

Auto enables NFC

- - - ANDROID PAY purchase - - -

Auto mounts root using Magisk

Auto disables NFC

Completely seamless.
[Magisk] habylab:
Hi,

I've downloaded all the files, and can only import the Unroot project. However, within this is the enable and disable root tasks in Tasker. It does not seem to Re-root though, and leaves NFC disabled. I can't see another task to import, what could I be doing wrong? Accessibility is enabled and both add-ons are downloaded with root+Xposed for Secure Settings. Thanks!
[Magisk] westeight:
Tasker > Preferences > UI > uncheck 'Beginner Mode'.

Now you will see a 'Home' button on Tasker. Long press it and select import. It will automatically import all the four files needed for the script to function correctly. :)
[Magisk] westeight:
Also check that the script is loaded and active:
[Magisk] habylab:
Have done that already, no luck still.

Script is active. When is it meant to be mounting Magisk again? I can't get it to work. I can't get Android Pay to add a card anyway, as my bank isn't supported, but I'm testing it by opening and closing the app after hitting "add card". Magisk is always not mounted, NFC still enabled.
[Magisk] bouchigo:
Is it always active, or does it only activate when AP is being used?

Are you on Nougat or MM?

I'm on Nougat, and I'm wondering if Tasker works properly on Nougat because the profile is not activating; though, I haven't tried purchasing anything yet.
[Magisk] westeight:
Latest LeeDroid with ElementalX

It's only active when AP is either open or in the 'recent apps' list.

eg when I open AP:
[Magisk] westeight:
Then when I close it or remove it from recent apps:
[Magisk] bouchigo:
I looked up leedroid, and if I'm not mistaken it's MM based, not Nougat based. I think that may be my issue because I had already tried opening AP, and the profile would not activate. I may try going back to MM just to test it out later today.
[Magisk] gaganit:
Does this require a specific version of Magisk Manager
[Magisk] KAsp3rd:
Negative, this will actually work without Magisk Manager
[Magisk] adrman:
Tasker isn't getting root access on some of my scripts since I went to Nougat. Luckily, most everything I had a script for is now handled by Android OS. The only thing that's not working for me is the gesture I had set up for screen off.
[Magisk] KAsp3rd:
It can take up to 10 seconds after you have closed AP and cleared it out of recent apps.

If you have tasker set to always be running (with a notification) then it will always be active scanning for AP
[Magisk] bouchigo:
Yeah, I think it's an issue with the combination of Tasker and Nougat.

I went back to MM and now it's working as expected:
[Magisk] voland66:
Unfortunately KC Tasker plugin does not appear to work on Nougat (I am using Nexus 5x with a stock rom). The profile is never triggered. I tried to create a test profile to check if it is KC Tasker, and yes it is -- not only is it never triggered, but if try to I configure it by choosing the process from the list of running processes, the only two that the plugin sees are shell and toolbox.

I think it might be related to restrictions on ps command. Running ps from a terminal on marshmallow gives me a list of processes without the root. On nougat I only see shell process without root. But running with root I can see all the processes, including AP. So one probably needs an update version of the plugin that knows about path of magisk's su
[Magisk] westeight:
I'm trying to figure out a way of automating this even further... with difficulty.

Is there a way to enable Tasker when Android Pay is opened and then to disable it when Android Pay is closed? That would seem logical and avoid the need for Tasker to be permanently enabled.
[Magisk] MrBrady:
Thanks for this setup! It looks extremely useful.

One of the problems I have with Android Pay (or maybe it's my American Express card tied to it), if the phone was not recently unlocked, it will ask for my screenlock password before approving the transaction. Frequently, if it asks for the screenlock password, it cancels the transaction and messes up the whole process.

A solution I found is to manually lock and unlock the screen within a few minutes prior to making an Android Pay transaction. Can this be built-in to the script? Lock the screen and automatically unlock, then proceed with the rest of the script?

I can imagine this would pose a bit of a security risk, but in order to run AP and have the script run, the phone would have to be unlocked in the first place, right?

I'm going to try this Tasker setup on PureNexus / Shamu (Nexus 6) later today at a vending machine.
[Magisk] g2uzer:
Device Model: Shamu

Root solution: phh's superuser

Xposed Status: Enabled

ROM: Latest PureNexus

Android*Pay App Ver: Latest Version

Android*Pay Transaction: Success!

Thanks For the Great Work!

After I turned Root off I opened AP as if I was going to Add a card, back out waited in line just a bit, tapped and Bam it worked! Thanks again
[Magisk] westeight:
After some trial and error I've been able to automate the Tasker / AP launch order using AutoMagic. This avoids having Tasker enabled permanently, just for the sake of Android Pay.

Now, when I tap on the Android Pay icon, the script does the following:

1. Launches Tasker

2. Clicks on the Tasker Menu

3. Selects 'Enable Tasker'

4. 1 second delay

5. Launches Android Pay

6. Launches the Tasker script 'Magisk Pay Unroot'

7. Unmounts root using Magisk

All in less than 5 seconds :)
[Magisk] g2uzer:
Nice but don't you still need to "add a card" in order for the transaction to fully work?
[Magisk] westeight:
No. Never needed to use that trick with the Tasker / Magisk script. Works 'as is'. :)
[Magisk] MrBrady:
So for it to complete it's re-root script, we have to manually close AP and clear it from Recents?

Also, in regards to asking always be running, is that suggested? I would rather it not be cluttering up my notification bar. Doesn't the script automatically run when AP is run? So why would Tasker need to be running in the foreground?

Also, I noticed when the phone first boots, it launches Android Pay and the Tasker Unmount script is active. Is that normal?

Going to test this shortly on my Nexus 6 w/ PureNexus. Fingers crossed!

EDIT: Does Tasker need Accessability access for this to work?
[Magisk] MrBrady:
Just tried a vending machine transaction with the Tasker setup and got the error message that Android Pay cannot be used with this device.

---------- Post added at 04:04 AM ---------- Previous post was at 03:17 AM ----------

Just rebooted and tried again and it worked fine

EDIT (details):

Device Model: Nexus 6 / Shamu

Android Version: 6.01

Root solution: phh's superuser

Xposed Status: Not installed

ROM: Pure Nexus 8/21, Pure Nexus Gapps 8/3, Stock Kernel

Android Pay App Ver: 1.5.130002920

Android Pay Transaction: Success (twice tonight!)

Installed Extras:

Tasker Profiles to automate process

A.R.I.S.E. Number 2.11

Init.d Tweaks

Systemless Ad Blocking

[MENTION=3505796]KAsp3rd[/MENTION] using your Tasker script. Currently Tasker launches AP automatically on boot and it seems randomly while I am using the phone. I understand the script checks for AP, but on my phone it actually launches AP. Any way to not have it do this?
[Magisk] voland66:
I'm confused. AutoMagic looks like an alternative to tasker (if the first result of play store search gives me the right app). Why would you even have two of them installed simultaneously?

In addition, does not it defeat the main purpose of the script?

I see two benefits from the script. First, it automates root unmount and it minimizes the number of clicks needed to use AP.

The second benefit is the main one. Potentially one never needs to do backout trick. I am saying potentially because I did not have a chance to test it yet and not all the reports are positive. The second and main benefit presumably works as follows: AP process periodically performs SafetyNet checks and updates root status. Tasker script monitors the AP process and hopefully unmounts root just before SafetyNet check is done. If script is successful, the AP won't know that the device is rooted when user needs it and therefore will not require the backout trick. If the script is not running -- I would expect that after a sufficiently long time interval AP will be informed of the true root status..
[Magisk] KAsp3rd:
Go to the tasks and select task Disable_root and remove step 10
[Magisk] westeight:
I had AutoMagic installed before Tasker and several flows control certain UI aspects on my phone. I also prefer the intuitive layout and incredible support given by the AutoMagic dev on their forum.

But to answer your question... Android Pay must be running in order for the Magisk unmount script to trigger, for NFC to be automatically switched on and for the SafetyNet check to pass.

So, my idea was to use AutoMagic to accomplish all of the above with one click on the home screen, using the AutoMagic script:

Tasker > Android Pay > Magisk unmount > NFC > SafetyNet pass > successful transaction.

No need for anything else. No trying to add a card, then backing out, etc. It's a single touch of the Android Pay toggle:
[Magisk] KAsp3rd:
I originally was attempting this with Automate for Android but have not had much time to look into it. The tasker setup was just a quick throw together for me. With Pokemon Go now using the safetynet API I've pretty much decided to just leave Magisk root unmounted until I need root. (At least until I find some time to actually devote to creating a proper script/process watcher)
[Magisk] MrBrady:
Perfect! Thank you.
[Magisk] KAsp3rd:
That's pretty much what I was intending to do with Automate and Tasker. I might have to look I to tour setup. Thanks for the insight on it.
[Magisk] westeight:
Your amazing Tasker Magisk project hasn't failed once! :)

I'm sure it would be simpler to automate everything using Tasker alone, but I'm new to this and Tasker (for me) is a steep learning curve.

Tomorrow I will try and add further steps to the AutoMagic script so it will also disable Tasker and then exit the app 60 seconds or so after a successful transaction.
[Magisk] voland66:
So the question is -- how is it different from unmounting root with Magisk Manager just before using android pay (other than automating it)? Most of the time, the latter is insufficient -- if system was running long enough, it already knows that the device is rooted. Presumably AP (or SafetyNet itself) does periodic checks and marks rooted status somewhere. If the script works, it must be because it is continuously watching for AP process and manages to unmount root before silent SafetyNet checks are done.

(I am not sure what nfc actions do besides automating things for people who normally have nfc off. But I think it would be strange if root discovery somehow depended on the status of nfc radio.)

If you prefer to use automagic -- you should be able to do everything in AutoMagic, especially if you don't want the script (or its automagic analog) to run constantly.

Nothing tasker specific is really required. The script already uses shell commands and I replaced two plugins it uses by additional shell commands.

One needs three things -- 1) ability to execute shell commands (a quick google search suggests that automagic has it); 2) ability to save output of shell commands to variables (no idea if automagic has it); 3) conditional statements (I'm almost sure that automagic has this). If all these things exist in automagic and if you want, I could send you a pseudo-code and shell commands that mimic the tasker script.
[Magisk] MrBrady:
The Tasker setup was working fine yesterday but today I'm getting only error messages about AP Cannot Be Used On This Device when trying to making a transaction.

Only difference is I installed (and have since uninstalled) a Substratum theme.

Nexus 6 with Pure Nexus 6.01, no Xposed
[Magisk] sansnil:
You'll likely still need to do the add card trick (when unrooted) once a day or after a reboot.
[Magisk] MrBrady:
Thanks! That defeats the purpose of the Tasker script, doesn't it?
[Magisk] sansnil:
Yes, until a more "systemic" solution is found to the manually triggered root check then Tasker won't be able to fully automate the process but the current Tasker scripts which have kindly been shared still do eliminate a lot of the manual steps so are still incredibly useful IMHO. Topjohnwu's next version may/may not do away with needing to trigger the manual root check but for now this is the current state at least as I know it.
[Magisk] westeight:
No. Haven't had to do that since using the Tasker script. Android Pay hasn't failed a purchase yet.

It works flawlessly. Every time. :good:
[Magisk] sansnil:
Yes. Your device experience is not universal.
[Magisk] westeight:
No.. but Tasker and the Android Pay project are :cowboy:
[Magisk] HamsterHam:
Surely if root is on all the time safetynet will eventually flag up you're rooted even if the android pay isn't open? That's my understanding.
[Magisk] westeight:
I wondered that too. I'm permanently rooted, except when I open AP using the Tasker script.

Have made 6 transactions in the past 24 hours and all went straight through.

First transaction I tried after flashing to the latest LeeDroid didn't work - phone wasn't recognised.

But that was my fault. I realised that after a ROM upgrade it's necessary to readd the credit card to Android Pay. Logical security step I guess.

Makes sense. :)
[Magisk] alatnet:
Phone: Nexus 6

Android Version: 6.0.1

Root Solution: phh SuperUser v17

Xposed Status: 86.5 Systemless - Enabled

ROM: Stock - MOB31E

Android Pay App Ver: 1.5130002920

Android Pay Transaction: Add Card Success - Transaction Failed.

Installed: Magisk v6, phh SuperUser v17 - systemless, Xposed 86.5 systemless., Viper4Android systemless, Hydra v4 Kernel.

Having problems getting Android Pay working. I was able to add my card but everytime I try to use it it errors out saying that it cant verify my system and that I may need to unroot. I did use the magisk manager to disable root but it still gives me that... I do have the safetynet test app and what not but, before I used the safetynet bypass xposed module, it would say that CTS Profile Matched is false. Tried to even "hide" root from android pay via RootCloak, but I doubt it does anything. I was beforehand system installed with supersu, viper4android, xposed, and busybox, but I would assume that erasing (via adb) both Boot and System that I would be "clean" of any system type installs.

I have tried not applying the Hydra kernel but I still get the same thing with android pay.

Any Ideas?

EDIT: Don't know if this is a violation of the forums or not to mention it but I do have Lucky Patcher installed....

EDIT2: didnt see post #255. will try that method tomorrow... sorry if this makes people freak out thinking that magisk doesnt work....

EDIT3: Can confirm that post #255 method does work. I'm happy now~~~~ ^.^

EDIT4: Can also confirm that disabling root via magisk manager allows pokemon go to function.
[Magisk] mobileman88:
Remove the Warez. It's the cause of most issues. Also you need to disable xposed and reboot before it works
[Magisk] agentdr8:
I haven't experienced any issues with leaving Xposed enabled when I use AP. Disable root, open AP and hit add card, back out, and then perform payment.
[Magisk] HamsterHam:
With the tasker script you have to open up Android Pay before using it right and then swipe it away after done? I take it it doesn't work on lock screen?
[Magisk] westeight:
Correct...
[Magisk] xstahsie:
I just wanted to confirm that clicking on the add a card button and backing out to the card selection screen works like a charm on my Nexus 6P with stock 6.0.1 ROM. The transaction that I just did completed successfully without any hiccups.

I had root turned off via Magisk manager and kept Xposed active.
[Magisk] hobbeast:
Anyone can remake magisk for android 4.4
[Magisk] alanmv567:
Worked on Note 4 T-mobile running Marshmallow! At first when I tried to tap it on the vending machine it said it could not go through. I did not reboot the phone nor disable xposed. All I did was unmount root from Magisk then went into AP then selected the add card, waited a while hit back then tried again. This time it asked me to enter my backup password, entered it and it worked!!
[Magisk] HamsterHam:
This was working, can't even add a card. It was working 2 days ago.
[Magisk] Captain_Throwback:
That's a different problem, if you got to that point. It won't let you get past the first screen in the "Add card" wizard if root is detected. I got that screen when my bank revoked access to Android Pay.
[Magisk] HamsterHam:
I rang my bank, they were not helpful. Said speak to google.

[MENTION=1162986]Captain_Throwback[/MENTION] - how did you get your bank to unblock it?
[Magisk] mlnono:
sony xperia work?

this version work on sony xperia tablet z2?

please make it work on sony type
[Magisk] smohanv:
Here is what I did...

1. Using Systemless xposed, Phh's supersser, magisk manager (other relevant magisk module)

2. Added card by unmounting root using magisk manager

Result:

1. Able to add both my credit and debit card issued by my bank

2. Tried to transact in a outlet, it threw the error that indicates "Android is unable to verify etc.." When I checked with SafetyNet Helper, it shows my device passed "SecurityNet"

What I doubt:

I flashed ViPER4Android (from Magisk thread and also from magisk module). There are instructions not to install driver when asked by V2A. But I installed driver when asked. I did this after adding cards and just before went to an outlet to use on a transaction. Could this be the reason why I was not able to complete transaction using AP.

Another question is, If I do not install V4A driver, when playing music I can not see under "driver status" in V4A as "Processing: No" and cannot feel imporved music. Does anyone not installing the driver using magisk version of V4A feel the same.

Device info:

Huawei P9 (EVA-L09)

Stock EMUI 4.1

Systemless xposed

Phh's superuser

several xposed modules used including minminguard, MaxLock, YouTube adaway, YouTube background play and few more

Installed f.lux, recently from Play Store

Manually copied modded Play Store
[Magisk] Didgeridoohan:
Did you start adding a card and then back out, with root being unmounted? If you read through this thread you'll find that's necessary for AP to work with Magisk.
[Magisk] Captain_Throwback:
I didn't - they finally enabled access for Android Pay. I still have one card that doesn't work.
[Magisk] HamsterHam:
I rang them again, they said it was activated on loads of devices haha. I was trying loads of new Roms. They are issuing me with a new card to fix it.
[Magisk] thalling98:
Just a confirmation, the tips on this discussion worked excellently on my 6P. Factory reset it a few days ago and did the following:

flashed mm 6.0.1 September 2016 security patch (build mtc20l)

installed TWRP 3.0.2-2

flashed magisk v6

flashed phh superuser 17 magisk

flashed systemless xposed 86.5 sdk23

Toggling root off in magisk manager allowed me to add my card to AP.

Today i tried an AP transaction for the first time; toggled root off in magisk manager (left xposed enabled and superuser app as it was), opened AP, started adding a card then backed out, put phone next to reader and transaction was successful :victory:
[Magisk] jiajialing:
Does this method works on Nexus 6p with Android 7, NRD90U?

TKS
[Magisk] steviemch:
It certainly does.

Nexus 6P
[Magisk] rebretz000:
For AP do you have to have Xposed installed? I see Xsposed mentioned with Magisk and root and AP.

New to Magisk and I haven't used Xposed for two years maybe.
[Magisk] steviemch:
No, in fact it's probably more advisable not to use xposed if you want AP to work as a lot of users are reporting issues even with magisk installed.

Nexus 6P
[Magisk] rebretz000:
Thank you for the reply, much appreciation.
[Magisk] Devo7v:
I've been using the Tasker profile and it works great. The only issue I've run in to is that with the profile enabled Android Pay will randomly open up while I'm driving around stealing focus and disabling root. Has anybody has this happen? I don't know if it's coincidence, but with the profile disabled I've never had out happen.

Also, had anybody tried AutoMagisk (https://m.reddit.com/r/android/comments/536www/_/?utm_source=mweb_redirect&compact=true)?
[Magisk] metrize:
on an S6 using magisk systemless xposed but that xposed makes me fail safetynet check still wtF???
[Magisk] mobileman88:
Disable or remove xposed
[Magisk] smohanv:
Here is another update. See screenshot attached.

Further to what I did, this time I uninstalled V4A driver and also removed it completely. Checked and confirmed that safety net passed through. Went to Toolstation (they accept Android pay). Tried paying and get the error as in the attached.

I am tired and giving up now though I didn't want to give up so far.
[Magisk] Didgeridoohan:
Ok, but did you follow my advice to start adding a card and then backing out just prior to making a purchase? That's the only way anyone in this thread has been able to get AP to work...
[Magisk] rebretz000:
SO you can't add a CC today, leave it in your AP, and make a purchase in 3 days? You can only add the card right before the purchase?
[Magisk] Didgeridoohan:
No, you're misunderstanding.

You should have your card registered. Just prior to making a purchase you should start the process to add a new card, but not actually doing it and instead backing out of the registration process.

The consensus is that AP regularly checks for root and remembers it. If you do the above with root unmounted, you fool AP into thinking your device is unrooted.
[Magisk] rebretz000:
Thank you for clearing that up for me. I added my card 3 days ago but haven't had a chance to use it. There's only two places in my town that accept mobile payments.