yashsingh1/xdaforums huggingface dataset:
[Magisk] djjohnnyblaze:
I installed 1.6 on my pixel 3a and was able to finally add my card. Will test a purchase tomorrow.

Thanks!
[Magisk] Neff_V:
Under Pie the module worked great but today I upgraded to Q Beta 5.

I delete all modules in magsik and tried to edit the database file with the sql-editor but I can't edit or reset the dg.db file.

Unfortunately the dg.db file is still on read only and I can't change it to 440 or something else. :(

Can anybody help me with this weird problem?
[Magisk] joeynshelby:
try the following command in terminal:

chattr -i /data/data/com.google.android.gms/databases/dg.db

Then try to make your changes with SQL editor
[Magisk] Neff_V:
Nope :(

I'm rooted but I can't even touch the file (Rename, change Permission doesn't work).

Is there a way to reset the complete the whole folder?
[Magisk] jcmm11:
It's com.google.android.gms, not com.google.gms
[Magisk] Neff_V:
[MENTION=4487388]jcmm11[/MENTION]

Oh my fault but it also doesn't work with com.google.android.gms
[Magisk] Didgeridoohan:
Still not right. It's "chattr -i" (note the space after chattr).
[Magisk] Neff_V:
Ouh... I'm so stupid ? Thank you. Now it works. ????
[Magisk] zencooler:
Just for information: this method (dg.db modification) still works after the update to newest version of GMS (18.3.77).

So good :)
[Magisk] jaggillararla:
I'm if I'm at 1.5 is worth going to 1.6? If u had that many problems with that version should I stay at 1.5 ?
[Magisk] djjohnnyblaze:
Good news! Just made a purchase successfully.

Thanks to everyone for all the hard work
[Magisk] imna357:
This is what I did, on BETAQ 5, running stock kernel(elementalx has kernel for 5 now)

uninstall Magiskprop hide, google pay REBOOT. Install magisk hide REBOOT, run terminal PROPS, install GOOGLE PAY , hide in magisk then reboot. Set up

Now works, hope it'll last:good:

I am on 1.6 version
[Magisk] Valiante:
Anyone care to make an update-able Magisk that can easily do this?
[Magisk] 73sydney:
Expect another update soonish, thanks again to further suggestions from [MENTION=4667597]Didgeridoohan[/MENTION], to hopefully get rid of the issues caused by sleep

Just need to test
[Magisk] zencooler:
UPDATE: after the next update of GMS (18.3.81) this method still works with no problem at all :)

I am paying regularly in shops using GPay and dg.db database has zero in attestation records and is still with RO (440) permission [emoji106]
[Magisk] 73sydney:
Updated to v1.7

Thanks to [MENTION=4667597]Didgeridoohan[/MENTION] for the updates, in all my years of dabbling in linux and bash, i'd never come across subshells....

This change removes the possible issues with other modules, such as i was having with the Nova Launcher magisk module.

An update from any version below v1.7 is recommended. For those on versions below v1.6, please follow the terminal commands shown in the U]Upgrade process (versions below 1.6:[/U] section of my original post

New:

uninstall.sh:

- Script is now run in a subshell to avoid blocking and sleep issues with other modules and processes

gpay.sh:

- Script is now run in a subshell to avoid blocking and sleep issues with other modules and processes

Download links in my original post here, or via my sig below
[Magisk] jaggillararla:
Should we update from 1.5 to 1.7? Don't want problems with Nova launcher and such
[Magisk] 73sydney:
The v1.7 update are purely to avoid any sleep issues or problems with other modules...running in a subshell does this. Its why the warnings section of my original post was removed and i did specifically put inthe changelog this was to avoid sleep issues with other modules and processes....

Perhaps i should have made it clearer, sorry, exhaustion meant i had time to test and upload and not much else...

Will update post so its clearer

Note, in the original post, you will still likely want to run the chattr command in the

Upgrade process (versions below 1.6):

section if running a version below v1.6
[Magisk] jaggillararla:
So I should stay at 1.5 if I want the full fix no?
[Magisk] warrencoakley:
Confirmed working on GS 17.7.85
[Magisk] Quinny899:
Turns out you can get this working on Android Q (beta 5) if you use the MagiskHide Props Config module and set your fingerprint to the latest Android Pie build for your device (so on my Pixel 2 XL it's set to the July build, fingerprint "google/taimen/taimen:9/PQ3A.190705.001/5565753:user/release-keys")

It's just let me add a card fine, and definitely did not work before changing the fingerprint. I'll try paying with it tomorrow, see if it holds out.
[Magisk] elreydenj:
Can confirm that this works. Now we just need a way for Netflix to still be able to be downloaded when using magisk props hide. Small price to pay I guess.
[Magisk] jsauder2:
Interesting. Didn't work for me on Pixel 3. I had been using pay fine before going to Q preview. I can't get it to work now but play store shows device is certified and I can install Netflix.
[Magisk] upperbladez:
You're amazing! This worked for me!
[Magisk] 73sydney:
Youre welcome, but the real thanks should got to [MENTION=2449699]BostonDan[/MENTION] for the original post, and other suggestions by [MENTION=9244976]braveheartleo[/MENTION] [MENTION=4487388]jcmm11[/MENTION] and [MENTION=4667597]Didgeridoohan[/MENTION], im just the plonker who packaged their work up into a half-assed module...though it has gotten way less half-assed lately thanks to [MENTION=4667597]Didgeridoohan[/MENTION]

friendly suggestion: maybe next time dont quote the entire post :) :)
[Magisk] sadiku:
I have a problem about app update, I cannot see update available at overall app store but I can see it available in individual app, like below capture.

