yashsingh1/xdaforums huggingface dataset:
[Magisk] 73sydney:
Just going to point out while im sorry it didnt work for you, or others, i did actually test this bothering to upload it

Im thorough like that

Worked everytime i tested it, on 3 different ROMS i flashed as a tester that day....

Update:

To make things easier for those reporting "timing issues" i have added sleep 30 to my original script....and reuploaded

Please try the new version before reporting any further issues, or try one of the other suggestions in the previous 2 pages.

Edit/update: be aware that using post-fs-data is blocking, so adding a 30 second sleep can be an issue as someone just pointed out to me via PM....they use the Nova Launcher Magisk Module AND had debloated Trebuchet using the Terminal Debloated Magisk Module....anyone want to take a stab at what happens under these unique circumstances? With no Nova Launcher available due to the 30 second sleep, the system tries to load the missing Trebuchet Launcher and after spamming the errors on screen, powers down...not ideal.

If any errors like this appear (for this, it any other module) flash one of the Magisk manager tools in TWRP ..I recommend the Magisk Manager Recovery Tool (which runs an Aroma interface) and disable it remove the module. Alternatively, for this module, go to terminal in TWRP and vi /data/adb/com.73sydney.gpay and comment out the sleep, and reboot

The script never needed a sleep to work for me, and I suspect there's blocking going on somewhere by some other module for people who report it doesn't work for them without it. Here's a prime example of where adding a sleep where it never needed to be for me and others has ended up causing an issue, under somewhat a unique set of conditions, but still...
[Magisk] Senliast:
Ok, I resetup the script and my PayPal card in G Pay and now it's working also for me. Thank you for the feedback!
[Magisk] abyssq:
What's the problem with the sql fix magisk module? It doesn't work for me on p20 pro.
[Magisk] 73sydney:
You must be one of those people who have a "timing issue"...i never had one on three ROM's i tested on , but others have reported similar, so ill call it plausible...

I have added a sleep 30 command to the original script, and just re-uploaded

Please try this and if it doesnt work, try one of the other suggestions in the last 2 pages...if you had read the last 2 pages you would have known about the change ive made, and the alternates

Always good practice to read the last few pages of any thread, or use the search tool, rather than rock up and post about an issue and expect people to drop everything and run to your aid....
[Magisk] karmak:
Did not modify anything outside of setting the permissions to 444 and everything worked as mentioned. Anyone had any issues just restricting access without making the SQL changes?
[Magisk] LLStarks:
I'm on 17.5.x. None of these methods are working.
[Magisk] wtvxy:
thank you. It works for my device for 2 weeks.

MIX2S EU 5.30
[Magisk] matssa:
Hey guys I was using the Tasker profile in order to modify the db however GPay isn't working anymore, even though everything with attest is at 0.

I can add a card but it says that the phone is modified. Didn't try the script though however not really sure how it works. Even though I don't think it will fix my issue. Anyone faced this? For info, I'm on pixel 3 xl with latest magisk canary build, stock rom but with May security build, custom kernel, GPay 2.89.248785339, Play store 15.1.23-all, G services 17.4.55 and using EdXposed (might be the issue...).

EDIT // Ok so EdXposed seems to be the culprit (or at least the Riru Core and the other stuff).
[Magisk] ssceddie:
Definitely xposed is the problem
[Magisk] thom@s:
Did anyone upgrade to GPay v2.90?

Being far away from home for a few days, I will stay on v2.89 since it works perfectly with Terminal method.
[Magisk] karmak:
Updated this morning. Works as it did before. I did not make the DB changes for what its worth. Only changed the permissions to 444.

Thanks,
[Magisk] krolla03:
Magisk Google Pay SQL Fix

will keep Substratum from working BTW
[Magisk] jsauder2:
Out of curiosity, do you know why? I've been having issues with TorGuard VPN app since running this SQL fix and don't know why.
[Magisk] 73sydney:
Again, possibly due to introduction of the sleep people kept insisting was needed..........

post-fs-data is already blocking, adding 30 seconds to it just makes it worse...i dont know why people asked for this, but they did, i just did what was asked for...

i pointed out it several times the sleep 30 was never necessary for me, over 3 ROMS i tested the original module on , or others....

You can either try the version without the sleep 30, which ive just added to the post, or use the service.d suggestion also added to my original post

Ive also added a version without the sleep and just setting the db to 444 as people are reporting it may work...

Post and downloads are here:

