Build an iPhone Development Environment on Ubuntu10.04

Source: Internet
Author: User
1. Prepare Ubuntu environment Ubuntu10.04sudoapt-getinstallgit-corelibxar-devbisonflexpatchopenssllibbz2-devlibssl-devautoconfsudoapt-getinstallbuild-essentialgnustepgobjcgnustep-makelibgnust

1. Prepare the Ubuntu Environment

Ubuntu 10.04

Sudo apt-get install git-core libxar-dev bison flex patch openssl libbz2-dev libssl-dev autoconf

Sudo apt-get install build-essential gnustep gobjc gnustep-make libgnustep-base-dev gnustep-devel uuid

Gcc, g ++, and other compilers have been installed by default.

Sudo apt-get install g ++

Ubuntu 10.04 amd64:

On a 64-bit system, if apt-get cannot find xar, download the xar installation from the website. You must first install the dependent file libxar1 and then install xar.

Http://packages.ubuntu.com/hardy/xar

2. Prepare the SDK and iPhone Fireware files

2.1

IPhone1, 2_3.1.2_7D11_Restore.ipsw
Http://appldnld.apple.com.edgesuite.net/content.info.apple.com/iPhone/061-7265.20091008.Xsd32/iPhone1,2_3.1.2_7D11_Restore.ipsw

2.2

Iphone_sdk_3.1.2_with_xcode_3.1.4 _ leopard _ 9m2809. dmg

3. Prepare the iphonedevonlinux source code, SDK, and firmware files.

3.1 checkout iphonedevonlinux source code

$ Mkdir-p ~ /IPhone/toolchain

$ Cd ~ /IPhone/toolchain
$ Svn checkout http://iphonedevonlinux.googlecode.com/svn/trunk ./

Currently, the svn version of checkout out is revision 83.

3.2 copy the SDK and the firmware file to the corresponding directory.

$ Mkdir-p ~ /IPhone/toolchain/files/firmware
$ Mv iphone_sdk_3.1.2_with_xcode_3.1.4 _ leopard _ 9m2809. dmg ~ /IPhone/toolchain/files/
$ Mv iPhone1, 2_3.1.2_7D11_Restore.ipsw ~ /IPhone/toolchain/files/firmware/

4. Execute toolchain. sh

4.1 sudo./toolchain. sh headers

4.2 sudo./toolchain. sh firmware

Due to GFW, this step may fail. If the password fails, manually modify toolchain. sh to directly add the key to decrypt firmware.

Modify toolchain. sh as follows:

Watch out for the following:

If [-z "$ DECRYPTION_KEY_SYSTEM"]; then
# Echo "We need the decryption key for 'basename $ fw_restore_systemdisk '."
# Echo "I'm going to try to fetch it from $ IPHONEWIKI_KEY_URL ...."
#
# IPHONEWIKI_KEY_URL = $ (wget -- quiet-O-$ IPHONEWIKI_KEY_URL | awk'
# BEGIN {IGNORECASE = 1 ;}
#/Name = "'$ {DEVICE}'/{found_phone = 1 ;}
#/. * '$ {TOOLCHAIN_VERSION}'. */& found_phone {found_firmware = 1 ;}
#/. * Href =. */& found_firmware {while (sub (/href = | "/," ", $3); print $3; exit ;}
#')
#
# DECRYPTION_KEY_SYSTEM = 'wget -- quiet-O-"http: // # www.theiphonewiki.com" $ IPHONEWIKI_KEY_URL | awk'
# BEGIN {IGNORECASE = 1 ;}
#/. * VFDecrypt. */{print $3 ;}
#''
DECRYPTION_KEY_SYSTEM = "encrypt"

If [! "$ DECRYPTION_KEY_SYSTEM"]; then
Error "Sorry, no decryption key for system partition found! "
Exit 1
Fi
Echo "I found it! "
Fi

Message_status "Mounting $ {FW_RESTORE_SYSTEMDISK }..."
Mount_dmg "$ {TMP_DIR}/$ {FW_RESTORE_SYSTEMDISK}" "$ {MNT_DIR}" $ {DECRYPTION_KEY_SYSTEM }"

Don't forget to add the line DECRYPTION_KEY_SYSTEM =...

4.3 sudo./toolchain. sh darwin_sources

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.