Customizing the Kindle Fire with 6.2.1

Posted in computers on January 1st, 2012 by karrth

I was the lucky receiver of a Kindle Fire this holiday season from my kind aunt, and since it is an Android device, I made it my mission to customize it exactly to my liking. I’m working with a Kindle Fire loaded with 6.2.1. Beware that you could void your warranty.

EDIT: rooting the device will disable things like Amazon Prime Instant Streaming videos. I only found this out after rooting of course, and the kind people at Amazon were very helpful in telling me that I would have to unroot the device to get streaming back. You can still steam the Prime Instant videos through the web browser though, so don’t fret to much.

Objectives

  • Root the device
  • Install a recovery/boot manager application
  • Install the Android Market and other Google Apps

I am not addressing loading Cyanogenmod 7 on here because I am going to wait until the ROM is more stable before loading it on my device.

Rooting

Rooting the Kindle Fire is a fairly simple device, no matter what OS you are using. The best tutorial I found for all OSes was posted on rootkindlefire.com (including pictures and videos in case you are extra confused). I will briefly go over the steps here:

  1. Go to Settings/Device, and make sure your device is on version 6.2.1
  2. In that same menu, change “Allow Installation of Applications” to “On”
  3. Download KindleFireRootNew.zip and unzip it into your working directory. I would recommend creating a new folder for this process, since you will accumulate quite the number of files
  4. If you do not already have adb setup from previous work with other Android devices, then you will have a couple extra steps, which will vary depending on your OS:
    1. Windows only: Install the driver for the Kindle, which can be found in the usb_driver folder
    2. All OSes: copy the adb_usb.ini file from the usb_driver folder to your .android folder in your user directory. For Windows, this can be found by typing %UserProfile% into your Explorer address bar. For Linux and Macs, it will be in your home directory at /home/[username]/.
  5. Now copy the KindleFireRoot.apk file from your PC to your Kindle’s internal storage. You can install it by using a variety of apps like File Expert or ES File Explorer. It is up to you. Simply browse to the folder with the apk, select it, and install.
  6. Open the app, and select the root option after acknowledging the credits (as you should, since these people put in a lot of time to make this easy for you!)
  7. Finally, open a terminal/cmd prompt and browse to your KindleFireRootNew folder so you can execute the commands below. If you do not have adb installed already and you are running Linux or Mac, replace “adb” with “adb-linux” or “adb-mac”, depending on your OS. If you are running linux, make sure you execute the commands as root (type sudo -s to enter a root environment).

    adb root
    adb remount
    adb push su /system/xbin/su
    adb shell chown 0.0 /system/xbin/su
    adb shell chmod 06755 /system/xbin/su
    adb install Superuser.apk

    And you’re done!

Install the Recovery Manager

Installing a recovery manager will allow you to make full system backups and flash ROMs like Cyanogenmod, if you wish. For most Android devices, I would highly recommend Clockworkmod, but for the Kindle Fire, the TeamWin Recovery Project 2 (hereafter refered to as TWRP) is a much better choice, since it uses the touch screen instead of hardware buttons (which the Fire does not have) to navigate the menus.

Installing TWRP is not necessary for installing the Android Marketplace or other apps, but having it installed is a good idea if you plan on messing around with your system’s innards much. This way, you can restore a full system backup in case you drastically mess something up. I followed the steps found on rootkindlefire.com.

Be aware that this process can be a little buggy (at least, it was for me) and might require you to open up your device’s hardware. Please read through the steps and the troubleshooting section that follows before continuing with this section.

  1. Open up a terminal/cmd prompt and type the following, replacing “adb” for the appropriate command, similar to the rooting process, as necessary:

    adb shell
    su
    idme bootmode 4002
    reboot

    Your Kindle should hang on the Kindle Fire logo after this. According to the guide, Windows users will have to reload the driver, as explained in the rooting process. Since I use Linux, I did not do this and cannot verify it for you.
  2. Type the following into your terminal/cmd prompt, replacing “fastboot” with “fastbook-linux” or “fastbook-mac” as appropriate:

    fastboot -i 0x1949 boot twrp-blaze-2.0.0RC0.img

    This installs TWRP on your Kindle Fire. When it finishes, select the “reboot” option
  3. After it reboots, type the following, again replacing “fastboot” for the command appropriate to your OS:

    fastboot -i 0x1949 oem idme bootmode 4000
    fastboot reboot

    This will reset the boot mode for your Kindle so that it will boot normally. If your device does not reboot properly, see the troubleshooting section.
  4. And you’re done! To enter TWRP, follow the instruction at the bottom of the screen with the hazard logo, which tells you to hold the power button (wait until the power button turns orange, then release). I would recommend entering TWRP and creating a full backup right away, just so that you have a clean copy to recover to in case anything happens at a later time.

