Installing several important tools with script

This will allow you to save yourself some time. First thing you need to create a file

nano iphone_setup.sh

and then past bellow script

#!/bin/bash
zip_dir_name=””
function install_package () {
./autogen.sh
make
make install
}

function unzip_name () {
d=”`mktemp -d`”
unzip -d “$d” “$1”
zip_dir_name=”`basename “$d”/*`”
mv “$d”/”$zip_dir_name” “$zip_dir_name”
rmdir “$d”
}

function download_package_cd () {
echo $1
RESULT=zip$RANDOM.zip
wget -O $RESULT “$1”
unzip_name $RESULT
rm $RESULT
cd $zip_dir_name
}
#Install everything (step 1)
apt-get -y install ideviceinstaller python-imobiledevice libimobiledevice-utils python-plist usbmuxd libtool autoconf automake libxml2-dev python-dev \
libssl-dev
download_package_cd “https://github.com/libimobiledevice/libplist/archive/master.zip”
install_package
cd ..
download_package_cd “https://github.com/libimobiledevice/libusbmuxd/archive/master.zip”
install_package
cd ..
download_package_cd “https://github.com/libimobiledevice/libimobiledevice/archive/master.zip”
install_package
cd ..
apt-get -y remove usbmuxd
apt-get -y install libimobiledevice-dev libplist-dev libusb-dev libusb-1.0.0-dev libtool-bin libtool libfuse-dev
download_package_cd “https://github.com/libimobiledevice/usbmuxd/archive/master.zip”
install_package
cd ..
download_package_cd “https://github.com/libimobiledevice/ifuse/archive/master.zip”
./autogen.sh
./configure
make
make install
cd ..
#Create a mount point (step 3)
mkdir /media/iPhone
chmod 777 /media/iPhone
# Edit the fuse configuration file (step 4)
ALLOW_COMMENT_LINE=$(grep -n “# Allow non-root users to specify the allow_other or allow_root mount options.” /etc/fuse.conf | grep -Eo ‘^[^:]+’)
sed -i “$(($ALLOW_COMMENT_LINE+1))iuser_allow_other” /etc/fuse.conf

sed -i “$(($ALLOW_COMMENT_LINE+1))iop$” /etc/fuse.conf

Once done, save and exit. Next you will need to change the permissions so you can execute the script.

chmod u+x iphone_setup.sh

Convert the Windows line endings by doing

ex -bsc ‘%!awk “{sub(/\r/,\”\”)}1″‘ -cx iphone_setup.sh

Then run the script with root privileges using

sudo ./iphone_setup.sh

Running usbmuxd and attaching iPhone

This step is simple. Run usbmuxd in the terminal, and then plug in the iPhone.

Now check to see if the device was recognized correctly by doing

dmesg | grep ipheth

If nothing shows up, try disconnecting the iPhone, running usbmuxd again, and then plugging back in. Then check again.

Pairing the iPhone

Run the following line in order to pair your iPhone using idevicepair:

idevicepair pair

Pin It on Pinterest

Share This