Installing Magisk and Play Integrity Fix


Xiaomi Ultra 13 - Clean install of 19/11 ROM and Magisk / Play Integrity Fix.

Failed followed instructions above, and tried all the suggestions.:(

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.
View attachment 50217

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".
View attachment 49527View attachment 49525
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).
View attachment 49528
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.
View attachment 49529
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:
View attachment 49530
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.
View attachment 49531View attachment 49532View attachment 49533
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.
View attachment 49534View attachment 49535View attachment 49536
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.

View attachment 49537View attachment 49538View attachment 49539
7. SafetyNet and Play Integrity should be passing just fine (until next Google fix; then you will have to wait for a fix update).
View attachment 49540View attachment 49541
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.
View attachment 49548

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.
View attachment 49559
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) :)
View attachment 49543View attachment 49544

If you have any questions, feel free to ask them!
Hello everyone. I just wanted to comment that this method, at least in Spain, does not work with Caixabank. The app works perfectly but you need another app to validate "Caixabank Sign" operations and this one does not work with the current method. I'm sorry because I had to uninstall Root.

Anyway, thanks for the tutorial and all the work done. Unfortunately I don't think I'll try to Root again. Too much trouble for the bank to possibly not work later. Thanks and Merry Christmas.
 
I never did it work correctly, I not sure what I'm missing.

K30 Pro zoom
Magisk with Play Intergrity Fix 14.8 module
Denylist: Google Play services gms and gms.unstable

Magisk is hidden
Xiaomi.eu latest 14.0.5.0.SJKCNXM stable
Inject apk latest 20.12.2023.

I did reboot, clean play services / framework data.

What I am missing?
Thanks a lot.
Get rid of PIF, you're on Xiaomi.EU. Just install latest Inject APK
 
PIF no longer comes with a fingerprint by default, you have to add it yourself.

Better to use the Xiaomi inject App that does it for you.
 
Just to report back on the latest fix. Points to note:

1. Get rid of your root/magisk/whatever crap you have installed earlier. Do not mix the different fixes together.
2. Install latest ROM from xiaomi.eu.
3. Install the injector apk. (and any future injector if applicable)
4. Clear data/cache from Google Pay/Google Play Store/Play Services.

Done.

For me on xm10 ultra,

1. Google Play now shows that device is certified.
2. Google Pay still saying that "Device does not meet security standard"
3. However, Google Pay is working despite the warning.
 
Poco x3 pro

For me it had been working fine with Magic and the modified footprint, until module 14.8.

Now I delete all magisk and modules, install the application, but nothing.

Play tells me that it is not certified and wallet does not even let me add the card, of course I delete everything's cache.

Today I will try to install the latest rom to see if there is any trace left from magisk,

we will see....
 
  • Like
Reactions: xMarvin732
Hello! I have mi 11 lite 5g. I did everything according to the instructions but my phone don't pass play integrity check. And i can't add card to the google pay. What can be the problem? Maybe i need to install new rebuild rom on my phone? Where to find it?
 
God finally device is certified everything works fine rn
If ur using the Play integrity module u need to disable it, download the latest EU inject app, install it, clear play store and play services data, Reboot, and u will be fine.
Device: Redmi k40 , stable XiaomiEu 14.0.8.0
 

Attachments

  • Screenshot_2023-12-26-14-32-21-258_gr.nikolasspyr.integritycheck.jpg
    Screenshot_2023-12-26-14-32-21-258_gr.nikolasspyr.integritycheck.jpg
    145.8 KB · Views: 165
  • Screenshot_2023-12-26-14-31-50-030_com.android.vending.jpg
    Screenshot_2023-12-26-14-31-50-030_com.android.vending.jpg
    288.6 KB · Views: 180
God finally device is certified everything works fine rn
If ur using the Play integrity module u need to disable it, download the latest EU inject app, install it, clear play store and play services data, Reboot, and u will be fine.
Device: Redmi k40 , stable XiaomiEu 14.0.8.0
Thanks! but...
Didn't work on 11 lite 5g. I have latest weekly ROM. I guess i need to install latest stable ROM
 
Hello! I have mi 11 lite 5g. I did everything according to the instructions but my phone don't pass play integrity check. And i can't add card to the google pay. What can be the problem? Maybe i need to install new rebuild rom on my phone? Where to find it?
If you go in the Updater app and look for updates you should be able to download the new rebuild rom. If u didn't already installed the new rebuild/update.
 
Gentlemen as of this min, inject app ain't passing anything.. help

Reporting from a mi 11 ultra running latest 14.0.11.0
 
  • Like
Reactions: Trtrtr70
are you rooted? you have to hide gms.unstable then
yeah i did but didnt do anything. uninstalling the apk with adb ended up in a bootloop.
gonna backup my files and do a clean flash, maybe that is the reason for it not working.
I was on the older 14.0.4.0 pre XiaomiEU Module build
 
I have tried 15.1 and didn't work. However, it should pass basic even the fingerprint is banned?
The problem is no integrity after I install the pif.
Don't use PIF module on xiaomi.eu. Uninstall it. After you uninstalled it install xiaomieuinject.apk you will find here and reboot. Then you have done.