diff --git a/bin/macos/arm64/dmg b/bin/macos/arm64/dmg new file mode 100755 index 0000000..0c2a7e7 Binary files /dev/null and b/bin/macos/arm64/dmg differ diff --git a/bin/macos/arm64/gilbertjb b/bin/macos/arm64/gilbertjb new file mode 100755 index 0000000..f93b975 Binary files /dev/null and b/bin/macos/arm64/gilbertjb differ diff --git a/bin/macos/arm64/hfsplus b/bin/macos/arm64/hfsplus new file mode 100755 index 0000000..f3c0e8d Binary files /dev/null and b/bin/macos/arm64/hfsplus differ diff --git a/bin/macos/arm64/iBoot32Patcher b/bin/macos/arm64/iBoot32Patcher new file mode 100755 index 0000000..fc3cce6 Binary files /dev/null and b/bin/macos/arm64/iBoot32Patcher differ diff --git a/bin/macos/arm64/ideviceactivation b/bin/macos/arm64/ideviceactivation new file mode 100755 index 0000000..a5123c5 Binary files /dev/null and b/bin/macos/arm64/ideviceactivation differ diff --git a/bin/macos/arm64/idevicebackup2 b/bin/macos/arm64/idevicebackup2 new file mode 100755 index 0000000..d025f86 Binary files /dev/null and b/bin/macos/arm64/idevicebackup2 differ diff --git a/bin/macos/arm64/idevicediagnostics b/bin/macos/arm64/idevicediagnostics new file mode 100755 index 0000000..3bd8a9f Binary files /dev/null and b/bin/macos/arm64/idevicediagnostics differ diff --git a/bin/macos/arm64/ideviceenterrecovery b/bin/macos/arm64/ideviceenterrecovery new file mode 100755 index 0000000..057ef22 Binary files /dev/null and b/bin/macos/arm64/ideviceenterrecovery differ diff --git a/bin/macos/arm64/ideviceinfo b/bin/macos/arm64/ideviceinfo new file mode 100755 index 0000000..a57c742 Binary files /dev/null and b/bin/macos/arm64/ideviceinfo differ diff --git a/bin/macos/arm64/ideviceinstaller b/bin/macos/arm64/ideviceinstaller new file mode 100755 index 0000000..21e6ba3 Binary files /dev/null and b/bin/macos/arm64/ideviceinstaller differ diff --git a/bin/macos/arm64/idevicepair b/bin/macos/arm64/idevicepair new file mode 100755 index 0000000..d2c8609 Binary files /dev/null and b/bin/macos/arm64/idevicepair differ diff --git a/bin/macos/arm64/idevicerestore b/bin/macos/arm64/idevicerestore new file mode 100755 index 0000000..76bb908 Binary files /dev/null and b/bin/macos/arm64/idevicerestore differ diff --git a/bin/macos/arm64/imagetool b/bin/macos/arm64/imagetool new file mode 100755 index 0000000..55e979e Binary files /dev/null and b/bin/macos/arm64/imagetool differ diff --git a/bin/macos/arm64/img4 b/bin/macos/arm64/img4 new file mode 100755 index 0000000..e50b78d Binary files /dev/null and b/bin/macos/arm64/img4 differ diff --git a/bin/macos/arm64/img4tool b/bin/macos/arm64/img4tool new file mode 100755 index 0000000..c9dc8d7 Binary files /dev/null and b/bin/macos/arm64/img4tool differ diff --git a/bin/macos/arm64/iproxy b/bin/macos/arm64/iproxy new file mode 100755 index 0000000..cb65001 Binary files /dev/null and b/bin/macos/arm64/iproxy differ diff --git a/bin/macos/arm64/ipsw b/bin/macos/arm64/ipsw new file mode 100755 index 0000000..0e76fcf Binary files /dev/null and b/bin/macos/arm64/ipsw differ diff --git a/bin/macos/arm64/ipwnder b/bin/macos/arm64/ipwnder new file mode 100755 index 0000000..de48c67 Binary files /dev/null and b/bin/macos/arm64/ipwnder differ diff --git a/bin/macos/arm64/ipwnder2 b/bin/macos/arm64/ipwnder2 new file mode 100755 index 0000000..5dc6efa Binary files /dev/null and b/bin/macos/arm64/ipwnder2 differ diff --git a/bin/macos/arm64/irecovery b/bin/macos/arm64/irecovery new file mode 100755 index 0000000..b14558f Binary files /dev/null and b/bin/macos/arm64/irecovery differ diff --git a/bin/macos/arm64/irecovery2 b/bin/macos/arm64/irecovery2 new file mode 100755 index 0000000..8be06bc Binary files /dev/null and b/bin/macos/arm64/irecovery2 differ diff --git a/bin/macos/arm64/jq b/bin/macos/arm64/jq new file mode 100755 index 0000000..8842adb Binary files /dev/null and b/bin/macos/arm64/jq differ diff --git a/bin/macos/arm64/lib/libideviceactivation-1.0.2.dylib b/bin/macos/arm64/lib/libideviceactivation-1.0.2.dylib new file mode 100755 index 0000000..f7e3d08 Binary files /dev/null and b/bin/macos/arm64/lib/libideviceactivation-1.0.2.dylib differ diff --git a/bin/macos/arm64/lib/libimobiledevice-1.0.6.dylib b/bin/macos/arm64/lib/libimobiledevice-1.0.6.dylib new file mode 100755 index 0000000..99fbf8b Binary files /dev/null and b/bin/macos/arm64/lib/libimobiledevice-1.0.6.dylib differ diff --git a/bin/macos/arm64/lib/libimobiledevice-glue-1.0.0.dylib b/bin/macos/arm64/lib/libimobiledevice-glue-1.0.0.dylib new file mode 100755 index 0000000..c3effc5 Binary files /dev/null and b/bin/macos/arm64/lib/libimobiledevice-glue-1.0.0.dylib differ diff --git a/bin/macos/arm64/lib/libirecovery-1.0.3.dylib b/bin/macos/arm64/lib/libirecovery-1.0.3.dylib new file mode 100755 index 0000000..96f394e Binary files /dev/null and b/bin/macos/arm64/lib/libirecovery-1.0.3.dylib differ diff --git a/bin/macos/arm64/lib/libplist-2.0.4.dylib b/bin/macos/arm64/lib/libplist-2.0.4.dylib new file mode 100755 index 0000000..08793e3 Binary files /dev/null and b/bin/macos/arm64/lib/libplist-2.0.4.dylib differ diff --git a/bin/macos/arm64/lib/libusb-1.0.0.dylib b/bin/macos/arm64/lib/libusb-1.0.0.dylib new file mode 100755 index 0000000..4350818 Binary files /dev/null and b/bin/macos/arm64/lib/libusb-1.0.0.dylib differ diff --git a/bin/macos/arm64/lib/libusbmuxd-2.0.6.dylib b/bin/macos/arm64/lib/libusbmuxd-2.0.6.dylib new file mode 100755 index 0000000..fbe40e4 Binary files /dev/null and b/bin/macos/arm64/lib/libusbmuxd-2.0.6.dylib differ diff --git a/bin/macos/arm64/powdersn0w b/bin/macos/arm64/powdersn0w new file mode 100755 index 0000000..627aa17 Binary files /dev/null and b/bin/macos/arm64/powdersn0w differ diff --git a/bin/macos/arm64/pzb b/bin/macos/arm64/pzb new file mode 100755 index 0000000..664bcce Binary files /dev/null and b/bin/macos/arm64/pzb differ diff --git a/bin/macos/arm64/sshpass b/bin/macos/arm64/sshpass new file mode 100755 index 0000000..a20900a Binary files /dev/null and b/bin/macos/arm64/sshpass differ diff --git a/bin/macos/arm64/ticket b/bin/macos/arm64/ticket new file mode 100755 index 0000000..b24038a Binary files /dev/null and b/bin/macos/arm64/ticket differ diff --git a/bin/macos/arm64/validate b/bin/macos/arm64/validate new file mode 100755 index 0000000..88fa4aa Binary files /dev/null and b/bin/macos/arm64/validate differ diff --git a/bin/macos/arm64/xpwntool b/bin/macos/arm64/xpwntool new file mode 100755 index 0000000..71ba3af Binary files /dev/null and b/bin/macos/arm64/xpwntool differ diff --git a/bin/macos/ipwnder32 b/bin/macos/ipwnder32 index f21a33e..4053571 100755 Binary files a/bin/macos/ipwnder32 and b/bin/macos/ipwnder32 differ diff --git a/bin/macos/pzb b/bin/macos/pzb index 022191b..ab3d3b7 100755 Binary files a/bin/macos/pzb and b/bin/macos/pzb differ diff --git a/restore.sh b/restore.sh index 2be440e..cb41bab 100755 --- a/restore.sh +++ b/restore.sh @@ -24,7 +24,7 @@ warn() { error() { echo -e "${color_R}[Error] ${1}\n${color_Y}${*:2}${color_N}" print "* Legacy iOS Kit $version_current ($git_hash)" - print "* Platform: $platform ($platform_ver) $live_cdusb_str" + print "* Platform: $platform ($platform_ver - $platform_arch) $live_cdusb_str" exit 1 } @@ -175,7 +175,7 @@ set_tool_paths() { elif [[ $ID == "gentoo" || $ID_LIKE == "gentoo" || $ID == "pentoo" ]]; then distro="gentoo" else - error "Your distro ($platform_ver) is not detected/supported. See the repo README for supported OS versions/distros" + error "Your distro ($platform_ver - $platform_arch) is not detected/supported. See the repo README for supported OS versions/distros" fi bspatch="$dir/bspatch" PlistBuddy="$dir/PlistBuddy" @@ -231,7 +231,7 @@ set_tool_paths() { irecovery2="sudo " irecovery3="sudo " if [[ ! -d $dir && $(ls ../bin/linux) ]]; then - log "Running on platform: $platform ($platform_ver)" + log "Running on platform: $platform ($platform_ver - $platform_arch)" error "Failed to find bin directory for $platform_arch, found $(ls -x ../bin/linux) instead." \ "* Download the \"linux_$platform_arch\" or \"complete\" version to continue (or do a git clone)" fi @@ -251,6 +251,7 @@ set_tool_paths() { log "Not running usbmuxd" fi fi + gaster+="$dir/gaster" elif [[ $(uname -m) == "iP"* ]]; then error "Running Legacy iOS Kit on iOS is not supported (yet)" "* Supported platforms: Linux, macOS" @@ -261,9 +262,8 @@ set_tool_paths() { dir="../bin/macos" platform_arch="$(uname -m)" - if [[ $platform_arch != "x86_64" ]]; then - platform_arch="arm64" - #dir+="/arm64" + if [[ $platform_arch == "arm64" ]]; then + dir+="/arm64" fi # macos version check @@ -272,7 +272,7 @@ set_tool_paths() { mac_minver=${platform_ver:3} mac_minver=${mac_minver%.*} if (( mac_minver < 11 )); then - warn "Your macOS version ($platform_ver) is not supported. Expect features to not work properly." + warn "Your macOS version ($platform_ver - $platform_arch) is not supported. Expect features to not work properly." print "* Supported versions are macOS 10.11 and newer. (10.13/10.15 and newer recommended)" pause fi @@ -297,6 +297,7 @@ set_tool_paths() { bspatch="$(command -v bspatch)" cocoadialog="$(command -v cocoadialog)" + gaster+="../bin/macos/gaster" ipwnder32="$dir/ipwnder32" PlistBuddy="/usr/libexec/PlistBuddy" sha1sum="$(command -v shasum) -a 1" @@ -309,7 +310,7 @@ set_tool_paths() { else error "Your platform ($OSTYPE) is not supported." "* Supported platforms: Linux, macOS" fi - log "Running on platform: $platform ($platform_ver)" + log "Running on platform: $platform ($platform_ver - $platform_arch)" if [[ ! -d $dir ]]; then error "Failed to find bin directory ($dir), cannot continue." \ "* Re-download Legacy iOS Kit from releases (or do a git clone/reset)" @@ -324,7 +325,6 @@ set_tool_paths() { fi futurerestore+="$dir/futurerestore" - gaster+="$dir/gaster" ideviceinfo="$dir/ideviceinfo" idevicerestore+="$dir/idevicerestore" ifuse="$(command -v ifuse)" @@ -404,10 +404,6 @@ install_depends() { chown -R $USER:staff $dir log "Installing Xcode Command Line Tools" xcode-select --install - if [[ $platform_arch == "arm64" ]]; then - log "Installing Rosetta 2" - softwareupdate --install-rosetta - fi print "* Make sure to install requirements from Homebrew/MacPorts: https://github.com/LukeZGD/Legacy-iOS-Kit/wiki/How-to-Use" fi @@ -430,9 +426,15 @@ install_depends() { } version_update_check() { + pushd "$(dirname "$0")/tmp$$" >/dev/null + if [[ $platform == "macos" && ! -e ../resources/firstrun ]]; then + print "* Legacy iOS Kit will be installing setting up permissions of tools" + print "* Enter your user password when prompted" + pause + sudo xattr -cr $dir + fi log "Checking for updates..." github_api=$(curl https://api.github.com/repos/LukeZGD/Legacy-iOS-Kit/releases/latest 2>/dev/null) - pushd "$(dirname "$0")/tmp$$" >/dev/null version_latest=$(echo "$github_api" | $jq -r '.assets[] | select(.name|test("complete")) | .name' | cut -c 25- | cut -c -9) git_hash_latest=$(echo "$github_api" | $jq -r '.assets[] | select(.name|test("git-hash")) | .name' | cut -c 21- | cut -c -7) popd >/dev/null @@ -3182,6 +3184,8 @@ ipsw_prepare_32bit() { esac if [[ $device_target_vers == "4.2"* || $device_target_vers == "4.3"* || $ipsw_gasgauge_patch == 1 ]]; then nskip=1 + elif [[ $platform == "macos" && $platform_arch == "arm64" ]]; then + nskip=1 fi if [[ $device_target_vers == "3"* || $device_target_vers == "4"* ]] && [[ $nskip != 1 ]]; then ipsw_prepare_jailbreak @@ -5005,6 +5009,9 @@ restore_usepwndfu64_option() { print "* If you want to disable Pwned Restore Option, place the device in Normal/Recovery mode" restore_usepwndfu64=1 return + elif [[ $platform == "macos" && $platform_arch == "arm64" ]]; then + restore_usepwndfu64=1 + return fi local opt input "Pwned Restore Option" @@ -6048,7 +6055,7 @@ menu_print_info() { if [[ $git_hash_latest != "$git_hash" ]]; then warn "Current version is newer/different than remote: $version_latest ($git_hash_latest)" fi - print "* Platform: $platform ($platform_ver) $live_cdusb_str" + print "* Platform: $platform ($platform_ver - $platform_arch) $live_cdusb_str" echo print "* Device: $device_name (${device_type} - ${device_model}ap) in $device_mode mode" device_manufacturing @@ -8691,7 +8698,7 @@ main() { echo print "* Save the terminal output now if needed." print "* Legacy iOS Kit $version_current ($git_hash)" - print "* Platform: $platform ($platform_ver) $live_cdusb_str" + print "* Platform: $platform ($platform_ver - $platform_arch) $live_cdusb_str" echo }