yashsingh1/xdaforums huggingface dataset:
[Magisk] sliding_billy:
I haven't used GPay since Tuesday or Wed, but I am still passing CTS (both checks) using the manual SQL fix from the OP and not 73sydney's module. Pixel 3 XL and Pixel 3.
[Magisk] fonixmunkee:
I went to bed last night with my phone telling me that I could no longer use Gpay because I was rooted. Checked Safetynet status in Magisk and saw both the ctsProfile and basicIntegrity were false now.

Found this module this morning, installed it, and now Gpay works, even with ctsProfile and basicIntegrity failing. Probably just a life-line until the next big Google push, but I'll take it.
[Magisk] pndwal:
Guys, it's not that bad (yet)!

The recent random SafetyNet fails John Wu is referring to are due to new basicIntegrity checks, not ctsProfile, although this also fails in turn due to basicIntegrity. (Key attestation is still off for the moment at least.) These are easy fixed by removing Magisk modules and Xposed environments that are presently triggering them, and are confined to mods (including SafetyPatch) utilising unusual bind mechanisms etc.

Solutions include replacing SafetyPatch with MagiskHide Props Config module (still working fine), using TaiChi module and TaiChi Manager in place of Riru and EDXposed, etc.

Edit: EDXposed SafetyNet compatibility is now fixed in recent Canary builds. :)

So full SafetyNet pass can still be achieved for now. :) - Hope this cheers you all up! PW

Reading: https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382
[Magisk] Pirateguybrush:
Can you please clarify the how we do the above for those of us who aren't as well-versed in the various modules and what they do?

I've removed safetypatch, I already had magiskhide props config. Is EDXposed causing the problem? Does TaiChi module/manager provide the same functionality as EDXposed while allowing GPay to work?

How can I tell which modules/xposed tweaks are triggering the problem?

GPay doesn't presently have the error message in the app, but it refused to work earlier today.
[Magisk] alphahere:
Rooted Pixel 3a xl with March update and used it yesterday in the one store that has an nfc terminal. No errors from gpay yet. Will see what happens with the April update.
[Magisk] 73sydney:
You kids really need to learn to read the last few to dozen pages of a thread when you have an issue, because often as not its covered already....

As most of your questions have been by my post (referencing the very thing, thanks to pwmdal), link at the bottom of this post, under the picture, one page back:

https://xdaforums.com/showpost.php?p=82172955&postcount=945

It will tell you what is currently known. If your module isnt listed here, afraid you may have to figure it out yourself, disable all modules and enable one by one till you figure out which one is breaking things. Sometimes theres no easy way....
[Magisk] pndwal:
A small cheerful tiding, if OT:

EDXposed is now fixed in recent Canary builds and no longer trips SafetyNet basicIntegrity! :) Edited post above. PW
[Magisk] polygon21:
So i did this about 6 months back.. all was working fine until a few days ago... guess something changed and google pay doesnt seem to work anymore.
[Magisk] warrencoakley:
After a GPay Fix module update, removing security patch module and installing the Magisk Config Props I'm back in business.
[Magisk] pndwal:
If you have MagiskSU and basicIntegrity is now failing in SafetyNet check in Magisk Manager, see my post #951, top of this page. PW
[Magisk] polygon21:
unfortunately, i'm stuck on magisk 18 on my S7 as somehow i can't install 19.. guess gotta just live without gpay now..
[Magisk] pndwal:
Sorry, whats wrong with v18? PW
[Magisk] polygon21:
ok.. disregard this.. i managed to upgrade to 20.4 and everything seems fine and dandy now..
[Magisk] varund7726:
I'm back in the game after a long time.

I can confirm that this technique works .

Also my cts profile passes too :)

Really good work :good:

Cheers
[Magisk] iam_adarsh:
Haven't seen you since the S3 days!

Hope you're doing well.
[Magisk] guest4711:
Ten days ago I got a nearly unused S3 LTE - i9305...
[Magisk] vskr1:
Canary v0.4.6.3 (4545) (SandHook) does not work for Redmi K20 (MIUI 11 20.3.26): both ctsProfile and basicIntegrity are false. (
[Magisk] Didgeridoohan:
You sure it is the EdXposed module and not some other module you have installed? Other known modules that could cause this are FDE.AI and Safetypatcher.

Also, have you made sure that MagiskHide is enabled (and if it is, try turning it off and on again)?
[Magisk] vskr1:
Thanks for your reply.

No, I'm not sure, but I'm not using SafetyPatch or FDE.AI.

My modules at this moment:

- 3C Magisk Helper 1.0

- Busybox for Android NDK 1.31.1

- EDS magisk module v1

- Magisk Manager for Recovery Mode (mm) 2019.4.4

- MagiskHide Props Config 5.2.4-v80

- Move Certificates 1.8

- Riru (Riru - Core) 19.8

- Riru - EdXposed 0.4.6.3 (4545) (SandHook)

MagiskHide is on. Turned it off and on again - it did not help.
[Magisk] Didgeridoohan:
Only way to know if it's one of your modules is to disable them one at a time and see if the SafetyNet state changes. Or disable all of them at once by enabling Core Only Mode, but that would only show if it is one of the modules (CTS would possibly fail, but basic integrity should pass), not which one.
[Magisk] vskr1:
Didgeridoohan, thanks again for your reply.

I did a test and I can say that the SafetyNet Check succeeds for me only if I turn off "Riru - EdXposed" module or use Magisk Core Only Mode. As soon as I turn on the module "Riru - EdXposed", the test fails. Other modules do not affect this.
[Magisk] pndwal:
EDXposed has been fixed from Canary 4532. :)

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post82201951 PW
[Magisk] franky_z:
I tried several times this whole process with deleting google data, installing Gpay SQLite Fix and Gpay app, this worked before for me before.

But now the database "dg.db" normaly with the "attest" entry is empty.

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

I use SQLite Editor app to see of attest is 0, but the database is empty although I have connected Gpay with Paypal in Gpay App.

Any idea or does someone else have this?

Update: I think it had something to do with setting dg.db on read only permission. After allowing write permissions it maybe works again.
[Magisk] zgfg:
Sorry, being new here - could modules be added to Magisk repo (cannot find them there).

Thanks
[Magisk] 73sydney:
No, never going to happen

Its a long story.....and im not bored enough to retell it today :)

Only available from here or from my signature
[Magisk] zgfg:
Ok
[Magisk] Daisymae:
When I try to add the magisk module I get "installation failed. Not a magisk module"? Sorry if this has been posted before but I don't know where to go now.

Add: Found the answer.
[Magisk] sirucato:
Hello [MENTION=9317193]73sydney[/MENTION],

do not you have an specific thread for your amazing "Magisk Method Gpay SQLite Fix"?

I'm using 1.9 since January with no problems but yesterday I tried to add a new card and I could not. But the cards I have added are working fine.

I read your updates from March. Do you recomend me to update your fix or better to stay at 1.9.

Thanks in advance.
[Magisk] 73sydney:
Nope, i dont have a separate thread, as i just packaged the method by the OP BostonDan, and others, be a bit rude i thought to create a new thread reposting their work....

And before you then ask why it isnt in the repo, i dont want to go there, because im tired of recounting the drama :) I always like to make it clear the mighty DidgeriDoohan who is heavily involved in magisk matters was NOT part of the issue or the reason why it isnt in there...he is totes an awesome guy and actually contributed to this module in a pivotal ways....he's in the credits....

I tend to post as often as i can in here, so most people can generally find it via my sig when i post here or elswhere on XDA, and others point them to it

As it says in the changelogs from builds above v1.9, theres no changes to the functionality of my plugin, just installer changes. Nothing will have changed from my modules point of view since you first ran it way back when

If youre having issues now it may be due to other factors, like security updates, changes by Google on the Pay backend, other modules or things like EdXposed if you run that....
[Magisk] haoyangw:
Just to report a success story that with the Magisk Module version of this procedure, and Magisk 20.4, I could get Google Pay working on Google Play Services 20.18.17 Android 10 Google Pixel 4 XL. I just added Google Pay to the Magisk Hide list, installed the Magisk Module for this fix + SQLite3 Magisk Module, then I had to clear my Google Play data + cache as my device was not Google Play Protect certified according to Google Play. Clearing Google Play's data and cache fixed that issue and made my device certified again. Managed to successfully add a card to my Ticwatch Pro on Wear OS using the OreoPay4Pie module, so it's all working well. If anyone is interested on how I setup Google Pay on WearOS in unsupported countries feel free to PM me!
[Magisk] morgan1985:
Can someone please help me, so I've followed instructions and have enabled gpay SQlite fix, I've enabled SQlite for aarm arch64,. I'm on. Android 9,. Using edxopsed with. Riru core and riru edxopsed yahfa. Been trying all day, have hid Google pay in magisk.
[Magisk] pndwal:
Do you have both basicIntegrity and ctsProfile passes in Magisk manager? PW
[Magisk] morgan1985:
No they both say failed

