New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
idevice_id --list is returning iPhones that are not attached via USB #152
Comments
It would be helpful if I could get a confirmation of the expected behavior. Is idevice_id --list expected to return devices that are not connected via USB? |
No that behavior is actually not expected. |
No. Thanks for the reply. I am narrowing down the issues. I got a new USB hub and the problem persists. I am getting into a bad state whenever I connect or disconnect a device. Console log is spitting out some |
I rebuilt from sources. Previously, I was using the homebrew package. I have 3 devices connected to my machine via USB: iOS 6, iOS 7, and iOS 8. I rebooted my computer and found this output:
which is correct; those 3 devices are connected to my machine via USB. Immediately after, I ran the command again and found:
There are actually 4 devices connected to the other machine; 2 appear and 2 do not. One of missing devices is iOS 7 and the other is iOS 8. If I run the command again, I start seeing duplicate entries of devices:
In the system log, I see messages like this:
for several devices; some attached via USB and some not. |
I restarted and was able to interact with a problem device for about 15 minutes and then it stopped responding to ideviceinstaller. I unplugged it and ran idevice_id -l and found:
Host Machine Logs
Device Logs
Are those logs helpful? Is it strange that ideviceinstaller is trying to connect when device is unplugged? The ideviceinstaller process did not abort; it just hangs. I plugged the device in again and found:
Then I powered down the device and found:
|
Contrary to Nikias's experience, I do see wireless devices listed by I have contemplated exposing the connection type via idevice_t, or at least allowing a connection request to request USB-only, since the WiFi connection is considerably slower and less stable than the USB connection. |
These are indeed Wifi attached devices. The functionality behind it is "iTunes Wifi Sync". |
Will this occur if Wifi Sync is not enabled for the device? I have all the syncing disabled for these devices. |
Pretty likely as far as I remember. This is because the device discovery doesn't really need Wifi Sync enabled. As long as you did setup Wifi sync before, they might be listed. Try to disable your Wifi and see if the devices still show up. ;) |
Probably related to libimobiledevice/libusbmuxd#22. |
The device appears only once after turning off the WiFi. This is causing problems with |
Spoke too soon. The device appears even if it is not connected via WiFi |
WiFi communication is unstable and Apple's usbmuxd might have cached an older WiFi connected device to overcome connection drops. This is probably the reason why you still see some devices despite turning off WiFi. As you can imagine, it doesn't make sense that your device would still be working when neither attached by USB or WiFi. Anyways, this is an unhandled feature to be fixed in libusbmuxd which needs to learn to skip devices with the "Network" connection type property. Thus confirming this is a duplicate of libimobiledevice/libusbmuxd#22 (see related ticket for a temporary workaround, too). We'll probably fix it properly soon in libusbmuxd without implementing WiFi support yet. |
I personally love libimobiledevice's ability to connect to devices wirelessly: I use it to debug device sleep/wake cycles, and to monitor a device's behaviour when not attached to power. |
not all wants connection through usb. maybe a filter parameter would be a better solution? |
Has there been any progress on this front? It can make CI jobs unreliable if other devices connect and disconnect wirelessly and automatically. |
Please make a argument to allow/disallow to view wireless devices |
Hey guys, I had this same issue this week and solved by disabling the wifi service in the MAC. In your MAC, use the command below to list your network services Write down the service name similar to iPhone USB and run: After that, restart your mobile and it should work, but I agree that should be a flag to ignore Wi-Fi connections, similar to "ios-deploy --no-wifi" flag. |
I can also see duplicate device udid with idevice_id by following your steps.
After all of that, But failed. I can still see duplicate device udid with idevice_id |
Hi guys, I have the same issue. I found that if the mac and iphone were in the same AP(access point) network, the issue happened. So I connected iphone to the another AP, the issue was solved. Hope it is helpful. |
In my case my iPhone was connect via USB and WiFi. When I disabled the Wifi and waited a few minutes the second entry was removed. The thing is.... what does it mean to have 2 and does that effect anything downstream? Would be nice if someone in the triage team would make a decision. |
I am not sure if this is expected behavior or not.
I have rspec tests that target physical devices. Part of the test setup is to re-install an .ipa on the (test) target devices.
Prior to Xcode 6, I asked
instruments
for the list of connected devices.Starting with Xcode 6, iOS 8 devices on the local network appear as available for UIAutomation testing. However, ideviceinstaller cannot install an .ipa over the network.
Until the latest version of libimobiledevice, I have been able to find only those devices that are connected via USB using
idevice_id --list
.After updating to 1.1.7, I started seeing devices that are not attached via USB appearing in the output of
idevice_id --list
.Configuration
The offending device is iOS 8.1.1.
Reproduce
$ idevice_id --list
Expected
The device UDID to not appear in the list of devices reported by
idevice_id --list
.Found
The device UDID appears.
Notes
Occasionally, the iOS 8.1.1 device appears 2x in the output:
The text was updated successfully, but these errors were encountered: