[英]How to reboot and factory reset iOS devices from my Mac app
For my current project, I need to develop a MAC application similar to Dr.Fone . 对于我目前的项目,我需要开发一个类似于Dr.Fone的MAC应用程序。 Here muliple iOS devices (iPhone, iPad, iPod Touch) will be connected to a Mac with USB serial port.
在这里,多个iOS设备(iPhone,iPad,iPod Touch)将通过USB串口连接到Mac。 This app will will be able to do the followings
这个应用程序将能够执行以下操作
After a quick search over the web, I found libimobiledevice . 在网上快速搜索后,我找到了libimobiledevice 。 There is not any option to factory reset an iOS device.
没有任何工厂重置 iOS设备的选项。 Though libimobiledevice claims to reboot an iOS device using its idevicediagnostics tool, but got an issue similar to the following on iOS 10 device.
虽然libimobiledevice声称使用其idevicediagnostics工具重启iOS设备,但在iOS 10设备上遇到了类似于以下问题。
I tried some library like PeerTalk to run the hardware test suite and it seems feasible to me. 我尝试了像PeerTalk这样的库来运行硬件测试套件,这对我来说似乎是可行的。
But I am still wandering to find out a way to do a factory reset and reboot a connected device. 但我仍然想找到一种方法来重置工厂并重启连接的设备。 Can anyone help me to figure out how Dr.Fone is doing this?
任何人都可以帮我弄清楚Dr.Fone是如何做到这一点的吗?
Dr.Fone Needs a firmware to do a Factory reset, the same way with imobiledevice with the command : Dr.Fone需要一个固件来进行出厂重置,与imobiledevice一样使用命令:
idevicerestore -e path/to/firmaware.ipsw
-e, --erase : perform a full restore, erasing all data (defaults to update)
-e, - erase:执行完全恢复,删除所有数据(默认为更新)
And about Collecting basic information about devices, Reboot the iOS device... it also has other tools to do what you looking for. 关于收集有关设备的基本信息,重新启动iOS设备......它还有其他工具可以满足您的需求。
To collect info you need to use idevice_id.exe
for UDID and then use ideviceinfo -u udid
for serial number and so on. 要收集信息,您需要将
idevice_id.exe
用于UDID,然后使用ideviceinfo -u udid
作为序列号,依此类推。
ideviceenterrecovery
will restart IOS device to recovery mode, there you can also use irecovery.exe
to get all kinds info. ideviceenterrecovery
将IOS设备重启到恢复模式,在那里你也可以使用irecovery.exe
获取各种信息。
As for factory reset, I don't think idevicerestore -e
will do, it actually wipes out and restores entirely which is not something you want I assume. 至于工厂重置,我不认为
idevicerestore -e
会做,它实际上消除并完全恢复,这不是你想要的东西。
I had this same problem I ran 我遇到了同样的问题
sudo chmod -R 777 /var/db/lockdown/
Then I get error code -3 when trying to restart the device 然后我在尝试重启设备时收到错误代码-3
Then ran 然后跑了
brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew install ideviceinstaller
I disconnected/reconnected the device somewhere in this process and now I am able to run all the commands without getting the lockdownd error 我在这个过程中的某个地方断开/重新连接了设备,现在我能够运行所有命令而不会出现锁定错误
https://github.com/libimobiledevice/libimobiledevice/issues/391 https://github.com/libimobiledevice/libimobiledevice/issues/391
https://github.com/libimobiledevice/ideviceinstaller/issues/54 https://github.com/libimobiledevice/ideviceinstaller/issues/54
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.