Hey guys,
I see several people on this forum that have trouble getting their GApps and SDCard to run. With this tutorial I'd like to (try and) help all of you with this problem.
Step 1:[/u]
First of all, we need to install OpeniBoot and Android on the device. To do this you can run this script (Linux) or this application (OSX). You can also use this tutorial to do it manually.
Step 2:[/u]
These scripts do NOT install 0.2b, so when you're done installing OpeniBoot and Android you have to boot back into your iPhone OS and establish a ssh-connection. I prefer to use FileZilla to do this. Please be sure that you are NOT using WinSCP. Using WinSCP will screw your files up and give you errors. When you've done this you have to download 0.2b (get it here).
Step 3:[/u]
Unzip the files. You will see a folder with several *.img files in it, an *.img.gz file and a file without an extension called 'zImage'. In FileZilla, go to '/private/var'. You should see the same files as you have in your folder. Delete these files in FileZilla and copy the files you just extracted (from idroid-release-0.2-3g_rooted_with_sd_emulation_backlight_and_dns_fixed.tar.bz) to '/private/var/'. When this is done you have to be sure to CHMOD all the files to '777' (right click on the file - file permissions - enter 777 in the inputfield.'
OPTIONAL: If you want to use the custom 'alex' kernel, you need to remove the 'zImage' file in FileZilla and copy
this one into FileZilla (after extracting the rar file). This kernel improves boot-speed drastically and lets you use ADB trough USB, but several users are complaining about having no sound and there seem to be some ADB problems with it.
Step 4:[/u]
At this point, we have OpeniBoot and Android installed on our device. Let's create an SDCard.In Linux (I prefer to use Ubuntu trough VMWare in Windows 7), open a Terminal window. In this window put the following commands:
cd ~/Desktop
dd if=/dev/zero of=sdcard.img bs=1024 count=500000
mkfs.ext2 sdcard.img
There should now be a file called 'sdcard.img' on your Ubuntu desktop. You can just drag this file from VMWare onto your actual desktop and it will be copied. Now transfer the file 'SDCard.img' from your desktop into '/private/var/' trough FileZilla. When this is done (it will take a while) set the permissions to 777.
That's it! Now you have Android thinking you have a 488MB SDCard mounted. If you want a bigger SDCard, you have to replace the number in "count=500000".Step 5:[/u]
There are people who are having trouble with getting the SDCard to work with stuff they download from the Browser. To fix this issue, first try to download a file. It will say that you have unsufficient space on your SDCard. After you get this error, ADB into your device (how?) and type 'adb shell'. This will bring you into the terminal of the phone. You should now see '#' in the terminal.
Enter these commands:
chmod 6777 /sdcard
chmod 6777 /sdcard/download
Now try to redownload the file. It should not give you the insufficient space-error
Let's get the GApps working!Step 6:[/u]
First of all, we need to transfer the GApps into Android. Download this script and
this file. Unzip the 'installer.zip'. This will give you a *.sh file. Put the installer.sh file (the one you just extracted) and the other file you just downloaded (signed-dream_devphone_userdebug-ota-14721.zip) onto your Ubuntu(!) desktop. If you are using VMWare, you can just drag&drop it.
You also need to get the 'system.img' that you are using onto the Ubuntu desktop. The system.img is in the "idroid-release-0.2-3g_rooted_with_sd_emulation_backlight_and_dns_fixed" folder that we downloaded at step two. Drag the 'system.img' onto the Ubuntu desktop.
Step 7:[/u]
When you got all the files ready, run 'installer.sh' with Terminal (in Ubuntu). After running the script successfully (make sure to run it as root! use 'sudo', else it will fail!) don't close Terminal just yet. Enter these commands:
cd ./Desktop
mkdir system
sudo mount -o loop system.img system
cd system/app
sudo chmod 6755 *.apk
cd ../..
sudo umount system
Step 8:[/u]
Now, your system.img file is ready. SSH it into your iPhone (boot into iPhone OS if you haven't already, use FileZilla to connect to your iPhone and go to '/private/var/', delete the current system.img and copy your new system.img into it. Be sure to set the permissions to 777 again!). Now boot into Android!
Step 9:[/u]
You might get some Force Closes when you run Android, don't worry about it. Just click 'Close' or 'Wait'. Hook your iPhone up to your laptop trough USB and connect it to Ubuntu (in VMWare, go to VM --> Removable Devices --> iPhone 3g --> Connect) and connect it to ADB in Terminal. When you have ADB connection, do the following:
Open up signed-dream_devphone_userdebug-ota-14721.zip that u downloaded earlier (it should still be on your Ubuntu desktop). Extract the file. You should now have a folder called 'system'. Open it, go to the 'app' folder and you should see a file called SetupWizard.apk. Put this file (SetupWizard.apk) on your Ubuntu desktop.
In Terminal, type the following commands in this order:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
exit
cd ./Desktop
adb push SetupWizard.apk /system/app
adb shell
chmod 6755 /system/app/SetupWizard.apk
exit
Now make sure you have an active network connection trough your WiFi in Android (you can use Browser to see if you can load webpages). If your internet is working, try to open the Market app. It will now ask for your Google login credentials. Enter them, follow the instructions and that's it!
You now have a fully working Android installation with GApps and SDCard![/u]
If you have any questions, feel free to ask them. Also this is the first tutorial I ever wrote so it's probably shitty, I'm just trying to help you guys out.
Special thanks to:iPwnUK, nitestarzz, alex, sergiomcfly, scognito, Noltari
If I used something that belongs to you in this tutorial please let me know. I tried to give everyone credit but I might have forgot you.