Ok disabled riru core after reading last few pages, and disabled now it passes.
[Magisk] addoniis:
How to work with/in Macrodroid ?

May you explain it more?
[Magisk] hammondegs:
Remove the xml markup and configure your macro like attached images.

You can use whatever trigger you like but I am testing when the relevant apps are updated.
[Magisk] t0m2k:
wow, finally its working again! :)
[Magisk] marshedpotato:
Working for me too. Thanks for the well written easy to follow instructions.

I wish I had a better understanding of what I am doing here and any potential side effects, so if anyone discover anything please share it here. But for now I am happy enough that it is working and I have a backup from before.
[Magisk] bnwg:
Just wondering...whether we need to chmod 777 instead of chmod 660 as the orginal dg.db having permission of 660
[Magisk] jcmm11:
660 (and 440) are more correct. 7 (or any odd number up to 7) gives execute permission, which a db file definitely doesn't need.
[Magisk] lssong99:
The 777 is just a quick and dirty way to ensure the sqlite3 binary can access dg.db for maximum compatibility. Anyway it will be chmod to 444 in just a fraction of second. Of course if on your system 660 works then it's okay to use 660.
[Magisk] refi64:
Out of curious, has anyone managed to make this work on Android Q? I set everything properly, but Pay still fails, seems fails_attest is still set.
[Magisk] Autistic:
Hello i have problem, I could have add a credit card to my android pay.

But when Im trying to pay at shop, nothing happens like I wouldnt turn on nfc.

Anyone had same issue?
[Magisk] t0m2k:
Has anyone installed the latest gpay update ?
[Magisk] HamsterHam:
Yes, my cards are still intact. Need to try paying to see if it still works.

All the atest database values still say 0 so I'm sure it'll work.

Edit: still works, paid earlier.
[Magisk] Bidalos:
It's called Google Pay now. Make sure to update it, even better uninstall and install it again.

Then In NFC optiond chose HCE Wallet (in secure element position), not Sim Wallet.
[Magisk] saiz0313:
It works!!

Thanks a lot !

Nokia 7 Plus with Magisk 19.2 ( Kernel DFkReborn-v1.1.1-4.4.178)
[Magisk] GryphonBR:
I just added a MasterCard after following the full method and changing permissions to 440. As an extra piece of info, the card I added had never been present on my GPay account since this bank was only recently added to the list of participating banks.
[Magisk] sliding_billy:
I used my Pixel 3XL and my wife's Pixel 3 (both updated to the new GPay yesterday) today at separate stores. No issues with either one. I'm guessing that if there is a failure coming, it will happen with a new GMS version and not GPay.
[Magisk] braveheartleo:
Many thanks [MENTION=2449699]BostonDan[/MENTION] for this. I was able to track down why my system fails at CTSprofile check, and at the same time make Google Pay work again. ?

Regarding chmod-ing dg.db to prevent overwriting the changed attestation values brought about by future gms updates, perhaps a more permanent solution to this would be to

chattr +i dg.db

. This makes the file immutable (+i) or non modifiable, even to root. To reverse the change,

chattr -i dg.db

should do.

EDIT: corrected the switches.
[Magisk] Superschmiddi:
Google Pixel 2 XL May update with actual GPay and GPS - still working. Thank you!
[Magisk] joeynshelby:
I have installed the new update. This solution is still working for me.
[Magisk] joeynshelby:
Verified that this does work. However, chattr +i made the file non modifiable and chattr -i allowed modifications. After issuing the chattr +i command in terminal emulator to the dg.db file, it prevented me from making any modifications whatsoever in SQLite editor and also when attempting to chmod777 and use the run shell script in Tasker that was mentioned earlier in the thread. Thanks for this information and thanks to [MENTION=2449699]BostonDan[/MENTION].
[Magisk] 73sydney:
Updated...

Removed Automate flow as it stopped working for me on the custom ROM im using, no idea why

Moved to using purely Magisk post-fs-data for the SQL part

See post here: https://xdaforums.com/showpost.php?p=79643248&postcount=176
[Magisk] pndwal:
So are both passing now? You'll need to do that first.

Is G Pay sorted now?

Nb. Riru module is not the problem, but since Google's new basicIntegrity checks EDXposed started tripping it, and disabling Riru mod disables EDXposed. However this is now fixed, at least in later Canary builds. https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post82166469 PW
[Magisk] morgan1985:
Yeah should of mentioned I upgraded to canary build but that hasn't fixed riru core, if that's enabled it still fails both, disabled it works.

