yashsingh1/xdaforums huggingface dataset:
[Magisk] 73sydney:
Note: GPay.SQLite.Fix.v1.2 is the full fix that includes modifying the db with SQLite commands and requires an SQLite binary, i link only to one for arm-v7 devices. There may be other SQLite binary modules on the magisk repo for other devices. If youre running Termux, then the script will detect and use the SQLite binary included

Note #2: Theres no garauntee any of the fixes will work for everyone....i merely package up the original fix, and the alternate 440 permissions only fix....i didnt create them :)
[Magisk] philliyxx:
Magisk Play SQL Fix magisk module method didn't work. Followed instructions for manual method and it worked on my Pixel 3 THANKS!
[Magisk] ivanzipfer:
You are awesome!
[Magisk] lazyfox:
Confirmed working, play 15.3.14 pay 2.91.250... Magisk hide > ON

Cheers a million, will see if future updates does anything...
[Magisk] MC_Ohr:
I am using play services 17.7.85 on my HTC U11 life with Pie Android one may security patch. Still set the dg.db to 440 since 17.1.22

Gesendet von meinem HTC U11 life mit Tapatalk
[Magisk] zencooler:
Mine is also still working on newest version of GMS (17.7.85) and GPay (2.91.250911885) on Android Pie on Note 9. I use the dg.db patch explained in this thread plus 440 rights to the file.

BTW: it is a bit odd but the dg.db file is modified somehow today - it means read only rights are not preventing the file in full way. I think the system is changing modification date during the system start-up after phone is rebooted.
[Magisk] pressmoon:
How do I get to the point of being able to make the permission change on my rooted S9+?
[Magisk] zencooler:
Please read the first post. Points number 8-10 explained it in details.
[Magisk] s@ilor:
Worked for me, as well. Thank you :)
[Magisk] Geomatic:
Those steps worked for me, too. Do you think it's possible to un-root now?

Gesendet von meinem Mi MIX 2S mit Tapatalk
[Magisk] s@ilor:
Sounds strange :)

Did you root your device to get GPay working, as non-rooted was not working for some reasons??

Anyway, looks like it is never too late to un-root via magisk manager. There are options to restore factory boot image (for installing OTAs), or completely delete magisk from system .
[Magisk] Geomatic:
Yes, I only rooted via magisk in order to get GPay working (su access for setting the respective file read only). Now I want to get rid of root again. I wonder if GPay will still work after un-root...

Gesendet von meinem Mi MIX 2S mit Tapatalk
[Magisk] s@ilor:
Normally it must work only on non-rooted devices, and must not work on rooted ones. I rooted mine for some other reasons, GPay is not the highest priority for me to work well. Ok for now - it works. If it stops - can survive without it. But regarding your case - if Google close this solution in next updates, you may need to root once again if Community find other workaround..
[Magisk] Geomatic:
GPay doesn't work on devices with an unlocked bootloader (like my device) - even if they are not rooted. That's the point.

I hope there will be a fix also for un-rooted devices...

Gesendet von meinem Mi MIX 2S mit Tapatalk
[Magisk] cruel91:
Work perfectly for Mi 9 running ROS 9.6.23 and Magisk 19.3
[Magisk] newkydawg:
Not true about all bootloader unlocked devices. GPay works just fine on my bootloader unlocked Pixel 3XL rooted with Magisk Canary builds and running the latest Kirisakura Kernel. I did, however, have to do what the OP suggested to make GPay work.
[Magisk] Bewildered Wolf:
You're a genius bro.[emoji3590]
[Magisk] xchatter:
Works perfect, thanks!
[Magisk] user9300:
i tried everything but nothing helped my Gpay to work on samsung s9+, but since i did steps from 1st post everything is working great.. Thanks!
[Magisk] JarMagic:
Google Play and Magisk

I've read through the posts and steps, and was wondering if anyone has posted a step by step video? I can't seem to figure out how to find the stuff in SQL Data Editor to edit:)

Thanks all
[Magisk] s@ilor:
You might want to check this post

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

Method is more universal and can help without using sql editor to make changes in database.
[Magisk] JarMagic:
Second line problem

I'm getting a failure after line 2
[Magisk] lssong99:
You have typo in database name.... I suggest you just copy paste every line from the forum, not retype. It's easy to make some mistake....
[Magisk] jcmm11:
It's dg.db, not bg.db

Also instead of "chmod 444” it should be "chmod 440”
[Magisk] JarMagic:
I'm an idiot

