Thursday, 22 April 2010

Step by step tutorial on how to install Google's Android on the Apple iPhone 2G (aka iDroid) using Windows and Linux.

Tutorial up to date as of 09/05/2010.



IF YOUR IPHONE COMPLETELY STOPS RESPONDING AND WON'T TURN ON AT ANY POINT, DON'T WORRY.PLUG IT INTO THE USB PORT, HOLD POWER AND HOME FOR EXACTLY 10 SECONDS, THEN RELEASE THE POWER BUTTON AND CONTINUE HOLDING THE HOME BUTTON. THEN RESTORE!!

Thanks to http://linuxoniphone.blogspot.com for discovering this! Please donate to them if it works for you! I am currently writing this to make it as user friendly as possible.

THIS IS HIGHLY EXPERIMENTAL AND FOR THE 2G ONLY, PROCEED AT OWN RISK BLAH BLAH BLAH.

1) Download this package

http://www.mediafire.com/?gw5zojvnnhz

If anyone can host a mirror, please twitter me and I will add a link here! Thanks

Whilst you are downloading, Set an Ubuntu LIVE CD to download too:

http://www.ubuntu.com/getubuntu/download

Extract the iPhone.zip folder to the desktop.

2) Jailbreak your iPhone, I will write a tutorial for this another time, for now just Google it. If you have software version 3.1.3 then check out my other tutorial: http://masseymasseymassey.blogspot.com/2010/04/how-to-jailbreak-iphone-3g-313-firmware.html

3) From your iPhone, open Cydia and install OpenSHH and BossPrefs. Turn all the BossPrefs options on. OpenSHH won't add an icon, don't worry. After this go into the iPhone settings - General- Auto Lock. Set Auto Lock to Never. Connect to your home WiFi and note the IP address by clicking the small arrow next to the network name on the iPhone.





4) Download Filezilla on your PC. Open it and click on File - Site Manager. Create a new site and make sure you have sftp: selected. Type your iPhone IP address and the username "root", password is "alpine".

5) Transfer the contents of "Put on iPhone" to the /private/var directory on your iPhone using Filezilla. This will take ages so go and grab a beer or something.



6) Boot up an Ubuntu LIVE CD. Make sure you have libusb-1.0-0 installed - You will have a later version installed so you need to uninstall it and then reinstall version 1.0-0. To do this use the System - Admin - Package Manager tool. Whilst you are there install "libreadline5" too.

7) Put your iPhone into restore mode. To do this you first need to unplug it and turn it off. Hold the home button and plug it back into the USB port. Continue holding the home button until you see a picture of a USB cable and the iTunes symbol on screen.

8)copy "loadibec" "openiboot.img3" and "oibc" from the other folder in the zip to your "home folder" in linux. Open a command prompt.

9)
-) sudo su
-) sudo ./loadibec openiboot.img3
-) Tap power button to select iBoot.


-) Push Home button
-) Type "sudo ./oibc" into the terminal
-) Type "install"
-) Type "reboot" once the install has finished!
-) Once you see the bootloader, hold the home button for more than 2 seconds to boot Android.

Once booted, if you are using WiFi change your DNS settings to:
Primary: 8.8.8.8
Secondary: 8.8.4.4



If you just tap the home button then it will go back into the linux loader. To get out of this type ./oibc again and then type reboot.





Errors:

If you get "./loadibec: error while loading shared libraries: libusb-1.0.so.0:" then go into the linux package manager and install libusb 1.0

If you get "./oibc: error while loading shared libraries: libreadline.so.5" then again go into the limux package manager and install libreadline 5

87 comments:

  1. Hey.

    Thanks for the tutorial. But i really need to know if this has been confirmed to work??

    Just dont want my iPhone bricked.....

    Cheers....

    ReplyDelete
  2. If you are worried about bricking it I would wait for a few months before trying it. By then I bet an automated installer will come out.

    ReplyDelete
  3. I am curious enough to actually try the process out. But then it always plays at the back of the mind.

    The thing is, no one till now, except you i suppose, has confirmed (other than planetbeing) that it works, say following your tutorial.

    I guess i will take the plunge anyway. Could you possibly elaborate the 10th (last step) just a little bit more?

    Cheers....

    ReplyDelete
  4. @theskiddhard, I think I now have an expensive paper weight, don't do it yet.

    ReplyDelete
  5. Oh oh.....

    On hold at the moment.

    Hope u recover you iPhone though.

    ReplyDelete
  6. I can confirm this works.
    http://i44.tinypic.com/o0z57p.jpg
    I only succeded when using a full instalation Ubuntu. Don't use virtual machine.
    Haven't tried live CD.
    And btw the libusb package is called libusb-1.0-0
    Great work and thanks for the tutorial :)

    ReplyDelete
  7. @mboeru

    Fantastic news my friend and certainly a good job well done!! ;)

    Just a couple of questions really:

    1. Does it have to be a full fledged Linux system? I have started the ubuntu installation already. But does it have to be an updated system?

    2. Did you follow just Adam's tutorial? Or was it something other than this tut? If yes, could you provide me a few steps as well?

    Cheers....

    ReplyDelete
  8. Also, the blog now mentions at the top:

    THIS TUTORIAL DID WORK FOR ME HOWEVER ON REBOOT OF ANDROID IT FROZE AND I THINK I HAVE AN EXPENSIVE PAPER WEIGHT, DON'T DO IT YET

    Have you tried rebooting a few times successfully??

    ReplyDelete
  9. So i used Ubuntu 9.04 updated to the latest software.
    I copied the system.img and android.img.gz from Adams archive directly to my iPhone as I already put all the other files there.

    One more thing I did was put zImage file from the original archive together with openiboot.img3, loadibec and oibc in the same directory. Don't know if that influenced anything

    I have installed on the device iPhone OS 3.1.3 jailbreaked with PwnageTool baseband 04.05.05_G

    PS: Only reboted once till now and did not have any problems. Hope it doesn't crash on me :)

    Hope it helps

    ReplyDelete
  10. Hmmmmmm.....

    Thank for the heads up.

    So instead of a long night ahead, i might just have a long day ahead. Hopefully a lot dust would settled by then. ;)

    In the meanwhile, I will get my fresh ubuntu copy updated.

    Then I will follow Adam's tutorial here and add your method to it.

    P.S. I am on the same baseband but on OS 3.1.2

    Cheers.....

    And thanks for the quick update.... ;)

    ReplyDelete
  11. @ mboeru, firstly I hate you!

    Secondly, Congratulations! :)

    Can you give me any more information I can add to the blog? Firmware version and the like Cheers.

    ReplyDelete
  12. @ Adam: Oh yes. I second that.

    @ mboeru: Any information that is provided will most certainly go and help a lot of folks like yourself (and Adam and me on this blog so far) in getting the same joy that you are.

    Not really angry per se, but JEALOUS for sure.... ;)

    Cheers....

    ReplyDelete
  13. I ain't afraid of nothing. I got a 2g and I'm gonna do this right now and report results. Phone is in recovery mode atm with all necessary files. Just a few more minutes.

    ReplyDelete
  14. And, right after typing reboot the phone appears to be bricked.

    ReplyDelete
  15. ...dude, I'm RIGHT THERE!!! My phone is in restore mode, I've got all the files on the phone, all the shiz on my Ubuntu machine (Karmic) and damn if my libusb isn't too new! When I try to force a symbolic link from the older name to the newer library, I get a USB_INIT error. libusb-0.1-4 And of course, there's no source for loadibec anywhere that I could recompile it with with the newer libraries. :-( Well dude, I tried...

    ReplyDelete
  16. cardydude do:
    aptitude install libusb-1.0-0

    And it should be recovery not restore mode

    ReplyDelete
  17. Planetbe1ng says it only works on iPhones that were jailbreaked with PwnageTool. He posted a new openiboot.img3 that works with all iPhones 2G.

    ReplyDelete
  18. so i must have a machine running ubuntu to get this to work?

    ReplyDelete
  19. Back again, at the same place i was last time, but with the new openiboot.img3 Will it brick again? I'm about to find out.

    ReplyDelete
  20. Check out the changes made to planetbeing's blog post. Geohot managed to fix the openiboot installation, and planet also told us how to do a tethered boot, which is a bit safer. And planetbeing says a DFU restore is possible if you brick. It's all good.

    ReplyDelete
  21. I can confirm the new openiboot indeed works.

    ReplyDelete
  22. Can you mirror the newer openiboot file..
    I'm unable to download it from the link by planetbeing...

    ReplyDelete
  23. I got stuck at the tux penguin. Has anyone else had this problem?

    ReplyDelete
  24. Hi Guys, I have a big problem.
    I installed Android succesful on my iPhone 2G, but I'm not able to enter my pin-code,because the touchscreen doesnt work :(.

    ..sorry for my bad english,I'm from Austria^^.

    ReplyDelete
  25. Got to step 10, sudo ./oibc and get the following error message.

    "./oibc: error while loading shared libraries: libreadline.so.5: cannot open shared object file: No such file or directory
    "

    Any tips?

    ReplyDelete
  26. @Julian did you follow my tutorial?? If you did then it should have installed the touch screen drivers

    ReplyDelete
  27. @Timbo, Go onto the synaptics package manager and install libreadline, should be version 5. Let me know.

    ReplyDelete
  28. @adam. Thanks. had to uninstall V6 and then reinstall v5.

    So I just did step 10) reboot. And chose the OpenIboot option and I'm back at the openiboot prompt. Not sure what to do now?

    ReplyDelete
  29. Got it, when you reboot and chose openiboot you hsve to HOLD the home button until TUX appears.

    Takes a few minutes to load so be prepared to wait...

    ReplyDelete
  30. Excellent! Please post pictures or a video if you don't mind so I can use them in my blog!

    ReplyDelete
  31. My iphone while loading Android hangs after line
    radio: reading baseband nvram... done
    If i reboot iphone - it shows me openiboot... I can boot iphone os without problem.

    Can you help me?

    ReplyDelete
  32. I'm using a virtulalbox on XP
    But I can't even copy files to home folder.
    And step
    -) sudo ./loadibec openiboot.img3
    didn't work:(

    ReplyDelete
  33. I have the same problem as Anothony above

    ReplyDelete
  34. 1. Select Console from the menu
    2. Press and HOLD Home button until it start loading
    3. Press and release Home button again

    It will boot into iDroid

    ReplyDelete
  35. I did that. Is started loading everything and got stuck after the basband nvram message

    ReplyDelete
  36. Could anybody tell me what works and what does not?

    I would like to know whether following thigs work

    1. calling or dialing out
    2. wifi
    3. camera

    If all these work, I will start running android right away and dump iphone os altogether. Thanks.

    ReplyDelete
  37. 1. Works but buggy. Dialer sometimes crashes
    2. Work with WEP. Did not manage to get it working with WPA2 Personal + TKIP
    3. Not working. No drivers. From what I understand they have to reverse engenieer to get the drivers.

    ReplyDelete
  38. Can this be done using a Mac?

    ReplyDelete
  39. @JRomero Not using this tutorial.

    ReplyDelete
  40. Can this work with an iPod Touch 2G ?
    I am getting this
    root@ubuntu:/home/ubuntu# sudo ./loadibec openiboot.img3
    open_device: unable to connect to device.
    your device must be in recovery mode.

    iPod Touch 2G 3.1.3

    ReplyDelete
  41. @Hakim

    No! It hasn't been tested on the iTouch 2G!

    However if you still wan't to continue - turn your iTouch off, hold the home button and plug it into the USB port. Continue holding the home button until you get a picture of a USB cable and the iTunes symbol on the screen. Let me know if it works!

    ReplyDelete
  42. All,

    Pictures:
    http://img293.imageshack.us/img293/8518/image0044.jpg
    http://img72.imageshack.us/img72/615/image0043.jpg

    My initial observations.

    1. finds my wifi (WPA2) network but cant surf
    2. no camera, when I open it it says requires an SD card.
    3. no music, see above
    4. no bluetooth

    Other observations, the keyboard is a little touchy but i suspect you'd get used to it.

    Widgets are nice enough, as is wallpaper, seems pretty slick speed wise.

    runs very hot and chews juice like a fat boy with candy

    ReplyDelete
  43. Has anyone gotten this to work on a 3g?

    ReplyDelete
  44. Did anyone fix this: openiboot hangs after:
    "radio: reading baseband nvram... done"

    ReplyDelete
  45. @etaekwandokid, please read the site! No, not yet.

    @facio, have you tried downloading the new .img3 file and then reinstalling? link has been updated

    ReplyDelete
  46. Hey the command sudo ./oibc didnt work

    ReplyDelete
  47. If anyone wants to see, I did a video: http://www.youtube.com/watch?v=ytsgsP_WlO0

    ReplyDelete
  48. What do you know!!!!

    The bloody thing works after all!!!!

    I havent been able to connect to my WiFi network though. Any idea on that?

    Also, how do we switch off / restart the phone??

    Cheers.....

    ReplyDelete
  49. @theskiddhard, It says it can't find any networks but if you just leave it it does pick up on them. To restart I hold the home and power buttons! dont know any other way.

    ReplyDelete
  50. @ Adam

    You are the man. Regardless of who created this port, you are the first one to write a "noob readable tutorial" ;)

    The WiFi started working on its own after the first reboot. Lack of power options sucks though. But i guess the dev has already started working on it by now.

    Looking forward to a stable release....

    Cheers....

    ReplyDelete
  51. @Adam
    i puted my iPod into restore mode.
    run sudo ./loadibec openiboot.img3 Done
    Taped power button nothing happen back to the apple OS
    i think thah the openiboot.img3 file is only for the iPhone devices.

    ReplyDelete
  52. Yes the guide worked fine for me as well. As Timbo mentioned, I had to keep the Home button pressed for a while (30s) when booting Android - otherwise it would get stuck at the distorted "Welcome to OpeniBoot" text and sit there. I am running redsn0wed 3.1.3 and used ubuntu vm from a hackintosh to follow the steps. Calling, texting, browsing over wifi working as advertised.

    Anyone been able to install apps from the marketplace?

    ReplyDelete
  53. This comment has been removed by the author.

    ReplyDelete
  54. @Adam
    Yes, I used updated openiboot file. As I see modded files from this post have different md5 checksum then files from official wiki page (see "Verify images" section): http://www.idroidproject.org/wiki/Installing_iDroid but probably this is okay because it works for many users.

    I'm using 3.1.2 OS but I think this is not a reason why it stuck on booting...

    ReplyDelete
  55. said...
    will this tutorial work on mac?...gratitude to concern citizen if anyone can give a link on mac..

    ReplyDelete
  56. I GOT IT WORKING PERFECT ;) but my wirelss don't work & camera don't work & no idea how to add music to my musicplayer anything can be fix of that i really do hope so ???

    ReplyDelete
  57. @Maged What is the problem with your wireless? The camera has no drivers to run on as of yet, need to wait for the iphonelinux people to create/rip them!. Digital storage is also a problem at the moment!

    ReplyDelete
  58. didnt work...
    http://www.youtube.com/watch?v=rOVOoHvO4G8

    ReplyDelete
  59. @mrhama, That's an iPhone 2G?

    ReplyDelete
  60. Hello. Great tutorial! One quick question. Is the files modded for wifi to work? Or can I use the ones planetbeing files and they would work?

    Let me know plz. Thanks much!

    By the way you were the 1st tutorial I think. Well this detailed!

    ReplyDelete
  61. hey guys...this is a great implementation to run android in iphone os. but why should you change the way iphone running?..
    what's the different between OS and android?
    tnx...

    ReplyDelete
  62. @Adam it says its connected to my network with no use when i open the browser it dun wanna open any page thats the problem anyidea ? coz if wirless & music worked for me iam staying on it

    ReplyDelete
  63. @admin, I found some files with all the drivers ripped from the iphone already! So yeah the WiFi will work.

    @Maged, Change your DNS server in the network settings to:
    Primary: 8.8.8.8
    Secondary: 8.8.4.4

    ReplyDelete
  64. @admin would u share the drivers lol :D n tell us how & btw where is the dns server can't find it

    ReplyDelete
  65. yea i got the wifi to work but waitting ur answer for the drivers

    ReplyDelete
  66. Admin on here is Adam btw, I need to change my blogger name :lol:

    Thanks for the reply Adam as i was reading that it cant be posted. I am surely going to use your files now! Because if i use the original i'd need to patch it later on. (original ones from the android/iphone blog doesnt have it i assume)

    @Maged,
    I believe that's all the drivers out so far, or ported.

    Adam, is it possible to tell us how to add drivers later on? Is it an easy process?
    Just in case i need to help someone add wifi drivers later or add released drivers.

    Thanks buddy.

    ReplyDelete
  67. this is too good. i was admin. I got it to work and stuff.

    Some images
    http://img12.yfrog.com/img12/9434/84dra.jpg
    http://img263.yfrog.com/img263/4835/jf4.jpg

    I made a mistake and took my wifi off or something and it couldnt reload my WPA connection. Stupid me forgot to load the DNS IP's and ended up losing my Lease.

    Anyway, how to reboot this thing!? hahaha.

    ReplyDelete
  68. shit im posting again! just remember to get libreadline5 ok. There are a few libreadline.

    Also, you can use iFunBox to copy the files to your phone instead of using SSH and getting a beer :P
    It take about 5mins max.

    ReplyDelete
  69. @Maged and Admin,

    I don't quite get what drivers you want? It's not too hard to add them later, at worst you will have to do step 9 again.

    ReplyDelete
  70. @MiBaksh, I will check out iFunBox, You know how to reset yet? If not you hold down power and home button together for about 10 seconds. I will add a note saying get libreadline5, Thanks for that.

    To all others, Send this tutorial around! I want to make it the best one available - If anybody wants to contribute by making videos or adding to my post then it will be appreciated! Heres the Facebook group http://www.facebook.com/group.php?gid=111334035572247

    ReplyDelete
  71. i get loop with this error "iphone-sdio controller signalled command timeout"

    Anyone idea?

    ReplyDelete
  72. i have not been this excited since a while.

    Thanks Adam for clearing that up. I was admin btw.

    Also, DO NOT UNINSTALL the newer libusb1.1.4. Just install libusb1.00 and libreadline-5. I uninstalled the newr one on my desktop version and shit hit the fan. My flash drive stopped working and my hard drive wasnt able to mount and had to redo ubuntu LOL.

    thanks Adam for continuous help.

    I will be writing a post on my experiences soon and if the site owner approves, i'll link you directly as a source for the tutorial. It makes no sense i writing over a post on how to do one when it's already here.

    U can use any USB method, like iPhoneBrowser, iPhone Explorer, DiskAid, etc.

    Also, to add, if users are on blackra1n, remember they must have afc2add if they are getting issues access the root. ;)

    that should be all and thanks again!

    ReplyDelete
  73. @MiBaksh, Yeah i'm more than happy to be linked! I will add any advice you have into the tutorial!

    ReplyDelete
  74. I'm getting the same loop as Deviance "iphone-sdio controller signalled command timeout". Anyone have any ideas?

    ReplyDelete
  75. @bajwa, thanks for your instruction. I also cannot boot directly to Android by pressing the home button at Openiboot screen. Just hold the home button for a few seconds and Android will boot up!

    ReplyDelete
  76. My iphone still stucked at radio: reading baseband nvram... done It boots in IphoneOS soo smooth, but not at Android... some Idea friends?!

    ReplyDelete
  77. thus it work in ipod touch 2g?

    ReplyDelete
  78. I'm on iPhone 2g, I've got iboot installed and used filezilla to trasfer files. At boot menu, I hold down home button for a solid 5 seconds, but my phone keeps getting stuck in linux command line jibber jabber....

    ReplyDelete
  79. open_device: unable to connect to device.
    your device must be in recovery mode.

    Any idea i have stuck here 3 days now pls help.
    Im with dual boot system no virtual box.
    My device is on recovery mode.
    i have try all the slolutions that i have found on the internet but the same thing.
    When im type at terminal 'lsusb' is seems all ok but when im going to load the android nothin the same error anyidea????

    ReplyDelete
  80. HEy man.....can u put an image to step number 4....i did not understand it...

    THANKS MAN

    ReplyDelete
  81. I get errors "./loadibec: error while loading shared libraries: libusb-1.0.so.0:" and "./oibc: error while loading shared libraries: libreadline.so.5"
    Both libusb and libreadline are installed.
    Any ideas ??

    ReplyDelete
  82. help me!!!!!! i Have an iphone 3g ive done everything but i get liusb error

    ReplyDelete
  83. I'm getting the libusb error too. I've tried every version of libusb and libusb-dev and verified that all the files exist, but it just doesn't work for some reason. :S

    ReplyDelete
  84. thanks a ton man !!! worked smoothly and i finally have android on my iphone !

    ReplyDelete
  85. BTW it is asking my for my sim pin..any ideas how to get past this ?

    ReplyDelete
  86. I would never like to fail out any chance to read out your listings.
    sim network unlock pin samsung

    ReplyDelete