Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SystemUI does not work with Zygisk enabled #7489

Closed
ubergeek77 opened this issue Nov 8, 2023 · 11 comments
Closed

SystemUI does not work with Zygisk enabled #7489

ubergeek77 opened this issue Nov 8, 2023 · 11 comments

Comments

@ubergeek77
Copy link

Device: Pixel 8 Pro
Android version: Android 14 (GrapheneOS)
Magisk version name: 26.4
Magisk version code: 26401 (aa6c7c1) (D)


I first reported this on a similar issue that has since been closed:

#7448 (comment)

I also reported that a certain build of Magisk with Zygisk improvements does not experience this issue:

#7448 (comment)


When Zygisk is enabled, SystemUI does not work properly. The system boots to the launcher, and apps can be opened and used, but the following elements are not loaded and therefore do not function:

  • System navigation - the navigation bar does not show, regardless of if "3-button" or "gesture" navigation is used. Any kind of navigation, including gestures, is not possible. The user cannot go "back," "home," and the "recents" screen is not accessible.
  • Notification bar - the notification bar is not visible, and the pull-down gesture to access quick settings does not function.
  • Power menu - the standard power menu is not present. The system falls back to the safe mode power menu.
  • Lock screen - the screen will simply turn off when the power button is tapped. If the power button is tapped again, the phone will resume in whatever app it was in, but without displaying the lock screen.

This issue occurs in both 26.3 and 26.4, the latter of which had some improvements to FD sanitization. This occurs only with Zygisk enabled. The broken SystemUI elements work again if Zygisk is disabled.

This issue does not occur on this build which appears to change the way Zygisk is injected:

https://github.com/topjohnwu/Magisk/actions/runs/6767188369

On this build, Zygisk works properly, and can be enabled safely without breaking SystemUI.


Boot logcat:
boot-logcat.log

Magisk log:
magisk_log_2023-11-07T19.12.26.log

@osm0sis
Copy link
Collaborator

osm0sis commented Nov 8, 2023

Interesting I don't have this issue on Pixel 8 Pro stock ROM.

@Unknown78
Copy link

I have similar issue on #7472 (comment), I could boot, but my screen is black. I couldn't open Magisk to check whether Zygisk is successfully enabled or not.

@ubergeek77
Copy link
Author

I doubt that is related, as your issue is happening on Android 7, which is quite old.

Try the build I linked and see if it helps?

@Unknown78
Copy link

Thanks for your suggestion, I've tried it. But it still the same, black screen.

@canyie
Copy link
Collaborator

canyie commented Nov 8, 2023

The fix 9fbd079 has been merged into master branch

@pixincreate
Copy link

pixincreate commented Dec 3, 2023

