You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
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.
This commit is contained in:
@@ -63,19 +63,6 @@ namespace zygiskd {
|
||||
return true;
|
||||
}
|
||||
|
||||
int RequestLogcatFd() {
|
||||
int fd = Connect(1);
|
||||
if (fd == -1) {
|
||||
PLOGE("RequestLogcatFd");
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
socket_utils::write_u8(fd, (uint8_t) SocketAction::RequestLogcatFd);
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
||||
uint32_t GetProcessFlags(uid_t uid) {
|
||||
int fd = Connect(1);
|
||||
if (fd == -1) {
|
||||
@@ -94,8 +81,8 @@ namespace zygiskd {
|
||||
return res;
|
||||
}
|
||||
|
||||
std::vector<Module> ReadModules() {
|
||||
std::vector<Module> modules;
|
||||
std::vector<ModuleInfo> ReadModules() {
|
||||
std::vector<ModuleInfo> modules;
|
||||
int fd = Connect(1);
|
||||
if (fd == -1) {
|
||||
PLOGE("ReadModules");
|
||||
@@ -260,4 +247,34 @@ namespace zygiskd {
|
||||
close(fd);
|
||||
} else info->running = false;
|
||||
}
|
||||
|
||||
std::string UpdateMountNamespace(enum mount_namespace_state nms_state) {
|
||||
int fd = Connect(1);
|
||||
if (fd == -1) {
|
||||
PLOGE("UpdateMountNamespace");
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
socket_utils::write_u8(fd, (uint8_t) SocketAction::UpdateMountNamespace);
|
||||
socket_utils::write_u32(fd, getpid());
|
||||
socket_utils::write_u8(fd, (uint8_t)nms_state);
|
||||
|
||||
uint32_t target_pid = socket_utils::read_u32(fd);
|
||||
int target_fd = 0;
|
||||
|
||||
if (target_pid == 0) goto error;
|
||||
|
||||
target_fd = (int)socket_utils::read_u32(fd);
|
||||
if (target_fd == 0) goto error;
|
||||
|
||||
close(fd);
|
||||
|
||||
return "/proc/" + std::to_string(target_pid) + "/fd/" + std::to_string(target_fd);
|
||||
|
||||
error:
|
||||
close(fd);
|
||||
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user