Add option to jailbreak iOS 6 downgrades

This commit is contained in:
LukeeGD 2020-09-15 18:25:37 +08:00
parent 40bd377e0b
commit 1e209e7a55
23 changed files with 609 additions and 12 deletions

1
.gitignore vendored
View File

@ -11,5 +11,6 @@ iP*
saved/
resources/firmware/
resources/ipwndfu/
resources/jailbreak/
resources/libirecovery/
tmp/

View File

@ -67,13 +67,12 @@
- If the script can't find your device in pwnREC mode or gets stuck, you may have to start over
- Other than the above there's not much else I can help regarding entering pwnDFU mode...
- For 32-bit devices:
- To devices with baseband, this script will restore your device with the latest baseband
- To devices with baseband, this script will restore your device with the latest baseband (except iOS 6 jailbreak)
- This script has a workaround for the activation error on devices downgrading from iOS 10
- This script can also be used to just enter kDFU mode for all supported devices
- This script can also restore your device to other iOS versions with provided SHSH blobs
- As alternatives to kloader/kDFU, checkm8 A5 or ipwndfu can also be used in DFU advanced menu
- To enter DFU advanced menu, put your iOS device in DFU mode before running the script
- This script does not modify the IPSW
- This script can work on virtual machines, but I won't provide support for them
## Tools and other stuff used by this script:

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>RootFilesystem</key>
<string>048-2634-005.dmg</string>
<key>RootFilesystemSize</key>
<integer>1063</integer>
<key>Filename</key>
<string>iPad2,1_6.1.3_10B329_Restore.ipsw</string>
<key>RamdiskMountVolume</key>
<string>ramdisk</string>
<key>Name</key>
<string>iPhone2,1_6.1.3_10B329</string>
<key>SubPlatform</key>
<integer>6</integer>
<key>Platform</key>
<integer>1</integer>
<key>RamdiskOptionsPath</key>
<string>/usr/local/share/restore/options.k93.plist</string>
<key>SHA1</key>
<string>241a02bb446c21e44e8470b77e09b5fbfba7d6c4</string>
<key>BuildIdentitiesPatches</key>
<dict>
<key>UniqueBuildID</key>
<data>tmhlqSVs3hfYDCFEF1CNxG9edO8=</data>
<key>Manifest</key>
<dict>
<key>RestoreRamDisk</key>
<dict>
<key>Digest</key>
<data>soTe26MUEWqoKnxbAlm9uDrYEA4=</data>
<key>PartialDigest</key>
<data>QAAAAHhwMwEwggsDt8v7VOdjNK99c7EacJVHFA==</data>
</dict>
</dict>
</dict>
<key>RamdiskPatches</key>
<dict>
<key>asr</key>
<dict>
<key>File</key>
<string>usr/sbin/asr</string>
<key>Patch</key>
<string>asr.patch</string>
</dict>
</dict>
<key>DownloadUrl</key>
<string></string>
<key>FilesystemPatches</key>
<dict/>
<key>RootFilesystemMountVolume</key>
<string>BrightonMaps10B329.K93OS</string>
<key>FirmwarePatches</key>
<dict>
<key>iBSS</key>
<dict>
<key>File</key>
<string>Firmware/dfu/iBSS.k93ap.RELEASE.dfu</string>
<key>Key</key>
<string>6e4cce9ea6f2ec346cba0b279beab1b43e44a0680f1fde789a00f66a1e68ffab</string>
<key>Decrypt</key>
<true/>
<key>Patch</key>
<string>iBSS.k93ap.RELEASE.patch</string>
<key>IV</key>
<string>b69f753dccd09c9b98d345ec73bbf044</string>
<key>TypeFlag</key>
<integer>8</integer>
</dict>
<key>iBEC</key>
<dict>
<key>File</key>
<string>Firmware/dfu/iBEC.k93ap.RELEASE.dfu</string>
<key>Key</key>
<string>69eaeb223db61b557c36d65fa7e6e4ec1c0d7547dfce9d46077f7e5b0fcba98f</string>
<key>Decrypt</key>
<true/>
<key>Patch</key>
<string>iBEC.k93ap.RELEASE.patch</string>
<key>IV</key>
<string>3a0726b7bc091915dd928eed21478728</string>
<key>TypeFlag</key>
<integer>8</integer>
</dict>
<key>RestoreDeviceTree</key>
<dict>
<key>File</key>
<string>Firmware/all_flash/all_flash.k93ap.production/DeviceTree.k93ap.img3</string>
<key>Key</key>
<string>7c9c0c49075fd6c47e1598f23901266237e30e60dcfc7174b8c2ea6f42532bfb</string>
<key>DecryptPath</key>
<string>Downgrade/DeviceTree.k93ap.img3</string>
<key>IV</key>
<string>557d2b8116b04cf93bf7bff023ed6bf2</string>
</dict>
<key>RestoreLogo</key>
<dict>
<key>File</key>
<string>Firmware/all_flash/all_flash.k93ap.production/applelogo.s5l8940x.img3</string>
<key>Key</key>
<string>0e7aa7bbcfddc88dfe0e56e021363028502621c52c709afc3744850977e2fb9f</string>
<key>DecryptPath</key>
<string>Downgrade/applelogo@2x.s5l8940x.img3</string>
<key>IV</key>
<string>623b2592ad563ea16bd8a86af6960bcb</string>
</dict>
<key>Restore Ramdisk</key>
<dict>
<key>File</key>
<string>048-2516-005.dmg</string>
<key>Key</key>
<string>d406dc4343eedf9d6567e8303ba39a21f81f99bf701840c888963af58a84fb8f</string>
<key>Decrypt</key>
<true/>
<key>TypeFlag</key>
<integer>8</integer>
<key>IV</key>
<string>8775b711d2e09e332f8ebfbebe63cce7</string>
</dict>
<key>RestoreKernelCache</key>
<dict>
<key>File</key>
<string>kernelcache.release.k93</string>
<key>Key</key>
<string>2bbdf3fea41600cd7ae46157af7f19b1726900802f2ec2022aa60b9a27a3261f</string>
<key>DecryptPath</key>
<string>Downgrade/kernelcache.release.k93</string>
<key>TypeFlag</key>
<integer>4</integer>
<key>IV</key>
<string>247ea923c137404f4faec7da75822b08</string>
</dict>
</dict>
<key>RootFilesystemKey</key>
<string>70f5ac054bf50a522fd39071f6acbd92954804599c1507b881d7d9c4026005e3867bfab0</string>
</dict>
</plist>

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>RootFilesystem</key>
<string>048-2475-005.dmg</string>
<key>RootFilesystemSize</key>
<integer>1088</integer>
<key>Filename</key>
<string>iPad2,2_6.1.3_10B329_Restore.ipsw</string>
<key>RamdiskMountVolume</key>
<string>ramdisk</string>
<key>Name</key>
<string>iPhone2,2_6.1.3_10B329</string>
<key>SubPlatform</key>
<integer>6</integer>
<key>Platform</key>
<integer>1</integer>
<key>RamdiskOptionsPath</key>
<string>/usr/local/share/restore/options.k94.plist</string>
<key>SHA1</key>
<string>1b7897aea7b23d2e00e3d3c5c0ad2a0c47b345cd</string>
<key>BuildIdentitiesPatches</key>
<dict>
<key>UniqueBuildID</key>
<data>8iAuVn4UX8D2WcdqFQyoa+kz0FQ=</data>
<key>Manifest</key>
<dict>
<key>RestoreRamDisk</key>
<dict>
<key>Digest</key>
<data>soTe26MUEWqoKnxbAlm9uDrYEA4=</data>
<key>PartialDigest</key>
<data>QAAAAHhwMwEwggsDt8v7VOdjNK99c7EacJVHFA==</data>
</dict>
</dict>
</dict>
<key>RamdiskPatches</key>
<dict>
<key>asr</key>
<dict>
<key>File</key>
<string>usr/sbin/asr</string>
<key>Patch</key>
<string>asr.patch</string>
</dict>
</dict>
<key>DownloadUrl</key>
<string></string>
<key>FilesystemPatches</key>
<dict/>
<key>RootFilesystemMountVolume</key>
<string>BrightonMaps10B329.K94OS</string>
<key>FirmwarePatches</key>
<dict>
<key>iBSS</key>
<dict>
<key>File</key>
<string>Firmware/dfu/iBSS.k94ap.RELEASE.dfu</string>
<key>Key</key>
<string>b1bd1dc5e6076054392be054d50711ae70e8fcf31a47899fb90ab0ff3111b687</string>
<key>Decrypt</key>
<true/>
<key>Patch</key>
<string>iBSS.k94ap.RELEASE.patch</string>
<key>IV</key>
<string>bc3c9f168d7fb86aa219b7ad8039584b</string>
<key>TypeFlag</key>
<integer>8</integer>
</dict>
<key>iBEC</key>
<dict>
<key>File</key>
<string>Firmware/dfu/iBEC.k94ap.RELEASE.dfu</string>
<key>Key</key>
<string>f4b314ce6b84de8c2bcfc9e6821a657b964767253e214f44af33b141703f6606</string>
<key>Decrypt</key>
<true/>
<key>Patch</key>
<string>iBEC.k94ap.RELEASE.patch</string>
<key>IV</key>
<string>2a160d86a7cb6c976009725a9d8c009c</string>
<key>TypeFlag</key>
<integer>8</integer>
</dict>
<key>RestoreDeviceTree</key>
<dict>
<key>File</key>
<string>Firmware/all_flash/all_flash.k94ap.production/DeviceTree.k94ap.img3</string>
<key>Key</key>
<string>dbb0ade4c92ec6e561dd51f513ea0332b490f89f4a168f11efc1e9967c02847d</string>
<key>DecryptPath</key>
<string>Downgrade/DeviceTree.k94ap.img3</string>
<key>IV</key>
<string>43fdbf9046da468ecc944bb4bee19879</string>
</dict>
<key>RestoreLogo</key>
<dict>
<key>File</key>
<string>Firmware/all_flash/all_flash.k94ap.production/applelogo.s5l8940x.img3</string>
<key>Key</key>
<string>0e7aa7bbcfddc88dfe0e56e021363028502621c52c709afc3744850977e2fb9f</string>
<key>DecryptPath</key>
<string>Downgrade/applelogo@2x.s5l8940x.img3</string>
<key>IV</key>
<string>623b2592ad563ea16bd8a86af6960bcb</string>
</dict>
<key>Restore Ramdisk</key>
<dict>
<key>File</key>
<string>048-2516-005.dmg</string>
<key>Key</key>
<string>66affb95fd5f5e9b976cee5822c563dd111069746f13200c5641c500600f1426</string>
<key>Decrypt</key>
<true/>
<key>TypeFlag</key>
<integer>8</integer>
<key>IV</key>
<string>b59813148a1246ef4f4e3a5aa70ac471</string>
</dict>
<key>RestoreKernelCache</key>
<dict>
<key>File</key>
<string>kernelcache.release.k94</string>
<key>Key</key>
<string>c835455a98365c5c0dda77348109a0e88faea4e4d879a0f07a4bece7b4cc64ac</string>
<key>DecryptPath</key>
<string>Downgrade/kernelcache.release.k94</string>
<key>TypeFlag</key>
<integer>4</integer>
<key>IV</key>
<string>c3e3ba1bb5627935d508c9fdf2490eba</string>
</dict>
</dict>
<key>RootFilesystemKey</key>
<string>19703b03962ad004afeab0f80fcff0dd2e3ddca02c9f0e08bcd635884e941797c0b9dece</string>
</dict>
</plist>

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>RootFilesystem</key>
<string>048-2653-005.dmg</string>
<key>RootFilesystemSize</key>
<integer>1071</integer>
<key>Filename</key>
<string>iPad2,3_6.1.3_10B329_Restore.ipsw</string>
<key>RamdiskMountVolume</key>
<string>ramdisk</string>
<key>Name</key>
<string>iPhone2,3_6.1.3_10B329</string>
<key>SubPlatform</key>
<integer>6</integer>
<key>Platform</key>
<integer>1</integer>
<key>RamdiskOptionsPath</key>
<string>/usr/local/share/restore/options.k95.plist</string>
<key>SHA1</key>
<string>b02a4f3f5b6b948bdcd036caee71449201e72f63</string>
<key>BuildIdentitiesPatches</key>
<dict>
<key>UniqueBuildID</key>
<data>k8/0Wy73uXDFAc84NnXIXIXUnHI=</data>
<key>Manifest</key>
<dict>
<key>RestoreRamDisk</key>
<dict>
<key>Digest</key>
<data>soTe26MUEWqoKnxbAlm9uDrYEA4=</data>
<key>PartialDigest</key>
<data>QAAAAHhwMwEwggsDt8v7VOdjNK99c7EacJVHFA==</data>
</dict>
</dict>
</dict>
<key>RamdiskPatches</key>
<dict>
<key>asr</key>
<dict>
<key>File</key>
<string>usr/sbin/asr</string>
<key>Patch</key>
<string>asr.patch</string>
</dict>
</dict>
<key>DownloadUrl</key>
<string></string>
<key>FilesystemPatches</key>
<dict/>
<key>RootFilesystemMountVolume</key>
<string>BrightonMaps10B329.K95OS</string>
<key>FirmwarePatches</key>
<dict>
<key>iBSS</key>
<dict>
<key>File</key>
<string>Firmware/dfu/iBSS.k95ap.RELEASE.dfu</string>
<key>Key</key>
<string>0bb841b8f1922ae73d85ed9ed0d7a3583a10af909787857c15af2691b39bba30</string>
<key>Decrypt</key>
<true/>
<key>Patch</key>
<string>iBSS.k95ap.RELEASE.patch</string>
<key>IV</key>
<string>56f964ee19bfd31f06e43e9d8fe93902</string>
<key>TypeFlag</key>
<integer>8</integer>
</dict>
<key>iBEC</key>
<dict>
<key>File</key>
<string>Firmware/dfu/iBEC.k95ap.RELEASE.dfu</string>
<key>Key</key>
<string>12805eb0cabe89539cfecbf886b0638a6fe941976ef9afe8bf3dc838139357ba</string>
<key>Decrypt</key>
<true/>
<key>Patch</key>
<string>iBEC.k95ap.RELEASE.patch</string>
<key>IV</key>
<string>5aeb8eb73be0c634f9fa2a4eae791438</string>
<key>TypeFlag</key>
<integer>8</integer>
</dict>
<key>RestoreDeviceTree</key>
<dict>
<key>File</key>
<string>Firmware/all_flash/all_flash.k95ap.production/DeviceTree.k95ap.img3</string>
<key>Key</key>
<string>8debb89e1457cc695e10891312bdbfbb4d5f40f7eaa6913dfe7dc61be6d9e5c7</string>
<key>DecryptPath</key>
<string>Downgrade/DeviceTree.k95ap.img3</string>
<key>IV</key>
<string>e28736e5e1a7c3fd31021398ed65af62</string>
</dict>
<key>RestoreLogo</key>
<dict>
<key>File</key>
<string>Firmware/all_flash/all_flash.k95ap.production/applelogo.s5l8940x.img3</string>
<key>Key</key>
<string>0e7aa7bbcfddc88dfe0e56e021363028502621c52c709afc3744850977e2fb9f</string>
<key>DecryptPath</key>
<string>Downgrade/applelogo@2x.s5l8940x.img3</string>
<key>IV</key>
<string>623b2592ad563ea16bd8a86af6960bcb</string>
</dict>
<key>Restore Ramdisk</key>
<dict>
<key>File</key>
<string>048-2516-005.dmg</string>
<key>Key</key>
<string>fd1188246393949c4ae81c302221019a2699dba6185cb1460e39ee80f1c7424a</string>
<key>Decrypt</key>
<true/>
<key>TypeFlag</key>
<integer>8</integer>
<key>IV</key>
<string>4edaee1b65d86a5f9a16c3ef09b262bf</string>
</dict>
<key>RestoreKernelCache</key>
<dict>
<key>File</key>
<string>kernelcache.release.k95</string>
<key>Key</key>
<string>0e2f5fa117fa62535dc18ee0526137d6e73b4fc69edec9d99f1528f2a632fc83</string>
<key>DecryptPath</key>
<string>Downgrade/kernelcache.release.k95</string>
<key>TypeFlag</key>
<integer>4</integer>
<key>IV</key>
<string>0cc133db4539b82dee5849d6abbcc467</string>
</dict>
</dict>
<key>RootFilesystemKey</key>
<string>b51815b65f7e572ad0cc1238bf799edb558b602b0ee390a76cd874d714b7daf10205b195</string>
</dict>
</plist>

