• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

Android Pay Working with Root

Search This thread

floreks

Member
Jan 5, 2013
33
2
Łódź
github.com
I've got Android Pay working with root and unlocked bootloader. I've had some time lately to play around with different configurations.

As far as I can tell from my tests CTS check is not related to unlocked bootloader but rather to decrypted system. I've had to leave encryption on after unlocking bootloader to pass SafetyNet check.

Current configuration:
Android 7.1.1 Stock Dev Preview
ElemenatalX kernel (probably I'll switch to franco as it drains my battery pretty fast)
Magisk + Phh systemless root
 
  • Like
Reactions: jrk190

yochananmarqos

Recognized Contributor
I've got Android Pay working with root and unlocked bootloader. I've had some time lately to play around with different configurations.

As far as I can tell from my tests CTS check is not related to unlocked bootloader but rather to decrypted system. I've had to leave encryption on after unlocking bootloader to pass SafetyNet check.

Current configuration:
Android 7.1.1 Stock Dev Preview
ElemenatalX kernel (probably I'll switch to franco as it drains my battery pretty fast)
Magisk + Phh systemless root
It does check for an unlocked bootloader. Using a kernel like ElementalX, Franco or Flash causes the check to pass.

Sent from my Nexus 5X using XDA Labs
 

floreks

Member
Jan 5, 2013
33
2
Łódź
github.com
It does check for an unlocked bootloader. Using a kernel like ElementalX, Franco or Flash causes the check to pass.

No, it is not kernel. I've checked same configuration just with decrypted phone and without root. With stock/elemental/franco kernels cts check was failing and with encrypted phone even on stock kernel it passed.

I've read and even checked kernel for this part of code but after tests it appears that it didn't work in my case.
 

Cronus89

Member
Dec 18, 2013
18
0
No, it is not kernel. I've checked same configuration just with decrypted phone and without root. With stock/elemental/franco kernels cts check was failing and with encrypted phone even on stock kernel it passed.

I've read and even checked kernel for this part of code but after tests it appears that it didn't work in my case.
After flashing a kernel update that only changes the bootloader check code does it work. So yea it's the bootloader unlock check.
 

floreks

Member
Jan 5, 2013
33
2
Łódź
github.com
After flashing a kernel update that only changes the bootloader check code does it work. So yea it's the bootloader unlock check.

Since you are so sure it's kernel then explain that. I'm now on stock kernel from latest Android 7.1.1 dev preview using unlocked stock bootloader. Phone is rooted (systemless root installed from TWRP) and I can still pass SafetyNet check.

"Wersja Jadra" is "Kernel version"
 

Attachments

  • Screenshot_20161204-080833.png
    Screenshot_20161204-080833.png
    113.9 KB · Views: 439
  • Screenshot_20161204-080844.png
    Screenshot_20161204-080844.png
    82.9 KB · Views: 431
  • Screenshot_20161204-081408.png
    Screenshot_20161204-081408.png
    119.2 KB · Views: 437

yochananmarqos

Recognized Contributor
Since you are so sure it's kernel then explain that. I'm now on stock kernel from latest Android 7.1.1 dev preview using unlocked stock bootloader. Phone is rooted (systemless root installed from TWRP) and I can still pass SafetyNet check.

"Wersja Jadra" is "Kernel version"
An unlocked bootloader with the stock kernel without Magisk will not pass SafetyNet. With Magisk Hide, the new resetprop will hide the bootloader status.

Sent from my Nexus 5X using XDA Labs
 

datafoo

Senior Member
May 11, 2010
451
203
Well I'm not using magisk hide so unless it works by default you are wrong.

PS. SafetyNet passed without magisk installed also... with unlocked bootloader and stock kernel.
I'm on HTC 10 Nougat 7.0

With unlocked bootloader, stock kernel and magisk/superuser installed. I pass SafetyNet checks, am able to make purchases and am not using magisk hide.

Clearly it's not about unlocked bootloaders but that's a nice theory.

Sent from my HTC 10 using telepathy...
 

jrk190

Senior Member
Sep 4, 2012
1,395
167
McLeansville
Has anyone managed to actually make a payment with safetynet green? I passed all checks on Pixel ROM with elementalX and rootswitch, was able to add my card, and the payment still failed. I'd really like to get off stock, but I just can't get Android Pay to work.
 
  • Like
Reactions: tallgrasshawk

tallgrasshawk

Senior Member
Feb 7, 2011
387
46
Has anyone managed to actually make a payment with safetynet green? I passed all checks on Pixel ROM with elementalX and rootswitch, was able to add my card, and the payment still failed. I'd really like to get off stock, but I just can't get Android Pay to work.

That's where I am at. I went to full stock and tried several configurations of of root, PN, etc. Could never actually make a purchase.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 76
    Here's how I have Android Pay working on my rooted 5x:

    -Starting from stock 6.01 (Some other ROMs are reported working. Most importantly it needs to be a ROM where Android Pay was working prior to systemless root)
    -Flashed systemless SuperSU 2.67 from TWRP (See UPDATE 3 below to make sure you have a systemless install)
    -run "adb shell"
    -from adb shell run "su"
    -from adb shell run "chmod 751 /su/bin"

    Have fun!

    With this change the checks in SafetyNet Helper are passing and I can add cards and make purchases with Android Pay. The change is surviving reboots and doesn't require messing with any settings in the SuperSU app to enable/disable root.

    UPDATE 1: As others have pointed out this permissions change can also be done with a file manager like Root Explorer that lets you change permissions. Probably easier for most than ADB commands.

    UPDATE 2: Some people haven't been able to get Android Pay working with just this permission change. Check if you have /su/xbin_bind - deleting this may get it working. Thanks to @bobby janow and @CSX321 for pointing this out.

    UPDATE 3: To clarify on the systemless SuperSU installation (this seems to be a trouble point for some) - there are settings that need to be configured for the SuperSU install to make it systemless and to not create the system/xbin binding. The installer reads these options from a file on /data/. Since you don't have root yet you need write these settings over ADB in TWRP. If you don't see the /su/ directory, you probably don't have a systemless install. In that case you can go back to stock (restore system, boot, and vendor partitions). Then, when you reinstall SuperSU, these are the commands you need to send from your TWRP ADB shell:
    Code:
    echo SYSTEMLESS=true>>/data/.supersu
    echo BINDSYSTEMXBIN=false>>/data/.supersu

    Once you've got SuperSU installed, change the permissions of /su/bin/ (either chmod or using a file explorer)
    12
    Yep Android Pay worked for a purchase. Just chmod your /su/bin/ directory to 751. Works for me on stock with systemless root and I imagine it may work on other ROMs that used to work until the recent change in the SafetyNet checks.
    4
    I am super pleased & happy to report/share the good news - Android Pay is working once again (intially failed CTS profile match with SafetyHelper Net) running on PureNexus (4/7/2015 build) on Nexus 5X - SU v2.71 and EL-X 1.12 (not running Xposed or V4A sound mod) - also flashed the FiFix_GoogleDialer option. Posted under PN thread - http://forum.xda-developers.com/showpost.php?p=66257321&postcount=2935

    Good luck & hopefully, this will help others - if it still won't run, do a clean wipe/factory reset - then repeat. That's how I got it working last time, pay attention to the sequence, grab a cup of coffee or tea, sit back & patience - paid off for me. (update - works today (April 12th) at my favorite vendoring machine - for a bag of "healthy" chips, LOL)
    2
    You can check Android pay by simply trying to add a card and you'll know right away.
    Yeah just removed my card and added it again. Went through all the contacting bank stuff and it worked. I think this is the real deal.