Commit Graph

398 Commits

Author SHA1 Message Date
ThePedroo
e0ce1473dd fix: crash when umounting preloaded file
This commit fixes an issue where Zygote will Abort when a preloaded file cannot be opened anymore, which happens when ReZygisk umounts a file from a module (such as Quick Switch Overlay or Pixelify) that is preloaded. To fix that, we hook on the function that causes the crash and bypass its execution if it cannot be opened.
2025-07-20 19:27:36 -03:00
ThePedroo
bf3c73d72b fix: not extracting any binaries in some devices
The commit fixes the issue that in devices that "ro.system.product.cpu.abilist" doesn't exist, it will cause ReZygisk "customize.sh" to not extract any binaries. Because of that, we'll fallback to the old "ro.product.cpu.abilist" when "ro.system.product.cpu.abilist" doesn't exist.
2025-07-20 14:10:56 -03:00
ThePedroo
510e8a2de4 fix: not extracting 32-bit binaries in systems using Tango
This commit fixes an issue where ReZygisk would not extract the 32-bit libraries in systems that utilize Tango (binary translation) to run 32-bit applications, as "ro.product.cpu.abilist" will only show the CPU supported architectures, not the system ones, resulting in only extracting 64-bit libzygisk.so and ReZygiskd despite having 32-bit app_process (Zygote).
2025-07-20 02:43:51 -03:00
ThePedroo
38cfbb25ef fix: Permission Denied on setns in 3.19- kernels
This commit fixes the issue where "setns" in older kernels will fail, as until 3.19 Linux used NSFS (Name Space File System) for namespaces (/proc/self/mnt/ns), which was not taken into consideration in ReZygisk SELinux rules.
2025-07-15 05:36:11 -03:00
ThePedroo
d54cac89a7 fix: missing #define for misc.h
This commit fixes the missing "#define", used to ensure a header symbols are not re-defined.
2025-07-15 05:20:59 -03:00
ThePedroo
90da42a10b fix: passing invalid address to reply_ok in KernelSU prctl
This commit fixes an issue that was caused by ReZygiskd passing NULL (an invalid address) in "reply_ok" to KernelSU driver, which expects it to be a valid address to pass if the request was successful, causing it to spam the dmesg with error logs.
2025-07-15 05:12:33 -03:00
ThePedroo
872ba693a1 remove: futile maps hiding
This commit removes the maps hiding, as it not only breaks behavior compatibility with Magisk Zygisk (original), but also can break some modules because of that. It doesn't provide any improved hiding in slightly better detections and makes the codebase more complex.
2025-07-15 03:41:48 -03:00
ThePedroo
2dfa221287 remove: unnecessary unshare hook
This commit removes the "unshare" hook. It used to provide the right timing for manual umount in the past, however with recent umount system changes, basing now on mount namespaces, those are handled way earlier, and this "unshare" hook makes no difference, being considered useless.
2025-07-15 03:31:01 -03:00
Rifat Azad
bc1b757bb8 update: CMD_HOOK_MODE and CMD_GET_MANAGER_UID values (#200)
This commit updates the values for "CMD_HOOK_MODE" to match newest KernelSU Next value and "CMD_GET_MANAGER_UID", now unified in both KernelSU and KernelSU Next.

Signed-off-by: Rifat Azad <33044977+rifsxd@users.noreply.github.com>
v1.0.0-rc.3
2025-07-11 09:32:17 -03:00
Re*Index. (ot_inc)
a0a54f2153 add: ja_JP translation to WebUI (#195)
This commit adds Japanese translation to ReZygisk WebUI.

Signed-off-by: Re*Index. (ot_inc) <32851879+reindex-ot@users.noreply.github.com>
2025-07-05 00:30:22 -03:00
Ada
295a62b649 update: tr_TR credits in TRANSLATOR.md (#192)
This commit updates the credits for "tr_TR" translator, updating witchfuneral's GitHub account name.

Signed-off-by: Ada <65596971+witchfuneral@users.noreply.github.com>
2025-07-05 00:25:45 -03:00
ThePedroo
b6f02b39b3 fix: runtime KSUN manager switch detection
This commit fixes the issue where the new KernelSU Next manager wouldn't be recognized if it was changed without a reboot.
2025-07-01 14:31:06 -03:00
ThePedroo
e036b1f40a add: KernelSU Next spoofed manager recognition support
This commit adds support for ReZygiskd to identify which app is the manager in KSUN (KernelSU Next) builds with spoofed manager package name.
2025-07-01 14:11:39 -03:00
ThePedroo
9a3b2f4a79 fix: KernelSU variant detection
This commit fixes the KSU variant detection, which previously was hardcoded on accident to always set it to KernelSU Next.
2025-06-29 14:23:04 -03:00
nampud
9810eb3974 improve: ptrace_message reset with seccomp (#191)
This commit improves how "ptrace_message" is cleaned by utilizing seccomp (Secure Computation Mode) to clear its value.

"ptrace_message" not being cleared is a Linux kernel vulnerability/bug that impacts all versions below 6.1, as the fix only came in 6.1, and because of that, we need to find ways to "0" it. This is the second fix for that, being the GKI2 fix the first: 70697be9a5
2025-06-29 03:41:42 -03:00
ThePedroo
823623a96f improve: set ZYGISK_ENABLED in all supported managers' process
This commit sets the environment variable "ZYGISK_ENABLED" for all managers' process, not limiting to Magisk anymore, so that managers can easily detect (Re)Zygisk.
2025-06-27 14:39:36 -03:00
ThePedroo
a75b2fe2b8 add: KernelSU Next recognition support
This commit adds support for recognizing KernelSU (KSUN) manager to ReZygiskd.
2025-06-27 14:39:21 -03:00
ThePedroo
48238521df fix: root related mounts leak in KernelSU in isolated services
This commit fixes the leak of mounts in KernelSU with global umount disabled in isolated services. This happens because KernelSU doesn't handle isolated services in kernel side, so we must find the main app UID and see if that UID is in denylist instead. With that, also improve APatch detection to take advantage of faster integer/UID comparison rather than always check process/string comparison, and only fallback to process name based if UID is not found.

Co-Authored-By: nampud <nampud@users.noreply.github.com>
2025-06-24 19:21:26 -03:00
ThePedroo
fa9adcf3b5 fix: FORCE_DENYLIST_UNMOUNT not forcing umount
This commit fixes the issue where because the mount namespace switch happened only before the Zygisk modules execution, they wouldn't have the opportunity to set "FORCE_DENYLIST_UNMOUNT" flag. Now, with this commit, which added another check to know if that flag was set by a Zygisk module, and if so, switched to mount namespace, adjusts the behavior to the expected one.
2025-06-22 18:33:10 -03:00
ThePedroo
6c05527ffa fix: Zygisk modules not being recognized in WSA
This commit fixes the issue where due to ARM architectures having priority in ReZygiskd code, ReZygisk, running on emulators, wouldn't be capable of recognizing Zygisk modules. This order is important, Zygisk modules should always give priority to the native architecture over the emulated one, since WSA runs Zygote in x64/x86.
2025-06-22 17:09:37 -03:00
ThePedroo
aff2ad8d3c add: SIGPIPE handling in ReZygiskd
This commit adds "SIGPIPE" signal handling in ReZygiskd. Some processes might die while ReZygiskd is still processing the response, and it will fail to write to the reader, now dead, resulting in a "SIGPIPE". Without proper handling, the process (ReZygiskd) would die, and this commit properly handled it to gracefully log it instead of dying.
2025-06-22 02:10:43 -03:00
ThePedroo
b7fe7b3dbe fix: root related mounts leak in APatch in isolated services
This commit fixes the issue where mounts related to APatch and ReZygisk would be leaked in isolated services for APatch environments as the UID between the main process and isolated service is different, resulting it to not be found in "package_config" and default to not switch to clean mount namespace.
2025-06-21 14:29:03 -03:00
ThePedroo
f432550f07 improve: dynamically retrieve libc.so path
This commit makes ptracer dynamically get "libc.so" library path, avoiding errors when errors happen in environments where libc.so from zygote doesn't come from "/system/lib" or "/system/lib64".
2025-06-15 15:22:44 -03:00
nampud
a0ab02cedc fix: not dropping SoInfo of unclosed modules; fix: not performing maps spoofing (#187)
This commit fixes the issue where unclosed modules, as in not being requested to be "dlclose"d, wouldn't have their SoInfo structures freed. It also fixes the issue of maps spoofing not being performed due to the "spoof_maps" parameter being erroneously set to false in the second "clean_trace" call.
2025-06-15 09:47:54 -03:00
ThePedroo
f9a23a2882 fix: checking if find_containing_library exists and error'ing
This commit fixes the typo where ReZygisk would check if a function exists in linker, and if it did, not proceed instead of proceeding.

closes #184
2025-06-13 17:21:55 -03:00
nampud
d111a2dfc5 fix: zygote64 crashes due to perfetto by unloading earlier (#177)
This commit fixes the crashes in "zygote64" caused by libperfetto hooks (more information in #177) by unloading earlier.
2025-06-10 23:00:59 -03:00
ThePedroo
cd4784376e fix: ReZygiskd out-of-bounds write due to too small system_arch buffer
This commit fixes the issue where when the "ro.product.cpu.abilist" prop has a value bigger than 31 characters, which mostly happens in WSA (Windows Subsystem For Android) as it can support 5+ architectures, it will write outside the buffer, leading to undefined behavior, but most of the time crashes.
2025-06-10 19:32:35 -03:00
ThePedroo
c786790b0f fix: Trusted CI failing in forks
This commit fixes issue that due to the lack of private and private key in forks, the Trusted CI ends up failing.
2025-06-09 22:59:44 -03:00
ThePedroo
4f35e06ac4 fix: gradle related warnings
This commit fixes the warnings caused by using deprecated functions in ReZygisk building system.
2025-06-09 14:36:07 -03:00
ThePedroo
57f985292e fix: leak of dir fd in ReZygiskd
This commit fixes the leak of dir fd caused due to not calling "closedir" after dir being used.
2025-06-09 14:35:04 -03:00
ThePedroo
34643c794f improve: SoInfo hiding code compatibility
This commit improves the compatibility of SoInfo hiding code with more Android versions, like Android 16 QPR1 Beta 1 and newer versions, and also reduces complexity of the code.
2025-06-09 14:34:00 -03:00
ThePedroo
ec705fb260 fix: removal of all PLT hooks unconditionally
This commit fixes the issue where due to a confusion, ReZygisk was coded so that it would remove all PLT hooks, even if they were meant to be kept. This has been fixed appropriately in LSPlt side, allowing to revert back to how it was before.
2025-06-06 03:09:55 -03:00
ThePedroo
c023da0fd6 fix: Code of Conduct URL in templates
This commit fixes the URL of CoC which would previously point to the wrong place.
2025-06-02 17:08:50 -03:00
ThePedroo
63f29f0771 update: setup-gradle action
This commit updates the "setup-gradle" action to major 4 so that it isn't in a specific version.
2025-06-01 23:27:21 -03:00
ThePedroo
c975722795 update: PLT hooks unload
This commit changes how PLT hooks are unloaded, so that we're able to bypass detections caused by page faulting libandroid_runtime.so.
2025-06-01 23:21:43 -03:00
ThePedroo
2f589d0eda update: LSPlt source
This commit fixes the fork of LSPlt used in ReZygisk, from JingMatrix to PerformanC, for more control.
2025-06-01 23:21:24 -03:00
ThePedroo
70697be9a5 fix: ptrace_message leaking ReZygisk existence (zygote pid)
This commit fixes a trace left due to a kernel bug. In some cases (and all of them here), the sequence of events may lead to "ptrace_message" not be properly reset/not represent the actual state. This happens here, as when TRACEFORK is set in "monitor.c", setting "ptrace_message" as the PID of the new process, persists even when not tracing anymore, causing leaks.

This fix has been given by @nampud, in #171.
2025-05-27 19:32:20 -03:00
ThePedroo
6261466e44 fix: Zygisk module loading
This commit fixes the issue where ReZygisk would try to load Zygisk modules after umounting mounts, leading to them not being found anymore.
2025-05-25 01:10:25 -03:00
ThePedroo
d455117c49 fix: injection when libdl.so is not in apex
This commit fixes the issue where "libdl.so" wouldn't be found, when trying to inject "lizygisk.so", in systems where apex is in "/system/lib/libdl.so".
2025-05-23 12:27:15 -03:00
ThePedroo
6272e0a2ac improve: ReZygiskd umount code by unifying; improve: umount system by making umount if less strict
This commit both improves ReZygiskd umount system by unifying all root implementations code into a single one, and also by making it less strict to umount.
2025-05-20 14:25:39 -03:00
ThePedroo
62481ca2b6 fix: wrong logic for detecting leaked fds; add: leaked fd warning
This commit fixes the logic issue which made leaked fds not be closed by "libzygisk.so", causing crashes for some. It also adds a warning for when it finds a leaked fd, so that module developers can be notified.

fixes #163
2025-05-20 14:20:37 -03:00
ThePedroo
98f88916b8 update: module id
Historically "zygisksu" is the ZygiskOnKernelSU (known as Zygisk Next) module id, which due to ReZygisk being a fork of Zygisk Next, was used by it. To avoid conflicts in systems like MMRL, we decided to change it to "rezygisk". This, however, will allow both to be installed in the same system, although causing problems, as a side effect. The old module, with the old module id, must be uninstalled while the new one is installed.

closes #113
2025-05-18 20:10:14 -03:00
ThePedroo
ed347e879e add: misaki.sig for zip-level build integrity
This commit adds Misaki, a new ReZygisk system to help improve safety in the root community, by allowing users to check whether a build is official or not with the use of tools like SignSee.
Name credits for Anonymous, in The PerformanC Organization Telegram chat.
2025-05-18 17:18:10 -03:00
ThePedroo
ea49b887ab add: signed CIs for main branch
This commit makes the "main" branch CI builds signed from now on.
2025-05-18 16:43:29 -03:00
Alice w/🌧️
4de1b443cf add: ReZygisk WebUI (#73)
This commit adds the ReZygisk WebUI to ReZygisk.

Signed-off-by: Emulond Argent <108662981+Emulond@users.noreply.github.com>
Signed-off-by: WinCS <94188592+Meltartica@users.noreply.github.com>
Signed-off-by: Pedro.js <pedroolimpioguerra@gmail.com>
Signed-off-by: unexpected unresolved <minh15052008@gmail.com>
Signed-off-by: SheepChef <50871867+SheepChef@users.noreply.github.com>
Signed-off-by: AJleKcAHgP68 <78802768+AJleKcAHgP68@users.noreply.github.com>
Signed-off-by: Blazzycrafter <39300111+Blazzycrafter@users.noreply.github.com>
Signed-off-by: Igor <sorocean.igor@gmail.com>
Signed-off-by: unexpected unresolved <xeondev@xeondex.onmicrosoft.com>
Signed-off-by: Kirill Kuznetsov <kdevlab@yandex.ru>
Signed-off-by: Lucky Kiddos <95188840+GuitarHeroStyles@users.noreply.github.com>
Signed-off-by: Kitty <73357005+Kittyskj@users.noreply.github.com>
Signed-off-by: GhostFRR <ghost.game.fr@gmail.com>
Signed-off-by: Alice w/🌧️ <rainyxeon@gmail.com>
Signed-off-by: ZGX089ッ <159061718+ZG089@users.noreply.github.com>
Signed-off-by: thasave14 <93542339+thasave14@users.noreply.github.com>
Co-authored-by: ThePedroo <pedroolimpioguerra@gmail.com>
Co-authored-by: ExtremeXT <75576145+ExtremeXT@users.noreply.github.com>
Co-authored-by: Emulond Argent <108662981+Emulond@users.noreply.github.com>
Co-authored-by: RainyXeon <xeondev@xeondex.onmicrosoft.com>
Co-authored-by: Fyphen <fyphensub@gmail.com>
Co-authored-by: WinCS <94188592+Meltartica@users.noreply.github.com>
Co-authored-by: CaptainThrowback <captainthrowback@hotmail.com>
Co-authored-by: Kirill Kuznetsov <kdevlab@yandex.ru>
Co-authored-by: SheepChef <50871867+SheepChef@users.noreply.github.com>
Co-authored-by: AJleKcAHgP68 <78802768+AJleKcAHgP68@users.noreply.github.com>
Co-authored-by: Blazzycrafter <39300111+Blazzycrafter@users.noreply.github.com>
Co-authored-by: Igor <sorocean.igor@gmail.com>
Co-authored-by: Berlian Panca <53902591+bpanca05@users.noreply.github.com>
Co-authored-by: Willow Hayley Lovelace <65596971+dyingwillow@users.noreply.github.com>
Co-authored-by: witch <witch@dyingwillow.dev>
Co-authored-by: Lucky Kiddos <95188840+GuitarHeroStyles@users.noreply.github.com>
Co-authored-by: Kitty <73357005+Kittyskj@users.noreply.github.com>
Co-authored-by: GhostFRR <ghost.game.fr@gmail.com>
Co-authored-by: ZGX089ッ <159061718+ZG089@users.noreply.github.com>
Co-authored-by: thasave14 <93542339+thasave14@users.noreply.github.com>
Co-authored-by: Flopster101 <nahuelgomez329@gmail.com>
Co-authored-by: Lxchoooo <155797099+Lxchoooo@users.noreply.github.com>
2025-05-18 13:14:42 -03:00
Fyphen
bdcb67b1f9 add: Japanese README.md translations (#162)
This commit adds Japanese (ja-JP) translations of the "README.md"

Signed-off-by: Fyphen <fyphensub@gmail.com>
2025-05-18 11:45:07 -03:00
ThePedroo
54584410ce improve: flexibility of modules to modify mounts in app_specialize_pre
This commit improves the flexibility of modules to modify mounts in "preAppSpecialize" in denylisted apps, which would later be setns to a new namespace, after executing Zygisk modules "preAppSpecialize".
2025-05-16 17:07:42 -03:00
Pedro.js
7993278a5f update: READMEs information; remove: outdated READMEs (#146)
This commit updates the information in ReZygisk "README.md" and its translations, and it also removes the ones that were not updated.

Signed-off-by: Lucky Kiddos <95188840+GuitarHeroStyles@users.noreply.github.com>
Signed-off-by: GhostFRR <ghost.game.fr@gmail.com>
Signed-off-by: Alice w/🌧️ <rainyxeon@gmail.com>
Co-authored-by: GhostFRR <ghost.game.fr@gmail.com>
Co-authored-by: Lucky Kiddos <95188840+GuitarHeroStyles@users.noreply.github.com>
Co-authored-by: Alice w/🌧️ <rainyxeon@gmail.com>
2025-05-16 17:02:16 -03:00
ThePedroo
57cd281119 fix: missing 64-bit machikados in unsigned builds
This commit fixes the issue where the "machikado" files for 64-bit archs wouldn't be written as the else for unsigned builds only wrote two files.
2025-05-07 01:56:14 -03:00
ThePedroo
16c4d62cd8 fix: solist_drop_so_path explanation comment correctness
This commit fixes the explanation of why "solist_drop_so_path". ReZygisk does not "dlclose" in ptracer, and doesn't "dlclose" libzygisk.so at any point, but clean SoInfo traces then munmaps it later.
2025-05-07 01:56:12 -03:00