Wednesday, April 17, 2013

My Ordeal with Samsung S2 JB Upgrade (Has happy ending)

I have been waiting for the JB upgrade for my GT-I9100G for quite sometime. It is phone bought in India and the update has been rolling out gradually in the past weeks for S2 s in India. I was clicking on the "Check for updates" button everyday, in the hopes of getting the update even though I had enabled automatic update check.

Last Friday, I was very happy to see my screen popup with the information that the update has been found and downloaded and prompted me to install or later. Usually I make sure that the battery power is almost full and then initiate the update. But, this time my excitement overtook my caution and I clicked on "Install". I immediately plugged in my phone into the power socket and waiting for the update to complete. It seemed to be running fine, but suddenly after the automatic reboot, it had got stuck in the boot screen. I waited for quite sometime before I realized that my phone has been "soft-bricked".

I had also not backed up some of my data in my excitement and my ordeal began. My tasks were to:
1. Get the data from the internal SD out
2. Update to JB

I tried entering into the Android recovery mode  (Volume up + Power + Home) hoping it to be helpful. It did not help much with respect to getting the update work. Then after searching the net for a while I could get the required tools for data recovery and update. All the information is out there, but, I felt they were are not in a single place.

The first step was to get to a better recovery mode of ClockWorkMod. To install this, I did the following steps:

1. Odin307.zip  - http://forum.xda-developers.com/showthread.php?t=1738841
2. Installed CWM for recovery mode -
a. GT-I9100G_Blazing_Kernel_v3_CWM5.Tar from http://www.androidfilehost.com/?fid=9390288116658474142
       b. Used Odin to install this Kernel. The instructions are commonly available:


  1. Turn off you phone and enter Download or Odin mode: press and hold Volume Down + Home + Power buttons together for a few seconds.
  2. You will  see a screen asking you to press the Volume Up button. Press it and you will enter the download mode.
  3. Launch Odin
  4. Connect your phone to the computer via USB cable and wait till Odin detects your device. A successful connection is indicated by the ID:COM port turning blue and “Added!!” text at the message box below.
  5. Make sure that only the “Auto Reboot” and “F Reset Time” options are checked on Odin. 
3. Launched the CWM recovery mode by using volume up+ power + home buttons. 
4. Used CWM backup to SD card to create back of phone's system storage. - This back up contains phone logs, SMS and contacts.
5. Use the CWM mounts menu item to mount internal storage (sometimes referred as internal SD) of the phone. It was called as emmc for me. (Some people have mentioned that their internal storage was called as sdcard and external as emmc)
6. Connect the USB cable and use "adb pull" (Android developer tools) get the files in emmc 
7. The contacts will be available in data\data\com.android.providers.contacts\databases directory of data.ext4 zip file in the CWM back up created in step 4. Use the script from https://github.com/stachre/dump-contacts2db to convert contacts2.db to VCF which could be imported into Android. I used a Ubuntu running on a Sun VirtualBox to execute the script. Use the following command in Ubuntu to install required dependencies for the script. 
sudo apt-get install sqlite3 libsqlite3-dev.
8. SMS are available in data\data\com.android.providers.telephony\databases\mmssms.db. Used yaffs-mmssmsdb-calls-extractor.zip to get the SMS from backup to the XML  format used by the "SMS back & restore" android application, which could be imported. The application can directly work on mmssms.db. 
9. Now the back ups are complete. The next is to install the JB. The official Samsung JB build is available from http://www.sammobile.com/firmwares/1/?model=GT-I9100G&pcode=INU#firmware for India model of GT-I9100G. 
10. Then use Odin to write the firmware
11. Restore contacts and SMS. Use import menu in contacts to restore VCF. Use SMS back &  restore for importing back the SMS.  



At last the S2 was back in business.

No comments:

Post a Comment