Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to respring iDevice?
    text
    copied!<p>I am trying to make an app to respring and reboote any iDevice. My code works fine in the iOS Simulator but on my iDevice nothing happens (Yes, it is jailbroken). </p> <p>Here is my code for respiring:</p> <pre><code> if(system("killall SpringBoard")); if(system("killall -9 SpringBoard")); if (system([@ "reboot" UTF8String])); if ([[[UIDevice currentDevice] systemVersion] hasPrefix:@"2."]) notify_post("com.apple.language.changed"); if (system([@ "killall SpringBoard" UTF8String])); </code></pre> <p>and here is my code for rebooting: </p> <pre><code>if (system([@ "reboot" UTF8String])); </code></pre> <p>respring only works one time and than it stops working:(</p> <p>My Script: </p> <pre><code>#!/bin/sh # Script.sh # Respring # # Created by David on 08.11.12. # Copyright (c) 2012 David. All rights reserved. app binary - root:wheel 4755 script - root:wheel 0755 C=/${0} C=${C%/*} declare -a flags [[ :${DYLD_INSERT_LIBRARIES}: == */MobileSubstrate.dylib: ]] &amp;&amp; flags[${flags[@]}]=--substrate exec "${C:-.}"/Respring "${flags[@]}" -- "$@" 2&gt;&gt;/tmp/Respring.log </code></pre> <p>This is my alertView for respring and reboot with BugReport if respiring doesn't function</p> <pre><code>//Respring -(IBAction)respring { UIAlertView *respring=[[UIAlertView alloc]initWithTitle:@"Respring" message:@"Do you want to respring your iDevice?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil]; respring.tag = 1; [respring show]; } //AlertView -(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (buttonIndex == 1){ if (alertView.tag ==1) { setuid(0); system("killall i5MMS_"); UIAlertView *respringerror=[[UIAlertView alloc]initWithTitle:@"Error" message:@"Respring is not possible, please send me an Bug Report." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Send Bug Report",nil]; respringerror.tag = 3; [respringerror show]; } if (alertView.tag ==2) { if (system([@ "reboot" UTF8String])); UIAlertView *respringerror=[[UIAlertView alloc]initWithTitle:@"Error" message:@"Rebooting is not possible, please send me an Bug Report." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Send Bug Report", nil]; respringerror.tag = 4; [respringerror show]; } if (alertView.tag ==3) { iDevice.text = [UIDevice currentDevice]. model; ios.text = [UIDevice currentDevice]. systemVersion; MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init]; [composer setMailComposeDelegate:self]; if ([MFMailComposeViewController canSendMail]) { [composer setToRecipients:[NSArray arrayWithObjects:@"david.goelzhaeuser@me.com", nil]]; [composer setSubject:@"Bug Report"]; [composer setMessageBody: [NSString stringWithFormat: @"%@ \n%@ \n%@", ios.text,iDevice.text, jailbreakstatus.text]isHTML:NO]; [composer setModalTransitionStyle:UIModalTransitionStyleCoverVertical]; [composer setModalPresentationStyle:UIModalPresentationFormSheet]; [self presentModalViewController:composer animated:YES]; } } if (alertView.tag ==4) { iDevice.text = [UIDevice currentDevice]. model; ios.text = [UIDevice currentDevice]. systemVersion; MFMailComposeViewController *composer = [[MFMailComposeViewController alloc] init]; [composer setMailComposeDelegate:self]; if ([MFMailComposeViewController canSendMail]) { [composer setToRecipients:[NSArray arrayWithObjects:@"david.goelzhaeuser@me.com", nil]]; [composer setSubject:@"Bug Report"]; [composer setMessageBody: [NSString stringWithFormat: @"%@ \n%@ \n%@", ios.text,iDevice.text, jailbreakstatus.text]isHTML:NO]; [composer setModalTransitionStyle:UIModalTransitionStyleCoverVertical]; [composer setModalPresentationStyle:UIModalPresentationFormSheet]; [self presentModalViewController:composer animated:YES]; } } } } //Reboot -(IBAction)reboot;{ UIAlertView *reboot=[[UIAlertView alloc]initWithTitle:@"Reboot" message:@"Do you want to reboot your iDevice? If you have a tethered jailbreak you have to make a tethered boot after rebooting!" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil]; reboot.tag = 2; [reboot show]; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload