You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
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>
This commit is contained in:
@@ -18,4 +18,5 @@ pub enum DaemonSocketAction {
|
||||
ReadNativeBridge,
|
||||
ReadModules,
|
||||
RequestCompanionSocket,
|
||||
GetModuleDir,
|
||||
}
|
||||
|
||||
@@ -213,6 +213,17 @@ fn handle_daemon_action(mut stream: UnixStream, context: &Context) -> Result<()>
|
||||
}
|
||||
}
|
||||
}
|
||||
DaemonSocketAction::GetModuleDir => {
|
||||
unsafe {
|
||||
let index = stream.read_usize()?;
|
||||
let module = &context.modules[index];
|
||||
let path = format!("{}/{}", constants::PATH_KSU_MODULE_DIR, module.name);
|
||||
let filename = std::ffi::CString::new(path)?;
|
||||
let fd = libc::open(filename.as_ptr(), libc::O_PATH | libc::O_CLOEXEC);
|
||||
stream.send_fd(fd)?;
|
||||
libc::close(fd);
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user