You've already forked ZygiskNext
mirror of
https://github.com/Dr-TSNG/ZygiskNext.git
synced 2025-08-27 23:46:34 +00:00
fix wrong entry break addr on arm32
This commit is contained in:
@@ -18,7 +18,11 @@ int main(int argc, char **argv) {
|
|||||||
return 0;
|
return 0;
|
||||||
} else if (argc >= 3 && argv[1] == "trace"sv) {
|
} else if (argc >= 3 && argv[1] == "trace"sv) {
|
||||||
auto pid = strtol(argv[2], 0, 0);
|
auto pid = strtol(argv[2], 0, 0);
|
||||||
return !trace_zygote(pid);
|
if (!trace_zygote(pid)) {
|
||||||
|
kill(pid, SIGKILL);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
} else if (argc >= 3 && argv[1] == "ctl"sv) {
|
} else if (argc >= 3 && argv[1] == "ctl"sv) {
|
||||||
if (argv[2] == "start"sv) {
|
if (argv[2] == "start"sv) {
|
||||||
send_control_command(START);
|
send_control_command(START);
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ bool inject_on_main(int pid, const char *lib_path) {
|
|||||||
}
|
}
|
||||||
if (WIFSTOPPED(status) && WSTOPSIG(status) == SIGSEGV) {
|
if (WIFSTOPPED(status) && WSTOPSIG(status) == SIGSEGV) {
|
||||||
if (!get_regs(pid, regs)) return false;
|
if (!get_regs(pid, regs)) return false;
|
||||||
if (regs.REG_IP != break_addr) {
|
if ((regs.REG_IP & ~1) != (break_addr & ~1)) {
|
||||||
LOGE("stopped at unknown addr %p", (void *) regs.REG_IP);
|
LOGE("stopped at unknown addr %p", (void *) regs.REG_IP);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user