yashsingh1/xdaforums huggingface dataset:
[Nexus 5X General] ifwillems:
Assuming you did everything right, your credit card might not be eligible. Apparently not all credit cards participate currently with Android Pay. My American Express works, but my MasterCard does not.

A way to check if you at least have done the procedures right is to install SafetyNet Helper from the Play Store. If that application passes (and the green screen shows up) your device is systemless; if it is red you are not (or at least with some violation). If the latter is the case I would restart from a completely stock and unrooted phone.
[Nexus 5X General] bobby janow:
That's always a good test of the card in question. However, from the description it's hard to tell where his card is failing. If root and SafetyNet is the problem it will be one message. If the card is not accepted yet that is a different message.
[Nexus 5X General] martyfried:
Sorry, I wasn't clear enough. I meant it would not let me even begin to enter a card. Never got a chance to try a specific one. As soon as I press "+" to add a card, it comes back and says "Android Pay can't be used

Google is unable to verify that your device or the software runnin on it is Android compatible"

It was able to add a card in the past, but I have since installed Pure Nexus, and reloaded the app.

---------- Post added at 01:44 PM ---------- Previous post was at 01:42 PM ----------

I can't even get to the form to add the card. I'll try SafetyNet app, and report back.

---------- Post added at 02:37 PM ---------- Previous post was at 01:44 PM ----------

I ran SafetyNet Helper and it failed: "CTS profile match: false".

Perhaps I should once again give up on a service I've never actually needed? It would be nice to have, but so is root. :(
[Nexus 5X General] bobby janow:
If you can't pass SafetyNet don't even bother to try adding a card. Marty, I'm sorry but which device do you have. I've seen various problems with phones other than the 6, 6P and 5x. The process we describe definitely does work but, other than the device in question, there could be other factors such as DPI and changing some build.prob entries. It's worth it if you can get it but I agree root is much more valuable.
[Nexus 5X General] martyfried:
Thanks. I have the 5X, and I haven't done much other than install Pure Nexus (full install this last time). I had SuperSU installed normally previously, as I mentioned. Other than that, I haven't messed with any dpi settings or build.prop, etc.

I guess I could start over with another wipe, and test along the way. I might even consider unencrypting if I do that, since it's not much more trouble for me
[Nexus 5X General] bobby janow:
If you can list the exact method you did step by step I think we can find where you missed. Unencrypted is not necessary.
[Nexus 5X General] martyfried:
I was thinking of unencrypting to see if it would speed things up, out of curiosity. Probably doesn't matter that much either way.

The steps I took were from The directions here from nathanchance:

1. Boot into TWRP and wipe everything but internal storage in Wipe > Advanced Wipe.

2. Flash Pure Nexus.

3. Flash GApps.

4. Flash UnSU.

5 Type these commands, one at a time, into Advanced > Terminal Command > Select current folder in lower right hand corner:

echo SYSTEMLESS=true>>/data/.supersu

echo BINDSYSTEMXBIN=false>>/data/.supersu

6. Flash latest SuperSU

7. change permissions for "/su/bin/" to 751 (rwx r-x --x).

Confirmed that /data/su.img exists; confirmed in superSU app that it says systemless; confirmed there was no "/su/xbin_bind" (just "/su/sbin" exists).

I can't find any other suggestions anywhere.

Thanks for your help. I'm pretty much at the end of my little rope. :)
[Nexus 5X General] bobby janow:
Exactly what I did other than flashing Franco r5 after SuperSU. It doesn't make sense to me. I think at this point I would try it with the stock image unrooted just for the heck of it. Did you restore any apps after your PN flash?
[Nexus 5X General] Jinded:
Just for ****s and giggles, did you ever flash the latest vendor image? What does your phone say under system settings > about phone > build number?
[Nexus 5X General] bobby janow:
Good try, I mean why not right? But wouldn't PN bark at you if you had a wrong vendor version? Maybe even before booting up it would show a mismatch. I'm not sure since I always flash the image when released and then wait for the rom to catch up before I flash it again.
[Nexus 5X General] wally3614:
I flashed busybox, then the SuperSU beta 2.67, rebooted then saw su in root directory, changed permission bin to 751 and saftynet finally went green and Android pay allowed a card to be added. I can't test because i have no cards that r supported, but prior to those steps I couldn't get safety net to pass screen for Android pay to allow a car to be added. FYI I'm on pure nexus latest release
[Nexus 5X General] martyfried:
Thanks for the suggestion, and I apologize for leaving this out... I posted the steps from the guide I followed on the Pure Nexus section, but forgot to add that I actually did flash the latest vendor image "just for ****s and giggles". :) I thought I might as well since the file was right there with the rest of them.

