- Mar 18, 2017
- 777
- 257
As you are aware, new Stable releases (including rebuilds that are currently in the works) do not include our fix for passing SafetyNet/Play Integrity checks. There's the guide how to flash Magisk and relevant fix on these ROMs.
NOTE: You have to repeat the process (at least installing Magisk) after EVERY ROM UPDATE!
UPDATE 9.12.2023: We have implemented our fix in recent ROMs (AFTER 1.12.2023). If you want to use Play Integrity Fix, you must:
- uninstall eu.xiaomi.module.inject updates (if you updated module to newer version than present in ROM),
- disable eu.xiaomi.module.inject app (possible on ROMs released AFTER 7.12.2023).
If you can't do these steps, you will have to use another Magisk module to remove it from system (until an update for your phone, released after 7.12.2023, is available).
If you want to use Magisk with our module (not PIF), add Google Play Services to DenyList as present on the screenshot and enforce it.
The newest Play Integrity Fix automatically removes our APK.
1. Flash the newest available Stable build for your device (released on or after 18 November).
2. Prepare relevant files: Magisk (download APK), Play Integrity Fix and relevant file from the ROM package.
- If ROM package contains init_boot.img, then extract it (and ONLY it).
- If it doesn't, extract boot.img (and ONLY it).
Move them to device storage.
3. Install Magisk APK on device. After install run it and choose "Install" near Magisk name. Choose "Select and Patch a File", then find a relevant IMG file (boot.img or init_boot.img) you've moved to storage before. Then "Let's go".
Move generated image to the PC. Run device in Fastboot mode. If you've unpacked ROM on PC, you can use it to flash an image (if not, use platform-tools); go to the ROM directory > bin > your host OS dir. Paste image there (the best solution present on the screenshot), then right-click anywhere on the directory > run Terminal (if option doesn't show, use Ctrl+Shift+RMB - for Windows lower than 11).
Connect device to PC if you didn't already. Run following commands (.\ on screenshot is for PowerShell):
Depending on your device:
OR
OR (on older devices)
Then
Phone will reboot.
4. You should be able to see new Magisk app on Home screen. If it will ask for an install the full APK, then accept the prompt and install it. Magisk may also ask later for additional configuration, like on this screen:
Accept it. Device will reboot.
In some cases (like mine), app will say that you have to reinstall Magisk. Do it, choosing "Direct installation" and accept the prompt. Reboot device after installation.
5. Play Integrity Fix requires enabled Zygisk. Tap the gear button, then select "Zygisk". You can also enable "Enforce DenyList" - it will be useful for hiding apps that are detecting root from Magisk. Reboot device to apply changes.
6. Now it's time to install Play Integrity Fix. Run Magisk, select Modules > Install from storage and choose a ZIP with a fix. After successful install, reboot a device.
7. SafetyNet and Play Integrity should be passing just fine (until next Google fix; then you will have to wait for a fix update).
8. Clear app data: Google Wallet, Google Play Services, Google Play Store and Google Services Framework.
9. Reboot device. You should be able to add cards successfully.
If you aren't able to download specific apps from Play Store (e.g. Netflix) after flashing a fix, clear Play Store and Google Play Services data.
HOW TO HIDE SOME APPS FROM MAGISK
In my case, McDonald's or Google Wallet app is working just fine after flashing a fix, without having to hide the app in Magisk. But, in some cases, it may be not enough. How to do it then? We (I hope) activated DenyList while preparing to flash Play Integrity Fix, so let's use it!
1. Go to Magisk > gear icon > Configure DenyList.
2. There will be a list of apps on phone. Choose app that complains about root permissions.
3. If your bank app still doesn't work due to detecting ROOT, go back to settings and select "Hide the Magisk app". It will generate the same Magisk app, but with new package name, so it won't be so easily detected by apps. Allow Magisk to install apps, then choose your name and accept. It was enough in my case, app started to work (although it doesn't allow to send a screenshot, so you must trust me in this case)
If you have any questions, feel free to ask them!
NOTE: You have to repeat the process (at least installing Magisk) after EVERY ROM UPDATE!
UPDATE 9.12.2023: We have implemented our fix in recent ROMs (AFTER 1.12.2023). If you want to use Play Integrity Fix, you must:
- uninstall eu.xiaomi.module.inject updates (if you updated module to newer version than present in ROM),
- disable eu.xiaomi.module.inject app (possible on ROMs released AFTER 7.12.2023).
If you can't do these steps, you will have to use another Magisk module to remove it from system (until an update for your phone, released after 7.12.2023, is available).
If you want to use Magisk with our module (not PIF), add Google Play Services to DenyList as present on the screenshot and enforce it.
The newest Play Integrity Fix automatically removes our APK.
1. Flash the newest available Stable build for your device (released on or after 18 November).
2. Prepare relevant files: Magisk (download APK), Play Integrity Fix and relevant file from the ROM package.
- If ROM package contains init_boot.img, then extract it (and ONLY it).
- If it doesn't, extract boot.img (and ONLY it).
Move them to device storage.
3. Install Magisk APK on device. After install run it and choose "Install" near Magisk name. Choose "Select and Patch a File", then find a relevant IMG file (boot.img or init_boot.img) you've moved to storage before. Then "Let's go".
Move generated image to the PC. Run device in Fastboot mode. If you've unpacked ROM on PC, you can use it to flash an image (if not, use platform-tools); go to the ROM directory > bin > your host OS dir. Paste image there (the best solution present on the screenshot), then right-click anywhere on the directory > run Terminal (if option doesn't show, use Ctrl+Shift+RMB - for Windows lower than 11).
Connect device to PC if you didn't already. Run following commands (.\ on screenshot is for PowerShell):
fastboot devices
Depending on your device:
fastboot flash init_boot_ab magisk_generated_name.img
OR
fastboot flash boot_ab magisk_generated_name.img
OR (on older devices)
fastboot flash boot magisk_generated_name.img
Then
fastboot reboot
Phone will reboot.
4. You should be able to see new Magisk app on Home screen. If it will ask for an install the full APK, then accept the prompt and install it. Magisk may also ask later for additional configuration, like on this screen:
Accept it. Device will reboot.
In some cases (like mine), app will say that you have to reinstall Magisk. Do it, choosing "Direct installation" and accept the prompt. Reboot device after installation.
5. Play Integrity Fix requires enabled Zygisk. Tap the gear button, then select "Zygisk". You can also enable "Enforce DenyList" - it will be useful for hiding apps that are detecting root from Magisk. Reboot device to apply changes.
6. Now it's time to install Play Integrity Fix. Run Magisk, select Modules > Install from storage and choose a ZIP with a fix. After successful install, reboot a device.
7. SafetyNet and Play Integrity should be passing just fine (until next Google fix; then you will have to wait for a fix update).
8. Clear app data: Google Wallet, Google Play Services, Google Play Store and Google Services Framework.
9. Reboot device. You should be able to add cards successfully.
If you aren't able to download specific apps from Play Store (e.g. Netflix) after flashing a fix, clear Play Store and Google Play Services data.
HOW TO HIDE SOME APPS FROM MAGISK
In my case, McDonald's or Google Wallet app is working just fine after flashing a fix, without having to hide the app in Magisk. But, in some cases, it may be not enough. How to do it then? We (I hope) activated DenyList while preparing to flash Play Integrity Fix, so let's use it!
1. Go to Magisk > gear icon > Configure DenyList.
2. There will be a list of apps on phone. Choose app that complains about root permissions.
3. If your bank app still doesn't work due to detecting ROOT, go back to settings and select "Hide the Magisk app". It will generate the same Magisk app, but with new package name, so it won't be so easily detected by apps. Allow Magisk to install apps, then choose your name and accept. It was enough in my case, app started to work (although it doesn't allow to send a screenshot, so you must trust me in this case)
If you have any questions, feel free to ask them!
Last edited: