yashsingh1/xdaforums huggingface dataset:
[Magisk] simplepinoi177:
Yeah.... I'm thinking that if one card works...then it's doubtful it's Google Pay and/or root/unlocked-bootloader detection...

because if it was, indeed, root or unlocked-bootloader detection, it would deny/decline ALL the cards -- as it was when I first got my Pixel 2 and couldn't even launch GPay because it detected; and it took having a custom kernel to resolve...

I know that, because I was constantly restoring my phone because I had lost root with replacement/refurbished devices, that my bank’s “fraud” unit/detection freaked out and caused all sorts of weird issues with Google Pay on my device…

Basically, long story -> short, the app freaking out at a certain card doesn’t definitely mean that it’s the app/GPay. I’m willing to bet – especially considering because it was my personal experience – that were you to call the bank, they’d find either in their system or policy that, for whatever reason (security or otherwise), it’s on their end that the app and the card (that specific card) isn’t working….

In the end, regardless of whether one is sure it’s the app or not, it’s worth directly speaking with the bank of the card as much – if not more – than anything…
[Magisk] NFSP G35:
Just wanted to report that the OP method worked great for me... I was also happy it could be done on the phone without getting a laptop involved, so I could do it while waiting in a long line ?
[Magisk] finesse:
About to upgrade to android 10, on the pixel 3 xl. Currently gpay + magisx works great, thanks to this module.

Anyone experienced any difficulties running rooted Android 10& gpay with this module fix? I heard there is a finger print reader issue?

Thanks
[Magisk] simplepinoi177:
Yeah...I upgraded to 10, October patch, rooted Magisk v20 and was able to get Google Pay to work at Target!

I went and removed my fingerprints and screenlock just in case, but then had to go through the trouble of re-adding and verifying the cards...but it still was able to work! Also, I had done the SQL fix (manually) and the other steps in the OP, and it seemed to have survived the upgrade -- which kinda, but pleasantly, surprised me.

Although I wasn't able to get Google Pay working with my Fossil Explorist HR Gen 4....but that could easily have been an issue with the smartwatch more than anything....

*added note: I was able to successfully add cards on the app for the watch, fwiw...
[Magisk] finesse:
Thanks for your reply.
[Magisk] Edemilorhea:
sorry I am use android 10 now

in step 10. I type chmod 440 dg.db

but it isn't worked I got error massage

it feedback chmod "dg.db" to 100440: operation not permitted

somebody can tell me why?
[Magisk] jcmm11:
Did you remember to do step 8? (Get root access, su)
[Magisk] Edemilorhea:
Yeah my phone have root
[Magisk] sliding_billy:
Did you reboot and change directories Can you try changing the permission to 440 in Root Explorer or Solid Explorer? You can also make the change in a root shell if you are like me and like to click the wrong visual keys on the Pixel. I am quite sure it works on 10. Also, by get root access that does not mean get your phone rooted. Did you type su in your terminal and get notification that it as granted superuser privileges (including granting if you never had)? P.S. What terminal emulator are you using?
[Magisk] simplepinoi177:
I believe what [MENTION=3730810]Badger50[/MENTION] meant was that, although you may have root on your phone and have root access, it still is necessary and important to run the command "su" first and foremost; without it, the terminal has root access but the commands do not and will not execute without that "su" elevated permission/exception.

If you are having issues with the terminal, you can always use (instead) a root file explorer and manually change the permissions on the dg.db file. I remember seeing it talked about a couple of posts back, so I’ll update and edit after posting this thread pointing to it…

UPDATE: you can find it

HERE

on post #538 and

HERE

on post #541

Hopefully these will help you out…! Good luck!
[Magisk] QkiZMR:
Thx guys for this thread and your input. I have Moto Z3 Play, rooted with Magisk, EdXposed enabled and other stuff. This tutorial make adding my card to gpay possible ? Is there any way to detect if Google Services was updated?
[Magisk] decibel_nv:
I can confirm that this worked for an unlocked Pixel 3 (from Google, not Verizon) with a fresh flash/installs of these:

Android 10 (blueline-qp1a.191005.007)

MagiskManager-v7.3.5.apk, which installs Magisk v20.0 Stable.

Google Pay 2.99.274616458 (installed from Play Store 2019-10-24)

I did not need to Magisk Hide Google Pay and Google Play services.

Before doing the OP's steps, I got blocked by an error message that my phone is rooted when I tried to activate (enter CVC for) an existing card in my GPay account. After doing this I could complete the process including a text back from the two different banks with verification codes. I haven't tried buying anything yet, though. With my Android Pie install and Magisk combo before this update, being able to add a card meant that it would also work for payment at a store. ;)

Update 2019-10-25: I successfully bought a screen protector at Verizon using Google Pay on this rooted Pixel 3.
[Magisk] niko26:
Worked fine for me on my Pixel XL 4, Magisk 20000,
[Magisk] imaverik:
Works great

Yep, Confirmed working.
[Magisk] mhrussell1:
Confirmed Play store update of GP to 2.100 did not break the workaround and did not have to re-do any steps. Seamless!
[Magisk] Ch3vr0n:
New to this and all values changed. Was able to add card but apparently bank isn't supported yet itself / doesn't participate yet. Any idea when / how i'll know to do this?
[Magisk] Terrigible:
Ask your bank
[Magisk] Ch3vr0n:
No, I don't have to. You're misreading the post and missing the quote which is what the 'why I'll be able to do this' is for.

My bank doesn't know when a GMS update triggers and I'll need to redo this. THAT'S what I'm asking
[Magisk] vMAC:
Awesome worked on my Pixel 4XL
[Magisk] ilal2ielli:
I've been using this method since my BostonDan figured it out and the dg.db has been locked to 440 since. Any update that came across didn't prevent Google Pay from working.

I applied this to my Pixel 4 XL a few days ago and used Google Pay (2.1) at Target today with no issues. So unless Google overhauls the values in the dg.db or uses another method to store the attestation values, this method should work for quite a while.
[Magisk] Ch3vr0n:
Changing the values doesn't prevent play store itself or play services from updating? (Settings - about - Android version - google play system update etc...)?

If so, then I hope my bank adds support soon, they're not even in 'contract' with them or something. Ah well. At least I'm ready then in case they are.

At least they implemented contactless pay through their app and the API. I'll use that in the mean time.
[Magisk] ilal2ielli:
Not that I'm aware of. My Play Services on my Pixel 4 XL and my Pixel 2 XL (HavocOS 2.9) both are version 19.4.20.

Play Store on my Pixel 4 XL is 17.2.13, but on my Pixel 2 XL, it's 17.0.12 and says it's up-to-date when clicking on the version number in the Play Store. Don't know why that doesn't match up though.
[Magisk] likepeas:
Is there a way to reset the dg.db file? I accidentally edited the wrong value. Entered a 0 on the device key instead.
[Magisk] MC_Ohr:
Delete file and reboot device

Gesendet von meinem HTC U11 life mit Tapatalk
[Magisk] bnwg:
In fact I didn't edit anything in dg.db (lots of 10 in the file) and use it as is. What I did is to chmod 440 to it and make all necessary hide from Magisk manager before firing GPay for setup and that's it.

It works flawless until now even with the latwst update on GPay recently.
[Magisk] Ch3vr0n:
That's good to know
[Magisk] dthabet:
I'm getting random Google Play services errors after applying Magisk module. Doesn't seem to affect anything. I just dismiss the notification and go about my way. Any thoughts of why this is happening and what I might have done wrong? GPay works perfectly though.
[Magisk] nmkd:
Hmmm, this doesn't seem to work on Pie (AOSPExtended) with Magisk 20 and GMS 19.5.30.

Neither the Magisk module nor the manual process.
[Magisk] yyz71:
Thanks it worked pixel 4. Just bought some cigars and it went through :good:
[Magisk] exovision:
Any one have an updated walkthrough for this on Android 10 Pixe 2 XL?
[Magisk] ilal2ielli:
Considering the steps are exactly the same, no.
[Magisk] PePeMoke:
deleted
[Magisk] Jakob1379:
Seems to work in VISA, but for some reason I can't activate MasterCard for in-store payments o.O
[Magisk] Terrigible:
Might just be your bank, not Mastercard.
[Magisk] Jakob1379:
Shouldn't be. Pay reports it is due to phone being rooted
[Magisk] Terrigible:
Could you see what happens if you re-add your Mastercard?
[Magisk] Jakob1379:
The same. I get to add the card. The screen with terms and conditions gets ticked and all and card is added for online use, only as it can't be activated for in-store usage.
[Magisk] Terrigible:
Oops. I meant Visa
[Magisk] Jakob1379:
Interesting! Can't be activated in store either :/
[Magisk] Jakob1379:
Apperently it worked again after a reboot. Haven't tried buying anything yet
[Magisk] Jackuzi91:
That works like a charm,

mi8 and LOS 16, latest GPay
[Magisk] dipstik:
anyone on pixel 3xl november? canary magisk or stable?
[Magisk] Ch3vr0n:
Yup, bit not canary. Something changed. Can't add a card. Kept dg.db as 440 chmod, during ota install. Just checked file, contains only 1 field atm, 'locale' being 'enUS', that's probably the cause.

Thought, that was it. Replaced it with my backup of dg.db edited the entries, closed gpay, card added just fine. Just can't use it because bank isn't supported [emoji28]

*Edit* tried adding a 2nd card, wouldn't work. Maybe it's because the build version of the device doesn't match the build version everywhere in dg.db

A more experienced user will need to step up here.
[Magisk] Jakob1379:
Did you change the values in the database or did you ignore this step?
[Magisk] Bluffer94:
This is not working for me anymore.

I updated my Pixel 4 to Nov Patch. Did everything like op (which worked before on Oct Patch).

Google Pay states that Device is rooted when trying to add a card (tried various) No attest values in dg.db.

I'm using stable magisk 20.1 and safty net passes.

Anyone else?
[Magisk] Jackuzi91:
No, only permission change with total commander to 440, as per comment.
[Magisk] Ch3vr0n:
Same for me on P3XL, can't add card (not that i can use my CC's with it anyway, bank not yet supported)
[Magisk] rspkt:
This worked for me on my Pixel 3 XL. Thank you!
[Magisk] haoyangw:
Just to share, full edition worked perfectly on my Google Pixel 4 XL running Android 10 rooted with Magisk v20.1. Magisk Hide enabled but only for Google Play Services(which is the default). Didn't turn on Magisk Hide for Google Pay, but could already add a card in Google Pay. Haven't tried paying at a terminal yet, but I believe it will work :) Gonna update again when I get to try it
[Magisk] prgopala:
I managed to get this working only by running magisk in 'core only mode' on a Pixel 4 (latest November update). I could add a card which could not be added earlier. Also i haven't tried paying using the phone yet so will have to wait for my next purchase.

It also means i cannot run any module.

---------- Post added at 02:38 PM ---------- Previous post was at 02:35 PM ----------

Sorry, but full edition of what? You mean stable magisk is it?

Would you mind putting down a step by step method ?
[Magisk] haoyangw:
Oh I meant that I installed the variant of the Magisk Module(quoted in my post above) called 'Full Edition'. All I did was install that module, install the SQlite for Arm64 Magisk module, and reboot. Then Google Pay allowed me to add a card even in non-core only mode. I'm on the latest November update as well.
[Magisk] vonDubenshire:
Hide all Google play services you'll be good
[Magisk] dipstik:
november?
[Magisk] rspkt:
Yeah. Just followed the above steps after installing the November update and rerooting. No issues after that.
[Magisk] prgopala:
Thanks.

I figured out that xposed was causing the issue and once i hide xposed installer app(edxposed) in magisk hide google pay worked fine.

So if people are still having issues then try hiding xposed as well.

Edit: So adding card worked and is still working fine (added another card). But could only pay once and the next time i tried to tap for a payment got error that the phone cannot be used to make payments. So something is definitely being detected outside of this 'dg.db' file thing.
[Magisk] Ch3vr0n:
I'm not using ANY module outside of magisk' systemless hosts, no Xposed or anything like that at all. Guess I'll try to steps again
[Magisk] dipstik:
i was able to add my card after this:

Hide Google pay, Google play services, Google services framework,

clear Google pay data after update

and apply module.

pixel 3 xl november
[Magisk] schmellic:
OMG! Been trying to fix Google pay for ages on my Samsung A70 running Lineage 16. This works thankyou so much for this script! Magisk need to get this in their repo so easy.

I also had to change build fingerprint as I was failing safteynet profile check which I did a while ago but would still not add cards to Google pay.

Installed "full" version of the script and BOOM everything works

Original post can be found here https://xdaforums.com/showpost.php?p=79643248&postcount=176
[Magisk] Kohba:
I don't have /com.google.android.gms. What should I do with it? Thank you.
[Magisk] sliding_billy:
That's because it is /data/data/com.google.android.gms. What you do with it is explained in the OP.
[Magisk] Kohba:
Thank you. I don't have it there.
[Magisk] qman66:
Randomly root got detected today by Google. Tried op again didn't work then tried the full version module 1.7 and that didn't work either
[Magisk] simplepinoi177:
Would you be able to put up a screenshot...? It might help things...
[Magisk] Kohba:
I've done a complete reinstall and it works. I do not know what went wrong. Thanks.
[Magisk] nolajohnny:
Works perfectly on my OP6T, big thank you to anybody who put time and effort into this, much appreciated
[Magisk] pittrich67:
Work's flawlessly on my Mi Mix 3. Thank you.

Gesendet von meinem MIX 3 mit Tapatalk
[Magisk] onken:
Hello

I have gms 19.5.3 and Samsung A70 stock firmware.

I think not can ( not know who ? ) downgrade to 17....

I can run root and Google pay ?

Please info... Help :)
[Magisk] grimez:
Thank you!
[Magisk] 73sydney:
Magisk Method Gpay SQLite Fix.....

Changelog:

v1.9 12/11/2019

Added another sqlite binary path - for sqlite provided by Titanium Backup

Thanks to adpoliak who put in a pull request, which like all other github notifications recently, i didnt get...

Sorry it took me so long to reply to the issue :)

This only affects new installs for those who use Titanium Backup and want to try the module without installing a separate sqlite3 binary....

Path: /data/data/com.keramidas.TitaniumBackup/files/sqlite3

install.sh:

Added titanium backup sqlite path in sqlite binary test

gpay.sh:

Added titanium backup sqlite path in sqlite binary test

In both tests in scripts install.sh & gpay.sh, output to console or log will now prefix the detected sqlite path with the vendor in brackets - either [termux] [titanium] or [standard]

For those looking for it, the Gpay Fix Magisk Module is in my sig below, or here .
[Magisk] mhrussell1:
Any word on if the GPay update to 2.101 breaks this fix?
[Magisk] xunholyx:
It doesn't. I just payed for some beer with the newest version
[Magisk] pittrich67:
Can you share a correct file. On GitHub the file is rar and corrupt.

Gesendet von meinem MIX 3 mit Tapatalk
[Magisk] jaggillararla:
Why isint this on the repo ??
[Magisk] xunholyx:
It got rejected for some reason. I don't understand why.

The next time I am in contact with topjohnwu I'll ask him why though. I've been meaning to ask, but forgot the last time I had a chance to.
[Magisk] 73sydney:
Fixed, sorry my bad

You're working late at night across about 3 different projects and languages (and also adminning/updating 10 locations full of Unifi Wifi) and when it comes time to create a new archive, you forget to toggle compression type from rar to zip in WinRAR, and the world goes to sh!zz :)

All fixied now, sorry folks

---------- Post added at 06:12 AM ---------- Previous post was at 06:06 AM ----------

Gentlemen....

Why its not in the repo has been covered a few times, in a very brief manner. I did submit it, but encountered a few "personalities" involved in the approval process who were not, lets just say, nice, and i was told amongst other things "it didnt do enough" to warrant inclusion....

I have always pointed out, and will point out here again, that [MENTION=4667597]Didgeridoohan[/MENTION] was not one of the "personalities" i encountered, and he in fact helped contribute to some of the better parts of the module....he couldnt have been more helpful and diametrically opposed to those few others....

Theres only so much ass clownery ill put up with, so i decided not to pursue adding it any further.
[Magisk] ai024:
I've got a GPay update yesterday (2.101.277730300) and this fix has stopped working... It seems someone from Google is watching this thread closely :(

UPD: Nevermind, it was Riru/edXposed module who failed SafetyNet checks. After disabling them everything is fine!

And thanks for your awesome work, you're literally a lifesaver! :good:
[Magisk] Snuuuuupy:
I forgot to check my safetynet status as well and was wondering why this wasn't working. Was about to give up and saw your post!

https://github.com/ElderDrivers/EdXposed/issues/386#issuecomment-550134512 check this thread for the fix
[Magisk] ai024:
Unfortunately fix doesn't work for me :(

Well, I can wait til edXposed will fix it :)
[Magisk] Snuuuuupy:
You should post the steps you took.

I followed the instructions and blacklisted google play services, google play, and the other one via edxposed manager, rechecked safetynet via magisk, and it appeared green.
[Magisk] ai024:
I followed the instructions thoroughly with no success. Blacklisted more of Google stuff - still not working. I have a patched EdXposed though (to work with GravityBox), maybe that's the problem.
[Magisk] Snuuuuupy:
Ah I don't have patched edxposed. Are you on android 10? That might be why - I'm still on 9.
[Magisk] robbyoconnor:
I didn't actually have to modify it but making it chmod'ing 440 did it for me.

---------- Post added at 02:27 AM ---------- Previous post was at 01:29 AM ----------

Mind sharing this?
[Magisk] Cancambo:
This isn't a Tasker profile, but this Magisk Module has been posted in this thread before.
[Magisk] robbyoconnor:
I did the change by hand and it works...
[Magisk] sadiku:
The workaround just hit and miss, not 100% fix the problem.
[Magisk] 73sydney:
Hehe every time i see a post "i did it by hand" a small part of me dies :)
[Magisk] Cancambo:
I posted this in the GitHub thread earlier today (as well as just a few posts above this one). It's still working for me hours later. I initially used this module to get Netflix back into the Play Store. When I was using the 1.7 version of the module I was having a lot of problems with SafetyNet sometimes passing and sometimes failing (which de-certified my device and removed Netflix). I figured I'd see if the 1.7 version of the module wasn't working as intended anymore, so I updated to 1.9.

I haven't failed SafetyNet yet today, I re-certified my device, and got Netflix back. GPay never stopped working for me, but I hadn't tried it in a store yet.

EDIT: Btw, didn't notice 73sydney posted right above me. It's his module. Thanks for the module. Everyone has been focusing on GPay, but it keeps solving all my SafetyNet problems.
[Magisk] 73sydney:
Most of the credit goes to [MENTION=2449699]BostonDan[/MENTION] for the method and OP, and to [MENTION=4667597]Didgeridoohan[/MENTION] for the magisk hide stuff, i just packaged it into a module....
[Magisk] aagha:
Can you please provide instructions on _how_ to install?

I've downloaded the .zip files for SQLite and GPay.SQLite.Fix.v.1.9, but now what?

