yashsingh1/xdaforums huggingface dataset:
[Magisk] PriMieon:
I downgraded to 16.0.89 again two minutes ago

Then updated to 16.0.91

Then tried re-adding a card.

It worked flawlessly. No problems. I was able to add the card.

Using the Google pixel 3 on May 5th security , AOSIP Tom, no custom Kernal, magisk 19.1

Tried it twice now. I'm and to add card with no problems.

Edit:

What should fail? The update to 16.0.91 or adding a card in 16.0.91?

Both work flawlessly

---------- Post added at 12:53 PM ---------- Previous post was at 12:45 PM ----------

EDIT:

added a third card. Finally failing. Will continue now. I will update soon

---------- Post added at 01:27 PM ---------- Previous post was at 12:53 PM ----------

I am now deleting all folders one by one. I will force stop Google pay after each failed attempt re-add a card.

I will only update you on folders that caused any previous results to alter.

______

Deleted "app_webview_admob_service"

Getting a new error when trying to reconfirm a card: "card couldn't be added you can try again later or try adding a different payment method"

But adding a completely new card tells me that online payments will work but not in store payment due to my phone being rooted or altered.

______

Deleted "cache"

No longer getting the "card couldn't be added you can try again later or try adding a different payment method" error but the old standard error instead

______

Deleted "databases"

Adding all cards now work.

All the folders that survived the "deleting every folder one by one process":

-files

-no_backup

-shared_prefs

-snet

______

I will now repeat the whole process but only delete the "databases" folder and see if only deleting this folder works

---------- Post added at 02:05 PM ---------- Previous post was at 01:27 PM ----------

What I now did is go back to 16.0.89, backed up it's databases folder, updated to 16.0.91, then my phone auto updated it to 17.1.22, tried to add a card, got the typical error, the went to com.google.android.gms and replaced databases, tried to add a new card but get this error in a checkbox upon trying to open GPay:

"Google Pay is unavailable

Check connection and try again

Ok"

I've tried it on WiFi and cellular data and restarted my phone. Won't work.

Upon Deleting the databases folder again I'm granted access again. Re-adding the folder denies me access.

That's on 17.1.22 with a 16.0.89 databases folder however.

Any more requests?
[Magisk] Paz9:
wow

thank you!

so we are 100% sure that the databases folder is the culprit?

when you get the "check network connection" error have you tried clicking ok and then trying it again a few times? i used to get this error and after about 4 or so tries it worked.

the next task would be trying to find out what file in the database folder is causing the error

then comparing the files with the working and the non working.

if you have time perhaps you could delete the files in that folder and try again and pin point the file or files causing the problem and hopefully we can create a fix by it

fingers crossed!
[Magisk] PriMieon:
Currently busy writing a protocol about what I did each week for the last 14 months. Normally I'm supposed to do it every week but I haven't done it since a year haha. Now it's due until Tuesday. So let's hope I'll be done by today so I can test it tomorrow. I think I'll do it today or tomorrow.

And yes I have tried relaunching it several times. It would launch immediately after I deleted the old "imposter" databases folder.

I will do more testings later but as of now I'm a little busy.

Edit:

And yes. Pretty damn sure it's the databases folder. I even made sure to force stop Google pay each time to make sure it would boot up with the freshly deleted folder.
[Magisk] Paz9:
thank you so much! i owe you a cup of coffee!

atleast we now know that the database folder is the culprit, once we find out the problem file it shouldnt be too hard to apply a fix.
[Magisk] PriMieon:
Do you actually work with fixes?? Do you code?

I'm really interested in stuff like this. You could tell me what you have then done. I am kinda sad that my technological knowledge is only above average and not crazy good. ;-;

I was the kind of kid who knew nothing about tech but then learned a bunch by hacking his own Wii by the age of 13.

I really knew nothing about tech. I didn't know what "the root of the sd card" or a CPU.

Now I'm pretty good with tech but I never coded anything. So if you do know how to do those kind of things you could tell me how you would address the problem. I'd love to fix this issue. I just lack in knowledge. But got the will haha
[Magisk] Paz9:
depends what the issue is, but i do code occasionaly and script, i do some SQLite and PHP.

but with android its quite different - once we find out what file is causing the issue (and once i finally get back behind my PC) ill attempt a fix and write down every step :)
[Magisk] PriMieon:
Thanks. Perhaps some day I'll start to build up more knowledge. Top John Wu has one of the coolest projects ever. If I could I would help him a lot as I think magisk is freaking awesome.

