jailbroken 전화 용 앱에서 com.apple.mobile.installd를 중지하고 시작하려고합니다. 거의 모든 가능한 방법 NSTask, 시스템(), 쉘 스크립트를 시도했지만 작동하지 않습니다. 누군가 나를 도와 줄 수 있니?launchctl이 iOS 앱에서 작동하지 않습니다.
다음은 시도한 코드 샘플입니다. 지난 10 시절부터 내 머리를 bangging는 터미널에서 작동
-(IBAction)stopIntl:(id)sender
{
NSString *command = [NSString stringWithFormat:@"/bin/launchctl stop com.apple.mobile.installd >> /Applications/loader.app/output.txt"];
const char* new = [command UTF8String];
system(new);
NSLog(@"Stopping InstallD");
}
-(IBAction)startIntl:(id)sender
{
NSString *command = [NSString stringWithFormat:@"/bin/launchctl start com.apple.mobile.installd >> /Applications/loader.app/output.txt"];
const char* new = [command UTF8String];
system(new);
NSLog(@"Starting InstallD");
}
-(IBAction)reloadShell:(id)sender
{
system("/bin/launchctl stop com.apple.mobile.installd");
sleep(2);
system("/bin/launchctl start com.apple.mobile.installd");
NSLog(@"Reloading Shell");
}
-(IBAction)reloadShell1:(id)sender
{
NSString *command = [NSString stringWithFormat:@"/usr/libexec/reload.sh >> /Applications/loader.app/output.txt"];
system([command UTF8String]);
NSLog(@"Reloading Shell1");
}
내 reload.sh ..
#!/bin/sh
# reload.sh
#
# Copyright (c) 2014 Avanté Codeworx. All #rights reserved.
launchctl stop com.apple.mobile.installd
sleep 2
launchctl start com.apple.mobile.installd
exit
는 또한 ..이 작동하지만 실행에 계속 실행 데몬 시도 아래로 ..
떨쳐 버릴 수 없었죠여기 내 데몬입니다 ..
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LaunchEvents</key>
<dict>
<key>com.apple.notifyd.matching</key>
<dict>
<key>com.loader.reload</key>
<dict>
<key>Notification</key>
<string>com.loader.reload</string>
</dict>
</dict>
</dict>
<key>Label</key>
<string>com.avante.loader</string>
<key>UserName</key>
<string>root</string>
<key>KeepAlive</key>
<false/>
<key>Program</key>
<string>/usr/libexec/reload.sh</string>
</dict>
</plist>
것은 저를 도와주세요!
나는 이틀 전에 그것을 풀었다. .. 우연히 .. 내가 한 것에 대한 좋은 설명이었다. 감사!! – malhaar