diff --git a/RootHelper/devmode.m b/RootHelper/devmode.m
index 42761d8..241ad0e 100644
--- a/RootHelper/devmode.m
+++ b/RootHelper/devmode.m
@@ -63,6 +63,8 @@ BOOL getDeveloperModeState(xpc_connection_t connection) {
return NO;
}
+ NSLog(@"[getDeveloperModeState] got reply %@", reply);
+
NSObject* success = reply[@"success"];
if (!success || ![success isKindOfClass:[NSNumber class]] || ![(NSNumber*)success boolValue]) {
NSLog(@"[getDeveloperModeState] request failed with error %@", reply[@"error"]);
diff --git a/RootHelper/entitlements.plist b/RootHelper/entitlements.plist
index 70c45bc..3319af0 100644
--- a/RootHelper/entitlements.plist
+++ b/RootHelper/entitlements.plist
@@ -44,5 +44,9 @@
Uninstall
UpdatePlaceholderMetadata
+ com.apple.private.amfi.developer-mode-control
+
+ com.apple.frontboard.shutdown
+
diff --git a/RootHelper/main.m b/RootHelper/main.m
index 8a62337..c178ce9 100644
--- a/RootHelper/main.m
+++ b/RootHelper/main.m
@@ -21,6 +21,7 @@
#endif
#import
+#import
#import
#ifdef EMBEDDED_ROOT_HELPER
@@ -50,8 +51,6 @@ typedef CFDictionaryRef (*_CFPreferencesCopyMultipleWithContainerType)(CFArrayRe
BOOL _installPersistenceHelper(LSApplicationProxy* appProxy, NSString* sourcePersistenceHelper, NSString* sourceRootHelper);
-extern int reboot3(uint64_t flags, ...);
-
NSArray* applicationsWithGroupId(NSString* groupId)
{
LSEnumerator* enumerator = [LSEnumerator enumeratorForApplicationProxiesWithOptions:0];
@@ -1529,8 +1528,9 @@ int MAIN_NAME(int argc, char *argv[], char *envp[])
}
else if([cmd isEqualToString:@"reboot"])
{
- sync();
- ret = reboot3(0); // do a normal reboot
+ [[FBSSystemService sharedService] reboot];
+ // Give the system some time to reboot
+ sleep(1);
}
NSLog(@"trollstorehelper returning %d", ret);