But I'm currently studying Japanese which is my main time consumer now. My love for Japanese just manages to beat my love for technology.

But yeah please note down a few things. I'd be really interested.
[Magisk] fbxdadev:
Can anyone help? I don't understand what this means... I wouldn't manually update of course, but I can't find a way to prevent automatic updates to kick in, and so I keep going back to 17.1 which stops google pay from working...

Thanks
[Magisk] warrencoakley:
Revert back to 16 of GMS and disable Play Store. It's currently the only fix that works for me
[Magisk] fbxdadev:
Thanks warrencoakley, I am able to downgrade to 16, but I cannot keep it to 16... the first post in this thread said:

But this seem to suggest there is a way to prevent automatic updates?

I wouldn't update it manually, but it does update automatically after a while.

Any way to prevent that?
[Magisk] muzzy996:
His reply to you suggests that disabling play store after you revert GMS back is the solution. Obviously this also means no more updates to other applications. I haven't tested this solution because of that. Until a true solution is found I'm fine pulling my credit cards out.
[Magisk] MC_Ohr:
I have now revert gms to 16.0.89 in fly mode and updated manually to 17.1.22 and I'm ablo to pay in store with gpay and paypal. I also manually copy all files expect android_pay to /data/data/com.google.android.gms so my wear watch is still working with old settings.

Gesendet von meinem HTC U11 life mit Tapatalk
[Magisk] Tr4sHCr4fT:
Add a trigger to the android_pay database which resets fails_attestation column to 0 every time its updated to 1 :laugh: wanted to try myself but there are no working sqlite3 binary for ZF2
[Magisk] JaylanPHNX:
Is there a critical first step I'm missing if under Play Store settings it says device not certified? (Pixel 2xl, latest OTA, latest Magisk, EX kernel)
[Magisk] jcmm11:
Settings: Apps:Play Store

Force stop, then delete data. Restart. Should either show certified or no status. If no status just be patient. (This assumes you pass Safety Net)
[Magisk] Nekromantik:
So I had interesting experience. I have pixel 2 XL and clean flashed cosp ROM and hid GPS in magisk and could add card and pay. Then I wiped it and flashed du and had exactly the same apps running as cosp but can no longer add card. So looking like ROM can affect it now. On du I find it impossible to add card.
[Magisk] bigknowz:
Running DU, also had issues after May update. Reverted GPS to 16.089 added cards and froze Play Store in TiBu. Haven't paid with phone yet, will post again if issues.
[Magisk] Nekromantik:
Yeah I did not need to downgrade GPS on COSP. I was running latest and working fine.

I really cant be bothered to freeze updates.

I am planning on getting OnePlus 7 and will maybe try stock and non rooted and see how I like it.

Hopefully a dev can start to see if there is anything they can do in Magisk to re-enable this.
[Magisk] nomisunrider:
What am I missing here?

I uninstalled magisk, installed may pixel 3 xl update, removed gms folder, and uninstalled google pay.

Reboot. Install and run google pay and try to add a card. Says I am rooted...
[Magisk] highdiver_2000:
If you are going back to stock, the bootloader needs to be locked
[Magisk] nomisunrider:
This works with the extra step of deleting /data/data/com.google.android.gms and reboot.

Also, the disable service apk you linked doesn't work on my pixel 3 xl with may update but i found this app that does.
[Magisk] wabmorgan:
Or if you don’t need root, you might try flashing a kernal that hides the unlocked boot loader.
[Magisk] BostonDan:
Just want to say that I figured out a way to verify Google pay on gms 17.1.22 (or at least it let me add a card. Will try paying tomorrow) with rooted, bootloader unlocked pixel 3xl with custom kernel.

It's not hard and does have to do with attestation.

Edit: I added 2 cards already in my Google wallet along with my pay pal, and added 2 cards fresh that were not in my Google wallet.

Cheers,

B.D.
[Magisk] warrencoakley:
What version of GMS are you on? If it's 17 you'll need to roll back.
[Magisk] karnasw:
And what is the solution?
[Magisk] dadenet:
HI ,

I've a pixel 3xl ,

bootloader unlocked and Magisk manager rooting , Stock rom ,

gpay does not work with my CC ,

Which is the correct procedure to solve this issue ?

Thanks in Advanced for helping !
[Magisk] BostonDan:
I am still investigating, and will post the solution in the near term if it continues to work. There are 2 things I would like to verify -

1) that it truly works with a payment (it allowed me to add cards, which is a good sign, but I have not verified that it would permit me to make a payment) and

2) that it continues to work, even when gms is upgraded, due to one of the steps.

I will keep people informed, but I do not want to post a temporary solution that may not even work at this time to allow a payment, as I have not even verified this step yet.

Cheers,

B.D.
[Magisk] sliding_billy:
Looking forward to your findings and willing to help test if you need. I dropped trying to solve the GPay issues on both a stock/rooted P3 and a P3XL running dotOS given the on again off again nature of solutions and the fact that for the most part they required downgrading services that are surely more important to the device than GPay is to me.
[Magisk] MC_Ohr:
For me it is working since I downgraded to 16.0.89 in flight mode and updated manually to 16.0.91 an immediately to 17.1.22. I have 100408 (arm64-v8a,armeabi-v7a)(480dpi) on my HTC U11 life running Android 9 April security patch and magic canary 19101

Gesendet von meinem HTC U11 life mit Tapatalk
[Magisk] Nosferatu.:
Well still working well over a month later. Just used it today at Chic Fil A.

OxygenOS 9.0.13 rooted

GPay 2.86

Play Services 16.0.91

Magisk v19

Magisk Manager 7.1.2

Magisk is not hidden but Play Services I specifically have all it's sub-services checked in MagiskHide. I did this back in early April. We're now in mid-May still works. So if you have a OnePlus device on OxygenOS this works. No fancy trickery other than following the directions in this thread from the following post:

EDIT: I'm reading back a few pages so there's a new Play Services 17 that'll wreck this? Wonderful...

https://xdaforums.com/showpost.php?p=79246020&postcount=792
[Magisk] jmaa_:
*taps foot*

I'm still trying to figure it out myself from a fresh install and made some progress but still can't get cards to successfully add. Eager to hear what you've come up with.
[Magisk] BostonDan:
Ok. I tried this and it worked on gms 17.1.22, allowing one to add cards and pay in store. Warning YMMV, but this is the process I did to get this working. One caveat is that Google pay does not register the "recent transactions" on the Google pay app. Another caveat is that I suspect users will have to reverse some step if gms is updated and then reapply, but this still needs to be confirmed

Without further ado, here is my process:

1) download a SQL database editor. I used

https://play.google.com/store/apps/details?id=com.tomminosoftware.sqliteeditor&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 databse editor I used)

7) open the terminal emulator.

8) get root access (su)

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

10) type: chmod 440 dg.db

This makes dg.db read only (for owner and group, and no access for world.)

11) reboot

I suspect when gms is updated, one will have to go back to steps 10 and 11 and chmod 660 dg.db to allow new keys to be written to the database, and then go back and redo all these steps to reset the attestation values back to 0.

If there is still an error, verify in sqlite database editor that all attest release keys values in dg.db are 0 when dg.db is read only (owner and group).

Again, YMMV but this worked for me, so I give it back to the community now.

Edit: recent activities did show up soon afterwards for the payment method.

Cheers,

B.D.
[Magisk] eelsid:
Thanks for this detailed explanation! Unfortunately for myself it's still not allowing me to setup in store payment. I've validated that the attest values are set and remain set to 0 in the db.db but as soon as it errors it updates the fails_attestation value in the android_pay db back to 1. I have tried making that database read only but then google pay won't even start up.
[Magisk] BostonDan:
I should add that I still have magisk hide for Google pay and gms on magisk 19.1.

Have you checked magisk safety net check for ctsprofile and basicintegrity both show as true?

Edit: also be sure you have a custom kernel or else it may trip a different attestation check.

Hope you can figure it out.

Cheers,

B.D.
[Magisk] wabmorgan:
Worked like a charm

Worked like a charm. Much thanks !!!!!!
[Magisk] johnlgalt:
So, only for non-stock kernels?

Damn.
[Magisk] wabmorgan:
Worked for me on the stock kernel.
[Magisk] BostonDan:
Can't guarantee, but I suspect non-stock kernels trip a different attestation check. I am using a custom kernel and it works for now.

Cheers,

B.D.

---------- Post added at 04:07 AM ---------- Previous post was at 04:05 AM ----------

Good to know. That's why I caveat everything with YMMV. I'm just speculating based on my own use of a custom kernel for eelsid what might have caused this not to work for him.

Cheers,

B.D.
[Magisk] Paz9:
i think i found a fix
[Magisk] eelsid:
Safety net check passes for both. I'm on Q beta 3 running the ElementalX kernel beta for Q. Running on Q may be the differentiator. I also can't downgrade play services below 16.8.6 as that's the built in version under /system/product/priv-app.
[Magisk] BostonDan:
It may be due to Q. I'm on Pie and it works, so it may be the new Android version.

Cheers,

B.D.
[Magisk] Paz9:
FIX

1. make sure you have a working gpay (with an older version of GPS)

2. navigate to /data/data/com.android.gms folder and copy /database folder to your internal SDCARD

3. upgrade google play service to latest then delete the gms folder and restart

4. attempt to add card in gpay and it should fail.

5. go back to the copied database folder in your sdcard and copy all its contents except "android_pay" to /data/data/com.android.gms

6. force close google pay and reopn and add card again and it should work.​
[Magisk] bark1234:
Dude please make a new thread for this fix. soon it will get lost in flood of replies.
[Magisk] BostonDan:
Done. Good idea. New thread can be found at:

https://xdaforums.com/apps/magisk/magisk-google-pay-gms-17-1-22-pie-t3929950

Cheers,

B.D.
[Magisk] highdiver_2000:
Unintended side effect of trying to stop Play Services update. I killed my gcam 6.2
[Magisk] Superschmiddi:
My GPS updated to 17 now, even with DisableService... I Think it will fail if I try to pay in a shop today. Is there already a fix out and a method to test if the payment in shops work without failing in a shop?

edit: I saw BostonDan's Post (#1315), did his steps and will try this afternoon in a shop.
[Magisk] zencooler:
Yes. There is a simple apk to check attestation test trigger written by some of this thread members. You can find it in this thread.

You can use this tool to check your GPay status instead be surprised in the shop. I use it regularly and it works fine for me.
[Magisk] Superschmiddi:
Do you have the post, his name or the apk name so I dont have to read over 100 pages ^^
[Magisk] BostonDan:
Page 63 - user Freshek

Hope this helps!

Cheers,

B.D.
[Magisk] Superschmiddi:
Yes, thank you. The check fails for me, so the workaround you wrote in Post 1315 doesnt work for me :(
[Magisk] HamsterHam:
Using the [MENTION=2449699]BostonDan[/MENTION] method that check fails but I was still able to pay.
[Magisk] zencooler:
It's possible. Developer wrote this tool for a standard GMS database check. BostonDan's method changing values manually directly in the database and this may mislead the tool to check the status.

I use the standard way of keeping GPay working (explained many times in this thread) so I am happy with GPay working like a charm with no problem at all, paying every day using few cards definied in the GPay.

But the BostonDan's way is a great news for having all apps updated with GPay still working.
[Magisk] HamsterHam:
[MENTION=2449699]BostonDan[/MENTION]'s way is better as I keep my WearOS / watch connection all intact. Paid again and it worked.
[Magisk] maverickzz:
This worked like a charm.. THANK YOU.

I was about to give up & go back to stock ROM from frustration.

Maybe a small Tasker App can automate all of this? beyond my capabilities to do the DB edits in tasker/shell, but I already did an app to force stop GPay, chmod 660 the DB, launch SQL editor, and once closed, chmod 440 the DB again....

Which automates all your steps except the DB edit itself..
[Magisk] Paz9:
so why is GPS attestation being triggered?
[Magisk] BostonDan:
There are many reasons why - unlocked bootloader, root (or just presence of magisk), TWRP, etc. Etc. Google wants stock phones for Google pay for fear of fraud. Most of this community wants root for valid reasons (e.g. Viper4Android for example) and wants to use Google pay.

Cheers,

B.D.
[Magisk] PriMieon:
Currently at it again.

I will only update you on the files that cause a change.

And as always: I'm force stopping GPay at every attempt

"app_state.db-wal" → deleting it now pulls up all Google accounts I have on my phone when trying to open GPay. I then choose my main Google account but I'm then greeted with this error "there was an problem setting your active account. Would you like to try again?" "Ok"

(It ask me if I want to try again but only gives my a ok option xD)

I have since removed all Google accounts except for my main account. Now opening today just pulls up the error message right away. I will now restart my phone. If it doesn't work then I'll continue deleting each file one by one. If at the end it still doesn't work I will do the process all over again but skip this specific file

---------- Post added at 03:38 PM ---------- Previous post was at 03:30 PM ----------

Oh wait. Have you figured it out?

Sorry that it took me so long to get back to you >< haha

But I'll assume that you're done. How did you figure out the fix?
[Magisk] Superschmiddi:
[MENTION=2449699]BostonDan[/MENTION] Method worked like a charm :good:
[Magisk] Paz9:
DG.db database has to have attestation reset to 0 and it works :)
[Magisk] joeyddr:
This does indeed work, but it also prevents fit data from being updated, just an FYI.
[Magisk] HamsterHam:
Mine is updating with that fix.
[Magisk] joeyddr:
the history is there, but all my data from this morning was at 0, once i changed the perms back it all updated.
[Magisk] bigknowz:
Have you tried this method without fail attempt in step 4?
[Magisk] HamsterHam:
Mine is fine. Nothing is showing as 0.
[Magisk] CSX321:
Mine, too. I don't see anything out of the ordinary with Fit after doing this. I do have a Wear OS watch collecting Fit data, in addition to my phone. Don't know if that affects it at all.
[Magisk] extreme_blue:
What finally worked for me was to hide magisk from the apps, hide magisk from detection, rename magisk to use a random package, the normal things to avoid detection.

