You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
fix injector cannot get tmp path
This commit is contained in:
@@ -136,7 +136,7 @@ struct SocketHandler : public EventHandler {
|
||||
.sun_family = AF_UNIX,
|
||||
.sun_path={0},
|
||||
};
|
||||
sprintf(addr.sun_path, "%s/%s", TMP_PATH, SOCKET_NAME);
|
||||
sprintf(addr.sun_path, "%s/%s", zygiskd::GetTmpPath().c_str(), SOCKET_NAME);
|
||||
socklen_t socklen = sizeof(sa_family_t) + strlen(addr.sun_path);
|
||||
if (bind(sock_fd_, (struct sockaddr *) &addr, socklen) == -1) {
|
||||
PLOGE("bind socket");
|
||||
@@ -544,7 +544,7 @@ static void updateStatus() {
|
||||
}
|
||||
|
||||
static bool prepare_environment() {
|
||||
prop_path = std::string(TMP_PATH) + "/module.prop";
|
||||
prop_path = zygiskd::GetTmpPath() + "/module.prop";
|
||||
close(open(prop_path.c_str(), O_WRONLY | O_CREAT | O_TRUNC, 0644));
|
||||
auto orig_prop = xopen_file("./module.prop", "r");
|
||||
if (orig_prop == nullptr) {
|
||||
@@ -595,7 +595,8 @@ void send_control_command(Command cmd) {
|
||||
.sun_family = AF_UNIX,
|
||||
.sun_path={0},
|
||||
};
|
||||
sprintf(addr.sun_path, "%s/%s", TMP_PATH, SOCKET_NAME);
|
||||
zygiskd::Init(getenv("TMP_PATH"));
|
||||
sprintf(addr.sun_path, "%s/%s", zygiskd::GetTmpPath().c_str(), SOCKET_NAME);
|
||||
socklen_t socklen = sizeof(sa_family_t) + strlen(addr.sun_path);
|
||||
auto nsend = sendto(sockfd, (void *) &cmd, sizeof(cmd), 0, (sockaddr *) &addr, socklen);
|
||||
if (nsend == -1) {
|
||||
|
||||
Reference in New Issue
Block a user