snake-4 / Zygisk-Assistant

A Zygisk module to hide root for KernelSU, Magisk and APatch, designed to work on Android 5.0 and above.
MIT License
894 stars 61 forks source link

Having problems with Pixelify on Pixel 7 (KernelSU) #35

Closed sonroyaalmerol closed 1 month ago

sonroyaalmerol commented 3 months ago

Describe the bug

At first, I thought I was having a bootloop after installing and rebooting via KernelSU. However, after a few "bootloops", I was somehow able to open up the settings menu from the notification drawer. I realized that the system apps were just crashing as soon as the phone boots up which causes the "bootloop". I was able to disable Zygisk Assistant via the Apps menu in the Settings and opening KernelSU from there. After disabling and rebooting, everything went back to normal.

I double checked the instructions posted in the README and figured I should only unmount the target apps. I had my KernelSU set to unmount all apps by default so I disabled that option and only set my banking apps to unmount before enabling Zygisk Assistant again. I was able to avoid the "bootloop" but my banking apps were still crashing which made me think that only the unmounted apps were crashing. I tried doing the same procedures with Shamiko disabled and still got the same result.

I also saw issue #7 which I thought would be helpful as I also have Pixelify but the solution there didn't really do much aside from those unmounted apps not crashing.

Steps To Reproduce

  1. Install Zygisk Assistant via KernelSU
  2. Restart

Context

Logcat

I'll update this as soon as I have the time. However, I don't know if I'll be able to do this while it's doing the "bootloop". Let me know which part of the procedure I should take a logcat and I'll provide it asap. I can probably just do a logcat with just the banking apps unmounted and crashing but let me know otherwise.

snake-4 commented 3 months ago

Only a logcat while the banking apps are crashing is enough. Also can you try with Pixelify disabled as well?

sonroyaalmerol commented 3 months ago

My bad, some parts might have been a false alarm. For some reason, apps don't crash anymore after using the debug build when I disable unmount by default but I'm still having some problems.

I tried different cases/combinations and was able to capture some logcats. I'm not gonna pretend and know what the logs imply so I'll just upload all of them.

Logcats with everything unmounted by default:

Logcats with only targeted apps including Momo unmounted (GMS mounted):

Logcats with only targeted apps including Momo unmounted (GMS also unmounted):

It seems like it works as expected (with Momo as basis) with the combination: mounted by default, Pixelify disabled and GMS unmounted. I'm not sure if this is because of Zygisk Assistant or Shamiko but I had both of them enabled across all my tests. I didn't have enough time to try Shamiko disabled.

My bank app (GoTyme) still detects root but I'll create a different issue for this after I do more tests.

Having Pixelify work with Zygisk Assistant would be ideal for me. Pixelify is essential for my daily phone usage (region-locked Pixel features) so I'll probably won't use Zygisk Assistant until it's possible to have them both at the same time. I'm also hoping to leave unmount as default and just mount the needed apps for it to stop crashing at boot but I could probably figure it out myself unless you have some ideas. Let me know if you need more logs.

snake-4 commented 3 months ago

Can you also try with this module as well? https://github.com/HuskyDG/Zygisk-FontLoader

I think Pixelify replaces fonts so that is likely the reason.

sonroyaalmerol commented 3 months ago

Tried it with FontLoader but Momo still detects Zygisk if Pixelify is enabled. Here's the logcat if it helps: log-with-fontloader.txt

snake-4 commented 3 months ago

There is not a single umount call in the logs yet the apps can't access /data. I suspect this might be caused by Shamiko. Can you try without it?

If this is actually caused by it, I can try to prevent other modules from unmounting stuff.

sonroyaalmerol commented 3 months ago

FontLoader & Pixelify enabled with Shamiko disabled results to Momo error "The environment is broken" (tried restarting a few times but still got the same error). Log: log-no-shamiko.txt

snake-4 commented 3 months ago

There are two issues here. When Shamiko is used with this module, it unmounts /data in your case. Somewhat similar to #21 I suspect it's because Shamiko hooks unshare if it runs before our module and this module also calls unshare and hooks it afterwards. So we end up calling Shamiko's hook and that somehow gets it to unmount /data...

The other issue is that Pixelify replaces fonts and has a resource overlay. See #11 #13

Another unrelated thing is that since you're injecting BootloaderSpoofer to the apps. They will be able to detect LSPosed presence easily.

snake-4 commented 1 month ago

Closing in favor of #59