I've been patiently waiting for Cyanogen to resolve the issues that caused Google to send him a cease and desist letter concerning his previous releases of his customized Android builds (ROMs to some - I think it's a misnomer). Well he worked out the issues - basically, they were unhappy with him packaging their closed source applications with his builds; even though their own build process includes the binaries! - and he was able to get rolling again. Prior to my recent upgrade, I was running CM 4.0.4 which was the last stable build prior to the C&D from Google. That version was very stable and I was pretty happy with it on my phone, but it had one nagging issue and that was that the phone would slowly degrade in performance the longer it had been running. (Android is a customized Linux with a Java like application layer on top, so you literally boot Linux when you power up the phone.)
So I watched intently as Cyanogen got rolling with a new unstable series of builds that didn't infringe on Google's intellectual property. (See they're not all sweetness and light and openess as some might believe.) The numbering of these builds was 4.1.x; numbered similarly to the Linux kernel with even minor version numbers indicate unstable and even indicating stable. The reports from people in the IRC channel (#cyanogenmod on irc.freenode.net) were that the speed of these builds was incredible. Cyanogen put in a different process scheduler than what stock Android is / was using. But it wasn't without issues. Stability was one, and another was randomly starting playing MP3 files. There were other things too and it was just enough to keep me from pulling the trigger and updating.
But at some point you have to release and the guys that help Cyanogen got things to a point that they considered stable and called version 4.2, then 4.2.1, then 4.2.3 and finally 4.2.3.1. And this is the build that I've been running since last weekend. I actually upgraded from 4.0.4 to 4.2.3 with the instructions on the xda-developers thread about the new release. (Have I mentioned how much I dislike xda-developers.com and all thread-based forum sites?) This process basically uses the fact that your phone is already rooted (since I had 4.0.4 already) to perform the update. In summary the process is that you lay down a new official Android 1.6 (Donut) build on your phone using the rooted recovery partition / image and then before completing the installation (by rebooting your phone), you then lay Cyanogen's new stuff over the top of the install thus replacing all the bits required to keep your phone rooted. If done correctly, you end up with a 1.6 rooted build. If done incorrectly, you lose root access to your phone, possibly permanently.
With that dire warning out of the way, what's good about the new version?
It keeps the lovely and indespensible apps2sd functionality (especially if you have a G1). It gives you the latest Android (source released) base OS. It features a tweaked CFS scheduler that positively is better than stock Android. It makes the phone respond like you always hoped it would from the start. My phone responded pretty well with 4.0.4 just after a boot and maybe for a day, but it never ran this well. 4.2.3.1 also has usb tethering. So your phone becomes your laptop's data link when you're out of normal network coverage or just don't want to use whatever WiFi is around you. I haven't recalibrated my phone's battery yet, but I've noticed that day by day, my battery life is improving. I used to be pushing it if I used my phone much throughout the day and would need to juice it up when I got home from work (or sometimes before). Today I noticed that at 5:30pm it was still at 48% capacity. That's a solid 11 hours with plenty of reserve. Word is that if I recalibrate it will get even better. (In other words the phone isn't showing the true capacity of the battery.)
What's bad, if anything?
By default, 4.2.3.1 doesn't use compcache or a swap file or a swap partition. But like all of CM's releases it can use that stuff if you want. To enable it you create a user.conf and userinit.sh in proper place and those 2 files control those and other settings. I enabled a 70M swap partition on my old, slow (unclassified == Class 2) 8g micro SD card. Since enabling swap, I've had occasional spurious reboots of the phone. I think these are related to a timing issue with the wifi radio and the swapping activity to/from the (sd card's) swap partition. I'm seriously considering upgrading to a Class 6 8g card to see if that helps. If it doesn't, I think I'll disable the swap partition. The only downside is that I'll take a penalty when I run all sorts of stuff like I do without some additional virtual memory to back it up.
Someone has updated the Cyanogenmod-updater on the Market and I was able to use it to upgrade from 4.2.3 to 4.2.3.1. Very easy and painless. I'm looking forward to whatever Cyanogen comes up with next. Email or call me if you have questions about the process or whether your phone will work for this update. If I can't get the answer, I can put the question in front of some guys that will know.

