jkcoxson / rusty_libimobiledevice

A Rust wrapper for Libimobiledevice
MIT License
44 stars 19 forks source link

version and device_class return wrong values #6

Open woelper opened 1 year ago

woelper commented 1 year ago

Whenever I try to get version and device class, I receive values which differ from those produced by ideviceinfo.

 let device = idevice::get_first_device().unwrap();
 info!("Got device: {:?}", device);

This returns

Got device: Device { udid: 00008020-001D2CD90128002E, network: false, ip_address: None, device_class: 5, version: 0 }

I believe 5 is Unknown, and version is 0.

ideviceinfo -k ProductVersion returns 13.3.1

Some other metrics:

ProductName: iPhone OS
ProductType: iPhone11,8
ProductVersion: 13.3.1
ProductionSOC: true
ProtocolVersion: 2

In addition, is version the iOS version?

Thanks!

jkcoxson commented 1 year ago

So this is just from memory, I’ll be sure to get a definite answer later.

These values are returned by usbmuxd, and are inferred from the data the USB controller detects from it. The device class definitely seems to be wrong, as 5 means Apple Watch. I don’t remember what version means atm, but it’s not the iOS version. You can see how to fetch the iOS version in the ideviceinfo example here in the repo.