[Discussion] Google Pay Magisk Discussion Thread

Search This thread

zgfg

Senior Member
Oct 10, 2016
7,932
5,468
😂 There are many gpay threads any idea what it's called? I am using USNF 2.3.1 ZYGISK
Oops (I overlooked, thought you are in Magisk thread) - this is the GPay thread

Look for "USNF v2.3.1-mod" (as I mentioned in the previous answer - must have that MOD in the name), from Displax (from him, not from the OP poster in the USNF thread). Might be here but also in the USNF thread

It's been month and more when that MOD version of the module was posted, and the whole story about Wallet, Play Integrity API discussion started here and in that USNF thread - info can be found by reading the posts
 
  • Like
Reactions: 73sydney

brambles1234

Senior Member
Feb 28, 2010
124
10
Whenever I come to XDA and ask a question I'm normally receive a really unhelpful reply, along the lines of "if you search you will find your answer" This is can be very annoying, especially after I have spent an hour looking and I still can't find the answer? Hence the reason I ask a question.

The reason I say this is because I have got Google wallet working and I will share what I did.

Samsung Galaxy S21 rooted Beyond Rom

1. Uninstalled Google wallet
2. Deleted both cache and data from play store
3. Updated Xprivacy Lua
4. Reinstalled UNSF
5. Changed fingerprint using su / props
6. Restarted phone

It is pertinent to say here that I fail all api integrity checks using the app on playstore. However Google wallet contactless payment works better than before.

I will keep this updated if I have as any issues.
 
Last edited:
  • Like
Reactions: ZzEzZ

zgfg

Senior Member
Oct 10, 2016
7,932
5,468
Whenever I come to XDA and ask a question I'm normally receive a really unhelpful reply, along the lines of "if you search you will find your answer" This is can be very annoying, especially after I have spent an hour looking and I still can't find the answer? Hence the reason I ask a question.

The reason I say this is because I have got Google wallet working and I will share what I did.

1. Uninstalled Google wallet
2. Deleted both cache and data from play store
3. Updated Xprivacy Lua
4. Reinstalled UNSF
5. Changed fingerprint using su / props
6. Restarted phone

It is pertinent to say here that I fail all api integrity checks using the app on playstore. However Google wallet contactless payment works better than before.

I will keep this updated if I have as any issues.
Fine that it works, and nice that you described your process

Feel free to help/answer to the others writing them complete instructions (or searching yourself to give them links to exact this or that post)👍
 
  • Like
Reactions: 73sydney

m0han

Senior Member
Apr 30, 2012
5,188
2,196
.... you need to have Zygisk, therefore Magisk v25 (not Magisk v23 and Riru - if you are still on Riru)...
just for info: latest gpay works fine with the latest magisk delta and riru. modules as in screenshot.
 

Attachments

  • Screenshot_20220923-213145_Magisk Delta.png
    Screenshot_20220923-213145_Magisk Delta.png
    153.4 KB · Views: 95
  • Screenshot_20220923-213158_Magisk Delta.png
    Screenshot_20220923-213158_Magisk Delta.png
    193.2 KB · Views: 98
  • Like
Reactions: 73sydney

73sydney

Senior Member
Whenever I come to XDA and ask a question I'm normally receive a really unhelpful reply, along the lines of "if you search you will find your answer" This is can be very annoying, especially after I have spent an hour looking and I still can't find the answer? Hence the reason I ask a question.

The reason I say this is because I have got Google wallet working and I will share what I did.

1. Uninstalled Google wallet
2. Deleted both cache and data from play store
3. Updated Xprivacy Lua
4. Reinstalled UNSF
5. Changed fingerprint using su / props
6. Restarted phone

It is pertinent to say here that I fail all api integrity checks using the app on playstore. However Google wallet contactless payment works better than before.

I will keep this updated if I have as any issues.

Please understand that someone asking the same question over and over (and often expecting to be spoonfed) can be taxing.

