You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
improve: hiding
This commit improves hiding by moving monitor related files to /data/adb/rezygisk, where it's not accessable without root.
This commit is contained in:
@@ -9,41 +9,7 @@
|
|||||||
#define DEBUG_RAMDISK_AS_TMP_PATH 2
|
#define DEBUG_RAMDISK_AS_TMP_PATH 2
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
int tmp_path_type = CUSTOM_TMP_PATH;
|
zygiskd::Init("/data/adb/rezygisk");
|
||||||
|
|
||||||
if (getenv("TMP_PATH") == NULL) {
|
|
||||||
tmp_path_type = SBIN_AS_TMP_PATH;
|
|
||||||
|
|
||||||
if (access("/sbin", F_OK) == -1) {
|
|
||||||
tmp_path_type = DEBUG_RAMDISK_AS_TMP_PATH;
|
|
||||||
|
|
||||||
if (access("/debug_ramdisk", F_OK) == -1) {
|
|
||||||
printf("Cannot find TMP_PATH. You should make an issue about that.\n");
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tmp_path_type = CUSTOM_TMP_PATH;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (tmp_path_type) {
|
|
||||||
case CUSTOM_TMP_PATH: {
|
|
||||||
zygiskd::Init(getenv("TMP_PATH"));
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SBIN_AS_TMP_PATH: {
|
|
||||||
zygiskd::Init("/sbin");
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case DEBUG_RAMDISK_AS_TMP_PATH: {
|
|
||||||
zygiskd::Init("/debug_ramdisk");
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
printf("The ReZygisk Tracer %s\n\n", ZKSU_VERSION);
|
printf("The ReZygisk Tracer %s\n\n", ZKSU_VERSION);
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ androidComponents.onVariants { variant ->
|
|||||||
into(moduleDir)
|
into(moduleDir)
|
||||||
from("${rootProject.projectDir}/README.md")
|
from("${rootProject.projectDir}/README.md")
|
||||||
from("$projectDir/src") {
|
from("$projectDir/src") {
|
||||||
exclude("module.prop", "customize.sh", "post-fs-data.sh", "service.sh", "mazoku")
|
exclude("module.prop", "customize.sh", "post-fs-data.sh", "service.sh", "uninstall.sh", "mazoku")
|
||||||
filter<FixCrLfFilter>("eol" to FixCrLfFilter.CrLf.newInstance("lf"))
|
filter<FixCrLfFilter>("eol" to FixCrLfFilter.CrLf.newInstance("lf"))
|
||||||
}
|
}
|
||||||
from("$projectDir/src") {
|
from("$projectDir/src") {
|
||||||
@@ -67,7 +67,7 @@ androidComponents.onVariants { variant ->
|
|||||||
}
|
}
|
||||||
from("$projectDir/src/mazoku")
|
from("$projectDir/src/mazoku")
|
||||||
from("$projectDir/src") {
|
from("$projectDir/src") {
|
||||||
include("customize.sh", "post-fs-data.sh", "service.sh")
|
include("customize.sh", "post-fs-data.sh", "service.sh", "uninstall.sh")
|
||||||
val tokens = mapOf(
|
val tokens = mapOf(
|
||||||
"DEBUG" to if (buildTypeLowered == "debug") "true" else "false",
|
"DEBUG" to if (buildTypeLowered == "debug") "true" else "false",
|
||||||
"MIN_APATCH_VERSION" to "$minApatchVersion",
|
"MIN_APATCH_VERSION" to "$minApatchVersion",
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ ui_print "- Extracting module files"
|
|||||||
extract "$ZIPFILE" 'module.prop' "$MODPATH"
|
extract "$ZIPFILE" 'module.prop' "$MODPATH"
|
||||||
extract "$ZIPFILE" 'post-fs-data.sh' "$MODPATH"
|
extract "$ZIPFILE" 'post-fs-data.sh' "$MODPATH"
|
||||||
extract "$ZIPFILE" 'service.sh' "$MODPATH"
|
extract "$ZIPFILE" 'service.sh' "$MODPATH"
|
||||||
|
extract "$ZIPFILE" 'uninstall.sh' "$MODPATH"
|
||||||
extract "$ZIPFILE" 'mazoku' "$MODPATH"
|
extract "$ZIPFILE" 'mazoku' "$MODPATH"
|
||||||
mv "$TMPDIR/sepolicy.rule" "$MODPATH"
|
mv "$TMPDIR/sepolicy.rule" "$MODPATH"
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,7 @@ create_sys_perm() {
|
|||||||
chcon u:object_r:system_file:s0 $1
|
chcon u:object_r:system_file:s0 $1
|
||||||
}
|
}
|
||||||
|
|
||||||
export TMP_PATH=/sbin
|
export TMP_PATH=/data/adb/rezygisk
|
||||||
[ -d /sbin ] || export TMP_PATH=/debug_ramdisk
|
|
||||||
|
|
||||||
create_sys_perm $TMP_PATH
|
create_sys_perm $TMP_PATH
|
||||||
|
|
||||||
|
|||||||
5
module/src/uninstall.sh
Normal file
5
module/src/uninstall.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/system/bin/sh
|
||||||
|
|
||||||
|
export TMP_PATH=/data/adb/rezygisk
|
||||||
|
|
||||||
|
rm -rf $TMP_PATH
|
||||||
Reference in New Issue
Block a user