Sent from Pixel 2 XL
[Magisk] BostonDan:
Just hacking and trying to figure out what gms is doing. I'm not the smartest person but I'm persistent. I wanted os wear, Google pay, and root with an unlocked bootloader, so it was just trial and error. I'm not a programmer but an engineering. :) I'm glad it works for everybody.

Cheers,

B.D.
[Magisk] BostonDan:
I have been told that this does not work on Android Q, so everybody start having to come up with a "Q" fix!

Lol

Cheers,

B.D.
[Magisk] pbanj:
https://xdaforums.com/apps/magisk/module-magiskhide-props-config-t3789228 that will help you pass the cts profile check.
[Magisk] s1mpleful:
[MENTION=2449699]BostonDan[/MENTION]: out of curiosity, what do 0 and 10 attest value mean? Do you have the full mapping (0,1,2..10)?
[Magisk] BostonDan:
No idea the full mapping. I just noticed that the attest value changed to 10 when tripped by opening Google Pay, so I surmised I should change it back to 0, make the file read only so it (hopefully) would not be overwritten and see if it worked.

Cheers,

B.D.
[Magisk] s1mpleful:
Lol...

Thanks for the reply [MENTION=2449699]BostonDan[/MENTION]. Sometime you just need to be persistent and a bit of luck to be a real hacker. Salute on you, man...
[Magisk] harperrr2k:
You are amazing! Working on pixel 3 XL.
[Magisk] sliding_billy:
My only concern (I already commented that this was great and I implemented it successfully on two devices) is that we will find out the hard way when it fails at payment if/when Google changes something that is not noticed immediately. In other words, until we see a bunch of changes that do or do not kill GPay at the terminal I will still need to carry a card.
[Magisk] HamsterHam:
Added another card and just paid with it. ?? Still all good. ?
[Magisk] swour:
Nice to have a fix for Play Services 17.x, mine are still on 16 and the attestation values all show "10" while Google Pay continues to work.

Does that value mean fail only in versions 17.x? What are the defaults on a device that's completely clean of any modifications?
[Magisk] clonato:
Hi

i'm on GSM v17.4.53 with Pay v2.88 and all works

thanks a lot
[Magisk] mslezak:
Yeah works very well. Now I'm trying to use some of your technique around the Fortnite Beta and Root - just playing on my Mi9 the latest update doesn't allow me to play with any guide and I think they are doing something similar...
[Magisk] faddys123:
what is the GMS toolbox?
[Magisk] zencooler:
Page 63 on thread dedicated for Google Pay problem - it's simple tool for checking the attestation state trigger written by user Freshek.
[Magisk] corywf:
I was able to successfully add my card but payment has failed in 2 grocery stores. Once yesterday and once today.

Are you changing values that list "attest" anywhere in the first column? Are you also changing values for "attestation"?
[Magisk] onimaca:
I've followed all the steps. but still i'm unable to use Gpay.

GMS Toolbox ok

Gpay 2.88

Google Play Sevices 17.1.22

Everything hidden in magisk even the package name.

I've deleted all my cards and tried to add them again but i get a pop up requesting me to check the credit card details despite everything is correct
[Magisk] sliding_billy:
Once modified this way, should the device be passing the GMS Toolbox check or not (hard to tell if the tool needs rewritten to look for the new values)? I have succesfully added a card but haven't had a change to try at the terminal. In the meantime, I ran the GMS Toolbox check and it fails. Checked the .db file, and no values have changed from the ones needed. I had 4 rows that needed changed originally.
[Magisk] marshedpotato:
Hi all, I am keen to give this a try but am keen to know does it prevent anything else from working in the process of fix Gpay? How can I revert if i have problems? I'm afraid as a rookie I do not understand what is happening here. I'm quite capable of following the instructions but I would essentially be doing so blindly so any insight into what is happening and any potential risks would be much appreciated.
[Magisk] xytsrj:
Hello I tried step 10 but it says not operate how to solve it? Thanks

Sorry it is operation not permitted
[Magisk] wabmorgan:
Mine failed the GMS toolbox check before. It now passes. I have also made purchases with Gpay.
[Magisk] elreydenj:
I am experiencing the same issue.

Update:it is working as expected
[Magisk] BostonDan:
73sydney,

We're all contributing to this, and I wanted to personally thank you for your contribution. There's enough effort by everyone to recognize each person's contribution and appreciate what people add.

Cheers,

B.D.
[Magisk] 73sydney:
Not really the thread for this question

But, try clearing the cache/storage for google play store, reboot and try again....
[Magisk] sadiku:
Thanks, it work for me.

I did clear cache and storage but no reboot, issue still there. Issue gone after I clear cache, storage and reboot.

Sent from Pixel 2 XL
[Magisk] Quinny899:
Made a payment fine on Q ?
[Magisk] jsauder2:
I take my previous post back. I spent a bit of time cleaning up anything from previous mods/edits, started over, and now I'm good on Pixel 3 Q preview 5. :good:
[Magisk] dario2106:
I tried this guide, but this problem always remains for me

There are solutions?

SafetyNet Is OK (Passed)

Pixel 3 with android Q DP5

Inviato dal mio Pixel 3 utilizzando Tapatalk
[Magisk] Quinny899:
Please don't quote the whole first post.

Read the posts on this page and the last, detailing how to make it work on Q.
[Magisk] jaggillararla:
Bruh u need busybox
[Magisk] seemebreakthis:
Thanks ! I was revisiting this thread after GPay got updated and my cards have all vanished with GPay refusing to accept anything new. Was gonna manually alter the dg.db values again when I saw this Magisk automation.

I have it all installed, and can I (after rebooting) add other credit cards into Google Pay without having to do anything else?

Thanks again !!
[Magisk] John256145:
Nice work. Will this tamper or break OTA updates though?
[Magisk] dario2106:
could you tell me the detailed instructions for android Q?

thank you so much

Inviato dal mio Pixel 3 utilizzando Tapatalk
[Magisk] 73sydney:
Today out of nowhere my GPay got deactivated.....I uninstalled the card, uninstalled the module rebooted added the module added the card, and five minutes later...deactivated again. Going to go back to my previous ROM and see if it's the same there

Should add I paid for items just hours ago

Edit/update:

Was just the custom ROM i was on, it had issues...
[Magisk] Quinny899:
https://xdaforums.com/apps/magisk/magisk-google-pay-gms-17-1-22-pie-t3929950/post79896442
[Magisk] jaggillararla:
Man thanks for saving me time ?
[Magisk] vonDubenshire:
Thank you.
[Magisk] vonDubenshire:
Lol Netflix is mind blowing to me (I am still kind of new to root, been messing around with my pixel3 the past 2 months only)

I have found that it will let me download Netflix fine if I flash stock Q image and my bootloader is unlocked. If I revert to Pie, clean install, no root -- doesn't matter what developer settings etc. it will know my bootloader is unlocked and I cannot find Netflix in the Play Store.

The fact it lets me see and download it in Q probably means that they have not adjusted for some kind of storage change or something.

I am about to flash Magisk on Q Beta 5 because I thought Google Pay might work even though unlocked bootloader, but it isn't, so yeh.

I'll report if Netflix sees things.
[Magisk] jaggillararla:
Netflix is the biggest motherF

Just get Aurora store and get the updates from there. Apkmirror is not updating it anymore
[Magisk] vonDubenshire:
I was wondering about that. Why did APK Mirror stop? I haven't ran into another app that stopped updating like that.

Cool, I'll do it manually then if I need to since I am always on APK mirror grabbing new versions of apps before play store releases. I'll just go to another place to get Netflix for fun.
[Magisk] jayxiao171735:
so damn efficient!!!!!!!!!!!!
[Magisk] game #1:
Just want to say following the instructions provided by bostondan I am able to use gpay on my wear os watch ticwatch c2.