But fwiw, the build number is MMB29U.

But your suggestion is appreciated, as are any others.

---------- Post added at 09:56 AM ---------- Previous post was at 09:52 AM ----------

I never thought of that. Does it matter if the image is too new for the old rom, though?

---------- Post added at 10:14 AM ---------- Previous post was at 09:56 AM ----------

Maybe I'm a dummy, but was there a reason you needed to flash busybox first? Was it simply because you didn't have it and wanted to use it to set the permission? Also, did you flash the systemless SuperSU?

Do you know if flashing SuperSU systemless changes the permission of /su/bin/? I had tried unrooting using the superSU menu, but it didn't help anything, and kept giving me an error about the binary, so I reflashed, along with deleting caches. I just looked, and /su/bin/ was reset to 755, even though I'm sure it was 751 when I first started troubleshooting this problem (I changed it again, but it didn't help).
[Nexus 5X General] jiggyman:
I tried for weeks on PN CMTE with no luck. I switched to the 2/3/2016 build of PN Layers, and was at least able to pass the Safety Net check and add my CCs to AP. I will try and make a purchase today when I leave work. I'm using a Nexus 6.
[Nexus 5X General] wally3614:
I read another thread to flash it for AP....I tried flashing just the SuperSU and it did nothing. Tried the chmod, didn't work...so it is what it is...didn't work till I flash BB then reflashed Su
[Nexus 5X General] ifwillems:
I hope you haven't given up yet. I too have a 5X and have it working. I remember that I had a similar problem: Looked like I did all the correct steps (and I did), yet it didn't work. This is what I did to make it work:

Bring the phone back to stock (I mean completely to stock). I used Wugfresh's NRT toolkit.

unlock the phone (again I used NRT)

put phone in fastboot mode

use Fastboot Flash Recovery TWRP3.img

Do not reboot the phone but start up Recovery

COnnect to laptop/desktop

Copy PureNexus ROM + GAPPS +SuperSU+UnSU to device

Then follow the steps you did

I hope this helps for you.
[Nexus 5X General] martyfried:
Thanks for the post - if nothing else, it gives me hope that there's a light at the end of the tunnel. :)

I probably won't follow that route right off the bat. For one thing, I don't use Windows, but I could easily go back to stock using Linux, and might do so to see if AP works, then go step by step to see where it stops working. and try to find out why. I like fixing things, but I hate it when things simply start working when I don't know why.

Are you on the 2-18 version of Pure Nexus, with the dynamic GApps of the same date? Also, which version of SuperSU are you using? I have 2.67, but thought about going to 2.65, a stable version.

It's hard to know exactly what works when most directions use generic terms like "the latest", etc.

---------- Post added at 10:18 AM ---------- Previous post was at 10:09 AM ----------

Sorry, I missed this post somehow... I will probably take the route you mentioned and go step by step.

I did restore some apps individually after flashing, using Titanium Backup. Not any Google apps, and I installed Android Pay from the play store. Is this something I should avoid completely? Is there a better way, other than individually installing each app from the play store? I usually make backups from important apps that have that ability; most apps don't really need it, as all they need is a password, but some have a lot of configuration. If I start over like you suggest, I'll certainly check with SafetyNet between each one.

---------- Post added at 10:20 AM ---------- Previous post was at 10:18 AM ----------

Thanks, I'll look in to that. I flashed BB a while back, but didn't think I needed it now, as twrp has a console mode that seems to be enough so far.
[Nexus 5X General] Joshmccullough:
What phone do you have? I've got an N5 here; flashed back to stock last week to get Android Pay running, worked just fine. I just flashed Pure Nexus, followed these steps to the letter, Android Pay isn't working.

I think there've been a few people who have gotten APay on systemless root running, but I think there're a lot more with newer models (Nexus 6 and up), so I have a hunch it's something about our device, but it's just a hunch.
[Nexus 5X General] jiggyman:
I'm not an expert, but I wouldn't follow any other instructions other than what is posted in the OP for PN. Additionally, you have to have a custom kernel. I use Ex, but there are many out there which are compatible with both PN Layers and CMTE.
[Nexus 5X General] martyfried:
I have a Nexus 5X. I think it's supposed to work. I have Pure Nexus rom, which is also supposed to work. There were guides telling how to do it, but either I made a mistake, or there was something wrong somewhere.

Anyway, I may try again, but I'll check each step of the way that I can to see where (if) it fails.

---------- Post added at 03:42 PM ---------- Previous post was at 03:40 PM ----------

I am pretty certain that you do not need to have a custom kernel. But if you do have one, I would guess that not all of them work, not that I know that for sure.
[Nexus 5X General] Letitride:
Running latest (2/18) PureNexus Rom (non-CMTE), systemless root, SU v2.67, (no other mods) was able to re-install AP and (re)added CC, etc. Was at one of the favorite vendor machine that accept wireless payment including AP, it beep with NFC enabled, asked to unlock my Nexus 5X, and ready to process payment for $1.75 for a 20 oz. soda. Then, "beep" "DUH" - got the pop-up message that ... could not verify my device and failed to proceed, etc. while the vending terminal was blinking blue since I got it up & close. W. T. Heck - it's faster to pull out 2 x $1 bill anyway, but it's just for the fun of it and test to see if the workaround solution is valid or not.

# Not working on mine, pretty obviously - so, Google - only in case you are wondering why usage is down, one "blip" on a reason why - make it difficult for the end users; and, it's a no go. Now, I have one more reason to keep NFC off and not to be bothered with it.

** Footnote: SafetyNet Helper - passed first 2 checks but failed CTS profile match ("false") - Gapps was from Feb. 3rd, didn't update or reflash to newest one, perhaps that's why. March update just around the corner, I'm not going to be do this ... will wait.
[Nexus 5X General] zoppp:
Im not sure how but it seems android pay is working on my rooted 5x without having to follow these steps. I am able to open the app and I can see the cards I added. Is that supposed to happen? Is everything working, or is it not going to work when I try to pay using my phone?
[Nexus 5X General] ifwillems:
Yes I am on the 2-18 version with same Dyn GAPPS. SuperSu 2.67.
[Nexus 5X General] Jinded:
If AP fails, it will most likely be when trying to add a card and when trying to make a payment. You can download the SafetyNet Helper app to check.
[Nexus 5X General] martyfried:
Well, I'm beginning to feel a bit dumb for not knowing more about what I'm doing, but I've been learning and poking around a bit - fortunately, I know linux and the command line fairly well.

Anyway, I've read that modifications to /system would make AP not work. If so, doesn't installing a rom like Pure Nexus modify this? Or is it just the root of /system that can't be modified? I'm wondering about the xbin directory, and what it should be. It seems to have busy box installed in it - is that normal? I had installed it a while back, but I believe I wiped /system on my PN install, so I didn't expect to see it still there. What is supposed to be in /system/xbin?

---------- Post added at 11:56 AM ---------- Previous post was at 11:37 AM ----------

If you get a chance, and if it's not too much trouble, can you tell me more or less what's in your /system/xbin? Mainly, whether you have a lot of files or not, and whether you have busy box file there; my first two files are "[" and "[[" (symlinks to busybox), plus there is busybox file itself and a zillion busybox links.
[Nexus 5X General] revolt1:
whats bb?
[Nexus 5X General] lysm bre:
I'm guessing BusyBox
[Nexus 5X General] martyfried:
One question about BB - what directory did you use for it? I seem to have BB in /system/xbin, and I'm wondering if that is a problem. Also, I'm wondering why it's even there at all.
[Nexus 5X General] wayne8821212:
AP on Nexus 6P

I'm stuck on the early Feb (3rd?) version of Pure Nexus on my 6P because AP works for me on that version but not on the Feb 18 version of PN. I followed the same method but no luck. I noticed that Xbin_bind survived so I deleted it manually but still no dice. On the bright side, after 4 more uses of AP by tomorrow, I'll get the Chromecast!
[Nexus 5X General] ifwillems:
Yes I have all these files/directories too. But I did not install the regular Busybox, but the version by Osm0sis. Order of install: ROM, GAPPS, UnSU, echo commands, SuperSu, Osm0sis' BB. And all of this after first having gone back to complete stock. Without this last move, it didn't work for me either.
[Nexus 5X General] Joshmccullough:
I should've been more clear; I followed the directions to the letter, when I said "a lot more" I meant more people who have Android Pay working with newer models of phones than people with older models like the Nexus 5.

I'll have to try the custom kernel route; I've always used Elemental X, but I think I took that part out of the 'flashing chain' some time ago just to see if that was a variable that led to non-success. Thanks for the tip!
[Nexus 5X General] martyfried:
When you go back to complete stock, do you delete all your user-data, too (ie, a factory reset)? When I installed the ROM, etc, I first deleted everything except user-data; I wonder how deleting user-data would make a difference, and whether it's worth it just for Android Pay (especially since Google might just disable the workaround in the near future, making it a waste of time). If I need to delete user data for some other reason, like unencrypting the data or something, I might go back to stock.

The big mystery to me right now is how I keep ending up with BusyBox in the first place. I checked using twrp's terminal and file manager at each step, and it was not there right before rebooting, but it is there now. I didn't restore it from anything, so I wonder if it's built into PN.
[Nexus 5X General] ifwillems:
Whether all this hassle is worth it is something everyone has to answer for him/her self. ;)

