January 23, 2012

How to get a bricked kindle fire back to live

I've rooted my kindle fire and then started playing with /system/build.prop file to get any app I wanted from android market. However I ended up with a bricked KF - it was stuck at the kindle fire logo.

I thought "luckily I've backed up the build.prop file, so I can just copy it back". But the process I went through wasn't that easy.. It took me a while to figure out how to revert build.prop file.

Here are the steps I followed t get KF back to live again:

1. First of all download latest android-sdk tools. This comes with ./adb and ./fastboot which will be your main tools to access KF.

# see all options
./adb --help  

# Common commands
./adb kill-server #kills
./adb devices #searches for devices
./adb shell  #goes to FK linux shell
./adb push from_file_dir_in_pc to_file_dir_in_kf

2. Next, make sure KF is recognized.  Go to KF shell and type su. If moves to # shell, great, you have root permissions. Move to step 4. If there is an error eg. segmentation fault, then move to step3.

3. Download fastboot, copy it to KF and execute. Then reboot and go to KF shell again. This time you should have root permissions. Try su. Refer to this post for further details.
$ ./adb push fbmode /data/local/tmp
$ ./adb shell chmod 755 /data/local/tmp/fbmode
$ ./adb shell /data/local/tmp/fbmode
$ ./adb reboot
$ ./adb shell
  $ su
4. At this point, you should have root permissions and can just go ahead and revert changes in build.prop. Copy stock build.prop in your work directory if does not exist. Download here.
$ ./adb push build.prop /system/

5. Next, follow instructions here. In my case, ./fastboot command never recognized the device and I ended up in cwm-based recovery screen. Since KF has only one button, I was only able to pick the first choice in each screen. At the beginning, this option is "install update" and in the next screen it is a "NO". So "install update" option looks for an update.zip file under /sdcard/ and then just installs if the file is there - even though you have to pick "NO" in the confirmation screen.
So to do this, first download the update.zip file here. Then just click on the power button on KF twice to install. Once installation is completed, reboot the KF.
# Copy update.zip to KF 
$ ./adb push update.zip /sdcard/
# Push on the reboot button twice to install.
# Once installed, reboot the KF.
$ ./adb reboot

And, it's done, the KF is back!