topjohnwu / Magisk

The Magic Mask for Android
GNU General Public License v3.0
47.59k stars 12.08k forks source link

Magisk Hide not working on MIUI ROMs in v10 and v11.1 #44

Closed Filip013 closed 7 years ago

Filip013 commented 7 years ago

There's a problem with MIUI and Magisk Hide. This has been reported by users of Xiaomi Mi5 and Redmi Note 3 Pro (my device). I tested Magisk Hide with Magisk v9 to make sure. Here's what I did:

I flashed Magisk v9 and phh r2. Then rebooted, installed Magisk app from Play Store, enabled Magisk Hide and rebooted. Success! SafetyNet pass with CTS mismatch. Then I updated to Magisk v10 from Magisk Manager and rebooted. SafetyNet fail (blue status in SafetyNet Helper).

I also uploaded boot.img that I extracted from my ROM's .zip file (I'm not sure that was the right place or that you need it because I am fully rooted) and Magisk log (although I don't see anything interesting there).

magisk_error_20170112_203732.zip

boot.img.zip

Unrelated request: would it be possible to provide more SafetyNet information than just CTS profile mismatch? Because I always get CTS mismatch on my device even when non-rooted and with locked bootloader. This also happens on my mom's Xiaomi Redmi 1S running non-rooted KitKat, so I think it is a Xiaomi thing.

Filip013 commented 7 years ago

For the love of God, I don't know how to take logs. At least I tried.

bugreport-2017-01-20-112653.zip

Shadowghost commented 7 years ago

Hm so you get CTS missmatch on v9 and not passing on v10? As far as I know CTS profile missmatch equals "not passing" for the applications.

Filip013 commented 7 years ago

I'm not sure, but I don't think so. When I use SafetyNet Helper from Google Play, I get “Response validation: success” and “CTS Profile match: false”. I can play Pokemon Go with Magisk v9, so I guess that means I pass SafetyNet. I am a bit annoyed that no matter what I do, I can't get CTS profile match, but I can live without it.

topjohnwu commented 7 years ago

Is the issue still there on v11.0?

Filip013 commented 7 years ago

YES! IT WORKS!!! Well, this has been a weird and confusing transition. At first, Magisk Hide didn’t work. Then I somehow managed to make it work (validation response success, CTS profile mismatch). Then it didn’t work again. Then I somehow destroyed my system interface with it. (This is a weird side note: I couldn’t see anything when the system booted, the only thing I could do was open the power menu, but the system started working again when I flashed Magisk uninstaller. I tried deleting Magisk Manager data and uninstalling the app and then flashing Magisk again, but nothing worked. Then I decided to just give up and wipe system and data and start from scratch). And finally, everything works properly. Or nearly. And I finally managed to get CTS profile match, which I could never do before (still trying to figure out why). Anyway, issue closed. Great job, man!

Filip013 commented 7 years ago

First of all, I have to say that I am very grateful for your continuing hard work on allowing people to pass SafetyNet with root access and modified system. I really like everything you’ve done with Magisk and while I still use a pre-November security patch stock ROM and Xposed, I appreciate the fact that this is the only way for people on Nougat to pass SafetyNet if rooted. I’ve decided to reopen this issue so you can have an insight on what is going on with my device. I was able to get Magisk Hide to work with my previous config (v11, v4.0), but can't seem to manage any more. I tried disabling Magisk Hide, then rebooting and enabling, but I don’t get the pop-up message anymore telling me that Magisk Hide is starting. Here is Magisk log: magisk_error_20170207_111737.zip And here is what I get in Catlog when I enable Magisk Hide: [2017-02-07-11-16-52_MagiskHide_Start.zip] (https://github.com/topjohnwu/Magisk/files/757461/2017-02-07-11-16-52_MagiskHide_Start.zip) And finally, if I leave Magisk Hide on and then restart, here is the full log of what happens when the system boots: [bugreport-2017-02-07-112009.zip] (https://github.com/topjohnwu/Magisk/files/757462/bugreport-2017-02-07-112009.zip)

Edit: All files uploaded now.

c727 commented 7 years ago

Success! SafetyNet pass with CTS mismatch

that means safetynet failed...

you should update to latest magisk v11.1 and manager v4.1. close this chaotic issue here and search on xda why sefetynet fails

Filip013 commented 7 years ago

@c727 It’s complicated. I used to be able to play Pokemon GO with CTS profile mismatch (I don't play it any more, I only use it to test). Now, that I've tried to open it again, I see it doesn't work unless I get full SafetyNet pass (It’s possible that Pokemon Go works with ROMs that are not certified such as weekly official MIUI releases for my phone). The issue is chaotic because the problem is chaotic. My current config where I can fully pass SafetyNet is Magisk v11, Magisk Manager v4 (I had to detach it from Market in Titanium Backup) and system Xposed with Rootswitch.

c727 commented 7 years ago

11.0/4.0 are known to have issues with MagiskHide... so use 11.1/4.1

and yes some other people reported they can play pokemon go with CTS mismatch in the past

Afaik the xposed-rootswitch combo requires SuperSU <-- MagiskHide does NOT support SuperSU

next no-go for MagiskHide is (system-)xposed...

Filip013 commented 7 years ago

The issue persists, but this thread has become disorganized, so I will close the issue. Also, I’ve discovered that the latest version of Magisk works just fine. The issue is with Magisk Manager. I will link this thread in the new thread.