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

Re-write Zygiskd #38

Closed
wants to merge 44 commits into from
Closed

Re-write Zygiskd #38

wants to merge 44 commits into from

Conversation

ThePedroo
Copy link
Member

@ThePedroo ThePedroo commented Jul 24, 2024

Changes

This PR focus on the change of zygiskd from Rust to C99.

Why

C99 has been proven to be a more robust and future-proof language, also being more performant and capable.

Checkmarks

  • The modified functions have been tested.
  • Used the same indentation as the rest of the project.

Additional information

Also will allow the use of multiple root implementation by just ignoring deny list.

This commit re-writes Zygiskd to be C99.
This commit adds the first base for C99 zygiskd, that is not fully working or code-ready.
@ThePedroo ThePedroo added enhancement New feature or request not confirmed This issue or pull request is not confirmed to be done. labels Jul 24, 2024
This commit both improves the code readability and also fixes a bug that wouln't start companions properly.
This commit will have a rebase soon.
This commit fixes building process of new zygiskd.
This commit removes the setup of Rust in the CI.
This commit improves the compilation commands resulting in even better sized releases.
This commit corrects mount namespace code.
This commit fixes the conflicts between "main" and "add/zygiskd-c99".
@ThePedroo ThePedroo marked this pull request as ready for review August 15, 2024 22:42
This commit improves the code that calls the compiler to compile zygiskd.
This commit fixes the use of fgets in a file descriptor, which would make it easier to use fopen instead of using fdopen.
This commit fixes the building of zygiskd.
This commit fixes the segmentation fault when trying to write to /proc/.../sockcreate.
This commit adds support for zygiskd C99 to recognize APatch rooted devices.
This commit adds Magisk support to Zygiskd C99, and also fixes some code issues of it.
@nino1802
Copy link

Nice

This commit updates the LICENSE for Zygiskd C99, using a LICENSE that doesn't allow the code to be used for closed source projects, and with more restrictions while allowing other people to fork, modify as much as wanted as long as it remains open source.
This commit removes the logging made to the zygiskd.log file.
This commit fixes some few UBs (Undefined Behaviors) based on numerous sanitizers, and also adds the missing error handling for a "malloc" call.
This commit improves Zygisk's build gradle file by avoiding the repetition of compiler flags.
This commit improves the robustness of the code by removing debug logs, fixing a memory leak, and adding missing error handling.
This commit fixes compiling errors from missing declaration of variables and missing macros.
This commit removes logging used in development, which is not needed anymore.
This commit fixes the Magisk part of Zygiskd C99 which used to mark all apps as outside DenyList.
This commit improves the spacing of the module status description.
This commit adds the Magisk variant to module description, and also improves KernelSU detection by requiring the userspace part of it to be installed, AKA "ksud".
@Zdendaop
Copy link

Changes

This PR focus on the change of zygiskd from Rust to C99.

Why

C99 has been proven to be a more robust and future-proof language, also being more performant and capable.

Checkmarks

  • The modified functions have been tested.
  • Used the same indentation as the rest of the project.

Additional information

Also will allow the use of multiple root implementation by just ignoring deny list.

This commit fixes a memory leak and a user-after-free vulnerability in APatch code of Zygiskd.
This commit fixes the module name in Zygiskd log which would only show a letter.
This commit improves the Zygiskd Magisk code by avoiding redundant code and reducing complexity.
This commit fixes the value of the macro that defines the size of the longest root implementation name, leading to Zygiskd crashes on Magisk Official.
This commit fixes both fd leak and out-of-bounds access in the "exec_command" function, which can happen when execution of the command fails, leading to crashes on Magisk-rooted devices, and possibly APatch-rooted devices too.
This commit both fixes a possible out-of-bounds write by using "snprintf" over "sprintf" and also removes a unnecessary logging which was meant to be removed commits ago.
This commit both improves the code that parses "module.prop" file of ReZygisk, reducing its complexity greatly and also making it smaller, and also fixes an issue where ReZygisk would deference a NULL pointer, leading to crashes in Zygiskd crash.
This commit fixes the issue where some loggings would add an additional new line.
This commit fixes the space indentation done in the "ASSURE_*" macros.
@ThePedroo ThePedroo added confirmed This issue or pull request is confirmed to be done. and removed not confirmed This issue or pull request is not confirmed to be done. labels Nov 11, 2024
@ThePedroo
Copy link
Member Author

Landed on 97af7fe

@ThePedroo ThePedroo closed this Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed This issue or pull request is confirmed to be done. enhancement New feature or request
Projects
None yet
3 participants