Skip to content

Commit

Permalink
support "jbctl trustcache add /path/to/macho"
Browse files Browse the repository at this point in the history
  • Loading branch information
roothider committed May 22, 2024
1 parent 1c8cf36 commit 846bf58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Binary file modified Application/Dopamine/Resources/sileo.deb
Binary file not shown.
17 changes: 7 additions & 10 deletions BaseBin/jbctl/src/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void print_usage(void)
proc_set_debugged <pid>\t\tMarks the process with the given pid as being debugged, allowing invalid code pages inside of it\n\
trustcache info\t\t\tPrint info about all jailbreak related trustcaches and the cdhashes contained in them\n\
trustcache clear\t\tClears all existing cdhashes from the jailbreaks trustcache\n\
trustcache add <cdhash>\t\tAdd an arbitrary cdhash to the jailbreaks trustcache\n\
trustcache add /path/to/macho\t\tAdd the cdhash of a macho to the jailbreaks trustcache\n\
update <tipa/basebin> <path>\tInitiates a jailbreak update either based on a TIPA or based on a basebin.tar file, TIPA installation depends on TrollStore, afterwards it triggers a userspace reboot\n");
}

Expand Down Expand Up @@ -99,17 +99,14 @@ int main(int argc, char* argv[])
print_usage();
return 2;
}
const char *cdhashString = argv[3];
if (strlen(cdhashString) != (sizeof(cdhash_t) * 2)) {
printf("ERROR: passed cdhash has wrong length\n");
return 2;
}
cdhash_t cdhash;
if (convert_hex_string_to_data(cdhashString, &cdhash)) {
printf("ERROR: passed cdhash is malformed\n");
const char *filepath = argv[3];
if (access(filepath, F_OK) != 0) {
printf("ERROR: passed macho path does not exist\n");
printf("\n\n");
print_usage();
return 2;
}
return jbclient_root_trustcache_add_cdhash(cdhash, sizeof(cdhash));
return jbclient_trust_binary(filepath);
}
}
else if (!strcmp(cmd, "reboot_userspace")) {
Expand Down

0 comments on commit 846bf58

Please sign in to comment.