-
-
Save chayanforyou/4767214b11543209d0f7f52df959d650 to your computer and use it in GitHub Desktop.
Forward iOS device from host to guest (OSX-KVM)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Debug | |
set -o xtrace | |
GUEST_IP=192.168.122.221 | |
HOST_IP=192.168.122.1 | |
# Wipe the current usbfluxd, usbmuxd, and socat: | |
sudo killall usbfluxd | |
sudo systemctl restart usbmuxd | |
sudo killall socat | |
# Start usbfluxd and required stuff on host | |
sudo avahi-daemon -D | |
sleep 1 | |
sudo systemctl restart usbmuxd | |
sudo socat tcp-listen:5000,fork unix-connect:/var/run/usbmuxd & | |
sleep 1 | |
sudo usbfluxd -n | |
sleep 1 | |
# Start usbfluxd and required stuff on guest | |
ssh -t $GUEST_IP "sudo launchctl start usbmuxd" | |
sleep 1 | |
ssh -t $GUEST_IP "sudo /usr/local/sbin/usbfluxd -r $HOST_IP:5000" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment