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 itHow 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