New life with an old friend aka new firmware for Samsung Captivate.

Once upon a time I use to pull out some old device from an old box in attempt to bring new life into it. This time it happens with my old Samsung Captivate. Especially in a sense of upcoming trip and with carriers changing their unlock policies after Library of Congress decided one thing and then FCC made a "deal" with them, but all of that deserves it's own blog entry. Long story short AT&T declined request to unlock phone prior to contract expiration.

So I turned my sight to an morally old Samsung Captivate, and surely after using Jelly Beans for several years I didn't want to settle with Ginger Bread official version installed on Captivate. So I went on a journey of what can I do to get a latest and greatest for it. I've been following project called CynogenMod for a while now and finally decided to try installing it. I went to their site to check their status on support for Captivate and surprisingly they supported it, in fact they had Jelly Bean equivalent for it, right on the spot.

I have started to read instructions, and their manual was well defined and looked really straight forward in  terms of what to do and what tools you would need, by the way you could find it here: http://wiki.cyanogenmod.org/w/Install_CM_for_captivatemtd

If you are as risky as I am(it's simply a combination of some stupidity and laziness, but I like to call it risk) my updates to original manual could save you from few heartaches down the road.

So let's start, at the beginning I had:

1) Samsung Captivate (AT&T version of Samsung Galaxy S very popular model from Samsung few years ago) or SGH - I897 with Android 2.3 UCKK4(latest official version for that phone).
2) Linux PC
3) CynogenMod 10.2.1

My goal was to get Jelly Bean installed on it which is version 10.2.1 of CynogenMod. So if you read installation manual on CynogenMod site you'll find that one of the first steps they recommend you to flash new kernel in, so I did it ... that's where my very first heartache came in.
But let me start from the very beginning, for some reasons I had troubles to putting Captivate into a Download mode, based on method they mentioned in installation guide. I did some research and found another way to accomplish that with adb tool, and if you are an Android developer I don't have to tell you where to find it, for everybody else it's a part of Android SDK provided by Google. Here command I ran to put phone into download mode(please wait and read next paragraph):

adb reboot download

Once phone in download mode you should be able to flash kernel with hemdail tool, however I advice you even before you put phone into download mode copy CynogenMod zip into root folder of your phone. I think it should be very first step of entire process.

Now let me tell you about my experience. Once I was able to put phone into download mode I went ahead with flashing kernel, due to that fact that phone is really old and was technically stored in my electronics recycling box, for the next round e-recycling which I have never done, so there are a lot of trash in that box. I considered phone bad one especially due to the fact that at the end of it's contract life it was constantly restarting itself after I used Navigation on it. Wow I spent too much time describing on why I didn't do backup, but as I sad I like risk. I used next command to flash kernel:

heimdall flash --KERNEL zImage --no-reboot
Lower case didn't work for me at all and oddly upper case didn't work after I ran lower case command, so I had to start all over again.

After flashing started blue progress bar appeared and went up to 100% and that's it, phone got stuck.  I have not spent time on figuring out how to reboot phone from download mode, as a result I just unplugged battery :). That's where very first heartache came in. After flashing kernel phone won't boot at all. Recovery mode worked, but in recovery mode with kernel they linked on site you can't mount internal storage of the phone :(.
Well one of the lessons I learned over my long dev career that dev should never give up.
Hooray, it has MicroSD card and recovery mode allow you to install zip from external card, great I thought to myself. I placed zip file on external MocroSd card and plugged it into Captivate, surely installation started just like promissed and .. progress bar on Android guy ran to 100% and phone rebooted itself to finish off installation. Hooray I said to myself.
Wait, too early, here is the second heartache, proceeding failed for some unknown reasons, I think due to the fact that it started with external MicroSD and by default it was not mounted, so oh NOOOO I am stuck in recovery mode.

What did I tell you about dev shoudl never give up, so this recovery mode from 10.2.1 package has option to mount storages. Surprisingly after mounting laptop detected mass storage device connected to USB port, great, I could just copy cynogenmod zip file to internal storage and reinstall it. So taht's what I surely did and it worked like a charm this time. Sammy booted up with cynogenmod logo and I coukd now use it as a backup phone and it has a greater version of android that my primary phone.

Conclusion:
So this is my happy end, what did I learned from that lesson, just as I always tell to all my colleagues backup is your best friend even if you are 120% sure that this will work just fine. Another important lesson is that dev should never ever give up, step away from the problem and find another ways to inspire your creativity and you'll find solution for almost any situation and if you don't  - go to the very first lesson backup IS your BEST friend in development career.

Update(June 13 2014) LifeHacker put together nice article about adb:
The Most Useful Things You Can Do with ADB and Fastboot on Android

Comments

Popular posts from this blog

Ethics in software development.

Preferred way of commnnunication

Bitcoin - consumer's perspective