Difference between revisions of "Tutorial:Booting XNU on A4 Devices"

From The iPhone Wiki
Jump to: navigation, search
(Clean up.)
Line 1: Line 1:
Hello, I am 3x7R00Tripper and in this post I will present how can you boot xnu on all apple a4 devices. <br />
+
Hello, I am 3x7R00Tripper and in this post I will present how can you boot xnu on all apple a4 devices.
I do it with my iPhone 4 iOS 6.1.3 <br />
+
I do it with my iPhone 4 iOS 6.1.3
  +
 
You find this post on my website also:
 
You find this post on my website also:
http://3x7r00tripper.com/bootingxnuona4.php
+
[http://3x7r00tripper.com/bootingxnuona4.php]
  +
<br />
 
  +
I present it with Mavericks and Mounten Lion <br />
 
  +
I present it with Mavericks and Mountain Lion.
<br />
 
  +
Mavericks: <br />
 
  +
Mavericks:
$ curl -O http://opensource.apple.com/tarballs/dtrace/dtrace-118.tar.gz <br />
 
  +
$ curl -O http://opensource.apple.com/tarballs/AvailabilityVersions/AvailabilityVersions-6.tar.gz <br />
 
$ curl -O http://opensource.apple.com/tarballs/AvailabilityVersions/AvailabilityVersions-6.tar.gz <br />
+
$ curl -O http://opensource.apple.com/tarballs/dtrace/dtrace-118.tar.gz
  +
$ curl -O http://opensource.apple.com/tarballs/AvailabilityVersions/AvailabilityVersions-6.tar.gz
$ git clone https://github.com/3x7R00Tripper/xnu <br />
 
  +
$ curl -O http://opensource.apple.com/tarballs/AvailabilityVersions/AvailabilityVersions-6.tar.gz
$ tar zxf dtrace-118.tar.gz <br />
 
  +
$ git clone https://github.com/3x7R00Tripper/xnu
$ cd dtrace-118 <br />
 
  +
$ tar zxf dtrace-118.tar.gz
$ mkdir -p obj sym dst <br />
 
  +
$ cd dtrace-118
$ xcodebuild install -target ctfconvert -target ctfdump -target ctfmerge ARCHS="x86_64" SRCROOT=$PWD OBJROOT=$PWD/obj SYMROOT=$PWD/sym DSTROOT=$PWD/dst <br />
 
  +
$ mkdir -p obj sym dst
$ sudo ditto $PWD/dst/usr/local /usr/local <br />
 
  +
$ xcodebuild install -target ctfconvert -target ctfdump -target ctfmerge ARCHS="x86_64" SRCROOT=$PWD OBJROOT=$PWD/obj SYMROOT=$PWD/sym DSTROOT=$PWD/dst
$ cd .. <br />
 
  +
$ sudo ditto $PWD/dst/usr/local /usr/local
$ tar zxf AvailabilityVersions-6.tar.gz <br />
 
  +
$ cd ..
$ cd AvailabilityVersions-6 <br />
 
  +
$ tar zxf AvailabilityVersions-6.tar.gz
$ mkdir -p dst <br />
 
  +
$ cd AvailabilityVersions-6
$ make install SRCROOT=$PWD DSTROOT=$PWD/dst <br />
 
  +
$ mkdir -p dst
$ sudo ditto $PWD/dst/usr/local `xcrun -sdk / -show-sdk-path`/usr/local <br />
 
  +
$ make install SRCROOT=$PWD DSTROOT=$PWD/dst
$ cd .. <br />
 
  +
$ sudo ditto $PWD/dst/usr/local `xcrun -sdk / -show-sdk-path`/usr/local
$ cd xnu <br />
 
  +
$ cd ..
<br />
 
  +
$ cd xnu
For Mounten Lion read [http://shantonu.blogspot.de/2012/07/building-xnu-for-os-x-108-mountain-lion.html this post]. <br />
 
  +
<br />
 
  +
For Mountain Lion read [http://shantonu.blogspot.de/2012/07/building-xnu-for-os-x-108-mountain-lion.html this post].
Now you are in the xnu folder <br />
 
  +
Know you must make it for Apple A4: <br />
 
  +
Now you are in the xnu folder
<br />
 
  +
Know you must make it for Apple A4:
$ make TARGET_CONFIGS="debug arm S5L8930X" <br />
 
  +
<br />
 
  +
$ make TARGET_CONFIGS="debug arm S5L8930X"
After the process navigate to BUILD/obj/DEBUG_ARM_S5L8930X <br />
 
  +
In this folder are many files. <br />
 
  +
After the process navigate to BUILD/obj/DEBUG_ARM_S5L8930X
mach_kernel is the bootable image. <br />
 
  +
In this folder are many files.
<br />
 
  +
mach_kernel is the bootable image.
Ok now you need the 4.1 ipsw for your iDevice(A4) <br />
 
  +
If you have a newer iOS version, you need the 4.1 ipsw also. <br />
 
  +
Ok now you need the 4.1 ipsw for your iDevice(A4)
You can download the ipsw for example [http://www.felixbruns.de/iPod/firmware/ here] or [http://www.icj.me/ios here]. <br />
 
  +
If you have a newer iOS version, you need the 4.1 ipsw also.
<br />
 
  +
You can download the ipsw for example [http://www.felixbruns.de/iPod/firmware/ here] or [http://www.icj.me/ios here].
For booting the kernel you need [http://redsn0w.com redsn0w]. <br />
 
  +
Open terminal and navigate to the redsn0w folder. <br />
 
First you must install CTF tools etc. <br />
+
First you must install CTF tools etc.
  +
For booting the kernel you need [http://redsn0w.com redsn0w].
  +
Open terminal and navigate to the redsn0w folder.
 
Now you write this commands:
 
Now you write this commands:
  +
<br />
 
$ cd redsn0w.app/Contents/MacOS <br />
+
$ cd redsn0w.app/Contents/MacOS
$ ./redsn0w -i <'4.1 iPSW'> -k <'mach_kernel'> <br />
+
$ ./redsn0w -i <'4.1 iPSW'> -k <'mach_kernel'>
  +
Here a example command: <br />
 
  +
Here a example command:
$ ./redsn0w -i /Users/Louis/Desktop/iOS\:Mac\ hack/XNU_Kernel_Panic_Apple_A4-Booting/iPhone3\,1_4.1_8B117_Restore.ipsw -k /Users/Louis/Desktop/xnu/BUILD/obj/DEBUG_ARM_S5L8930X/mach_kernel <br />
 
  +
$ ./redsn0w -i /Users/Louis/Desktop/iOS\:Mac\ hack/XNU_Kernel_Panic_Apple_A4-Booting/iPhone3\,1_4.1_8B117_Restore.ipsw -k /Users/Louis/Desktop/xnu/BUILD/obj/DEBUG_ARM_S5L8930X/mach_kernel
Now you must get your iDevice(A4) in the DFU mode.<br />
 
  +
Wait a few seconds and a white screen will flashes on your iDevice. Now you see the pineapple on your iDevice. <br />
 
  +
Now you must get your iDevice(A4) in the DFU mode.
30 secounds - 1 minute later the kernel is booted on your iDevice. <br />
 
  +
Wait a few seconds and a white screen will flashes on your iDevice. Now you see the pineapple on your iDevice.
A long time you see 'Still waiting for root device'. <br />
 
  +
30 secounds - 1 minute later the kernel is booted on your iDevice.
But If you wait more than 10 - 30 minutes, appears a kernel panic. <br />
 
  +
A long time you see 'Still waiting for root device'.
<br />
 
  +
But If you wait more than 10 - 30 minutes, appears a kernel panic.
Ok you are finish and have fun :) <br />
 
  +
Ok you are finish and have fun :)

Revision as of 02:13, 4 November 2013

Hello, I am 3x7R00Tripper and in this post I will present how can you boot xnu on all apple a4 devices. I do it with my iPhone 4 iOS 6.1.3

You find this post on my website also: [1]

First you must install CTF tools etc.

I present it with Mavericks and Mountain Lion.

Mavericks:

$ curl -O http://opensource.apple.com/tarballs/dtrace/dtrace-118.tar.gz
$ curl -O http://opensource.apple.com/tarballs/AvailabilityVersions/AvailabilityVersions-6.tar.gz
$ curl -O http://opensource.apple.com/tarballs/AvailabilityVersions/AvailabilityVersions-6.tar.gz
$ git clone https://github.com/3x7R00Tripper/xnu
$ tar zxf dtrace-118.tar.gz
$ cd dtrace-118
$ mkdir -p obj sym dst
$ xcodebuild install -target ctfconvert -target ctfdump -target ctfmerge ARCHS="x86_64" SRCROOT=$PWD OBJROOT=$PWD/obj SYMROOT=$PWD/sym DSTROOT=$PWD/dst
$ sudo ditto $PWD/dst/usr/local /usr/local
$ cd ..
$ tar zxf AvailabilityVersions-6.tar.gz
$ cd AvailabilityVersions-6
$ mkdir -p dst
$ make install SRCROOT=$PWD DSTROOT=$PWD/dst
$ sudo ditto $PWD/dst/usr/local `xcrun -sdk / -show-sdk-path`/usr/local
$ cd ..
$ cd xnu

For Mountain Lion read this post.

Now you are in the xnu folder Know you must make it for Apple A4:

$ make TARGET_CONFIGS="debug arm S5L8930X"

After the process navigate to BUILD/obj/DEBUG_ARM_S5L8930X In this folder are many files. mach_kernel is the bootable image.

Ok now you need the 4.1 ipsw for your iDevice(A4) If you have a newer iOS version, you need the 4.1 ipsw also. You can download the ipsw for example here or here.

For booting the kernel you need redsn0w. Open terminal and navigate to the redsn0w folder. Now you write this commands:

$ cd redsn0w.app/Contents/MacOS
$ ./redsn0w -i <'4.1 iPSW'> -k <'mach_kernel'>

Here a example command:

$ ./redsn0w -i /Users/Louis/Desktop/iOS\:Mac\ hack/XNU_Kernel_Panic_Apple_A4-Booting/iPhone3\,1_4.1_8B117_Restore.ipsw -k /Users/Louis/Desktop/xnu/BUILD/obj/DEBUG_ARM_S5L8930X/mach_kernel

Now you must get your iDevice(A4) in the DFU mode. Wait a few seconds and a white screen will flashes on your iDevice. Now you see the pineapple on your iDevice. 30 secounds - 1 minute later the kernel is booted on your iDevice. A long time you see 'Still waiting for root device'. But If you wait more than 10 - 30 minutes, appears a kernel panic. Ok you are finish and have fun :)