diff --git a/README.md b/README.md index 4756719..84d7f9d 100644 --- a/README.md +++ b/README.md @@ -134,5 +134,7 @@ - [unthredeh4il](https://www.theiphonewiki.com/wiki/Unthredera1n#unthredeh4il) - [evasi0n](https://www.theiphonewiki.com/wiki/Evasi0n) - [pris0nbarake](https://github.com/LukeZGD/pris0nbarake) - LukeZGD fork -- SSH Ramdisk tar from [SSH-Ramdisk-Maker-and-Loader](https://github.com/Ralph0045/SSH-Ramdisk-Maker-and-Loader) +- [greenpois0n](https://github.com/OpenJailbreak/greenpois0n/tree/0f1eac8e748abb200fc36969e616aaad009f7ebf) +- Some patches from [PwnageTool](https://www.theiphonewiki.com/wiki/PwnageTool) and [sn0wbreeze](https://www.theiphonewiki.com/wiki/sn0wbreeze) +- SSH Ramdisk tar from [SSH-Ramdisk-Maker-and-Loader](https://github.com/Ralph0045/SSH-Ramdisk-Maker-and-Loader) and [msftguy's ssh-rd](https://github.com/msftguy/ssh-rd) - Bootstrap tar from [SpiritNET](https://invoxiplaygames.uk/projects/spiritnet/) diff --git a/resources/jailbreak/greenpois0n/iPad1,1_8C148.tar b/resources/jailbreak/greenpois0n/iPad1,1_8C148.tar new file mode 100644 index 0000000..b0ac077 Binary files /dev/null and b/resources/jailbreak/greenpois0n/iPad1,1_8C148.tar differ diff --git a/resources/jailbreak/greenpois0n/iPhone2,1_8C148a.tar b/resources/jailbreak/greenpois0n/iPhone2,1_8C148a.tar new file mode 100644 index 0000000..2ff0bab Binary files /dev/null and b/resources/jailbreak/greenpois0n/iPhone2,1_8C148a.tar differ diff --git a/resources/jailbreak/greenpois0n/iPhone3,1_8C148.tar b/resources/jailbreak/greenpois0n/iPhone3,1_8C148.tar new file mode 100644 index 0000000..f1618af Binary files /dev/null and b/resources/jailbreak/greenpois0n/iPhone3,1_8C148.tar differ diff --git a/resources/jailbreak/greenpois0n/iPhone3,3_8E200.tar b/resources/jailbreak/greenpois0n/iPhone3,3_8E200.tar new file mode 100644 index 0000000..2738fe6 Binary files /dev/null and b/resources/jailbreak/greenpois0n/iPhone3,3_8E200.tar differ diff --git a/resources/jailbreak/greenpois0n/iPod2,1_8C148.tar b/resources/jailbreak/greenpois0n/iPod2,1_8C148.tar new file mode 100644 index 0000000..76ae438 Binary files /dev/null and b/resources/jailbreak/greenpois0n/iPod2,1_8C148.tar differ diff --git a/resources/jailbreak/greenpois0n/iPod3,1_8C148.tar b/resources/jailbreak/greenpois0n/iPod3,1_8C148.tar new file mode 100644 index 0000000..9a44189 Binary files /dev/null and b/resources/jailbreak/greenpois0n/iPod3,1_8C148.tar differ diff --git a/resources/jailbreak/greenpois0n/iPod4,1_8C148.tar b/resources/jailbreak/greenpois0n/iPod4,1_8C148.tar new file mode 100644 index 0000000..abad398 Binary files /dev/null and b/resources/jailbreak/greenpois0n/iPod4,1_8C148.tar differ diff --git a/resources/patch/24Kpwn/iPhone2,1/3.1.3/018-6495-022.dmg.patch b/resources/patch/old/iPhone2,1/3.1.3/018-6495-022.dmg.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/3.1.3/018-6495-022.dmg.patch rename to resources/patch/old/iPhone2,1/3.1.3/018-6495-022.dmg.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/3.1.3/LLB.n88ap.RELEASE.img3.patch b/resources/patch/old/iPhone2,1/3.1.3/LLB.n88ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/3.1.3/LLB.n88ap.RELEASE.img3.patch rename to resources/patch/old/iPhone2,1/3.1.3/LLB.n88ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/3.1.3/iBSS.n88ap.RELEASE.dfu.patch b/resources/patch/old/iPhone2,1/3.1.3/iBSS.n88ap.RELEASE.dfu.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/3.1.3/iBSS.n88ap.RELEASE.dfu.patch rename to resources/patch/old/iPhone2,1/3.1.3/iBSS.n88ap.RELEASE.dfu.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/3.1.3/iBoot.n88ap.RELEASE.img3.patch b/resources/patch/old/iPhone2,1/3.1.3/iBoot.n88ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/3.1.3/iBoot.n88ap.RELEASE.img3.patch rename to resources/patch/old/iPhone2,1/3.1.3/iBoot.n88ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/3.1.3/kernelcache.release.s5l8920x.patch b/resources/patch/old/iPhone2,1/3.1.3/kernelcache.release.s5l8920x.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/3.1.3/kernelcache.release.s5l8920x.patch rename to resources/patch/old/iPhone2,1/3.1.3/kernelcache.release.s5l8920x.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/4.0/018-6461-399.dmg.patch b/resources/patch/old/iPhone2,1/4.0/018-6461-399.dmg.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/4.0/018-6461-399.dmg.patch rename to resources/patch/old/iPhone2,1/4.0/018-6461-399.dmg.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/4.0/LLB.n88ap.RELEASE.img3.patch b/resources/patch/old/iPhone2,1/4.0/LLB.n88ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/4.0/LLB.n88ap.RELEASE.img3.patch rename to resources/patch/old/iPhone2,1/4.0/LLB.n88ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/4.0/iBSS.n88ap.RELEASE.dfu.patch b/resources/patch/old/iPhone2,1/4.0/iBSS.n88ap.RELEASE.dfu.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/4.0/iBSS.n88ap.RELEASE.dfu.patch rename to resources/patch/old/iPhone2,1/4.0/iBSS.n88ap.RELEASE.dfu.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/4.0/iBoot.n88ap.RELEASE.img3.patch b/resources/patch/old/iPhone2,1/4.0/iBoot.n88ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/4.0/iBoot.n88ap.RELEASE.img3.patch rename to resources/patch/old/iPhone2,1/4.0/iBoot.n88ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/4.0/kernelcache.release.n88.patch b/resources/patch/old/iPhone2,1/4.0/kernelcache.release.n88.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/4.0/kernelcache.release.n88.patch rename to resources/patch/old/iPhone2,1/4.0/kernelcache.release.n88.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/4.3.3/038-1447-003.dmg.patch b/resources/patch/old/iPhone2,1/4.3.3/038-1447-003.dmg.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/4.3.3/038-1447-003.dmg.patch rename to resources/patch/old/iPhone2,1/4.3.3/038-1447-003.dmg.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/4.3.3/LLB.n88ap.RELEASE.img3.patch b/resources/patch/old/iPhone2,1/4.3.3/LLB.n88ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/4.3.3/LLB.n88ap.RELEASE.img3.patch rename to resources/patch/old/iPhone2,1/4.3.3/LLB.n88ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/4.3.3/iBSS.n88ap.RELEASE.dfu.patch b/resources/patch/old/iPhone2,1/4.3.3/iBSS.n88ap.RELEASE.dfu.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/4.3.3/iBSS.n88ap.RELEASE.dfu.patch rename to resources/patch/old/iPhone2,1/4.3.3/iBSS.n88ap.RELEASE.dfu.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/4.3.3/iBoot.n88ap.RELEASE.img3.patch b/resources/patch/old/iPhone2,1/4.3.3/iBoot.n88ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/4.3.3/iBoot.n88ap.RELEASE.img3.patch rename to resources/patch/old/iPhone2,1/4.3.3/iBoot.n88ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/4.3.3/kernelcache.release.n88.patch b/resources/patch/old/iPhone2,1/4.3.3/kernelcache.release.n88.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/4.3.3/kernelcache.release.n88.patch rename to resources/patch/old/iPhone2,1/4.3.3/kernelcache.release.n88.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/5.1.1/038-4349-020.dmg.patch b/resources/patch/old/iPhone2,1/5.1.1/038-4349-020.dmg.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/5.1.1/038-4349-020.dmg.patch rename to resources/patch/old/iPhone2,1/5.1.1/038-4349-020.dmg.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/5.1.1/LLB.n88ap.RELEASE.img3.patch b/resources/patch/old/iPhone2,1/5.1.1/LLB.n88ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/5.1.1/LLB.n88ap.RELEASE.img3.patch rename to resources/patch/old/iPhone2,1/5.1.1/LLB.n88ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/5.1.1/iBEC.n88ap.RELEASE.dfu.patch b/resources/patch/old/iPhone2,1/5.1.1/iBEC.n88ap.RELEASE.dfu.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/5.1.1/iBEC.n88ap.RELEASE.dfu.patch rename to resources/patch/old/iPhone2,1/5.1.1/iBEC.n88ap.RELEASE.dfu.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/5.1.1/iBSS.n88ap.RELEASE.dfu.patch b/resources/patch/old/iPhone2,1/5.1.1/iBSS.n88ap.RELEASE.dfu.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/5.1.1/iBSS.n88ap.RELEASE.dfu.patch rename to resources/patch/old/iPhone2,1/5.1.1/iBSS.n88ap.RELEASE.dfu.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/5.1.1/iBoot.n88ap.RELEASE.img3.patch b/resources/patch/old/iPhone2,1/5.1.1/iBoot.n88ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/5.1.1/iBoot.n88ap.RELEASE.img3.patch rename to resources/patch/old/iPhone2,1/5.1.1/iBoot.n88ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPhone2,1/5.1.1/kernelcache.release.n88.patch b/resources/patch/old/iPhone2,1/5.1.1/kernelcache.release.n88.patch similarity index 100% rename from resources/patch/24Kpwn/iPhone2,1/5.1.1/kernelcache.release.n88.patch rename to resources/patch/old/iPhone2,1/5.1.1/kernelcache.release.n88.patch diff --git a/resources/patch/24Kpwn/iPod2,1/3.1.3/018-6508-014.dmg.patch b/resources/patch/old/iPod2,1/3.1.3/018-6508-014.dmg.patch similarity index 100% rename from resources/patch/24Kpwn/iPod2,1/3.1.3/018-6508-014.dmg.patch rename to resources/patch/old/iPod2,1/3.1.3/018-6508-014.dmg.patch diff --git a/resources/patch/24Kpwn/iPod2,1/3.1.3/LLB.n72ap.RELEASE.img3.patch b/resources/patch/old/iPod2,1/3.1.3/LLB.n72ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPod2,1/3.1.3/LLB.n72ap.RELEASE.img3.patch rename to resources/patch/old/iPod2,1/3.1.3/LLB.n72ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPod2,1/3.1.3/iBSS.n72ap.RELEASE.dfu.patch b/resources/patch/old/iPod2,1/3.1.3/iBSS.n72ap.RELEASE.dfu.patch similarity index 100% rename from resources/patch/24Kpwn/iPod2,1/3.1.3/iBSS.n72ap.RELEASE.dfu.patch rename to resources/patch/old/iPod2,1/3.1.3/iBSS.n72ap.RELEASE.dfu.patch diff --git a/resources/patch/24Kpwn/iPod2,1/3.1.3/iBoot.n72ap.RELEASE.img3.patch b/resources/patch/old/iPod2,1/3.1.3/iBoot.n72ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPod2,1/3.1.3/iBoot.n72ap.RELEASE.img3.patch rename to resources/patch/old/iPod2,1/3.1.3/iBoot.n72ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPod2,1/3.1.3/kernelcache.release.s5l8720x.patch b/resources/patch/old/iPod2,1/3.1.3/kernelcache.release.s5l8720x.patch similarity index 100% rename from resources/patch/24Kpwn/iPod2,1/3.1.3/kernelcache.release.s5l8720x.patch rename to resources/patch/old/iPod2,1/3.1.3/kernelcache.release.s5l8720x.patch diff --git a/resources/patch/24Kpwn/iPod2,1/4.0/018-6462-368.dmg.patch b/resources/patch/old/iPod2,1/4.0/018-6462-368.dmg.patch similarity index 100% rename from resources/patch/24Kpwn/iPod2,1/4.0/018-6462-368.dmg.patch rename to resources/patch/old/iPod2,1/4.0/018-6462-368.dmg.patch diff --git a/resources/patch/24Kpwn/iPod2,1/4.0/LLB.n72ap.RELEASE.img3.patch b/resources/patch/old/iPod2,1/4.0/LLB.n72ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPod2,1/4.0/LLB.n72ap.RELEASE.img3.patch rename to resources/patch/old/iPod2,1/4.0/LLB.n72ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPod2,1/4.0/iBSS.n72ap.RELEASE.dfu.patch b/resources/patch/old/iPod2,1/4.0/iBSS.n72ap.RELEASE.dfu.patch similarity index 100% rename from resources/patch/24Kpwn/iPod2,1/4.0/iBSS.n72ap.RELEASE.dfu.patch rename to resources/patch/old/iPod2,1/4.0/iBSS.n72ap.RELEASE.dfu.patch diff --git a/resources/patch/24Kpwn/iPod2,1/4.0/iBoot.n72ap.RELEASE.img3.patch b/resources/patch/old/iPod2,1/4.0/iBoot.n72ap.RELEASE.img3.patch similarity index 100% rename from resources/patch/24Kpwn/iPod2,1/4.0/iBoot.n72ap.RELEASE.img3.patch rename to resources/patch/old/iPod2,1/4.0/iBoot.n72ap.RELEASE.img3.patch diff --git a/resources/patch/24Kpwn/iPod2,1/4.0/kernelcache.release.n72.patch b/resources/patch/old/iPod2,1/4.0/kernelcache.release.n72.patch similarity index 100% rename from resources/patch/24Kpwn/iPod2,1/4.0/kernelcache.release.n72.patch rename to resources/patch/old/iPod2,1/4.0/kernelcache.release.n72.patch diff --git a/resources/patch/old/iPod2,1/4.2.1/038-0049-002.dmg.patch b/resources/patch/old/iPod2,1/4.2.1/038-0049-002.dmg.patch new file mode 100644 index 0000000..9fd1c87 Binary files /dev/null and b/resources/patch/old/iPod2,1/4.2.1/038-0049-002.dmg.patch differ diff --git a/resources/patch/old/iPod2,1/4.2.1/iBSS.n72ap.RELEASE.dfu.patch b/resources/patch/old/iPod2,1/4.2.1/iBSS.n72ap.RELEASE.dfu.patch new file mode 100644 index 0000000..a5762e7 Binary files /dev/null and b/resources/patch/old/iPod2,1/4.2.1/iBSS.n72ap.RELEASE.dfu.patch differ diff --git a/restore.sh b/restore.sh index 2b59285..310de19 100755 --- a/restore.sh +++ b/restore.sh @@ -736,8 +736,7 @@ device_enter_mode() { local sendfiles=() local device_det=$(echo "$device_vers" | cut -c 1) - if [[ $device_mode != "Normal" ]]; then - # cannot enter kdfu if not in normal mode, attempt pwndfu instead + if [[ $device_mode != "Normal" ]] || [[ $device_proc == 4 && $device_type != "iPhone3"* ]]; then device_enter_mode pwnDFU return fi @@ -1214,7 +1213,7 @@ patch_ibec() { ipsw_preference_set() { # sets ipsw variables: ipsw_jailbreak, ipsw_jailbreak_tool, ipsw_memory, ipsw_verbose case $device_latest_vers in - 7* | 6* | 5* ) ipsw_canjailbreak=1;; + 7* | 6* | 5* | 4.2.1 | 4.1 ) ipsw_canjailbreak=1;; esac if [[ $device_target_vers == "$device_latest_vers" && $ipsw_canjailbreak != 1 ]] || @@ -1276,7 +1275,10 @@ ipsw_preference_set() { if [[ $platform == "windows" ]]; then ipsw_memory= - elif [[ -n $ipsw_memory || $device_type == "iPhone2,1" || $device_type == "iPod2,1" ]]; then + elif [[ -n $ipsw_memory ]]; then + : + elif [[ $device_type == "iPhone2,1" || $device_type == "iPod2,1" ]] && + [[ $device_target_vers != "$device_latest_vers" || $device_target_vers == "4"* ]]; then : elif [[ $ipsw_jailbreak == 1 || $device_type == "$device_disable_bbupdate" ]] || [[ $device_type == "iPhone3,1" && $device_target_vers != "7.1.2" ]] || @@ -1331,8 +1333,10 @@ shsh_save() { version=$2 fi - if [[ $version == "$device_latest_vers" ]]; then - build_id="$device_latest_build" + if [[ $version == "$device_latest_vers" || $version == "4.1" ]]; then + if [[ $version != "4.1" ]]; then + build_id="$device_latest_build" + fi buildmanifest="../saved/$device_type/$build_id.plist" if [[ ! -e $buildmanifest ]]; then if [[ -e "$ipsw_base_path.ipsw" ]]; then @@ -1776,6 +1780,8 @@ ipsw_prepare_32bit() { if [[ $device_target_vers == "3"* || $device_target_vers == "4"* ]]; then if [[ $device_type == "iPad2"* ]]; then ipsw_prepare_jailbreak + elif [[ $ipsw_jailbreak == 1 ]]; then + ipsw_prepare_custom fi return elif [[ -e "$ipsw_custom.ipsw" ]]; then @@ -1958,14 +1964,14 @@ ipsw_prepare_powder2() { } ipsw_prepare_custom() { - local comps=("RestoreRamdisk" "iBoot" "iBSS" "Kernelcache" "LLB") + local comps=("iBSS" "RestoreRamdisk") local name local iv local key local path local url local decrypt - local patch="../resources/patch/24Kpwn/$device_type/$device_target_vers" + local patch="../resources/patch/old/$device_type/$device_target_vers" local RootSize if [[ -e "$ipsw_custom.ipsw" ]]; then @@ -1976,6 +1982,10 @@ ipsw_prepare_custom() { if [[ $device_target_vers == "5"* ]]; then comps+=("iBEC") fi + case $device_target_vers in + 4.2.1 | 4.1 ) :;; + * ) comps+=("iBoot" "Kernelcache" "LLB");; + esac ipsw_extract device_fw_key_check @@ -2048,6 +2058,11 @@ ipsw_prepare_custom() { "$dir/hfsplus" out.dmg untar ../resources/jailbreak/freeze.tar case $device_target_vers in "3.1.3" | "4.0" ) "$dir/hfsplus" out.dmg add ../resources/jailbreak/fstab_old private/etc/fstab;; + "4.2.1" | "4.1" ) + "$dir/hfsplus" out.dmg add ../resources/jailbreak/fstab_old private/etc/fstab + "$dir/hfsplus" out.dmg mv sbin/launchd sbin/punchd + "$dir/hfsplus" out.dmg untar ../resources/jailbreak/greenpois0n/${device_type}_${device_target_build}.tar + ;; * ) "$dir/hfsplus" out.dmg untar ../resources/jailbreak/unthredeh4il.tar;; esac fi @@ -2059,7 +2074,10 @@ ipsw_prepare_custom() { log "Building IPSW" mv "$ipsw_path" "$ipsw_custom" pushd "$ipsw_custom" - rm BuildManifest.plist + case $device_target_vers in + 4.2.1 | 4.1 ) :;; + * ) rm BuildManifest.plist;; + esac zip -r0 ../tmp/temp.ipsw * popd @@ -2346,7 +2364,7 @@ restore_prepare() { $irecovery -n log "Done, your device should boot now" fi - elif [[ $device_target_vers == "4.1" ]]; then + elif [[ $device_target_vers == "4.1" && $ipsw_jailbreak != 1 ]]; then device_enter_mode DFU restore_latest if [[ $device_type == "iPhone2,1" ]]; then @@ -2356,9 +2374,9 @@ restore_prepare() { $irecovery -n log "Done, your device should boot now" fi - elif [[ $device_target_vers == "$device_latest_vers" ]]; then + elif [[ $device_target_vers == "4.1" || $device_target_vers == "$device_latest_vers" ]]; then if [[ $ipsw_jailbreak == 1 ]]; then - shsh_save version $device_latest_vers + shsh_save version $device_target_vers device_enter_mode kDFU restore_idevicerestore else