Yes, I went to a completely clean device (incl wiped user data and incl locked bootloader); started completely from scratch. I have to admit, I do not understand either why that route did work, but I sure spend a lot less time than you are now spending questioning every step. Although you will probably become smarter because of it. Matter of spending ones time wisely.
[Nexus 5X General] jesssiii:
Can you link me the the earlier version of PureNexus? I'm unable to get the 18th version to work with Android Pay either on my 6P.
[Nexus 5X General] martyfried:
All good points, and if my only goal was to get AP working, I'd probably start with stock, and see where or if it breaks. But my goal is more to learn what is going on; I always liked solving puzzles. I used to work doing audio electronics repair, then got into programming where I was the one who they picked to solve the hard bugs that others gave up on. I actually enjoyed the debugging.

So, I'm spending more time on this because I'm trying to understand each step, and I'm learning a lot.

Thanks for all your help.
[Nexus 5X General] elreydenj:
It works on the 2/18 version, there is something interfering on your end.
[Nexus 5X General] bigdave79:
Just curious - when was the last time you paid for something with android pay? It had also been working fine for me on 2/18 version but I just tried to pay for something and it came up with an error that Google is unable to verify my device. I am still able to add cards (deleted and re-added them but no difference) and my device still passes the safetynet test. I'm wondering if it's my device or a change that Google made on their end.
[Nexus 5X General] elreydenj:
Yesterday. I bet it has something to do with your cards. Sometimes the card providers block their use on their end because they have been added too many times to what they think are different devices. Also, i had to call Amex and have them remove a safety block on my card because i had tried to use it when Google first patched for systemless root and it triggered something on their end supposedly.
[Nexus 5X General] wayne8821212:
https://www.androidfilehost.com/?w=files&flid=43154

