Its really amazing to change the default operating system of iPhone i.e. iOS. I tried it my self on my iPhone. And now I will share the way I did it.
My iPhone was having iOS 5.1.1 which is the latest one. So, first thing I had to do is to downgrade the operating system of iPhone to iOS 4.1.
Actually the software pack available to install Android on iPhone supports upto iOS 4.1, 4.2. That is why I had to downgrade the iOS. It was very tedious task for me as I was doing it for the first time.
You can also find the steps to downgrade very easily using Google. Its an art to downgrade iOS.
After downgrading you must need to jailbreak your iphone means you to get rid of all the restrictions imposed by Apple for your iPhone. Its not difficult to jailbreak your iphone. Many programs are available on the internet and the best part is all of them are free. Just use google the best software to suit your iphone model and ios version. Do not pay anything to your mobile vendors to jailbreak your iphone.
After Jailbreaking, you have to use Cydia Program. Jailbreaking moves around Cydia. It is similar to AppStore by Apple. Search Cydia for Bootlace. You have to install it on your iphone. In case you can not find Bootlace in Cydia. Then you have to add repository manually. In order to do this, you'll need to launch Cydia from the homescreen, tap on the Manage button, select Sources, then tap Edit, then Add. The repository you'll need to add is repo.neonkoala.co.uk. Tap Add Source, let Cydia work its magic, and then tap on your newly added repository and install Bootlace.
Then exit Cydia. Bootlace icon will be available on HomeScreen. launch Bootlace. If Bootlace isn't on your homescreen after you exitCydia, restart your iPhone and it should be there. Then just launch Bootlace, and let it download and patch the kernel. When it's done, tap on Reboot and wait for your phone to reboot.
Once your iphone is rebooted. Now you again have to launch Bootlace. Launch Bootlace again, tap the OpeniBoot button, and tap Install, then Continue. OpeniBoot will download and install.
When your OpeniBoot is installed. tap the iDroid button, tap Install, OK, and then wait. iDroid—which is essentially the Android OS customized for your iPhone—will download and install. This will take a while, so be patient. Make sure during download process, your iphone shouldn't get switched off. If required, connect charger to your iphone.
After downloading is completed, Android will be installed on your iphone. To start using Android, you have to launch Bootlace again. launch Bootlace and you will see a new option QuickBoot. Tap on QuickBoot. It will reboot your iphone into Android. Now you can play with Android.
Only problem I found with Android was power management. It completely drained out the 100% battery in just 2 hours. So its just fun to install Android on iphone but practically it can be used on regular basis.
To remove android, I connected iphone to itunes, I restored the iphone using itunes. Restoring from itunes, will remove Android completely and Jailbreak also and will bring you to actual iOS which is not Jailbroken.