Operation confirmed with OS X 10.10.5 and MacOS 10.13.5
Please secure about 10 GB of free space.
*Support for untethered downgrade to iOS 5.1.1-7.1.1 (without shsh)
*Support for untethered jailbreak to iOS 7.0-7.1.1
**Apple File Connection v2 is not included in iOS 7.1.x Jailbreak.
**So, please install from Cydia.
!!Jailbreaks below iOS 6 have been deleted. You can untethered jailbreak by install untether from Cydia after tethered jailbreak by redsn0w.
(1) Download IPSW
ipsw download (https://ipsw.me)
Prepare firmware you want to downgrade and "iPhone3,1_7.1.2_11D257_Restore.ipsw" and put it in s0meiyoshino.
(1) Install packages
./install.sh
(2) make ipsw
./make_ipsw.sh
Firmware will be created.
Since choices are displayed, please select as necessary.
(3) Restore iPhone 4
First, put in device DFU mode.
Then, execute the following.
./restore.sh
This method adds "boot-partition=2" to the nvram variable.
Even if you restore it with OFW in iTunes, it will be in recovery mode as it is.
It can be deleted in the following way.
(1) Jailbreak
(2) exec command "nvram -d boot-partition"
(3) reboot and restore
If you have already restored and you are in Recovery Mode
(1) Booting SSH ramdisk
(2) exec command "nvram -d boot-partition"
(3) reboot and restore
or
(1) Downgrade (Untethered or Tethered) iOS 6
(2) Jailbreak and tethered boot by redsn0w
(3) exec command "nvram -d boot-partition"
(4) reboot and restore
@danzatt for ios-dualboot(hfs_resize etc.)
Roderick W. Smith - for gptfdisk
@iH8sn0w for iBoot32Patcher
@tihmstar for Improvement of iBoot32Patcher
@nyan_satan for Improvement of iBoot32Patcher
@ShadowLee19 for iBoot patch
@JonathanSeals for many tips
@Benfxmth for many tips
@winocm for opensn0w jailbreak patch
@daytonhasty for Odysseus
@libimobiledev for idevicerestore
@planetbeing for xpwn
@axi0mX for ipwndfu
@posixninja and @pod2g for SHAtter exploit
Your tool needs to display my tool as credit and link.