Skip to content

Commit

Permalink
Fix Dopamine app not showing jailbreak state despite the device being…
Browse files Browse the repository at this point in the history
… jailbroken in some edge cases
  • Loading branch information
opa334 committed Feb 20, 2024
1 parent 0a498dc commit cc081ee
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Application/Dopamine/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ int main(int argc, char * argv[]) {
// As updating from 1.x to 2.x unsupported, just initiate a device reboot
if (!strcmp(argv[1], "prepare_jbupdate")) {
[[DOEnvironmentManager sharedManager] reboot];
return 0;
}
}

// If systemhook isn't loaded and we are already jailbroken, we need to do the checkin ourselves
// This can happen when the jailbreak is hidden or when tweak injection into the Dopamine app is disabled via Choicy
jbclient_process_checkin(NULL, NULL, NULL);

if ([DOEnvironmentManager sharedManager].isJailbroken) {
setenv("PATH", "/sbin:/bin:/usr/sbin:/usr/bin:/var/jb/sbin:/var/jb/bin:/var/jb/usr/sbin:/var/jb/usr/bin", 1);
setenv("TERM", "xterm-256color", 1);
Expand Down

0 comments on commit cc081ee

Please sign in to comment.