Im kinda over it, the module, without sleep 30 works for me, this ends my interest in the SQL fix module.......
[Magisk] Lupfi:
I have the same effect.

In this way I can live, since the message also comes from Paypal or Revolut. Paying is more important. :o
[Magisk] 73sydney:
Now if we could only come up with a script that fooled the vendor into thinking we'd paid, but the money stayed in our accounts....
[Magisk] andreacos92:
Anyone has GPay working for conctactless in store payments with latest Google Play Services 17.4.22?

I had to downgrade to 17.1.22, otherwise I couldn't pay at all, but I could add cards etc...

Google Pay v 2.90 in both cases.
[Magisk] Lupfi:
A dream... :D
[Magisk] zencooler:
You have explanation in this thread.

In short words: you have to change attestation values in sql database and change the permissions of this database to read only.

Look for details in previous posts.
[Magisk] andreacos92:
If I posted here, it's because I already followed the guide in OP :)

With 17.1.22 I never need to change attestation values and permission of the database, it was working without issues.

With 17.4.22 it stopped working. It let me remove and add cards, but not make payments. So I followed this guide but with no success.

Now I downgraded to 17.1.22 with no database modifications, and it worked again (add cards and make payments, tested with 2 cards just now).
[Magisk] zencooler:
It's interesting... Seems that Google change something in newest GMS?

What model of smartphone and OS do you have?
[Magisk] andreacos92:
OnePlus 5, with latest OOS (Open Beta 33 atm) and latest bluspark kernel (r170 atm, very similar to stock).

Magisk 19.3 with some modules, but nothing new/strange/related to Google Services I think.

The odd thing is that with newest Play Services 17.4.22, when I put the phone over the POS nothing happens: no error, no message, no vibration.
[Magisk] EnoAk:
I'm very thankful for the magisk module you created. Can't recommend the sleep version either. It made several magisk modules stop working, even YouTube vanced disappeared. Now I've installed the 444 version. All modules are working again, hopefully Gpay will also work.
[Magisk] thom@s:
I saw June Security patch is out. Will try to flash to test this nice script method and validate it is still ok ?
[Magisk] jsauder2:
I didn't pay enough attention and realize he was talking about the magisk module. I've never used that. I've only used the attest.sql fix posted a ways back. Thanks for the reply though.
[Magisk] liber:
How do you keep GPS from updating to last version ?
[Magisk] andreacos92:
I temporarily disabled Play Store app. As soon as you re-enabled Play Store, Play Services updates to last version.

Obviously this is not a solution, for me at least.
[Magisk] zencooler:
I am not using Play Store since I freezed it and using ApkPure which is even better as it has updates more often and I can set some apps to be ignored on the update list (e. g. play services and GPay :)).
[Magisk] thom@s:
FYI I am running Pixel 3 + GPay 2.89 + GMS upgraded to 17.4.22. With terminal modification (applied a few days ago) everything is still ok: paiment and notifications + history in GPay.
[Magisk] sliding_billy:
Been running with the original instructions in this thread since the day it was posted. Running a Pixel 3 and Pixel 3 XL on June update that have been updated from the start of this thread from May to June. All GMS/GPay/Play Store updates and everything else have been allowed to occur normally. I have a bank account (Wells Fargo debit) and PayPal account on both phones, and both have worked flawlessly since day one (last time working was yesterday morning on the P3). No scripts or anything else needed. The only thing I have done is occasionally run the SQL editor to check that no attestation values have changed from 0 and that there are no new ones, along with running the chmod 440 dg.db terminal line after the June update just to be safe. Maybe I am missing why/how this thread went from a couple of simple steps back to people downgrading locking out updates, scripting, etc. Admittedly, since I am working I may have missed some details about different phones and bank accounts and such but it feels like this thread has went off the tracks discussing stuff that is meant for the GPay discussion thread that already existed.
[Magisk] andreacos92:
I tried ApkPure, but I don't like it too much. I still prefer Play Store, if it's possible.

And ApkPure doesn't have all the apps I need/use. :(

Thank you for your feedback!

What I don't understand is the behavior I have with 17.4.22. I can add cards without any issues, but I can't pay. Nothing happens, like the smartphone/GPay doesn't see th POS at all (or vice versa) .

If someone has any idea/modification, I'm willing to update to 17.4.22 and try.

If new Play Services versions (17.4.22 in this case) introduced new checks or things that need new workarounds, I think it's worth to discuss here, and/or eventually update the guide in OP.

