SHARE
TWEET

iphone_setup

fakedad Nov 7th, 2016 (edited) 14,454 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. zip_dir_name=""
  3. function install_package () {
  4.     ./autogen.sh
  5.     make
  6.     make install
  7. }
  8.  
  9. function unzip_name () {
  10.     d="`mktemp -d`"
  11.     unzip -d "$d" "$1"
  12.     zip_dir_name="`basename "$d"/*`"
  13.     mv "$d"/"$zip_dir_name" "$zip_dir_name"
  14.     rmdir "$d"
  15. }
  16.  
  17. function download_package_cd () {
  18.     echo $1
  19.     RESULT=zip$RANDOM.zip
  20.     wget -O $RESULT "$1"
  21.     unzip_name $RESULT
  22.     rm $RESULT
  23.     cd $zip_dir_name
  24. }
  25. #Install everything (step 1)
  26. apt-get -y install ideviceinstaller python-imobiledevice libimobiledevice-utils python-plist usbmuxd libtool autoconf automake libxml2-dev python-dev \
  27.     libssl-dev
  28. download_package_cd "https://github.com/libimobiledevice/libplist/archive/master.zip"
  29. install_package
  30. cd ..
  31. download_package_cd "https://github.com/libimobiledevice/libusbmuxd/archive/master.zip"
  32. install_package
  33. cd ..
  34. download_package_cd "https://github.com/libimobiledevice/libimobiledevice/archive/master.zip"
  35. install_package
  36. cd ..
  37. apt-get -y remove usbmuxd
  38. apt-get -y install libimobiledevice-dev libplist-dev libusb-dev libusb-1.0.0-dev libtool-bin libtool libfuse-dev
  39. download_package_cd "https://github.com/libimobiledevice/usbmuxd/archive/master.zip"
  40. install_package
  41. cd ..
  42. download_package_cd "https://github.com/libimobiledevice/ifuse/archive/master.zip"
  43. ./autogen.sh
  44. ./configure
  45. make
  46. make install
  47. cd ..
  48. #Create a mount point (step 3)
  49. mkdir /media/iPhone
  50. chmod 777 /media/iPhone
  51. # Edit the fuse configuration file (step 4)
  52. ALLOW_COMMENT_LINE=$(grep -n "# Allow non-root users to specify the allow_other or allow_root mount options." /etc/fuse.conf | grep -Eo '^[^:]+')
  53. sed -i "$(($ALLOW_COMMENT_LINE+1))iuser_allow_other" /etc/fuse.conf
  54. sed -i "$(($ALLOW_COMMENT_LINE+1))iop$" /etc/fuse.conf
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top