Thank you, I feel like an idiot. I copied and pasted, was able to add a card, I'll try it at a beat by store tomorrow.
[Magisk] 73sydney:
Updated my magisk zips to fix an sqlite3 path issue...

Changelog:

v1.3 - 20/06/2019

Added additional system/bin path for sqlite as per issue reported by 00formulahawk:

Added extra chattr path possiblity

Added sleep between commands

Note: this would have stopped the gpay.sh script in /data/adb/service.d from doing the required sqlite3 changes, rendering the fix invalid under these circumstances...

Loophole closed.

Post here: https://xdaforums.com/showpost.php?p=79643248&postcount=176
[Magisk] jaggillararla:
Which zip should I take for the full features? Sleep Or no sleep ?
[Magisk] 73sydney:
GPay SQLite Fix, the first option in the downloads section for most people, the sleep version is identical except for a 30 second delay at the beginning of the script

p.s. I have tested the new release of above via a clean rom flash, and just paid in store successfully......very latest GPay as well...
[Magisk] jaggillararla:
FML still doesn't work with magisk 19.3

Edit I still saw the dg.dbp was at 660?
[Magisk] 73sydney:
I am on the same Magisk verson (stable for a change) and this is my database file

No issues here...

Try running the chmod command manually and see if you get an error,....

in terminal:

su

/system/bin/chmod 440 /data/data/com.google.android.gms/databases/dg.db
[Magisk] JarMagic:
Worked like a charm

Paid with GPay, no problems no issues. Thanks all!
[Magisk] dirtyrott3njb:
Tried on mi9se line for line..unkonwn command.didnt work
[Magisk] 73sydney:
which command didnt work.....

top tip for people reporting issues: dont be vague, the more info you give the better we can help you...

meanwhile i paid for a number of things at different stores today, still working fine
[Magisk] sliding_billy:
I've been running the exact method in the OP (down to the same SQL database editor linked in that post) since the day it was posted. I am using it on a Pixel 3 XL and a Pixel 3 with a Wells Fargo debit card and PayPal linked. All services have updated normally, and the July factory image was installed yesterday and the 3XL worked fine at the register this morning. The only thing I have done that probably isn't even necessary is to run the 'chmod 440 dg.db' in terminal after a monthly image.
[Magisk] spaceman860:
That step isn't needed because the db file is in data not system. The only time you have to do the steps again is if you clean flash
[Magisk] sliding_billy:
Gotcha. I never actually traced its location, LOL.
[Magisk] warrencoakley:
I am trying to install the GPay SQLite Fix in Magisk but it's staying it's not a module. Any ideas? Thanks for your help
[Magisk] ooonea:
The nice thing about this solution is that it is really simple. You have managed to turn it into an impossible thing. Then I saw that once you set the file values ​​and read-only permissions, nothing changes, not even with updates. Please keep it simple. Just stick to the original post.
[Magisk] 73sydney:
New version of my magisk modules out today, The Full Edition is currently available now here or the link in my sig

---------- Post added at 09:37 PM ---------- Previous post was at 09:34 PM ----------

Either youre trying to install using the source zip...dont do that (as GitHub packages the files into a folder inside the zip, which will fail and cause exactly the error youre seeing) or you have a corrupt release zip.

Always download by visiting the release link in my original post (not the repo one), and download the zip from the assests section at the bottom of the latest release, under the changelog :)
[Magisk] puosua:
Just done purchase in Carrefour using GPay successfully.

Device: Samsung Galaxy S7 Edge SM-G935FD

ROM: Stock Oreo 8.0.0, PDA G935FXXS4ESC7, rooted

Magisk 19.4 with modules Busybox for Android NDK 1.30.1, SQLite for ARM aarch64 devices v1.3 & GPay SQLite Fix v1.3 installed

GPay version: 2.91.250911885

Google Play services version: 17.7.85

Note: While applying GPay SQLite Fix v1.3, the log showed com.google.android.gsf hide successfully. When I checked Hide Status in Magisk Manager, com.google.android.gsf was not checked. I found this after just successfully paying with GPay earlier today.
[Magisk] 73sydney:
Cheers, yes i can confirm for whatever reason gsf doesnt show as hidden in Magisk Manager (this has been happening since i added magishkhide stuff to the script), but its reported as being hidden by magiskhide on the command line....dont ask me why. Its never presented an issue for me.... i have sent the powers that be a question as to why this might be happening...if people are inclined they can manually tick it in Magisk Manager until i find out why, but as i said, ive never had a problem with it the way it is......so im not sure its needed. I merely based my script on the prevailing wisdom at the time, and have sometimes altered it slightly when feedback gets posted...

Update/Edit: I have been given some timely reminders and tips by [MENTION=4667597]Didgeridoohan[/MENTION] (he makes more sense and helps more than he knows) and will hopefully have a fix for the gsf anomoly after some well earned sleep...i was going to go to sleep earlier this morning, but then wanted to get 1.4 out, and then i did some work, so after 23 hours awake, i reckon ive harned a litle nap :) Back later...

Update #2:

Didgeridoohan PM'd me some correct info on GSF hiding, whereas id bungled a bit (lot)...so the GSF hiding will be fixed later today
[Magisk] sadiku:
Hi sir

What kind of condition I should use your scrip to make Google play work? What's difference for your script vs below procedure which I capture from above?

1. Google Pay, Google Play services, and Google Service Framework hidden in Magisk Hide

2. Clear Data and Cache for Google Pay app.

3. /data/data/com.google.android.gms/databases/dg.db permissions set to 440

4. Run and configure Google Pay.

Sent from Pixel 2 XL
[Magisk] 73sydney:
Well the eaisest and most obvious answer is that my script (the 440 Only version) does that automatically (except for the Google Services Framework issue...which i havent found a solution to, but as alreayd mentioned has never stopped GPay from working for me yet , sorry to say the suggestion by digeridoohan, that i had seen somewhere before, did not pan out, GSF still refuses to be hideable via script......still working on it, and having to ask topjohnwu himself...)

Important to remember that for some people they need the full fix which modifies the database, while others report setting the database to 440 is enough. I merely packaged both ways into magisk modules. So theres no real point in asking me about the efficacy of either, i can only tell you only the full version has ever worked for me.....in other words, i didnt invent the methods, i just tried to make them easier for people to use....

Update: have actually resolved the gsf issue using digeridoohans info....bit of pebkac.... :) Will be updating all versions later today...
[Magisk] imna357:
Hi guys, wandering if any of you are on Q beta 4? Been trying since last night but google pay is no go, it used to worked on beta q 4 but bootloader locked. Thanks for any help
[Magisk] jaggillararla:
Sick it works perfectly now

Edit wait I saw this in the log

Chmod command FAILED SQLite3 command FAILED Chmod command FAILED

Rest was ok should I do anything?
[Magisk] zencooler:
Just check if you have permissions for dg.db set up as 440. If yes then don't care this message in the log. If not change this permissions manually ;)
[Magisk] 73sydney:
This is what happens when you think using simple eval and errorlevel checking ( if [ $? -eq 0 ] ; then.... ) will be good enough :)

As always working on improving

I expect the script will be 100% perfect the moment before goolge stop s messing with us and its no longer needed :)

chmod i can check with

stat -c %a /data/data/com.google.android.gms/databases/dg.db

that will return 440, 777 etc and be used to determine whether thats working properly....

easy peasy...

Other current plans with the script:

1 single edition, with user choices of possible functions at install via keycheck.....

What you lot have exposed is that i like half assing stuff, in other words, im so busy that if i find something that works (even though in the background some of it may fail because ive had almost no error checking (as per the gsf not being hidden by magiskhide)) ill ignore it :)

Recently i wrote some php code to automatically knock P2P users off a wifi network, and had it working well enough for my own personal needs in about 4 days. Then i spent 3 weeks commenting it out and making it a single file install that crates all the necessary ancilliary files itself and usable for others. And exaclty only i am currently using it. So i guess that scarred me a little at the effort put in to make it widely usable and no one taking it up. But you lot are special, so im putting in a bit more effort than i would :)
[Magisk] 73sydney:
New version of the Full Fix v1.5 & 440 Only Fix v1.5, changelog in my post, linked here and in my sig

Biggest change: working Google Framework Services hiding - thanks to [MENTION=4667597]Didgeridoohan[/MENTION]

His delimiter and cutting foo was much stronger than mine....
[Magisk] ambassadordave:
Thanks much for sharing your fixes and updates with us. I've tried it and so far it's not working, so I'm wondering if you're interested in looking into why?

Pixel 3 XL, stock(*) w/July security patch, rooted

Installed the Busybox, SQLite for ARM aarch64, and your GPay SQLite Fix (Full Edition) v1.5 modules

Tried to add card, failed with the:

Silly me didn't check the log file you drop at this point.

I tried a few things (can go into more detail if you need) including flashing the ElementalX kernel (* so now stock rom but no longer stock kernel) for its bootloader hiding. No luck, unsurprisingly in hindsight.

Checked the log file after the most recent attempt:

SQLite3 binary found in: /system/bin

Chattr binary found in: /system/bin

Google Pay stopped successfully

Chattr -i command completed successfully

Chmod command FAILED
Permissions reported as:

SQLite 3 command FAILED

Chmod command FAILED
Permissions reported as:

Chattr +i command completed successfully

I checked the dg.db and confirmed, it's permissions are still set to 660.

Previously, I'd ran BostonDan's method with success. That phone, also a 3 XL, died and this is a replacement device. So I was trying your Magisk method this time. Since it's failing, I'm game to try things if you're interested in seeing if we can further the cause here.

Else, and/or as part of troubleshooting, I can go through BostonDan's method manually again.
[Magisk] joeynshelby:
I am on q beta 4. Google pay not working for me either. I am working on it as well but no luck so far.
[Magisk] DougMG:
I was able to get it working on a Pixel 3 XL with some experimentation. You have to use the SQL database editor that [MENTION=2449699]BostonDan[/MENTION] used in the OP to edit the dg.db file. I have a different SQL editor that I usually use but the edits made with it would not stick. The same happens with the GPay SQL Fix module by [MENTION=9317193]73sydney[/MENTION]. You then chmod it to 440 and then you have to use the MagiskHide Props Config module by [MENTION=4667597]Didgeridoohan[/MENTION] and change your device fingerprint to the 3XL Pie fingerprint and Gpay will let you add cards and pay in stores. The side effect is that Netflix will show up as incompatible with your device in the Play Store.
[Magisk] joeynshelby:
Got it working ! Thank you very much !!
[Magisk] DougMG:
Glad it worked for you as well since this whole process seems to be a bit finicky.
[Magisk] 73sydney:
Your guess is as good as mine as to why simple comamnd slike chmod are failing.....it would be a sad day of i hgad to start putting in code to look for chmod....

Something is screwy on your end....

The line for chmod is literally (from gpay,sh):

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

how am i supposed to have gotten that wrong :) :)

I use the same fix i upload for you guys and happily paid for stuff just a few hours ago, as i did the dsay before and the day before that..
[Magisk] pjrs2812:
Thanks 73sydney

I am using your v1.3 full SQLite fix and it is working well on my Note8 with PIE. Is it necessary to update to your 1.5 fix or should I leave well enough alone?

What's the best method to update? Unistall v1.3 and the flash the 1.5v through Magisk or can I just upgrave over the existing version.

Thanks
[Magisk] ambassadordave:
Heh. You've already got code checking if chmod worked, so that's probably plenty good enough.

Running chmod in a terminal emulator works fine with su. Without su, I get an "Operation not permitted" message. That spark any thoughts?
[Magisk] 73sydney:
The only effective differences between 1.3 and 1.5 are that [MENTION=4667597]Didgeridoohan[/MENTION] provided a fix for successfully hiding Google Services Framework in the install script, and the additon of some error checking and logging for people having weird issues. Google Services Framework had never been blocked for me in all the time i thought it was, so im not 100% sure its necessary, but as with everything in this thread, what works for one may not work for another.

So, if you want to, hide Google Services Framework in Magisk Hide in Magisk Manager, and then leave things alone if they are working, next time you flash a custom ROM, or next time theres a major update to the script to fix google tampering (who knows if they will try and close the loophole) then id think about updating the script....

---------- Post added at 08:04 PM ---------- Previous post was at 07:52 PM ----------

Yes, only are you sure youre rooted ? :)
[Magisk] ambassadordave:
Uhm, pretty sure? Rooted with Magisk 19.3. I'm able to access the root folder and change permissions on the dg.db manually (with either su in terminal emulation or the Root Explorer app). Other rooted apps (e.g. Titanium) seem happy?

Only oddity I know of is that since hiding Magisk Manger, while it shows that Magisk & Magisk Manager are each "up to date", it shows "INSTALL" by each as well.
[Magisk] mmidders:
Worked for me. Thanks.

The real idiocy of this situation with google pay is that I had reverted to unrooted, stock (Miui 10) rom to try and get it working and had to re-root to fix it!
[Magisk] imna357:
Thanks a lot mate...your instructions plus the 1.5 by sydney works(Q beta 4 here).
[Magisk] 73sydney:
Weird....
[Magisk] fipm:
is the fix confirmed to work on a pixel 3a xl? I tried on mine following the instructions, but I still cannot add cards.
[Magisk] CSX321:
Isn't that normal? Mine has always been like that.
[Magisk] Didgeridoohan:
It is.
[Magisk] ambassadordave:
That's good to know. I don't think I ever paid it much attention after hiding it. The last time I recall looking was just before finding BostonDan's method and I kind of left things alone for a while after that. Thanks for confirming it's normal!

In the end, for my Pixel 3 XL running Pie (July update), BostonDan's method still worked, I'm able to add cards to GPay again. Not sure why 73sydney's script can't change the db file permissions, but manual worked.

Have you checked the logfile at /cache/payfixfirstrun.log ? I'd half expect it failed at the same place my 3 XL did.

If it helps, BostonDan's method (which 73sydney's script builds upon) is further back in this thread, or in a new thread here.
[Magisk] alphahere:
Works for me on the Pixel 3a XL.
[Magisk] 73sydney:
I'm a bit wtf why it fails running via my module too, it's the same blooming commands :)

You all should just buy a Note 4 like I have and live in bliss :)
[Magisk] sasquatch006:
Thanks for this. Finally got it working on my P2XL w/latest Magisk Canary using this method.
[Magisk] bosox284:
I just tried to use the script with no luck on my Pixel 2 XL. For whatever reason chmod failed on mine.
[Magisk] 73sydney:
Cheers for that. It does seem for some devices a delay is a positive thing, and for some devices when run early it's a benefit...i.e. with my note 4 (and some other devices) the Google pay stop fails because it's way too early to be running when the script kicks in. Was talking to someone else, hallowed be his name and was thinking of removing that step. But if a sleep delay is actually useful/necessary for some devices, then I'll have to rethink my not recommending the sleep version.

When I took this on I did not think it would be this fiddly :)

I appreciate the time you took to investigate my half assed script:)

I shall take all on board later when in home, currently waiting to board a ferry across Sydney Harbour to go and do a wifi site visit. Not a bad way to spend a warm winter afternoon....
[Magisk] joeynshelby:
I wanted to follow up and again and say that I actually used Google pay today in store and it worked as well. So adding cards and actually using them in store is working following your directions.
[Magisk] DougMG:
Thanks for the follow up however I can not take much credit for it as the first part is straight @BostonDan and the device fingerprint change was inspired by a Magisk module called SafetyPatch by [MENTION=8556932]hackintosh5[/MENTION] that as part of its functionality also changes the device fingerprint, in it's case to Hauwei phone which worked as far as GPay went but made Google Camera, ARCore and Netflix show up as incompatible in the Play Store. So I tried the Pixel 3XL fingerprint and it took care of the first two problems but something else is going on with Netflix because even with the Play Store showing the device as certified Netflix shows as not compatible with the 3XL with the Pie fingerprint but shows up fine with Q beta.
[Magisk] 73sydney:
[MENTION=4487388]jcmm11[/MENTION] and all

I am working on a combo of jcmm11's fixes and some from [MENTION=4667597]Didgeridoohan[/MENTION] as well to mix up and hopefully get not only the gpay.sh working for everyone, but also the uninstall.sh as well.

wasnt any progress today until now as i had ato have a recovery day after yesterdays 5 locations across sydney jaunt...still recovering form a seizure 2 years ago that left me immobile and horizontal up until a few months ago. I get worn out easy :)

just starting work on the changes now....at 10:37PM local time :) im not asking myself where the day went, i know where it went :)

both things involve introducing sleep or wait states, which if youre like me and use the magisk nova launcher module causes havoc....when any modules use sleep or post-fs-data modes, they become blocking to other magisk modules and can cause havoc...for me it means my Nova launcher wont load...which is a dealbreaker

Trying to find a universal solution sometimes is not easy
[Magisk] 73sydney:
Okay, v1.6 of the magisk modules are now available in the original post here, or via my sig below

New:

install.sh:

- Removed chattr for added complexity and sleep states that was causing delays and blocking

uninstall.sh:

- Removed chattr for added complexity and sleep states that was causing delays and blocking

- Added checking for dg.db database and chmod - sleep states added until both are accessible

- This is the 1st version of the module that *should* FULLY uninstall

gpay.sh:

- Removed chattr for added complexity and sleep states that was causing delays and blocking

- Added checking for dg.db database and chmod - sleep states added until both are accessible

Please also read the warning and upgrade notes in the post
[Magisk] imna357:
Dang...short live. Mine stopped working today says I can use it online but not in stores, updated to 1.6 still not working on Beta Q 4.