libimobiledevice / libirecovery

Library and utility to talk to iBoot/iBSS via USB on Mac OS X, Windows, and Linux
https://libimobiledevice.org
GNU Lesser General Public License v2.1
550 stars 207 forks source link

Connecting a large number of devices under windows will lead to the problem of in-phase driver suffix. #93

Closed AiXanadu closed 2 years ago

AiXanadu commented 2 years ago

Connecting a large number of devices under windows will lead to the problem of in-phase driver suffix. I don't think we can give the success probability of device identification to the driver suffix of the operating system. When I connect multiple devices (more than 5) and have the same model (such as iPhone x), the data returned to me by the operating system is no longer reliable. When it is used as the basis for judgment, some devices will fail to notify the upper application. devinfo->location == location; So I modified it to use ECID for judgment (windows only), so that we can get a unique ID for comparison.

in addition: If you can, please refuse or accept, or explain the reasons for not accepting, so that I can know where I made a mistake. Maybe my description is not good enough. Thank you.

nikias commented 2 years ago

Can you provide some examples of driver strings when you connect multiple devices? Windows must be able to differentiate between them somehow.

AiXanadu commented 2 years ago

@nikias I think I have evidence. When the number of device connections (now or before) exceeds a certain value, the drive suffix will not end with a number, but will be followed by a letter.

9f4b 9f4f 9f44 9f47 libirecovery_imitate.txt

Please convert reg.rar.log to reg.rar and decompress it, which contains the registry information of the computer reg.rar.log

AiXanadu commented 2 years ago

Windows can distinguish them, but strtoul can't distinguish them well. When converted to uint32_t, letters are lost.

nikias commented 2 years ago

Oh, location is a hexadecimal value! It seems quite simple to me now.

nikias commented 2 years ago

Should be fixed with commit b65c93bc6867480302f2e44186d74a64e8215c94.