Installing Magisk and Play Integrity Fix


Well, twrp comes prebuilt in Xiaomi.eu ROMs nowadays, so how do I know where it was flashed?
I should've said I'm on Venus, which was one of the first devices with a/b partitions, and recovery was embedded with the boot file...
OK, I can reply myself, TWRP stays, no issues. I was able to re-add all my cards, my banking apps are hidden, all is well.

Well, not all all, I have dual apps (hence dual play services) and at boot (or when the dual play service is called by any app) it crashes. If it's once or twice a day I guess it's manageable, but if some workaround exists... I'm all ears

Edit: I can add my cards no problem, but it shows "your device doesn't meet security requirements"... tomorrow I'll try paying something and report back.
 
Last edited:
It's ".\" in PowerShell, not "./".
I am still getting the same error. The ROM for Xiaomi 13 ultra has init_boot, so I suppose I should be using the fastboot flash init_boot_ab command. But it still says "no such file or directory" for "init_boot_ab"

EDIT: It worked when I executed the command twice - once for init_boot_a, once for init_boot_b
 
Last edited:
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!


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 unpack it (and ONLY it).
- If it doesn't, unpack 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):
Code:
fastboot devices

Depending on your device:
Code:
fastboot flash init_boot_ab magisk_generated_name.img

OR

Code:
fastboot flash boot_ab magisk_generated_name.img

OR (on older devices)
Code:
fastboot flash boot magisk_generated_name.img

Then
Code:
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. In most cases it will work, but in some (like Polish ID app, mObywatel) won't. 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!

I did everything according to the instructions, but it didn't work on my Xioami Mi 11 Ultra V14.0.11.0.TKACNXM_v14-13.
Magisk installed, boot patched, Play Integrity Fix module installed, there was also that there is an update it, I updated to v13.2, cleaned the data of Google services, rebooted, but the wallet still does not work, writes that security error and can not work on a smartphone.
1. Any idea what else we can try?
2. If I reflash from stable to weekly all my data will be lost?
 
1. Any idea what else we can try?
2. If I reflash from stable to weekly all my data will be lost?
Have you enabled zygisk and enforced the deny list? If so, reboot, reenter magisk and hide in the deny list every single Google app (three dots, select even system and os apps and search for Google), reboot, delete play app services and play store data, retry. You should be able to see what I attached as you tap on your profile, then "pay contactless setup" instead of trying to add cards everytime (which could lead to your bank account being "flagged" for the many tries).
 

Attachments

  • IMG_20231121_223442.jpg
    IMG_20231121_223442.jpg
    364.7 KB · Views: 245
Why can't someone just make a video and upload it on YouTube??
I don't think there could be a tutorial as explanatory as this one honestly. All in all, knowing what to do, it takes like 15 minutes including downloading and flashing the rebuild.
If you don't know what you're doing (and besides, you should at this point, seeing that you and everyone else here has a custom rom on their phone) it should take no more than 30/45 minutes reading and replicating step by step.
You cannot go wrong.
 
I don't think there could be a tutorial as explanatory as this one honestly. All in all, knowing what to do, it takes like 15 minutes including downloading and flashing the rebuild.
If you don't know what you're doing (and besides, you should at this point, seeing that you and everyone else here has a custom rom on their phone) it should take no more than 30/45 minutes reading and replicating step by step.
You cannot go wrong.
Yeah I understand but video tutorial would help. Just helps isn't the whole point of this is a community to help and make life easier for everyone
 
Thank you very much, you're a legend.
I installed Magisk Alpha instead of regular Magisk, and now the apps that I listed earlier in my post now work as intended.
Alpha also need to install the fix integrity patch or just do the normal hide GMS?
Need enable Zygisk?
 
Have you enabled zygisk and enforced the deny list? If so, reboot, reenter magisk and hide in the deny list every single Google app (three dots, select even system and os apps and search for Google), reboot, delete play app services and play store data, retry. You should be able to see what I attached as you tap on your profile, then "pay contactless setup" instead of trying to add cards everytime (which could lead to your bank account being "flagged" for the many tries).
Yes zygisk and enforced the deny list I did, I tried everything you wrote, but nothing worked. Still an error in the wallet that the phone does not meet security requirements :(
 

Attachments

  • 1700605985210.png
    1700605985210.png
    458.3 KB · Views: 222
  • 1700605996976.png
    1700605996976.png
    323.1 KB · Views: 229
  • 1700606007072.png
    1700606007072.png
    327.1 KB · Views: 213
  • 1700606318709.png
    1700606318709.png
    379.4 KB · Views: 216
Last edited by a moderator:
The most reliable way I've found to hide root from apps is to use shamiko together with PlayIntegrityFix.

Make sure to

1. Install Shamiko
2. Make sure Enforce DenyList is DISABLED
3. Hide the Magisk app.
4. Delete cache from banking apps and reboot.
can we have shamiko and playintegrity fix in parallel - like both of them or only shamiko ? Please update. thanks.
 
do u know if we can use shamiko and playintegrity fix together ? someone was saying that shamiko is the most used one to work with banking apps ? any idea if we can use both of them at once ?
 
Poco F3 on the latest ROM version. Also latest IntegrityFix ver, not working currently
 
do u know if we can use shamiko and playintegrity fix together ? someone was saying that shamiko is the most used one to work with banking apps ? any idea if we can use both of them at once ?
Why not. I always use. However, when using Shamiko:

- DenyList must be properly filled

- But DenyList must not be Enforced

It has nothing to do with PIF nodule, it's due to Shamiko that has to hide Zygisk from the apps listed in DenyList instead of the Magisk built-in

And of course, PIF will always remove Google Play Services from DenyList (bcs PIF has to take care about GMS instead of Shamiko or Magisk built-in)

But, there are still some banking apps (or Checkers like Momo or Minotour) that will detect Magisk/Zygisk no matter what you do

For some ZygiskNext module can help, for some special and unofficial fork (closed source) Magisk Alpha must be used with ZygiskNext, etc

It's all unrelated to Play Integrity - those apps use their own detection methods

Usually banking apps from India, Pakistan, Indonesia, Kuwait and so

Endless cat and mice game
 
do u know if we can use shamiko and playintegrity fix together ? someone was saying that shamiko is the most used one to work with banking apps ? any idea if we can use both of them at once ?
Yes you can use them both together.
Disamble the toggle enforce denylist and install shamiko.
Shamiko does the same or more with the enforce denylist.
 
When I flash the img file which magisk generated, it always stuck on miui animation(poco->miui->stuck), re-flash the original boot.img could fix.

Have tried regenerating another img file and flash it, still got stucked.

Any idea how to fix it? Thanks.

Magisk 26.4 intalled via apk.

Device is Poco F5 (MARBLE) on latest ROM (11/19 rebuild version) flashed.

The boot.img is from the rom zip.

Try to flash magisk.zip from recovery instead of the generated boot.img.
Still stuck on “miui”, please send help.
 
Last edited:
Yes zygisk and enforced the deny list I did, I tried everything you wrote, but nothing worked. Still an error in the wallet that the phone does not meet security requirements :(
You see that half/quarter blue bar over the apps? It means that not all processes are hidden. Tap on the bar, THEN flag the app, you'll see the bar becoming full. Then delete apps data and reboot. Try it!
 
Last edited:
I have use kernsu by darkmoon I don't know if that work you Xiaomi. That easy way and less modul here I show pic.
I would too that kernsu for Xiaomi build
Flash with twrp or by side load.
 

Attachments

  • Screenshot_20231122-103953_Google_Play-Dienste.png
    Screenshot_20231122-103953_Google_Play-Dienste.png
    274.9 KB · Views: 178
  • Screenshot_20231122-103908_TB_Checker.png
    Screenshot_20231122-103908_TB_Checker.png
    251.5 KB · Views: 181
  • Screenshot_20231122-103858_KernelSU.png
    Screenshot_20231122-103858_KernelSU.png
    84.3 KB · Views: 262
  • Screenshot_20231122-103853_KernelSU.png
    Screenshot_20231122-103853_KernelSU.png
    187.6 KB · Views: 172
I have use kernsu by darkmoon I don't know if that work you Xiaomi. That easy way and less modul here I show pic.
I would too that kernsu for Xiaomi build
Flash with twrp or by side load.
Need to select to hide app??
Banking app works?
Citibank especially.
 
You see that half/quarter blue bar over the apps? It means that not all processes are hidden. Tap on the bar, THEN flag the app, you'll see the bar becoming full. Then delete apps data and reboot. Try it!
Thank you, I enabled all triggers in all applications but it doesn't work, I read above recommendation about Shamiko installed it but it doesn't work, hid Magisk also doesn't work. Tried switching the security element from SIM to HCE - still does not help, already rebooted the smartphone 500 times today, still do not work.
I have cloned programs enabled can they interfere?


1700652888080.png
1700652896891.png
1700652913237.png
1700652923782.png
1700652934698.png
1700652946616.png

 
Enforydeny list should stay off
Clear all Google cache wallet, service , framework and have you play intergerty 13.1 v on and reboot
 
Enforydeny list should stay off
Clear all Google cache wallet, service , framework and have you play intergerty 13.1 v on and reboot
I did, I don't have google services in my app list but everything google related I cleared. play intergerty today upgrade to 13.3v

I uninstalled the cloned programs - didn't help either.
 
Last edited:
After installing the newest stable ROM and Patch to my Mi 11 Ultra, GPay luckily works again. BUT I miss a lot of notifications from several apps. Don't get any of them besides messanger apps like WhatsApp, Telegram, etc. Anyone else having this issue?

First recognized it after GPay payment. There was no notification about the paid amount. Also didn't receive any pushs for new mails, sold eBay articles etc! Tried to re-grant permissions for notifications, also turned off battery saving mode for these apps and autostart is also enabled. All without success. What to do now?
I'm having the same problem with notifications. I'm not getting notifications from my banking apps, e.g. to confirm login on my PC, I'm not even getting notifications from Signal, WhatsApp etc. I'm getting the notifications few hours later or sometimes never! This is a serious issue, please provide a solution.
 
Last edited: