Author Topic: [TUT] Installing 0.2b with GApps and SDCard on 3G  (Read 15276 times)

Offline brampower

  • Member
  • Posts: 169
  • Karma: +0/-0
    • View Profile
    • http://www.droidappz.org
[TUT] Installing 0.2b with GApps and SDCard on 3G
« on: May 25, 2010, 07:24:43 PM »
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:
Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
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:
Code: [Select]
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.
« Last Edit: July 01, 2010, 06:07:06 PM by brampower »
Device: iPhone 3G 8GB
iDroid: iDroid 0.2b w/ fergy\'s kernel, SDCard and GApps

[TUT] Installing 0.2b with GApps and SDCard on 3G


Offline iPwnUK

  • Member
  • Posts: 206
  • Karma: +1/-0
  • *Insert Witty Comment Here*
    • View Profile
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #1 on: May 25, 2010, 07:38:32 PM »
Nice guide, just two things i noticed:
First of all, i used WinSCP for my install and it didn't throw any errors while installing, so i dont know if it was just a fault your end if you tried to use it.
and secondly, the SD card image, when using 'count=500000', the sdcard.img is actually 488 MB (512,000,000 bytes), not 512MB ;) you would have to say 'count=512000' for it to be 500MB, or 'count=524288' for it to be 512MB :)
--------------iPhone 3G with--------------
iOS 4.1, Android 2.2.1 & PSFreedom

---iPhone 4 with Jailbroken iOS 4.1----
-------Game Center ID - iPwnUK--------

Follow @iDroidProject on Twitter for latest updates!

Offline brampower

  • Member
  • Posts: 169
  • Karma: +0/-0
    • View Profile
    • http://www.droidappz.org
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #2 on: May 25, 2010, 07:50:21 PM »
Quote from: "iPwnUK"
Nice guide, just two things i noticed:
First of all, i used WinSCP for my install and it didn't throw any errors while installing, so i dont know if it was just a fault your end if you tried to use it.
and secondly, the SD card image, when using 'count=500000', the sdcard.img is actually 488 MB (512,000,000 bytes), not 512MB ;) you would have to say 'count=512000' for it to be 500MB, or 'count=524288' for it to be 512MB :)

I've read on this forum that WinSCP gave problems for several users so I don't know about that but I'd just use FileZilla ;) I will edit the 512MB thing :)
Device: iPhone 3G 8GB
iDroid: iDroid 0.2b w/ fergy\'s kernel, SDCard and GApps

[TUT] Installing 0.2b with GApps and SDCard on 3G


Offline techno96

  • Member
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #3 on: May 26, 2010, 02:12:50 AM »
that script does not work right

Offline Nyra

  • Member
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #4 on: May 26, 2010, 03:57:26 AM »
Hey, I installed and everything went good, however when I am running android a popup saying that the process com.google.process.gapps has stopped unexpectedly. Also the boot time is outrageously long.

Offline imfunny

  • Member
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #5 on: May 26, 2010, 04:10:48 AM »
Great Tutorial!! thank you! the only thing i have to say is that by doing the first step and then replacing the system.img and android.img.gz you are effectively undoing the first step :) because you lose all the drivers!

I only realize after i couldn't control anything in android lol.

so i would suggest only using the 1 step to get the drivers and then adding a step to add those drivers to the new system.img and android.img.gz (i'm assuming they are different from the files in the 1st step)

EDIT: actually all you have to do is add /private/var/firmware/ to the iphone and put all firmware files in there! that is how the new openiboot works i guess!

Offline besweeet

  • Member
  • Posts: 54
  • Karma: +0/-0
    • View Profile
    • http://gumballtech.com
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #6 on: May 26, 2010, 06:20:02 AM »
Please be advised that if anything happens to Android (freeze while installing an application from Market or something like that) where, whenever you reboot, it'll hang at a black screen or won't properly boot, you'll have to replace ALL of the original files back to your device, which makes you lose all of your settings and other information.

Offline RevAlex

  • Member
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #7 on: May 26, 2010, 07:22:23 AM »
Market: server error has occurred
how fix?
Google account login in...

Offline brampower

  • Member
  • Posts: 169
  • Karma: +0/-0
    • View Profile
    • http://www.droidappz.org
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #8 on: May 26, 2010, 08:37:01 AM »
Quote from: "RevAlex"
Market: server error has occurred
how fix?
Google account login in...

Please try to use the Web Browser. Does it work? If it does not, please remove all the Android files and re-upload them trough SSH on your phone.

People saying that the script does not work: try to look in the thread of the script for a solution. Most of the problems with the scripts can be fixed easily :) if you can't figure it out you can post the error here and I will try to help you.

If GApps keeps Force Closing on you, try to reboot Android a few times. If that does not work please re-upload all the files onto your device with FileZilla. Be sure to do Step 7! If you don't do that step successfully you will get Force Closes on GApps.
Device: iPhone 3G 8GB
iDroid: iDroid 0.2b w/ fergy\'s kernel, SDCard and GApps

[TUT] Installing 0.2b with GApps and SDCard on 3G


Offline Lopi

  • Member
  • Posts: 49
  • Karma: +0/-0
    • View Profile
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #9 on: May 26, 2010, 05:20:36 PM »
Quote
Step 4:
At this point, we have OpeniBoot and Android installed on our device. Let's create an SDCard.

At step four, I don't think openiboot has been installed. The only way I can access openiboot is with iphodroid on my macbook. So, my question is how does openiboot install in your tutorial?

Offline brampower

  • Member
  • Posts: 169
  • Karma: +0/-0
    • View Profile
    • http://www.droidappz.org
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #10 on: May 26, 2010, 05:24:41 PM »
Quote from: "Lopi"
Quote
Step 4:
At this point, we have OpeniBoot and Android installed on our device. Let's create an SDCard.

At step four, I don't think openiboot has been installed. The only way I can access openiboot is with iphodroid on my macbook. So, my question is how does openiboot install in your tutorial?

Get into OpeniBoot trough IphoDroid, then go to 'Console' (where you can select iOS, Console and Android) and wait for it to show the Welcome to OpeniBoot message.
Leave the USB still connected and on your MacBook run this command:
Code: [Select]
sudo ./oibc
The same messages that appeared on the iPhone screen should now appear in Terminal. Now, in Terminal type 'install'. Wait for it to finish and type 'reboot'. Now, everytime you turn your iPhone on it will launch OpeniBoot! :)
Device: iPhone 3G 8GB
iDroid: iDroid 0.2b w/ fergy\'s kernel, SDCard and GApps

[TUT] Installing 0.2b with GApps and SDCard on 3G


Offline Lopi

  • Member
  • Posts: 49
  • Karma: +0/-0
    • View Profile
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #11 on: May 26, 2010, 05:39:47 PM »
Quote from: "brampower"
Quote from: "Lopi"
Quote
Step 4:
At this point, we have OpeniBoot and Android installed on our device. Let's create an SDCard.

At step four, I don't think openiboot has been installed. The only way I can access openiboot is with iphodroid on my macbook. So, my question is how does openiboot install in your tutorial?

Get into OpeniBoot trough IphoDroid, then go to 'Console' (where you can select iOS, Console and Android) and wait for it to show the Welcome to OpeniBoot message.
Leave the USB still connected and on your MacBook run this command:
Code: [Select]
sudo ./oibc
The same messages that appeared on the iPhone screen should now appear in Terminal. Now, in Terminal type 'install'. Wait for it to finish and type 'reboot'. Now, everytime you turn your iPhone on it will launch OpeniBoot! :)

Thanks for the reply, brampower. I will do this when I get off work today. I'm really looking forward to dual booting Android with as many features as possible. Your tutorial is helping me accomplish my goal, and I would like to thank you for making it. I would recommend updating your tutorial with the information you provided above. I have one more question; do I have to restore my phone's firmware after installing openiboot?

EDIT: Also, which kernel would you recommend using (fergy or alex)?

Offline iPwnUK

  • Member
  • Posts: 206
  • Karma: +1/-0
  • *Insert Witty Comment Here*
    • View Profile
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #12 on: May 26, 2010, 05:56:30 PM »
no, you dont have to restore your phones firmware after you install openiboot :)
--------------iPhone 3G with--------------
iOS 4.1, Android 2.2.1 & PSFreedom

---iPhone 4 with Jailbroken iOS 4.1----
-------Game Center ID - iPwnUK--------

Follow @iDroidProject on Twitter for latest updates!

Offline brampower

  • Member
  • Posts: 169
  • Karma: +0/-0
    • View Profile
    • http://www.droidappz.org
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #13 on: May 26, 2010, 06:26:07 PM »
Quote from: "Lopi"

Thanks for the reply, brampower. I will do this when I get off work today. I'm really looking forward to dual booting Android with as many features as possible. Your tutorial is helping me accomplish my goal, and I would like to thank you for making it. I would recommend updating your tutorial with the information you provided above. I have one more question; do I have to restore my phone's firmware after installing openiboot?

EDIT: Also, which kernel would you recommend using (fergy or alex)?

Like iPwnUK said, you don't have to restore.

Thank you for the compliment :) I love to read replies like that.
I tried both alex's kernel and fergy's kernel, and for now I am sticking with fergy's kernel. It has Bluetooth and boots just as fast as alex's kernel. If you want to use ADB trough USB, I'd recommend alex's kernel. If not, I'd recommend fergy's kernel (you can just adb trough wifi without a problem) :)
Device: iPhone 3G 8GB
iDroid: iDroid 0.2b w/ fergy\'s kernel, SDCard and GApps

[TUT] Installing 0.2b with GApps and SDCard on 3G


Offline Noltari

  • Member
  • Posts: 166
  • Karma: +0/-0
    • View Profile
Re: [TUT] Installing 0.2b with GApps and SDCard on 3G
« Reply #14 on: May 26, 2010, 08:11:15 PM »
Great tutorial!

Thanks for posting it, because I'm busy with final exams and I can't dedicate the time I'd want to the project :(.
Source: http://github.com/Noltari/iphonelinux
[iPhone 3G] OpeniBoot Builds: viewtopic.php?f=18&t=225
[iPod Touch 1G] OpeniBoot Builds: viewtopic.php?f=16&t=94