Connecting iPhone with USB #5525
Replies: 19 comments
-
Connect your iPhone to the real Linux machine in the mode you want and from the terminal run |
Beta Was this translation helpful? Give feedback.
-
listmod.txt
Edit 4: Looking at the .config file it seems USBIP support was disabled, now modules show up. |
Beta Was this translation helpful? Give feedback.
-
Ok I'm very confused, I deleted the entire WSL repo and cloned it again to start afresh since |
Beta Was this translation helpful? Give feedback.
-
It's normal to see an empty lsmod in some kernels since every driver compiled with (*) in menuconfig will be already integrated in the kernel. $ dmesg | grep -i ipheth
[ 0.276064] usbcore: registered new interface driver ipheth |
Beta Was this translation helpful? Give feedback.
-
Using your kernel it seems |
Beta Was this translation helpful? Give feedback.
-
Not in my kernels. I like to integrate everything in a single monolithic kernel. If you have compiled modules then you will need to start them manually with modprobe. Ok, now that you have a working ipheth open a terminal with |
Beta Was this translation helpful? Give feedback.
-
dmesg shows
and the VirtualHere logs show
|
Beta Was this translation helpful? Give feedback.
-
Which distro are you running in WSL2 and which one in the Linux machine? |
Beta Was this translation helpful? Give feedback.
-
Using the Ubuntu 18.04 build from https://cloud-images.ubuntu.com/bionic/current/ (I have Ubuntu 20.04 from the Microsoft Store but I've got that set up for doing a bunch of other stuff) and Ubuntu 18.04 in the Linux machine. I'll try using Microsoft Store Ubuntu and see if it makes a difference. |
Beta Was this translation helpful? Give feedback.
-
Nope, same result, |
Beta Was this translation helpful? Give feedback.
-
Ok, I'm reading for iPhone4 you need ipheth and also support for HFS and HFSPLUS file systems (they also appear in your listmod.txt). Try compiling a kernel with those enabled. |
Beta Was this translation helpful? Give feedback.
-
Compiled a kernel with those options enabled but still doesn't work. There's nothing about HFS or HFSPLUS or Apple filesystems in |
Beta Was this translation helpful? Give feedback.
-
So weird. The other user did run checkrain on a jailbroken device and got Try changing the USB port where you connect the iPhone. Maybe it's now connected to some internal HUB or something that interferes USBIP. |
Beta Was this translation helpful? Give feedback.
-
I've tried a bunch of different USB ports, both 2.0 and 3.0, as well as ones on the case and mobo, and also tried with a jailbroken device, but still no luck. Going to try with a more recent device and see if that makes a difference. Though the fact that adb couldn't find the android either makes me think it might be a hardware problem... |
Beta Was this translation helpful? Give feedback.
-
Nope, nothing, but for some reason, an iPhone 8 shows as Apple, Inc. iPhone5/5C/5S/6. |
Beta Was this translation helpful? Give feedback.
-
After removing the default Windows drivers and manually installing the Apple drivers, as suggested here, I got the stable version of the VirtualHere server (previously I had been using the beta) working with connecting the iPhone 4, but the device is still not detected by CLI tools. When running
which, ignoring the errors for now, shows that programs in WSL are able to detect the device but are unable to identify it as an iPhone. I know this device is the iPhone because
From what I can tell, the device can't be identified because there is no driver for it installed (or running). |
Beta Was this translation helpful? Give feedback.
-
Ok nvm I broke it again :/ I think the stub drivers from USBIP are what was making it work, but with them installed every time I connected a USB device it was taken by the driver and I had to manually change it (which is difficult without a mouse). Even if this could work it would be ridiculously difficult. With the iPhone 4 in DFU mode (the mode checkra1n was able to detect it)
Same errors as last time, same ambiguity as last time, so I don't know why the device can be detected in DFU mode but not normal. Worth noting that checkra1n is the only tool that I could get to detect it in DFU mode, |
Beta Was this translation helpful? Give feedback.
-
Seems obvious, but usbip can't identify the device because it has nothing to reference. Downloading usb.ids and placing it in the required folder fixed this, now I get
But nothing else can identify it, going to check how libimobiledevice does it (can't with checkra1n since it's closed source). |
Beta Was this translation helpful? Give feedback.
-
USB device support is open WSL #2195. This submission is a discussion regarding rpasek/usbip-wsl2-instructions. That repository is the place I'd hang out for questions about usage, what works, what does does not, etc etc (if it were me). But do feel encouraged to continue the discussion in the discussion forum. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
I want to connect my iPhone to communicate with it using command-line tools in WSL but am unable to get those tools to detect the device. This is the same as #5169 but my problem was not resolved after trying everything suggested.
Describe the solution you'd like
Optimally, proper USB passthrough, but this guide and the solutions presented in #5169 do make the USB device show with
lsusb
. However, command-line tools like libimobiledevice are unable to detect the device withidevicepair list
.Describe alternatives you've considered
Using the methods above I have built the WSL kernel with USB functionality enabled and also used the kernel provided by the person in the other issue that solved the problem for that person, used the Virtual Here USB server on my Windows host and the Virtual Here GUI Linux client (using VcXsrv as the XServer if that makes a difference), and several different USB ports with no success.
Additional context
I have tried with 5 devices (and iPhone 4, a 5S, two 6Ss, and an HTC Wildfire). For the Android, I tested the connection using gmtp but it was not detected. None of the iDevices were detected in normal mode, but the 5S (the only phone I tested this part with) was not detected in recovery mode either but was in DFU mode.
I made this issue as a feature request because USB isn't officially supported yet (and according to Microsoft, won't be for a very long time) and so this isn't really a bug, but if there is a temporary solution or alternative that would be great. (I do have access to a Linux machine so it isn't the end of the world, I'm just trying to see if it's possible).
Beta Was this translation helpful? Give feedback.
All reactions