<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7621429705016174469</id><updated>2011-11-27T16:55:39.839-08:00</updated><title type='text'>Android on the Iphone</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://androidoniphone.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7621429705016174469/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://androidoniphone.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7621429705016174469.post-3082077587449108002</id><published>2010-04-22T21:43:00.000-07:00</published><updated>2010-04-22T21:56:30.573-07:00</updated><title type='text'>Install Android on Iphone Guide</title><content type='html'>&lt;object width="480" height="385"&gt;&lt;embed src="http://www.youtube.com/v/5yO2KQHkt4A&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;br /&gt;&lt;p class="MsoPlainText"&gt;&lt;span style="'font-family:"&gt;How to install iDroid: Android on your first-generation iPhone&lt;br /&gt;===============================&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoPlainText"&gt;&lt;span style="'font-family:"&gt;Download links to the required files are displayed in the left hand column on this page.&lt;br /&gt;&lt;br /&gt;These instructions describe how to build an Android system for iPhone 2G from&lt;br /&gt;sources. These instructions are currently just notes and are being gradually&lt;br /&gt;worked into a more readable form. Please submit questions and suggestions for&lt;br /&gt;clarification to #iphonelinux on irc.osx86.hu.&lt;br /&gt;&lt;br /&gt;The essential pieces for booting Android are:&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;1. Linux kernel&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;2. Wi-Fi and touchscreen firmware&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;3. Boot initrd&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;4. Android ramdisk.img&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;5. Android system.img&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;6. Android userdata.img&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;7. Android cache.img&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;8. openiboot&lt;br /&gt;&lt;br /&gt;Instructions for pre-built images&lt;br /&gt;---------------------------------&lt;br /&gt;&lt;br /&gt;If you have a prebuilt android.img.gz, ramdisk.img, system.img, userdata.img&lt;br /&gt;and cache.img, you still need to follow the directions in the "Firmware"&lt;br /&gt;section and add all the firmware files to&lt;br /&gt;&lt;br /&gt;/lib/firmware in android.img.gz (it's a compressed ext2 image)&lt;br /&gt;&lt;br /&gt;/etc/firmware in system.img (it's an uncompressed ext2 image)&lt;br /&gt;&lt;br /&gt;After this, you can skip down to "Installation".&lt;br /&gt;&lt;br /&gt;Linux kernel&lt;br /&gt;------------&lt;br /&gt;&lt;br /&gt;1. Check out commit e27f17b5318851395a66cbaf1524ea89ff8f0cb9 of the&lt;br /&gt;android-2.6.32 branch of git://android.git.kernel.org/kernel/common&lt;br /&gt;&lt;br /&gt;2. Apply the patches from android/kernel&lt;br /&gt;&lt;br /&gt;3. Fix the Makefile for your system (you may need to use Google's repo to&lt;br /&gt;check out your own copy of the Android toolchain).&lt;br /&gt;&lt;br /&gt;4. Use something based on android/kernel/.config as your .config&lt;br /&gt;&lt;br /&gt;5. Build&lt;br /&gt;&lt;br /&gt;Firmware&lt;br /&gt;--------&lt;br /&gt;&lt;br /&gt;These can't be redistributed due to copyright laws. The multitouch firmware&lt;br /&gt;will need to be extracted from your ioreg tree. Install iokittools from Cydia&lt;br /&gt;and perform ioreg -l -w 0 and pipe the result to some file. Read this file and&lt;br /&gt;look for entries under AppleMultitouchSPI for Firmware and A-Speed Firmware.&lt;br /&gt;These contain a simple hexadecimal encoding for the bytes of the firmware&lt;br /&gt;files. Convert and keep "Firmware" as zephyr_main.bin and "A-Speed Firmware"&lt;br /&gt;as zephyr_aspeed.bin.&lt;br /&gt;&lt;br /&gt;The firmware for the wi-fi can be found on Marvell's site at&lt;br /&gt;http://www.marvell.com/support.html Under "Choose a platform", select "Linux&lt;br /&gt;2.6 - Fedora" and click the Search button under the drop down box. The&lt;br /&gt;SD-8686-* zip archive will contain the files. Rename helper_sd.bin to&lt;br /&gt;sd8686_helper.bin and keep that and sd8686.bin.&lt;br /&gt;&lt;br /&gt;So, you have zephyr_main.bin, zephyr_aspeed.bin, sd8686_helper.bin, and&lt;br /&gt;sd8686.bin.&lt;br /&gt;&lt;br /&gt;It's also possible to cut a more recent version of the Marvell firmware from&lt;br /&gt;the iPhone kernel. Can someone create a firmware cutter utility for this&lt;br /&gt;stuff?&lt;br /&gt;&lt;br /&gt;Boot initrd&lt;br /&gt;-----------&lt;br /&gt;&lt;br /&gt;The Android initrd was created under a Debian installation of iPhone Linux&lt;br /&gt;(which is not currently available) using the create-initrd-android.sh script.&lt;br /&gt;However, if you read it, you can figure out generally how it's done.&lt;br /&gt;&lt;br /&gt;YOU WILL NEED TO COPY ALL THE FIRMWARE *.bins TO /lib/firmware on this&lt;br /&gt;ramdisk!&lt;br /&gt;&lt;br /&gt;You end up with android.img.gz&lt;br /&gt;&lt;br /&gt;Android images&lt;br /&gt;--------------&lt;br /&gt;&lt;br /&gt;First, checkout 1.6 (Donut) using Google's repo tool. Copy vendor/apple to&lt;br /&gt;vendor/apple in their tree. Rename data/sounds/AudioPackage2.mk to&lt;br /&gt;data/sounds/Android.mk (if you want the built-in sounds).&lt;br /&gt;&lt;br /&gt;Copy all the firmware *.bins to vendor/apple/firmware as well.&lt;br /&gt;&lt;br /&gt;Then, apply android/android.patch provided. Then, do the following to create a&lt;br /&gt;"generic" image:&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;. build/envsetup.sh&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;choosecombo&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;[Select device, debug, generic, engineering]&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;export TARGET_USERIMAGES_USE_EXT2=true&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;make -j4 PRODUCT-generic-eng&lt;br /&gt;&lt;br /&gt;Now wait forever for Android to build. You'll get ramdisk.img and system.img&lt;br /&gt;in out/debug/target/product/generic/. Ignore the other .img files, we won't be&lt;br /&gt;using them.&lt;br /&gt;&lt;br /&gt;Android ramdisk.img&lt;br /&gt;-------------------&lt;br /&gt;&lt;br /&gt;Create a blank 1 MB file and make a ext2 filesystem on it. Mount it as a&lt;br /&gt;loopback device. Rename the ramdisk.img from Android to ramdisk.img.gz. Use&lt;br /&gt;gunzip on ramdisk.img.gz. Use cpio -i -F ramdisk.img as root with the current&lt;br /&gt;directory in the new ext2 filesystem to extract the ramdisk files onto the&lt;br /&gt;ramdisk.&lt;br /&gt;&lt;br /&gt;Apply android/init.rc.patch to init.rc&lt;br /&gt;&lt;br /&gt;Make a directory called /cache&lt;br /&gt;&lt;br /&gt;Unmount and you have your ramdisk.img&lt;br /&gt;&lt;br /&gt;Android system.img&lt;br /&gt;------------------&lt;br /&gt;&lt;br /&gt;You can just use the system.img Android compiled.&lt;br /&gt;&lt;br /&gt;Android userdata.img&lt;br /&gt;--------------------&lt;br /&gt;&lt;br /&gt;You can start with a perfectly empty userdata.img (as long as its properly&lt;br /&gt;formatted). However, without the Dalvik caches, the boot will hang the first&lt;br /&gt;couple of times until those can be generated. This is some strange timeout&lt;br /&gt;issue.&lt;br /&gt;&lt;br /&gt;After the initial boot, you have to do&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;INSERT INTO secure (name, value) VALUES ('device_provisioned', 1);&lt;br /&gt;&lt;br /&gt;Using sqlite3 in the database&lt;br /&gt;&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;/data/data/com.android.providers.settings/databases/settings.db&lt;br /&gt;&lt;br /&gt;If the device is not "provisioned", it will automatically reject all incoming&lt;br /&gt;calls. Very stupid.&lt;br /&gt;&lt;br /&gt;Can someone please show me how this can be made less aggravating?&lt;br /&gt;&lt;br /&gt;Android cache.img&lt;br /&gt;-----------------&lt;br /&gt;&lt;br /&gt;This can just be an empty 50 MB ext2 filesystem.&lt;br /&gt;&lt;br /&gt;openiboot&lt;br /&gt;---------&lt;br /&gt;&lt;br /&gt;See the instructions in the openiboot folder in the iphonelinux repo.&lt;br /&gt;&lt;br /&gt;Installation&lt;br /&gt;------------&lt;br /&gt;&lt;br /&gt;0. Jailbreak your iPhone.&lt;br /&gt;&lt;br /&gt;1. Under the jailbroken environment, put ramdisk.img, system.img, ramdisk.img,&lt;br /&gt;userdata.img, cache.img, android.img.gz, and zImage in /private/var.&lt;br /&gt;&lt;br /&gt;2. Follow the instructions for installing openiboot.&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;- Essentially:&lt;br /&gt;&lt;span style="mso-tab-count:2"&gt;            &lt;/span&gt;1. sudo ./loadibec openiboot.img3&lt;br /&gt;&lt;span style="mso-tab-count:2"&gt;            &lt;/span&gt;2. Use Hold button to select Console&lt;br /&gt;&lt;span style="mso-tab-count:2"&gt;            &lt;/span&gt;3. Push Home button&lt;br /&gt;&lt;span style="mso-tab-count:2"&gt;            &lt;/span&gt;4. sudo ./oibc&lt;br /&gt;&lt;span style="mso-tab-count:2"&gt;            &lt;/span&gt;5. Type install&lt;br /&gt;&lt;span style="mso-tab-count:1"&gt;      &lt;/span&gt;- loadibec and oibc are compiled for x86 Linux.&lt;br /&gt;&lt;span style="mso-tab-count:2"&gt;            &lt;/span&gt;- Need libusb, pthreads, readline.&lt;br /&gt;&lt;br /&gt;Running&lt;br /&gt;-------&lt;br /&gt;&lt;br /&gt;In the openiboot bootloader, it should be enough to select Console with Hold&lt;br /&gt;and hold the Home button for more than two seconds to trigger the boot of&lt;br /&gt;Android.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7621429705016174469-3082077587449108002?l=androidoniphone.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://androidoniphone.blogspot.com/feeds/3082077587449108002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://androidoniphone.blogspot.com/2010/04/install-android-on-iphone-guide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7621429705016174469/posts/default/3082077587449108002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7621429705016174469/posts/default/3082077587449108002'/><link rel='alternate' type='text/html' href='http://androidoniphone.blogspot.com/2010/04/install-android-on-iphone-guide.html' title='Install Android on Iphone Guide'/><author><name>Nick</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
