yashsingh1/xdaforums huggingface dataset:
[Magisk] kevin.chiha:
Before trying this fix, google pay wouldn't let me add any cards. I tried this fix with the same steps and I could successfully add cards to Google pay. However, when paying at a shop, the terminal would give an error and payment doesn't go through. Tried it many times. Anyone know why?

Gms toolbox says attestation failed (why??)

Google play says device is not certified

Safetynet passes and SELinux is permissive

Running lineage os 17
[Magisk] Snuuuuupy:
Newest Google Pay allows you to check if your device's software appears modified without clearing cache and resetting everything! :)
[Magisk] asiful5130:
This method worked for me guys. Thanks to BostonDan and 73sydney. Good luck...

1) Download a SQL Database Editor. I used

https://play.google.com/store/apps/d...ditor&hl=en_US

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/com.google.android.gms/databases

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) Type: (su) and get root access

9) Type: cd /data/data/com.google.android.gms/databases

10) Install an SQLite binary via Magisk Manager Downloads

11) Reboot if the SQLite you've just added is supplied by a Magisk Module (via Magisk Manager), so it's active, as it's required for GPay SQLite Fix install script

12) Install GPay SQLite Fix v1.9 Magisk module via Magisk Manager. Link: https://github.com/stylemessiah/GPay-SQLite-Fix/releases/tag/v1.9

13) Reboot

14) Open Google Pay

15) Add Card to Google Pay

16) Cheers!!!
[Magisk] theCroh:
Were you able to actually pay using NFC?
[Magisk] asiful5130:
Yes; it did work with NFC perfectly.
[Magisk] sadiku:
Why you need so many step? I would assume only step 12 is good enough to make Gplay work.
[Magisk] 73sydney:
Meh, another issue.....my fault

Magisk Method Gpay SQLite Fix.....

Changelog:

SQLite binary for arm-v7:

18/11/2019

install.sh:

Changed:

set_perm_recursive $MODPATH 0 0 0755 0755

Oversight meant permissions for the sqlite3 binary were not being set properly after i changed the module install logic over, my bad

So, those who have bothered to have had GPay issues (or have bothered to open the /cache/payfixfirstrun.log and find SQLite3 command FAILED) and use the SQLite3 arm-v7 binary from me, please use the new zip next time.

Its always easiest to get this fix working on a fresh flash, but if you want to try fixing the issue without a new flash, you can try this:

1) Uninstall the SQLite3 binary & Gpay SQLite Fix

2) Clear the cache and storage on Google Pay

3) Reboot

4) Install the new SQLite3 binary

5) Reboot

6) Install the Gpay SQLite Fix

7) Add card to Google Pay

8) Reboot

Actually all thats needed is (using original number, just to show how bonkers people are making it)

10) Install an SQLite binary via Magisk Manager Downloads

11) Reboot if the SQLite you've just added is supplied by a Magisk Module (via Magisk Manager), so it's active, as it's required for GPay SQLite Fix install script

12) Install GPay SQLite Fix v1.9 Magisk module via Magisk Manager. Link: https://github.com/stylemessiah/GPay...eases/tag/v1.9

15) Add Card to Google Pay

13) Reboot

I dunno why people continue to make it difficult, ive listed the steps a few times, and updated my OP to make it easier...
[Magisk] swour:
Where would one find this information, and which version are you referring to? Couldn't find anything in the latest: 2.101.
[Magisk] naveen_reloaded:
I am still getting Google pay cant be used on this device when i try to add card on the first run , i did magiskhide and everything.

"Sorry your device isnt passing Google Pays security checks...."

Magisk - safetynet check fails , any help on device where safetynet is not pass ?

Update :

After reading through other threads , i found that safetynet will fail is xposed is installed and active.

Had to deactivate xposed and run the check again , now it passed and Gpay security was also bypassed.

Thanks.
[Magisk] theCroh:
By fresh flash do you mean clean installed phone or something else?
[Magisk] sadiku:
Yes, follow step 10,11,12 is able to make Gpay work on my pixel2 since day1(Gpay SQLite Fix availabled).
[Magisk] Snuuuuupy:
v2.101.277730300

https://imgur.com/a/dgrzk09
[Magisk] 73sydney:
Clean/Fresh Flash = newly flashed ROM (and G-Apps if using custom ROM)...

Its far easier if using clean/freshly flashed device

What i consider a clean flash, and what i do before flashing new ROM's (i test a bunch for the Note 4), is linked in my sig...."How to properly clean install any ROM"
[Magisk] kevinwu128:
Just wanted to update, It was edxposed for me that was failing safetynet.

EdXposed SafetyNet Bypass

For EdXposed Installer

1. Enable Black/White list in EdXp Settings

2. Blacklist Google Play Services in Black/White list

3. Reboot

4. Check SafetyNet status in Magisk Manager

For EdXposed Manager

1. Enable App List Mode in Settings

2. Blacklist Google Play Services in Application List

3. Reboot

4. Check SafetyNet status in Magisk Manager
[Magisk] Ce Doresti:
i dont know how, but gpay work on my note 9 if safetynet bypass its false, and old version edxposed work, i see old module from edxposed work on note 9, and new module dont work. so confuz... but its best topic :)
[Magisk] mistryous:
Thank you, worked for me Pay v. 2.101.2777. . . Play services v. 19.6.29
[Magisk] Salty31:
does this method work with Samsung pay with tripped knox ??
[Magisk] Terrigible:
Samsung Pay can never work with a tripped Knox
[Magisk] Cindysmith0994:
This works great for Gpay, but it breaks Android Auto. Anyway to fix that?
[Magisk] billyx1:
I have perhaps found a more clean solution by combining knowledge form different threads:

- First hide Magisk for the process com.android.traceur (Credits to DerSeppel at https://www.android-hilfe.de/forum/...-erkennt-root-trotz-magisk.901517-page-5.html)

- Then set the values in the database to 0.

Now the value stays at 0 without changing the access rights.
[Magisk] bnwg:
Want to clarify for this solution

- no need to hide Google Pay from MagiskHide?

- no need to chmod 440 to dg.db?

Thanks

Edit: can't find com.android.traceur
[Magisk] fvc2000:
I'm coming from fresh instal from brand new Pixel 4, just rooted with Magisk. Used your guide, but can't add card. I get error message saying I should check my card details. Tried with 3 different banks, same error. I get the first screen with the User Agreement form from the bank, but as I hit accept, it gives this error when validating the card.
[Magisk] 73sydney:
You might want to use translate on that page and then actually read on, where almost every post says it fails to work, some dont even have that package (System Tracing)

Not a universal fix, sorry to tell you, and theyre all talking about one particular bank app....

---------- Post added at 11:21 AM ---------- Previous post was at 11:17 AM ----------

Just like the last person to ask me about Android 10 (Q), i dont have an Android 10 device (Q), so i cant help you. As i've said i build and test on Pie.

Also as with the last person who asked about Android 10 (Q), and this is universal, try reading the last 5-10 pages of any thread, or use search, when you have an issue :)

If someone comes up with a definitive Android 10 (Q) procedure, there seems to be a few, ill add it to my OP...
[Magisk] fvc2000:
There seems to be something specific for the November update on android 10.

For me the problem is not only NFC with google pay. Is google pay as a whole. It doesn't work to pay through apps also.
[Magisk] 73sydney:
Bugger, maybe it is a new issue only with 10. Sorry i cant really cant help with this

Never had an issue with GPay updates on Pie....luckily

Im prolly a few months off having a 10 build for the Note 4, no pressure Note 4 devs :)
[Magisk] fvc2000:
Thanks for the help anyway...

I'll post my SS if helps seeing the message I'm getting with normal Google Pay in app payments also... Seems nobody is talking about this...
[Magisk] Ce Doresti:
me to, on note 9 i use dr.ketan pie15 android 9, the bank don`t work. one time work, but i don`t know how, the rom have a big problem with titanium backup. im happy gpay work :)
[Magisk] simplepinoi177:
Like [MENTION=2897779]sydney73[/MENTION] had previously stated and going through the last 5-10 pages (i'm not saying that you haven't though, since you state "nobody is talking about this..."; so apparently you have), a lot of people are having issues with GPay "as a whole" when not passing SafetyNet completely and/or usually because they have Xposed or EdXposed (because there's actually no official support for Xposed on Android 10 [or 9/Pie for that matter]) and that’s wrecking either/both SafetyNet & Gpay.

I’m unsure whether you’ve mentioned it before or not – as I’m not really willing to go through your whole history at 8AM on a Sunday morning ;-P – so I’d like to inquire, and even request you repeat, whether you are having this kind of issue or not and/or if you have addressed it from this angle.

*side-note: I thought you said “S5” instead of “SS (NATO phonetic “Sierra Sierra”)”, as in my very ancient old phone Samsung Galaxy S5! I was starting to say “…Granted, the S5 being an ancient phone, might want to look into the other root method than Magisk on that device as GPay is having a lot of issues with Magisk and SafetyNet and for something like that very old device, Magisk was/is not the original method for root….” LOL :silly:

In any case, hope this makes sense and helps….
[Magisk] fvc2000:
Thanks for the reply.

First, not I'm not using xposed and I'm not failing SafetyNet

Only have fresh installation of stock November update of Android 10 for Pixel 4, magisk root, through the app, using boot made through the app.

As matter of fact, my Google Pay app doesn't tell me I'm rooted. The first time I tried it did. But then I redid the whole process and stopped saying. And than to be sure I reflashed stock room, locked and unlocked devices, unrooted again with magisk, login in Google, installed but not opened Pay, did the whole process with reboots, manage to get to Google Pay and add cards. But they all fail at validation. All of them give a different error. Either contact bank, or check card details.

But no rooted message.

The strange new thing that I said nobody is talking about is that as consequence of this, I can't use autofill on my cards inside chrome or other apps. Using that pop up screen that asks for security code.

It fails to check the card.

But I can use Google Pay at checkout of apps.

Bonkers.
[Magisk] simplepinoi177:
Hmmmm...honestly, as unlikely as it is, it does sound that there's an issue on (all) the banks' side. If GPay doesn't put up an error about being rooted or "modified", and it allows cards, but failing at the validating...

In my experience, I was having issues with GPay, and was going through a couple of android smartwatches and attempting to install GPay on them, that ALL of my banks had put up issues and "flags" with all of the authentications, authorizations, and verifications that I was constantly and repeatedly (in a short amount of time no less) doing. In the end, I actually needed to get things fixed on the banks' end on THREE cards/accounts! I might be totally off the mark here, but it might be something to be considered and or actually do...

Hopefully this ends up being helpful...
[Magisk] fvc2000:
Although it would be an awful coincidence, I've thought of that.

This week I'll try a completely new card from a new bank that's very Google Pay friendly.

Let's see...

But both worked fine till the day before I rooted... So I don't know...
[Magisk] Daidalos117:
Worked on my rooted Samsung Galaxy S9 (Soldier ROM). I just wanna say BIG thank you man! Keep up the good work. Again, thank you so much!
[Magisk] olivercervera:
I can't install the GPay SQLite Fix v1.9 ZIP via Magisk Manager, the zip file is grayed out, whilst I can install other zip Modules. What's wrong with yours? I am using Magisk 20.1 and Manager 7.4

EDIT: Weird. I tried again and this time I was able select the zip to flash.

Fully working Google Pay here, thanks.
[Magisk] driz:
setup my pixel4 a couple weeks ago and had no issues, got my wife's in yesterday and google pay wouldn't work. Found the instructions in this thread.

I installed sqlite via magisk manager downloads

rebooted

installed the gpay sqlite fix as a module

successfully added the card

rebooted

thanks everyone!
[Magisk] ergosum:
Thank you to the developer for the work!!

Ok my case is special, I have Google Pay as a separate Google account in a separate User of Android. Which means Google Pay was installed on the dedicated user space, but not visible in the Owner user. Google Pay was working a while, then it stopped probably due to a Google Services update. Then I applied this script, but no success. Then I removed Google Pay from the user, and installed it in Owner. I did a trick to make this application visible in other user: with oandbackups, I uninstalled it and restored it, somehow, I don't know why, it always enables it to other user (while "enable" for other user did not made the apps visible). Now it works!! I hope I helped a bit.
[Magisk] Mattski:
Just bought a Pixel 3, this helped a lot, thank you!
[Magisk] photolarry:
Was all of a sudden getting that annoying message that I'm rooted and the device cannot use contactless. I have a Pixel and I think Google should be kicked. Obviously most that own this device root it. It's secure and the fact I have to install scripts to get this function is stupid. However thank you very much to the guy that wrote the script. Works great and I didn't even need to readd the cards I used before. Would someone tell Google to work on the os not making Google pay dysfunctional! Thanks.
[Magisk] Jakob1379:
As many have mentioned in this thread already, rooting is a security risk. If you believe otherwise you might risk giving access to you cards to malicious code.
[Magisk] Jakob1379:
Newest update from Google seems to register root again on my s9+. Also my attests seems odd. There's one called HUAWEI??
[Magisk] photolarry:
That's your opinion

I'm not concerned at all. You obviously don't know how the security works. Again I should be allowed to take whatever risks I like. And I am... Done. :eek:
[Magisk] Didgeridoohan:
Are you by any chance using the the SafetyPatch module? It uses a Huawei fingerprint to pass CTS, so that would explain it.
[Magisk] invisiblewave:
Thanks for this! Finally got my Mi Mix 3 working. I did a fresh install of MIUI 11, installed the Magisk module, and nearly had a heart attack when the "**** off your phone is rooted" message didn't appear.
[Magisk] billyx1:
No need to translate, because it is my mother tongue.

Yes, me was some of these not having that package on my old phone. And the result was, that GPay is still working on that phone without any modification of dg.db.

On my new phone I have that package and I need to exclude it and now it is working.

Yes it is about a particular - or in fact about two - banking apps and now are both (additionally to GPay) running without any problems on my phone by using my posted solution.
[Magisk] jaimecoj:
I had to disable edxposed, now working!
[Magisk] billyx1:
It is not not YOUR (the owner of the device) security, it is the security of google/the bank/the shop/the credit card company.

If a device is rooted it is possible to snoop the communication while payment and use this to make fake authentications and not paying for the goods you bought. This compromises the security of Google Pay and can lead to the fact, that Google Pay is not accepted anymore.
[Magisk] AndDiSa:
This you need to explain more deeply. In my opinion if you are able to make fake authentication and fake payments something is designed wrongly with the protocol itself. So it's not to complain about the people using a rooted (unsecure?) phone but the people specified and implemented the payment protocol.
[Magisk] theCroh:
You do understand that almost every Windows machine anywhere is run on admin privileges (~rooted), right? Do you really think that compromises every online bank and web service on the Internet?
[Magisk] SmilingPerson:
Naturally you are right, but can we say that Administrator is ~ root instead of = root? The difference is pretty much meaningless to this conversation, but it gives me a headache to see that = there. It is just a little like saying an Arturo Fuente Hemingway is = to a Marlboro. [emoji6]

But your point is perfect.

Called from the ether using pineal stimlation
[Magisk] theCroh:
Fixed :laugh:
[Magisk] dimm0k:
[MENTION=2449699]BostonDan[/MENTION] and [MENTION=9317193]73sydney[/MENTION] THANK YOU BOTH for your great work and contribution!! I'm up and running
[Magisk] meazz1:
Works like a charm.

I have pixel 3a rooted running android 10 and the steps in OP are spot on.

Thanks OP
[Magisk] pndwal:
Many thanks [MENTION=2449699]BostonDan[/MENTION] & [MENTION=9317193]73sydney[/MENTION]!

I did a test run on 64 bit Xiaomi Mi Pad 4 Unlocked B/L, rooted, running Android 10 Quince Pudding (LOS 17).

Did it the lazy Magisk mod way (and I highly recommend it) - https://xdaforums.com/showpost.php?p=79643248&postcount=176

METHOD:

Checked all Google stuff in Magisk Hide

Activated Magisk modules (from repo):

-Busybox for Android NDK

-SafetyPatch

(Inbuilt Magisk safetynetcheck now passes fully)

-SQLite for ARM aarch64 devices

Rebooted, then activated Magisk module (download from this thread, end of post linked above):

-GPay SQLite fix (Full Edition)

Wiped data / cache in GPay

Rebooted and ran GPay

RESULT:

Now I get past 'may be rooted / altered' warning, and GPay checks and validates account details with my bank, etc, before letting me know I can't actually pay with device (as it lacks NFC). Great result. :)

Will receive new Redmi Note 8T in few days and test for real with NFC when rooted. Trust you'll continue with refinements as needed. PW
[Magisk] billyx1:
It is easy to explain: You can make a secure and trusted connection only between two trusted parties. That's one of the principle of information technology. If your phone is rooted, is not a trusted party anymore (from the google point of view).

Just to remember: If you do a payment with your device, so no information from your credit card is checked, only your device is communicating with the terminal. That's why it is possible to create a software, faking this communication.

---------- Post added at 09:04 PM ---------- Previous post was at 08:55 PM ----------

Do you do any NFC payments with your Windows machine a the supermarket?

Every online bank I know (also the finish ones, I have finish accounts ;) ) need a password and some kind of transaction authentication from you - the user. Google pay not.

Even more the terminal used by Google pay doesn't make - as far as I know - a online check if the account exists, is allowed to make such transaction, .... It just relies on the data sent by the mobile.
[Magisk] AndDiSa:
[MENTION=4659146]billyx1[/MENTION] you are completely right when saying that the communication between two devices needs to be trustful but nevertheless you must not be able to do payments without accounting anybody. It's your risk that probably a malware on your phone is doing bank transfers ... but if the protocol is correctly designed and implemented this should never be possible to do even on a untrusted communication channel.
[Magisk] theCroh:
Not true at all. See https://support.google.com/pay/merchants/answer/6345242?hl=en. "Google Pay responds with the customer's tokenized card and a cryptogram which acts as a one-time-use password. The card network validates the cryptogram and matches the token with the customer’s actual card number."
[Magisk] momoricien:
Big Thanks to [MENTION=2449699]BostonDan[/MENTION] and [MENTION=9317193]73sydney[/MENTION]! I have installed it on my Mi9T Pro with EvoX Rom, working like a charm! Now I need to test if the NFC module is working correctly with the latest EvoX 09/12/2019 ! Crossing fingers

---------- Post added at 09:31 AM ---------- Previous post was at 09:31 AM ----------

Big Thanks to [MENTION=2449699]BostonDan[/MENTION] and [MENTION=9317193]73sydney[/MENTION]! I have installed it on my Mi9T Pro with EvoX Rom, working like a charm! Now I need to test if the NFC module is working correctly with the latest EvoX 09/12/2019 ! Crossing fingers
[Magisk] dr.terrible:
Confirming the fix works.

Just successfully used Google Pay NFC tapping in a cafe, all is well.

EvolutionX 14.12.2019, K20 Pro Chinese vendor, Magisk, GPay fix module by [MENTION=9317193]73sydney[/MENTION]

Thanks, guys
[Magisk] ivivaitylin:
Well, I feel like I must be doing something dumb since things seem to be working fine for everyone else.

Pixel 2 xl, android 10 with the December security update, gpay Version 2.104.286073543

Installed sqlite through the magisk download, restarted, installed the gpay download from here, when it finished I tried to add some cards in gpay, but after entering the 3 security digits I get the 'can't be used to pay in shop' rooted warning.

Is there something obvious I'm missing? Gpay, all Google play services and Google services framework are hidden in magisk.

Thanks!
[Magisk] pndwal:
Are you passing safetynetcheck?

Please check steps that worked for me - you may have missed a few - post #764 last page here. Hope it helps. PW
[Magisk] simplepinoi177:
I've had this issue and, believe it or not, it's on your bank's side that is causing the issue; not GPay nor the root fix associated....

Give your bank a call (usually a 800 number on the back of the credit card) and ask them if there are any "flags" or further confirmation/validation on their end...

Hope this ends up being helpful...
[Magisk] pndwal:
Mmm. In my case l got 'device may be rooted / altered' warning before it would try to validate account details with my bank, etc. This may in fact be a different warning, but if not I think he may need to add the magisk modules that allow safetynetcheck to pass fully, like SafetyPatch and possibly Busybox.

Also, check Playstore, Settings, about, Play Protect certification says 'Device is certified'. - Seems he has sideloaded GPay app. Hint: if all is set up to work, GPay app will show in Playstore, download and function without errors. Regards, PW
[Magisk] dr.terrible:
Try also applying the SafetyPatch module and turning on MagiskHide for Google services
[Magisk] rishipkothari:
Confirming this worked for me! Details below.

I was getting the "your phone is rooted" error when trying to setup either old cards or a brand newly added card in my Google Pay wallet with tap to pay functionality, all of which I've used before my fresh wipe and root. With this setup, I pass both safetynet checks.

Pixel 3 on Android 10 December 2019 security patch

Magisk v20.1

Magisk hidden Google Play Services, Google Play, Google Services Framework

Magisk Modules:

- MagiskHideProps config with Pie fingerprint selected (from Magisk repo)

- BusyBox by osm0sis (from Magisk repo)

- SQLite for ARM aarch 64 devices (from Magisk repo)

- the GPay Magisk v1.9 on this thread, page 18 post #176

Order I performed these in (over time):

- Root with magisk (without TWRP on Pixel 3, no compatibility)

- hide apps in magisk, reboot

- install BusyBox and magiskhideprops, reboot

- use props to set pie fingerprint, reboot

- install Google pay from play store, add a new card to wallet, but do not set up tap to pay

- install Magisk SQL binaries package, reboot

- install GPay magisk module, reboot

- setup new card in Google Pay wallet as tap to pay

Still to test using as payment, but this is the furthest I've gotten in the process until now. Will update as time goes on!

Thanks to everyone for your suggestions and to the devs for the mods! [MENTION=2449699]BostonDan[/MENTION] [MENTION=9317193]73sydney[/MENTION] and everyone else!