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

[Discussion] Google Pay Magisk Discussion Thread

Search This thread

pndwal

Senior Member
Hi guys I see that a lot of us are having issues with Google pay me included...
I just sorted out the safety net issue and now it's passing all the test, everything looks fine including Google pay where I'm able to register my credit card and the NFC logo says that's ready but when I try to pay all the payments are declined.
Did anyone fix this?
- Have 'Device is certified' in Play Store?

- Wiped Google Pay, Play Store and Play Services data? PW
 

cmstlist

Senior Member
Jan 11, 2010
3,363
524
Toronto
Google Pixel 4a
On my Pixel 4a I flashed the Displax version of Universal SafetyNet Fix and that was enough to get SafetyNet passing again as Basic. I still have GP Services and GPay in MagiskHide. I have cleared Pay data and Play cache, and deleted dg.db from GP Services data folder. Next day GPay still saying doesn't meet security requirements.

I am really hoping not to wipe Google Play Services data completely because it also contains my last two weeks of COVID contact tracing data. Any ideas whether I can do a more selective delete of specific files or folders and get the desired result?
 

73sydney

Senior Member
Jul 21, 2018
1,863
1,610
Sydney
Google Pixel 2 XL
Isso salvou minha vida!
This procedure saved my life.


You do realise this is my module theyre referencing, from this very thread, and in my signature :) and they dont give any link to here for updates or troubleshooting...talk about half assing it :) I suppose when youre trying to look like its your info that can come back to bite you (and unfortunately users) in the bum

Also the versions of magisk they show are old and outdated, unlike here...

Top tip, please dont post an offsite link (containing really unhelpful or lacking info) to onsite and comprehensive info, especially when people might have issues because that external site has half assed the info

If you actually read my post where the module is posted in this thread, theres a tonne of troubleshooting info...if people read it they wouldnt keep asking the same question over and over...
 
  • Like
Reactions: sliding_billy

73sydney

Senior Member
Jul 21, 2018
1,863
1,610
Sydney
Google Pixel 2 XL
And just updated my post in the OP for the module to include some info about the Magisk changes currently breaking things (a bit/lot) and links to the Magisk thread for answers/solutions (especially the last dozen or so pages of that thread)

 
  • Like
Reactions: ghoulie and ew

Gazza2907

Member
Jan 31, 2013
7
1
@QkiZMR try version 2.1.0 released today. It fixed my ctsProfile safetyNet check. But, I still get "Your phone doesn't meet security requirements" when trying to enable contactless, even though it says "All set" with four things ticked underneath.
 

73sydney

Senior Member
Jul 21, 2018
1,863
1,610
Sydney
Google Pixel 2 XL
Updated my modules General section to include reference to the recently released Universal SafetyNet by @kdrag0n:

General Notice:


15/09/2021


Its recommended to try the very latest version of Universal SafetyNet Fix by @kdrag0n to try and pass SafetyNet, in the first instance, and then try Google Pay, as you *may* be still able to avoid using my module below. If that doesnt work, but Universal SafetyNet Fix works and gives you a pass in the SafetyNet check section of Magisk Manager, you will have at least satisfied that stage in the Preliminary Checks below for using the module.

As always, things can change, and so for Magisk related issues, be sure to also keep up to date with the Magisk General thread as that is the place to get SafetyNet related answers....
 

73sydney

Senior Member
Jul 21, 2018
1,863
1,610
Sydney
Google Pixel 2 XL
@QkiZMR try version 2.1.0 released today. It fixed my ctsProfile safetyNet check. But, I still get "Your phone doesn't meet security requirements" when trying to enable contactless, even though it says "All set" with four things ticked underneath.

Have you done/tried the following:

1) toggle magiskhide on

2) added com.google.android.gms.unstable to Magiskhide list

in new magisk needed to do via root terminal prompt from what i remember (im not using latest):

Code:
magiskhide add com.google.android.gms.unstable

3) hide (rename) magisk app (from Settings menu)

4) Clear data of affected apps:
  • Toggle Airplane Mode on
  • Clear data and cache of:
    • Google Play
    • Google Play Services
    • Google Pay (Warning: this will remove any card and loyalty cards present - you can try without, but is recommended)
  • Usually this will be achieved by (exact steps and terminology may change per device or ROM):
    • Opening Settings
    • Going to Apps, choosing Show All Apps
    • Enabling Show System Apps via a menu option
    • Locating the app, tapping it and then finding Storage/Cache
    • Tapping Clear Data
  • Reboot and then Toggle Airplane Mode off
  • Open Google Play Store, wait 5 minutes, go to Settings and check Certification at bottom
5) Test Google Pay
 

Gazza2907

Member
Jan 31, 2013
7
1
@73sydney yep that did it. I was only clearing cache for Google Pay before. Thanks very much.

I am on Magisk 23.0 (Stable channel) and I can toggle

Code:
com.google.android.gms.unstable

as part of Google Play Services. I confirmed it was hidden in the startup of the Magisk debug logs.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    @QkiZMR try version 2.1.0 released today. It fixed my ctsProfile safetyNet check. But, I still get "Your phone doesn't meet security requirements" when trying to enable contactless, even though it says "All set" with four things ticked underneath.

    Have you done/tried the following:

    1) toggle magiskhide on

    2) added com.google.android.gms.unstable to Magiskhide list

    in new magisk needed to do via root terminal prompt from what i remember (im not using latest):

    Code:
    magiskhide add com.google.android.gms.unstable

    3) hide (rename) magisk app (from Settings menu)

    4) Clear data of affected apps:
    • Toggle Airplane Mode on
    • Clear data and cache of:
      • Google Play
      • Google Play Services
      • Google Pay (Warning: this will remove any card and loyalty cards present - you can try without, but is recommended)
    • Usually this will be achieved by (exact steps and terminology may change per device or ROM):
      • Opening Settings
      • Going to Apps, choosing Show All Apps
      • Enabling Show System Apps via a menu option
      • Locating the app, tapping it and then finding Storage/Cache
      • Tapping Clear Data
    • Reboot and then Toggle Airplane Mode off
    • Open Google Play Store, wait 5 minutes, go to Settings and check Certification at bottom
    5) Test Google Pay
    2
    @73sydney Thanks for the instructions, this seems to have fixed it for me! Will need to go to a store and test :)
    2
    And just updated my post in the OP for the module to include some info about the Magisk changes currently breaking things (a bit/lot) and links to the Magisk thread for answers/solutions (especially the last dozen or so pages of that thread)

    2
    Updated my modules General section to include reference to the recently released Universal SafetyNet by @kdrag0n:

    General Notice:


    15/09/2021


    Its recommended to try the very latest version of Universal SafetyNet Fix by @kdrag0n to try and pass SafetyNet, in the first instance, and then try Google Pay, as you *may* be still able to avoid using my module below. If that doesnt work, but Universal SafetyNet Fix works and gives you a pass in the SafetyNet check section of Magisk Manager, you will have at least satisfied that stage in the Preliminary Checks below for using the module.

    As always, things can change, and so for Magisk related issues, be sure to also keep up to date with the Magisk General thread as that is the place to get SafetyNet related answers....
    1
    @73sydney Thanks for the instructions, this seems to have fixed it for me! Will need to go to a store and test :)
    I second this. Thx for the tip
  • 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.