Here’s some information on how you can use Android Pay application on your Xiaomi phone with root and unlocked bootloader with Custom ROM installed (Lineage & Resurrection Remix ROMs in this case).

Install Android Pay on Xiaomi with Custom ROM (Lineage & Resurrection Remix)

This tutorial was tested on Mi5 and Mi5s Plus devices with Lineage OS or RR custom ROM installed.

  1. Open Google Play and download Magisk Manager.
  2. Open Magisk Manager > click on the top red cross icon, tap “Download and install” > “Install” > “Reboot”.
  3. Install “Android Pay”.
  4. Open “Magisk Manager” (you should see two green arrows at this point). Open settings, find and enable “Magisk Hide” option. Exit settings and tap on the third grey icon, if it turns to green, that means everything was done correctly. You can now open Android Pay and add cards, everything should work fine now.

If case you’ve stuck with some issues, you may want to try this solution:

  • If you can’t install Magisk using the Google Play or .apk file, then try flashing this .zip archive via TWRP Custom Recovery: Magisk-v12.0.zip
  • In case you’ve successfully installed Magisk, but SafetyNet is still couldn’t be enabled or Android Pay is still not working, then try installing this fix via TWRP: xiaomi-safetynet-fix-v1.8.1.zip
  • If something goes wrong and you want to uninstall Magisk from your device completely, then download and install Magisk uninstaller patch via TWRP.

Pay attention, that after updating your custom ROM to a newest version, Magisk will be deleted, so you’ll need to repeat the same steps again to make Android Pay available to work. Also you can install the Magisk-v12.0.zip right after updating your current ROM.