Taking Android “cupcake” out for a spin

Computers & Mobile
Taking Android “cupcake” out for a spin

G1-vs-cupcake.png

The upcoming revision of the Android operating system, code named cupcake, has generated a lot of excitement among users of the first Android-based phone, the T-Mobile G1. Because Google’s Android operating system is Open Source, it’s possible, but a little difficult, to test cupcake out on a real phone.

Among the many improvements in cupcake is a much faster web browser, due in no small part to the adoption of the SquirrelFish JavaScript engine. The picture above shows the results of running the V8 JavaScript Benchmark Suite on a G1 running the most recent shipping version of Android (top) and an Android Dev Phone 1 (bottom) running the latest build from the Android source code repository. The top one didn’t even complete all the benchmarks, and only scored 1.08 and 1.54 on the ones it did complete (vs. 9.36 and 3.09) for the phone running the latest release.

To try this yourself, you’ll need an Android Dev Phone 1, a Mac OS X or Linux computer, and a few hours of time. This wouldn’t be possible if it weren’t for the folks (links below) who documented what you need to do. Here are the steps I took along with some notes you may find helpful:

Set up your computer for Android development

Google has posted instructions for obtaining the Android source code, which also includes information on setting up your computer so that you can compile this source code into an image that you can load on your phone. Don’t follow the instructions all the way; stop before you type “make”.

Install the Android SDK

There are two development toolchains for Android: the one from the previous step is what you need to compile the Android operating system; the second (the Android SDK) is what you need to create applications that run on Android. You don’t need the SDK to compile Android, but you do need one of the utilities included with it, adb, in order to manipulate the files on the phone.

Prepare the Android source code for building on a real device

Back in the first step, you did everything you needed to run Android on an emulator, but that’s not as much fun as doing it on the real thing. In this step, you’ll modify the Android source code so it’s (almost) ready to compile on the HTC Dream, which is the same device that’s been rebranded as the T-Mobile G1 and Android Dev Phone 1.

Tweak the Android source code some more

Jean-Baptiste Queru, a Google Engineer, has posted detailed instructions on what you need to do to before you type “gmake” (Mac OS X) or “make” (Linux). These directions are subject to change, so keep an eye on the discussions at the Android-Platform Google Group.

If you’re not sure what to do about changes 7699 and 7345, go to their code review pages: Change 7345/Change 7699 and run the “repo” command listed in the “Download” section. This will pull each change into your Android source tree click the “Side-by-Side” or “Unified” link for each file in the patch set. This will show you the changes that you need to manually apply to each file. As an alternative to Change 7345, you can run the following command from inside your mydroid directory to copy over the list of cellular data access points: adb pull /system/etc/apns-conf.xml development/data/etc/apns-conf_sdk.xml

Backing up and Flashing your Dev Phone

Anton Melser has written up a great guide (which covers most of the above points as well) that explains how you can back up the Android software that shipped with your Dev Phone, and also how you can install the new images that you compiled. There is a shortcut you can use to replace all the fastboot commands: to install all the freshly compiled images at once, and to reboot afterwards, run this from your mydroid directory:
export ANDROID_PRODUCT_OUT=./out/target/product/dream
./out/host/darwin-x86/bin/fastboot -w flashall

(Note that I’m using “darwin-x86” instead of the “linux-x86” shown in Anton’s instructions. Like me, Mac OS X users will use “darwin-x86”)

And that’s it. When your phone finishes rebooting, it will be automatically provisioned on the network; you won’t need to go through the out-of-box initial setup. You’ll find that most of the interesting applications aren’t there (no Maps, no Market, no Gmail), but the Browser and many other core apps are working fine.

It’s a complicated procedure to go through, but if you read everything twice before doing it, you should have no problems. And if something doesn’t work as you expected, check out (or jump into) the discussion over at the Android-Platform Google Group.

Update: There is a Terminal Emulator application that is installed by default, however it does not appear in the launcher. To make it appear in the launcher, edit the file development/apps/Term/AndroidManifest.xml and add this line in the <intent-filter> section, then (re)compile your images:
<category android:name="android.intent.category.LAUNCHER" />

Update 2: Joel Evans (of Geek.com) and I met up and shot some video of Cupcake in action. Check it out at First look: Android’s cupcake | Geek.com

2 thoughts on “Taking Android “cupcake” out for a spin

  1. Anonymous says:

    Having a great mobile app and unable to promote or support it? Then you ought to think about flipping it for a quick profit. You might even have an interest in Mobile Application but you don’t have the time or resources to create your own code. Either you require to sell or buy mobile applications, sell android source code is the best Marketplace.

Comments are closed.

Discuss this article with the rest of the community on our Discord server!
Tagged

I'm a tinkerer and finally reached the point where I fix more things than I break. When I'm not tinkering, I'm probably editing a book for Maker Media.

View more articles by Brian Jepson

ADVERTISEMENT

Maker Faire Bay Area 2023 - Mare Island, CA

Escape to an island of imagination + innovation as Maker Faire Bay Area returns for its 15th iteration!

Buy Tickets today! SAVE 15% and lock-in your preferred date(s).

FEEDBACK