From efe7de0b4ca3b18446995a1a80c04fb88e16df12 Mon Sep 17 00:00:00 2001 From: LukeZGD <26163116+LukeZGD@users.noreply.github.com> Date: Mon, 22 Jul 2024 20:05:20 +0800 Subject: [PATCH] Check existing firmware key filenames for iOS 8/9 --- restore.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/restore.sh b/restore.sh index befda32..6e7a71f 100755 --- a/restore.sh +++ b/restore.sh @@ -1806,6 +1806,14 @@ device_fw_key_check() { log "Existing firmware keys are not valid. Deleting" rm "$keys_path/index.html" fi + case $build in + 1[23]* ) + if [[ $(cat "$keys_path/index.html" | sed "s|DeviceTree.${device_model}ap||g" | grep -c "${device_model}ap") != 0 ]]; then + log "Existing firmware keys seem to have incorrect filenames. Deleting" + rm "$keys_path/index.html" + fi + ;; + esac fi if [[ ! -e "$keys_path/index.html" ]]; then