Skip to content

Instantly share code, notes, and snippets.

@khanhdodang
Created August 2, 2019 10:12
Show Gist options
  • Save khanhdodang/65ce16db3ae0e21559476eaee080373f to your computer and use it in GitHub Desktop.
Save khanhdodang/65ce16db3ae0e21559476eaee080373f to your computer and use it in GitHub Desktop.
#!/bin/bash
user=$(whoami)
echo "$user@$(ipconfig getifaddr en0)"
Devices () {
idevice_id -l | awk '{print $1}'
echo
}
for device in $(Devices); do
echo $device &
if [ ! -d "/Users/"$user"/Library/Application Support/Kobiton/$device" ]; then
mkdir "/Users/"$user"/Library/Application Support/Kobiton/$device" || true
fi
rm -rf "/Users/"$user"/Library/Application Support/Kobiton/$device/data" || true
touch "/Users/"$user"/Library/Application Support/Kobiton/$device/data" || true
echo '{"type":"pin","key": "123456789"}' >> "/Users/"$user"/Library/Application Support/Kobiton/$device/data" || true
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment