summaryrefslogtreecommitdiffstats
path: root/adb/services.c
diff options
context:
space:
mode:
Diffstat (limited to 'adb/services.c')
-rw-r--r--adb/services.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/adb/services.c b/adb/services.c
index 703aec8..d5a4642 100644
--- a/adb/services.c
+++ b/adb/services.c
@@ -164,6 +164,7 @@ static int create_service_thread(void (*func)(int, void *), void *cookie)
printf("cannot create service socket pair\n");
return -1;
}
+ D("socketpair: (%d,%d)", s[0], s[1]);
sti = malloc(sizeof(stinfo));
if(sti == 0) fatal("cannot allocate stinfo");
@@ -264,10 +265,11 @@ static int create_subproc_raw(const char *cmd, const char *arg0, const char *arg
// 0 is parent socket, 1 is child socket
int sv[2];
- if (unix_socketpair(AF_UNIX, SOCK_STREAM, 0, sv) < 0) {
+ if (adb_socketpair(sv) < 0) {
printf("[ cannot create socket pair - %s ]\n", strerror(errno));
return -1;
}
+ D("socketpair: (%d,%d)", sv[0], sv[1]);
*pid = fork();
if (*pid < 0) {
@@ -470,7 +472,9 @@ int service_to_fd(const char *name)
}
}
} else if(!strncmp(name, "disable-verity:", 15)) {
- ret = create_service_thread(disable_verity_service, NULL);
+ ret = create_service_thread(set_verity_enabled_state_service, (void*)0);
+ } else if(!strncmp(name, "enable-verity:", 15)) {
+ ret = create_service_thread(set_verity_enabled_state_service, (void*)1);
#endif
}
if (ret >= 0) {