libimobiledevice guide to control iphone

libimobiledevice github doc

step1 install libimobiledevice

    brew update
    brew uninstall --ignore-dependencies libimobiledevice
    brew uninstall --ignore-dependencies usbmuxd
    brew install --HEAD usbmuxd
    brew unlink usbmuxd
    brew link usbmuxd
    brew install --HEAD libimobiledevice
    git clone https://github.com/JonGabilondoAngulo/idevicelocation.git
    cd idevicelocation
    ./autogen.sh
    make
    sudo make install

step2 commands test

connect iphone to mac with usb, use commands from libimobiledevice api.

ideviceinfo -k ProductVersion
12.2.3

2) copy dmg from xcode(DeveloperDiskImage.dmg and DeveloperDiskImage.dmg.signature) to your folder(e.g. ~/Documents/xxx/ios/). folder path: Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSup‌​port/7.1/

3) ideviceimagemounter ~/Documents/xxx/ios/DeveloperDiskImage.dmg

base) zhaoting@M-C02Q90LGFVH6:~/test/ideviceactivate/libideviceactivation$ ideviceimagemounter ~/Documents/xxx/ios/DeveloperDiskImage.dmg
Uploading /Users/zhaoting/Documents/xxx/ios/DeveloperDiskImage.dmg
done.
Mounting...
Done.
Status: Complete

4) get app installed: ideviceinstaller -l

(base) zhaoting@M-C02Q90LGFVH6:~/test/ideviceactivate/libideviceactivation$ ideviceinstaller -l
CFBundleIdentifier, CFBundleVersion, CFBundleDisplayName
com.skyjos.ftpmanagerfree, "6201", "FTPManager"
com.xxx.ultracaller, "13", "ultracaller"

5) run app

(base) zhaoting@M-C02Q90LGFVH6:~/test/ideviceactivate/libideviceactivation$ idevicedebug run com.xx.xxx
ERROR: Unspecified

6) observing notifications

https://github.com/libimobiledevice/libimobiledevice/issues/464

notification list:http://iphonedevwiki.net/index.php/SpringBoard.app/Notifications

command: idevicenotificationproxy observe "com.apple.springboard.lockcomplete"

(base) zhaoting@M-C02Q90LGFVH6:~/test/ideviceactivate/libideviceactivation$ idevicenotificationproxy observe "com.apple.springboard.lockcomplete"
! observing "com.apple.springboard.lockcomplete"
> com.apple.springboard.lockcomplete
> com.apple.springboard.lockcomplete
^CExiting...

7) restart iphone

idevicediagnostics restart

8)airplane mode

seems can not set airplane with libmobiledevice command, but we can set it by ios automation test framework like appium. pls ref appium mac config guide

打赏一个呗

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