iphone - 如何在 PC 上重启越狱的 iPhone

标签 iphone c jailbreak reboot

我找到了一个叫libimobiledevice的开源库,好像有个叫restored_reboot的函数可以做到,于是我写了这样的代码:

void reboot(){
    restored_client_t client = NULL;
    restored_error_t result =  restored_client_new(device, &client, "mylabel");

    if(result == 0){
        result = restored_reboot(client);
        if(result != 0)
             fprintf(stderr, "failed to reboot: %d\n", result);
    }else{
        fprintf(stderr, "failed to create client, %d\n", result);
    }

    restored_client_free(client);
}

但是失败了,restored_reboot返回了-3,这意味着plist错误。

最佳答案

我不完全知道这是否是你要找的东西,但如果你需要重启 iphone 并且你有 root 权限,你可以杀死关键的系统进程,比如

void reboot(){
    system("kill 1");
}

这似乎不是重启手机的优雅方式,但它会满足您的需要。

关于iphone - 如何在 PC 上重启越狱的 iPhone,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16539670/

相关文章:

iphone - SQLite3 更新不起作用

ios - 已经提到了隐私政策和使用条款的链接,但苹果仍然拒绝了构建

iphone - 两个 UIScrollViews 得到 [__NSCFConstantString _isDecompressing] 错误

计算除 0 以外的不同数字 (C) 在不同编译器中输出不同

ios - 如何在越狱调整中打开首选项的特殊 View ?

iphone - 将核心数据从一个项目传输到另一个项目

c - `*(volatile T*)0x1234;` 能保证翻译成读指令吗?

c++ - Clang 的 -Wall 和 -Wextra 中包含哪些警告?

iOS - 如何避免列出已安装的应用程序?

iphone - 检索应用程序的作者 - 越狱 iOS 6