FORUMS

[GUIDE] Google Pay working SIMPLY with unlock/root on Pixel 4/XL [GUIDE]

4,780 posts
Thanks Meter: 8,137
 
By wrongway213, Retired Forum Moderator on 2nd November 2019, 06:25 PM
Post Reply Email Thread
Hey guys... I've seen various methods to get Google Pay working and simply put, none of them worked for me. All that I could find left was advanced stuff involving SQLite editors and that's just not for everyone. So I started trying other known working methods from different devices, and this is what I did to get it going without issue.

1. Open Magisk, Magisk Hide, and tick the check box next to Google Pay. Proceed normally through the following steps after doing so.
2. Force stop Google Pay, clear app data/storage.
3. Open a root file manager
4. Using root file manager, find /data/data/com.google.android.gms/databases directory
5. Select a file called db.dg and chmod the permissions to 440, save and make sure it in fact saves
6. Reboot and set up Google Pay.

This should get you set up in no time without a need for modules or advanced user techniques. Hope it helps!

Edit: People seem to really dislike this method for some reason, so just throwing out there it seems everyone else recommends the SQL editing. This method worked for me, but YMMV and everyone else hates it
The Following 4 Users Say Thank You to wrongway213 For This Useful Post: [ View ] Gift wrongway213 Ad-Free
2nd November 2019, 07:41 PM |#2  
Senior Member
Thanks Meter: 249
 
More
Quote:
Originally Posted by wrongway213

Hey guys... I've seen various methods to get Google Pay working and simply put, none of them worked for me. All that I could find left was advanced stuff involving SQLite editors and that's just not for everyone. So I started trying other known working methods from different devices, and this is what I did to get it going without issue.

Unlocked users start at Step 1 below. Rooted users - First open Magisk, Magisk Hide, and tick the check box next to Google Pay. Proceed normally through the following steps after doing so.
1. Force stop Google Pay, clear app data/storage.
2. Open a root file manager OR reboot to TWRP if you don't have one
3. Using root file manager OR TWRP file manager, find /data/data/com.google.android.gms/databases directory
4. Select a file called db.dg and chmod the permissions to 440, confirm if in TWRP, save and make sure it in fact saves if using a file manager.
5. Whether in TWRP or using a root file manager. reboot and set up Google Pay.

This should get you set up in no time without a need for modules or advanced user techniques. Hope it helps!

That will only work if the attestation values in the dg.db file haven't been changed to flag root/unlocked bootloader already.

If your values have already been changed, you will need to manually edit the dg.db file or use the Magisk modules from this post: https://forum.xda-developers.com/app...0/post79643248
2nd November 2019, 07:44 PM |#3  
wrongway213's Avatar
OP Retired Forum Moderator
Flag Canton, OH
Thanks Meter: 8,137
 
Donate to Me
More
Quote:
Originally Posted by ilal2ielli

That will only work if the attestation values in the dg.db file haven't been changed to flag root/unlocked bootloader already.

If your values have already been changed, you will need to manually edit the dg.db file or use the Magisk modules from this post: https://forum.xda-developers.com/app...0/post79643248

Yeah... I'm not sold on making those kinds of edits or loading modules that do so without a working TWRP for this device anywhere in sight. That's precisely why I posted this thread - a working solution that doesn't involve editing things at that level - even if it doesn't work for everyone, I think it'll be more comfortale for those apprehensive to make certain changes without recovery
2nd November 2019, 07:59 PM |#4  
Senior Member
Thanks Meter: 249
 
More
Quote:
Originally Posted by wrongway213

Yeah... I'm not sold on making those kinds of edits or loading modules that do so without a working TWRP for this device anywhere in sight. That's precisely why I posted this thread - a working solution that doesn't involve editing things at that level - even if it doesn't work for everyone, I think it'll be more comfortale for those apprehensive to make certain changes without recovery

Having TWRP or not changes nothing for anyone that makes a mistake with those edits or Magisk. Editing the dg.db and messing that up doesn't require TWRP to fix it and there's already a boot image with Magisk core only mode posted by Tulsdiver that will save you in case a Magisk module screws things up (the Google Pay fix module is working perfectly, BTW).

People probably shouldn't be messing with any of this until they understand everything that entails getting Google Pay working on a modified device. I'd argue that changing permissions of the dg.db file is just as difficult for anyone who doesn't understand what they're doing as it is going all the way and modifying the actual values in the dg.db file. It's all a slippery slope for the overzealous people anyway.
The Following User Says Thank You to ilal2ielli For This Useful Post: [ View ] Gift ilal2ielli Ad-Free
2nd November 2019, 08:17 PM |#5  
CyberpodS2's Avatar
Senior Member
Flag NE Pennsylvania Boonies
Thanks Meter: 1,228
 
More
Quote:
Originally Posted by wrongway213

