Created
December 4, 2015 11:52
-
-
Save genhack/5fd566d2e6108c11e469 to your computer and use it in GitHub Desktop.
Libimobiledevice full install
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 | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color | |
OUTPUT=/tmp/libimobiledeviceinstall.log | |
log() { | |
printf "\r$1\n" ; # Stampo il messaggio di log | |
printf "$2" ; # Stampo la percentuale di completamento | |
} | |
makeinstall() { | |
curl --silent --location $1 -o "${2}.zip" | |
unzip "${2}.zip" > ${OUTPUT} | |
cd "${2}-master" | |
(./autogen.sh --prefix=/usr/ --quiet >> ${OUTPUT}) & spinner | |
(make >> ${OUTPUT}) & spinner | |
(make install >> ${OUTPUT}) & spinner | |
cd .. | |
} | |
spinner() { | |
local pid=$! | |
local delay=0.15 | |
local spinstr='|/-\' | |
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do | |
local temp=${spinstr#?} | |
printf " [%c] " "$spinstr" | |
local spinstr=$temp${spinstr%"$temp"} | |
sleep $delay | |
printf "\b\b\b\b\b\b" | |
done | |
printf " \b\b\b\b" | |
} | |
#1: Scarico dipendenze | |
log "${RED} Download Dipendenze & installazione ... ${NC}" "1/11" | |
(apt-get install -y -qq --force-yes automake autoconf-archive libtool libssl-dev \ | |
libgcrypt11-dev libp11-kit-dev libcurl4-gnutls-dev libusb-1.0 \ | |
libzip-dev libfuse-dev clutter-1.0 clutter-gtk-1.0 python-dev \ | |
libxml2-dev libssl-dev libreadline-dev > ${OUTPUT}) & spinner | |
#2: Cython | |
log "Compilazione e installazione ${RED} Cython ${NC}" "2/11" | |
curl --silent --location http://cython.org/release/Cython-0.23.4.zip -o cython.zip | |
unzip cython.zip > ${OUTPUT} | |
cd Cython-0.23.4 | |
(python setup.py install > ${OUTPUT}) & spinner | |
cd .. | |
log "${RED} Dipendenze completate ${NC}" "2/11" | |
rm cython.zip # Rimuovo lo zip | |
rm -r Cython* # Rimuovo la cartella | |
#1: Creo cartella libimobiledevice | |
mkdir libimobiledevice | |
cd libimobiledevice | |
#2: Scarico pacchetti | |
echo "${RED} Download In corso Libimobile Device Full... ${NC}" | |
curl --silent --location https://github.com/libimobiledevice/libplist/archive/master.zip -o libplist.zip | |
curl --silent --location https://github.com/libimobiledevice/libusbmuxd/archive/master.zip -o libusbmuxd.zip | |
curl --silent --location https://github.com/libimobiledevice/libimobiledevice/archive/master.zip -o libimobiledevice.zip | |
curl --silent --location https://github.com/libimobiledevice/libideviceactivation/archive/master.zip -o libimobiledeviceactivation.zip | |
curl --silent --location https://github.com/Chronic-Dev/libirecovery/archive/master.zip -o libirecovery.zip | |
curl --silent --location https://github.com/libimobiledevice/idevicerestore/archive/master.zip -o idevicerestore.zip | |
curl --silent --location https://github.com/libimobiledevice/ideviceinstaller/archive/master.zip -o ideviceinstaller.zip | |
curl --silent --location https://github.com/libimobiledevice/ifuse/archive/master.zip -o ifuse.zip | |
echo "${RED} Download Completato... ${NC}" | |
#3: Libplist | |
echo "${RED} Libplist ${NC}" | |
unzip libplist.zip | |
cd libplist-master | |
./autogen.sh --prefix=/usr/ | |
make && sudo make install | |
cd .. | |
#4: Libusbmuxd | |
echo "${RED} Libusbmuxd ${NC}" | |
unzip libusbmuxd.zip | |
cd libusbmuxd-master | |
./autogen.sh --prefix=/usr/ | |
make && sudo make install | |
cd .. | |
#5: Libimobiledevice | |
echo "${RED} Libimobiledevice ${NC}" | |
unzip libimobiledevice.zip | |
cd libimobiledevice-master | |
./autogen.sh --prefix=/usr/ | |
make && sudo make install | |
cd .. | |
#6: libimobiledeviceactivation | |
echo "${RED} libimobiledeviceactivation ${NC}" | |
unzip libimobiledeviceactivation.zip | |
cd libideviceactivation-master | |
./autogen.sh --prefix=/usr/ | |
make && sudo make install | |
#7: Ideviceinstaller | |
echo "${RED} Ideviceinstaller ${NC}" | |
unzip ideviceinstaller.zip | |
cd ideviceinstaller-master | |
./autogen.sh --prefix=/usr/ | |
make && sudo make install | |
#8: Ifuse | |
echo "${RED} Ifuse ${NC}"------> No problema sul make | |
unzip ifuse.zip | |
cd ifuse-master | |
./autogen.sh --prefix=/usr/ | |
make && sudo make install | |
#: Libirecovery | |
echo "${RED} Libirecovery ${NC}"------> No problema sul make | |
unzip libirecovery.zip | |
cd libirecovery-master | |
./autogen.sh --prefix=/usr/ | |
make && sudo make install | |
#: Idevicerestore | |
echo "${RED} Idevicerestore ${NC}"------> No problema sul make | |
unzip idevicerestore.zip | |
cd idevicerestore-master | |
./autogen.sh --prefix=/usr/ | |
make && sudo make install | |
cd .. | |
echo "${RED} Clean Installer ${NC}" | |
rm libplist.zip | |
rm libusbmuxd.zip | |
rm libimobiledevice.zip | |
rm libimobiledeviceactivation.zip | |
rm ifuse.zip | |
rm libirecovery.zip | |
rm idevicerestore.zip | |
echo "${RED} Configurazione finita. Se non dovesse funzionare puoi vedere il file di log al seguente indirizzo: /tmp/libimobiledeviceinstallation.log | |
Made By Genhack && Abeltramo #GsmIta {$OUT} ${NC}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment