diff --git a/Bootstrap.xcodeproj/project.pbxproj b/Bootstrap.xcodeproj/project.pbxproj index 9238d023..08ef34e2 100644 --- a/Bootstrap.xcodeproj/project.pbxproj +++ b/Bootstrap.xcodeproj/project.pbxproj @@ -567,7 +567,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.1; + MARKETING_VERSION = 1.2; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.roothide.Bootstrap; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -605,7 +605,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.1; + MARKETING_VERSION = 1.2; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.roothide.Bootstrap; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/Bootstrap.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate b/Bootstrap.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate index 694c2826..6894cf04 100644 Binary files a/Bootstrap.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate and b/Bootstrap.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Bootstrap/ViewController.h b/Bootstrap/ViewController.h index f03610a1..40df2f87 100644 --- a/Bootstrap/ViewController.h +++ b/Bootstrap/ViewController.h @@ -13,4 +13,4 @@ BOOL opensshAction(BOOL enable); void bootstrapAction(); void unbootstrapAction(); BOOL updateOpensshStatus(BOOL notify); - +void resetMobilePassword(); diff --git a/Bootstrap/ViewController.m b/Bootstrap/ViewController.m index e7e450ec..37dab8d0 100644 --- a/Bootstrap/ViewController.m +++ b/Bootstrap/ViewController.m @@ -469,3 +469,28 @@ void unbootstrapAction() }]]; [AppDelegate showAlert:alert]; } + +void resetMobilePassword() +{ + UIAlertController *alert = [UIAlertController alertControllerWithTitle:Localized(@"Reset Mobile Password") message:Localized(@"Set the mobile password of your device, this can also be used for root access using sudo. If you want to set the root password, you can do so from a mobile shell using \"sudo passwd root\"") preferredStyle:UIAlertControllerStyleAlert]; + + [alert addTextFieldWithConfigurationHandler:^(UITextField *textField) { + }]; + + [alert addAction:[UIAlertAction actionWithTitle:Localized(@"Cancel") style:UIAlertActionStyleDefault handler:nil]]; + [alert addAction:[UIAlertAction actionWithTitle:Localized(@"Confirm") style:UIAlertActionStyleDefault handler:^(UIAlertAction *action){ + + NSString* log=nil; + NSString* err=nil; + NSString* pwcmd = [NSString stringWithFormat:@"printf \"%%s\\n\" \"%@\" | /usr/sbin/pw usermod 501 -h 0", alert.textFields.lastObject.text]; + const char* args[] = {"/usr/bin/dash", "-c", pwcmd.UTF8String, NULL}; + int status = spawnBootstrap(args, &log, &err); + if(status == 0 || status == 67) { + [AppDelegate showMesage:Localized(@"done") title:@""]; + } else { + [AppDelegate showMesage:[NSString stringWithFormat:@"%@\n\nstderr:\n%@",log,err] title:[NSString stringWithFormat:@"code(%d)",status]]; + } + + }]]; + [AppDelegate showAlert:alert]; +} diff --git a/Bootstrap/Views/OptionsView.swift b/Bootstrap/Views/OptionsView.swift index 081f32f8..90f38254 100644 --- a/Bootstrap/Views/OptionsView.swift +++ b/Bootstrap/Views/OptionsView.swift @@ -141,6 +141,27 @@ struct OptionsView: View { ) .disabled(!isSystemBootstrapped() || !checkBootstrapVersion()) + Button { + UIImpactFeedbackGenerator(style: .light).impactOccurred() + resetMobilePassword() + } label: { + Label( + title: { Text("Reset Mobile Password") }, + icon: { Image(systemName: "key") } + ) + .frame(maxWidth: .infinity) + .padding(.vertical, 10) + .foregroundColor((!isSystemBootstrapped() || !checkBootstrapVersion()) ? Color.accentColor : Color.init(uiColor: UIColor.label)) + } + .frame(width: 250) + .background(Color.clear) + .overlay( + RoundedRectangle(cornerRadius: 10) + .stroke(.gray, lineWidth: 1) + .opacity(0.3) + ) + .disabled(!isSystemBootstrapped() || !checkBootstrapVersion()) + Button { UIImpactFeedbackGenerator(style: .light).impactOccurred() reinstallPackageManager() diff --git a/Bootstrap/basebin/bootstrap.dylib b/Bootstrap/basebin/bootstrap.dylib index b1b9e184..0f0cbf0c 100755 Binary files a/Bootstrap/basebin/bootstrap.dylib and b/Bootstrap/basebin/bootstrap.dylib differ diff --git a/Bootstrap/basebin/bootstrapd b/Bootstrap/basebin/bootstrapd index 7ef6e59e..2ed6d175 100755 Binary files a/Bootstrap/basebin/bootstrapd and b/Bootstrap/basebin/bootstrapd differ diff --git a/Bootstrap/basebin/devtest b/Bootstrap/basebin/devtest index f1924695..6a5d89f1 100755 Binary files a/Bootstrap/basebin/devtest and b/Bootstrap/basebin/devtest differ diff --git a/Bootstrap/basebin/entitlements/com.apple.mobilemail.extra b/Bootstrap/basebin/entitlements/com.apple.mobilemail.extra new file mode 100644 index 00000000..9ec7336a --- /dev/null +++ b/Bootstrap/basebin/entitlements/com.apple.mobilemail.extra @@ -0,0 +1,21 @@ + + + + + platform-application + + get-task-allow + + + com.apple.private.security.no-sandbox + + com.apple.private.security.storage.AppBundles + + com.apple.private.security.storage.AppDataContainers + + com.apple.security.iokit-user-client-class + + IOUserClient + + + diff --git a/Bootstrap/basebin/entitlements/com.apple.mobilemail.strip b/Bootstrap/basebin/entitlements/com.apple.mobilemail.strip new file mode 100644 index 00000000..7b1127b4 --- /dev/null +++ b/Bootstrap/basebin/entitlements/com.apple.mobilemail.strip @@ -0,0 +1,7 @@ + + + + + com.apple.private.security.container-required + + diff --git a/Bootstrap/basebin/preload b/Bootstrap/basebin/preload index 3cf4806d..8c7410d5 100755 Binary files a/Bootstrap/basebin/preload and b/Bootstrap/basebin/preload differ diff --git a/Bootstrap/basebin/preload.dylib b/Bootstrap/basebin/preload.dylib index 2717fb02..d8da3b37 100755 Binary files a/Bootstrap/basebin/preload.dylib and b/Bootstrap/basebin/preload.dylib differ diff --git a/Bootstrap/basebin/rebuildapp b/Bootstrap/basebin/rebuildapp index ca936c42..dcdd5259 100755 Binary files a/Bootstrap/basebin/rebuildapp and b/Bootstrap/basebin/rebuildapp differ diff --git a/Bootstrap/basebin/uicache b/Bootstrap/basebin/uicache index 2abc281b..9b60fb1a 100755 Binary files a/Bootstrap/basebin/uicache and b/Bootstrap/basebin/uicache differ diff --git a/basebin b/basebin index d4235984..8d666135 160000 --- a/basebin +++ b/basebin @@ -1 +1 @@ -Subproject commit d42359842764e4ff8c31a9bcb98e6bf8f3bdc8cb +Subproject commit 8d6661358667d38acee7f1be0c1af423d95a972f diff --git a/sileo.deb b/sileo.deb index 621abe3f..29abd362 100644 Binary files a/sileo.deb and b/sileo.deb differ diff --git a/strapfiles/bootstrap-1800.tar.zst b/strapfiles/bootstrap-1800.tar.zst index e9db5120..54a3206d 100644 Binary files a/strapfiles/bootstrap-1800.tar.zst and b/strapfiles/bootstrap-1800.tar.zst differ diff --git a/strapfiles/bootstrap-1900.tar.zst b/strapfiles/bootstrap-1900.tar.zst index 6d23efd6..2a56ff9a 100644 Binary files a/strapfiles/bootstrap-1900.tar.zst and b/strapfiles/bootstrap-1900.tar.zst differ diff --git a/zebra.deb b/zebra.deb index 3e7a6279..8dc154ab 100644 Binary files a/zebra.deb and b/zebra.deb differ