My brother has been complaining about his slow phone since.. well the day he bought it, so I’ve been recommending CyanogenMod since, well, the day he bought it.
Finally yesterday I had a chance to go over for lunch and a Linux hacking afternoon, but in the end I spent the whole time trying to get CyanogenMod (CM) on his phone. Finally, some 8 hour later, I got it working.
It was meant to be straight forward:
- turn on USB debugging
- root his phone
- install ClockworkMod
- flash CM via recovery
Rooting the phone
CM has some great instructions on their wiki, but they don’t cover how to root the phone. I did some research and found z4root which is supposed to root his Froyo 2.2 based phone, but it just didn’t work no matter which version we tried. His slow phone was running anti-virus which caused all sorts of “problems” and was quite frustrating, but we were still full of hope when we moved on.
Then I came across SuperOneClick, a .NET application that is supposed to run under Mono, but ends with a windows.forms crash when you click a button. So, we found a dualbooting laptop and went to Windows.
That was a whole other level of pain.
Windows frustrations aside, SuperOneClick turned out to be SuperOneMillionClick, but it did root the phone, yay!
3 hours had passed and we had a rooted phone – that was meant to take 3 minutes.
So now we had a rooted phone, time to install ClockworkModRecovery (CWM). This installed just fine, but we could never get it to flash the recovery to do a backup. Gosh darn it. This also meant I couldn’t flash CM either.
My plan of doing everything nicely, as safely as possible, with backups, goes out the window at this point. Time to flash a kernel (with CWM) directly onto the device, another method to get recovery on there (so that we can flash CM).
Needed to get Heimdall, but there’s no RPM for it. Could compile it, but I’ll just grab the deb. Where’s alien? No package for alien and it’s a deb package, too. OK. Just extract the deb, good, now do I have the dynamic libraries installed for it? Yes.
So, I flashed the kernel which completed successfully and rebooted the phone… into an infinite loop. Great, broke the phone. Fortunately, I could still get to the “Download” mode, which AFAIK is like a dumb serial mode that lets you flash stuff (no adb here).
So I hit #cyanogenmod telling them what I was doing and was told:
so then you *didn’t* follow the instructions
they clearly state to start from from stock 2.3
Which isn’t actually true, but fair enough. So I had a rooted (as in root access) rooted (as in broken) phone.. what to do next? I knew the Download mode still worked, because I could re-flash the kernel. Advice was to find a stock ROM and flash that.. but for the life of me I couldn’t find the right stock kernel. Apparently it doesn’t really matter, but 6 hours had now passed and I didn’t want to make things worse (like break the radio or something).
Then I had an epiphany. If I flashed a Gingerbread kernel (with CWM) and it broke, maybe I can find an earlier kernel that was for Froyo and flash that to unbreak it. I did some more digging and found one! I flashed this onto the device and…. and… infinite loop again. This time however I somehow managed to get into recovery, which was progress!
Right, now that I had recovery I could try and flash CM7 to see if I could boot. First problem was, getting into recovery only worked 3/4 of the time. Second problem was, getting CM zip onto the phone. Fortunately I now had adb access (phew) so I pushed the zip onto the phone.
There were more issues with permissions and writing to the right card, browsing to the card under recovery, su that didn’t work, but I won’t bore you further with all that. In the end, flashing CM was successful and I was able to boot into it. Almost happy. The flash was a bit weird (it rebooted the phone halfway through, then continued flashing) and some things weren’t quite working like the SIM card (probably important in a phone) and the screen wouldn’t wake up from sleep, blah blah.
Fortunately, flashing CM7 put on a new kernel and new version of recovery. So I booted to recovery and re-flashed CM. This time it worked as expected and I booted up to a working CM7 – it prompted for the SIM pin and everything seemed to be running well.
So, after some 8 hours it was almost midnight, but I finally had CM7 on the phone. I went to bed.
I woke up pretty happy and couldn’t wait to tell my brother, so I SMS’d his wife but never got a reply. Called later and he checked the phone. No SMS! D’oh
SMS wasn’t working, but 3G and voice were. Time to re-hit Google.
Turns out some other people have the same problem and I need to enter the SMS Messaging Centre number into the phone. You do that by dialing:
Which brings up the Testing program, where you can browse to Phone Info, scroll down and enter the SMCS number.
For Telstra it’s supposedly +61418706700 but that didn’t work. Fortunately, I was able to get the number from my sister-in-law’s phone via the same method, which worked.
So, how to do it next time