Installing Cupcake on your ROOTED G1 (or Dev phone)

Search This thread

Koush

Retired Recognized Developer
Sep 21, 2007
917
872
Edit 4/16/2009: New build published on my website:
http://www.koushikdutta.com/2009/04/have-you-cupcake-and-eat-it-too.html

The linked instructions on my blog will stay up to date, I can't guarantee this post will. I recommend going to my site to get full up to date instructions: http://www.koushikdutta.com/2008/12/building-android-source-and-deploying.html


Summary:

This is simply a build of the Android source tree with the Maps application included. Note that this does not have Gmail, YouTube, Market, or IM.
This is just a preview of what is to come in the next OTA update. I would not say this is a really usable build by any means.

Here is the list of new features: http://source.android.com/roadmap/cupcake

Installation prerequisites:
  • You must have a rooted (or a dev) phone.

Installation:
  1. Install the JesusFreke's RC30 V1.3. This will give you a root shell root access in recovery mode. A root adb shell is required for the next step. http://xdaforums.com/showthread.php?t=443713
  2. Install the engineering boot loader. http://xdaforums.com/showthread.php?t=455860
  3. Download the cupcake installation images to your computer. Extract them to a folder somewhere. http://koushikdutta.blurryfox.com/G1/cupcake.zip
  4. Start your phone up into fastboot mode. You can do this by shutting your phone off, and holding camera and power. You will see Androids on skateboards.
  5. Connect your phone to your computer. Press the back button on your phone until your screen says FASTBOOT.
  6. Go to a terminal on your computer and navigate to your extracted files and type:
    • chmod a+x fastboot
    • ./fastboot flash system system.img
    • ./fastboot flash boot boot.img
    • ./fastboot flash userdata userdata.img
    • ./fastboot reboot
    • If your phone hangs for a long time while flashing or rebooting, unplug and reconnect your phone. I run into this issue, and that is how I work around it.

Done!


Do it Yourself Instructions
At the time of writing, the Android Dream build was broken. I needed to do the following to make it work:
  • Several (relatively minor) changes in the Dream audio driver code to fix compilation issues.
  • Copied libOmxCore.so to mydroid/out/target/product/dream/system/lib (this was a missing step in the Building for Dream documentation, and something that should be in the HTC provided script)
Patching in Maps (or other files) into your system.img
  1. Copy Maps.apk from a Android Dev Phone 1 into mydroid/out/target/product/dream/system/app
  2. Copy com.google.android.maps.jar from a from a Android Dev Phone 1 into mydroid/out/target/product/dream/system/framework
  3. Delete mydroid\out\target\product\dream\obj\PACKAGING\systemimage_unopt_intermediates\system.img
  4. Delete mydroid\out\target\product\dream\system.img
  5. make
 
Last edited:

dwang

Senior Member
Nov 23, 2008
2,453
318
For those who are already running cupcake, how is the updated browser with the new javascript engine? Is it much faster than rc30?
 

jashsu

Senior Member
Nov 15, 2008
1,849
20
Nice walkthrough. I resynced with the repo after jbq announced cupcake was merged in but still had some issues with the radio for some reason. At this point I figure i'm just going to wait it out for the official update, as my G1 is still my daily driver.

One note on the installation instructions: I believe you have to hook up the USB before pressing the back button for FASTBOOT to show up. I'm sure most folks interested in this will figure it out easily enough. Also, i'm glad you had a positive experience with flashing from VMware. After learning an expensive lesson in the past i've always booted into real Linux for any kind of flashing or development operation. ;)
 

Koush

Retired Recognized Developer
Sep 21, 2007
917
872
Also, i'm glad you had a positive experience with flashing from VMware. After learning an expensive lesson in the past i've always booted into real Linux for any kind of flashing or development operation. ;)

With the NAND backup/restore tool and some basic knowledge of how this all works, I'm not too worried about bricking the G1. I actually erased the system partition and booted just to see what would happen, hehe.
And even if I do brick it, I have a another backup G1 on my desk. :)
 
Last edited:

Koush

Retired Recognized Developer
Sep 21, 2007
917
872
Nice walkthrough. I resynced with the repo after jbq announced cupcake was merged in but still had some issues with the radio for some reason. At this point I figure i'm just going to wait it out for the official update, as my G1 is still my daily driver.

One note on the installation instructions: I believe you have to hook up the USB before pressing the back button for FASTBOOT to show up. I'm sure most folks interested in this will figure it out easily enough. Also, i'm glad you had a positive experience with flashing from VMware. After learning an expensive lesson in the past i've always booted into real Linux for any kind of flashing or development operation. ;)