Riru core 21.2 is causing it for me.
[Magisk] pndwal:
Good stuff!

I'm not an XPosed user, but others report it's not Riru (Riru - Core) causing problem, but Riru - EdXposed, which may need to be removed, not just disabled, to get pass.

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post82174021

Solution is to install EdXposed from Canary channel in EdXposed manager (or here: https://github.com/ElderDrivers/EdXposed/issues/437 ) PW
[Magisk] dd805bb:
I have no gpay app anymore. And have gpay working. This method worked for me for a while. But gpay all the sudden said altered software in app and no more contactless pay. So I uninstalled the app. Went to reboot and noticed I still had the slot to add a card. I did. It added. I swipe up to put it in recent, it says gpay, when I hold the icon it says Google play services. I have no gpay app. I only have magisk hide hiding gms unstable like normal. Contactless pay works. When I hold the power button it shows my cards.
[Magisk] anirajkumar:
Go back to BHIM app

GUYS, just try installing BHIM App again. They have improved a LOT LOT LOT. It is awesome now. No nonsense. Just payments. And it works on any Custom ROM too.
[Magisk] Deacon3:
I have magisk installed, ctcProfile and basicintegrity are both true, GPay Sqlite Fix, Riry-Core, Riru-EdXposed YAHFA modules selected, device is certified in Google Play, but Google Pay says "Your phone can't make contactless payments. Check your phone software to see if it meets standards". Is there a way to fix that to get google pay to work?
[Magisk] franky_z:
I think it's EdXposed. It needs modifications by the developers.
[Magisk] dd805bb:
That is what was happening to me. I have Riru core, yahfa exposed, gravitybox, Riru storage redirect. The only edxposed yahfa module that works is the canary from the manager app. The one in repo doesn't work. It trips safetynet. And in order to get it right, you have to uninstall all Riru modules and start over. Core, edxposed, storage redirect. Mine is passing with edxposed. Also no gpay app. New update puts gpay in Google play services, like how assistant was a separate app, and now is built into the Google app. I didnt edit via sqlite. Didn't add any hide modules either edxposed and or magisk, for extra hiding of gms core. Only thing I did is in edxoped is disable resource hooking as per instructions for gravitybox. I also have edge sense plus using edxposed and no esp module from magisk.
[Magisk] IoIam:
Since you have edxposed working, does crappalinks still work? It's basically the only reason I want xposed
[Magisk] tusker:
It was the "Google Play Protect certified" issue for me too, so perhaps it would be wise to have the GPay fix also clear Google Play Services, or at least check the certified state before continuing?
[Magisk] Xmikex01:
Hello everyone Just a quick question from those who have tried this method. Has anyone been able to use lineage os 15.1 with microg working with google pay or has everyone use the standard gapps provided by google.
[Magisk] pndwal:
Apparently no one has this implemented, partly due to need to pass SafetyNet.

Seems there's a SafetyNet setting in MicroG, but it has been reported broken at times. If if it's working now / on your device I guess you may have a chance, especially with this SQLite mod, but others are skeptical. (More work may be needed to implement in MicroG.)

https://github.com/microg/android_packages_apps_GmsCore/issues/361

Please report any success here! ?

Keep in mind that any solution is necessarily temporary with Google's new Hardware Key Attestation set to break SafetyNet pass spoofing techniques for EVERYONE with recent hardware, at any tick of the clock. (Only those with very old devices may be exempt.) PW
[Magisk] warrencoakley:
I was passing SafetyNet up until yesterday. I had to update Vance by downloading Riru Core, Xposed, EdXposed Manager, MicroG & SAI.

But SafetyNet is now tripping and contactless payments has stopped working. I have removed all but SAI but it is still tripping. Do I need to do a fresh installation of GPaySQLite etc?

Appreciate any help to resolve this issue. Thanks
[Magisk] pndwal:
Are you saying you had SafetyNet pass with MicroG, and no GApps installed? PW
[Magisk] warrencoakley:
It's ok got it sorted. Uninstalled everything and cleared data in Google Play Services and I'm.back in business again.
[Magisk] Lassov:
It worked like a charm!

I also turned on magisk hide

Awesome thanks ❤️
[Magisk] Cedoresti:
Hi, on note 9 android 1Q dont work ;(
[Magisk] stathis95194:
You missed a step.

Gain root access
[Magisk] Cedoresti:
thank, but safetynet dont pass after install edxposed :( i hide on magisk i set on blacklist, any one know exactly all the way ? thank.
[Magisk] zgfg:
Why people install EdExposed (you don't need for GPay) and then cry about SafetyNet?! Read first
[Magisk] Cedoresti:
Lol, before work.
[Magisk] dipstik:
Did you use the module or db hack?
[Magisk] dd805bb:
Neither. Magiskhide just using gms unstable. Hold power button and add card that way. And do not have the gpay app. The power button showing cards is not the gpay app.
[Magisk] badaas:
Just clear all data for gpay, cards remain intact and now passess software check.

Edit: still fails at checkout, software warning when trying to pay grrrr..
[Magisk] krecoun:
I would like to get GPay working on my Ticwatch pro 2020. I am from Czech Republic and GPay is officially not supported here. I have root and Magisk manager installed. But how to flash the module to watch? And does this thread talk actually about my problem with unsupported country?
[Magisk] pndwal:
https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post82166469 PW
[Magisk] badaas:
The king is dead. Long live the king.
[Magisk] warrencoakley:
You cant. I've tried myself. It won't work.
[Magisk] krecoun:
You can, but not with this module. The module in https://xdaforums.com/wear-os/development/magisk-module-app-google-pay-downgrader-t3941688 works.
[Magisk] warrencoakley:
Your best asking in that thread about it
[Magisk] Jiggs82:
This didn't work for me on rooted Android 11 beta 2 , I get "operation not permitted" in terminal app
[Magisk] pndwal:
Tried the Magisk Module?

Check CTS and "Device is Certified" status in playstore settings. (MagiskHide Props Config may be needed, configured, also new workaround if hardware backed attestation is now tripping CTS on you device:

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post83028387* [check this thread for related safetynet developments and Magisk related solutions] - check attestation type using Canary Magisk manager if unsure.)

Then load SQLite binaries Magisk module and G pay fix module by [MENTION=9317193]73sydney[/MENTION] here:

https://xdaforums.com/apps/magisk/m...7-1-22-pie-t3929950/post79643248#post79643248

It's a long post. Please read it carefully. :)

Also, don't forget to clear playstore / Google Services / G Pay data. PW

*Edit: See new 'force Basic Attestation' in MagiskHide Props Config:

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post83148385
[Magisk] Jiggs82:
I got it to work thanks ??
[Magisk] mapagm:
Both SQLite binary and Gpay SQLite Fix are Magisk modules? I mean both of them i should to instal via Magisk or SQLite binary in TWRP and Gpay SQLite Fix in Magisk?
[Magisk] pndwal:
I simply use modules from Magisk repo as Dev mentions. No problem after reboot. I never looked for TWRP installable mod. PW
[Magisk] crisco654:
So it looks like google pay is back to working(says I can make contact-less payments again), but I'm still failing cts and device still isn't certified. So I guess everything is good?
[Magisk] zgfg:
CTS Profile fails because Google forces Hardware attest, recognizing that Bootloader is unlocked.

It has been extensively discussed (and described how to force Basic attest to pass CTS) in the general Magisk thread

Now, it's easy:

Use the latest Magisk Hide Props Config module and it's new option (introduced just for that) #2 Force Basic key attestation.

Reboot as requested

Then, if Google Playstore will still show Device is not certified:

- Airplane mode On

- Settings, Apps, Manage apps, enable Show system services, search for Google

- For Google Play Store, Google Play Services and Google Services Framework, delete Cache and Data

- Reboot, Airplane mode Off and give a time to Google Play to sync
[Magisk] 73sydney:
Cheers for pointing this out

Might be time to add some info like that (or exactly that :)) to my OP on the module :)

Ill do that on the weekend
[Magisk] crisco654:
So I did this, and still no cigar. Still failing cts. I just updated to the August security update as well. Oh well, at least google pay is still working
[Magisk] BostonDan:
Do you have edXposed installed? This usually screws up cts profile.

Cheers,

B.D.
[Magisk] zgfg:
Basic Integrity is passing?

Btw, Magisk hide is enabled?

First of all make sure to remove all other Magisk modules (particularly Riru, Xposed or so) - then, with this trick CTS must pass.

Later, test with one by one additional module to find which one is culprit - there is also a workoround for eg Xposed but I'm not using Riru/Edxposed and cannot help you (Google is your friend)

If you have a custom ROM, find XDA thread for MHPC and take time to read discussion there about device fingerprints + ro.product.* props and CTS to find out how to fix
[Magisk] Pro4TLZZ:
saving for later, any chance we will be able to root 4a and keep safetynet?
[Magisk] zgfg:
You should know how to root your device, this is only how to fix CTS Profile if failing due to the forced Hardware attestation finding that Bootloader is unlocked