All of the versions are there.
[Nexus 5X General] bigdave79:
Shouldn't that stop you from adding the card in the first place? I have that problem with my Amex and it won't let me add the card in the first. This error seems different. I can add the card just fine but it fails at the point of payment. What version of super su are you using?
[Nexus 5X General] ifwillems:
I read somewhere that Smartlock might also interfere. Have you tried it with Smartlock turned off?
[Nexus 5X General] elreydenj:
2.68. What ROM are you on and any mods?
[Nexus 5X General] bobby janow:
I have smartlock enabled and it works fine.
[Nexus 5X General] bigdave79:
Pure Nexus 2/18 layers version, systemless root w/ supersu 2.68, no other mods at all (no xposed, no viper 4a). Systemless root is correctly installed with no xbin_bind and 751 permissions for /bin. As I said, it was working last week and I've done this a number of times before... Guess I'll keep trouble shooting.
[Nexus 5X General] elreydenj:
Did you by any chance since it was last working attempt to use AP when you may have not had the proper mods in place and it possibly failed due to not passing Safety net. If that happens, even though your card is in AP, sometimes the bank or card company puts a security stop on the card and will not let it work in AP. This did happen to me. I had to call in and have the block removed.... Clean or dirty flash? If you flashed gapps, did you definitely use the ones recommended by Pure Nexus and NathanChance? What is the exact message that pops up when AP fails at the terminal?
[Nexus 5X General] ifwillems:
http://forums.androidcentral.com/android-pay/584423-android-pay-smart-lock-observations-2.html
[Nexus 5X General] lostrg:
Install the Google dialer fix from 02/03 only way it worked for me on N6.
[Nexus 5X General] elreydenj:
Are you saying that aosp dialer as a system app interferes with AP? if so, that would explain a lot of the complaints about AP not working even though people seem to be following the proper instruction.....
[Nexus 5X General] lostrg:
yes sir, I did a clean install Flashed PureNexus ROM, GAPPS, UNSU, ran Echo Commands, Flashed SU v2.68 ( no longer need to change chmod 751)....I booted with AOSP dialer tried it and it did not work. I booted to TWRP Flashed the google dialer and was able to add a Well Fargo Debit Card.
[Nexus 5X General] elreydenj:
Maybe you dirty flashed the 2/18 version and did not flash the google dialer fix? I always have flashed this as I prefer this dialer to aosp. Not sure exactly how it correlates but there seems to be some information above that speaks to AP working and this helping.....
[Nexus 5X General] bigdave79:
Sorry, forgot to mention that I already use the Google dialer (I'm on Project Fi) although I doubt that makes a difference. Got it working again by removing and then re-adding all my cards. Not sure what happened. Very weird.
[Nexus 5X General] superdusto:
This worked for me! On my Nexus 6P with latest Pure Nexus.
[Nexus 5X General] natemup:
Not experiencing success with N6 and the method. Originally clean-flashed the ROM, banks gapps, then unSU. Ran the commands in the TWRP terminal, rebooted, rebooted back into recovery and flashed SuperSU 2.68. Rebooted, the permissions looked correct and xbin_bind was nowhere to be found. SafetyNet still failed.

Tried again starting at the unSU step, this time without rebooting after the terminal commands—just went straight into flashing SuperSU. Again, permissions and missing folder looked good. SafetyNet still fails.

Is there any hope?

P.S. I also flashed the dialer fix just in case. Zilch.
[Nexus 5X General] ifwillems:
I have a confession to make: Last night I decided to wipe my phone clean, return it to stock and go through all steps once more, to see if I could detect anomalies and better understand what is happening. To my surprise I can't get my phone back to where it passes SafetyNet. No idea why; I tried 3 times., then gave up and re-stored a nandroid. Is "finicky" an appropriate description of this install process?
[Nexus 5X General] martyfried:
I'm beginning to think this whole idea is a lost cause. I just know that if I ever get it to work, the next day an update will come out and break it. :) Perhaps that little plastic card that's always in my wallet, and works everywhere, is all I need. :)

But I've learned a lot about what it means to do a factory reset vs wiping data, system, etc, and the differences between data, userdata, /data, /sdcard, etc.

It seems that going back to factory is about the same as the normal install, but deleting internal storage along with the data, system, and caches. Installing the original ROM doesn't seem to be needed, as it would then get totally erased if you do a full install of Pure Nexus. But, Android is pretty cryptic compared to Linux, which is simple by comparison. So, who knows?
[Nexus 5X General] Joshmccullough:
Maybe one day we'll all look back at this and say "remember when we actually tried so hard to pay with our phones?" http://goo.gl/s7F0DR

---------- Post added at 08:20 PM ---------- Previous post was at 08:17 PM ----------

Did you follow these steps from this forum: http://xdaforums.com/showthread.php?t=2513701

I did a couple of weeks ago, Android Pay worked fine for me. I returned to Pure Nexus on my Nexus 5 without Android Pay because the customization outweighed my use of APay.
[Nexus 5X General] wayne8821212:
I finally got Android Pay to work on the Feb 18 version of Pure Nexus by using SuperSu v2.68 and did a Titanium data restore of the Android Pay App from the 2/3/16 version of Pure Nexus.
[Nexus 5X General] ifwillems:
TWRP installation - effect on Android Pay ?

There are a few ways (to my knowledge) that one can install TWRP:

For the longest time I simply used Wugfresh's NRT tool

Use fastboot flash recovery twrp3.0.img; then upon boot into recovery check read only

Same as above but then do not check read only

Do any of these methods have preference over the others? And why is it that sometimes TWRP asks (upon exiting) if I want to install SuperSu, but on other occasions it does not? Final question, it appears to me that with TWRP 2.8.7 I had absolutely no issues getting AP to work, whereas with TWRP 3.0.0 it seems to be hit and miss; anyone else having the same issues?
[Nexus 5X General] natemup:
No dice for me so far on 3.0.0.

Got systemless root and su folder stuff done fine. But SafetyNet fails.