This commit is contained in:
5ec1cff
2023-11-03 11:41:28 +08:00
parent f78c217552
commit f5e0a418c9
18 changed files with 314 additions and 55 deletions
+10 -1
View File
@@ -93,7 +93,7 @@ namespace zygiskd {
}
int GetModuleDir(size_t index) {
int fd = Connect(1);
UniqueFd fd = Connect(1);
if (fd == -1) {
PLOGE("GetModuleDir");
return -1;
@@ -102,4 +102,13 @@ namespace zygiskd {
socket_utils::write_usize(fd, index);
return socket_utils::recv_fd(fd);
}
void ZygoteRestart() {
UniqueFd fd = Connect(1);
if (fd == -1) {
PLOGE("Could not notify ZygoteRestart");
return;
}
socket_utils::write_u8(fd, (uint8_t) SocketAction::ZygoteRestart);
}
}