Yeah... I'm not sold on making those kinds of edits or loading modules that do so without a working TWRP for this device anywhere in sight. That's precisely why I posted this thread - a working solution that doesn't involve editing things at that level - even if it doesn't work for everyone, I think it'll be more comfortale for those apprehensive to make certain changes without recovery

Grab the modified kernel in the themes area that forces modules to be deactivated. That way you can just temp boot it to fix your issues if it goes south on you. I've used it several times so far when needing around with different combos of mods, etc...

https://forum.xda-developers.com/pix...agisk-t3990557
2nd November 2019, 08:54 PM |#6  
ct_tec313's Avatar
Senior Member
Flag Detroit,MI
Thanks Meter: 251
 
More
While I appreciate your efforts this is a halfbaked hack and like the previous poster said it's will do nothing if those values have been tripped. I have always been a believer of figuring out things and going the long route that way you know why and how it was done it's very convenient for somebody else to do it and you just flash it but if you do it yourself you'll find out the intricacies of how Android and how rooting and modding works....
2nd November 2019, 09:24 PM |#7  
wrongway213's Avatar
OP Retired Forum Moderator
Flag Canton, OH
Thanks Meter: 8,137
 
Donate to Me
More
Quote:
Originally Posted by CyberpodS2

Grab the modified kernel in the themes area that forces modules to be deactivated. That way you can just temp boot it to fix your issues if it goes south on you. I've used it several times so far when needing around with different combos of mods, etc...

https://forum.xda-developers.com/pix...agisk-t3990557

That's kind of my reason for not wanting to use mods on this device yet - being tied to Fastboot at any given time isn't practical for me. Being unable to buy gas because my phone isn't set up isn't practical for me. My goal is to use my device just like I did when I had working TWRP on other devices without losing functionality OR having to rush to a PC for fastboot. Neither are practical solutions for me - making simple modifications that are easily overwritten gives me much less anxiety than messing with things at a deeper level.
2nd November 2019, 09:30 PM |#8  
Senior Member
Thanks Meter: 71
 
More
Quote:
Originally Posted by wrongway213

Yeah... I'm not sold on making those kinds of edits or loading modules that do so without a working TWRP for this device anywhere in sight. That's precisely why I posted this thread - a working solution that doesn't involve editing things at that level - even if it doesn't work for everyone, I think it'll be more comfortale for those apprehensive to make certain changes without recovery

No disrespect, it looks like you're active here and helpful, but I don't think editing some values some values in a SQL editor that is tested and proven in a thread that has 55+ pages is going to hurt anything.
2nd November 2019, 09:35 PM |#9  
wrongway213's Avatar
OP Retired Forum Moderator
Flag Canton, OH
Thanks Meter: 8,137
 
Donate to Me
More
Quote:
Originally Posted by vanydotk

No disrespect, it looks like you're active here and helpful, but I don't think editing some values some values in a SQL editor that is tested and proven in a thread that has 55+ pages is going to hurt anything.

I'm apprehensive because of what SQL changes under the hood typically mean. I know most people haven't built ROMs, built kernels, maintained for a ROM Team, done platform development, etc. etc . - I have done all those things. One thing I learned is that there are TWO scenarios that will ALWAYS necessitate a clean flash no matter what - SQL changes and Android version changes. Given we don't know as much as we typically do about the state of Coral without TWRP due to Android 10 changes makes me unwilling to assume things proven to work on other devices will work when we get an OTA on this one. Chmod perms will be overwritten but SQLite changes can cause things to go south in my experience - none of which relating to this module. It's about SQL vs chmod for me. I'm doing what I trust and understand until recovery exists to fix things without needing a PC. If no one else finds use for it, I'm OK with that. For my use case - it makes perfect sense.
The Following User Says Thank You to wrongway213 For This Useful Post: [ View ] Gift wrongway213 Ad-Free
2nd November 2019, 10:35 PM |#10  
Senior Member
Thanks Meter: 71
 
More
Fair enough, I figured you knew what you were talking about, everyone needs to make their own decisions. Nonetheless, thanks for contributing!
The Following User Says Thank You to vanydotk For This Useful Post: [ View ] Gift vanydotk Ad-Free
3rd November 2019, 01:27 AM |#11  
spaceman860's Avatar
Senior Member
Thanks Meter: 3,273
 
More
Here's a simple way to get gpay to work on stock with root after you hide gms and gpay with magisk.

1. Install Termux app and open the app
2. Type pkg install sqlite hit enter and let it install.
3. Type su hit enter
4. Copy and paste this then hit enter

am force-stop /data/data/com.google.android.apps.walletnfcrel && chmod 777 /data/data/com.google.android.gms/databases/dg.db && /data/data/com.termux/files/usr/bin/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

5. Reboot
The Following 18 Users Say Thank You to spaceman860 For This Useful Post: [ View ] Gift spaceman860 Ad-Free
Post Reply Subscribe to Thread

Tags
google pay, gpay, pay, wallet

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

Advanced Search
Display Modes