#!/usr/bin/env bash device_disable_bbupdate="iPad2,3" # Disable baseband update for this device. You can also change this to your device if needed. ipsw_openssh=1 # OpenSSH will be added to custom IPSW if set to 1. device_ramdisk_build="" # You can change the version of SSH Ramdisk and Pwned iBSS/iBEC here. (default is 10B329 for most devices) print() { echo "${color_B}${1}${color_N}" } input() { echo "${color_Y}[Input] ${1}${color_N}" } log() { echo "${color_G}[Log] ${1}${color_N}" } warn() { echo "${color_Y}[WARNING] ${1}${color_N}" } error() { echo -e "${color_R}[Error] ${1}\n${color_Y}${*:2}${color_N}" exit 1 } pause() { input "Press Enter/Return to continue (or press Ctrl+C to cancel)" read -s } clean() { rm -rf "$(dirname "$0")/tmp/"* "$(dirname "$0")/iP"*/ "$(dirname "$0")/tmp/" if [[ $device_sudoloop == 1 ]]; then sudo rm -rf /tmp/futurerestore /tmp/*.json "$(dirname "$0")/tmp/"* "$(dirname "$0")/iP"*/ "$(dirname "$0")/tmp/" if [[ -z $device_disable_usbmuxd ]]; then sudo systemctl restart usbmuxd fi fi } clean_and_exit() { if [[ $platform == "windows" ]]; then input "Press Enter/Return to exit." read -s fi kill $httpserver_pid $iproxy_pid $sudoloop_pid $usbmuxd_pid 2>/dev/null clean } bash_version=$(/usr/bin/env bash -c 'echo ${BASH_VERSINFO[0]}') if (( bash_version > 3 )); then shopt -s compat32 fi display_help() { echo ' *** Legacy iOS Kit *** - Script by LukeZGD - Usage: ./restore.sh [Options] List of options: --debug For script debugging (set -x and debug mode) --disable-bbupdate Disable baseband update --disable-sudoloop Disable running tools as root for Linux --disable-usbmuxd Disable running usbmuxd as root for Linux --entry-device Enable manual device and ECID entry --help Display this help message --no-color Disable colors for script output --no-device Enable no device mode --no-version-check Disable script version checking For devices compatible with powdersn0w and OTA restores (see README): --ipsw-verbose Enable verbose boot option (powdersn0w only) --jailbreak Enable jailbreak option --memory Enable memory option for creating IPSW * Default IPSW path: