Fixed powdersn0w for 5C 7.0.x (thanks to @m1zole)

This commit is contained in:
LukeZGD 2024-03-24 08:53:27 +08:00
parent 0e43cc1202
commit f872fd7a3b
4 changed files with 18 additions and 20 deletions

View File

@ -93,7 +93,7 @@
- iPod touch 3 - iOS 4.0 to 5.1
- Using powdersn0w requires iOS 7.1.x blobs for your device
- No blob requirement for iPhone 4, iPad 1, iPod touch 3 (7.1.2 and 5.1.1 are signed)
- For iPhone 5, both 7.0.x and 7.1.x blobs can be used
- For iPhone 5 and 5C, both 7.0.x and 7.1.x blobs can be used
- Restoring to other unsigned versions without blobs is supported on the following devices and target versions:
- iPhone 3GS - iOS 3.0 to 6.1.3 (all versions)
- iPod touch 2 - iOS 2.1.1 to 4.1 (all versions)
@ -117,8 +117,9 @@
- bspatch
- [powdersn0w_pub](https://github.com/dora2-iOS/powdersn0w_pub) - dora2ios; [LukeZGD fork](https://github.com/LukeZGD/powdersn0w_pub)
- [Most of the exploit ramdisks used are from kok3shidoll's repo](https://github.com/kok3shidoll/untitled)
- [5C 7.0.x exploit ramdisk is from Ralph0045's iloader repo](https://github.com/Ralph0045/iloader)
- [iPad 1 exploit ramdisk is from Ralph0045's iBoot-5-Stuff repo](https://github.com/Ralph0045/iBoot-5-Stuff)
- [iPhone 5C 7.0.x exploit ramdisk is from m1zole](https://github.com/m1zole/untitled_pub)
- [Other iPhone 5/5C ramdisks are from Ralph0045's iloader repo](https://github.com/Ralph0045/iloader)
- [iPad 1 exploit ramdisk is from Ralph0045](https://github.com/Ralph0045/iBoot-5-Stuff)
- [ipwndfu](https://github.com/LukeZGD/ipwndfu) - axi0mX, Linus Henze, synackuk; LukeZGD fork
- [ipwnder_lite](https://github.com/dora2-iOS/ipwnder_lite/tree/7265a06d184e433989db640d5e83ea58d5862609) - dora2ios (used on macOS)
- [iPwnder32](https://github.com/dora2-iOS/iPwnder32/tree/243ea5c6d1bd15f8bdd0b3a1ff4a7729bc14bac4) - dora2ios (old version with libusb used on Linux)

View File

@ -53,38 +53,32 @@ System_LastSector="$((echo -e "i\n1\nq") | gptfdisk /dev/rdisk0s1 2>/dev/null |
Data_LastSector="$((echo -e "i\n2\nq") | gptfdisk /dev/rdisk0s1 2>/dev/null | sed -n -e 's/^.*Last sector: //p' | sed 's/ .*//')"
Data_Attributeflags="$((echo -e "i\n2\nq") | gptfdisk /dev/rdisk0s1 2>/dev/null | sed -n -e 's/^.*flags: //p')"
Exploit_LastSector="$((524288/$LogicalSector))"
BOOTLOADER="$((8388608/$LogicalSector))"
NOTSD="$(($Exploit_LastSector+$BOOTLOADER))"
Data_LastSectorSD="$(($Data_LastSector-$BOOTLOADER))"
New_Data_LastSector="$(($Data_LastSector-$NOTSD))"
New_Data_LastSector="$(($Data_LastSector-$Exploit_LastSector))"
New_Data_SectorSize="$(($New_Data_LastSector-$System_LastSector))"
New_Data_Size="$(($New_Data_SectorSize*$LogicalSector))"
hfs_resize /mnt1/private/var $New_Data_Size
sleep 1s
echo -e "d\n2\nn\n\n$New_Data_LastSector\n\nc\n2\nData\nx\na\n2\n48\n49\n\nc\n2\n$Data_GUID\ns\n4\nm\nn\n3\n\n$Data_LastSectorSD\n\nn\n4\n\n$Data_LastSector\n\nw\nY\n" | gptfdisk /dev/rdisk0s1
sleep 1s
if [ "$Data_Attributeflags" = "0001000000000000" ]; then
echo -e "d\n2\nn\n\n$New_Data_LastSector\n\nc\n2\nData\nx\na\n2\n48\n\nc\n2\n$Data_GUID\ns\n4\nm\nn\n3\n\n$Data_LastSector\n\nw\nY\n" | gptfdisk /dev/rdisk0s1
else
echo -e "d\n2\nn\n\n$New_Data_LastSector\n\nc\n2\nData\nx\na\n2\n48\n49\n\nc\n2\n$Data_GUID\ns\n4\nm\nn\n3\n\n$Data_LastSector\n\nw\nY\n" | gptfdisk /dev/rdisk0s1
fi
sleep 1s
newfs_hfs -s -v exploit /dev/rdisk0s1s3
newfs_hfs -s -v bootloader /dev/rdisk0s1s4
sleep 1s
fsck_hfs -f /dev/rdisk0s1s3
fsck_hfs -f /dev/rdisk0s1s4
sleep 2s
dd of=/dev/rdisk0s1s3 if=/exploit bs=512k count=1
sleep 1s
mount_hfs /dev/disk0s1s4 /mnt2
nvram -c
nvram boot-partition=2
nvram boot-ramdisk="/a/b/c/d/e/f/g/h/i/j/k/l/m/disk.dmg"
sleep 1s
dd of=/mnt2/iBEC if=/mnt1/iBoot bs=512k
rm /mnt1/iBoot
sleep 1s
reboot_

View File

@ -3373,7 +3373,10 @@ ipsw_prepare_powder() {
[789]* ) :;;
* ) ExtraArr+=("--logo");;
esac
if [[ $device_type == "iPhone5"* ]]; then
if [[ $device_type == "iPhone5,3" || $device_type == "iPhone5,4" ]] && [[ $device_base_vers == "7.0"* ]]; then
ipsw_powder_5c70=1
fi
if [[ $device_type == "iPhone5"* && $ipsw_powder_5c70 != 1 ]]; then
# do this stuff because these use ramdiskH (jump to /boot/iBEC) instead of jump ibot to ibob
if [[ $device_target_vers == "9"* ]]; then
ExtraArr[0]+="9"
@ -3412,7 +3415,7 @@ ipsw_prepare_powder() {
"* You may try selecting N for memory option"
fi
if [[ $device_type != "iPhone5"* && $device_type != "iPad1,1" ]]; then
if [[ $device_type != "iPhone5"* && $device_type != "iPad1,1" ]] || [[ $ipsw_powder_5c70 == 1 ]]; then
case $device_target_vers in
[789]* ) :;;
* )
@ -5607,7 +5610,7 @@ menu_ipsw() {
local text2="(iOS 7.1.x)"
case $device_type in
iPhone3,[13] ) text2="(iOS 7.1.2)";;
iPhone5,[12] ) text2="(iOS 7.x)";;
iPhone5,[1234] ) text2="(iOS 7.x)";;
iPad3,[456] ) text2="(iOS 7.0.x)";;
iPad1,1 | iPod3,1 ) text2="(iOS 5.1.1)";;
esac
@ -5904,7 +5907,7 @@ menu_ipsw_browse() {
local check_vers="7.1"
local base_vers="7.1.x"
case $device_type in
iPhone5,[12] )
iPhone5,[1234] )
check_vers="7"
base_vers="7.x"
;;