通过 WLAN 读取 iPhone 的电池百分比
Read Battery Percentage of iPhone via WLAN
我找到了一个可以在菜单栏 (iBetterCharge) 中显示 iPhone 电池电量百分比的应用程序。 iPhone 未通过 USB 或蓝牙连接(它仅连接到与我的 Macbook 相同的网络)。
我的问题是:我怎样才能得到这些信息?该设备出现在 IOReg 中,但这只是因为我通过蓝牙连接了一次 phone。
这可以通过使用 unix 应用程序 "libimobiledevice" 来完成。我不确定它是否适用于 iOS.
的所有版本
//install it:
brew install libimobiledevice
//list all device
idevice_id --list // list available device UDIDs. Normally, we have to plug the device at least once to get its UUID.
//get the current syslog of device that we want to check
idevicesyslog -u <device udid>
//do some text search to get the battery info
//or running ideviceinfo (I don't know if it works wirelessly)
//run 'ideviceinfo --help' to see how it works
ideviceinfo -u <device udid> --domain com.apple.mobile.battery
阅读更多内容:
https://www.theiphonewiki.com/wiki/MobileDevice_Library
我找到了一个可以在菜单栏 (iBetterCharge) 中显示 iPhone 电池电量百分比的应用程序。 iPhone 未通过 USB 或蓝牙连接(它仅连接到与我的 Macbook 相同的网络)。
我的问题是:我怎样才能得到这些信息?该设备出现在 IOReg 中,但这只是因为我通过蓝牙连接了一次 phone。
这可以通过使用 unix 应用程序 "libimobiledevice" 来完成。我不确定它是否适用于 iOS.
的所有版本//install it:
brew install libimobiledevice
//list all device
idevice_id --list // list available device UDIDs. Normally, we have to plug the device at least once to get its UUID.
//get the current syslog of device that we want to check
idevicesyslog -u <device udid>
//do some text search to get the battery info
//or running ideviceinfo (I don't know if it works wirelessly)
//run 'ideviceinfo --help' to see how it works
ideviceinfo -u <device udid> --domain com.apple.mobile.battery
阅读更多内容: https://www.theiphonewiki.com/wiki/MobileDevice_Library