User: Password:
Subscribe / Log in / New account

Messing around with CyanogenMod 6

Did you know...? is a subscriber-supported publication; we rely on subscribers to keep the entire operation going. Please help out by buying a subscription and keeping LWN on the net.

By Jake Edge
September 1, 2010

Perhaps the novelty should be wearing off, but the ability to update your phone to code of your choosing is still rather amazing. For those who have older phones, which are generally neglected by carriers and manufacturers who quickly move on to the next "big thing", it can extend the life of a fairly large investment. For others, who just want to explore the capabilities of the phone hardware outside of the box created by the industry, changing the firmware provides the freedom many of us have come to expect from computers. The much-anticipated release of CyanogenMod 6.0 (CM6), bringing Android 2.2 ("Froyo") along with a bunch of additional features to many different Android phones, serves as a reminder of the possibilities available with some phones today.

[CM6 home]

Amazing though it may be, reflashing a phone is always something of a nerve-wracking experience. Since I had a "spare" ADP1 phone—fully supported by CM6—sitting around, I decided to try the release on that phone. While the process went fairly smoothly, ADP1 owners should be warned that actually using the phone with that code is a bit painful—or was on my phone. The interface is fairly slow and unresponsive at times. While poking around, I realized that the Dalvik just-in-time (JIT) compiler was not turned on by default, but turning it on and rebooting only made for minor speed improvements. It did work well enough to convince me to try it on the Nexus One (N1) I use as my regular phone though.

The instructions for both phones (N1, ADP1) require installing a custom recovery image that gives more control over updating various portions of the firmware. I put the Amon_Ra recovery image on both, but not without a bit of consternation on the N1. Perhaps naïvely, I didn't think I needed to unlock the bootloader on the N1. The phone was given to me by Google at the Collaboration Summit in April and I expected it to essentially be the equivalent of the ADP1. So trying to use the fastboot utility to flash the recovery image gave an error and choosing recovery from the bootloader menu brought up a picture of an unhappy android—pulling the battery seemed the only way to get rid of it.

Unlocking the bootloader is a simple process using fastboot but it does void the warranty—however much warranty there is on a free phone—and it also "wipes" the phone, losing any settings, call records, applications, and so on. I considered fiddling with various backup solutions before deciding that a clean slate wouldn't be such a bad thing.

For the ADP1, three pieces were needed after the Amon_Ra recovery image: DangerSPL, CyanogenMod itself, and the optional Google Apps package. DangerSPL is a "second program loader" (SPL) that repartitions the system flash to provide enough space for CM6. It was ported from the HTC Magic phone to the Dream (aka G1, ADP1) and can brick the phone if used incorrectly, thus the Danger moniker.

On an amusing side note, I still had the Vodafone pre-paid SIM card from my recent trip to the Netherlands in the ADP1. I didn't pay too much attention to the setup screens and suddenly found myself in a Dutch-language interface. Given the SIM, that's a reasonable assumption for the phone to make, of course, but it required another wipe to get it into English. If I had been able to puzzle out enough Dutch to work through the settings menus, I could presumably have switched it back, but that proved challenging so I resorted to the wipe.

[CM6 screens]

For the N1, just CM6 and a Google Apps package was required after Amon_Ra. The zip files for the various pieces need to be stored on the SD card of the phone and the Amon_Ra recovery image then allows choosing files from SD to update the device. While it all worked quite well, and there are detailed, though somewhat scattered, instructions, it always seems like these upgrades have a few unexpected, heart-stopping wrinkles. A second, unexplained appearance of the unhappy android on the N1 was one such wrinkle.

The Google Apps package contains the closed-source applications that normally come with the phone: Market, Gmail, Maps, and so on. CyanogenMod created a separate package for those ("for copyright reasons" according to the site) after receiving a cease-and-desist letter from Google for distributing them as part of CyanogenMod. The "gapps" package does come from a different site, but at least so far, there are no reports of nastygrams from the Googleplex. It doesn't seem completely unreasonable to allow those applications to be distributed; the applications won't run on anything other than Android phones and phone owners are already licensed to use them. Newer applications that aren't officially available for older handsets like the ADP1 are perhaps more of a gray area.

So, after 30 minutes of futzing with installation (per phone roughly), what is CM6 like? It seems to be a very solid release, and I ran it for half a day on the ADP1 and more than a day on the N1 with no problems (other than the slowness on the ADP1, which is presumably due to older, slower hardware). There are many features in CM6 that are different than the stock Froyo that was previously running on the N1—too many to fully discover in the short time since it was released.

[CM6 drawer]

But there are several obvious things that stand out, starting with differences in the application "drawer" which shows the icons for all of the applications installed. Instead of the stock Froyo four-icon-width screen with 3D effects when scrolling, the application drawer in CM6 has five icons across and leaves out the scrolling effects. That, like many things in CM6, is configurable so that the number of columns can be changed for both portrait and landscape orientations.

Configurability is definitely one of the strengths of CM6. There are options for changing the user interface in various ways such as customizing the status bar, changing the available screen rotations, choosing the trackball notifications, modifying how the buttons and trackball input work, and lots more. While the ability to make so many changes is great for sophisticated users, one can see why Google and the carriers might be interested in reducing the number of calls they get from customers with wildly different settings.

It's not just the user interface that can be tweaked in CM6 as there are options to change application storage behavior (allowing all applications to be moved to SD and to set a default location for applications to be stored) as well as performance tweaks. The performance settings screen comes with a "Dragons ahead" warning because changing them could cause the phone's performance to get worse. Furthermore, no bug reports will be accepted for problems found when mucking with things like the VM heap size or locking the home application into memory. Those options are purely for experimentation purposes.

There are a whole host of other changes for CM6 that are listed in the changelog, including things like support for FLAC playback for those with a distaste for lossy audio formats (and lots of storage space). OpenVPN support, music application enhancements, browser incognito mode, home button long-press options, themable UI elements, and many more are on the list. There is much to discover in CM6, and I look forward to (too) many hours playing with the new software.

Unsurprisingly, the N1 (and ADP1 for that matter) still function quite well as a regular old cell phone since CM6 uses most of the Android code. Also as expected, it still sends and receives text messages, browses the web, and plays the bouncing cows game. It is, in short, a major enhancement to the capabilities already present in Android.

Unlike other Froyo-based "mods", CM6 is built from the Android source, rather than extracting various binaries from stock firmware. That makes it easier to trust the CyanogenMod code—one could build their own version for verification or customization purposes for example—but it is also what allows CM6 to support so many different handsets. There are nine separate phones listed as being supported by CM6.

As always, reflashing firmware, unlocking bootloaders, wiping settings, and voiding warranties should be done with some care and thought. $500+ bricks are not much fun. But the process has been successfully completed by many, including notoriously fumble-fingered LWN editors such as myself, and the additional capabilities that come with CM6 make it well worth the effort. I certainly can't see any good reason to return to the firmware distributed by T-Mobile.

(Log in to post comments)

Messing around with CyanogenMod 6