Hmm, I tested calling and it worked fine for me. Are you sure you made a Dream targeted build?
 

jashsu

Senior Member
Nov 15, 2008
1,849
20
With the NAND backup/restore tool and some basic knowledge of how this all works, I'm not too worried about bricking the G1. I actually erased the system partition and booted just to see what would happen, hehe. And even if I do brick it, I have a another backup G1 on my desk. :)
Infernix's nand scripts in conjunction with the engineering bootloader do provide a significant safety net for installing custom Android builds.

Hmm, I tested calling and it worked fine for me. Are you sure you made a Dream targeted build?
Yeah I performed the steps on the build-for-dream page. I think it was more of a matter of just needing to blowing away my local repository and getting the entire thing fresh? The keyboard is nice. I'm also optimistic about the new JS engine, but imo some kind of ad-blocking ability would be much more low hanging fruit in terms of speeding up pageloading.
 

staulkor

Senior Member
Jan 12, 2007
259
32
Phoenix, AZ, USA
Wow, I just put this on my phone and you arent kidding when you say it is not usable by any means. The APNs arent even programmed in :p

I installed it to play with it and the new on screen keyboard is nice. I cant wait for this to be live, and of course, ill wait until there is a hacked way to update to the new version. If you plan on keeping root, DO NOT get this OTA when it comes out.
 

IzzeLing

Senior Member
Nov 9, 2008
56
3
For some reason I can't get fastboot to recognize my device... It just gets stuck at the waiting for device task. Tried it across my laptop, desktop, and VM Linux, so must be me doing something wrong.. Any clues? I've tried removing/plugging in the G1 and it is definitely in FASTBOOT mode.
 

Koush

Retired Recognized Developer
Sep 21, 2007
917
872
Nice walkthrough. I resynced with the repo after jbq announced cupcake was merged in but still had some issues with the radio for some reason. At this point I figure i'm just going to wait it out for the official update, as my G1 is still my daily driver.

One note on the installation instructions: I believe you have to hook up the USB before pressing the back button for FASTBOOT to show up. I'm sure most folks interested in this will figure it out easily enough. Also, i'm glad you had a positive experience with flashing from VMware. After learning an expensive lesson in the past i've always booted into real Linux for any kind of flashing or development operation. ;)

For some reason I can't get fastboot to recognize my device... It just gets stuck at the waiting for device task. Tried it across my laptop, desktop, and VM Linux, so must be me doing something wrong.. Any clues? I've tried removing/plugging in the G1 and it is definitely in FASTBOOT mode.

Make sure that in your Ubuntu VM, "High Composite Device" is checked in the removable devices list. Then unplug it, and plug it back in.
 

Koush

Retired Recognized Developer
Sep 21, 2007
917
872
Im trying this now and it isnt working. It reflashed, but im stuck on the android screen with android just sitting there flashing...:mad:

Help?

Did you successfully flash all three files?
Regardless, the initial boot takes quite a while (several minutes). It needs to optimize all the APK files using DexOpt.
 

staulkor

Senior Member
Jan 12, 2007
259
32
Phoenix, AZ, USA
Did you successfully flash all three files?
Regardless, the initial boot takes quite a while (several minutes). It needs to optimize all the APK files using DexOpt.

You may not have understood me correctly. I got cupcake installed and working! But it just isnt usable as an every day phone. Im trying to go back to JF's RC30 but it wont. It flashed successfully, but now when I turn on the phone, it is stuck at the android loading screen. I have rebooted the phone a few times and its been sitting here for 15 minutes.
 

Koush

Retired Recognized Developer
Sep 21, 2007
917
872
You may not have understood me correctly. I got cupcake installed and working! But it just isnt usable as an every day phone. Im trying to go back to JF's RC30 but it wont. It flashed successfully, but now when I turn on the phone, it is stuck at the android loading screen. I have rebooted the phone a few times and its been sitting here for 15 minutes.

Oh, I see. Make sure you hard reset too. If hard resetting does not work, I'll give you a boot.img and recovery.img to flash.

You can hard reset holding Power and Home. Then press Alt-L to bring up the menu, and Alt-W to wipe.
 
Last edited:

staulkor

Senior Member
Jan 12, 2007
259
32
Phoenix, AZ, USA
Oh, I see. Make sure you hard reset too. If hard resetting does not work, I'll give you a boot.img and recovery.img to flash.

You can hard reset holding Power and Home. Then press Alt-L to bring up the menu, and Alt-W to wipe.

:eek: Why didnt i think of that, lol. JF RC30 update + hard reset = revert back from cupcake. Thanks man, I owe you :D