Troubleshooting TWRP

I ran into an issue when installing TWRP, where it would hang on the hazard logo, and was undetectable by my computer. I was unable to boot into TWRP, or the Kindle’s original OS. If this happens to you, don’t worry! Your device is not bricked, it will just take some extra effort to get it back. I found this process on the evilsoapbox.com blog. I would highly recommend looking over the pictures that he posted under the section “Opening the case of your Fire”.

NOTE: Unfortunately, this process is only possible through Linux. If you do not have a Linux machine and are unfamiliar with the OS, I would highly recommend getting a copy of an Ubuntu LiveCD. This will allow you to boot into a Linux environment without installing it onto your machine.

  1. Download the rekindle.zip file, which can be found at the bottom of this forum post.
  2. Unzip to your working directory, and download a copy of TWRP into this folder. You could copy the one you have from your RootKindleFireNew.zip file, but my problem was fixed when I downloaded a fresh copy from their website instead of using the one I already had. This was quite possibly the reason I ran into this issue in the first place, as the download might have been oh-so-slightly corrupted.
  3. Next type the following into your terminal/cmd prompt while in your working directory as root. You can enter a root environment by typing sudo -s:

    ./usbboot aboot.bin u-boot.bin; ./fastboot boot twrp-blaze-2.0.0RC0.img

    It should say something about “waiting for the device” at this point.

  4. Remove the back plate from your Kindle. I found this process to work best by prying away the back with a butter knife, or something similarly dull and sturdy, and then carefully running an id card/gift card/some semi-sturdy plastic item down the side to pop out the clips. Be very careful, as you can easily break the clips or the pieces they snap into. I managed to only break one at the very end, since i started to remove the whole back before unsnapping the last one.
  5. While it is not included on the evilsoapbox blog instructions, I removed the battery cable from the circuit board so that the Kindle had to be powered over USB. Without doing this, my computer never picked up the Kindle. Be very careful when removing the power cable, as it is a very tight space, and the plastic female end on the board is fairly weak.
  6. Short the pin on your Kindle, as marked in the following picture, by putting one end of a paperclip on the pin, and the other on the silver box surrounding the nearby area (notice the two arrows). By following picture, I mean the picture that is not yet posted. I didn’t take a picture when my Kindle was open, and I’d rather not reopen it just for a picture. You can see a good picture here. I’ve emailed the blog author about posting it here, and will post a copy if/when he gives me permission
  7. While holding the paperclip in place, plug in the usb cable to your Kindle Fire. The program you executed earlier should pick up the device and re-install TWRP. Once it is done installing, you can remove the paperclip. Be very careful in picking up the device, and power it off.
  8. Reattach the battery cable, and make sure your Kindle boots. When it is, type the following commands, which are found in your KindleFireRootNew folder:

    fastboot -i 0x1949 oem idme bootmode 4000
    fastboot reboot
  9. Finally, reassemble the back of your Kindle. Be careful you do not catch the red/white/blue twisted cable in the side. Again, I would highly recommend entering TWRP and making a full backup at this point.
  10. Final Note: After my first full reboot without being plugged into an external power source, my Kindle refused to boot, and only the backlight would momentarily turn on. This fixed itself after leaving it plugged into the wall for a while. I’m not sure if this was a low battery problem, or if a second reboot was simply needed after this whole problem. I have not had the problem since, and I have done full reboots multiple times since, both with and without external power. Unfortunately, this is part of the risk of these kind of activities.

Installing the Android Market and Other Apps

It is fairly frustrating to have an Android device that cannot access the Android Marketplace, especially if you have other Android devices that you have already purchased apps for. You have two options to install apps from the Android Marketplace on your rooted Kindle Fire:

  1. Make a backup of the apps you desire on your other Android device using something like ES File Explorer, and then transfer the apk to your Kindle over usb, dropbox, or some other method.
  2. Install the Android Marketplace and install applications directly to the device through the Market app.

While the second method is much easier (once you have the market app installed, that is), some apps will not show up in the Market for your Kindle, as they might be deemed incompatible. I found most of the steps needed at this forum post and in this PC World article.

To install the Android Market onto your rooted Kindle Fire, go through the following steps:

  1. Download this gapps.rar file to your Kindle. It contains the Marketplace, along with many other Google apps, such as Maps, G+, Gmail, Talk, Youtube, etc. You can install these through your file browser
  2. Using File Expert, ES File Explorer, or whatever file browser you’re using, install the GoogleServiceFramework.apk
  3. Download (or preferably, buy) Root Explorer. I did this buy purchasing the app on my Android phone, backing up and copying the apk over to my Kindle. You can find links to the apk online various places, but I’m not going to link to them here.
  4. Using Root Explorer, copy the com.amarket.apk file from your gapps folder to the /system/app folder on your Kindle. Before hitting paste, you’ll have to hit “Mount R/W” at the top of the screen. The websites I link to reference using the Vending.apk file, but this is for the old Marketplace, and will not work
  5. Long press on com.amarket.apk and select Permissions. Check Read for Owner, Group, and Others, and Write for Owner. The permissions should match those of the other apks in the /system/app folder.
  6. Grab a copy of the Market Opener app and install it, since the Marketplace will not show up in the Kindle’s App menu after the first reboot.
  7. Do a full reboot. If you encounter errors when accessing the Marketplace, do another reboot, and they should go away.

The only app that I have installed manually so far that is in the Android Marketplace normally, but is not listed for the Kindle was GTA3. It installs fine, but there is no sound ingame, and there is no way to exit the program without force-closing it through the Settings/Applications menu. Otherwise, it runs/plays/saves great!

Enjoy, and good luck!

Downloads

Sources

Tags: , , ,

Adventures with the Droid 3

Posted in computers on November 1st, 2011 by karrth

I was finally able to renew my contract and upgrade to a Droid 3 from my OG Droid (may it rest in peace). After lots of tweaking (which will never be done), I’ve decided to post what I’ve done, as it may help others.

Rooting

Of course the first thing to do is to root that beauty, right? Right? You can find instructions on how to do so using Windows, Mac, or Linux in this post at the rootzwiki.com forums.

Bloatware

One of the first complaints many people have about smartphones these days is the amount of bloatware that they come with. It’s almost as bad as buying a desktop computer a couple years ago (or a laptop today, for that matter)… The two things I found to be most useful in reducing bloat are:

  1. Doing a factory reset as soon as you get your phone (no reason to configure things twice…). If you want to backup your settings, make sure you do it to an external SD card, not the internal storage, as this will be wiped with a factory reset.
  2. If you rooted your phone (which you did, right? After doing the factory reset that is…), grab a copy of TitaniumBackup. You can use this to backup all of your data as well (make sure it’s to an SD card!!!) if you waited to do a factory reset.

After installing TitaniumBackup, the real fun begins. While it’s tempting to straight up uninstall unwanted apps, this can cause system instability, and since the bootloader is still locked, it is not possible to do a fresh reset if you mess something up. I found some great lists of apps you can safely freeze in this thread at the AndroidCentral forums. This post in particular is pretty comprehensive.

Removing the wrong apps can cause a boot-loop, and even leaving some frozen when doing a factory reset can cause a loop issue. I’ve seen it noted by some forum users that freezing the Backup Assistant app can cause a factory reset to go awry (probably because it is brought up during the setup process), so be sure to unfreeze it before a reset.

Here’s a list of apps I have frozen:

  • Apps (Verizon Apps Store)
  • Backup Assistant
  • Backup Assistant Client
  • Desk Home
  • Email
  • Email Authenticator
  • Email Engine – freezing this causes the Calendar to crash when adding a new event
  • Gallery (see next section for further explanation)
  • Help Center
  • Messaging
  • Motorola Dock Service
  • News
  • Smart Dock
  • Social Location
  • Social Messaging
  • Social Networking
  • Social Sharing
  • Social Status

These are only the ones I have frozen for now. I suspect that there are other things that can be frozen, such as the MOTOBLUR Indexing Service, but I have not tested these yet. You might not want to freeze some of these items if you use them, such as the Universal Inbox (Email) and the various Social applications. More on that later.

