Apr 24, 2010

HOW TO: INSTALL ANDROID ON YOUR IPHONE!!!

So, someone managed to get ANDROID working on the iPhone 2G. I, of course, was one of the first persons to get my hands on this piece of software. i will provide the tutorial after the break. This is a brand new hack, following the "linux on the iPhone" series that was posted on the blog "linuxontheiphone" (linuxoniphone.blogspot.com/). The operating system itself works great but it s pretty buggy, specially cuz it only runs on the iPhone 2G yet, one of the most "ram-depraved" iPhones... Some of the bugs I found are: -Couldn't play music -no market -no control of most stuff like brightness or stuff like that -the iphone does not have as many buttons as the android. What to do? -no the screen never locks (never turns black, there IS a lock screen but no "display sleep" function) -and many others But it impressed me in many ways: it actually receives and make calls and txt messages and it has bult-in Wi-Fi. What do you think about this new "hack"? show ur love in the comments/discussion board on facebook. http://idroidproject.org http://iphoneonlinux.blogspot.com


REMEMBER TO FOLLOW ME ON TWITTER: @RAPHAS13

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

Disclaimer

I take no responsibility for any damage you might cause to your phone by following this guide. Whether it gets bricked, blocked or eventually thrown out of the window, I can’t be held responsible. Use this guide at your own risk. Thanks.

Purpose

This guide explains the installation and setup of 'iDroid', an Android distribution using iPhoneLinux.

Prerequisites

Before you begin, make sure you have the following:

  • A compatible jailbroken device (currently only the 2G iPhone is supported)
  • A Linux PC (this guide is tailored for Ubuntu 9.10 or later). Only Live CDs and native Linux installations can be used (No virtual machines)
    • If possible, use a 32-bit version of Linux. You may have difficulty using the pre-built utilities on 64-bit systems. Another solution would be using a 32-bit chroot.
  • Backups of any important data on the device. This is alpha-quality software, so you may encounter a problem that requires a full Restore to fix.

Get the release

The quickest way to get Android running on your phone is using the pre-built images available in this blog post or on SourceForge (much faster). This torrent also works: File:Idroid-release-0.1a.tar.bz.torrent. The archive also contains two important Linux (32-bit) utilities: loadibec and oibc.

Get the proprietary firmware files

Due to licensing restrictions, we cannot legally distribute four of the files you need to use iDroid. These are:

Filenamemd5 hash
sd8686.bin57c08a7aa0d6e3efb9db5d96e0f80a8d
sd8686_helper.bin6edc7f5032463c294eb1b738482f734d
zephyr_aspeed.binbad4dedccde0a5bef1a9468d918aa75a
zephyr_main.bin3c6f0f5f567a2a228aa290f2c49b583a

Getting sd8686 and sd8686_helper

The Wi-Fi firmware files can be found on Marvell's site.

  1. Go to http://www.marvell.com/support.html
  2. Under "Choose a platform", select "Linux 2.6 - Fedora".
  3. Click the Search button under the drop down box.
  4. Download and extract the SD-8686-* zip archive.
  5. Rename helper_sd.bin to sd8686_helper.bin
  6. Keep sd8686.bin and sd8686_helper.bin in a safe place for later.

Getting zephyr_aspeed and zephyr_main

If you are using iPhone OS 3.1 or earlier

On 2.x and certain early 3.x versions of iPhone OS, you can obtain these files using simple commands given to your device over an SSH connection.

  1. Connect to your device using SSH.
  2. Use the su command to gain root privileges. (The default root password is "alpine".)
    su
  3. Use the following command to make sure you have all the necessary programs installed:
    apt-get install iokittools coreutils vim
    • If the "apt-get" command is not found, install the apt7 package in Cydia and try again.
  4. Run the following two commands:
    ioreg -l -w 0 | grep '"Firmware" =' | cut -d '<' -f2 | cut -d '>' -f1 | xxd -r -ps - zephyr_main.bin ioreg -l -w 0 | grep '"A-Speed Firmware" =' | cut -d '<' -f2 | cut -d '>' -f1 | xxd -r -ps - zephyr_aspeed.bin 
  5. Make sure that the two files (zephyr_main.bin and zephyr_aspeed.bin) are not empty (0-byte):
    ls -lh zephyr*.bin
  6. Transfer the two firmware files to your PC and keep them in a safe place for later.

If you are using iPhone OS 3.1.2 or higher

On newer versions of iPhone OS, the ioreg command fails to give us the firmware data we need. Here are a few options for obtaining the firmware files:

  • Use the utility described in this blog post
  • Downgrade your device to 2.2.1 and use the instructions in the above section
  • Find a friend with a jailbroken pre-3.1.2 device and use the instructions in the above section

Putting the firmware files into the Android system images

Run all these commands on your linux computer from within the directory containing all the firmware files.

On Windows use ImDisk to mount the images as a virtual drive : ImDisk (found by alex)

android.img.gz

The firmware files must be placed into /lib/firmware/ inside this image.

 gunzip android.img.gz  sudo mkdir -p /mnt/android  sudo mount -o loop android.img /mnt/android  sudo cp zephyr_aspeed.bin zephyr_main.bin sd8686_helper.bin sd8686.bin /mnt/android/lib/firmware/  sudo umount /mnt/android  gzip android.img 

system.img

The firmware files must also be placed into /etc/firmware/ inside this image.

 sudo mkdir -p /mnt/android  sudo mount -o loop system.img /mnt/android  sudo cp zephyr_aspeed.bin zephyr_main.bin sd8686_helper.bin sd8686.bin /mnt/android/etc/firmware/  sudo umount /mnt/android 

Verify images

Your new images should match these hashes

md5 hashFilename
526625625aa97dbcb67d5591a6d636faandroid.img.gz
8008b55540fadca99153c3bb2c712dd4cache.img
6a3773e42e95e1d222a5d8baecd220d7ramdisk.img
769e76c7fc3bc654bc6daeae95fac738system.img
141cef3223a86333dedeabcbed0102aauserdata.img
50b1fba40feed08d5c25ee4bcf2e2daazImage

Copying the Android system images and kernel to your device

Copy these files to /private/var on your device:

  • ramdisk.img
  • system.img
  • userdata.img
  • cache.img
  • android.img.gz
  • zImage

Some users report boot failure when using certain programs to transfer these files. These clients include Cyberduck, WinSCP and libimobiledevice. Only scp has been confirmed working. use scp /[image directory]/* root@[iphone wifi ip address]:/private/var

Installing openiboot on your device

All commands below are to be run from your Linux computer, from within the iDroid utils directory.

  1. Install libUSB 1.0. Run sudo aptitude install libusb-1.0-0
  2. Put your phone into Recovery Mode.
  3. Run sudo ./loadibec openiboot.img3.
  4. The openiboot menu should now be displayed on your phone.
  5. Press the button on the top of your phone to select the openiboot console, then press the home button.
  6. Run sudo ./oibc. Your terminal should now show the same text that's displayed on your phone's screen. If not return to point 1.
  7. Type install.
  8. Once done, type reboot

Note: loadibec and oibc tools are compiled under a 32bit system. If you want to execute them under your 64bit distribution, you have to install ia32 shared libraries, and i386 release of libusb-1.0, libusb-0.1 (I don't know why oibc require this version), readline and libgcc.

Note: If your device refuses to start up after installing openiboot, you need to enter Recovery Mode mode and Restore your device using iTunes. The best alternative is to use redsn0w 0.9.2, this will keep your settings and data intact.

Booting Android

  1. Reboot your phone to get back to the openiboot menu.
  2. Press the Lock button to highlight the Console option.
  3. Press and hold the Home button for 2 to 3 seconds. This will boot Android.
  4. Enjoy!


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

REMEMBER TO FOLLOW ME ON TWITTER: @RAPHAS13

What do you think about this new "hack"? Show ur love in the comments/discussion on facebook

4 comments:

iRaphael said...

How pathetic. At least credit me for writing this whole tutorial and mention that you've copied it pretty much word-for-word - except removing the links to androidalot.com

iRaphael said...

Hey. You, obviously did NOT read this post... The link to androidalot IS there. I really liked your post but now.. I don't think i like u as a person.. pathetic is your comment: pointless... The link is before the tutorial begins ok? so if you think i am pathetic, at least have some arguments!Hey. You, obviously did NOT read this post... The link to androidalot IS there. I really liked your post but now.. I don't think i like u as a person.. pathetic is your comment: pointless... The link is before the tutorial begins ok? so if you think i am pathetic, at least have some arguments!

iRaphael said...

There. I just removed ur text, even though it was WAY easier to understand. and put the idrod OFFICIAL tutorial. Now if you want o be such a dick by not allowing people to repost ur posts (i would be honored if they did it to me) at least TELL that is your blogs. People doesn't wawnt to have to unpost or repost or edit a post that's already done. And I don't think you want to lose more readers like me...

iRaphael said...

i get to step 6 with no problem but after i type sudo ./oibc in the terminal, nothing happens. My iphone says welcome to openiboot and the terminal on ubuntu went from:

root@ubuntu-desktop:/home/ubuntu/Downloads/openiboot# sudo ./oibc
to
root@ubuntu-desktop:/home/ubuntu/Downloads/openiboot#

The text on my iphone don't show up on ubuntu. I also tried ./oibc with the same result. Any idea of what's wrong?

Post a Comment