From eccd54fc1ddf35101c9ea049affccb853c969bd6 Mon Sep 17 00:00:00 2001 From: Jay Freeman Date: Thu, 14 Feb 2008 11:05:22 +0000 Subject: Checkpointing iPhone 1.1.3 software upgrade before removal. git-svn-id: http://svn.telesphoreo.org/trunk@77 514c082c-b64e-11dc-b46d-3d985efe055d --- data/iphone-113su/_metadata/bash.dep | 1 + data/iphone-113su/_metadata/coreutils.dep | 1 + data/iphone-113su/_metadata/description | 1 + data/iphone-113su/_metadata/diskdev-cmds.dep | 1 + data/iphone-113su/_metadata/dmg2img.dep | 1 + data/iphone-113su/_metadata/findutils.dep | 1 + data/iphone-113su/_metadata/ipatcher.dep | 1 + data/iphone-113su/_metadata/license | 1 + data/iphone-113su/_metadata/maintainer | 1 + data/iphone-113su/_metadata/name | 1 + data/iphone-113su/_metadata/patch.dep | 1 + data/iphone-113su/_metadata/priority | 1 + data/iphone-113su/_metadata/rsync.dep | 1 + data/iphone-113su/_metadata/section | 1 + data/iphone-113su/_metadata/shell-cmds.dep | 1 + data/iphone-113su/_metadata/unzip.dep | 1 + data/iphone-113su/_metadata/version | 1 + data/iphone-113su/_metadata/vfdecrypt.dep | 1 + data/iphone-113su/_metadata/wget.dep | 1 + data/iphone-113su/ipatcher.dep | 1 + data/iphone-113su/iphone-113su | 195 +++++++++++++++++++++++++++ data/iphone-113su/make.sh | 2 + 22 files changed, 217 insertions(+) create mode 120000 data/iphone-113su/_metadata/bash.dep create mode 120000 data/iphone-113su/_metadata/coreutils.dep create mode 100644 data/iphone-113su/_metadata/description create mode 120000 data/iphone-113su/_metadata/diskdev-cmds.dep create mode 120000 data/iphone-113su/_metadata/dmg2img.dep create mode 120000 data/iphone-113su/_metadata/findutils.dep create mode 120000 data/iphone-113su/_metadata/ipatcher.dep create mode 120000 data/iphone-113su/_metadata/license create mode 120000 data/iphone-113su/_metadata/maintainer create mode 100644 data/iphone-113su/_metadata/name create mode 120000 data/iphone-113su/_metadata/patch.dep create mode 100644 data/iphone-113su/_metadata/priority create mode 120000 data/iphone-113su/_metadata/rsync.dep create mode 100644 data/iphone-113su/_metadata/section create mode 120000 data/iphone-113su/_metadata/shell-cmds.dep create mode 120000 data/iphone-113su/_metadata/unzip.dep create mode 100644 data/iphone-113su/_metadata/version create mode 120000 data/iphone-113su/_metadata/vfdecrypt.dep create mode 120000 data/iphone-113su/_metadata/wget.dep create mode 120000 data/iphone-113su/ipatcher.dep create mode 100755 data/iphone-113su/iphone-113su create mode 100644 data/iphone-113su/make.sh (limited to 'data') diff --git a/data/iphone-113su/_metadata/bash.dep b/data/iphone-113su/_metadata/bash.dep new file mode 120000 index 000000000..d0c818fb6 --- /dev/null +++ b/data/iphone-113su/_metadata/bash.dep @@ -0,0 +1 @@ +../../bash \ No newline at end of file diff --git a/data/iphone-113su/_metadata/coreutils.dep b/data/iphone-113su/_metadata/coreutils.dep new file mode 120000 index 000000000..5bd43c1eb --- /dev/null +++ b/data/iphone-113su/_metadata/coreutils.dep @@ -0,0 +1 @@ +../../coreutils \ No newline at end of file diff --git a/data/iphone-113su/_metadata/description b/data/iphone-113su/_metadata/description new file mode 100644 index 000000000..7e2b45a98 --- /dev/null +++ b/data/iphone-113su/_metadata/description @@ -0,0 +1 @@ +upgrades your device to firmware 1.1.3 diff --git a/data/iphone-113su/_metadata/diskdev-cmds.dep b/data/iphone-113su/_metadata/diskdev-cmds.dep new file mode 120000 index 000000000..920b76969 --- /dev/null +++ b/data/iphone-113su/_metadata/diskdev-cmds.dep @@ -0,0 +1 @@ +../../diskdev-cmds \ No newline at end of file diff --git a/data/iphone-113su/_metadata/dmg2img.dep b/data/iphone-113su/_metadata/dmg2img.dep new file mode 120000 index 000000000..a3dbbf1bd --- /dev/null +++ b/data/iphone-113su/_metadata/dmg2img.dep @@ -0,0 +1 @@ +../../dmg2img \ No newline at end of file diff --git a/data/iphone-113su/_metadata/findutils.dep b/data/iphone-113su/_metadata/findutils.dep new file mode 120000 index 000000000..0cf65ba21 --- /dev/null +++ b/data/iphone-113su/_metadata/findutils.dep @@ -0,0 +1 @@ +../../findutils \ No newline at end of file diff --git a/data/iphone-113su/_metadata/ipatcher.dep b/data/iphone-113su/_metadata/ipatcher.dep new file mode 120000 index 000000000..3120a7ea1 --- /dev/null +++ b/data/iphone-113su/_metadata/ipatcher.dep @@ -0,0 +1 @@ +../../ipatcher \ No newline at end of file diff --git a/data/iphone-113su/_metadata/license b/data/iphone-113su/_metadata/license new file mode 120000 index 000000000..b9c4e3684 --- /dev/null +++ b/data/iphone-113su/_metadata/license @@ -0,0 +1 @@ +../../../licenses/menes \ No newline at end of file diff --git a/data/iphone-113su/_metadata/maintainer b/data/iphone-113su/_metadata/maintainer new file mode 120000 index 000000000..0fa66e077 --- /dev/null +++ b/data/iphone-113su/_metadata/maintainer @@ -0,0 +1 @@ +../../../people/saurik \ No newline at end of file diff --git a/data/iphone-113su/_metadata/name b/data/iphone-113su/_metadata/name new file mode 100644 index 000000000..3935b767d --- /dev/null +++ b/data/iphone-113su/_metadata/name @@ -0,0 +1 @@ +iPhone 1.1.2->1.1.3 diff --git a/data/iphone-113su/_metadata/patch.dep b/data/iphone-113su/_metadata/patch.dep new file mode 120000 index 000000000..f2466d659 --- /dev/null +++ b/data/iphone-113su/_metadata/patch.dep @@ -0,0 +1 @@ +../../patch \ No newline at end of file diff --git a/data/iphone-113su/_metadata/priority b/data/iphone-113su/_metadata/priority new file mode 100644 index 000000000..134d9bc32 --- /dev/null +++ b/data/iphone-113su/_metadata/priority @@ -0,0 +1 @@ +optional diff --git a/data/iphone-113su/_metadata/rsync.dep b/data/iphone-113su/_metadata/rsync.dep new file mode 120000 index 000000000..a442e1b3e --- /dev/null +++ b/data/iphone-113su/_metadata/rsync.dep @@ -0,0 +1 @@ +../../rsync \ No newline at end of file diff --git a/data/iphone-113su/_metadata/section b/data/iphone-113su/_metadata/section new file mode 100644 index 000000000..7fbe952b7 --- /dev/null +++ b/data/iphone-113su/_metadata/section @@ -0,0 +1 @@ +admin diff --git a/data/iphone-113su/_metadata/shell-cmds.dep b/data/iphone-113su/_metadata/shell-cmds.dep new file mode 120000 index 000000000..27cb9a30a --- /dev/null +++ b/data/iphone-113su/_metadata/shell-cmds.dep @@ -0,0 +1 @@ +../../shell-cmds \ No newline at end of file diff --git a/data/iphone-113su/_metadata/unzip.dep b/data/iphone-113su/_metadata/unzip.dep new file mode 120000 index 000000000..1491341db --- /dev/null +++ b/data/iphone-113su/_metadata/unzip.dep @@ -0,0 +1 @@ +../../unzip \ No newline at end of file diff --git a/data/iphone-113su/_metadata/version b/data/iphone-113su/_metadata/version new file mode 100644 index 000000000..b63ba696b --- /dev/null +++ b/data/iphone-113su/_metadata/version @@ -0,0 +1 @@ +0.9 diff --git a/data/iphone-113su/_metadata/vfdecrypt.dep b/data/iphone-113su/_metadata/vfdecrypt.dep new file mode 120000 index 000000000..db8e98443 --- /dev/null +++ b/data/iphone-113su/_metadata/vfdecrypt.dep @@ -0,0 +1 @@ +../../vfdecrypt \ No newline at end of file diff --git a/data/iphone-113su/_metadata/wget.dep b/data/iphone-113su/_metadata/wget.dep new file mode 120000 index 000000000..39ed3bb54 --- /dev/null +++ b/data/iphone-113su/_metadata/wget.dep @@ -0,0 +1 @@ +../../wget \ No newline at end of file diff --git a/data/iphone-113su/ipatcher.dep b/data/iphone-113su/ipatcher.dep new file mode 120000 index 000000000..80b4c9ca5 --- /dev/null +++ b/data/iphone-113su/ipatcher.dep @@ -0,0 +1 @@ +../ipatcher \ No newline at end of file diff --git a/data/iphone-113su/iphone-113su b/data/iphone-113su/iphone-113su new file mode 100755 index 000000000..816920679 --- /dev/null +++ b/data/iphone-113su/iphone-113su @@ -0,0 +1,195 @@ +#!/bin/bash + +# iPhone-113su - iPhone 1.1.3 Software Upgrade +# Copyright (C) 2008 Jay Freeman (saurik) +# +# Redistribution and use in source and binary +# forms, with or without modification, are permitted +# provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the +# above copyright notice, this list of conditions +# and the following disclaimer. +# 2. Redistributions in binary form must reproduce the +# above copyright notice, this list of conditions +# and the following disclaimer in the documentation +# and/or other materials provided with the +# distribution. +# 3. The name of the author may not be used to endorse +# or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, +# BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +# TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Based on the Jailbreak released by planetbeing, NerveGas, +# ghost_000, dinopio, bgm, MuscleNerd, and the iPhone-Elite +# and iPhone/iTouch Dev teams. Some concepts were taken +# from natetrue's release. All binaries compiled separately, +# and different things are changed. This isn't quite the +# same upgrade process... remember that. + +# Special thanks goes to francis and cromas, who pointed +# out things that were broken in other upgrades, helped +# choose paths when it came time for tradeoffs, and offered +# their phones and touches up for destruction to it. + +shopt -s extglob nullglob +set -e -v + +base=$(mktemp -d -t 113) +device=$(uname -m) + +if [[ ${device} = iPod* ]]; then + ipsw='iPod/SBML/osx/061-4060.20080115.9Iuh5/iPod1,1_1.1.3_4A93_Restore.ipsw' + dmg='022-3742-100.dmg' +else + ipsw='iPhone/061-4061.20080115.4Fvn7/iPhone1,1_1.1.3_4A93_Restore.ipsw' + dmg='022-3743-100.dmg' +fi + +wget -O "${base}/ipsw.zip" "http://appldnld.apple.com.edgesuite.net/content.info.apple.com/${ipsw}" +unzip -d "${base}/ipsw" "${base}/ipsw.zip" +rm -f "${base}/ipsw.zip" + +vfdecrypt -i "${base}/ipsw/${dmg}" -k 11070c11d93b9be5069b643204451ed95aad37df7b332d10e48fd3d23c62fca517055816 -o "${base}/ipsw.dmg" +rm -rf "${base}/ipsw" + +dmg2img -v "${base}/ipsw.dmg" "${base}/ipsw.img" +rm -f "${base}/ipsw.dmg" + +/usr/libexec/vndevice attach /dev/vn0 "${base}/ipsw.img" +mount_hfs /dev/vn0 /mnt + +( cd /mnt; rsync -SPaz . / \ + --exclude fstab \ + --exclude kernelcache.s5l8900xrb ) + +umount /mnt +/usr/libexec/vndevice detach /dev/vn0 + +patch /System/Library/Lockdown/Services.plist <mobile + + ++ com.apple.afc2 ++ ++ AllowUnactivatedService ++ ++ Label ++ com.apple.afc2 ++ ProgramArguments ++ ++ /usr/libexec/afcd ++ --lockdown ++ -d ++ / ++ ++ + com.apple.crashreportcopy + + AllowUnactivatedService +EOF + +xargs -d '\n' rm -f <