The only difficult thing was to copy dg.db to my phone for editing and get it back. I use twrp for this and changing permissions too.
[Magisk] vonDubenshire:
I'm having issues getting it to work on Q with Pixel 3 blueline. Prop & fingerprint is set correctly.

Do I still need to modify that database file?
[Magisk] jsauder2:
No. The magisk module takes care of everything. My issue was that I had previously used the attest.sql files posted and it had worked fine until Q. I had to run the drop_attest.sql to undo any changes made, then uninstall gpay, install the magisk module, and reboot. Then I installed gpay and rebooted and it worked fine.

I attached the SQL files in case you need them.
[Magisk] vonDubenshire:
Notes for others since I had success: I am on a Google Pixel 3 blueline, rooted with Magisk only installed (canary version, not debug)

I got it working the following way:

First, I followed [MENTION=3563640]Quinny899[/MENTION] 's advice to use MagiskHide Props Config module to change my device fingerprint to the July patch for Pixel 3 on Pie.

Rebooted. Tested everything sees the fingerprint properly. Google Pay didn't work after clearing storage so I moved to this after my post above:

- I uninstalled Google Pay

- Cleared cache and force stopped Play Services

- Edited the dg database file to read only per OP's post, which worked on Pie before I decided to flash Q Beta 5.

- Rebooted

I installed Google Pay and then placed it in MagiskHide.

Opened Google Pay and set it up from scratch, able to add two cards with no problems.

Success!

EDIT: I have the following 3 versions installed, did not install any updates manually, this is what the Play Store gave me:

- Google Play Services: version 18.3.81 (120400-257258062)

- Google Pay: version 2.91.250911885

- Google Play Store: version 15.7.17-all [0] [PR] 257301794

I am going to test this at a store on the way to work, hopefully it will work. I will update.
[Magisk] s@ilor:
Thank you! That works for me too. Currently on Q beta 5, magisk is from canary channel. Maybe helpful for someone looking for same:

1. Changed fingerprint as you advised to latest Pie build for my device (google/bonito/bonito:9/PQ3B.190705.003/5622519:user/release-keys)

2. Deleted dg.db

3. Rebooted

4. chmod 440 dg.db

After that I could set up Gpay, added card and paid in store.
[Magisk] badaas:
How you do this exactly thanks? ?
[Magisk] LLStarks:
Does that Beta 5 workaround combine with 73sydney's Magisk module?

Edit: It does!
[Magisk] s@ilor:
Hi, first i installed those 2 modules as per screenshot. Then i changed fingerprint, running command "props" in termux emulator. Then next steps - in termux run:

su

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

rm dg.db

Then rebooted

After reboot, in termux run:

su

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

Finally set up Gpay, you can also clear cache of the app before setting.

So far all is working..
[Magisk] vonDubenshire:
Confirming on Q beta no issues running this SQL module but I had to change device fingerprint to the Pie one

Was able to make a transaction today
[Magisk] MicrosoftBug:
I'm having some trouble installing 73Sydney's v1.7 module on my Ticwatch Pro via TWRP. Installing directly through Magisk isn't supported on Wear OS. I flashed his SQL 4.1 module first, which appears to be installed correctly in Magisk. I then reboot and flash the Gpay fix but it says it doesn't detect that SQL is installed, then hangs on clearing the caches. I've let it sit for hours at that point on the charger but it never gets fully installed. When I check Magisk, the module is there but it looks corrupted; there's no info provided and it's simply labeled "73sydney.gpay," which I know is incorrect because I had no issues installing it on my phone. I'd appreciate any possible assistance, thanks!
[Magisk] badaas:
Brilliant worked, just need to test in store.

Thanks again buddy!
[Magisk] jlee08517:
Does this script survive kernel updates?? Do I also need to uninstall before I install monthly updates? I'm on pixel 3xl.
[Magisk] ho0o0o11111:
Pixel 2 XL, custom rom, with 73sydney's method the Google Pay works again. Thanks!
[Magisk] Void_SPb:
Why not using triggers?

Hi!

Isn't this a solution?

CREATE TRIGGER trg_gpay_fix_update AFTER UPDATE ON main
BEGIN
UPDATE main SET c='0' WHERE a like '%attest%' AND c != '0';
END;

CREATE TRIGGER trg_gpay_fix_insert AFTER INSERT ON main
BEGIN
UPDATE main SET c='0' WHERE a like '%attest%' AND c != '0';

Tested with both UPDATE and INSERT, triggers work fine. GPay (broken since yesterday) allowed me to add card. Not tested the real payment yet though...
[Magisk] jcmm11:
https://xdaforums.com/apps/magisk/discussion-google-pay-magisk-discussion-t3906703/post79553660