You don't have issues and I'm happy for you, but it seems that the mileage is very variable.
[Magisk] sliding_billy:
I don't disagree, but none of that has happened using this method. This thread was created for this method, not others that have been posted about in this thread (Magisk modules, scripts, etc). That was my point about the other thread that already existed before this one and continues to be posted on.
[Magisk] occtec:
This is a magisk module version workaround that works for me everytime. Hope it helps others. Cheers

1. Install Magisk module "SQLite for ARM aarch64 device" by ianmacd from Magisk Manager

2. Reboot to enable this module

3. Install your favorite terminal emulator (I use Termux)

4. Enter Termux, then type "su" (Magisk might ask you for permission of root access, permit it.)

5. Enter following command line by line: (This is Magisk module version.

am force-stop /data/data/com.google.android.apps.walletnfcrel

chmod 777 /data/data/com.google.android.gms/databases/dg.db

sqlite3 /data/data/com.google.android.gms/databases/dg.db "update main set c='0' where a like '%attest%';"

chmod 444 /data/data/com.google.android.gms/databases/dg.db

6. Reboot

7. Profit!
[Magisk] andreacos92:
Just tried. For me, with latest GSM 17.4.55, it doesn't work.

With this workaround or not, I can add cards but not make payments.
[Magisk] crows:
The only thing I have done is changed the permissions of the dB file to 444, nothing else and its been working for a few weeks now
[Magisk] vandyman:
The Ops directions worked for me on my Pixel 3a XL with the June update.

Thanks...
[Magisk] occtec:
You could also try using magisk hide option within magisk although for me it works without.
[Magisk] andreacos92:
Already done. I always had GPay and GSM hided with Magisk hide.
[Magisk] occtec:
Yeah sorry to hear, no issues here :)
[Magisk] 73sydney:
im testing the 444 permissions only change this week...to see how it stacks up against the full SQlite database edit...
[Magisk] FloFloFlow:
The Magisk module is not working for me... I can add the card, but when I put my phone on the machine, nothing happen, like the NFC isn't activated. Ofc it is.
[Magisk] andreacos92:
Ohh, another with exactly my same issue.

Which phone/OS do you have? I bet Google Play Services version 17.4.55, right?
[Magisk] pbanj:
Would be interesting to know if that works.
[Magisk] MC_Ohr:
For me it is working with GPS 17.4.55 I updated manually and set the permission to read only. Payment is working flawlessly.

Gesendet von meinem HTC U11 life mit Tapatalk
[Magisk] AndersonLikau:
Working here too. I was having problem with magisk sqlite module and termux but using sqlite from super on play store and terminal by jack, I was able to use it at seven eleven just now. It was PayPal tho as I have to wait till tomorrow morning (Monday) to call my bank to verify my card

Edit:

Pixel 2 xl

Havoc and sultan (both newest update)

Both gpay and gms up to date
[Magisk] thom@s:
Updated my Pixel 3 to June Security patch (ADB sideload method) + applied Magisk 19.3.

Did not had to do anything to have GPay fully ok (first applied Terminal method from OP a few days ago) ?
[Magisk] FloFloFlow:
Mi Mix 2S, LOS.

I don't know the version, I guess the last one.
[Magisk] andreacos92:
It's the same behaviour that I and another user with OnePlus 5 are experiencing after the update of Google Play Services at version 17.4.55.

So it's not related to OnePlus 5, but even you with Mi Mix 2 have the same problem.

For the version, you can check in the app info. If you downgrade to 17.1.22 probably you can pay again.

Hope someone find out some workarounds.
[Magisk] zencooler:
Just for information: this method is working fine for latest GMS and GPay.

I use the GMS 17.4.55 and GPay 2.90.250604638 with latest Magisk 19.4.x. Even after last GPay root recognising I didn't touch anything in GPay (didn't remove cards, add them etc.) just implement the patch and set read only permission for dg.db file.

Payment is working using the same configuration. Hope this help to others that have doubts or fighting via removing cards, clearing GMS data etc.
[Magisk] Schrubbi:
[MENTION=1072347]zencooler[/MENTION]

Is it working with or without payment history in the GPay app for you?

Thanks & greets,

Chris
[Magisk] zencooler:
History is working fine here.

I have previous transactions (before sql patch) and also new transactions (after sql patch) are stored properly.
[Magisk] daina:
Worked on my Mate 9, Oreo. Tried a fix last week that worked for a day, but reset my HWatch 2. Applied the steps exactly as in OP, went right to the machine in my building and bought a coke. Nice work, so glad I don't have to factory reset, or even re-add the card!
[Magisk] metronews:
I tried the 'Magisk Google Pay SQL Fix.zip' method, and my phone (LG G5) was unable to boot, or if it did it would reboot after a few seconds of seeing my home screen. I had to remove the Magisk module in TWRP using Magisk for recovery 'mm-201904040.zip'. I then tried the [MENTION=4997933]occtec[/MENTION] method but failed at chmod 777. I kept getting 'Operation not permitted'. I think the Magisk module may have ran the script and locked the db using chattr +i (maybe I could have added my card ok after removing the magisk SQL fix module, I didn't actually try) so when I subsequently tried the manual approach chmod failed. Anyhow chattr -i dg.db sorted me out and I was able to proceed with the [MENTION=4997933]occtec[/MENTION] method all OK. Thanks for all contributors to this post!!! :)
[Magisk] andreacos92:
Glad to read that, but it should be specified that YMMV.

I have latest GMS and GPay, and I cannot make payments, I can only if I downgrade GMS to the previous version.

And this methods (I tried them all: the one in OP, the SQL Magisk method, even the Automate Flow) didn't make any difference for me.

With previous GMS versions I never had to use them, and I always was able to add cards and make payments.

Now, regardless if I apply these methods or not, I always can add cards but I cannot pay. I put the phone on the POS and simply nothing happens.

I'm not the only one with this particular issue, so the new GMS version change something, that unfortunately these methods can't (

actually

) solve.

And we can't keep the previous version of GMS, it keeps auto updating unless we freeze Play Store app, that it's not a great solution.
[Magisk] ssceddie:
Its not required to freeze playstore

https://xdaforums.com/showpost.php?p=79450963&postcount=1170

Or

https://xdaforums.com/showpost.php?p=79442047&postcount=1145
[Magisk] xxxfuq:
Thanks. This actually worked for me
[Magisk] occtec:
Seems to be a hit and miss but works everytime for me. You're welcome :good:
[Magisk] andreacos92:
I already tried with both that apps, unchecked those services.

Still keep updating as soon as it has an internet connection. :(
[Magisk] tjengo:
Doesn't work for me anymore.

I can add cards but cannot pay. Nothing happens. Latest GPay and GPS.

Gesendet von meinem Mi MIX 2S mit Tapatalk
[Magisk] andreacos92:
You're not alone with this problem. So far I counted two users with OnePlus 5 (me too) and other two with Mi Mix 2.

If you downgrade GPS, you will be able to pay again.
[Magisk] zencooler:
I see. It doesn't mean the sql patch method is not good. Rather it means that on some phones newest GMS doing something wrong with NFC "touch and pay" feature.

Did you check these settings omin NFC section? Maybe you can try just to remove cache and data of GPay and then install it again + check then NFC settings of GPay is selected as a default payment app.

The additional way to be checked is to try also the elder method to remove cache and data of GMS and remove GMS folder from /data/data/con.google.android.gms and then reinstall GPay from the begining.
[Magisk] CSX321:
I tried to look back at your previous posts, but didn't see this info. Just to verify, you have yours set up like this?

Google Pay, Google Play services, and Google Service Framework hidden in Magisk Hide

Magisk Manager hidden (random package name) in its Settings

/data/data/com.google.android.gms/databases/dg.db permissions set to 440

Those seem to be the key things to get Pay to work, regardless of versions of things. I don't think any modules or scripts are really required.
[Magisk] andreacos92:
I didn't want to say that SQL method is not good, maybe I expressed bad.

What I mean is that SQL method works good, but not for all of us, mainly for someone with latest GSM.

Of course I checked NFC settings, and Google Pay is the default (and the only one) app for NFC payments.

I will try to remove the GMS folder and uninstall/install GPay again ;)

---------- Post added at 07:08 PM ---------- Previous post was at 06:33 PM ----------

I answered in red ;)

You can find my previous posts in the previous pages of this thread and in the thread of Magisk-GPay.
[Magisk] Player04:
I can confirm gpay works on my rooted s10+ exynos
[Magisk] 73sydney:
Just adding that my week long test of just using the 444 db permission change didnt end well, my card was de-registered from Pay, just as it had in the past when Pay wasnt working

Now going back to the full db edit and permissions change option....

Latest GPS and Pay
[Magisk] wyzga:
OMG, after thousands of tries GPay is finally working!

1. Google Pay, Google Play services, and Google Service Framework hidden in Magisk Hide

2. Clear Data and Cache for Google Pay app.

3. /data/data/com.google.android.gms/databases/dg.db permissions set to 440

4. Run and configure Google Pay.

5. Voila!

Hope it's gonna to work for you guys!
[Magisk] aoaleman:
It worked! Thank you!!
[Magisk] hammondegs:
New gpay update just downloaded and all is working.
[Magisk] 73sydney:
Have updated my Magisk Play SQL Fix zips., in my original post here (also in sig link).....see changes below....

Update:

All zip files now at v1.1

Changelog:

All SQL Fix files now using service.d by default (instead of post-fs-data which is blocking), on install service.sh (formerly post-fs-data.sh - changed to service.d to avoid confusion with post-fs-data.sh and blocking action of such) is copied to /service.d/gpay.sh

SQLite v4.1 for arm-v7 binary zip also updated

Tidied up all and will try and get them added to repo too....if thats easier for everyone

Submitted all SQL Fix zips AND sqlite binary zip to be considered for addition to repo....easier to track updates

No idea whether it will be successful or not, first time submission, think i did everything correctly :)

Toying with the idea of:

* adding packages automatically to hidelist in magisk.db via magiskhide

* adding a automatic clearing of the cache of GPay/GPS/GSF on install.....

For anyone terminally bored checkout my personal github repo for my Unifi Autoban script for autobanning/unbanning users who trips the P2P IPS filter on a Unifi WiFi system....i come from the punitive school of network administration :) : https://github.com/stylemessiah/Unifi-Auto-Ban

Edit/Update:

All my modules were rejected for being added to repo. Thanks to [MENTION=4667597]Didgeridoohan[/MENTION], who i respect for handling things properly and his reasons for rejecting - understood and valid, and explained - turned out to be the highlight of the repo submission process getting a rejection notice from him, less so for the rude, elitist trolllike and unhelpful others manning the repo approval process, they know what they can do. Rejecting things offhand, not offering ANY help when 3 words would have helped, and making snarky comments instead, says more about you than me..... Wont be bothering with the repo ever again.....i thought only the forum had trolls and ego trippers (again, not talking about [MENTION=4667597]Didgeridoohan[/MENTION], full respect for the time he puts in)

Ill update and notify here if and when i add features, and add any new modules to my sig....
[Magisk] Lubovic:
YES ! it's working fine on my S9 with SoLdieR9312s 19.2

This method is so easy
[Magisk] jaggillararla:
Hi could you add it to your GitHub so I can follow it ? It's hard to follow on xda forums
[Magisk] 73sydney:
You asked for it, you got it

Hehe i actually sat up last night and tidied up the modules a LOT and even added proper uninstall routines to remove the /data/adb/service.d/gpay.sh we place during install. Now module is fully reversible....well i dont reverse the magiskhide as i think thats best left to the user, in case they want to leave those items hidden post module uninstall.....

So id planned a new release, but put them back on github...id torn them off there after i got kyboshed on magisk repo submission, but for you, i re-added them...

Everything should now be a whole lot half-assed :)
[Magisk] jaggillararla:
Amazing thank you!

But I downloaded from GitHub and magisk said it's not a magisk module ?
[Magisk] 73sydney:
Oh poo, thats because github automatically puts the files into a subfolder inside the zip....looking at how to fix...if anyone knows why or how to stop this madness, let me know...

In the meantime, ill upload the latest proper zips to my dropbox....done

Edit/update:

okay...finally figured it out, github is kinda retarded in that if you just make a release of the files in your repo it creates a zip but puts all your root level repo files into a folder named after your repo....why...why not just name the zip after the repo and leave the bloody files alone.....grrrrr

So to actually release a zip without a folder containing your files, you have to zip it locally and upload and attach to the release

Stupid fricking nonsense, talk about double handling...

Anyways, fixed, now all releases have a zip attached that magisk will recognise (no repo folder inside)...sheesh
[Magisk] L22EEW:
Great thread to read. Will attempt gpay configuration.

EDIT:

Attempt the GPay.SQLite.Fix.440.Only.v1.2 fix. No luck

Attempted the GPay.SQLite.Fix.v1.2. No luck

Currently using 2.89 Gpay.

Anyone other tips I could use?

Oneplus 6T device.
[Magisk] badaas:
Brilliant thank you!

?