Allow 7.x targets for powdersn0w

This commit is contained in:
LukeZGD 2023-10-05 15:12:31 +08:00
parent 865d49e82d
commit c4b7666210
2 changed files with 35 additions and 27 deletions

View File

@ -80,9 +80,9 @@
- iPad Air 1, mini 2, mini 3 - iPad Air 1, mini 2, mini 3
- iPod touch 6 - iPod touch 6
- Restoring with powdersn0w is supported on the following devices: - Restoring with powdersn0w is supported on the following devices:
- iPhone 4 GSM - targets iOS 4.3 to 6.1.3 - iPhone 4 GSM - targets iOS 4.3 to 7.1.1
- iPhone 4 CDMA - targets iOS 5.0 to 6.1.3 - iPhone 4 CDMA - targets iOS 5.0 to 7.1.1
- iPhone 4S, 5, 5C, iPad 2 Rev A, iPod touch 5 - targets iOS 5.0 to 9.3.5 (not iOS 7) - iPhone 4S, 5, 5C, iPad 2 Rev A, iPod touch 5 - targets iOS 5.0 to 9.3.5
- Using powdersn0w requires iOS 7.1.x blobs for your device (7.0.x blobs can also be used for iPhone 5) - Using powdersn0w requires iOS 7.1.x blobs for your device (7.0.x blobs can also be used for iPhone 5)
- Restoring with 24Kpwn/alloc8 is supported on the following devices: - Restoring with 24Kpwn/alloc8 is supported on the following devices:
- iPhone 3GS - targets iOS 3.1.3 to 5.1.1 - iPhone 3GS - targets iOS 3.1.3 to 5.1.1

View File

@ -1743,6 +1743,9 @@ ipsw_verify() {
if (( device_proc > 7 )); then if (( device_proc > 7 )); then
return return
fi fi
case $build_id in
*[bcdefgkpquv] ) return;;
esac
if [[ $(echo "$IPSWSHA1" | grep -c '<') != 0 ]]; then if [[ $(echo "$IPSWSHA1" | grep -c '<') != 0 ]]; then
rm "$device_fw_dir/$build_id/sha1sum" rm "$device_fw_dir/$build_id/sha1sum"
IPSWSHA1= IPSWSHA1=
@ -1932,12 +1935,12 @@ ipsw_prepare_keys() {
;; ;;
"KernelCache" ) "KernelCache" )
if [[ $vers != "5"* ]]; then if [[ $vers != "5"* && $vers != "7"* ]]; then
echo -e "<key>$comp</key><dict><key>File</key><string>$name</string><key>IV</key><string>$iv</string><key>Key</key><string>$key</string><key>DecryptPath</key><string>Downgrade/$comp</string><key>Patch</key><true/>" >> $NewPlist echo -e "<key>$comp</key><dict><key>File</key><string>$name</string><key>IV</key><string>$iv</string><key>Key</key><string>$key</string><key>DecryptPath</key><string>Downgrade/$comp</string><key>Patch</key><true/>" >> $NewPlist
fi fi
;; ;;
esac esac
if [[ $comp == "KernelCache" && $vers == "5"* ]]; then if [[ $comp == "KernelCache" ]] && [[ $vers == "5"* || $vers == "7"* ]]; then
return return
fi fi
echo -e "<key>Decrypt</key><true/></dict>" >> $NewPlist echo -e "<key>Decrypt</key><true/></dict>" >> $NewPlist
@ -2041,7 +2044,7 @@ ipsw_prepare_bundle() {
build="$device_base_build" build="$device_base_build"
FirmwareBundle+="BASE_" FirmwareBundle+="BASE_"
elif [[ $1 == "target" ]]; then elif [[ $1 == "target" ]]; then
if [[ $ipsw_jailbreak == 1 && $vers != "5"* ]]; then if [[ $ipsw_jailbreak == 1 && $vers != "5"* && $vers != "7"* ]]; then
ipsw_prepare_config true true ipsw_prepare_config true true
else else
ipsw_prepare_config false true ipsw_prepare_config false true
@ -2092,19 +2095,20 @@ ipsw_prepare_bundle() {
echo -e "<key>RamdiskExploit</key><dict>" >> $NewPlist echo -e "<key>RamdiskExploit</key><dict>" >> $NewPlist
echo -e "<key>exploit</key><string>src/target/$hw/$base_build/exploit</string>" >> $NewPlist echo -e "<key>exploit</key><string>src/target/$hw/$base_build/exploit</string>" >> $NewPlist
echo -e "<key>inject</key><string>src/target/$hw/$base_build/partition</string></dict>" >> $NewPlist echo -e "<key>inject</key><string>src/target/$hw/$base_build/partition</string></dict>" >> $NewPlist
elif [[ $1 == "target" && $vers == "5"* ]]; then
echo -e "<key>FilesystemPackage</key><dict/><key>RamdiskPackage</key><dict><key>package</key><string>src/bin.tar</string><key>ios</key><string>ios5</string></dict>" >> $NewPlist
elif [[ $1 == "target" ]]; then elif [[ $1 == "target" ]]; then
echo -e "<key>FilesystemPackage</key><dict><key>bootstrap</key><string>freeze.tar</string>" >> $NewPlist echo -e "<key>FilesystemPackage</key><dict><key>bootstrap</key><string>freeze.tar</string>" >> $NewPlist
case $vers in case $vers in
6* ) echo -e "</dict><key>RamdiskPackage</key><dict><key>package</key><string>src/bin.tar</string><key>ios</key><string>ios6</string></dict>" >> $NewPlist;; 8* | 9* ) echo -e "<key>package</key><string>src/ios9.tar</string>" >> $NewPlist;;
7* ) error "iOS 7 targets are not supported.";;
8* | 9* ) printf "<key>package</key><string>src/ios9.tar</string></dict><key>RamdiskPackage</key><dict><key>package</key><string>src/bin.tar</string><key>ios</key><string>ios" >> $NewPlist;;
esac esac
printf "</dict><key>RamdiskPackage</key><dict><key>package</key><string>src/bin.tar</string><key>ios</key><string>ios" >> $NewPlist
case $vers in case $vers in
8* ) echo -e "8</string></dict>" >> $NewPlist;; 5* ) printf "5" >> $NewPlist;;
9* ) echo -e "9</string></dict>" >> $NewPlist;; 6* ) printf "6" >> $NewPlist;;
7* ) printf "7" >> $NewPlist;;
8* ) printf "8" >> $NewPlist;;
9* ) printf "9" >> $NewPlist;;
esac esac
echo -e "</string></dict>" >> $NewPlist
else else
echo -e "<key>FilesystemPackage</key><dict/><key>RamdiskPackage</key><dict/>" >> $NewPlist echo -e "<key>FilesystemPackage</key><dict/><key>RamdiskPackage</key><dict/>" >> $NewPlist
fi fi
@ -2118,7 +2122,7 @@ ipsw_prepare_bundle() {
ipsw_prepare_keys RestoreRamdisk $1 ipsw_prepare_keys RestoreRamdisk $1
ipsw_prepare_keys RestoreDeviceTree $1 ipsw_prepare_keys RestoreDeviceTree $1
ipsw_prepare_keys RestoreLogo $1 ipsw_prepare_keys RestoreLogo $1
if [[ $1 != "target" || $vers == "5"* ]]; then if [[ $1 != "target" || $vers == "5"* || $vers == "7"* ]]; then
ipsw_prepare_keys RestoreKernelCache $1 ipsw_prepare_keys RestoreKernelCache $1
else else
ipsw_prepare_keys KernelCache $1 ipsw_prepare_keys KernelCache $1
@ -2358,9 +2362,11 @@ ipsw_prepare_powder() {
fi fi
if [[ $ipsw_jailbreak == 1 ]]; then if [[ $ipsw_jailbreak == 1 ]]; then
cp $jelbrek/freeze.tar . cp $jelbrek/freeze.tar .
if [[ $device_target_vers == "5"* ]]; then case $device_target_vers in
ExtraArgs+=" freeze.tar $jelbrek/cydiasubstrate.tar $jelbrek/g1lbertJB.tar $jelbrek/g1lbertJB/${device_type}_${device_target_build}.tar" "5"* ) ExtraArgs+=" freeze.tar $jelbrek/cydiasubstrate.tar $jelbrek/g1lbertJB.tar $jelbrek/g1lbertJB/${device_type}_${device_target_build}.tar";;
fi "7.0"* ) ExtraArgs+=" freeze.tar $jelbrek/evasi0n7-untether.tar $jelbrek/fstab7.tar";;
"7.1"* ) ExtraArgs+=" freeze.tar $jelbrek/panguaxe.tar $jelbrek/fstab7.tar";;
esac
if [[ $ipsw_openssh == 1 ]]; then if [[ $ipsw_openssh == 1 ]]; then
ExtraArgs+=" $jelbrek/sshdeb.tar" ExtraArgs+=" $jelbrek/sshdeb.tar"
fi fi
@ -3922,12 +3928,12 @@ menu_ipsw() {
else else
print "* Select Target IPSW to continue" print "* Select Target IPSW to continue"
case $device_type in case $device_type in
iPhone3,1 ) print "* Any iOS version from 4.3 to 6.1.3 is supported";; iPhone3,1 ) print "* Any iOS version from 4.3 to 7.1.1 is supported";;
iPhone3,3 ) print "* Any iOS version from 5.0 to 6.1.3 is supported";; iPhone3,3 ) print "* Any iOS version from 5.0 to 7.1.1 is supported";;
iPhone4,1 | iPad2,[123] ) print "* Any iOS version from 5.0 to 9.3.5 is supported (not iOS 7)";; iPhone4,1 | iPad2,[123] ) print "* Any iOS version from 5.0 to 9.3.5 is supported";;
iPad2,4 | iPad3,[123] ) print "* Any iOS version from 5.1 to 9.3.5 is supported (not iOS 7)";; iPad2,4 | iPad3,[123] ) print "* Any iOS version from 5.1 to 9.3.5 is supported";;
iPhone5,[12] | iPad3,[456] ) print "* Any iOS version from 6.0 to 9.3.5 is supported (not iOS 7)";; iPhone5,[12] | iPad3,[456] ) print "* Any iOS version from 6.0 to 9.3.5 is supported";;
iPhone5,[34] ) print "* Any iOS version from 8.0 to 9.3.5 is supported";; iPhone5,[34] ) print "* Any iOS version from 7.0 to 9.3.5 is supported";;
esac esac
fi fi
echo echo
@ -4161,7 +4167,7 @@ menu_ipsw_browse() {
;; ;;
*"powdersn0w"* ) *"powdersn0w"* )
case $device_target_build in case $device_target_build in
"8A"* | "8B"* | "8C"* | "8G4" | "8H7" | "8K2" | "11"* | "14"* ) "8A"* | "8B"* | "8C"* | "8G4" | "8H7" | "8K2" | "14"* )
log "Selected IPSW ($device_target_vers) is not supported as target version." log "Selected IPSW ($device_target_vers) is not supported as target version."
if [[ $device_target_build == "8"* ]]; then if [[ $device_target_build == "8"* ]]; then
print "* Supported iOS 4.3.x versions: 4.3, 4.3.3, 4.3.5" print "* Supported iOS 4.3.x versions: 4.3, 4.3.3, 4.3.5"
@ -4384,9 +4390,11 @@ device_dump() {
cp $arg.tar $dump cp $arg.tar $dump
elif [[ $device_mode == "DFU" ]]; then elif [[ $device_mode == "DFU" ]]; then
device_ramdisk $arg device_ramdisk $arg
device_find_mode Recovery if [[ $mode != "baseband" ]]; then
device_enter_mode DFU device_find_mode Recovery
device_enter_mode pwnDFU device_enter_mode DFU
device_enter_mode pwnDFU
fi
fi fi
kill $iproxy_pid kill $iproxy_pid
if [[ ! -e $dump ]]; then if [[ ! -e $dump ]]; then