yashsingh1/xdaforums huggingface dataset:
[Magisk] 81!:
Good job didgeridoohan!!!

Thanks didgeridoohan for the latest props mod!!! Now I got paypal and gpay working again!!!
[Magisk] erbarad:
Hey guys,

I have a Mi8 with LineageOS 17.1 and magisk 20.4 installed. CTS passes, device is visible as play certified. I can add my card to google pay, it is enabled for contactless payment. When attemptpting to pay, the card shows up on the screen as usual with google pay, but there is no payment, just a red exclamation mark at the top. The phone acts as if it was not long enough near the payment terminal. Stuff like google pay, banking app, play service, google framework are all hidden in magisk. Any ideas?
[Magisk] veitograf:
Could you explain what you did?
[Magisk] pndwal:
Seems he enabled [MENTION=4667597]Didgeridoohan[/MENTION]'s new props edit function to force Basic SafetyNet attestation instead of Hardware backed attestation to get ctsProfile pass and Playstore device certified status. PW
[Magisk] darkstar73:
My phone passes the safety net check in magisk and my card is setup and verified in Google pay. Everytime I try to use it in a store, I get an error message. Not sure what I can do fix. Anyone got a suggestion?
[Magisk] 73sydney:
Magisk Method Gpay SQLite Fix.....

General Notice:

19/08/2020

Major update to the installation process, mainly adding a pre-installation checklist....hopefully doing some basic tests (CTS pass/fail and basic/hardware attestation) before trying to install the module. Its high time things were done this way and may head off a lot less posts, with repeating information. So as opposed to people just trying the module and finding out afterwards that they werent passing CTS etc, now people will be encouraged to pass CTS/attestation first, and given the info (hopefully correct and understandable) to troubleshoot/resolve that, before trying my module.

At time of writing there are two hacks to bypass googles crackdown on rooted devices, one is CTS (primarily bypassed by setting a valid fingerprint (usually most useful on custom ROMS)), and the other hardware backed attestation, which can be forced to basic. Both workarounds may become invalid at any time by google.

There are no updates to the module itself at this time, all changes are only for new installs, so if you have the module installed and working, then you are unaffected

Main post is here: https://xdaforums.com/showpost.php?p=79643248&postcount=176

Note: As much as i tried to make sure the info and steps were correct and consulted with [MENTION=7550078]pndwal[/MENTION] and [MENTION=4667597]Didgeridoohan[/MENTION] in the lead up to posting, any errors are mine alone, and any corrections for issues arising will be added as soon as possible should they arise. Im only (part) human, and this is not a full time job.
[Magisk] useformildaccess:
I cant seem to clear Google Pay's cache and storage either manually or through the GPay SQLite fix Magisk module. My device passes basicIntegrity and ctsProfile with basic evalType but all of a sudden Google Pay says "phone doesn't meet security requirements." Cards I have added on my previous phone showed up on my new OnePlus 7T and I was able to set them up for in-store payments but never had a chance to test them until recently when Google Pay declined the transaction at a gas station. Then I noticed I could add new cards but cant set them up for in-store payments. That's when I noticed that Google pay is saying my "phone doesn't meet security requirements." At first I tried clearing the cache and storage but nothing happened. The cards are there still showing to be setup for use except Google Pay is still saying "phone doesn't meet security requirements." Then I followed your guide and installed GPay SQLite fix Magisk module. Yet still, the cards are there still showing to be setup for use except Google Pay is still saying "phone doesn't meet security requirements." My Google Pay version is 2.116.328438545. Am I missing something? Any suggestions?
[Magisk] pndwal:
Did you read through whole post linked as 'Magisk Module' in OP?... You have the SQlite binaries loaded too (I prefer Magisk module for this)?

May need to clear data as well as cache as suggested.

Also, try this if still failing: Add G Pay, Playstore, and G Play Services to hide list in Magisk Manager, then toggle on airplane mode, reboot, clear caches, and possibly data for all of these, reboot, toggle off airplane mode. PW
[Magisk] useformildaccess:
The only thing I haven't tried out of your suggestions is clearing the data of Google Play Store and Services. I guess I have to try that. Should I do it while the GPay SQLite Fix Magisk module is still loaded or uninstall it first, clear the data of Google Play Store and Services in airplane mode, then install the module back?
[Magisk] pndwal:
Try with reboots as described. So you've toggled the 3 apps to hide root? Also, is your G Pay downloaded from playstore (not sideloaded version)? PW
[Magisk] useformildaccess:
Playstore
[Magisk] pndwal:
Sorted?
[Magisk] Dunge2:
Did Android 11 fix this security hole?

I previously used the module at https://github.com/stylemessiah/GPay-SQLite-Fix implementing this fix on Android 10 (Pixel2) and it unlocked Google Pay successfully. I upgraded to Android 11 and it locked my Google Pay, so I installed the module again but it doesn't seems to work anymore, it's still locked. I also created a issue on the github about it: https://github.com/stylemessiah/GPay-SQLite-Fix/issues/15
[Magisk] 73sydney:
Did you follow the (updated) install process in my original post: https://xdaforums.com/showpost.php?p=79643248&postcount=176

Please pay extra attention to the Requirements and the Pre-Installation steps (added recently with help from others to avoid exactly the post youre making (with little detail)) - now people are asked to check they pass CTS/basic integrity/evalType BEFORE installing the module. If you cant pass the Pre-Installation steps (and feel free to post which parts of this fail) then (generally) youre probably going to be referred to MagiskHide Props Config to (hopefully) address these issues before continuing on to try my module.

The module works for me than just me on Android 11, If CTS/evalType are correctly passing

The module itself has some form of logging for failures on the firstrun after installing (/cache/payfixfirstrun.log). I have no way of helping you before that without you sharing more info, namely what is/isnt passing in the Pre-Installation steps.

As i said, these were added very recently to (hopefully) stop the number of "its not working' posts :)

And as always, XDA golden rule when posting with an issue: If in doubt, more info is betterer! :)

I can say i have the same device and on stock Google Android 11, it worked fine for me with no fiddling (i was also beaten to testing it on Android 11 by another, also ironically with a Pixel 2 XL - so its worked for 2 x Pixel 2 XL users already), so im not sure why it wouldnt work for you. My cts/evalType passed fine....

From easiest to most tricky:

* Did you enable MagiskHide in Magisk Canary Manager?

* Are you also using xposed etc or the other modules already noted to cause issues? - Check the Pre-Installation section for info on these.

* Have you tried clearing the google play services and play store caches?

* Did you clean install with wipe the official Android 11 image or dirty flash? (note: youre on your own if you dirty flashed, i, like many wont support any queries on a dirty flashed ROM)

More info needed

p.s. Its best to PM me with an issue on here than on github, because, for reasons best known to github, i dont get notifications of issues (ive tried to get them to fix it)

* i hope i might finally beat [MENTION=7550078]pndwal[/MENTION] to supporting my own module this once :) he's usually too quick and efficient!
[Magisk] pndwal:
Aw, shucks. ☺️ PW
[Magisk] Dunge2:
Thanks [MENTION=9317193]73sydney[/MENTION]. I was just asking a quick "does it work on Android 11?" because I couldn't find anyone else mentioning it, but thanks for going in details.

Strangely enough, I just opened the Google Pay app today without doing anything else and it's now functional :rolleyes:.

What happened was that when I first installed it and it failed, CTS/evalType wasn't passing. So I checked the magisk hide under magisk manager (which disabled itself because I went from normal to canary), uninstalled the module, rebooted, passed CTS/evalType successfully, reinstalled the module, rebooted, and Google Pay still wasn't working.

For some strange reason, it seems like it took a day and now it does, not sure exactly why.
[Magisk] useformildaccess:
What do you mean sorted?
[Magisk] pndwal:
Meant did you manage to get it sorted out in the end? PW
[Magisk] 73sydney:
Sorted = Sorted out? or Are you okay now?/Did it work?

Is some english speaking countries, like Australia, its shorthand for checking someones okay - "You sorted?" or even just "Sorted?"...we like word economy :)
[Magisk] warrencoakley:
Anyone's SafetyNet tripping? Got a notification today from GPay saying contactless is not working
[Magisk] niko26:
Hey [MENTION=9317193]73sydney[/MENTION] - so I have checked these:

* Magisk Manager (Canary version) installed

* SQLite3 binary installed (through Titanium Backup)

CTS/Check failed completely until I installed these:

* MagiskHide Props Config and "Hardware off" by Displax

* Checked for Identified Conflicting Magisk Modules, EdXposed

* Check for ctsProfile (pass/fail) and/or evalType (basic/hardware) in Magisk Manager (Canary version) - it shows "pass" and "basic" after installing MagiskHide Props Config and "Hardware off" by Displax.

Mind.. I didn't configure anything on MagiskHide Props Config. But ctsProfile "pass"es with "basic".

* Install Gpay SQLite Fix magisk module via magisk manager

* Re-add card in Gpay. Gpay still shows that NFC payment has not been setup. If go to "setup contactless payment" it says "your smartphone does not satisday the security requirements".

* reboot

* no change in GPay.

I own a Pixel 4 XL.

Did I miss any step?
[Magisk] pndwal:
Generally only need Canary MagiskSU if on Android 11.

I prefer SQlite Magisk module binary.

MagiskHide Props Config module includes Force Basic Attestation, it's better as it spoofs real models from same OEM allowing device specific functions, appstores etc to keep working. Need to run 'props' from terminal emulator to configure. (Force Basic will be disabled if conflicting (Hardware Off) module is detected even if configured, so use only one module.

Even latest Canary EdXposed seem to trigger basicIntegrity fail at present (even with 'pass SafetyNet' checked in EdXposed Manager).

Also:

Hide root in Magisk Manager for G Playstore, G Play services, G Services framework and G Pay app.

Clear Data for GPay app.

Try clearing data for G Playstore, G Play services (especially this), G Services framework too.

Check Playstore shows 'certified' in settings, and G Pay shows in Playstore. PW
[Magisk] 73sydney:
Root is already hidden for related apps during module install, theres feeedback on that during install:

code thanks to The Man

# hide packages known to affect GPay using magiskhide
ui_print "Attempting to hide packages known to affect GPay using magiskhide..."
# the following few lines are contributed by digderidoohan - thanks for the delimiter and cutting routine for hiding Google Services Framework
# i tried many ways of delimiting etc and none worked, his did, champion!
packages='com.google.android.gsf_com.google.process.gapps com.google.android.gsf_com.google.process.gservices com.google.android.gms com.google.android.apps.walletnfcrel'
for i in $packages
do magiskhide add $(echo $i | cut -f 1 -d '_') $(echo $i | cut -f 2 -d '_')
if [ $? -eq 0 ] ;	then
ui_print "$i: hidden successfully"
else
ui_print "$i: already hidden"
fi
done

i think the trick to put device in airplane mode, and then clear data of Google Play Store and Google Play Services and then toggle airplane back off and/or reboot might be the go - i could probably script this into the module install if you think it would be a good idea...its trivial to do...i did think about this the other week when the tip came up :)
[Magisk] pndwal:
Haha, clearly I've only got the basics down pat... shows you went above and beyond with your code (it's not just adequate)....

Airplane mode trick did cross my mind too when thinking what caused failure to hide, but was probably distracted by his overcomplicated process.

You asking me if you should 'hard code' it in module?

Hard to know... guess it would need to include reboot before toggle Airplane mode off, and there may be occasions this trick is needed other than on installation (like clearing cache for G Play Services needed even after fully uninstalling EdXposed or other problem modules), so documenting it may be better (in a 'Troubleshooting' section?). I wouldn't rush to complicate a nice simple solution... but that's just me! :)

(@niko26, may want to try [MENTION=9317193]73sydney[/MENTION]'s Airplane mode suggestion above too.) PW
[Magisk] 73sydney:
The airplane mode before cache clear has been in the documentation since it was mentioned the other week :)
[Magisk] niko26:
I am not really getting at what point airplane mode / reboot is necessary and why. Could you kindly elaborate?

Whatever makes the usage of your module easier - please go for it :) I would be available for you to beta test the module if necessary :)

Also if you could kindly explain at what step exactly readding the payment details into gpay has to be done, and when to reboot, when to reset / clear the data, would be really helpful.
[Magisk] 73sydney:
The steps required are already in the documentation under the preinstallation checks

Quoting myself:

The clear data should be attempted, if you like, at the preinstallation check point, normally. But you can try it now.

The module itself tells you right at end of install in magisk manager to then add card to gpay, and then reboot. Its written as if youre doing this on a clean flash, where you have your best chance. If the card is already there, then obviously you cant re-add it.
[Magisk] niko26:
[MENTION=9317193]73sydney[/MENTION] thanks, I have indeed skipped this part because neither "Result: ctsProfile of fail and evalType of Basic" was happening for me, nor "Result: ctsProfile of fail and evalType of Hardware" was happening. Using the ""Hardware off" by Displax worked fine. So this part is okay, right?

I'm really lost about what step(s) I have missed or what I am doing wrong :(
[Magisk] niko26:
So let me ask this again:

Does GPay work correctly for anyone using a Pixel 4 on Android 11 with MAgisk Canary?

I can't get it working :(
[Magisk] useformildaccess:
I got you now. So, after I cleared the cache and storage data of Google Play Servies, Google Play Store, and Google Pay while in Airplane mode and after I fully followed [MENTION=9317193]73sydney[/MENTION] procedures and Google Pay still reports that "Phone doesn't meet security" and I was unable to verify cards even though I can add them to Google Pay. Then I temporarily disable Riru Core, Riru EdXposed, and GPay SQLite Fix modules in Magisk and was able to add cards and verify them with no problems. But first I also had to give write permission to owner and group users for the file dg.db after disabling the modules and rebooting my device. Then I reverted the write permissions and enabled the aforementioned modules and Google pay now reports that contactless payment is ready. I haven't tried making payments yet using Google Pay and will report back. Thank you guys [MENTION=9317193]73sydney[/MENTION] and [MENTION=7550078]pndwal[/MENTION]l for all your help.
[Magisk] pndwal:
Yes, as a number in Magisk General Discussion thread have discovered, in the last few days even EdXposed Canary is tripping basicIntegrity again. This happened a few months ago also, and had been fixed in Canary builds, but seems Google have changed something again (speculation is that it's SEPolicy related).

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

Riru core is ok as is SQlite Fix module. Removing Riru EdXposed and clear Play services should fix.

Nb. TaiChi Xposed works with SafetyNet, but be VERY cautious!

https://xdaforums.com/apps/magisk/mod-magisk-v1-universal-systemless-t3432382/post83593791 PW
[Magisk] niko26:
[MENTION=10852223]useformildaccess[/MENTION] are you on A11? Any chance that you could post the exact steps (incl when to reboot, full list etc)?
[Magisk] pndwal:
Hey, did you try SQlite binaries from Magisk repo I suggested, rather than Titanium one? I'm unfamiliar with this. Are all your mods systemless at least? And you do have Playstore 'certified'? PW
[Magisk] useformildaccess:
No, still on Android 10. But, if what I did works for you (assuming you are passing SafetyNet but Google Pay still says "Your Phone doesn't meet security requirements":

Clear the cache and storage data of Google Play services, Google Play Store, and Google Pay in Airplane mode as was was suggested in here

Follow [MENTION=9317193]73sydney[/MENTION] procedure of installing GPay SQLite Fix modules in Magisk

Disable Riru Core, Riru EdXposed, and GPay SQLite Fix modules in Magisk then reboot

Grant write permission to owner and group users for the file dg.db in /data/data/com.google.android.gms/databases/

Add your cards in Google Pay and verify

Revoke write permission to owner and group users for the file dg.db in /data/data/com.google.android.gms/databases/

Enable Riru Core, Riru EdXposed, and GPay SQLite Fix modules in Magisk then reboot

If write permission is revoked to owner and group users for the file dg.db then you cant add or verify cards in Google Pay. But if granted and Google Pay registers EdXposed, then it renders contactless payment ineffective almost immediately. Hope it helps.
[Magisk] djjohnnyblaze:
[MENTION=9317193]73sydney[/MENTION], sent you a PM regarding SQLite3-Universal-Binaries, which is related. Please have a look. Cheers!
[Magisk] 73sydney:
Cheers, fixed

Posting update below in next post :)

---------- Post added at 09:18 AM ---------- Previous post was at 09:17 AM ----------

Magisk Method Gpay SQLite Fix.....

Changelog:

SQLite3 Universal Binaries

v1.1 - 1/10/2020

- Added

mkdir -p $MODPATH/system/xbin

In response to report from XDA user [MENTION=4950275]djjohnnyblaze[/MENTION] that the sqlite binary wasnt getting copied on his device under Android 11

Recommended especially for those folks who have recently tried installing the Gpay SQLite Fix and find it reports it doesnt find the sqlite binary, that you thought was just installed by the SQLite3 Universal Binaries module!

Current users can also check if theyre unaffected by checking the contents of the /cache/payfixfirstrun.log file, if the sqlite binary hasnt been found by the module, it will show up here as:

Links updated in main post here, or in my signature

And for [MENTION=7550078]pndwal[/MENTION] and [MENTION=4667597]Didgeridoohan[/MENTION], yes, it finally happened, as you suspected it would, i just hit the post limit in my OP...apparently the forum baulks when you try and cram 30,770 characters into a 30,000 character slot.... :)
[Magisk] niko26:
Haven't tried the SQLlite binaries from the Magisk Repo. However - I just realized that even when Magisk shows that "check safetynet" completes sucessfully (basicintegrity - check, ctsProfile - check, evalType BASIC), when going to the "Play Store" -> "Settings" -> (bottom) "Play Protect Certification" shows "Device is not certified".

Ouch.

So I did as advised from you.

* Enabled Airplane Mode

* Delete cache for "Google Play Store", "Googe Play-Services"

* Made sure that "Play Store" -> "Settings" -> (bottom) "Play Protect Certification" shows "Device is certified"

* Run/Install "GPay-SQLLite.Fix.v2.2.zip"

* Add/Enable Card for NFC payment in GPay (I think before this point I have disabled the Airplane Mode=

* Reboot

Big thanks to [MENTION=9317193]73sydney[/MENTION] and [MENTION=7550078]pndwal[/MENTION] for your support and patience!

Working On A11, September 2020 patch, Pixel 4 XL.

One question though:

Does the device still need to pass SafetyNet *after* I have successfully setup GPay or can I revert the settings/changes (I have switched to evalType BASIC) I have applied?
[Magisk] 73sydney:
Good to hear its working

Funny you mention Google Play Store displaying "Device is not certified" because i just clean flashed a ROM and noticed the same exact thing:

As my current ROM is still 10 based, but now has this months security patches, i have to use MagiskHide Props Config to load a 10 fingerprint to pass TS/EvalType, previous to this update, this was not needed...

Upon checking Google Play Store displaying "Device is not certified"

I did the same thing, cleared data for Google Play Services, Google Play Store and got it to certify

Ive never had to clear data for these ever before...weird, mayeb its an 11 thing

Perhaps going forward it will be a required step, after all it cant hurt.

Oddly, I was fiddling around with, and PM'd [MENTION=7550078]pndwal[/MENTION] about, a means to automate the airplane mode, data clear steps. I got it 98% working in about 30 minutes and then hit a bit of a snag (but it was late - early morning), but i think i might be able to get it working. I was toying with releasing it as a seperate module to do the data clear (as it can be handy for several issues) before installing the module, thinking the data clear might need a reboot before continuing on with module install. but since it seems to work without a reboot, i *may* make a test build of the Gpay Module with it built in as part of the module.....

As for your closing question, you need to manitain the safetynet pass
[Magisk] niko26:
Thanks, good to know I am not going crazy and that others had to jump through these hoops as well ;)

BTW... I was too quick. I have disabled the module which makes sure that CTS check eval type has been set to BASIC. So the CTS profile check fails.

However Play Store still shows the device as certified, plus Gpay still works after a few reboots.

Do you think it might stop working suddenly? Does Gpay do a regular check after a certain time maybe?
[Magisk] pndwal:
Well done!... Though it would be something obvious. :laugh: pays to check steps, eh. :)

I wouldn't revert. I needed SafetyNet and Playstore certified to get this going, even though some have reported being able to use G Pay without ctsProfile pass.

If you revert, you will lose Playstore certification (even if not immediately), G Pay, bank apps, some games, Netflix etc won't appear in Playstore, or work if sideloaded.

SafetyNet (spoofed Compatibility Test Suite pass w/ certified playstore) is your best bet to enjoy many apps that simply won't function if said app / Devs become aware you're attempting to load them in a 'modified environment'.

Of course, with MagiskHide and the various modules available, SafetyNet has proved to be unreliable (not a good look) for security-centric apps/Devs, which is precisely why Google is now testing ways to lock it down, and also why this 'reprieve' will almost certainly be short lived.

I'd make the most of it while it lasts, because sooner or later you will need to consider relocking bootloader (foregoing root/superuser privileges) to use G Pay or any other SafetyNet dependant apps. :( PW
[Magisk] niko26:
True. I've never seen this setting change in Play Store. Weird.

Ah - that explains why Netflix was not installed. I've never had this issue with A10 before. IIRC After a clean install with an unlocked bootloader I was able to install Netflix (at this point unrooted).

The problem I am facing her:

Since the device thinks it is not a regular Pixel 4 XL device (to make sure it does only a evalType of BASIC and not HARDWARE), the built in backups do not work properly, as in... they also switch from a "Pixel-Type" backup to "Basic-Type" backup. :(

I'm hoping that by that time Xiaomi will release a cheap wearable in Europe which supports GPay ;) I like my FitBand 4 - it doesn't support Gpay, neither does the latest FitBand 5.