Skip to content

Instantly share code, notes, and snippets.

@mineek

mineek/GUIDE.md Secret

Created February 19, 2024 19:16
Show Gist options
  • Save mineek/bd8d0e002ce67e82831a23a8d7eceb3c to your computer and use it in GitHub Desktop.
Save mineek/bd8d0e002ce67e82831a23a8d7eceb3c to your computer and use it in GitHub Desktop.
Downgrade from 16.7.x to 16.6.1 on checkm8-able devices.

Guide on how to downgrade from 16.7.x to 16.6.1 on checkm8-able devices.

Introduction

This guide will show you how to downgrade from 16.7.x to 16.6.1 on checkm8-able devices. This guide is for educational purposes only. I am not responsible for any damage caused to your device. Also, this guide can only be followed on a macOS device, although Linux should work, I have not tested it.

You will also lose ALL data on your device, so make sure to back up your important data before following this guide. ( You cannot just backup and restore afaik with iCloud!! )

You will also need blobs for 16.6.1. If you don't know what blobs are, you probably don't have them.

And finally, this guide is not meant to be copy-pasted into a terminal, you should read it and understand at least a few times before attempting to follow it.

Steps

The steps are as follows:

  1. Download a 16.6.1 IPSW for your device. ( I don't think I need to explain this. )
  2. Compiling futurerestore 'dev' branch.
  3. Compiling gaster
  4. Exploiting checkm8 and setting nonce
  5. Restoring to 16.6.1

Step 1.

You can use ipsw.me to download the 16.6.1 IPSW for your device.

Step 2.

You will need to compile futurerestore from the 'dev' branch, let's start by making a new directory and cloning the futurerestore repository.

mkdir ios-downgrade
cd ios-downgrade
git clone https://github.com/futurerestore/futurerestore.git --branch dev --recursive
cd futurerestore

Now, we need to download the dep-root for our macOS device, go to Cryptic's CDN, click the architecture of your device ( either x86_64 or arm64 ), and download the macOS_arm64_Release_Latest.tar.zst file. Once downloaded, extract it.

cp /path/to/downloaded/file.tar.zst .
zstd -d file.tar.zst
cd dep_root
tar -xvf ../file.tar
cd ..

Finally, we can compile futurerestore. ( Change ARCH if necesarry. )

RELEASE=1 ./build.sh -DARCH=x86_64 -DNO_PKGCFG=1

Check that you have a futurerestore binary at cmake-build-release/src.

Step 3.

We will need to compile gaster, which is a tool that will allow us to exploit checkm8 easily. Let's start by cloning the gaster repository.

git clone --recursive https://github.com/0x7ff/gaster.git
cd gaster

Compiling gaster is really simple, just run make. ( If on linux, run make libusb )

make

Check that you have a gaster binary in the current directory.

Step 4.

Now, we will need to exploit checkm8 and set our nonce. First, we need to put our device into DFU mode. You can use palera1n -D as a DFU helper.

Once in DFU mode, we can exploit checkm8 and set our nonce.

./gaster pwn
./gaster reset

Go back to where you have your futurerestore binary and run the following command to set your nonce.

./futurerestore -t /path/to/blob.shsh2 -0 -1 -3 -7 /path/to/16.6.1.ipsw

IMPORTANT: If futurerestore gets stuck with Waiting for device to reconnect / disconnect, you can safely unplug and replug the device. But only if it gets stuck here. Also, futurerestore may give a error that it failed to set nonce, in my experience, it actually did work. So just try to follow the rest of the guide.

Step 5.

Force Reboot your device back into recovery by using the button combination for your device, then what I usually do is palera1n -D and then exiting palera1n before actually entering DFU. This will place us into recovery mode.

Finally, we can restore to 16.6.1.

./futurerestore -t /path/to/blob.shsh2 -0 -1 /path/to/16.6.1.ipsw

If everything went well, your device should now be restoring to 16.6.1, give it some time, and you should be good to go. If anything goes wrong, you can always try the process again, but I probably won't help you.

@AhmedIesam213
Copy link

@AhmedIesam213
Copy link

@m1337v
Copy link

m1337v commented Feb 29, 2024

If you use an iPad Pro (wifi) you may run into this error:

Getting firmware keys for: j98aap
Failed to connect to api.m1sta.xyz, retrying with localhost!
Failed to connect to localhost:8888, retrying with ipsw.me!
Failed to connect to ipsw.me!
Cleaning up...
[exception]:
what=getting keys failed with error: 15204367 (failed to get FirmwareJson from api.m1sta.xyz, localhost, and ipsw.me servers!). Are keys publicly available?
code=43057222

To fix it you can set the nonce with Taurine or Trollnonce and continue with step 5

and then restore with: (if iPad is Wifi, otherwise use -0 -1)

./futurerestore -t /path/to/blob.shsh2 -0 -2 /path/to/16.6.1.ipsw

@AlteredCabr0n
Copy link

I keep getting this fatal error 'plist_plist.h' file not found error when compiling the build of Futurerestore
Failed to build futurerestore! - fatal error 'plist_plist h' file not found

@xxhhlk
Copy link

xxhhlk commented Mar 12, 2024

I successfully downgraded on Ubuntu 22.04 LTS! I wasn't able to compile futurerestore, so I used one compiled by GitHub Action, and it worked smoothly. Also, my blobs for 16.6.1 were corrupted, but according to a certain chart, the latest SEP/BB is also compatible with 16.6. Therefore, I ended up using blobs for 16.6 and successfully downgraded.

@frankpanduh
Copy link

Does this work with nightly builds?
Looks like the dev branch was removed.

@bewl87
Copy link

bewl87 commented Apr 3, 2024

i've successfully managed to downgrade ipad pro 9.7" cellular to 16.6.1, got the failed to get firmwarejson error following this guide and had to set nonce manually using dimentio + newterm on device. glad i came here and saw the comment from M1337v 👏

@AlteredCabr0n
Copy link

I successfully downgraded on Ubuntu 22.04 LTS! I wasn't able to compile futurerestore, so I used one compiled by GitHub Action, and it worked smoothly. Also, my blobs for 16.6.1 were corrupted, but according to a certain chart, the latest SEP/BB is also compatible with 16.6. Therefore, I ended up using blobs for 16.6 and successfully downgraded.

@xxhhlk How did you check your blobs were corrupted?

@xxhhlk
Copy link

xxhhlk commented Apr 10, 2024

@xxhhlk How did you check your blobs were corrupted?

Because the file size is 0 bytes. : )

@bewl87
Copy link

bewl87 commented Apr 10, 2024

I successfully downgraded on Ubuntu 22.04 LTS! I wasn't able to compile futurerestore, so I used one compiled by GitHub Action, and it worked smoothly. Also, my blobs for 16.6.1 were corrupted, but according to a certain chart, the latest SEP/BB is also compatible with 16.6. Therefore, I ended up using blobs for 16.6 and successfully downgraded.

@xxhhlk How did you check your blobs were corrupted?

blobs can be checked here https://tsssaver.1conan.com/check/

@meykez
Copy link

meykez commented Jun 30, 2024

What would be the steps if you were to go from 14.xx to 16.6.1 ?

@m1337v
Copy link

m1337v commented Jul 1, 2024

@meykez The steps are the same, but you have to use Taurine or Unc0ver to set the nonce instead of step 3-4. I restored 2 iOS 14 devices like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment