Jump to content

How to use google pay with magisk/root

Recommended Posts

Disclaimer: i am not responsible for any harm that may come to your device as a result of following this tutorial.

as it turns out, Google pay has detection mechanisms that enable it to detect magisk even when hide is enabled and even when you pass safetynet.

this is annoying because some of use like to root our devices but would also like to be able to use features that were listed as a selling point for the phone.

i found this topic on XDA which details steps to fool it into thinking the checks have passed, which I will copy below for your convenience.


  1. download an sqlite database editor, such as https://play.google.com/store/apps/details?id=com.tomminosoftware.sqliteeditor
  2. download termux
  3. force close google pay
  4. open /data/data/com.google.android.gms/databases/dg.db with your sqlite editor. when asked what table to open, choose "main".
  5. edit every line with "attest" in the first column so that the 3rd columns value is 0 (instead of 10). there should be 4 of those lines.
  6. open termux, get root access with
  7. cd /data/data/com.google.android.gms/databases
  8. chmod 440 dg.db
  9.  reboot (reboot in termux works just fine)
  10. profit.


what you've done is edit the database google pay and other google apps use to store the results of their own integrity checks to say that you passed those checks, then changed it to read-only so that even if the check is ran again, the database won't be updated.

I was able to get past the "your device may be rooted" message when trying to configure a card to pay in-store, but unfortunately my bank doesn't support that yet so i got stuck further along. if your bank supports google pay, it should work just fine.

note that i haven't told you to hide magisk from google pay. this method should not need that, but i've done it anyway as a security.

  • Like 1
  • Thanks 4
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information