Working: Magisk with Google Pay as of gms 17.1.22 on Pie

252 posts
Thanks Meter: 404
By BostonDan, Senior Member on 14th May 2019, 05:50 AM
Post Reply Email Thread
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 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

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/

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 database editor I used)

7) open the terminal emulator.

8) get root access (su)

9) cd /data/data/

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

11) reboot

I have Magisk 19.1 with GMS and Google Pay hidden. Also, I am using a custom kernel but others have reported using a stock kernel with this working.

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: people should know this by now, but GMS updates have not required any reapplication of this process.

The Following 232 Users Say Thank You to BostonDan For This Useful Post: [ View ] Gift BostonDan Ad-Free
14th May 2019, 06:54 AM |#2  
HamsterHam's Avatar
Senior Member
Thanks Meter: 534
Added my card just now. Didn't hide Google Pay etc in Magisk apart from the default GMS one.

I'll test it out later and see if I can pay

Nice one 👍🏽👍🏽👍🏽
The Following User Says Thank You to HamsterHam For This Useful Post: [ View ] Gift HamsterHam Ad-Free
14th May 2019, 07:24 AM |#3  
Thanks Meter: 19
Thank you! I don't have to freeze Play Store anymore! 😄
14th May 2019, 01:51 PM |#4  
maverickzz's Avatar
Thanks Meter: 1
This worked like a charm.. THANK YOU.
I was about to give up & go back to stock ROM from frustration.

Maybe a small Tasker App can automate all of this? beyond my capabilities to do the DB edits in tasker/shell, but I already did an app to force stop GPay, chmod 660 the DB, launch SQL editor, and once closed, chmod 440 the DB again....
Which automates all your steps except the DB edit itself..
14th May 2019, 02:21 PM |#5  
Junior Member
Thanks Meter: 4
Thank you, it works!
14th May 2019, 02:27 PM |#6  
sliding_billy's Avatar
Senior Member
Flag North Texas
Thanks Meter: 569
Outstanding work! Added a card and PayPal on a recently clean flashed P3XL and a P3 that had been used in the past with GPay. Now just need to try both phones at the store.
14th May 2019, 03:25 PM |#7  
mando41's Avatar
Senior Member
Thanks Meter: 28
@BostonDan. It works just paid using your method. Thanks
14th May 2019, 05:23 PM |#8  
Senior Member
Thanks Meter: 337
This does indeed work, but it also prevents fit data from being updated, just an FYI.
The Following User Says Thank You to joeyddr For This Useful Post: [ View ] Gift joeyddr Ad-Free
14th May 2019, 06:34 PM |#9  
Thanks Meter: 54
Donate to Me
Will you mind if I add a way to automate the whole process to my GMS Toolbox app?
The Following 15 Users Say Thank You to Freshek For This Useful Post: [ View ] Gift Freshek Ad-Free
14th May 2019, 06:42 PM |#10  
OP Senior Member
Flag Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
Thanks Meter: 404
Originally Posted by Freshek

Will you mind if I add a way to automate the whole process to my GMS Toolbox app?


I have no issues if you want to incorporate this into gms toolbox and appreciate you asking me.

I also appreciate your gms toolbox app as well. Thank you for your development.

The Following 9 Users Say Thank You to BostonDan For This Useful Post: [ View ] Gift BostonDan Ad-Free
14th May 2019, 07:38 PM |#11  
thx84's Avatar
Senior Member
Thanks Meter: 74
Does your method work with the 2.88 Google Pay update?
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes