Battery Level From Terminal
up vote
2
down vote
favorite
Is there a way to get an iOS device battery level from terminal when it's plugged into the computer? I've looked into ioreg and that only displays my macbook's battery.
ios
add a comment |
up vote
2
down vote
favorite
Is there a way to get an iOS device battery level from terminal when it's plugged into the computer? I've looked into ioreg and that only displays my macbook's battery.
ios
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Is there a way to get an iOS device battery level from terminal when it's plugged into the computer? I've looked into ioreg and that only displays my macbook's battery.
ios
Is there a way to get an iOS device battery level from terminal when it's plugged into the computer? I've looked into ioreg and that only displays my macbook's battery.
ios
ios
asked Feb 9 '16 at 16:39
GregWringle
110312
110312
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
up vote
2
down vote
I was able to get this information as recently as macOS 10.14.1 using the libimobiledevice
formula from Homebrew. You need to use the most recent version of the library, hence the --HEAD
appended to the install command:
$ brew install --HEAD libimobiledevice
After that, try these commands:
$ idevice_id --list
<UDID>
$ ideviceinfo -u <UDID> --simple
DeviceName: foo's phone
HardwareModel: D22AP
ProductName: iPhone OS
ProductType: iPhone10,3
ProductVersion: 12.0
$ ideviceinfo -u <UDID> --domain com.apple.mobile.battery
BatteryCurrentCapacity: 43
BatteryIsCharging: true
ExternalChargeCapable: true
ExternalConnected: true
FullyCharged: false
GasGaugeCapability: true
HasBattery: true
More information is available. Try ideviceinfo --help
to list the additional domains you can query.
add a comment |
up vote
0
down vote
Seems like this might be doable via SSH
http://iphonedevwiki.net/index.php/SSH_Over_USB
Then with this command:
https://github.com/magn2o/iOS-Battery-Status
Please post the commands in the answer so that if the links break, the answer stays.
– Tah Tatsumoto
Feb 9 '16 at 17:06
add a comment |
up vote
0
down vote
You can use the command "cfgutil get batteryCurrentCapacity", you can get cfgutil by installing the command line tools for Apple Configurator.
This doesn't work unless the phone is physically connected via USB unfortunately. Also, the command takes a long time to complete (about 6 seconds on my system). I know this information is exposed somehow via WiFi (iTunes Sync protocol) because it shows up in coconutBattery. Anyone know how this is done?
– luckman212
Sep 29 at 17:32
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
I was able to get this information as recently as macOS 10.14.1 using the libimobiledevice
formula from Homebrew. You need to use the most recent version of the library, hence the --HEAD
appended to the install command:
$ brew install --HEAD libimobiledevice
After that, try these commands:
$ idevice_id --list
<UDID>
$ ideviceinfo -u <UDID> --simple
DeviceName: foo's phone
HardwareModel: D22AP
ProductName: iPhone OS
ProductType: iPhone10,3
ProductVersion: 12.0
$ ideviceinfo -u <UDID> --domain com.apple.mobile.battery
BatteryCurrentCapacity: 43
BatteryIsCharging: true
ExternalChargeCapable: true
ExternalConnected: true
FullyCharged: false
GasGaugeCapability: true
HasBattery: true
More information is available. Try ideviceinfo --help
to list the additional domains you can query.
add a comment |
up vote
2
down vote
I was able to get this information as recently as macOS 10.14.1 using the libimobiledevice
formula from Homebrew. You need to use the most recent version of the library, hence the --HEAD
appended to the install command:
$ brew install --HEAD libimobiledevice
After that, try these commands:
$ idevice_id --list
<UDID>
$ ideviceinfo -u <UDID> --simple
DeviceName: foo's phone
HardwareModel: D22AP
ProductName: iPhone OS
ProductType: iPhone10,3
ProductVersion: 12.0
$ ideviceinfo -u <UDID> --domain com.apple.mobile.battery
BatteryCurrentCapacity: 43
BatteryIsCharging: true
ExternalChargeCapable: true
ExternalConnected: true
FullyCharged: false
GasGaugeCapability: true
HasBattery: true
More information is available. Try ideviceinfo --help
to list the additional domains you can query.
add a comment |
up vote
2
down vote
up vote
2
down vote
I was able to get this information as recently as macOS 10.14.1 using the libimobiledevice
formula from Homebrew. You need to use the most recent version of the library, hence the --HEAD
appended to the install command:
$ brew install --HEAD libimobiledevice
After that, try these commands:
$ idevice_id --list
<UDID>
$ ideviceinfo -u <UDID> --simple
DeviceName: foo's phone
HardwareModel: D22AP
ProductName: iPhone OS
ProductType: iPhone10,3
ProductVersion: 12.0
$ ideviceinfo -u <UDID> --domain com.apple.mobile.battery
BatteryCurrentCapacity: 43
BatteryIsCharging: true
ExternalChargeCapable: true
ExternalConnected: true
FullyCharged: false
GasGaugeCapability: true
HasBattery: true
More information is available. Try ideviceinfo --help
to list the additional domains you can query.
I was able to get this information as recently as macOS 10.14.1 using the libimobiledevice
formula from Homebrew. You need to use the most recent version of the library, hence the --HEAD
appended to the install command:
$ brew install --HEAD libimobiledevice
After that, try these commands:
$ idevice_id --list
<UDID>
$ ideviceinfo -u <UDID> --simple
DeviceName: foo's phone
HardwareModel: D22AP
ProductName: iPhone OS
ProductType: iPhone10,3
ProductVersion: 12.0
$ ideviceinfo -u <UDID> --domain com.apple.mobile.battery
BatteryCurrentCapacity: 43
BatteryIsCharging: true
ExternalChargeCapable: true
ExternalConnected: true
FullyCharged: false
GasGaugeCapability: true
HasBattery: true
More information is available. Try ideviceinfo --help
to list the additional domains you can query.
edited Nov 10 at 13:53
answered Sep 29 at 18:15
luckman212
14118
14118
add a comment |
add a comment |
up vote
0
down vote
Seems like this might be doable via SSH
http://iphonedevwiki.net/index.php/SSH_Over_USB
Then with this command:
https://github.com/magn2o/iOS-Battery-Status
Please post the commands in the answer so that if the links break, the answer stays.
– Tah Tatsumoto
Feb 9 '16 at 17:06
add a comment |
up vote
0
down vote
Seems like this might be doable via SSH
http://iphonedevwiki.net/index.php/SSH_Over_USB
Then with this command:
https://github.com/magn2o/iOS-Battery-Status
Please post the commands in the answer so that if the links break, the answer stays.
– Tah Tatsumoto
Feb 9 '16 at 17:06
add a comment |
up vote
0
down vote
up vote
0
down vote
Seems like this might be doable via SSH
http://iphonedevwiki.net/index.php/SSH_Over_USB
Then with this command:
https://github.com/magn2o/iOS-Battery-Status
Seems like this might be doable via SSH
http://iphonedevwiki.net/index.php/SSH_Over_USB
Then with this command:
https://github.com/magn2o/iOS-Battery-Status
answered Feb 9 '16 at 16:51
jackt
1
1
Please post the commands in the answer so that if the links break, the answer stays.
– Tah Tatsumoto
Feb 9 '16 at 17:06
add a comment |
Please post the commands in the answer so that if the links break, the answer stays.
– Tah Tatsumoto
Feb 9 '16 at 17:06
Please post the commands in the answer so that if the links break, the answer stays.
– Tah Tatsumoto
Feb 9 '16 at 17:06
Please post the commands in the answer so that if the links break, the answer stays.
– Tah Tatsumoto
Feb 9 '16 at 17:06
add a comment |
up vote
0
down vote
You can use the command "cfgutil get batteryCurrentCapacity", you can get cfgutil by installing the command line tools for Apple Configurator.
This doesn't work unless the phone is physically connected via USB unfortunately. Also, the command takes a long time to complete (about 6 seconds on my system). I know this information is exposed somehow via WiFi (iTunes Sync protocol) because it shows up in coconutBattery. Anyone know how this is done?
– luckman212
Sep 29 at 17:32
add a comment |
up vote
0
down vote
You can use the command "cfgutil get batteryCurrentCapacity", you can get cfgutil by installing the command line tools for Apple Configurator.
This doesn't work unless the phone is physically connected via USB unfortunately. Also, the command takes a long time to complete (about 6 seconds on my system). I know this information is exposed somehow via WiFi (iTunes Sync protocol) because it shows up in coconutBattery. Anyone know how this is done?
– luckman212
Sep 29 at 17:32
add a comment |
up vote
0
down vote
up vote
0
down vote
You can use the command "cfgutil get batteryCurrentCapacity", you can get cfgutil by installing the command line tools for Apple Configurator.
You can use the command "cfgutil get batteryCurrentCapacity", you can get cfgutil by installing the command line tools for Apple Configurator.
answered Apr 20 at 19:35
Marc St Onge
211
211
This doesn't work unless the phone is physically connected via USB unfortunately. Also, the command takes a long time to complete (about 6 seconds on my system). I know this information is exposed somehow via WiFi (iTunes Sync protocol) because it shows up in coconutBattery. Anyone know how this is done?
– luckman212
Sep 29 at 17:32
add a comment |
This doesn't work unless the phone is physically connected via USB unfortunately. Also, the command takes a long time to complete (about 6 seconds on my system). I know this information is exposed somehow via WiFi (iTunes Sync protocol) because it shows up in coconutBattery. Anyone know how this is done?
– luckman212
Sep 29 at 17:32
This doesn't work unless the phone is physically connected via USB unfortunately. Also, the command takes a long time to complete (about 6 seconds on my system). I know this information is exposed somehow via WiFi (iTunes Sync protocol) because it shows up in coconutBattery. Anyone know how this is done?
– luckman212
Sep 29 at 17:32
This doesn't work unless the phone is physically connected via USB unfortunately. Also, the command takes a long time to complete (about 6 seconds on my system). I know this information is exposed somehow via WiFi (iTunes Sync protocol) because it shows up in coconutBattery. Anyone know how this is done?
– luckman212
Sep 29 at 17:32
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35297388%2fbattery-level-from-terminal%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password