Skip to content

Instantly share code, notes, and snippets.

@andreafortuna
Last active Jun 3, 2019
Embed
What would you like to do?
iOS App Filesharing mount script
#!/bin/bash
OLDIFS=$IFS
IFS=','
PS3='Select iPhone app:'
options=($(ideviceinstaller -l | grep -v "Total" | awk -F" - " ' BEGIN { ORS="," }; {print $2}'))
select opt in "${options[@]}"
do
echo "Selected: $opt"
APPID=$(ideviceinstaller -l | grep $opt | awk '{print $1}')
mkdir "$HOME/iPhone/$opt"
ifuse "$HOME/iPhone/$opt" --documents $APPID
echo "$opt documents mounted on $HOME/iPhone/$opt"
IFS=$OLDIFS
mc "$HOME/iPhone/$opt"
fusermount -u "$HOME/iPhone/$opt"
echo "$HOME/iPhone/$opt successfully unmounted!"
rm -rf "$HOME/iPhone/$opt"
exit
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment