Linux上构筑iPhone OS3.1.2开发环境搭建

 

本文地址  http://blog.csdn.net/lmss82/archive/2010/02/07/5296261.aspx

 


教程地址:  http://www.yifeiyang.net/iphone-development-introduction-3-linux-development-environment-on-the-build-iphone-os3-1-2/
#第一步没有什么问题
$ ./toolchain.sh headers
#第二步也顺利通过
$ ./toolchain.sh firmware
#第三步也挺顺利
$ ./toolchain.sh darwin_sources
#最后一步,这一步需要注意了
$ ./toolchain.sh build

-------------------------------------

照上面的教程我一步一步的进行着,遇到问题无数呀,记录下来给需要的人。

第一步,我下载了iphone_sdk_3.1.2_with_xcode_3.1.4__leopard__9m2809.dmg (http://ipsw.info/iphone_sdk_3.1.2_with_xcode_3.1.4__leopard__9m2809.dmg)

后就顺利通过了,先前下的官方最新版本死活不让通过。

官方最新版本是3.1.3的。

第二部也不太顺利,最后面是报错信息:意思是获取一个KEY,但那个网站却访问不了,郁闷一天(中途还安装了TOR翻墙工具)。还好我想到的解决方法。

幸运的是通过GOOGLE的页面快照,我找到了那个页面,并通过打印toolchain.sh的输出结果找到了他要访问的最终页面。

页面是:http://theiphonewiki.com/wiki/index.php?title=Northstar_7D11_%28iPhone_3G%29

然后通过google搜索这个页面找到如下信息,看来运气不错,他要的就是那个:


Decryption Keys


在toolchain.sh的第533行

加入 这段代码:

DECRYPTION_KEY_SYSTEM="a8a886d56011d2d98b190d0a498f6fcac719467047639cd601fd53a4a1d93c24e1b2ddc6";


直接赋值,这样安装就继续了。下面是完成后的显示。

zhaowei@zhaowei-ubuntu:~/toolchain$ ./toolchain.sh firmware

./toolchain.sh: line 132: //IPHONEWIKI_KEY_URL=http://www.theiphonewiki.com/wiki/index.php?title=Firmware: 没有该文件或目录

Preparing the environment

Toolchain version: 3.1.2

Building in: /home/zhaowei/toolchain

Environment is ready

Extracting firmware files...

Archive: /home/zhaowei/toolchain/files/firmware/iPhone1,2_3.1.2_7D11_Restore.ipsw

inflating: /home/zhaowei/toolchain/tmp/Restore.plist

Firmware Details

Device Class: iPhone

Product Version: 3.1.2

Build Version: 7D11

Restore RamDisk: 018-6136-014.dmg

Restore Image: 018-6028-014.dmg

Board Config: n82ap

Unzipping 018-6028-014.dmg...

Archive: /home/zhaowei/toolchain/files/firmware/iPhone1,2_3.1.2_7D11_Restore.ipsw

inflating: /home/zhaowei/toolchain/tmp/018-6028-014.dmg

We need the decryption key for 018-6028-014.dmg.

I'm going to try to fetch it from http://192.168.0.107/firmware.html....

decryption_key_system:.iPhone_3G.->toolchain_version.3.1.2

iphonewiki:.a8a886d56011d2d98b190d0a498f6fcac719467047639cd601fd53a4a1d93c24e1b2ddc6

I found it!

Mounting 018-6028-014.dmg...

Decrypting 018-6028-014.dmg...
dmg2img v1.6.1 is derived from dmg2iso by vu1tur (to@vu1tur.eu.org)

/home/zhaowei/toolchain/tmp/018-6028-014.dmg.decrypted --> /home/zhaowei/toolchain/tmp/018-6028-014.dmg.decrypted.img

reading property list, 118813 bytes from address 222153301 ...
partition 0: begin=195, size=430, decoded=284
partition 1: begin=914, size=430, decoded=284
partition 2: begin=1632, size=430, decoded=284
   
partition 3: begin=2367, size=430, decoded=284
partition 4: begin=3088, size=430, decoded=284
partition 5: begin=3800, size=108353, decoded=72964
partition 6: begin=112435, size=430, decoded=284
decompressing:
opening partition 0 ... [2] 100.00% ok
opening partition 1 ... [2] 100.00% ok
opening partition 2 ... [2] 100.00% ok
opening partition 3 ... [2] 100.00% ok
opening partition 4 ... [2] 100.00% ok
opening partition 5 ... [1819] 100.00% ok
Archive successfully decompressed as /home/zhaowei/toolchain/tmp/018-6028-014.dmg.decrypted.img
You should be able to mount the image [as root] by:
modprobe hfsplus
mount -t hfsplus -o loop /home/zhaowei/toolchain/tmp/018-6028-014.dmg.decrypted.img /mnt
In order to extract 018-6028-014.dmg, I am going to mount it.
This needs to be done as root.
[sudo] password for zhaowei:
Copying required components of the firmware...
Unmounting...
Firmware extracted.

------------------------------------------------

google搜索结果。

==============================================


http://theiphonewiki.com/wiki/index.php?title=Northstar_7D11_%28iPhone_3G%29

Northstar 7D11 (iPhone 3G)

From The iPhone Wiki

Jump to: navigation, search

Contents [hide]

1 Decryption Keys


1.1 Root Filesystem

1.2 AppleLogo (applelogo.s5l8900x.img3)

1.3 KernelCache (kernelcache.release.s5l8900x)

1.4 RecoveryMode (recoverymode.s5l8900x.img3)

1.5 Restore Ramdisk (018-6136-014.dmg)

1.6 iBoot (iBoot.m68ap.RELEASE.img3)

Decryption Keys

Root Filesystem

VFDecrypt: a8a886d56011d2d98b190d0a498f6fcac719467047639cd601fd53a4a1d93c24e1b2ddc6

AppleLogo (applelogo.s5l8900x.img3)

Key: 1fb738d6c091113d7dfdd89864a718d9

IV: 677b4c711e3cacb72505feae8e1eae5d

KernelCache (kernelcache.release.s5l8900x)

Key: dd03b5b52a53d3582b18a0052ef84038

IV: 25b7f586d184c329d3d05953a6516a36

RecoveryMode (recoverymode.s5l8900x.img3)

Key: 6d7d035c04c60ab2776a5e7c729daf0a

IV: dbf44c3cc2944b87bdecdbdcd8e42b82

Restore Ramdisk (018-6136-014.dmg)

Key: 6a4db11073eb748bad1fabafb066fe13

IV: 0e128e1f69806afc476b73250908d641

iBoot (iBoot.m68ap.RELEASE.img3)

Key: a4039d79cd6d41ce2b755ed566902103

IV: 13e320617bc655211e2b68042d4508f8


-------------------------------------------------

最初出错信息:

zhaowei@zhaowei-ubuntu:~/toolchain$ ./toolchain.sh firmware

./toolchain.sh: line 132: //IPHONEWIKI_KEY_URL=http://www.theiphonewiki.com/wiki/index.php?title=Firmware: 没有该文件或目录

Preparing the environment

Toolchain version: 3.1.2

Building in: /home/zhaowei/toolchain

Environment is ready

Extracting firmware files...

Archive: /home/zhaowei/toolchain/files/firmware/iPhone1,2_3.1.2_7D11_Restore.ipsw

inflating: /home/zhaowei/toolchain/tmp/Restore.plist

Firmware Details

Device Class: iPhone

Product Version: 3.1.2

Build Version: 7D11

Restore RamDisk: 018-6136-014.dmg

Restore Image: 018-6028-014.dmg

Board Config: n82ap

Unzipping 018-6028-014.dmg...

Archive: /home/zhaowei/toolchain/files/firmware/iPhone1,2_3.1.2_7D11_Restore.ipsw

inflating: /home/zhaowei/toolchain/tmp/018-6028-014.dmg

We need the decryption key for 018-6028-014.dmg.

I'm going to try to fetch it from http://iphone.spot.ee/wiki/index.php?title=Firmware....

Logo

更多推荐