The one thing that I blindly did without thinking was after rebooting, I click on Checking SafetyNet status. It asks to install an extension. I decided not to do that and Google Pay worked just fine.

Pixel 2 XL - Android Q beta 3 - Canary build
[Magisk] BostonDan:
Cool. Good to hear this works on "Q"!

Cheers,

B.D.
[Magisk] Tr4sHCr4fT:
if you pass attestation otherwise but still fail to add particular cards, with a message like "contact bank" but without the "

device is altered

", try downgrading GPay to 2.85 with adb i -d -r <.apk>

Thus i could finally add a card again that before failed to do so for weeks...
[Magisk] Emoclaw:
Here's how to stop the Play Store from updating Google Play Services without freezing/disabling it.

From any root file manager app go to /data/app and create 2 folders, name them "com.google.android.gms-1.apk" and "com.google.android.gms-2.apk"

OR using any terminal app, run the following commands

su

mkdir /data/app/com.google.android.gms-1.apk

mkdir /data/app/com.google.android.gms-2.apk

Try this if editing the database doesn't work for you. Works perfect on Play Store 14.5.52-all and GPS 16.0.89
[Magisk] bigknowz:
Currently have a folder com.google.android.gms with a bunch of random characters after gms. Is that correct?
[Magisk] PuffDaddy_d:
So, I gave this a shot and tried to make a purchase today. My phone showed a successful payment but the payment terminal read "card declined". Any thoughts?

Pixel 3 running Android 9 Pie
[Magisk] BostonDan:
Can you check what version of gms (Google Play Services) you are on?

Cheers,

B.D.
[Magisk] marshedpotato:
Hi guys, I started reading through this thread but I got about 20 pages in and then saw there are 136 pages... a lot of the info seems outdated or not relevant. Is anybody able to give me a quick summary to save me reading over 100 pages? What is the current situation?

I have Xiaomi Mi MIX 3 running LineageOS, Magisk 19.1. I have Magisk Hide working using the SafetyPatch module, my banking app and some others are working, but Google Pay still seems to be detecting a root. Is this same issue that you are discussing here, and is there a resolution at all? Thank you so much
[Magisk] zencooler:
Read carefully last few pages and you will get an answer.

To summarize you have two ways of solving this issue:

1. Clear GMS data (and/or it's folder) + GPay data and reinstall GPAy and add your cards again + freeze Google Play Store to keep GMS not auto updated (on any ver. <17.x).

2. Use method of changing one of GMS database records to clear attestation test trigger.

Regards.
[Magisk] eelsid:
I'm baffled. I removed /data/data/com.google.android.gms using TWRP. I uninstalled magisk completely using the uninstaller zip. I uninstalled magisk manager. I installed the ElementalX custom kernel. I installed the 2.85 version of Google pay. I'm currently not rooted on Q beta 3 with a custom kernel to hide the unlocked bootloader and it still says my device is "rooted or altered" when I set up in store payments. Is ElementalX not hiding bootloader status? What kernels are everyone using? Only other thing I can think of is if there is something under /data outside of gms or Google pay folders.
[Magisk] jcmm11:
It may also be Q. What happens if you run a safety net test? Try these 2 apps (one is a safety net check, other is a root check):

https://play.google.com/store/apps/details?id=com.scottyab.safetynet.sample

https://play.google.com/store/apps/details?id=com.kimchangyoun.rootbeerFresh.sample