topjohnwu / Magisk

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

Possible to enter MagidkHide in a race condition #2481

Closed androidacy-user closed 4 years ago

androidacy-user commented 4 years ago

I was testing out a grep command and needed a clean environment so tried doing it in MagidkHide.

And the output of the command came before any of the unmounted blabla stuff. Meaning the command executed before MagidkHide hid anything. Screenshot_20200221-195331

This more than even previously posted issues about gms detecting supposedly hidden things temporarily proves MagidkHide isn't hiding fast enough for some things.

androidacy-user commented 4 years ago

Worth noting introducing a 0.2 sec sleep does cause it to behave correctly; however any amount of time is enough to detect root if you're fast enough

topjohnwu commented 4 years ago

I don't think you fully understand how MagiskHide works, there is nothing racing about it. If GMS is able to detect something, it is because it is detecting something I didn't or couldn't hide. Also, you are using the magiskhide exec command wrong