Implement Zygisk companion process

This commit is contained in:
topjohnwu
2021-10-17 04:36:18 -07:00
parent 6f54c57647
commit d0fc372ecd
8 changed files with 108 additions and 11 deletions

View File

@@ -284,9 +284,13 @@ bool ZygiskModule::registerModule(ApiTable *table, long *module) {
return true;
}
int ZygiskModule::connectCompanion() {
// TODO
(void) id;
int ZygiskModule::connectCompanion() const {
if (int fd = connect_daemon(); fd >= 0) {
write_int(fd, ZYGISK_REQUEST);
write_int(fd, ZYGISK_START_COMPANION);
write_int(fd, id);
return fd;
}
return -1;
}