And yes the search system can sometimes take a bit of learning to fully utilize properly....but really, heres the key.....if its a recent issue, then the issue is very likely not just affecting you, and so the solution will often be found in the last 5-10 pages of a thread. People get really tired of people who rock up create a new post at the end of the thread, when the answer is maybe 3 pages back, and they seem to think thats too much effort. Standard Operating Procedure on any thread should be to read the last 5-10 pages before creating a new post. That would earn the average person who thinks theyre catching a tough break because theyve touched a nerve that been tugged at by 50 people before them a lot of respect....consider trying the last 5-10 pages of a thread method in future, it will often not only giver you the solution, but the context, which can be just as important, and often you may be able to provide some input or insight no one else has, which everyone can benefit from. Also if people just rock up and expect an answer in 5 minutes everytime (theres plenty do it, some people might have been registered for 3, sometimes many more, years and never post until they need something, happens all the time), then they dont learn anything, and they also dont contribute....

As for your steps above:

3. Updated Xprivacy Lua <-thats not required and is a personal choice, and has no real bearing ion the issue)

Usually one would do:

1. Install USNF Mod (the Mod is important as already stated)
2. Integrity Test
3. Test contactless menu in Wallet

If contactless fails:
4. Delete both cache and data from play store and reboot
5. Test contactless menu in Wallet

Note

Step 4 has been known to take days to return a positive contactless setup, in some cases


Note #2:

5. Changed fingerprint using su / props <- this should be largely unnecessary except in the case of chinese ROM's or other edge cases as far as i remember
 

zgfg

Senior Member
Oct 10, 2016
7,932
5,468
Did you get magisk delta from telegram?
I dunno for Delta Telegram but simple google searches "XDA Magisk Delta" and "GitHub Magisk Delta" provide by no mistake the links (top choices) to the corresponding discussion here about Magisk Delta and to the GitHub project with instructions, download links, etc
 
  • Like
Reactions: rodken

pndwal

Senior Member
... Note #2:

5. Changed fingerprint using su / props <- this should be largely unnecessary except in the case of chinese ROM's or other edge cases as far as i remember
... And with @Displax USNF_mod it is not needed even for ROMs not passing CTS Profile match (China region, Beta, Developer, many custom ROMS) in most cases. (There may rare be exceptions where this modded module doesn't work.)

Technical:

This mod actually adjusts the fingerprint prop to achieve the mismatch needed along with device prop mismatch to trigger bypassing of hardware based attestation enforcement in Play Integrity (different from the actual Evaluation type fallback triggered by the exception caused when trying to use key attestation with an injected 'fake' keystore provider registered)...

All these mods, official and unofficial, target the gms attestation process (one process within Google Play Services) only. The prop changes are not globally applied, so issues with OEM specific functions (eg Galaxy Store, special camera functions etc) caused by model prop changes and issues with Play Store (eg. YouTube not updating as expected) etc caused by fingerprint prop changes are successfully avoided...

Issues with unmatched security patch prop dates are also avoided with this solution...

The @Displax mod also kills a second bird (or rabbit 😜 ), ie. allowing ROMs not passing CTS Profile match to pass as mentioned above, simply because the fingerprint prop used for HA bypass trigger must also be properly certified for CTS...

--> This makes this USNF build a true 'Universal' fix, encompassing both old S/N API and new PI API, as well as the whole range of certified stock and uncertified China region, Beta, Developer and custom ROMS...

👀 PW
 
Last edited:

Nekromantik

Senior Member
Pixel 6 Pro September Update stock ROM so A13
i was on latest stable Magisk with kdragon USNF and DenyList UnMount and got the your device does not meet security message this morning. Tried the Integrity test and it failed all 3 on version 1. So installed USNF mod and then it passed first 2 but not strict. Did cache and data wipe of Google Play and rebooting but contactless menu still says does not meet requirements but I not tried to actually use it.
Should I pass all 3 in the integrity test?
 

cescman

Senior Member
Nov 5, 2013
177
40
I am using a pixel 6 pro rooted with magisk and usnf 2.3.1 installed. Play store and wallet and play service all in deny list. Google pay has been working fine for months until yesterday when I got a pop up message that my device doesn't meet requirement for contactless payment. YASNAC showed basic integrity and CTS match both pass and evaluation type basic.
I tried clearing play store data and cache and rebooted as described in a post above but it doesn't work. Any one has the same problem or any solution?
 

zgfg

Senior Member
Oct 10, 2016
7,932
5,468
I am using a pixel 6 pro rooted with magisk and usnf 2.3.1 installed. Play store and wallet and play service all in deny list. Google pay has been working fine for months until yesterday when I got a pop up message that my device doesn't meet requirement for contactless payment. YASNAC showed basic integrity and CTS match both pass and evaluation type basic.
I tried clearing play store data and cache and rebooted as described in a post above but it doesn't work. Any one has the same problem or any solution?
First, instead of the 'official' USNF 2.3.1 use the "2.3.1-mod" from Displax (mentioned in every 'second' post)

Second, there is no use of putting Playstore to DenyList - it relies on Google Play Services and that's managed by USNF 2.3.1-mod
 

pndwal

Senior Member
@brambles1234, @Nekromantik, @cescman, others searching, here's a little Summary / Guide:

Current fixes needed for Google Pay / Wallet


These days we need passing deviceIntegrity in new Play Integrity API. (Don't worry about strong integrity; few if any apps will use this at present as that would exclude users/customers using any device launched with Android 7 or earlier even if on latest Android as well as a number of newer devices with broken keymaster implementations.) Nb. While Safety net API is already depreciated, it's attestation must all be passing and Evaluation type showing BASIC for PI deviceIntegrity to pass since the same signals (plus more) are used by PI...

To check these, use YASNAC (S/N) and Play Integrity API Checker (PI) from Play Store...

Many devices passing S/N CTS Profile match, especially those running Android 11+, won't pass PI deviceIntegrity verdict with current official Universal SafetyNet Fix alone. @Displax's safetynet-fix-xxxx-MOD is the current solution:
https://forum.xda-developers.com/t/magisk-module-universal-safetynet-fix-2-3-1.4217823/post-87198517
- See my notes in post above for technical details, incl. why this solution also negates the need for setting a fingerprint in MagiskHide Props Config module for ROMs not passing CTS Profile match (China region, Beta, Developer, many custom ROMS)...
- Also note Usage: Delete/disable/reset MHPC (if installed / spoofing fingerprint).
- Note that Zygisk should be enabled and working, and only Google Pay/Wallet needs to be in denylist whether enforced or disabled with Shamiko etc active; no need for Play Store, Google Play Services processes etc when using any Zygisk-USNF builds...

Once PI deviceIntegrity is restored / passing, Google Pay/Wallet security requirements may pass again after some days (could take a week!) if simply left... Clearing Google Play Services and Google Pay/Wallet data should fix this immediately but you will need to set up cards again... Nb. Be sure to reboot immediately after clearing Google Pay/Wallet data (before opening app) to avoid issues (eg. app works but Activity list fails to populate).

Clearing Play Store data may be needed to restore Play Protect 'Device is certified' in Play Store Settings, About... This will affect whether Google Pay and other apps calling S/N or PI APIs appear in the Store...

Related Issues:

A number of users have experienced contactless payment failure with Google Pay / Wallet stating "Your phone does not meet the security requirements" irrespective of SafetyNet or Play Integrity status. (Several of us experienced this suddenly, and it predated both new Wallet upgrade an Play Integrity implementation.)...

Further, in tackling this I experienced two issues restoring a working setup;
- Issue where 'Google Pay/Wallet is currently updating' fails to complete, and
- After restoring app, Activity list fails to populate.

I put steps to fix these here:
Initial fix:
https://forum.xda-developers.com/t/...agisk-discussion-thread.3906703/post-86981221
Resolved Activity list won't populate:
https://forum.xda-developers.com/t/...agisk-discussion-thread.3906703/post-86991951
Summary (scroll to 'In short...'):
https://forum.xda-developers.com/t/...agisk-discussion-thread.3906703/post-86992241

Hope this helps those concerned. 🤠 PW
 
Last edited:

Goooober

Senior Member
Dec 22, 2011
212
22
Kent
Like many people Google Wallet is now broken for me. I've been using it without issue on my Poco F3 running Crdroid for a few months now using the latest Magisk, Zygisk and the SafetyNet Mod Fix by Displax but it not longer seems to work.

I've tried the usual clearing storage for Play Services, Play Store, Wallett App without success, I can't even add a card to the Wallet app now.

My YASNAC still passes but Google Play Integrity API Checker now fails on MEETS_DEVICE_INTEGRITY when it used to pass.

:(
 

Attachments

  • Screenshot_20220924-161944_Yet Another SafetyNet Attestation Checker.png
    Screenshot_20220924-161944_Yet Another SafetyNet Attestation Checker.png
    131.6 KB · Views: 45
  • Screenshot_20220924-161957_Play Integrity API Checker.png
    Screenshot_20220924-161957_Play Integrity API Checker.png
    56.6 KB · Views: 46

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    I could be wrong, but for most people, the "solid base" of Magisk modules (assuming stock ROM with root) is just USNF Displax mod. If other modules or modifications are installed then more elaborate hiding measures might be necessary but in general the modded USNF alone is sufficient to pass basic and device integrity.
    FWIW, USNF (now w/ @Displax' mods) is the defacto replacement for basic MagiskHide functions that provided an environment attestation API (SafetyNet) bypass...

    MagiskHide also provided proper 'root' hiding from apps but always remained basic as John has tired of / lost interest in bypassing app's increasingly sophisticated custom root trace detection methods for some years now.

    This has meant that more sophisticated root hiding has been the province of solutions like
    'Servicely' (to disable services with isolatedProcess enabled that can 'easily bypass MagiskHide), vv's Unshare and later Canyie's MomoHider Magisk modules in combination with Magisks own hidelist.

    XPosed modules like Hide My Applist were also added to the list of hiding solutions as Devs have found ways to (arguably) abuse ability to detect apps they deem indicators of execution environment compromise despite Google's efforts to limit this 'improper' use of permissions like QUERY_ALL_PACKAGES...

    With Zygisk-generation Magisk (24+), even basic root trace hiding has been 'sunsetted' in Magisk itself... As John said:
    • It's not a secret that specifically designed modules can indeed utilize the DenyList feature for "hiding" purposes
    • DenyList, however, is only meant to "revert all Magisk changes". It will not attempt to manipulate any other signals on the device
    • Since Magisk already provides root permissions, modules don't actually need to rely on DenyList for hiding. They can do everything themselves
    • There are already modules out there that directly manipulates root detecting processes / system services to workaround HW KA

    So newer efforts to provide root hiding have had to re-implement proper methods (not simply reverting Magisk modifications in processes which actually breaks much hiding). This means that solutions like Shamiko, while 'hijacking' denylist for convenience, are actually re-imlementing denylist as a hidelist. In this sense at least Shamiko is now supplying the 'solid base' hiding once provided by MagiskHide (but it's not needed for passing SafetyNet or Play Integrity attestations as you said)...

    Of course other 'base' hiding is also supplied by Shamiko, eg xhook hiding for LSPosed and other modules was previously integrated in Riru as Riruhide but many were unaware of its existence. With 24+ Magisk there is no such integrated hiding but Shamiko is hiding (most?) traces of xhook/Zygisk now...

    Being a Canyie initiative, Shamiko adds the unshare (isolated process) and other hiding done by her MomoHider as well as tmp mount and more hiding for further traces now detected by banks... PW
    5
    Sorry, i guess i quote it mostly as a solid base for everything after...
    I could be wrong, but for most people, the "solid base" of Magisk modules (assuming stock ROM with root) is just USNF Displax mod. If other modules or modifications are installed then more elaborate hiding measures might be necessary but in general the modded USNF alone is sufficient to pass basic and device integrity.
    4
    For the majority of people Magisk 25.2 with Universal SafetyNet Fix (Mod/Mod2) by Displax, and Shamiko (Deny List NOT Force enabled) is enough to pass Integrity test (along with clearing data for Play Store and Play Services)
    Shamiko isn't even required in most cases I believe. Play Integrity does not detect Zygisk and in fact has no way to do so.
    4
    doesn't work sir, installation failed, your system API of 29 is less than the minimum api of 30? what, any solution? Magisk 25.2, rog phone 2 stock rom android 10, coz i got detected on ruru, Libc and Syscall file detection, the HMA is detected, i already use HMA beta 3.0.5, plz helb

    As promised, linking you to the newly completed HMA guide:

    4
    doesn't work sir, installation failed, your system API of 29 is less than the minimum api of 30? what, any solution? Magisk 25.2, rog phone 2 stock rom android 10, coz i got detected on ruru, Libc and Syscall file detection, the HMA is detected, i already use HMA beta 3.0.5, plz helb

    It does say Android 11+ API 30+ on the github page

    The module cant modify a file that doesnt exist :)

    Sorry but theres no equivalent function for Android -11

    I am working on a Hide My Applist guide (with pictures) at the moment, that may help. Once i have that up, ill tag you and you can follow and see if you have it setup correctly and then also let us know what youre being detected on under those categories

    For the majority of people Magisk 25.2 with Universal SafetyNet Fix (Mod/Mod2) by Displax, and Shamiko (Deny List NOT Force enabled) is enough to pass Integrity test (along with clearing data for Play Store and Play Services)
  • 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
    32
    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/t/magisk-module-universal-safetynet-fix-2-3-1.4217823/post-87198517


    For general tips on first getting SafetyNet to pass fully, check here:
    https://www.didgeridoohan.com/magisk/MagiskHide#hn_SafetyNet
    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
    The app is finally public! (thanks Google for taking a week to approve this 🤦)
    I made it beta testing since I haven't tested it on much devices. If you find any problem, please open an issue here and I'll take a look at them once I return from vacation.


    Source code:

    If you are curious, the possible outcomes I've seen are:
    • 3 ticks (unrooted samsung)
    • tick/tick/x (unrooted redmi note 4 with unlocked bootloader)
    • x/tick/x (my rooted a11 op7t)
    23
    UPDATE 1/8/2022
    This app is officially discontinued in favor of a new app I published on Play Store. Read more here:

    ====================
    ORIGINAL MESSAGE:

    I just made this simple app which tells you if your device passes the new Play Integrity API (which is presumably what Google Pay and Play Store use to detect root now). If you don't trust random apks from the internet feel free not to use this. I'll upload the source code at a later time since it's very junk now (probably on github).
    You can use it to play around and see if you manage to get it to pass without having to mess with Google Pay. There are screenshots of the 2 possible outputs (pass screenshot is from an online emulator).
    Also I didn't test it much since I don't have many devices that can pass. Hope it works fine 🤞

    Hope this helps someone find a solution :)

    EDIT:
    Here is a quote from Google of what exactly "Does not meet device integrity" mean:
    The app is running on a device that has signs of attack (such as API hooking) or system compromise (such as being rooted), or the app is not running on a physical device (such as an emulator that does not pass Google Play integrity checks).
    ...
    If you are having problems with your testing device meeting device integrity, make sure the factory ROM is installed (for example, by resetting the device) and that the bootloader is locked.