View File

@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>RootFilesystem</key>
<string>048-2613-005.dmg</string>
<key>RootFilesystemSize</key>
<integer>1220</integer>
<key>Filename</key>
<string>iPhone4,1_6.1.3_10B329_Restore.ipsw</string>
<key>RamdiskMountVolume</key>
<string>ramdisk</string>
<key>Name</key>
<string>iPhone4,1_6.1.3_10B329</string>
<key>SubPlatform</key>
<integer>6</integer>
<key>Platform</key>
<integer>1</integer>
<key>RamdiskOptionsPath</key>
<string>/usr/local/share/restore/options.n94.plist</string>
<key>SHA1</key>
<string>7a62ee60b574301a6aafc48dcc9cccf0894ffb27</string>
<key>BuildIdentitiesPatches</key>
<dict>
<key>UniqueBuildID</key>
<data>3Usl6yRx4qezMq1vuVZf69RDnU8=</data>
<key>Manifest</key>
<dict>
<key>RestoreRamDisk</key>
<dict>
<key>Digest</key>
<data>soTe26MUEWqoKnxbAlm9uDrYEA4=</data>
<key>PartialDigest</key>
<data>QAAAAHhwMwEwggsDt8v7VOdjNK99c7EacJVHFA==</data>
</dict>
</dict>
</dict>
<key>RamdiskPatches</key>
<dict>
<key>asr</key>
<dict>
<key>File</key>
<string>usr/sbin/asr</string>
<key>Patch</key>
<string>asr.patch</string>
</dict>
</dict>
<key>DownloadUrl</key>
<string></string>
<key>FilesystemPatches</key>
<dict/>
<key>RootFilesystemMountVolume</key>
<string>BrightonMaps10B329.N94OS</string>
<key>UniqueBuildID</key>
<data>3Usl6yRx4qezMq1vuVZf69RDnU8=</data>
<key>FirmwarePatches</key>
<dict>
<key>iBSS</key>
<dict>
<key>File</key>
<string>Firmware/dfu/iBSS.n94ap.RELEASE.dfu</string>
<key>Key</key>
<string>35343d5139e0313c81ee59dbae292da26e739ed75b3da5db9da7d4d26046498c</string>
<key>Decrypt</key>
<true/>
<key>Patch</key>
<string>iBSS.n94ap.RELEASE.patch</string>
<key>IV</key>
<string>d3fe01e99bd0967e80dccfc0739f93d5</string>
<key>TypeFlag</key>
<integer>8</integer>
</dict>
<key>iBEC</key>
<dict>
<key>File</key>
<string>Firmware/dfu/iBEC.n94ap.RELEASE.dfu</string>
<key>Key</key>
<string>aba0d7f3e2d40d2a0039a36086c469e25e1eafb2fee2f50e36a3e5f7cd4d89c9</string>
<key>Decrypt</key>
<true/>
<key>Patch</key>
<string>iBEC.n94ap.RELEASE.patch</string>
<key>IV</key>
<string>1f12075441b7f193c5967c51ede025bf</string>
<key>TypeFlag</key>
<integer>8</integer>
</dict>
<key>RestoreDeviceTree</key>
<dict>
<key>File</key>
<string>Firmware/all_flash/all_flash.n94ap.production/DeviceTree.n94ap.img3</string>
<key>Key</key>
<string>bd500bdc2a66aba636311037b9bd2b6ab3bd7374542352225d5be0c23998dd84</string>
<key>DecryptPath</key>
<string>Downgrade/DeviceTree.n94ap.img3</string>
<key>IV</key>
<string>fabb698a3b2e845d7ad6849fbc067870</string>
</dict>
<key>RestoreLogo</key>
<dict>
<key>File</key>
<string>Firmware/all_flash/all_flash.n94ap.production/applelogo@2x.s5l8940x.img3</string>
<key>Key</key>
<string>e7e9b79f5e6e81ff6d6bf81bf272af56e6ab0f1c691088eff2aca5b1ee31455e</string>
<key>DecryptPath</key>
<string>Downgrade/applelogo@2x.s5l8940x.img3</string>
<key>IV</key>
<string>09678f1312084547b5bedce677e6a828</string>
</dict>
<key>Restore Ramdisk</key>
<dict>
<key>File</key>
<string>048-2516-005.dmg</string>
<key>Key</key>
<string>1d8da07783a6f53efbb47657c352b305f0856697c6c824a9132ea0effe1a92a9</string>
<key>Decrypt</key>
<true/>
<key>TypeFlag</key>
<integer>8</integer>
<key>IV</key>
<string>d30fa37b6ed56715121337a5fc039801</string>
</dict>
<key>RestoreKernelCache</key>
<dict>
<key>File</key>
<string>kernelcache.release.n94</string>
<key>Key</key>
<string>a374109c958957200f879f7b6ef34437fbde1a9f178b7c2412755cf9a3ed2d72</string>
<key>DecryptPath</key>
<string>Downgrade/kernelcache.release.n94</string>
<key>TypeFlag</key>
<integer>4</integer>
<key>IV</key>
<string>8a2c03ef8a0e45947780cdde01be40fb</string>
</dict>
</dict>
<key>RootFilesystemKey</key>
<string>d4685a3c01a0b6f762350191d98b8964d4c7af349aa84bacef828be9683514ccf44a8426</string>
</dict>
</plist>

Binary file not shown.

Binary file not shown.

BIN
resources/tools/ipsw_linux Executable file

Binary file not shown.

BIN
resources/tools/ipsw_macos Executable file

Binary file not shown.

View File

@ -42,9 +42,11 @@ function Main {
bspatch="bspatch"
ideviceenterrecovery="ideviceenterrecovery"
ideviceinfo="ideviceinfo"
idevicerestore="sudo LD_LIBRARY_PATH=resources/lib resources/tools/idevicerestore_linux"
iproxy="iproxy"
ipsw="env LD_LIBRARY_PATH=lib tools/ipsw_$platform"
irecovery="env LD_LIBRARY_PATH=resources/lib resources/libirecovery/bin/irecovery"
pwnedDFU="sudo LD_LIBRARY_PATH=resources/lib resources/tools/pwnedDFU_$platform"
pwnedDFU="sudo LD_LIBRARY_PATH=resources/lib resources/tools/pwnedDFU_linux"
python="python2"
futurerestore1="sudo LD_PRELOAD=resources/lib/libcurl.so.3 LD_LIBRARY_PATH=resources/lib resources/tools/futurerestore1_linux"
futurerestore2="sudo LD_LIBRARY_PATH=resources/lib resources/tools/futurerestore2_linux"
@ -56,7 +58,9 @@ function Main {
bspatch="resources/tools/bspatch_$platform"
ideviceenterrecovery="resources/libimobiledevice_$platform/ideviceenterrecovery"
ideviceinfo="resources/libimobiledevice_$platform/ideviceinfo"
idevicerestore="resources/tools/idevicerestore_$platform"
iproxy="resources/libimobiledevice_$platform/iproxy"
ipsw="tools/ipsw_$platform"
irecovery="resources/libimobiledevice_$platform/irecovery"
pwnedDFU="resources/tools/pwnedDFU_$platform"
python="python"
@ -170,7 +174,7 @@ function SelectVersion {
fi
if [ $ProductType == iPad2,1 ] || [ $ProductType == iPad2,2 ] ||
[ $ProductType == iPad2,3 ] || [ $ProductType == iPhone4,1 ]; then
Selection+=("iOS 6.1.3")
Selection+=("iOS 6.1.3 (Jailbreak)" "iOS 6.1.3")
fi
[[ $Mode == 'Downgrade' ]] && Selection+=("Other")
Selection+=("(Any other key to exit)")
@ -178,6 +182,7 @@ function SelectVersion {
select opt in "${Selection[@]}"; do
case $opt in
"iOS 8.4.1" ) OSVer='8.4.1'; BuildVer='12H321'; break;;
"iOS 6.1.3 (Jailbreak)" ) OSVer='6.1.3'; BuildVer='10B329'; A5Jailbreak=1; break;;
"iOS 6.1.3" ) OSVer='6.1.3'; BuildVer='10B329'; break;;
"Other" ) OSVer='Other'; break;;
*) exit;;
@ -383,6 +388,34 @@ function Downgrade {
[ ! $DFUManual ] && kDFU
if [[ $A5Jailbreak == 1 ]]; then
JBFiles=(Cydia6.tar fstab_rw.tar p0sixspwn.tar)
JBSHA1=(1d5a351016d2546aa9558bc86ce39186054dc281
887f82cb601116ee78ad752eca7007128b6b38d3
6b003d3baddbafed2b468ba11328374d2dab276b)
JBLink=https://github.com/LukeZGD/iOS-OTA-Downgrader-Keys/releases/download/jailbreak
if [[ ! $(ls resources/jailbreak) ]]; then
cd tmp
Log "Downloading jailbreak files..."
for i in {0..2}; do
SaveFile $JBLink/jailbreak/${JBFiles[$i]} ${JBFiles[$i]} ${JBSHA1[$i]}
done
mkdir ../resources/jailbreak
cp ${JBFiles[@]} ../resources/jailbreak
cd ..
fi
for i in {0..2}; do
JBFiles[$i]=jailbreak/${JBFiles[$i]}
done
if [ ! -e $IPSWCustom.ipsw ]; then
Log "Preparing custom IPSW..."
cd resources
$ipsw ../$IPSW.ipsw ../$IPSWCustom.ipsw -memory -bbupdate -s 1260 ${JBFiles[@]}
cd ..
fi
IPSW=$IPSWCustom
fi
Log "Extracting IPSW..."
unzip -q $IPSW.ipsw -d $IPSW/
@ -429,12 +462,20 @@ function Downgrade {
SaveOTABlobs
fi
Log "Preparing for futurerestore... (Enter root password of your PC/Mac when prompted)"
cd resources
sudo bash -c "$python -m SimpleHTTPServer 80 &"
cd ..
if [[ -z $A5Jailbreak ]] && [[ -z $A7Device ]]; then
Log "Preparing for futurerestore... (Enter root password of your PC/Mac when prompted)"
cd resources
sudo bash -c "$python -m SimpleHTTPServer 80 &"
cd ..
fi
if [ $Baseband == 0 ]; then
if [[ $A5Jailbreak == 1 ]]; then
Log "Proceeding to idevicerestore..."
mkdir shsh
mv $SHSH shsh/${UniqueChipID}-${ProductType}-${OSVer}.shsh
$idevicerestore -y -e -w $IPSW.ipsw
rm -rf shsh
elif [ $Baseband == 0 ]; then
Log "Device $ProductType has no baseband"
Log "Proceeding to futurerestore..."
if [[ $A7Device == 1 ]]; then
@ -476,9 +517,11 @@ function Downgrade {
fi
echo
Log "futurerestore done!"
Log "Stopping local server... (Enter root password of your PC/Mac when prompted)"
ps aux | awk '/python/ {print "sudo kill -9 "$2" 2>/dev/null"}' | bash
Log "Restoring done!"
if [[ -z $A5Jailbreak ]] && [[ -z $A7Device ]]; then
Log "Stopping local server... (Enter root password of your PC/Mac when prompted)"
ps aux | awk '/python/ {print "sudo kill -9 "$2" 2>/dev/null"}' | bash
fi
Log "Downgrade script done!"
}