You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using WSL with USB passthrough. xtool dev is stuck every time on the [Connecting] step. I've got it to work once after retrying like 100 times.
Any idea what could be wrong here?
xtool dev
Planning...
[1/1] Planning build
Building for debugging...
[4/4] Linking Hello-App
Build of product 'Hello-App' complete! (1.73s)
Waiting for device to be connected...
Installing to device: xxx (udid: xxx)
[Unpacking app] 100%
[Logging in] 0%
[Preparing device] 100%
[Provisioning] 100%
[Signing] 100%
[Packaging] 100%
[Connecting] 100%
I had the same error: Error: AFCClient.Error.muxError but could connect via iTunes after I configured port forwarding as described in libimobiledevice/usbmuxd#126 (comment) with 2 small modifications:
# 1. after installing iTunes from Windows Store -> connect to your iPhone
# 2. windows cmd: check WSL interface name
ipconfig
...
Ethernet adapter vEthernet (WSL (Hyper-V firewall))
...
IPv4 Address. . . . . . . . . . . : 172.22.32.1
# 3. powershell: add firewall rule (this is a one-time setup)
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL (Hyper-V firewall))" -Action Allow
# 4. powershell: port forwarding
$myhost = $(wsl -- ip route list defaul…
Same problem. Got a message after ~1min: Error: AFCClient.Error.muxError. Suggest it cannot connect in fact. Already tapped Trust button on Iphone. Run on WSL Ubuntu 24.04.1 LTS
BTW in case when I stuck on Connecting stage, I cannot stop the command with ctrl+c or any other buttons as I could do before this stage. Hope it helps
I found a interesting log in journalctl -xfeu usbmuxd:
May 14 16:15:55 nanaDows usbmuxd[1040161]: [16:15:55.015][3] usbmuxd v1.1.1 starting up
May 14 16:15:55 nanaDows usbmuxd[1040161]: [16:15:55.016][3] Successfully dropped privileges to 'usbmux'
May 14 16:15:55 nanaDows usbmuxd[1040161]: [16:15:55.016][3] Using libusb 1.0.27
May 14 16:15:55 nanaDows usbmuxd[1040161]: [16:15:55.017][3] Initialization complete
May 14 16:15:55 nanaDows usbmuxd[1040161]: [16:15:55.017][3] Enabled exit on SIGUSR1 if no devices are attached. Start a new instance with "--exit" to trigger.
May 14 16:16:16 nanaDows usbmuxd[1040161]: libusb: warning [op_get_configuration] device unconfigured
May 14 16:16:16 nanaDows usbmuxd[1040161]: libusb: error [op_get_active_config_descriptor] device unconfigured
May 14 16:16:16 nanaDows usbmuxd[1040161]: [16:16:16.289][3] Could not get old configuration descriptor for device 1-8: LIBUSB_ERROR_NOT_FOUND
May 14 16:16:16 nanaDows usbmuxd[1040161]: [16:16:16.297][3] Connecting to new device on location 0x10008 as ID 1
May 14 16:16:16 nanaDows usbmuxd[1040161]: [16:16:16.298][3] Connected to v2.0 device 1 on location 0x10008 with serial number 00008140-00194D363C87001C
May 14 16:16:21 nanaDows usbmuxd[1040161]: [16:16:21.690][1] device_control_input: ERROR (on device): asyncReadComplete, message was too large (65536 bytes, max = 65535)
May 14 16:16:21 nanaDows usbmuxd[1040161]: [16:16:21.691][1] device_control_input: ERROR (on device): asyncReadComplete, message was too large (65536 bytes, max = 65535)
May 14 16:16:21 nanaDows usbmuxd[1040161]: [16:16:21.713][2] device_control_input: Got unhandled payload type 4
There's another approach to forwarding iPhone USB from Windows to WSL that involves installing iTunes (Apple Devices?) and then telling libimobiledevice to forward requests to port 27015. See libimobiledevice/usbmuxd#126 — I'll try to test this and suggest it over usbipd if it works.
Reacted by Joost, Nanashi., Khoa Hoang and Charles205
I had the same error: Error: AFCClient.Error.muxError but could connect via iTunes after I configured port forwarding as described in libimobiledevice/usbmuxd#126 (comment) with 2 small modifications:
# 1. after installing iTunes from Windows Store -> connect to your iPhone
# 2. windows cmd: check WSL interface name
ipconfig
...
Ethernet adapter vEthernet (WSL (Hyper-V firewall))
...
IPv4 Address. . . . . . . . . . . : 172.22.32.1
# 3. powershell: add firewall rule (this is a one-time setup)
New-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL (Hyper-V firewall))" -Action Allow
# 4. powershell: port forwarding
$myhost = $(wsl -- ip route list default `| awk '{print \$3}')
#or ipv4 adr (see #2)
$myhost = 172.22.32.1
netsh interface portproxy set v4tov4 listenport=27015 connectaddress=127.0.0.1 connectport=27015 listenaddress=$myhost
#5. WSL: check connection
export USBMUXD_SOCKET_ADDRESS="$(ip route list default | awk '{print $3}'):27015"
ideviceinfo
#6. WSL: build & install app
xtool dev
Planning...
[1/1] Planning build
Building for debugging...
[4/4] Linking Hello-App
Build of product 'Hello-App' complete! (0.55s)
Waiting for device to be connected...
Installing to device: Rena’s iPhone (udid: 0000XXXX-00XXXXXXXXXXXXXX)
[Unpacking app] 100%
[Logging in] 0%
[Preparing device] 100%
[Provisioning] 100%
[Signing] 100%
[Packaging] 100%
[Connecting] 100%
[Installing] 100%
[Verifying] 100%
Reacted by Lorenzo Ferri, forbidmellm, Joost, upet740, Thiago, Jojo Chanmathikornkul, Csaba Huszar, Iforgor, eymae, Iker Acevedo and 4 more
Given a lot of people seem to have repro’d this + confirmed the port-forwarding approach works better, I’ll probably update the docs later this week to recommend that instead. Thank you to everyone who tested and validated this!
@kabiroberai I obviously appreciate all the hard work done to even let me get to this point but I just wasted money and hours of my day trying to get this working with WSL only to eventually find this thread and your comment...can you please for the sake of others going down my path, update the docs to reflect this issue so they aren't sent on a wild goose chase as well? Also can confirm #19 (comment) worked. 😃
Pardon me, updated the docs with a link to the workaround in #19 (comment). Leaving this issue open because I still intend to provide step-by-step instructions, but this will help for now.
Pardon me, updated the docs with a link to the workaround in #19 (comment). Leaving this issue open because I still intend to provide step-by-step instructions, but this will help for now.
Wow that was quick, thanks for doing that and thanks for the work you do supporting this repo!
Activity
kabiroberai commentedon May 12, 2025
@11265 are you on WSL as well?
11265 commentedon May 12, 2025
yes,wsl(Ubuntu-24.04)
forbidmellm commentedon May 12, 2025
Same problem. Got a message after ~1min:
Error: AFCClient.Error.muxError. Suggest it cannot connect in fact. Already tapped Trust button on Iphone. Run on WSL Ubuntu 24.04.1 LTSBTW in case when I stuck on Connecting stage, I cannot stop the command with ctrl+c or any other buttons as I could do before this stage. Hope it helps
JustJoostNL commentedon May 13, 2025
Can confirm that, exact same behavior for me.
JustJoostNL commentedon May 13, 2025
@kabiroberai Do you have any idea if this a real
xtoolissue or more a WSL bug?sevenc-nanashi commentedon May 14, 2025
I found a interesting log in
journalctl -xfeu usbmuxd:My device is iPhone 16, iOS 18.5.
kabiroberai commentedon May 14, 2025
Nice find @sevenc-nanashi, this looks like it's the same issue as dorssel/usbipd-win#959
There's another approach to forwarding iPhone USB from Windows to WSL that involves installing iTunes (Apple Devices?) and then telling libimobiledevice to forward requests to port 27015. See libimobiledevice/usbmuxd#126 — I'll try to test this and suggest it over usbipd if it works.
KhoaSuperman commentedon May 16, 2025
@prismios I have same issue. please share your setup steps that very helpful for me. Appreciated !!!
JustJoostNL commentedon May 16, 2025
Would love to see some steps on how to set that up too!
KhoaSuperman commentedon May 20, 2025
@kabiroberai anything news, I tried recommended solution above but didn't work
rena2019 commentedon May 21, 2025
I had the same error: Error: AFCClient.Error.muxError but could connect via iTunes after I configured port forwarding as described in libimobiledevice/usbmuxd#126 (comment) with 2 small modifications:
LorenzoFerri commentedon May 24, 2025
@rena2019 guide worked for me ty.
UE2020 commentedon May 19, 2026
Why even say that xtool works on Windows when it clearly doesn't? This issue should be closed and the documentation should be updated.
kabiroberai commentedon May 21, 2026
Given a lot of people seem to have repro’d this + confirmed the port-forwarding approach works better, I’ll probably update the docs later this week to recommend that instead. Thank you to everyone who tested and validated this!
MagFlux commentedon Aug 23, 2026
@kabiroberai I obviously appreciate all the hard work done to even let me get to this point but I just wasted money and hours of my day trying to get this working with WSL only to eventually find this thread and your comment...can you please for the sake of others going down my path, update the docs to reflect this issue so they aren't sent on a wild goose chase as well? Also can confirm #19 (comment) worked. 😃
WSL: document alternate setup (#239)
kabiroberai commentedon Aug 23, 2026
Pardon me, updated the docs with a link to the workaround in #19 (comment). Leaving this issue open because I still intend to provide step-by-step instructions, but this will help for now.
MagFlux commentedon Aug 23, 2026
Wow that was quick, thanks for doing that and thanks for the work you do supporting this repo!
ThaUnknown commentedon Sep 5, 2026
I can't fix this no matter what
MagFlux commentedon Sep 5, 2026
Does
lsusbreturn anything within WSL? Also I believe it should behave the same but instead of iTunes I’m using the Apple Devices application (https://apps.microsoft.com/detail/9np83lwlpz9k?hl=en-US&gl=US).ThaUnknown commentedon Sep 5, 2026
lsusb listed the iphone
aqolys commentedon Oct 15, 2026
@ThaUnknown i had the same problem, heres what helped me:
usbipdecho $USBMUXD_SOCKET_ADDRESS. in my optionip route list defaultreturns192.168.1.1address, but withnetshwe listening127.0.0.1unset USBMUXD_SOCKET_ADDRESSexport USBMUXD_SOCKET_ADDRESS="127.0.0.1:27015"Floxxoo commentedon Oct 21, 2026
@MagFlux lsusb doesnt even show the iphone for me, everything looks similar to ThaUnknown's problem