Just a place to put together some thoughts on Java, Technology and Other Stuff (tm) that interests me.
Thursday, November 5, 2009
Monday, September 7, 2009
Rooting your Android phone..
The background
I promised a few people a blog entry about rooting my T-Mobile / Android G1. I don't think anyone should enter into a firmware update for any device without considering the risk of brickage. The first thing I did was a fair bit of reading on the process and options. I stumbled upon an article on Lifehacker about why I might want to consider doing this to my extremely useful smartphone. That lead to another article on AndroidAndMe.com about how to actually gain root access to the phone (and more). This got me to the point where I was pretty sure that I wanted to root my phone and install firmware (or a ROM or image) that would improve it's operation but I still had some holes in my understanding of how it would all happen. And since I was risking the phone I've come to depend on daily, I wanted to understand things from end to end.Still need a bit more info..
It turns out there are quite a few options for new firmware for your Android phone. Some are more suitable for a daily-use phone than others, but that's the beauty of Android being open source. Lots of people grab the source and bend it to scratch whatever itch they have. I kept hearing about one guy's work who goes by the name of Cyanogen on the site xda-developers.com. (Phandroid did an interview with Cyanogen that gives a little more background about him and his work.) xda-developers.com turns out to be a thriving phone modding community with huge threads of discussion specifically about alternate G1 firmware(s). Reading through some of the thread about Cyanogen's latest stable build - 4.0.4 at this writing - helped to fill in more gaps to the point where I finally understood all the steps and software required to get me there. I posted a summary of how I thought it would go and asked for confirmation of my thinking. After an hour or so I got a couple of positive responses and knew I was finally ready to go with Cyanogen's 4.0.4 image.Assembling the new parts
Software required- One touch root app - flashrec
- Cyanogen's 1.4 recovery image
- Latest radio firmware (optional) - 2.22.19.26i
- Cyanogen's 4.0.4 alternate firmware - 4.0.4
- 4G or bigger Micro SDHC card - preferably a Class 6 card
- Backup, export, copy phone data to some place safe
- Backup existing SD card
- Create 3 partitions on the SD card in exactly the following order:
- Partition 1: format - FAT32, size - whatever is left over after subtracting partitions 2 & 3
- Partition 2: format - ext2/3/4, size - 512M (this is where most of your apps will live)
- Partition 3: format - linux swap, size - 32M (this is optional)
- Copy the stuff above to the FAT32 partition
- Install flashrec on the phone
- Run flashrec, backup current recovery image and install the 1.4 recovery image
- Reboot the phone into the recovery image mode
- Backup current T-Mobile cupcake firmware using nandroid
- Install 4.0.4 firmware
- Reboot (and wait for the first boot since lots of stuff is happening)
Ok, I tried it with my daughter's snapshot camera and Mr. Blurrycam appeared. I'm too tired / have a headache / am being lazy /whatever to try some other device now. No sense having a video of how things work when you can't see the phone screen anyway. So here's a link to a video that someone else did which shows them running flashrec to exploit the vulnerability and install the recovery image. NOTE! In the video below they show the complete process including wiping the existing phone, but they skip the process of backing up the current firmware using the nandroid backup menu item. I don't advise doing this (obviously)!
I'll try to get a video of my phone in action because I think that's what truly helps to make the determination if it's worth the (minor) risk.
Some stuff I learned along the way..
Once the phone is rooted, it does all the things the stock firmware did but more. That means that voicemail, the market, updates, etc. all work just as before. Only now you can run things like Wifi / Bluetooth tethering so that your phone can be a hotspot for your laptop when there aren't any other options. And the browser supports multi-touch. And so on. But you won't be getting any OTA updates from T-Mobile any longer, not that you need them.
The 1 touch root application exploits a known issue in the Android Cupcake (and earlier) bluetooth stack. This allows you to install a different recovery image (there is one included in the stock firmware too) that then allows you to install different, unlocked / rooted firmware. If you run the flashrec program and install the 1.4 recovery image and then just restart the phone without doing anything else, the stock firmware will overwrite the 1.4 recovery image with it's own. This confused me at first - so you could think of the flashrec program as a 1 time root access program. Of course you can just run it again and have another shot at gaining access to a recovery image that will allow you to install what you want. At some point Google / T-Mobile will close this exploit. In fact, the modified firmware that I'm running - 4.0.4 - has already fixed it. But 4.0.4, unlike the stock firmware, doesn't overwrite the recovery image when it starts, so you still have access to whatever recovery image you install to flash 4.0.4 in the first place.
The 4.0.4 firmware has something called App2SD turned on by default and it makes use of the 2nd partition on your SD card if it finds it formatted in any of ext2/3/4. Applications are stored on the card as is the dalvik VM cache. Application data remains on the internal memory of the phone. This was done to lessen the impact of writes to the SD card. It's also why you want to use the fastest SD card you can.
The 4.0.4 firmware uses something called CompCache to create a RAM based swap file for the phone while it's running. This is another reason that the 4.0.4 firmware is more responsive than the native firmware. It might also contribute to lower battery life, but for me, the jury is still out on how well the phone does w.r.t. power consumption. I hear that the 4.1 stuff that Cyanogen is working on (based largely on Android Donut branch) will greatly improve the battery life of the phone. Looking forward to that.
A rooted Android phone is not the same thing as an unlocked phone. If you want your T-Mobile phone unlocked as well you need to contact T-Mobile and ask them to give you the unlock code.
The nandroid backups that the recovery image makes can also be restored by the recovery image. However, the recovery image restore menu item will only restore the latest backup. So if you want to restore something earlier, you need to remove any newer image backups from the nandroid folder on the phone's SD card. The restore is very slick. I managed to forget to export some data from a couple of apps that I've been using since my first days with the phone so I really needed to go back and get it. No worries. First I booted into the recovery console and made a backup of my newly installed 4.0.4 firmware. Then I powered off the phone and put the phone's SD card into my laptop and moved the 4.0.4 backup off the card. Then I booted back into the recovery console and hit restore and after another reboot my phone was back to it's Cupcake original firmware complete with all the apps and their data.
Tuesday, September 1, 2009
Two great quotes from Cay Horstmann's blog
"Some people, when confronted with a problem, think ‘I know, I'll use regular expressions.’ Now they have two problems." -- Jamie Zawinksi
"as the designers of the SAX API demonstrate so vividly, any problem in computer science can be amplified with another level of indirection." --Cay Horstmann
"as the designers of the SAX API demonstrate so vividly, any problem in computer science can be amplified with another level of indirection." --Cay Horstmann
Tuesday, August 4, 2009
I suppose it shouldn't be a surprise that a soldier knows..
That a soldier knows not only the enumerated powers in the Constitution, but also the limitations of the same from Jefferson specifically related to the general welfare clause.
Saturday, June 13, 2009
2009 Pittsburgh Autism Walk
I shot a few pictures at the Pittsburgh Autism Walk. The purpose is to raise money for autism research. Pittsburgh does a great job and ends up bringing more money that much larger cities. I walked with Team Jordan to support my sister's family (including Jordan) and most of pictures reflect that.
Thursday, May 21, 2009
What do you get when you cross GM with Chrysler with Obama?
Just substitute Government Motors for Congressional Motors and you have the same thing. Oh and take away Pelosi and insert Obama. Enjoy!
Wednesday, May 6, 2009
Mark Levin on the Obama vision
I think this guy is smart. If you ever listen to his show, he'll likely rub you wrong because he comes off as a snarky New Yorker (which he probably is), but he also has a very good understanding of law and government.
Subscribe to:
Posts (Atom)