There's discussion both before, and mostly after, that post as well.
[Magisk] Pierfranc:
I just want say thank you so much because I didn't have any payment method at moment abroad but only the phone and with this guide I had the possibility to pay with rooted smartphone...thank you so much
[Magisk] alershka:
There is an update to pay on the play store (17Jul2019). Anyone on Q update to this and see if it can still be fooled by changing the fingerprint?
[Magisk] jsauder2:
Works fine.
[Magisk] riahc3:
This isn't working for me. Adding the card gives me the same error message as always
[Magisk] chadhugo:
73sydney's method works for me ! Thanks
[Magisk] Player04:
There's an update for gpay? Should i update this?

Edit: i updated gpay and it still works.
[Magisk] RevoWution:
OP, you are the man. Your steps have worked a treat for me. Been unable to make purchases with Google Pay on my Pixel 3 XL for a fair few months now, and it's been driving me crazy...

I'm running Android 9.0 with the latest July security patch, rooted with Magisk v19.3 and on the stock kernel.

I'm finally able to activate contactless pay for my two credit cards (different banks) in the latest Google Pay app (v2.93.258479717). My Google Play Services is v17.7.85, if anybody's wondering.

I will have to see if I can successfully pay in-store tomorrow, but seeing as GPay finally communicated with my two banks to activate contactless pay, I don't see why not. Will post an update tomorrow. Thanks again!!
[Magisk] zencooler:
I just want to let you know that this method is still working after the latest updates of GMS and GPay. I have working cards and contactless payments on GMS ver. 18.3.81 and GPay v2.93.258479717. No problem at all. [emoji106]
[Magisk] vonDubenshire:
I don't think Google Pay has anything to do with the cards, it's all Google Play Services that verifies the card etc.

However, an update to GPay may make Google Play Services re-look at the card verification status without all of our changes above.
[Magisk] sash11:
It is weird how GPay works on my PH-1 with latest Magisk 19.3 and stock kernel on latest July patch for Pie even though I did not do any DB hacking and file permission changes. DB value is 10 and I still can add card to GPay. I just hide GPay, Google play services and Google services framework in Magisk manager. However for my Pixel 3a XL I had to do DB hacking and file permission change on top of everything else for GPay to work...
[Magisk] Valiante:
How did you figure this out, bless you
[Magisk] borntokill:
Galaxy s9 plus - rom pie Ambasadii 1.9 - magisk + edxposed, work perfectly for me.

S9 plus - Ambasadii rom (pie)
[Magisk] turilo:
This method still working also on Huawei devices?
[Magisk] jaggillararla:
Can u try and report back ? ?
[Magisk] nevoz:
Just tried this on ZTE Axon 7, LineageOS 15.1, and it didn't work. GPay still detecting root and hence blocking the addition of a card.

Tried both OP procedure and 73sydney procedure.

Magisk v19.3

GMS v18.3.81 (Magisk Hide enabled)

GPay v2.93.258479717 (Magisk Hide enabled)

Regardless, thanks for the hard work to the people that put these things together..!
[Magisk] zencooler:
Try to combine this method with the old one. I mean: firstly clear GMS cache and data + remove full GMS data folder + reinstall of GPay and then change permissions to dg.db database and then set up your cards from the beginning. I think it will work for you.
[Magisk] Afriel:
i have same problem on my MI 9 on xiaomi.eu :(
[Magisk] jilin.denis2011:
[/COLOR]

I did everything according to your instructions, but I am very confused that after the services of 14.7.99 I put 16.0.89, but in the folder /data/data/com.google.android.gms/databases/dg.db the attest files with numbers 14.7 .99, although the logic should have changed to 16.0.89 ... payment gpay does not work, although bank cards are now added without any problems. The second folder appears in the app_dg_cache folder after rebooting the phone or after checking safety net, or after adding a new map to gpay, although I set read only permissions. What else can be done to start working payment in gpay? Tell me please.
[Magisk] nevoz:
hi Zencooler, thanks for your suggestions, could you please help a bit more:

>> firstly clear GMS cache and data

how do I do this? GMS appears in Magisk, but not in the Settings -> Apps area of the phone where one can clear cache and data. Or do I manually do this somewhere via the file system?

>> remove full GMS data folder

I presume this is the /data/data/com.google.android.gms folder?

>> reinstall of GPay

There doesn't seem to be an uninstall option for GPay, just the ability to "Uninstall Updates" .. ?

Many Thanks..!