Posted Sep 2, 2010 3:08 UTC (Thu) by drag (subscriber, #31333) [Link]

I have found, also, that on my G1 the 2.x series was slow. Probably too slow for most people's tastes and they should stick with 1.6.

The most irritating part is that when switching from the application to the main system 'desktop' thingy it takes a long time for the icons to come up and the sliding back and forth to become usable again.

I think that it has less to do with CPU then with RAM. These phones are painfully short on memory and on storage. After being on my phone idles at about 7.4 MB available. That's with no applications running. So essentially I lost the ability to do multitasking with 2.2

I think that if I had 128MB or more ram then it would handle 2.2 with no problem other then having the animations be a bit slow.

Still the browser for 2.2 is massively better, has massive amount of better features over 1.6, and it is a bit faster at running emulation and games. So it's a good trade off for my purposes.

I am going to try to experiment with running a swap file and see if that helps. I know from previous experiences that the Android environment will agressively take advantage of any RAM your willing to give it, so if you make a big swap (like 2x ram) then it will treat it like real memory and just use the hell out of it. But I am guessing that a small swap file that is maybe 10 or 20MB may be the ticket for making the phone come back faster from switching applications.

Messing around with CyanogenMod 6

Posted Sep 2, 2010 3:10 UTC (Thu) by drag (subscriber, #31333) [Link]

Oh, yeah. Avoid using widgets and disable services you do not use.

For example I do not use gmail, I use K9 instead. So I disable the gmail syncing services and such things. Helps a little bit.

Messing around with CyanogenMod 6

Posted Sep 2, 2010 9:05 UTC (Thu) by Cato (subscriber, #7643) [Link]

I believe that a swap partition is essential to running Android 2.x on the G1, and tweaking various parameters - some people also use compcache. Without this, Android must continually kill processes when launching a new application, then kill that process to return to home screen, depending on how much RAM is taken by always-running processes. This is a lot slower than the delays you get from swapping.

The and sites have some useful tips on this.

Messing around with CyanogenMod 6

Posted Sep 2, 2010 15:46 UTC (Thu) by fb (subscriber, #53265) [Link]

My G1 performance (running Cyanogen 6.0) improved a lot after:
- turning off all window animations;
- turning off auto-rotate.


Messing around with CyanogenMod 6

Posted Sep 2, 2010 16:12 UTC (Thu) by pizza (subscriber, #46) [Link]

Yeah, RAM's the biggie.

I picked up an HTC Magic right after the CM6 announcement, and I've been playing with the phone for a few days now.

Turning on the JIT speeds execution up, but the JIT eats up so much memory that things end up slower overall. I turned that back off, plus some of the eye candy, and the phone is a lot snappier now.

Now if I could only figure out a way to import an SSL CA certificate...

Messing around with CyanogenMod 6

Posted Sep 6, 2010 19:01 UTC (Mon) by andrewburgess (guest, #57318) [Link]

make sure to try compressed swap; since you have cpu to spare this can reduce i/o requirements and speed swapping up.

good luck!


Posted Sep 2, 2010 5:08 UTC (Thu) by bvdm (guest, #42755) [Link]

"It doesn't seem completely unreasonable" - double negatives are bad writing style. How about "It would seem completely reasonable"?


Posted Sep 2, 2010 5:31 UTC (Thu) by jiu (guest, #57673) [Link]

They're not exact equivalents if you want to really nitpick. double negatives are a literary figure of style just as acceptable as an oxymoron.


Posted Sep 2, 2010 5:56 UTC (Thu) by bvdm (guest, #42755) [Link]

I was about to get into a whole argument about when particular styles are appropriate, but I think jordanb below makes my point better than I can.


Posted Sep 2, 2010 5:40 UTC (Thu) by jordanb (guest, #45668) [Link]

I don't think I completely disagree with you.


Posted Sep 2, 2010 15:40 UTC (Thu) by foom (subscriber, #14868) [Link]

Err. "It doesn't seem completely unreasonable" is *not at all* equivalent to "It would seem completely reasonable". More along the lines of "It might be somewhat reasonable"


Posted Sep 2, 2010 17:39 UTC (Thu) by bvdm (guest, #42755) [Link]

Actually no. You are missing the point why one would use a double negative in the first place. It is most often used to indicate irony.


Posted Sep 2, 2010 22:20 UTC (Thu) by foom (subscriber, #14868) [Link]

Okay, maybe I'm missing some wider point, but in the English that's practiced around where I live, "not completely unreasonable" is used as I said: to admit the chance that the action might possibly be at least somewhat reasonable.


Posted Sep 2, 2010 19:28 UTC (Thu) by martinfick (subscriber, #4455) [Link]

If you are going to be a grammar nanny, at least get it right. :)

The word "completely" in that sentence is the clue, it surely signifies that the value being discussed, reasonableness, is one which is NOT binary. If it were binary, the word "completely" would be redundant and useless (since binary implies true or false without any values in between, it implies completely).

Once the value of "reasonableness" is believed to be non binary, surely it should be obvious that "not completely unreasonable" is NOT equivalent to "completely reasonable". Give them numeric values if you have to:

"completely reasonable" +1
"completely unreasonable" -1
"not completely unreasonable" +1 through -1 but not including -1

Is that not completely clear?


Posted Sep 3, 2010 0:30 UTC (Fri) by bvdm (guest, #42755) [Link]

No. Again, as above, it all depends on the reason why a particular style was used. If irony was meant, than the opposite is true. But yes, you are kinda right, if the double negative was not meant to imply irony, there is even greater reason not to have used it.


Posted Sep 3, 2010 3:01 UTC (Fri) by martinfick (subscriber, #4455) [Link]

But it wasn't a double negative. Read my example again. Saying "it is not -1" is not at all the same as saying "it is 1". Irony has nothing to do with it. Please suggest a better way to say "it is not -1".


Posted Sep 6, 2010 19:07 UTC (Mon) by andrewburgess (guest, #57318) [Link]

"But yes, you are kinda right, if the double negative was not meant to imply irony, there is even greater reason not to have used it."

or less reason to have used it?

Messing around with CyanogenMod 6

Posted Sep 2, 2010 7:00 UTC (Thu) by djc (subscriber, #56880) [Link]

While I agree that allowing distribution of the gapps seems reasonable, I think that not all Android phones comes with licenses to them. IIRC several profiles of Android exist, and the gapps only get included with the Google experience profile.

I've been running OpenDesire, which is a pretty cool ROM that gets my Desire up to a very optimized carrier-free Froyo, but with not so much extra stuff that Cyanogen includes.

Messing around with CyanogenMod 6

Posted Sep 2, 2010 11:09 UTC (Thu) by Alphix (subscriber, #7543) [Link]

Sorry if this is somewhat offtopic :)

I've been considering an getting an Android phone and my main problem is the sheer number of devices to choose between (and the poor technical information available from your average store which doesn't really provide any assistance).

Which current (or soon to be released) Android phone would the LWN readership recommend for a technical user who values hackability and fast hardware?

A comparison with the Nokia N900 would also be nice :)

thoughts off the top of my head

Posted Sep 2, 2010 11:48 UTC (Thu) by tialaramex (subscriber, #21167) [Link]

I think it makes sense to prefer a handset which is seeing active CyanogenMod development. I don't have such a phone, and it seems to mean that if I want new firmware I need to find some dodgy ROM cobbled together by people who aren't much interested in source code availability, etc, or else wait for the vendor (who also doesn't seem much interested).

You should pay attention to hardware specs as you would with a new laptop. "Hackability" and "fast" are both likely to demand lots of RAM, so rule out older or cheaper options with low RAM (and make sure you're checking RAM, not "memory" which could include other things). CPU is important, but less so. Check that you can live with the screen, it's easiest to do this by borrowing a similar model from someone. Similarly for the on screen (or real) keyboard.

If you need a _phone_ first and foremost, then consider an alternative path altogether. Android is cool, but waves of cheap Android wireless tablets are landing, these are affordable as toys (unlike any of the devices you'd want as a phone) and there's less functionality to "brick" - a tablet doesn't have a complex and undocumented GSM radio subsystem. If you buy a not-so-hackable Android phone and a $100 tablet you could have most of the same fun, Android userspace apps will work on both, and you can receive phone calls while hacking (obviously an Android phone that's rebooting or having a kernel transplant is not also simultaneously functional as a telephone).

Messing around with CyanogenMod 6

Posted Sep 2, 2010 20:39 UTC (Thu) by Kamilion (subscriber, #42576) [Link]

Harald Welte recently got one of the Samsung Galaxy S androids I've been keeping an eye on;

"The Samsung Galaxy S (GT-I9000) seemed like a good candidate to me, for several reasons:

Samsung does not use cryptographic signature techniques and gaining root as well as flashing the AP software is relatively easy
The phone is based on a traditional separate application processor (AP) and baseband processor (BP) design. The AP is a Samsung S5PC110, the BP is some Qualcomm MSM6xxx.
High-end hardware, with the S5PC110 running at 1GHz and 512MB RAM"

"Samsung provides excellent "GPL source code offers" containing the Linux kernel used in their firmware - including detailed instructions in how to build it. Also, many of the drivers are included under GPL, such as drivers for all the integrated peripherals of the SoC, some custom components like the USB multiplexor ASIC, etc. as well as the driver for the dual-ported RAM between the AP and BP for the 3G Modem communication. The Android RIL shipped by Samsung contains lots of debugging/decoding/dumping code that can make reverse engineering the AP/BP protocol."

"So right now I'm in the exploration phase, making myself familiar with the bootloader, the flashing process, the userspace ABI of the custom (GPL licensed) kernel drivers, etc. It's a fairly pleasant experience so far, and I now have a debootstrap'ed Debian lenny on an additional ext2 partition on the SD card. This provides me with an actually useful userland I can chroot() into, such as lsof, strace, ltrace, tcpdump, etc. to do some more exploration of the phone."

Most US carriers are selling it under a different name:
T-Mobile: Samsung Vibrant has a similar feature set to the original Galaxy S, though it does not include a front-facing camera.
AT&T: The Samsung Captivate is similar to the original Galaxy S, though the form factor and case have been redesigned.
Sprint: The Samsung Epic 4G is a modified version of the Galaxy S to include 4G connectivity and a slide-out keyboard.
Verizon: The Samsung Fascinate is a modified version of the original Galaxy S.

Messing around with CyanogenMod 6

Posted Sep 2, 2010 21:15 UTC (Thu) by lab (subscriber, #51153) [Link]

As the owner of one, I can recommend the HTC Desire. It's basically a Nexus One + some more hardware (and software) goodies. It's screaming fast, very nice in the hand, and just got updated to Android 2.2 (here in Denmark). And of course you can put CyanogenMod ROM's (and others) on it. A lot of people have it, so it's well supported in all respects. Only downside I could mention is, that the (otherwise beautiful) AMOLED display is hard to see in bright daylight. Samsung has the Super AMOLED displays, e.g. in the Galaxy S, which supposedly does not suffer this, and should be equal to or better than the iPhone 4's retina display. But anyways, there are a bunch of gourgeous Android devices out there now, so it also depends on your preference for screensize etc...

Messing around with CyanogenMod 6

Posted Sep 5, 2010 21:59 UTC (Sun) by Tet (subscriber, #5433) [Link]

I'll give a recommendation for the N900. Mine is great. I'm afraid I've no idea how it compares to Android phones other than in the broadest of terms, though.

Copyright © 2010, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds