Skip to content

Commit

Permalink
hm
Browse files Browse the repository at this point in the history
  • Loading branch information
wumbomumbo committed Aug 17, 2024
1 parent 91bafa6 commit 7c45921
Show file tree
Hide file tree
Showing 27 changed files with 19 additions and 26 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
run: |
set -x
cd Application/Dopamine/Resources
chmod +x download_bootstraps.sh
./download_bootstraps.sh
- name: Build
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Application/Dopamine/Jailbreak/DOEnvironmentManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)runUnsandboxed:(void (^)(void))unsandboxBlock;
- (void)runAsRoot:(void (^)(void))rootBlock;

- (void)semiReboot;
- (void)respring;
- (void)rebootUserspace;
- (void)refreshJailbreakApps;
- (void)reboot;
- (void)changeMobilePassword:(NSString *)newPassword;
Expand Down
24 changes: 7 additions & 17 deletions Application/Dopamine/Jailbreak/DOEnvironmentManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -313,26 +313,16 @@ - (void)respring
}];
}

- (void)rebootUserspace
- (void)semiReboot
{
[self runAsRoot:^{
__block int pid = 0;
__block int r = 0;
[self runUnsandboxed:^{
r = exec_cmd_suspended(&pid, JBROOT_PATH("/basebin/jbctl"), "reboot_userspace", NULL);
if (r == 0) {
// the original plan was to have the process continue outside of this block
// unfortunately sandbox blocks kill aswell, so it's a bit racy but works

// we assume we leave this unsandbox block before the userspace reboot starts
// to avoid leaking the label, this seems to work in practice
// and even if it doesn't work, leaking the label is no big deal
kill(pid, SIGCONT);
}
exec_cmd(JBROOT_PATH("killall -9 backboardd"), NULL);
exec_cmd(JBROOT_PATH("killall -9 mediaserverd"), NULL);
exec_cmd(JBROOT_PATH("killall -9 installd"), NULL);
exec_cmd(JBROOT_PATH("killall -9 userd"), NULL);
exec_cmd(JBROOT_PATH("killall -9 networkd"), NULL);
}];
if (r == 0) {
cmd_wait_for_exit(pid);
}
}];
}

Expand Down Expand Up @@ -385,7 +375,7 @@ - (NSError*)updateEnvironment
NSString *newBasebinTarPath = [[NSBundle mainBundle].bundlePath stringByAppendingPathComponent:@"basebin.tar"];
int result = jbclient_platform_stage_jailbreak_update(newBasebinTarPath.fileSystemRepresentation);
if (result == 0) {
[self rebootUserspace];
[self respring];
return nil;
}
return [NSError errorWithDomain:@"Dopamine" code:result userInfo:nil];
Expand Down
2 changes: 1 addition & 1 deletion Application/Dopamine/Jailbreak/DOJailbreaker.m
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ - (void)runWithError:(NSError **)errOut didRemoveJailbreak:(BOOL*)didRemove show
- (void)finalize
{
[[DOUIManager sharedInstance] sendLog:DOLocalizedString(@"Rebooting Userspace") debug:NO];
[[DOEnvironmentManager sharedManager] rebootUserspace];
[[DOEnvironmentManager sharedManager] respring];
}

@end
2 changes: 1 addition & 1 deletion Application/Dopamine/UI/DOMainViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ -(void)setupStack
}],
[UIAction actionWithTitle:DOLocalizedString(@"Menu_Reboot_Userspace_Title") image:[UIImage systemImageNamed:@"arrow.clockwise.circle" withConfiguration:[DOGlobalAppearance smallIconImageConfiguration]] identifier:@"reboot-userspace" handler:^(__kindof UIAction * _Nonnull action) {
[self fadeToBlack:^{
[[DOEnvironmentManager sharedManager] rebootUserspace];
[[DOEnvironmentManager sharedManager] semiReboot];
}];
}],
[UIAction actionWithTitle:DOLocalizedString(@"Menu_Credits_Title") image:[UIImage systemImageNamed:@"info.circle" withConfiguration:[DOGlobalAppearance smallIconImageConfiguration]] identifier:@"credits" handler:^(__kindof UIAction * _Nonnull action) {
Expand Down
2 changes: 1 addition & 1 deletion Application/Dopamine/UI/Settings/DOSettingsController.m
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ - (void)setTweakInjectionEnabled:(id)value specifier:(PSSpecifier *)specifier
[[DOEnvironmentManager sharedManager] setTweakInjectionEnabled:((NSNumber *)value).boolValue];
UIAlertController *userspaceRebootAlertController = [UIAlertController alertControllerWithTitle:DOLocalizedString(@"Alert_Tweak_Injection_Toggled_Title") message:DOLocalizedString(@"Alert_Tweak_Injection_Toggled_Body") preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *rebootNowAction = [UIAlertAction actionWithTitle:DOLocalizedString(@"Alert_Tweak_Injection_Toggled_Reboot_Now") style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[[DOEnvironmentManager sharedManager] rebootUserspace];
[[DOEnvironmentManager sharedManager] respring];
}];
UIAlertAction *rebootLaterAction = [UIAlertAction actionWithTitle:DOLocalizedString(@"Alert_Tweak_Injection_Toggled_Reboot_Later") style:UIAlertActionStyleCancel handler:nil];

Expand Down
6 changes: 3 additions & 3 deletions Application/Dopamine/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"Credits_Made_By" = "by opa334, ElleKit by évelyne";
"Credits_Made_By" = "by opa334 and saulcheeseman, ElleKit by évelyne";

// Log
"Status_Title_Jailbreaking" = "Jailbreaking";
Expand All @@ -12,7 +12,7 @@
// Action Menu
"Menu_Settings_Title" = "Settings";
"Menu_Restart_SpringBoard_Title" = "Restart SpringBoard";
"Menu_Reboot_Userspace_Title" = "Reboot Userspace";
"Menu_Reboot_Userspace_Title" = "Semi Restart";
"Menu_Credits_Title" = "Credits";

// Updating
Expand Down Expand Up @@ -103,7 +103,7 @@
"Elevating Privileges" = "Elevating Privileges";
"Cleaning Up Exploits" = "Cleaning Up Exploits";
"Building Phys R/W Primitive" = "Building Phys R/W Primitive";
"Rebooting Userspace" = "Rebooting Userspace";
"Rebooting Userspace" = "Rebooting SpringBoard";
"Patchfinding" = "Patchfinding";
"Exploiting Kernel (%@)" = "Exploiting Kernel (%@)";
"Bypassing PAC (%@)" = "Bypassing PAC (%@)";
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<img src="https://github.com/opa334/Dopamine/assets/52459150/ed04dd3e-d879-456d-9aa3-d4ed44819c7e" width="64" />
<img src="https://github.com/user-attachments/assets/f6d5385a-0b50-4b5d-9098-d4b16d5e2bac" width="64" />

# Dopamine
# Cheapamine (Dopamine, but for iPhone's with cheap aftermarket screens in mind)

## As of now when you press jailbreak, your screen will go black, however, you will be able to close the app, from then you will swipe Cheapamine away, open it and respring, if Sileo/Zebra doesn't appear, go into settings and press refresh Jailbreak apps.

A rootless semi-untethered jailbreak for iOS 15.0 - 16.5.1 (arm64e) and iOS 15.0 - 16.6.1 (arm64). More details will follow here soon.

Expand Down

0 comments on commit 7c45921

Please sign in to comment.