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

Zygisk's FD sanitization broken on 26302 #7448

Closed
RV7PR opened this issue Oct 22, 2023 · 9 comments
Closed

Zygisk's FD sanitization broken on 26302 #7448

RV7PR opened this issue Oct 22, 2023 · 9 comments
Assignees
Labels
confirmed Issue confirmed to exist and the reason is known core This issue is related to Magisk Core regression Something works in previous versions but not in the current one

Comments

@RV7PR
Copy link
Contributor

RV7PR commented Oct 22, 2023

Device: Samsung Galaxy S23 Plus (SM-S916B)
Android version: 13
Magisk version name:
Magisk version code: 26302

magisk_log_2023-10-22T11.28.52.log

Apps not working properly and already checked with disabled modules.
So for now i'm back at 26301 with no issues.

Duolingo logcat:
duolingo.txt
Soundcloud logcat:
soundcloud.txt
Chrome logcat:
chrome.txt

Below is a video of app behaviour:

2ae4a1dd-7bda-4045-9951-74d18c019363.mp4
@vvb2060
Copy link
Collaborator

vvb2060 commented Oct 23, 2023

JNI FatalError called: (zygote) frameworks/base/core/jni/com_android_internal_os_ZygoteCommandBuffer.cpp:470: Accept(6) failed: Socket operation on non-socket
JNI FatalError called: (zygote) Unsupported st_mode for FD 53: FIFO
79a1c39 @topjohnwu

@vvb2060 vvb2060 added regression Something works in previous versions but not in the current one confirmed Issue confirmed to exist and the reason is known core This issue is related to Magisk Core labels Oct 23, 2023
@canyie canyie self-assigned this Oct 28, 2023
@canyie canyie changed the title Apps not working properly Zygisk's FD sanitization broken on 26302 Oct 28, 2023
canyie added a commit to canyie/Magisk that referenced this issue Oct 28, 2023
- Fix broken logic introduced by commit 79a1c39 which modify `fds_to_ignore` when `android_log_close` is called, where `fds_to_ignore` was already read and converted into a C++ vector, so our hacks never take effect. This fixes topjohnwu#7448
- The previous logic rely on `android_log_close` to close `logd_fd` in zygote and causes `logd_fd` being closed and re-acquired too many times. Update `fds_to_ignore` in zygote process as well to avoid that case.
@ubergeek77
Copy link

ubergeek77 commented Oct 30, 2023

Has anyone experienced an issue where the system navigation does not show up when Zygisk is enabled on Android 14? This happens on the latest Canary build and the build for PR #7464.

Based on the FD issues described, and since this only happens with Zygisk, I assume this is the cause (which is why I'm commening in this issue instead of making a new one), but I don't see anything in logcat that seems like a Zygote or SystemUI crash.

My home screen works, apps work, but the following SystemUI elements are gone/not loaded and therefore not working:

  • System navigation - both gesture and 3 button navigation. The visible bar is gone for both, and in gesture navigation, all gestures do not function (can't go back, can't go home, etc)
  • Statusbar - including the quick settings pulldown
  • Power menu - the system falls back to the safe mode power menu

Disabling Zygisk restores all of these elements.

@canyie
Copy link
Collaborator

canyie commented Oct 30, 2023

@ubergeek77 Does your issue also happen with 26301?

@ubergeek77
Copy link

@canyie Yes. The issue I described is still present in 26301, which I downloaded from:

https://github.com/topjohnwu/magisk-files/tree/ac34c108dedca819c3f944a03aec16e5acd81b41

Stable 26.3 has a similar issue, where it will be stuck at "Pixel is starting..." if Zygisk is enabled.

@ubergeek77
Copy link

ubergeek77 commented Nov 2, 2023

I am happy to report that this build seems to resolve the issue I described (not OP's issue, although I imagine that one is resolved too):

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

With this build, Zygisk is enabled, but everything I reported as broken above now works fine.

I've not yet done extensive testing using Denylist or other Zygisk features, so I can't speak to any of the performance issues mentioned previously, but the changes made to Zygisk in the commit I link seem to be a huge improvement.

@Impeta
Copy link

Impeta commented Nov 2, 2023

I got the exact same issue as #7468. In the meanwhile it's not updated, how would I go about installing and using the fixed build off actions? Same process? I tried it myself, yet I keep always installing only the latest published canary version instead.

@pmsobrado
Copy link

I don't know if it's related, but with Canary 26302 my bootlogo last longer than before, and I never get to the initial lockscreen. Power menu shows up though. I have LSPosed and CustoMIUIzer enabled, maybe there's an incompatibility of some sort. My phone is a Xiaomi Mi 10 Pro using Android 10 / MIUI 12 (a xiaomi.eu ROM).

Just commenting here in case anyone is having similar issues or a fix may arise. I'm staying on 26301 for now. My phone is my 'daily driver', and for now I really don't have the time or the 'guts' to start flashing versions or disabling modules to test things.

Thanks in advance.

@topjohnwu
Copy link
Owner

Fixed in 489100c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed Issue confirmed to exist and the reason is known core This issue is related to Magisk Core regression Something works in previous versions but not in the current one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants
@ubergeek77 @topjohnwu @RV7PR @pmsobrado @vvb2060 @canyie @Impeta and others