Working: Magisk with Google Pay as of gms 17.1.22 on Pie

Search This thread

haoyangw

Senior Member
How about (because my Automate flow stopped working for some reason, and i decided to switch to magisk only methods):

Magisk Method Gpay SQLite Fix.....

Changelog:

v1.7 - 12/07/2019

Thanks to @Didgeridoohan for the updates, in all my years of dabbling in linux and bash, i'd never come across subshells....

This change removes the possible issues with other modules, such as i was having with the Nova Launcher magisk module.

An update from any version below v1.7 is recommended. For those on versions below v1.6, please follow the terminal commands shown inthe Upgrade Notes section below

New:

uninstall.sh:

- Script is now run in a subshell to avoid blocking and sleep issues with other modules and processes

gpay.sh:


- Script is now run in a subshell to avoid blocking and sleep issues with other modules and processes


v1.6 - 11/07/2019

Only Full Fix & 440 Only versions remain, the Sleep 30 Edition has gone as both the Full and 440 Only versions now both use sleep cycles to wait for required binaries and the dg.db database to be available before proceeding in the service.d/gpay.sh and modules/uninstall.sh scripts

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

Credits:

Added checking for boot complete & db.db availability due to feedback from @jcmm11
Added checking for chmod availability due to feedback from @Didgeridoohan

Both were suggesting similar things to me via different methods at the same time :)

Older changelog hidden below...


v1.5 - 06/07/2019

Only Full Fix & 440 Only versions updated at this time....

New:

install.sh:

Attributions for those who made this all possible

-BostonDan - for the OP and original fix

-braveheartleo - for the chattr suggestion

-Didgeridoohan - for the working method to hide Google Services Framework sub services (and therefore Google Services Framework as a whole) via magiskhide in a script loop

-Updated some wording....

gpay.sh:

-Added better permissions checking and logging of actual permissions. If there are issues with chmod then it should be eaiser to see...

-Adding better error checking and logging where i can....

Fixed:

install.sh:

Google Services Framework is now hidden via magiskhide via the install script - thanks to Didgeridoohan

Outstanding issues:

uninstall.sh:

Uninstall script still fails to work, working on it.....


v1.4 - 04/07/2019

New:

install.sh:

Install time info, so people will know without having to go to terminal to see if SQLite3 or Chattr are found.

No more terminal troubleshooting, hopefully....

Required files/packages are now checked and their paths shown (if they exist) or warnings given (if theyre missing), to user at install time:
--BusyBox (to provide chattr)
--SQLite3

Packages being hidden by MagiskHide are listed and their hidden status shown to user:
--<packagename>: hidden successfully - for packages newly hidden
--<packagename>: already hidden/not hidden successfully - for packages already hidden or unable to be hidden (assume the former (already hidden) more likely than the latter)

Packages having their caches/storage cleared are listed and their clearing status shown to user (currently only Pay):
-- <packagename>: successfully cleared
-- <packagename>: not successfully cleared)

gpay.sh (renamed from server.sh in common (was being renamed to gpay.sh on copy)):

On first run a log is written to /cache/payfixfirstrun.log, logged are:
--SQLite3 and chattr binary locations
--The output success/fail of chattr, permissions and SQL commands

uninstall.sh:

On uninstall a log is written to /cache/payfixuninstall.log, logged are:
--SQLite3 and chattr binary locations
--The output success/fail of chattr, permissions and SQL commands

Fixed:

Slight boo boo at not adding chattr to the end of the file check eval in gpay.sh - now all possible paths (termux/bin/xbin) are checked for chattr. Been hella busy, bound to miss stuff, sorry folks....

NOTE: Only the Full Edition (first link) has been updated to v1.4, the others will be done later today


v1.3 - 20/06/2019

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



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.

Added extra chattr path possiblity
Added sleep between commands


v1.2
Changed module name to a shorter name without the typo (calling it Google Play lol)
Shortened zip and module name to make it easier to read when selecting and installing from local storage
Added hiding of the suggested packages via install.sh:
-com.google.android.gms
-com.google.android.gsf
-com.google.android.apps.walletnfcrel
Added clearing of Google Pays cache and storage via install.sh
Add uninstall.sh to:
-remove chattr blocking
-reset /data/data/com.google.android.gms/databases/dg.db to default 660 permissions
-remove /data/adb/service.d/gpay.sh
Changed 444 permission only version to 440 according to many recent posters 440 is good enough

v1.1

-All editions now using service.d by default (instead of post-fs-data which is blocking), on install service.sh is copied to /service.d/gpay.sh

Special thanks to V4A Magisk Module which i noticed copies a service.sh to service.d...i backtraced their install routine and borrowed (stole)
their method (using the $NVBASE variable) which i hadnt seen documented before...thanks V4A crew :)

They use (in part of their on_install() routine:



I borrowed (stole) this idea and cheekily changed to



Install.sh and module.prop also tidied up



Requirements:

SQLite3 binary - i have included one on my github for armv7 chipset devices. SQLite3 binaries for other chipsets may be found on Magisk Repo

For arm64-v8a (aarch64) users, an SQLite binary is available from the Magisk Repo: SQLite for ARM aarch64 devices

For all/other architectures, theres some provided here (untested by me): https://xdaforums.com/general/general/binary-sqlite3-binary-android-pie-t3721530


Installation:

1) Install an SQLite binary (i offer an armv7 one in my downloads section below)
2) Install a Gpay SQLite Fix zip form below (Full Edition highly recommended for most people)
3) Add card
4) Reboot

It *should* be that simple.


Upgrade process (version v1.6 and above):

- Uninstall previous version
- Reboot
- Install latest

Upgrade process (versions below 1.6:

Because the new version no longer uses chattr, for anyone using a verison older than v1.6, you will want to issue the following commands via a terminal to put /data/data/com.google.android.gms/databases/dg.db in its original state before installing the latest version:



- Uninstall previous version
- Reboot
- Install latest


Uninstall:

1) Remove via Magisk Manager - all changes except packages hidden via MagiskHide and clearing the cache of Google Pay are reverted
2) Reboot


Downloads (hosted on my github):

Github releases (all now using service.d method):

GPay SQLite Fix (Full Edition) (full fix - SQLite changes and permissions change) (Recommended):
repo: https://github.com/stylemessiah/GPay-SQLite-Fix
release: https://github.com/stylemessiah/GPay-SQLite-Fix/releases/latest

GPay SQLite Fix (440 Only Edition) (only sets 440 permission on db, no SQL commands executed):
repo: https://github.com/stylemessiah/GPay-SQLite-Fix-440-Only-
release: https://github.com/stylemessiah/GPay-SQLite-Fix-440-Only-/releases/latest

SQLite3 v4.1 static binary (for arm-v7 devices ONLY and NOT using termux) here (installs to /system/xbin):
repo: https://github.com/stylemessiah/SQLite3-v4.1-arm-v7
release: https://github.com/stylemessiah/SQLite3-v4.1-arm-v7/releases/latest
Just to share, full edition worked perfectly on my Google Pixel 4 XL running Android 10 rooted with Magisk v20.1. Magisk Hide enabled but only for Google Play Services(which is the default). Didn't turn on Magisk Hide for Google Pay, but could already add a card in Google Pay. Haven't tried paying at a terminal yet, but I believe it will work :) Gonna update again when I get to try it
 
  • Like
Reactions: vonDubenshire

prgopala

Senior Member
Jun 10, 2010
513
118
Sydney
Google Pixel 6 Pro
This is not working for me anymore.
I updated my Pixel 4 to Nov Patch. Did everything like op (which worked before on Oct Patch).
Google Pay states that Device is rooted when trying to add a card (tried various) No attest values in dg.db.
I'm using stable magisk 20.1 and safty net passes.
Anyone else?

I managed to get this working only by running magisk in 'core only mode' on a Pixel 4 (latest November update). I could add a card which could not be added earlier. Also i haven't tried paying using the phone yet so will have to wait for my next purchase.
It also means i cannot run any module.

---------- Post added at 02:38 PM ---------- Previous post was at 02:35 PM ----------

Just to share, full edition
Sorry, but full edition of what? You mean stable magisk is it?
Would you mind putting down a step by step method ?
 
Last edited:
  • Like
Reactions: vonDubenshire

haoyangw

Senior Member
Sorry, but full edition of what? You mean stable magisk is it?
Would you mind putting down a step by step method ?
Oh I meant that I installed the variant of the Magisk Module(quoted in my post above) called 'Full Edition'. All I did was install that module, install the SQlite for Arm64 Magisk module, and reboot. Then Google Pay allowed me to add a card even in non-core only mode. I'm on the latest November update as well.
 

vonDubenshire

Senior Member
Feb 10, 2018
518
112
USA
Samsung Galaxy Tab S2
LG Nexus 5X
I managed to get this working only by running magisk in 'core only mode' on a Pixel 4 (latest November update). I could add a card which could not be added earlier. Also i haven't tried paying using the phone yet so will have to wait for my next purchase.
It also means i cannot run any module.

---------- Post added at 02:38 PM ---------- Previous post was at 02:35 PM ----------

Sorry, but full edition of what? You mean stable magisk is it?
Would you mind putting down a step by step method ?
Hide all Google play services you'll be good
 

prgopala

Senior Member
Jun 10, 2010
513
118
Sydney
Google Pixel 6 Pro
Oh I meant that I installed the variant of the Magisk Module(quoted in my post above) called 'Full Edition'. All I did was install that module, install the SQlite for Arm64 Magisk module, and reboot. Then Google Pay allowed me to add a card even in non-core only mode. I'm on the latest November update as well.

Thanks.
I figured out that xposed was causing the issue and once i hide xposed installer app(edxposed) in magisk hide google pay worked fine.
So if people are still having issues then try hiding xposed as well.

Edit: So adding card worked and is still working fine (added another card). But could only pay once and the next time i tried to tap for a payment got error that the phone cannot be used to make payments. So something is definitely being detected outside of this 'dg.db' file thing.
 
Last edited:

Ch3vr0n

Senior Member
May 6, 2009
1,693
668
41
I'm not using ANY module outside of magisk' systemless hosts, no Xposed or anything like that at all. Guess I'll try to steps again

Sent from my Pixel 3 XL using Tapatalk
 

dipstik

Senior Member
Nov 15, 2014
342
127
i was able to add my card after this:
Hide Google pay, Google play services, Google services framework,
clear Google pay data after update
and apply module.

pixel 3 xl november
 

schmellic

Member
Feb 19, 2010
39
7
How about (because my Automate flow stopped working for some reason, and i decided to switch to magisk only methods):

Magisk Method Gpay SQLite Fix.....

Changelog:

v1.7 - 12/07/2019

Thanks to @Didgeridoohan for the updates, in all my years of dabbling in linux and bash, i'd never come across subshells....

This change removes the possible issues with other modules, such as i was having with the Nova Launcher magisk module.

An update from any version below v1.7 is recommended. For those on versions below v1.6, please follow the terminal commands shown inthe Upgrade Notes section below

New:

uninstall.sh:

- Script is now run in a subshell to avoid blocking and sleep issues with other modules and processes

gpay.sh:


- Script is now run in a subshell to avoid blocking and sleep issues with other modules and processes


v1.6 - 11/07/2019

Only Full Fix & 440 Only versions remain, the Sleep 30 Edition has gone as both the Full and 440 Only versions now both use sleep cycles to wait for required binaries and the dg.db database to be available before proceeding in the service.d/gpay.sh and modules/uninstall.sh scripts

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

Credits:

Added checking for boot complete & db.db availability due to feedback from @jcmm11
Added checking for chmod availability due to feedback from @Didgeridoohan

Both were suggesting similar things to me via different methods at the same time :)

Older changelog hidden below...


v1.5 - 06/07/2019

Only Full Fix & 440 Only versions updated at this time....

New:

install.sh:

Attributions for those who made this all possible

-BostonDan - for the OP and original fix

-braveheartleo - for the chattr suggestion

-Didgeridoohan - for the working method to hide Google Services Framework sub services (and therefore Google Services Framework as a whole) via magiskhide in a script loop

-Updated some wording....

gpay.sh:

-Added better permissions checking and logging of actual permissions. If there are issues with chmod then it should be eaiser to see...

-Adding better error checking and logging where i can....

Fixed:

install.sh:

Google Services Framework is now hidden via magiskhide via the install script - thanks to Didgeridoohan

Outstanding issues:

uninstall.sh:

Uninstall script still fails to work, working on it.....


v1.4 - 04/07/2019

New:

install.sh:

Install time info, so people will know without having to go to terminal to see if SQLite3 or Chattr are found.

No more terminal troubleshooting, hopefully....

Required files/packages are now checked and their paths shown (if they exist) or warnings given (if theyre missing), to user at install time:
--BusyBox (to provide chattr)
--SQLite3

Packages being hidden by MagiskHide are listed and their hidden status shown to user:
--<packagename>: hidden successfully - for packages newly hidden
--<packagename>: already hidden/not hidden successfully - for packages already hidden or unable to be hidden (assume the former (already hidden) more likely than the latter)

Packages having their caches/storage cleared are listed and their clearing status shown to user (currently only Pay):
-- <packagename>: successfully cleared
-- <packagename>: not successfully cleared)

gpay.sh (renamed from server.sh in common (was being renamed to gpay.sh on copy)):

On first run a log is written to /cache/payfixfirstrun.log, logged are:
--SQLite3 and chattr binary locations
--The output success/fail of chattr, permissions and SQL commands

uninstall.sh:

On uninstall a log is written to /cache/payfixuninstall.log, logged are:
--SQLite3 and chattr binary locations
--The output success/fail of chattr, permissions and SQL commands

Fixed:

Slight boo boo at not adding chattr to the end of the file check eval in gpay.sh - now all possible paths (termux/bin/xbin) are checked for chattr. Been hella busy, bound to miss stuff, sorry folks....

NOTE: Only the Full Edition (first link) has been updated to v1.4, the others will be done later today


v1.3 - 20/06/2019

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



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.

Added extra chattr path possiblity
Added sleep between commands


v1.2
Changed module name to a shorter name without the typo (calling it Google Play lol)
Shortened zip and module name to make it easier to read when selecting and installing from local storage
Added hiding of the suggested packages via install.sh:
-com.google.android.gms
-com.google.android.gsf
-com.google.android.apps.walletnfcrel
Added clearing of Google Pays cache and storage via install.sh
Add uninstall.sh to:
-remove chattr blocking
-reset /data/data/com.google.android.gms/databases/dg.db to default 660 permissions
-remove /data/adb/service.d/gpay.sh
Changed 444 permission only version to 440 according to many recent posters 440 is good enough

v1.1

-All editions now using service.d by default (instead of post-fs-data which is blocking), on install service.sh is copied to /service.d/gpay.sh

Special thanks to V4A Magisk Module which i noticed copies a service.sh to service.d...i backtraced their install routine and borrowed (stole)
their method (using the $NVBASE variable) which i hadnt seen documented before...thanks V4A crew :)

They use (in part of their on_install() routine:

Code:
  # Install temporary service script
  cp -f $TMPDIR/service.sh $NVBASE/service.d/v4afx.sh
  chmod 0755 $NVBASE/service.d/v4afx.sh

I borrowed (stole) this idea and cheekily changed to

Code:
on_install() {
  ui_print "- Copying service.sh to service.d/gpay.sh"
 # Install service script to service.d
  cp -f $TMPDIR/service.sh $NVBASE/service.d/gpay.sh
  chmod 0755 $NVBASE/service.d/gpay.sh
}

Install.sh and module.prop also tidied up



Requirements:

SQLite3 binary - i have included one on my github for armv7 chipset devices. SQLite3 binaries for other chipsets may be found on Magisk Repo

For arm64-v8a (aarch64) users, an SQLite binary is available from the Magisk Repo: SQLite for ARM aarch64 devices

For all/other architectures, theres some provided here (untested by me): https://xdaforums.com/general/general/binary-sqlite3-binary-android-pie-t3721530


Installation:

1) Install an SQLite binary (i offer an armv7 one in my downloads section below)
2) Install a Gpay SQLite Fix zip form below (Full Edition highly recommended for most people)
3) Add card
4) Reboot

It *should* be that simple.


Upgrade process (version v1.6 and above):

- Uninstall previous version
- Reboot
- Install latest

Upgrade process (versions below 1.6:

Because the new version no longer uses chattr, for anyone using a verison older than v1.6, you will want to issue the following commands via a terminal to put /data/data/com.google.android.gms/databases/dg.db in its original state before installing the latest version:

Code:
su
chattr -i /data/data/com.google.android.gms/databases/dg.db

- Uninstall previous version
- Reboot
- Install latest


Uninstall:

1) Remove via Magisk Manager - all changes except packages hidden via MagiskHide and clearing the cache of Google Pay are reverted
2) Reboot


Downloads (hosted on my github):

Github releases (all now using service.d method):

GPay SQLite Fix (Full Edition) (full fix - SQLite changes and permissions change) (Recommended):
repo: https://github.com/stylemessiah/GPay-SQLite-Fix
release: https://github.com/stylemessiah/GPay-SQLite-Fix/releases/latest

GPay SQLite Fix (440 Only Edition) (only sets 440 permission on db, no SQL commands executed):
repo: https://github.com/stylemessiah/GPay-SQLite-Fix-440-Only-
release: https://github.com/stylemessiah/GPay-SQLite-Fix-440-Only-/releases/latest

SQLite3 v4.1 static binary (for arm-v7 devices ONLY and NOT using termux) here (installs to /system/xbin):
repo: https://github.com/stylemessiah/SQLite3-v4.1-arm-v7
release: https://github.com/stylemessiah/SQLite3-v4.1-arm-v7/releases/latest

OMG! Been trying to fix Google pay for ages on my Samsung A70 running Lineage 16. This works thankyou so much for this script! Magisk need to get this in their repo so easy.

I also had to change build fingerprint as I was failing safteynet profile check which I did a while ago but would still not add cards to Google pay.

Installed "full" version of the script and BOOM everything works

Original post can be found here https://xdaforums.com/showpost.php?p=79643248&postcount=176
 
  • Like
Reactions: 73sydney

qman66

Senior Member
Jul 23, 2010
520
50
Brooklyn
Randomly root got detected today by Google. Tried op again didn't work then tried the full version module 1.7 and that didn't work either
 

73sydney

Account currently disabled
Magisk Module Update


Just checking on some other code on my github and noticed some open issue reports on the module, one reporting an incorrect path for Termux's sqlite binary...from some time ago, weird, i didnt get any notifications, but ive updated the module as per the request

This only affects new installs for those who use Termux....maybe youre Termux user and tried the module and it failed, time to try again, and sorry, but i got the paths included in my script from a termux user back when i first made it, as i dont use termux i took that path as correct, maybe it changed since then? who knows...anyways, my bad....fixed now


Changelog:

v1.8 9/11/2019

As per issue request on github from Mexit & nyetwurk
Sorry to took me so long to reply to the issue ...i didnt get any notification....

Minor bugfix - for new installs, for users of Termux

install.sh:

-Update termux's sqlite3 path from

/data/data/com.termux/files/usr/lib/sqlite3

to

/data/data/com.termux/files/usr/bin/sqlite3

gpay.sh:

-Update termux's sqlite3 path from

/data/data/com.termux/files/usr/lib/sqlite3

to

/data/data/com.termux/files/usr/bin/sqlite3

p.s. i took the original paths from a termux user, maybe they got it wrong, or its changed?
Anyways, hopefully thats a fix

For those looking for it, the Gpay Fix Magisk Module is in my sig below, or here .
 

onken

Senior Member
May 1, 2012
153
10
Hello