The Gallery

Personally, the Gallery app that comes with this phone is horrid. Makes me want to puke. Luckily, there’s an easy way to get the old Gallery back, as found here at the xda-developers forum. It worked beautifully for me.

Motorola Terms of Service

I’m not sure how many people actually read these things (I’m told not many do…), but this is one that needs to be read. When adding more accounts to your phone, such as Facebook, LinkedIn, Flickr and Yahoo!Mail through the built in “My Accounts”, the Gallery (the one that came with the phone), or the various built in Social apps, you are presented with two documents. I have not agreed to these documents because they describe, in great detail, how they will then collect all (ok, not all, but most) of your personal information, such as your:

  • purchase history
  • calendar
  • social networking credentials
  • SIM card ID
  • location (via GPS, WiFi, or cell tower triangulation)

…among other things. It then says lower down that they will be using this information to provide you with information about things you might be interested in, and that it will be sharing it with third parties. And that your information will be subject to those party’s individual privacy policies. You can even check the second box (done for you already) so that you can share even more! Like your browsing history and demographics information from your social networks.

All in all, I do not like what these documents are saying. If you don’t believe me, read it yourself. If you don’t care about your personal information, then have fun! It saddens me greatly that Motorola would build in such a system to their phones, and is part of why I froze all of the built in Social apps, Universal Inbox, and the default Gallery, and the News app, since they are all integrated into this system.

Some Apps

As a quick aside, here are some of my favorite apps:

  • LauncherPro homescreen replacement
  • Subsonic music streamer and it’s accompanying server software.
  • DroidWall is an Android iptables implementation. Root required.
  • ConnectBot ssh client
  • TitaniumBackup is a great backup tool, especially if you have root.
  • Wifi Analyzer wifi scanning tool
  • SetCPU is a great under/overclocking tool that I use to underclock and save battery. Unfortunatly, it has caused some system instability for me, so I wouldn’t recommend using it unless you want to fiddle around with it to find stable settings. I’ll update if I do find settings that work for me.

Have a good day!

Tags: ,

Tethering Your Android to Linux (without rooting your phone)

Posted in computers on March 2nd, 2010 by karrth

EDIT: Since tethering is now built in to phones with 2.2 and up, this is not really needed. I would recommend rooting to avoid extra service charges though.

If you’re stuck in an area with no internet connection except your Android phone, you can use your phone as a proxy for your laptop’s internet connection.

Setup on AndroidProxoid barcode for Android

First, you need to enable USB Debugging by going to Settings/Applications/Development/ and clicking the checkbox.  Be sure to plug your Android device into your computer with the USB cable.

Next, you need to install Proxoid.  You can do this by searching the market on your phone, or scanning the barcode to the right.

The final step is to open up the application, and check the “Start/Stop Proxoid” box.

Tethering the Phone

The first thing you need is the Android SDK.  Download it and extract the contents into /opt/android/

As root, create the file /etc/udev/rules.d/90-android.rules
with these contents:

SUBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666"

Now as root, create the file /usr/sbin/tether
with these contents (or download it here):

#!/bin/bash
/opt/android/tools/adb kill-server
/opt/android/tools/adb start-server
/opt/android/tools/adb devices
/opt/android/tools/adb forward tcp:8080 tcp:8080

Make sure you make the file executable:
chmod 744 /usr/sbin/tether

Finally, run the program tether as root.

If you’re having issues, try running each command in the tether file individually so you can see any error messages.

If you don’t setup the “Run as a service” section below, type

killall adb

as root to disconnect your tether.

Setting up the proxy in Firefox

Go to Edit/Preferences/Advanced/Network/Settings…

Under the HTTP Proxy, type “localhost”, and under Port type “8080″ so it looks like the screenshot below:

Firefox Proxoid Proxy SettingsHit “Ok” twice to get out of your Preferences window, and you should be good to go!

Optional: Make it a service in Arch Linux

You can do this in other Linux distros as well, but for Arch you can download this file to /etc/rc.d/tetherd.

As root, chmod it as such to make it executable:

chmod 744 /etc/rc.d/tetherd

Now you can start tether automatically as a service by putting it in your rc.conf file, or manually by typing:

/etc/rc.d/tetherd { start | stop | restart }

Enjoy!

Further Reading

Tags: , , ,