topjohnwu / Magisk

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

v13.3, Huawei P10 Lite: MagiskHide suddenly stops working for non-obvious reason #305

Closed vroad closed 7 years ago

vroad commented 7 years ago

My device is Huawei P10 Lite (WAS-LX2J) and I'm using stock kernel/ROM. Build number is WAS-LX2JC635B106.

MagiskHide works only for a short amount of time after reset. Then it suddenly stops working. I don't know what caused this issue. It survivied reboot at least once. Restarting the device/magiskhide doesn't fix the problem. (No "Starting MagiskHide" in logs) How can I make this work reliably? What is preventing magiskhide from starting?

Here is the log when MagiskHide works.

--------- beginning of main
I(  344:  344) Magisk v13.3(1330) daemon started
I(  344:  346) ** post-fs mode running
I(  344:  433) ** post-fs-data mode running
I(  344:  433) * Mounting /data/magisk.img
I(  344:  433) * Running post-fs-data.d scripts
I(  344:  433) * Loading modules
I(  344:  433) * Running module post-fs-data scripts
I(  344:  445) * Starting MagiskHide
I(  344:  445) hide_utils: Hiding sensitive props
I(  344:  445) hide_list add: [com.google.android.gms.unstable]
I(  344:  445) proc_monitor: init ns=mnt:[4026531840]
I(  344:  507) ** late_start service mode running
I(  344:  507) * Running service.d scripts
I(  344:  507) * Running module service scripts
I(  344:  445) proc_monitor: zygote ns=mnt:[4026532763] zygote64 ns=mnt:[4026532762]
I(  344: 4830) * Stopping MagiskHide
I(  344: 4833) * Starting MagiskHide
I(  344: 4833) hide_utils: Hiding sensitive props
I(  344: 4833) hide_list: [com.google.android.gms.unstable]
I(  344: 4833) proc_monitor: init ns=mnt:[4026531840]
I(  344: 4833) proc_monitor: zygote ns=mnt:[4026532763] zygote64 ns=mnt:[4026532762]
I(  344: 4833) proc_monitor: com.google.android.gms.unstable (PID=5263 ns=mnt:[4026532843])
I( 5268: 5268) hide_utils: Re-linking /sbin
I(  344: 4833) proc_monitor: com.google.android.gms.unstable (PID=6333 ns=mnt:[4026532785])

Here is the log after MagiskHide has stopped working and I rebooted the device. MagiskHide won't start no matter what I do.

--------- beginning of main
I(  344:  344) Magisk v13.3(1330) daemon started
I(  344:  346) ** post-fs mode running
I(  344:  433) ** post-fs-data mode running
I(  344:  433) * Mounting /data/magisk.img
I(  344:  433) * Running post-fs-data.d scripts
I(  344:  433) * Loading modules
I(  344:  433) * Running module post-fs-data scripts
I(  344:  514) ** late_start service mode running
I(  344:  514) * Running service.d scripts
I(  344:  514) * Running module service scripts

I've also tried erasing /data/magisk.img and didn't work either.

--------- beginning of main
I(  343:  343) Magisk v13.3(1330) daemon started
I(  343:  345) ** post-fs mode running
I(  343:  432) ** post-fs-data mode running
I(  343:  432) Create /data/magisk.img with size 64M
I(  343:  432) * Mounting /data/magisk.img
I(  343:  432) * Running post-fs-data.d scripts
I(  343:  432) * Loading modules
I(  343:  432) * Running module post-fs-data scripts
I(  343:  506) ** late_start service mode running
I(  343:  506) * Running service.d scripts
I(  343:  506) * Running module service scripts
vroad commented 7 years ago

MagiskHide starts working again if I uninstall Magisk and re-install it in recovery.

D-Flowers commented 7 years ago

Thanks

On August 11, 2017 7:11:33 AM CDT, vroad notifications@github.com wrote:

MagiskHide starts working again if I uninstall Magisk and re-install it in recovery.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/topjohnwu/Magisk/issues/305#issuecomment-321796925, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdfMsVh3msEcdqorn0efn_jB3Ga37I_Pks5sXET1gaJpZM4OgGY0.

-- Sent from my Android device with K-9 Mail. Please excuse my brevity.

vroad commented 7 years ago

This time MagiskHide starts, but it doesn't seem to do its job. Re-installing Magisk doesn't fix the problem either.

-------- beginning of main I( 344: 344) Magisk v13.6(1360) daemon started I( 344: 346) ** post-fs mode running I( 344: 434) ** post-fs-data mode running I( 344: 434) * Mounting mirrors I( 344: 434) mount: /dev/block/bootdevice/by-name/system -> /dev/magisk/mirror/system I( 344: 434) mount: /dev/block/bootdevice/by-name/vendor -> /dev/magisk/mirror/vendor I( 344: 434) Create /data/magisk.img with size 64M I( 344: 434) * Mounting /data/magisk.img I( 344: 434) * Running post-fs-data.d scripts I( 344: 434) * Running module post-fs-data scripts I( 344: 434) * Loading modules I( 344: 446) * Starting MagiskHide I( 344: 446) hide_utils: Hiding sensitive props I( 344: 446) hide_list add: [com.google.android.gms.unstable] I( 344: 446) proc_monitor: init ns=mnt:[4026531840] I( 344: 508) ** late_start service mode running I( 344: 508) * Running service.d scripts I( 344: 508) * Running module service scripts I( 344: 446) proc_monitor: zygote ns=mnt:[4026532757] zygote64 ns=mnt:[4026532756]

vroad commented 7 years ago

I forgot to mention that I updated Magisk to v13.6 beta and updated firmware to B170.

MagiskHide stopped working again when I was using v13.5 on B170, and re-installing worked several times, but doesn't work now.

Ante0 commented 7 years ago

Can you check if logcat is logging for you? I just noticed that logcat stopped all logging, and that caused hide to fail. It seems that either using the secret Huawei service menu to enable LOG entries (background settings - LOG - check all 3 entries) or enable USB debugging (you need to restart hide after this) fixes it temporarily. I just want to know if it's just my Mate 9 that's being a jerk or if it's Huaweis fault :P It was working fine for a week or so, then it started not working... And I just now realized logcat stopped logging stuff since yesterday, I was researching a different issue not related to Magisk at all.

Ante0 commented 7 years ago

Sorry for posting again, could you try flashing the Huawei prop fix in here https://drive.google.com/open?id=0B2D9GdWntw69emFOTEtxRWlRc0E (thanks to mankindtw @xda). It works fine for me now. Just had to go to service menu and enable logging again, after that it stayed enabled even after rebooting a few times.

vroad commented 7 years ago

Thanks, I'd like to try that fix later.

I've found a user reporting the same MagiskHide issue on XDA (Enabling USB debug and restarting MagiskHide fixes the issue). And doing so also fixes the issue on my P10 Lite as well. So I guess that the issue occurs on many Huawei devices.

kruleucc commented 7 years ago

Hey guys. This is obviously not a place to ask instructions, but I couldn't find them anywhere else so sorry for that. I was wondering can someone give me instructions how to install Magisk on P10 Lite? Again, sorry for posting this here.