I have gms 19.5.3 and Samsung A70 stock firmware.
I think not can ( not know who ? ) downgrade to 17....
I can run root and Google pay ?
Please info... Help :)
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 249
    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 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 database 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 have Magisk 19.1 with GMS and Google Pay hidden. Also, I am using a custom kernel but others have reported using a stock kernel with this working.

    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: people should know this by now, but GMS updates have not required any reapplication of this process.

    Edit2: After much time, it was determined that all one has to do is apply the chmod 440 to dg.db before launching google pay for the first time after clearing gms data. No need to change any keys in the dg.db file. If it does not work, you may have to clear gms (Google play services) before applying chmod.

    Cheers,
    B.D.
    121
    Magisk Method Gpay SQLite Fix.....

    This post best viewed in a browser - theres lots of formatting which is lost (and the hide tags dont work) when viewed via XDA App/Labs - (thanks to @pndwal for making me aware of this)

    Stats as of 01/02/2022 -35,000+ downloads....um thats a lot..only once did i wish id charged $0.50 per download

    General Notice:

    6th October 2022

    It is dead, ceased to be, expired, left the building, has went...


    After a longer run than was completely necessary or even sane, the GPay Magisk Module has finally *sigh* been retired...forcefully

    People were not taking the hint below seriously enough, it was only marginally doing anything useful given the background methods of Google Pay and SafetyNet/Integrity Check had changed, and stopped being useful even in the trickle of edge cases where it seemed (to some) to be the only thing that worked, so i finally just smothered it with a pillow the night of the 6th...

    You can visit its headstone here:


    And the full reasoning behind its demise is explained here


    -==========================================================-

    You prolly dont need it these days.....ive been saying this for a while....and im a little bit stabby that people wont let it die :)


    Someone asked me to elaborate recently on why they shouldnt use it, and heres a link to my reply, for if youre bored...

    I myself havent used it in eons.....1.5 years (since 14/03/2021 - see post from that date below), and you should first try using just:

    05/08/2022
    (DD/MM/YYYY)

    * Magisk

    If need be, to pass SafetyNet/Integrity:

    * Universal SafeyyNet Fix (currently this MODDED version by @Displax - due to changes in Pay/Wallet)

    * Test for Integrity (Googles replacement for SafetyNet that arrived a bit more suddenly than we expected the other week :) ) pass via @1nikolas 's *new*
    Play Integrity API Checker

    Then configure Magisk for Google Pay/Wallet using (Magisk Manager hidden/renamed):

    • Zygisk (mainstream Magisk) with Shamiko magisk module, Pay/Wallet added to Deny List, and Enforce Deny List turned off (only with Shamiko installed)
    OR
    • Magisk Delta with MagiskHide enabled, Pay/Wallet added to MagiskHide List

    Then test

    You *may* still need to try the usual perennial data clear (see Clear Play Store & Play Store Services Data & Check Play Store Certification) if you fail to pass SafetyNet/Integrity Check

    Only after trying the above should you really venture below...sometimes in edge cases it is the only thing that works, but it should no longer be your first step.......





    03/02/2022
    (DD/MM/YYYY)

    Module removed from Magisk ALt-Repo due to it being misused by a 3rd party who scrapes that repo

    Sadly, It has been returned back to my personal repo for the time being


    01/02/2022 (DD/MM/YYYY)

    In just a few weeks the first version to appear on a repo has racked up just shy of 1,200 downloads...

    So i guess i wont be retiring it as soon as i hoped (i keep waiting for people to stop using it and for it to die folks :) )

    14/01/2022

    Big news
    , the module is finally on a repo...the Alt(ernate) Repo.

    If you've been living under a rock for the last few months, you may not be aware that the offical Magisk Repo has been removed from the Official (and other) Magisk Manager apps.

    In its place, you have the choice of now using Fox Magisk Module Manager which also has access to the Alt-Repo

    I made the neccessary changes to my modules to submit them earlier in the week, and they were accepted late yesterday.

    Going forwards, it will be easier for people, the few of you who still use this moduel especially to see any changes that may take place.

    (I live for the day when its dead an buried)

    The often required SQLite3 Universal Binaries for use with the GPay SQLite fix module, is of course also now on the Alt Repo. (I also have a couple of other modules on there that are unrelated.)

    I have updated the repos and download links further down the page for those who dont use the repo, to reflect their new locations


    15/09/2021

    Its recommended to try the very latest version of Universal SafetyNet Fix by @kdrag0n
    to try and pass SafetyNet, in the first instance, and then try Google Pay, as you *may* be still able to avoid using my module below. If that doesnt work, but Universal SafetyNet Fix works and gives you a pass in the SafetyNet check section of Magisk Manager, you will have at least satisfied that stage in the Preliminary Checks below for using the module.

    As always, things can change, and so for Magisk related issues, be sure to also keep up to date wih the Magisk General thread as that is the place to get SafetyNet related answers....

    06/09/2021

    You *may* NEED to use this module again - read below!

    Due to some google side server tomfudgery, some people are finding they again need to use the module with the newer release and (vvb2060) Alpha version of Magisk. I was going to retire this thing, but no...

    If youve been living under a rock (or are otherwise a needy millennial that expects to be spoonfed everything), TopJohnWu, creator of Magisk has started to remove certain parts of Magisk due to his employment with Google,and to avoid an obvious conflict of interest. Notably MagiskHide is in the process of being removed (though currently stil able to be enabled via commandline - see last dozen or so pages of Magisk General thread for more info, and solutions - some of which may involve MagiskHide Props Config or other SafetyNet fixes by people like @Displax) and so people have reported where they had been able to have GPay working without the module, they now need it, even after fixing SafetyNet and MagiskHide issues stemming from the above mentioned Magisk changes. It is as it always has been very random and not always entirely device dependent. It may be a ROM prop issue or something else adding a level of spanner to things. For now, the best advice i can give you is to try passing SafetyNet and verify Google Play certification as always, including using the preliminary checks as just below in You *may* not need to use this module - read below! and then if you pass those checks, but GPay still fails, consider continuing on to the module below.

    14/03/2021

    You *may* not need to use this module - read below!

    Back and able to test again, and able to confirm the experience of some others, who have reported not needing the module recently to have Google Pay working. No one is quite sure why this is, or how long it will last. No one will be more happy than i if we can retire the module. For those wanting to try the minimal non-module method, ive added the steps i took below:
    1. Open Magisk Manager and enable MagiskHide (Settings -> toggle MagiskHide on)
    2. Toggle Airplane mode on
    3. Clear data for Google Play Store and Google Play Service (Settings > All Apps (toggle Show System) the search for and clear data for these packages)
    4. Reboot
    5. Toggle Airplane mode off
    6. Check Google Play Store is certified (Google Play -> Settings, scroll to bottom)
    7. Open Magisk Manager - check Safetynet passes (If not try steps under Pre Installation Checks) - Note: Make sure you are using at least Magisk v23 for the internal SafteyNetCheck OR use this 3rd party app to check for SafetyNet: https://play.google.com/store/apps/details?id=com.scottyab.safetynet.sample
    8. Add card and test
    If this fails for you, please continue on below for further steps in Pre Installation Checks to try passing safetynet (adding fingerprints), or to try the module....

    9/3/2021

    Good news, switched over to a bank which does not only Google Pay, buy Samsung Pay (which is handy as i have had an Active 2 for a while now and Samsung Pay is relatively easy to get working on a rooted phone), so i'll soon be back using my own module and be able to better test issues if and when they crop up.

    29/12/2020

    I have had to change cards/banks (due to the previous ones ATM eating my card, and not being able to get money out to eat/pay rent/buy food etc without the card - and my only option to travel into a head office ATM in the centre of COVID every time i need to get money out, no thanks) to my previous bank which doesnt do Google Pay (which is why i moved to the other bank). So for the forseeable future i will NOT be able to test Google Pay payments.

    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 and make CTS pass (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


    Changelog:

    GPay SQLite Fix:

    v2.7 - 1.2.2022 (DD/MM/YYYY)


    • Update to @Zackptg5 's MMT-Ex extended magisk module format 2.0
      • changed from old VKSEL key selection method to newer chooseport method, and added 5 second delay, over default 3 second one
    • Update for magisk 24 plugin schema
      • included update json link (for those who dont use Fox Module Manager to keep those folks up to date too)
      • included changelog link
    For existing users upgrading to this version, choose NO to clear data prompt during install to avoid card loss,
    you will then still get to update and enjoy the update.json benefits

    v2.6 - 14/1/2022


    Added to Magisk Alt Repo

    v2.5 9/12/2021

    Changes in:
    • module.prop
    version bump, i had forgotten to do that since v2.2 :)
    • install.sh
    New script code to detect and hide packages depending on whether user is using a version of magisk with either magiskhide or zygisk and deny list

    Credits to osm0sis for helping put my head straight on gms not needed to be hidden when using zygisk :)


    v2.4 9/3/2021

    Changes to service.sh:
    • Fixed broken/mangled pipes that left the log file blank - dont ask me why
    If you need logging (only useful if youre having an issue and want to troubleshoot) you can choose to install the new zip, or extract the service.sh from the zip and overwrite the one in /data/adb/modules/73sydney.gpay

    v2.3 - 20/12/2020


    Changes to service.sh:
    • setting variable runsql=1, as noted by @osm0sis it was missing and script expected it to be set
    I had fixed this and just reuploaded the v2.2 zip file, lazy at the time i didnt increment the version or document it here or on github. Fixed now.

    v2.2 - 28/03/2020

    All changes due to MMT-EX upgrade to v1.5
    • changes to /common/functions.sh
    • /common/addon/Volume-Key-Selector/main.sh changed and renamed to /common/addon/Volume-Key-Selector/install.sh
    Upgrade to this version is not necessary, changes only affect module install...


    SQLite3 Universal Binaries:

    v1.2 - 5/09/2021


    - Changed module format over to Zackptg5's MM-Ext module format, in part due to the old module doing a check based on an obsolete magisk mirror path. That was partly used to determine whether a ROM had an xbin or bin directory. Zack's excellent module does this internally and so reduces the need for that test as well as not having to hardcode the magisk mirror path into the script for that test.

    Previous module would have failed on more recent magisk versions...

    v1.1 - 1/10/2020

    - Added

    mkdir -p $MODPATH/system/xbin

    In response to report from XDA user @djjohnnyblaze 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:

    SQLite3 binary not found, please install a SQLite3 binary, without this the fix *may* not work
    I provide an SQLite3 Universal Binary Magisk Module, and links to SQLite3 binaries for other architectures
    at https://xdaforums.com/showpost.php?p=79643248&postcount=176


    Requirements:

    Magisk:

    Magisk Manager version 23 or above
    is highly desirable as the recent SafetyNet check function issue is fixed in v23 and above, especially for more recent devices. To avoid possible stability issues on some devices, It is recommended, at least for now, that you run stable Magisk (unless on a very recent device where ONLY a Canary version will run, or a Canary version includes a fix for a specific issue that affects you), but use Magisk Manager (Canary version).

    If your magisk install process usually involves installing Magisk Manager, and then install Magisk via it, its suggested that once you install Magisk Manager (Canary version), that you change the Update Channel to Stable (unless on a very recent device, or a canary version includes a fix for a specific issue that affects you):

    From Magisk Manager (Canary version):
    1. Click the settings icon (gear in top right)
    2. Scroll to Manager section
    3. Tap Update Channel, and set to Stable

    An SQLite3 binary:
    • Ive just added an SQLite3 Universal Binaries module to my github and download links below
    • Other SQLite3 binary choices for other chipsets *may* be found on Magisk Repo
    • For arm64-v8a (aarch64) users, an SQLite binary is available from the Magisk Repo: SQLite for ARM aarch64 devices
    • For all/other architectures, theres also some provided here (untested by me): https://xdaforums.com/general/general/binary-sqlite3-binary-android-pie-t3721530
    • Other compatible SQLite3 binaries tested and reported working are provided with termux and titanium backup - users of these apps do not require a separate SQLite3 binary....

    And quite (very) possibly one or both of the following...

    MagiskHide Props Config - MagiskHide Props Config allows most devices to take advantage of a hack to bypass googles crackdown on rooted devices. Excellent work by @Didgeridoohan.

    This can potentially "fix" CTS passing - sometimes in conjunction with the Universal SafetyNet Fix below
    • Fingerprint: by spoofing a certified device by adding a valid fingerprint in props (most useful for custom ROMs, or stock ROMs for uncertified devices - Chinese ROMs etc)
    MagiskHide Props Config is available from the official Magisk Repo. The Pre-Installation Checklist below will help you identify if you need to install and configure it.

    Universal SafetyNet Fix - Universal SafetyNet Fix by @kdrag0n is a "universal fix for SafetyNet on devices with hardware attestation and unlocked bootloaders. It defeats both hardware attestation and the new SafetyNet CTS profile updates released on January 12, 2021. The only requirement is that you can pass basic attestation, which requires a valid combination of device and model names, build fingerprints, and security patch levels."

    In short its now the preferred method of enabling users with hardware attestation to pass basic attesation, which MagiskHide Props Config offered before recent Google changes

    Not currently on the repo, but available via github, via link in OP of linked thread.

    Please note: The Uninversal Safetynet Fix is now soemtimes integrated into ROM's, please check your ROM doesnt already include it before installing it.


    Pre Installation Checks (To proactively head off the common reasons the module will fail)

    Check For Identified Conflicting Magisk Modules: (tracked by @pndwal)
    • SafetyPatch
    • FDE.AI
    These modules should be removed prior to trying this module. Failure to remove = no support.


    Check For EdXposed: (Steps/tips courtesy of @kevinwu128, via @pndwal)

    Method:

    In EdXposed Installer

    1. Enable Black/White list in EdXp Settings
    2. Blacklist Google Play Services in Black/White list
    3. Reboot
    4. Check SafetyNet status in Magisk Manager

    In EdXposed Manager

    1. Enable App List Mode in Settings
    2. Blacklist Google Play Services in Application List
    3. Reboot
    4. Check SafetyNet status in Magisk Manager

    If the above fails search the thread with the keyword "edXposed" for further tips


    Check for ctsProfile (pass/fail) and/or evalType (basic/hardware) in Magisk Manager:

    Opem Magisk Manager and tap check SafetyNet to do an attestation test, which apart from the usual basicIntegrity and ctsProfile tests, now provides a test showing how the attestation is generated/processed, evalType is either BASIC or Hardware

    Please note that Google could change this at any time and force all devices to use hardware attestation, though its unlikely that they care about your Galaxy S4 that youre stubbornly hanging onto.......

    Method:

    To check open Magisk Manager and tap Check SafetyNet mid way down the opening screen

    Based on the results, choose which path below to follow:

    • Result: ctsProfile of fail and evalType of Basic

      Solution: Install a FingerPrint via MagiskHide Props Config (thanks be to @Didgeridoohan)

      These are the simplified steps, for more info on fingerprints and patch levels read the doc or visit the MagiskHide Props Config thread

      Method To Install A Fingerprint:
      1. Install MagiskHide Props Config (from magisk repo)
      2. Check that MagiskHide is enabled in Magisk Manager:
        • Click the settings icon (gear in top right)
        • Scroll to Magisk section
        • Toggle MagiskHide on
      3. Reboot
      4. Open a terminal and type su (grant permissions when prompted)
      5. Type props
      6. Type 1
      7. Type f
      8. Type the number that matches your devices manufacturer
      9. Type the number that matches your devices model
      10. Type the number that matches your android version
      11. Type y
      12. Type e to exit
    • Test SafetyNet again via Magisk Manager, if all passes continue to Clear Play Store & Play Store Services Data & Check Play Store Certification below

      See here for more info: https://github.com/Magisk-Modules-R...ices-fingerprint-to-pass-the-ctsprofile-check

    • Result: ctsProfile of fail and evalType of Hardware
      • Install Universal SafetyNet Fix (thanks be to @kdrag0n), reboot and test SafetyNet again via Magisk Manager, if all passes continue to Clear Play Store & Play Store Services Data & Check Play Store Certification below, otherwise consider installing a fingerprint via MagiskHide Props Config (thanks be to @Didgeridoohan)
      • Method To Install A Fingerprint:
        1. Install MagiskHide Props Config and reboot
        2. Open a terminal and type su (grant permissions when prompted)
        3. Type props
        4. Type 1
        5. Type f
        6. Type the number that matches your devices manufacturer
        7. Type the number that matches your devices model
        8. Type the number that matches your android version
        9. Type y
        10. Type e to exit

        See here for more info:

        Spoofing fingerprints: https://github.com/Magisk-Modules-R...ices-fingerprint-to-pass-the-ctsprofile-check

      • Test SafetyNet again via Magisk Manager, if all passes continue to GPay SQLite Fix install below

        If the above fails, please post in the MagiskHide Props Config thread for best chance of success, please be aware that the ability to even attempt to trick the system as MagiskHide Props Config currently does may be shutdown by Google at any time


    Clear Play Store & Play Store Services Data & Check Play Store Certification
    • Toggle Airplane Mode on
    • Clear data and cache of:
      • Google Play
      • Google Play Services
      • Google Pay (note: may/will remove any cards previously entered)
    • Usually this will be achieved by (exact steps and terminology may change per device or ROM):
      • Opening Settings
      • Going to Apps, choosing Show All Apps
      • Enabling Show System Apps via a menu option
      • Locating the app, tapping it and then finding Storage/Cache
      • Tapping Clear Data
    • Reboot
    • Toggle Airplane Mode off
    • Open Google Play Store, wait 5 minutes, go to Settings and check Certification at bottom, it may take some time for "Certified" to appear, but as long as its not "Not Certified", and just showing version info, you are good to go

    Assuming you pass CTS and evalType tests, and Google Play Store Certification above, its time for the module installation.....


    Module Installation:

    The module has its best possible chance of succeeding if done on a clean flash of your ROM

    1. Install an SQLite binary (see Downloads below)
    2. Reboot if the SQLite you've just added is supplied by a magisk module (via magisk manager), so its active, as its required for GPay SQLite Fix install script.
    3. Install Gpay SQLite Fix magisk module via magisk manager (see Downloads below)
    4. At end of GPay SQLite Fix magisk module install, exit magisk manager
    5. Add card to Google Pay
    6. Reboot for gpay.sh service script to do its thing

    It *should* be that simple.


    Upgrade process (version v1.6 and above):

    - Uninstall previous version
    - Reboot
    - Install latest

    Upgrade process (versions below 1.6:

    Because the new version no longer uses chattr, for anyone using a verison older than v1.6, you will want to issue the following commands via a terminal to put /data/data/com.google.android.gms/databases/dg.db in its original state before installing the latest version:

    Code:
    su
    chattr -i /data/data/com.google.android.gms/databases/dg.db

    - Uninstall previous version
    - Reboot
    - Install latest


    Uninstall:

    1) Remove via Magisk Manager - all changes except packages hidden via MagiskHide and clearing the cache of Google Pay are reverted
    2) Reboot


    Known Issues:

    Loyalty Cards/Passes: You risk the possibility of loss of loyalty or other cards in the Passes section of Google Pay if you choose to flash the module and clear the cache & storage of Google Pay. Any version from v2.0+ will warn users and allow users to skip the clearing of Google Pay cache and app storage. This will also come with a warning that it *may* make the module fail to do its job.


    Downloads:

    GPay-SQLite-Fix: https://github.com/stylemessiah/GPay-SQLite-Fix (discontinued)
    SQLite3UniversalBinaries: https://github.com/stylemessiah/SQLite3UniversalBinaries/releases/latest

    Please download both modules and make sure to read the requirements, pre-installation and installation sections above.
    52
    [/COLOR]Thanks @BostonDan for this great method! My GPay just works now!

    [Edited to add @Karpfenhai's suggest to use TitaniumBackup's sqlite3 binary]

    Anyway for those sqlite impaired (this means 99.9999% of world population), here is my steps:

    If you have Titanium backup, please start from 3, if not, please start from 1

    1. Install Magisk module "SQLite for ARM aarch64 device" by ianmacd from Magisk Manager
    2. Reboot to enable this module
    3. Install your favorite terminal emulator (I use Termux)
    4. Enter Termux, then type "su" (Magisk might ask you for permission of root access, permit it.)
    5. Enter following command line by line: (This is Magisk module version. Titanium backup version is down below)

    am force-stop /data/data/com.google.android.apps.walletnfcrel
    chmod 777 /data/data/com.google.android.gms/databases/dg.db
    sqlite3 /data/data/com.google.android.gms/databases/dg.db "update main set c='0' where a like '%attest%';"
    chmod 444 /data/data/com.google.android.gms/databases/dg.db

    6. Reboot
    7. Profit!

    For using with TitaniumBackup's sqlite3 binary, you could modify the sqlite3 path as
    /data/data/com.keramidas.TitaniumBackup/files/sqlite3 /data/data/com.google.android.gms/databases/dg.db "update main set c='0' where a like '%attest%';"

    Actually I put all those commands in a Tasker task so I could run it during each reboot (with "Monitor Start" Event). Tasker xml as attached.

    Also, if your system come with sqlite3 binary (Actually I use the one from Termux) you don't need even to install the Magisk sqlite3 module.

    I am not responsible for what you have done with your phone, but hey, just let me know if you guys have any issue and I am glad to help!
    17
    Will you mind if I add a way to automate the whole process to my GMS Toolbox app?
    16
    Man! It works! Can I donate you??????

    ---------- Post added at 09:27 PM ---------- Previous post was at 09:26 PM ----------



    My version is 2.88.246232551 and it works!
    No donations asked. I have gotten so much from others that this is my gift to the community!

    Cheers,
    B.D.