EDIT: I just realized both of these should be added as modules in Magisk. Sorry.

EDIT2:

[MENTION=9317193]73sydney[/MENTION]

I flashed both modules successfully and rebooted. Before launching Pay, I stopped the app, cleared cache and then storage--just to be safe.

Launched Google Pay, and it recognized an existing card. Entered the code on the back of the card and got:

Request Failed

Your transaction cannot be completed. Learn More (link). [OR-TABSH-08]

Then an OK button

The Learn More link points to: https://support.google.com/pay/answer/7644087?hl=en

Is there any logs or output I can help provide to make debugging this a possibility?
[Magisk] 73sydney:
No, youre right to ask, ill update my post so its clearer...

Install an SQLite binary

Reboot if the SQLite you've just added is supplied by a magisk module (via magisk manager), so its active, as its required for GPay SQLite Fix install script

Install Gpay SQLite Fix magisk module via magisk manager

At end of GPay SQLite Fix magisk module install, exit magisk manager

Add card to Google Pay

Reboot for gpay.sh service script to do its thing

---------- Post added at 08:57 AM ---------- Previous post was at 08:25 AM ----------

Ive updated the instructions (see above, or original post), so try uninstalling the Gpay SQLite Fix module and try installing again, exactly as described, do not get creative and try doing things outside of the steps, like clearing anything, anything that needs doing is done via the script, thats why i wrote it and wrote it the way i did...only do those steps youve done, clearing etc, if youre doing the entire process manually, and NOT using my module...

If it still doesnt work, then look for /cache/payfixfirstrun.log and post it to me via PM
[Magisk] ThomaSEK:
Is it possible to revert the changes made "by hand" and install the Gpay SQLite Fix afterwards?

Since Safetynet is tripped by EdXposed now and the module seems to be helpful in this case (like mentioned here) I want to give it a try. But I still do not understand what differs the module from the "by hand"-method so that it solves the Safetynet problem :confused:
[Magisk] SmilingPerson:
On several devices, my only concern regarding hiding root has been Netflix., and there is an easy fix that has been solid for a long time now, the Magisk module liboemcrypto-disabler. I don't use Google Pay and my devices fail SafetyNet, but Netflix doesn't seem to notice.

https://xdaforums.com/apps/magisk/magisk-liboemcrypto-disabler-drm-t3794393

This probably won't be much help to people needing to pass SafetyNet checks for financial apps, and I have no idea what it might do for things like Pokémon, but if you have rooted Android media boxes, it is a pretty good fix.

And this is completely off-topic, but the various threads here and on Github are reminding me of scrambling around trying to find fixes for the latest ECM in the old satellite TV Hacking scene. "SLE44E is down, is PGM releasing a patch?!" lol
[Magisk] robbyoconnor:
Yeah, this didn't last. You will randomly fail SafetyNet...They're even not passing ctsprofile!
[Magisk] ButtonBoy:
Not working on Android 10

I just updated to A-10 (factory full image, plus TWRP +Magisk 20.1 + Magisk Manager 7.4.0)

I did the SQLite + script thing and the dg.db looks good now.

However, my phone fails SafetyNet checks and refuses to add a new card to Google Pay, saying I'm rooted.

How can I tell what version of GMS I have? How can I debug this?
[Magisk] kevinwu128:
Tried Script and following OPs instructions.

"Couldn't finish Setup pay in shops - this phone can't be used to pay in shops. This may be because it is rooted or altered in some other ways"

using S10 - With Magisk 20.2-b29f0ca4...

any ideas?

I just realised my safety net is failing. How do I restore the original dg.db :(
[Magisk] simplepinoi177:
It's probably been said before, but can't be said enough....THANK YOU FOR THIS AND ALL YOU (CONTINUE TO) DO!
[Magisk] 73sydney:
What, youre thanking me for largely cleaning up my mistakes/oversights ? :) :)

Youre welcome :)