Commit Graph

41 Commits

Author SHA1 Message Date
ThePedroo
52885faf8b remove: dl.cpp file and replace with "dlopen"
This commit replaces DlopenMem for dlopen, removing the need for "dl.cpp" file.
2025-04-05 15:52:47 -03:00
Pedro.js
886e2f8396 improve: mounting system, compatibility; remove: logging on release (#111)
This commit adds numerous improvements to the state of hidden'ility of ReZygisk, and also for compatibility. Recommended to check #111 for more information.
2025-03-29 12:17:57 -03:00
Reveny
92e2f528a9 add: Android 9 support (#117)
This commit makes ReZygisk load Zygisk libraries directly, not utilizing memfd, as it doesn't exist in older versions of Android.
2025-03-22 19:12:24 -03:00
JingMatrix
0671f2e497 improve: reset linker module counters
Two counters for module loading and unloading are introduced in the commit a2e83ab348. To remove linker traces of libzygisk.so and Zygisk modules, we should reset them properly.
2024-12-18 07:21:03 +01:00
JingMatrix
5e072bd919 improve: cache scanned virtual maps
Reading the file `/proc/self/maps` is detectable by the target process.
Hence, we should cache scanned virtual maps after `libart.so` is loaded for later plt hooks in the target process.
2024-12-18 07:21:03 +01:00
JingMatrix
2814aaf67f remove: unnecessary memory mapping renaming
Note that it is impossible to hide injecting trace of virtual memory maps from the hooked target process.
ReZygisk will only focus on removing its trace for approcess that are not hooked by modules.
2024-12-18 07:19:41 +01:00
JingMatrix
b7138d6353 add: drop soinfo for libzygisk.so
1. fix typo vsdo -> vdso and allow this symbol to be not found, which is the case for the 32bit linkers on some devices
2. use soinfo_free to fully remove the soinfo record of libzygisk.so
3. set `soinfo.size = 0` to avoid the library being unmapped while removing its soinfo record
4. add more debug logs for troubleshooting
2024-12-15 16:28:49 +01:00
JingMatrix
5e43e4a71b improve: hook pthread_attr_setstacksize
Relying on dlclose to unload libzygisk.so will block us to clean its trace in the solist.
This commit allows us to unmap libzygisk.so without using dlclose.
To call munmap, we use the function pthread_attr_setstacksize instead of pthread_attr_destroy, so that tail-call can still be applied here since it has the same signature as munmap.
2024-12-15 16:25:06 +01:00
JingMatrix
6c41a8188d improve: drop soinfo records of loaded modules
In Bionic linker, the `soinfo` structure has a field `next`, which points to the next loaded library in a linked list consisting of all loaded libraries.
Hence, an injected process can easily find all loaded libraries.
Previously in ReZygisk, module library records are hidden by setting the `pathname` field to be empty, which is futile but easier to detect.
Current idea of dropping record can be found in the following commit:
5d635e8c66
2024-12-06 00:02:29 +01:00
ThePedroo
ba7d044611 fix: additional new line in some logs
This commit fixes the issue where some loggings would add an additional new line.
2024-11-10 23:11:49 -03:00
ThePedroo
763e94b9b6 fix: Magisk app marking Zygisk as disabled
This commit fixes the regression added (by me) that doesn't set "ZYGISK_ENABLED" environment variable, making it mark Zygisk as disabled.
2024-08-15 00:38:25 -03:00
ThePedroo
3451057d17 add: ignore modules in manager process
This commit adds the code to ignore running modules in the manager process.
2024-06-30 19:26:55 -03:00
Pedro.js
af96b85a91 add: maps hiding (#13)
This commit adds maps hiding. This commit is taken from Reveny's PR, for more information, see #9.

solves #9
2024-06-26 19:38:34 -03:00
ThePedroo
2017140e0e update: AppSpecializeArgs
This commit updates the AppSpecializeArgs to match newest one.
2024-06-22 23:19:37 -03:00
Matt
2047bdb1bf add: APatch support (#4)
This commit adds support for APatch.
2024-06-22 23:13:29 -03:00
5ec1cff
cbd0f0f0c3 refine mount prop 2024-01-02 23:39:26 +08:00
5ec1cff
d5c896e966 check manager app 2024-01-02 19:33:27 +08:00
5ec1cff
cd714527e9 remove unnecessary jni hook logs 2023-12-31 14:27:19 +08:00
5ec1cff
12f57d6e8c log if jni hook failed 2023-12-12 13:12:58 +08:00
5ec1cff
49886d9485 Fixes for Android 14 QPR2 B2 (https://github.com/topjohnwu/Magisk/pull/7620) 2023-12-12 13:05:10 +08:00
5ec1cff
b45d55e83d change some logs level to V 2023-12-12 10:50:11 +08:00
5ec1cff
040643337d init monitor 2023-11-12 20:34:45 +08:00
5ec1cff
ba8c313122 Merge branch 'art2' into new-pt
# Conflicts:
#	loader/src/Android.mk
#	loader/src/external/Android.mk
#	loader/src/injector/hook.cpp
#	module/src/customize.sh
#	zygiskd/Cargo.toml
#	zygiskd/src/utils.rs
#	zygiskd/src/watchdog.rs
2023-11-08 15:33:15 +08:00
5ec1cff
ac53ef11a3 refactor jni hooks 2023-11-04 16:39:10 +08:00
5ec1cff
f78c217552 init-sigstop-based ptrace zygisk 2023-10-31 18:36:01 +08:00
5ec1cff
a2af28dc6f add 32 bit support back & fix x86-64 support & fix jni hook restore (#59)
* Add back 32 bit support & some fix

* fix system server crash on android 10

* Refine code

---------

Co-authored-by: Nullptr <noreply@nullptr.icu>
2023-10-24 15:27:21 +08:00
Nullptr
9051f59bf6 Fix hook 2023-10-20 15:24:42 +08:00
5ec1cff
77cb323506 remove dead code (#53) 2023-10-19 01:47:53 +08:00
LoveSy
db47f03728 New way to unload zygisk (#51)
* use old binder_rs

* New way to unload zygisk (3a4fe53)

Co-authored-by: LoveSy <shana@zju.edu.cn>
Co-authored-by: 残页 <31466456+canyie@users.noreply.github.com>

---------

Co-authored-by: 5ec1cff <ewtqyqyewtqyqy@gmail.com>
Co-authored-by: 残页 <31466456+canyie@users.noreply.github.com>
2023-10-15 11:11:05 +08:00
Nullptr
b7bed4ad35 Fix pltHookCommit 2023-03-23 19:54:45 +08:00
Nullptr
09b6673ab0 Implement revert_unmount_magisk 2023-02-28 16:03:41 +08:00
Nullptr
57d3d8a0ba Refine unmount 2023-02-18 19:14:15 +08:00
Nullptr
fc9bc3b28f Refine code 2023-02-14 10:14:46 +08:00
Nullptr
2bcb36ab4a Remove vtable hook 2023-02-10 23:18:27 +08:00
Nullptr
814476ea7a Log to zygiskd 2023-02-08 14:49:32 +08:00
Nullptr
d416758135 Add basic hide 2023-02-02 20:51:36 +08:00
Nullptr
581506a1b5 Fix random crash 2023-02-02 14:59:21 +08:00
Nullptr
d720ed910a Synchronize hook.cpp with Magisk 2023-02-02 11:53:08 +08:00
Nullptr
4cbac00e28 Revert preload 2023-01-31 19:33:21 +08:00
Nullptr
335a1c3437 Preload modules 2023-01-31 18:40:49 +08:00
5ec1cff
b8678720fb Zygisk injector (#1)
* fix x86

* add lsplt

* transplant from zygisk

* api v4

Signed-off-by: 5ec1cff <ewtqyqyewtqyqy@gmail.com>

* Remove redundant logs

Signed-off-by: 5ec1cff <ewtqyqyewtqyqy@gmail.com>

---------

Signed-off-by: 5ec1cff <ewtqyqyewtqyqy@gmail.com>
2023-01-31 15:03:01 +08:00