@ubergeek77, since you're running GrapheneOS, can you please confirm whether storage and network works when Magisk is installed?
Bluejay running GrapheneOS with Magisk 26401 seems to have a ton of issues (which I'll be report here again) which are reported in the above mentioned issue by user ccoager.

After installing Magisk on Bluejay running GOS:

  • Network module does not work. Meaning, no signal or WiFi, but WiFi is being detected in the logs and it tries to connect to it but fails. Clicking network settings in the settings app results settings to stop responding
  • The same applies to storage as well. Storage settings stops responding and no apps are able to access storage
  • Zygisk is turned off and never turns on even after reboot
  • If you've hardened memory allocator turned on and you flash Magisk, then the device goes to bootloop resulting in system_server to crash

GrapheneOS devs response when I first bought up this on Twitter:

It's not GrapheneOS after you're replaced a bunch of the core OS with a rootkit severely damaging the security model. It was never supported and if you didn't notice breakage earlier that's surprising with how much we change. Auditor can tell you if you're running GrapheneOS.
All of these problems are caused by replacing the core of GrapheneOS with buggy, insecure software. If you switch what you're using to GrapheneOS itself rather than a broken derivative of it, you won't have these problems. None of these problems are caused by GrapheneOS.

Better I'll put up the entire thread so that anyone can go through it:
https://nitter.net/pixincreate/status/1729015913356349782
https://nitter.net/pixincreate/status/1729029093168185403

@ubergeek77
Copy link
Author

@pixincreate Everything works, but I still have to use the debug build I linked originally, and I can't use Zygisk. It's still extremely unstable with Zygisk, even with that build. I'm hoping the Zygisk changes coming in 27 make it a bit more stable.

Try the build I linked in this report, it should work for you.

@pixincreate
Copy link

Cool, I was able to boot my pixel with this(latest one) CI build except Zygisk (it never turns on) of course:

12-03 23:56:51.158   899   899 E : zygisk64: unknown signature of nativeForkAndSpecialize(II[II[[IILjava/lang/String;Ljava/lang/String;[I[IZLjava/lang/String;Ljava/lang/String;Z[Ljava/lang/String;[Ljava/lang/String;ZZ[J)I
12-03 23:56:51.158   899   899 E : zygisk64: unknown signature of nativeSpecializeAppProcess(II[II[[IILjava/lang/String;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;Z[Ljava/lang/String;[Ljava/lang/String;ZZ[J)V
12-03 23:56:51.158   899   899 I : zygisk64: replace nativeForkSystemServer
12-03 23:56:51.621   900   900 E : zygisk32: unknown signature of nativeForkAndSpecialize(II[II[[IILjava/lang/String;Ljava/lang/String;[I[IZLjava/lang/String;Ljava/lang/String;Z[Ljava/lang/String;[Ljava/lang/String;ZZ[J)I
12-03 23:56:51.621   900   900 E : zygisk32: unknown signature of nativeSpecializeAppProcess(II[II[[IILjava/lang/String;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;Z[Ljava/lang/String;[Ljava/lang/String;ZZ[J)V

@ubergeek77
Copy link
Author

You could try turning off "Secure app spawning" in Security settings, since that messes with Zygote, but it didn't change the situation for me. After the bug in my original report here was fixed, Zygisk would work somewhat normally, but the system would become unstable. Apps would freeze, stop responding to touches, or would respond to touches but in unexpected ways (i.e. you'd click the new tab button in Chrome, and it would visually react to you touching, but then nothing would happen).

I've basically given up on Zygisk with GrapheneOS, it's enough for me that Magisk works. Now I just use the banking services I wanted apps for in a browser.

@pixincreate
Copy link

Zygisk here is invasive from what I can see at this point.

@chenxiaolong
Copy link
Contributor

Cool, I was able to boot my pixel with this(latest one) CI build except Zygisk (it never turns on) of course:

12-03 23:56:51.158   899   899 E : zygisk64: unknown signature of nativeForkAndSpecialize(II[II[[IILjava/lang/String;Ljava/lang/String;[I[IZLjava/lang/String;Ljava/lang/String;Z[Ljava/lang/String;[Ljava/lang/String;ZZ[J)I
12-03 23:56:51.158   899   899 E : zygisk64: unknown signature of nativeSpecializeAppProcess(II[II[[IILjava/lang/String;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;Z[Ljava/lang/String;[Ljava/lang/String;ZZ[J)V
12-03 23:56:51.158   899   899 I : zygisk64: replace nativeForkSystemServer
12-03 23:56:51.621   900   900 E : zygisk32: unknown signature of nativeForkAndSpecialize(II[II[[IILjava/lang/String;Ljava/lang/String;[I[IZLjava/lang/String;Ljava/lang/String;Z[Ljava/lang/String;[Ljava/lang/String;ZZ[J)I
12-03 23:56:51.621   900   900 E : zygisk32: unknown signature of nativeSpecializeAppProcess(II[II[[IILjava/lang/String;Ljava/lang/String;ZLjava/lang/String;Ljava/lang/String;Z[Ljava/lang/String;[Ljava/lang/String;ZZ[J)V

That specific issue is due to GrapheneOS/platform_frameworks_base@b45048f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants