• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Discussion] Google Pay Magisk Discussion Thread

Search This thread

ajm786

Senior Member
Oct 27, 2010
1,403
418
In my case it is working eight days for now. Of course after removing all GMS and GPay cache and data and hiding GMS and GPay in Magisk Hide. Before this I tried many times with stopping update of GMS on elder versions etc. and issue went back. Now it seems like a permament solution. In the meantime I upgraded Magisk from 18.2 to 19.0 and my GMS has been autoupdated from 16.0.86 to 16.0.89 and GPay still works. I added six cards and all of them works like a charm.

Do you recall when doing any of this if you had WiFi turned off? Because in my case, this was the deciding factor.
 

zencooler

Senior Member
Jul 9, 2008
788
247
Do you recall when doing any of this if you had WiFi turned off? Because in my case, this was the deciding factor.
Yes. I set up all my cards being on mobile data as I was out of my home then :)

Sent from my SM-N960F via Tapatalk

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

anyone know if it is possible for Google to permanently block a phone from using Google Pay?
Why? If they allow to unlock bootloader and root the smartphone so you're a God of your device and it's your decision what you want to do. They can disallow to use their tool and this is what they try to do :)

Sent from my SM-N960F via Tapatalk
 

ajm786

Senior Member
Oct 27, 2010
1,403
418
Yes. I set up all my cards being on mobile data as I was out of my home then :)

Exactly my point. Same deal for me. I was out while I was doing this, so I was on mobile data. When I got home and tried to add a card when my phone was connected to WiFi, BAM, root detected. Backed out, repeated the entire process on mobile data, and bingo, everything worked.
 
  • Like
Reactions: zencooler

D-m-x

Senior Member
Apr 28, 2011
1,700
776
Germany
anyone know if it is possible for Google to permanently block a phone from using Google Pay?

Technically? Sure, just block the Google Account, the Credit Card/PayPal, if that's not enough use the Device ID or MAC Adress. Sure there's ways around even that but who would waste time defeating this.
However, in my opininion what they are doing right now comes close. Downgrading Play Services, block every App from detecting root, deleting Play Services, not using WiFi and constantly fearing that your Card is blocked while you want to pay for food, at least for me isn't a comfortable usage of this services. And that is mainly what it should be - paying with your phone while you forgot your wallet at home. The time I put into this already to fix that **** most likely outweighs every time combined I would have spent pulling out my credit card from my wallet until the end of time.

Right now GPay is completely useless for me while my phone is rooted. Even if it's working for some people here using tricks, the track record shows that it will fail eventually. For now I'm going to stay put. If this can't be resolved by some smart Dev or becomes to much of a hassle to work, I'm gonna have to decide, root and unlocked BL or Gpay, altough I would find that pretty stupid, especially the locked BL part.
 
Last edited:

fmc000

Senior Member
Jan 18, 2008
3,146
1,359
Exactly my point. Same deal for me. I was out while I was doing this, so I was on mobile data. When I got home and tried to add a card when my phone was connected to WiFi, BAM, root detected. Backed out, repeated the entire process on mobile data, and bingo, everything worked.
I set up my card on Wi-Fi as I don't even have a sim card in my phone. Worked fine and so far it's been like that for at least a week. Play services updated to the largest release and gpay still looks good. Please note that I never tried to actually pay, I only setup my credit card and check every day that it stills says that everything is fine.

I have the latest release of everything, Google play services, play store, pay and so on. Largest magisk and magisk manager too, in normal mode with a few modules activated.
 

ajm786

Senior Member
Oct 27, 2010
1,403
418
I set up my card on Wi-Fi as I don't even have a sim card in my phone. Worked fine and so far it's been like that for at least a week. Play services updated to the largest release and gpay still looks good. Please note that I never tried to actually pay, I only setup my credit card and check every day that it stills says that everything is fine.

I have the latest release of everything, Google play services, play store, pay and so on. Largest magisk and magisk manager too, in normal mode with a few modules activated.

Well, unfortunately that is really the only way you can tell it will work. You can set up the cards successfully, and then when you get in the store and try to pay, that's when you get the error, usually something like "You can no longer pay in stores using GPay."

I can pretty much guarantee that if you do get a SIM and try to pay using your phone, it will fail.
 

TerrorApple

Senior Member
Aug 26, 2012
416
173
Exactly my point. Same deal for me. I was out while I was doing this, so I was on mobile data. When I got home and tried to add a card when my phone was connected to WiFi, BAM, root detected. Backed out, repeated the entire process on mobile data, and bingo, everything worked.
I setup my card 2 days ago on wifi and payed today at the store without a problem. I haven't tried any fixes from this thread, I just updated Magisk to v19 beta, hid Play services + Gpay and re-added my card and it works for now. All a bit random, for some mobile data may be the solution, for me it didn't make a difference.
 
  • Like
Reactions: Tr4sHCr4fT

Cowbell_Guy

Senior Member
Jun 24, 2013
913
106
Google Pixel 6 Pro
i am completely unable to add cards or get Google Pay to work now with Magisk installed after trying to follow the steps here.

Pixel 3XL on March update
Google Pay version 2.85.239456103
Google Play Services version 16.0.89
Magisk v.19 with Magisk Manager 7.1.1 Canary channel.

have tried clearing Google Play Services data and then deleting the data/data/com.google.android.gms folder multiple times. have tried repacking the Magisk Manager to re-hide it. have checked to make sure Safety Net is being passed. have uninstalled and reinstalled Google Pay. every time i still get the "Couldn't finish setup to pay in stores". i have no idea what to do here other than give up and uninstall Magisk, and even then i don't know if things will work.

this is a bummer...



I am in the EXACT same boat as you. have done everything. Am on Pixel 2XL
 

ajm786

Senior Member
Oct 27, 2010
1,403
418
I setup my card 2 days ago on wifi and payed today at the store without a problem. I haven't tried any fixes from this thread, I just updated Magisk to v19 beta, hid Play services + Gpay and re-added my card and it works for now. All a bit random, for some mobile data may be the solution, for me it didn't make a difference.

Yeah, looks to be random, but I literally just tried it again for the heck of it. Cleared out Play Services, tried adding cards with WiFi enabled, got the "Couldn't finish setup to pay in stores because this device is rooted or altered in some way."

Cleared everything out, followed all my posted steps with WiFi off, and bingo, works great. Added all the cards successfully.
 
  • Like
Reactions: johnlgalt

Nosferatu.

Senior Member
Dec 20, 2011
2,252
765
Tampa, Florida
There's a lot of confusing information going on here. I'm sure it's not anyone's fault, but the fact that Google is randomizing things on their end.

Here are the things I noticed while trying to get my GPay working again. I'm using a rooted Samsung Galaxy Note 9 N960F-DS. Reverting to the older 14.x.x version of Play Services always fixes it, but only temporarily. It eventually automatically updates to 15.0.90 and breaks GPay in the process. Attempting to rename the com.google.android.gms folder is completely hit or miss, and in my case doesn't work at all.

Here's what I did to fix mine.

1. Update Magisk to the latest beta, v19, and the latest Magisk Manager, v17.1.
2. Hide all Google Play services and Google Pay using Magisk Hide.
2a. Run the SafetyNet check in Magisk Manager. If you get any failures, don't bother going forward with the other steps because you'll just be wasting your time. Address this until you get a full SafetyNet pass on this step.
3. If you have WiFi turned on, TURN IT OFF. I found this to be a critical step for me.
4. Update to the latest Google Pay, v2.85.239456103.
5. Update to Google Play Services to the latest, v16.0.89.
6. Clear Google Pay data. You MUST clear cache FIRST, then clear data. Do not open the app after doing this.
7. Clear Google Play Services data. You MUST clear cache FIRST, then go into Manage Storage, and then choose Clear All Data.
8. IMMEDIATELY REBOOT. If you don't, and you try adding cards again, everything will fail and you will have start all over again.
9. Upon rebooting, ensure WiFi is turned off, then immediately open GPay and start adding your cards. I added all 3 of my cards successfully: one Visa and 2 AMEX. Once finished, you should also be able to pay in stores.

I did this process 3 times so far. Each time I tried, as soon as I turned on WiFi on any of these steps, it would detect root and break GPay. Performing all the above steps solely on mobile data, I'm able to complete adding my cards successfully. So far, I've paid 3 times in stores with GPay, so I can vouch that it works, at least for me.

My credit card shipped me a new card so I figured I'll delete the old card and try this method out.

Followed directions as listed above. I then used GMS Toolbox app and instead of saying "fails" it says "ok" now. I guess that means I'm good to go? I don't use GPay much but I'll keep an eye on the toolbox status and next time I'm out and about I'll give it a try.

I'm on the latest OxygenOS with a OnePlus 6T.
 
  • Like
Reactions: skibijabadibi

Chamelleon

Senior Member
May 16, 2010
773
363
Kraków, Poland
Just updated Magisk to 19.0. So far so good. I was able to add all my 4 cards, but didn't test payments yet. I see new Magisk Hide list. Should I hide all Play Services records or just com.google.gms.unstable? I read few post ago that it's not recommended to hide more than it's needed. For now I marked only com.google.gms.unstable and all seems to be working but I just want to make sure.
 
Last edited:

ajm786

Senior Member
Oct 27, 2010
1,403
418
My credit card shipped me a new card so I figured I'll delete the old card and try this method out.

Followed directions as listed above. I then used GMS Toolbox app and instead of saying "fails" it says "ok" now. I guess that means I'm good to go? I don't use GPay much but I'll keep an eye on the toolbox status and next time I'm out and about I'll give it a try.

I'm on the latest OxygenOS with a OnePlus 6T.

I'm not sure the GMS Toolbox app referenced earlier in this thread is of much help. For me, it was saying "ok" for passing attestation...yet I was still unable to pay in stores. Only until I happened upon the steps I listed would it work for me on any newer Play Services version.

I guess the fact it says "ok" for you now is good news though.
 

warrencoakley

Senior Member
May 1, 2014
915
164
45
Dublin
10 days and counting. Over 39 contactless transactions with ease. Still holding. Magisk Canary as mentioned before is far better for hiding root detection. Not just for GPay but for banking apps etc. So can confirm it works flawlessly on stock Pixel 2 XL.
 
Last edited:

Nosferatu.

Senior Member
Dec 20, 2011
2,252
765
Tampa, Florida
I'm not sure the GMS Toolbox app referenced earlier in this thread is of much help. For me, it was saying "ok" for passing attestation...yet I was still unable to pay in stores. Only until I happened upon the steps I listed would it work for me on any newer Play Services version.

I guess the fact it says "ok" for you now is good news though.

Time will tell. I followed your directions. Gave you thank in said post. Not looking to just spend money un-necessarily but I'll give this a try next time I hit up a place with contact-less payment. :good:
 

hanneshoch3

Member
Mar 22, 2011
22
9
Finally solved my issue with PayPal being declined at the terminal, even though I was able to add it with no problem. I had to unlink gpay within the PayPal app and then relink PayPal, which gave me a new virtual card number and thus fixed the issue - so far.
 

Adreaver

Senior Member
Jun 12, 2012
1,516
874
New London
Reporting that renaming com.google.android.gms to com.google.android.gms.bak worked for me. Able to successfully add a card where before it was detecting root.

Magisk Canary 18.2.945f8810
Magisk Manager 7.0.0
Magisk Hide on GPay and GPS
GPay 2.84.237487748
GPS 15.0.90

Pixel 2XL
March Security Update
Stock Rooted
Quoting this again to note it is still working for me. I have taken the Magisk and Magisk Manager auto updates, and made no other changes.
 

jlebowski79

New member
Apr 2, 2019
1
1
Just updated Magisk to 19.0. So far so good. I was able to add all my 4 cards, but didn't test payments yet. I see new Magisk Hide list. Should I hide all Play Services records or just com.google.gms.unstable? I read few post ago that it's not recommended to hide more than it's needed. For now I marked only com.google.gms.unstable and all seems to be working but I just want to make sure.
Same here. Only .unstable and everything works well. We wait for the stable release ;)
 
  • Like
Reactions: Chamelleon

raginginferno

Senior Member
Apr 24, 2011
114
72
Gotta say been a very strange experience with Google pay. Updated to version 19. Cleared services and pay like in previous posts. Got my MasterCard that I use all the time with Google pay re-added like normal. Couldn't get my newer visa added... Maybe I tried too many times before? Strange.
Tried it out today. Works! Awesome. Went next door and paid for again in like 5 min... "You can no longer pay in stores with Google Pay". Wtf... That was fast...

At least my Android Wear isn't rooted. That's always been my failsafe. I have always managed to pay with that even though my Pixel 2 has been rooted. It's an expensive alternative... But it works.

(Clearing Google play services also disconnected my Android Wear. . But I got both my of my credit cards added there no problem. And did two transactions already with my mastercard)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    I having problems activating google pay on rooted Pixel 6 pro. Tried clearing storage of cache of play services, play store, gpay. Adding Gpay sqlite fix, still encountering issues. On magisk canary 23014. Please help

    EDIT: I figured it out.
    A quick summary of what you figured out could be helpful to the next person to come along
  • 61
    The new Google Play services update caused this.

    Temporary workaround:

    1. Disable Google Pay/Find My Device as Device Administrators in Settings > Security & location > Device Administrators.

    2. Search "Google Play services" in the Settings search bar.

    3. Press the three dots and press "Uninstall previous updates".

    4. Download this update - https://www.apkmirror.com/apk/google-inc/google-play-services/google-play-services-14-7-99-release/
    Pick your needed edition (arm or arm64, etc.), download it and install it.

    5. Disable Background data access for Google Play Services and Google Play in their respective App Info pages.

    6. Download Google Pay from the Play Store.

    7. Set up your cards. Enjoy!

    Never EVER update Google Play services manually, until a Magisk update is available that bypasses the upgraded SafetyNet. Note that Google Play services is responsible for adding/verifying the card, not the Google Pay app! Hence why there seems to be an overlay when adding a card/verifying an existing one.

    Tested Google Pay versions:

    2.79.x-2.83.235070858 - working

    Tested Google Play services versions:

    14.7.99, 16.0.86 - working with Magisk 18.1

    14.8.49-16.x- working with Magisk 18.2 Canary
    29
    Ok. I tried this and it worked on gms 17.1.22, allowing one to add cards and pay in store. Warning YMMV, but this is the process I did to get this working. One caveat is that Google pay does not register the "recent transactions" on the Google pay app. Another caveat is that I suspect users will have to reverse some step if gms is updated and then reapply, but this still needs to be confirmed

    Without further ado, here is my process:

    1) download a SQL database editor. I used

    https://play.google.com/store/apps/details?id=com.tomminosoftware.sqliteeditor&hl=en_US

    2) download a terminal emulator program. I used terminus but any terminal emulator should work.

    3) make sure Google pay is forced close, if it is open.

    4) open SQL editor. Navigate to /data/data/com.google.android.gms/databases

    5) open dg.db

    6) change any value that lists "attest" in the name (first column) to 0 in the third column. Mine was showing a value of 10 in the third column for each of these values. (Column c for sqlite databse editor I used)

    7) open the terminal emulator.

    8) get root access (su)

    9) cd /data/data/com.google.android.gms/databases

    10) type: chmod 440 dg.db
    This makes dg.db read only (for owner and group, and no access for world.)

    11) reboot

    I suspect when gms is updated, one will have to go back to steps 10 and 11 and chmod 660 dg.db to allow new keys to be written to the database, and then go back and redo all these steps to reset the attestation values back to 0.

    If there is still an error, verify in sqlite database editor that all attest release keys values in dg.db are 0 when dg.db is read only (owner and group).

    Again, YMMV but this worked for me, so I give it back to the community now.

    Edit: recent activities did show up soon afterwards for the payment method.

    Cheers,
    B.D.
    27
    This thread is inspired by the PoGo Magisk discussion thread. It's meant to keep the clutter of "Google Pay doesn't work" posts out of the main Magisk threads.

    Please use this to discuss issues with Google Pay and possible solutions.


    There's a working solution here:
    https://forum.xda-developers.com/apps/magisk/magisk-google-pay-gms-17-1-22-pie-t3929950
    And a Magisk Module for it here:
    https://forum.xda-developers.com/ap...7-1-22-pie-t3929950/post79643248#post79643248

    For general tips on first getting SafetyNet to pass fully, check here:
    https://www.didgeridoohan.com/magisk/MagiskHide#hn_SafetyNet
    18
    So here's the app to check fails_attestation value. The source code is available here. I may also implement a quick way to delete the gms data folder if you want.
    18
    All you really need to do to fix this is:
    1. Add Google Services to Magisk Hide (if you're on Magisk 18.1 use "su magiskhide --add com.google.android.gms" in terminal)
    2. Add Google Pay and Google Services Framework to Magisk Hide
    3. Go to data/data and rename com.google.android.gms to com.google.android.gms.bak for example (or delete it altogether, but backing up seems safer)

    Reboot and do whatever you like in GPay, it should work now. That's all I've done. I don't think you need to reinstall Magisk.