How to install CyanogenMod 7 on the Amazon Kindle Fire

The Amazon Kindle Fire is is a 7 inch tablet designed to access Amazon’s digital book, music, movie, and app stores. But we’ve already seen that you can root the device, install the Android Market, and run many third party apps which aren’t available from Amazon.

If that’s not enough for you though, it’s surprisingly easy to replace the Kindle Fire operating system with a different version of Android which isn’t as tied to Amazon’s services.

The first version of CyanogenMod 7 for the Kindle Fire was released recently, and while it’s still a little rough around the edges, the operating system works surprisingly well on the Kindle Fire. It also takes less than 10 minutes to install, assuming you already have all of the prerequsites in place.

There’s also now a tool that makes it possible to revert back to the official Amazon software, so the entire process is reversible. With that in mind, I went ahead and installed CM7 on the tablet today and switched back to the Amazon software… twice. The process isn’t really for beginners, but it’s fairly painless if you’ve ever installed a custom ROM on an Android phone or tablet before.

Update: It’s now also possible to install an early build of CyanogenMod 9 based on Android 4.0 on the Kindle Fire. It’s still rough around the edges and has a number of bugs to work out, but if you want to try it, you can follow our step-by-step installation guide

Here’s a step-by-step guide, based on information and files released by xda-developers forum member JackpotClavin. If you want to know how to revert from CyanogenMod 7 to the stock Amazon Kindle Fire software, scroll down to the section near the bottom.

CM7 is based on Google Android 2.3 Gingerbread, but JackpotClavin is already working to bring Android 4.0 Ice Cream Sandwich to the Kindle Fire.

Before you get started, you should know that there’s at least one major bug affecting CM7 on the Kindle Fire: Audio doesn’t work. Graphics and video looks great and the tablet is excellent for surfing the web, playing games, or performing other activities, but if you need audio you might want to hold off on installing CyanogenMod for now.

Update 1: While original developer JackpotClavin has moved on to porting Android 4.0 to the Kindle Fire, another developer has picked up where he left off and audio is now working. All you need to do to get sound working is use Whistlestop’s update.zip file instead of JackpotClavin’s. The links below have been updated.

If you’ve already installed Jackpot’s CM7, you should know that you will lose data and apps if you switch to Whistlestop’s. The only easy way to install a new operating system on the Kindle Fire right now is to essentially perform a clean install, writing over any pre-existing data. Anything stored in the “sdcard” portion of your storage should still be safe though, so if you’ve downloaded apps, books, or other documents they may not be erased.

Update 1.5: The latest version also adds support for hardware-accelerated video playback.

Update 2: There’s now a much simpler way to install CyanogenMod or other operating systems. Instead of relying on modified ClockworkMod tool using the method described below, you can use the new TWRP 2.0 custom recovery which supports touchscreen input. To install it:

1. Download and run the Kindle Fire Utility on a Windows PC.

2. Root your tablet by choosing the option to install permanent root.

3. Choose the option to install latest TWRP Recovery.

4. Download the latest build of CyanogenMod 7 or another operating system and copy the update.zip to your Kindle Fire.

5. Reboot your device into TWRP by shutting down the tablet, then pressing the power button when you see a yellow triangle with a fire icon in the center.

6. At this point it’s a good idea to create a backup of your system using TWRP 2.0′s backup option. You can then restore later if you need to.

7. From the home screen choose the “install” option and use the file browser to locate your update.zip file.

8. Select the update.zip file and then choose the “flash option.”

9. Reboot your Kindle Fire and after a few minutes you should be running CyanogenMod 7.

You can still do all of this using the steps below, and it’s not a bad idea to familiarize yourself with them in case you run into trouble.

Also, you may not be able to use the Amazon Instant Video app, and the Kindle app from the Kindle Fire which supports Amazon’s eBook lending library, personal documents, and other advanced features doesn’t work. Instead you’ll have to use the official Amazon Kindle app for other Android phones and tablets.

————————

Original guide

Prerequisites

In order to install CyanogenMod 7 on the Kindle Fire you’ll need to have the Android Software Developer Kit (or at least adb) installed on your computer. You’ll also need to have rooted your Kindle Fire.

I’ve already posted instructions for installing the SDK and rooting the Kindle Fire, so if you haven’t already done those things, you might want to follow those guides first.

I’m working on a Windows computer, so the rest of this tutorial will assume you’re using Windows 7. But the process should be very similar if you’re using a Linux or Mac machine with the Android Software Developer Kit installed.

Step 1: Download 5 files to your computer

JackpotClavin has posted links for the 5 files you need to get started. You can find download links at the xda-developers forum, and you should always check there first because the links may change if the files are updated.

But as of December 6th, 2011, here are links to the latest files you need:

Download each of those files to your computer and place them in a directory. For now I’m going to assume that directory is called c:\cmfire.

Note that you may need to rename some of the files, especially if you’re using Windows. For instance, when I downloaded the log and last_log files, they were called log.txt and last_log.txt. Just right-click on the files in Windows Explorer, choose “rename” and remove the .txt from the end so that the files are just called log and last_log.

Step 2: Copy 4 files to your Kindle Fire

Connect your Kindle Fire to your computer with a USB cable. It should automatically show up on your PC as a USB mass storage device. Just copy and past all the files except stockrecovery.img to the root directory of your Kindle Fire. (It’s probably fine if you do copy stockrecovery, but you won’t need it for a little while).

Note that “root directory” doesn’t mean a directory called “root.” What I mean is that they shouldn’t be in any folder at all. They should just be in the base directory of your tablet.

JackpotClavin also suggests confirming the md5sums of the update.zip and updaterecovery.img files to make sure they’re not corrupted or incorrect. If they don’t match the values listed at the xda-developers forum you should not proceed as you could run into trouble.

You can find instructions for verifying the md5sums at xda-developers.

Make sure to unmount your Kindle Fire when you’re done, so that it’s not treated as a USB mass storage device by your computer.

Step 3: Move log files to a /cache/recovery directory

This next step will only work if you have already installed the Android SDK and rooted your Kindle Fire. In fact, I had already rooted my tablet, but for some reason had to root it again before I could proceed. So you may also need to run SuperOneClick again if you received any errors letting you know that you don’t have permission to create folders in the steps below.

  • Open a terminal or command prompt. On a Windows computer you can do this by opening the Start Menu and typing “cmd” (without quotes) into the run box.
  • Navigate to the directory where adb is installed on your computer. On my PC, for instance, that means typing “cd /” and pressing return to get to the root directory, and then “cd program files\android-sdk-windows\platform-tools” and pressing enter.

Now enter the following commands, pressing enter after each:

  • adb shell
  • cd cache
  • mkdir recovery
  • cd /
  • cp /sdcard/log /cache/recovery/
  • cp /sdcard/last_log /cache/recovery/

That should connect you to the tablet, navigate you to the cache directory, create a new subdirectory called “recovery” and copy the log and last_log files to that directory.

Step 4: Flash ClockworkMod Recovery

Now it’s time to flash the ClockworkMod Recovery that you copied to the SD card and reboot into recovery mode.

Type the following commands and press enter after each. If you’re still using the adb shell you can skip the first one, but if you’ve exited the shell, make sure to open it again:

  • adb shell
  • dd if=/sdcard/updaterecovery.img of=/dev/block/platform/mmci-omap-hs.1/by-name/recovery
  • idme bootmode 0×5001
  • reboot

Note that if you’re using Windows, you can copy and paste long lines of text into the command prompt. You can’t use Ctrl+V to paste, but you can right-click on the window with a mouse and choose the paste option after copying text from this tutorial.

Step 5: Use ClockworkMod to install the update.zip file 

ClockworkMod was originally designed for devices with volume buttons and power buttons. Since the Kindle Fire has only one button, JackpotClavin has modified the utility so that you only need to press the power button.

This prevents you from accessing some of the settings, but it does allow you to install CyanogenMod.

  • Once you reboot your tablet in step 4, you should see a few lines of text. The top option will be “apply update.zip from sdcard.”
  • Press the power button to select that option.
  • On the following screen press the power button again to select “yes” (even though it won’t be the top option.”

Once you’ve done this some text will appear on the screen and a progress bar will appear. Wait until it’s complete and you get a message letting you know the update has been successfully applied.

Unfortunately now any time we reboot the device we’ll come right back to ClockworkMod. So we need to re-flash the Kindle Fire stock recovery.

Step 6: Re-flash the stock recovery

Now we want to copy that stockrecovery.img file that we downloaded earlier to the Kindle Fire. Since you can’t treat the tablet like a USB mass storage device when it’s in recovery mode, we’ll have to keep using the command prompt for now.

At this point I found I had to reboot the Kindle Fire. Your results may vary, but I was unable to mount the sdcard without first rebooting, so that’s the first step I’ve listed here.

  • adb shell
  • reboot (and then wait for the device to reboot)
  • adb shell (yes, again)
  • mount sdcard
  • exit

When you type “exit” it should return you to a normal command prompt. Now you want to make sure you know what directory the stockrecovery.img is in for the next step. I found the easiest way to do this was simply to copy it to the same directory as adb on my computer, which was the /program files/android-sdk-windows/platform-tools directory.

Then I typed the following into the command prompt:

  • adb push stockrecovery.img /sbin/

If your file is in a different directory, you may be able to type something like “adb push c:\cmfire\stockrecovery.img /sbin/” and have th same results, but that didn’t work for me.

After you’ve successfully pushed the stockrecovery.img type the following three commands:

  • adb shell
  • dd if=/sbin/stockrecovery.img of=/dev/block/platform/mmci-omap-hs.1/by-name/recovery
  • reboot

The Kindle Fire will reboot a few times and then load CyanogenMod 7.

Using CyanogenMod 7

If you’ve used Android on a phone or tablet before, odds are CyanogenMod will look familiar. Instead of the bookshelf user interface that you get with the Amazon Kindle Fire’s default software, there’s a home screen that you can populate with shortcuts to your favorite apps or widgets that can tell you the time, provide updates from your social networks, show weather forecasts, or other details.

You can also use multiple home screens by swiping from side to side, or view a complete list of all your installed apps by tapping the square button at the center of the bottom of the screen.

There are persistent buttons at the bottom of the screen for home, back, menu, and search functions since the Kindle Fire doesn’t have physical buttons. This is the same user interface designed for CyanogenMod 7 for the Barnes & Noble NOOK Color and HP TouchPad.

Out of the box CyanogenMod doesn’t include some Android apps including the official Google Android Market, Gmail app, or Google Maps. But you can install them manually using several methods.

The easiest is following the same steps you’d use to install the Android Market on a rooted Kindle Fire. First download and install the GoogleServicesFramework.apk and then manually copy the Market app to your /system/app directory and set the file permissions to match those for the other apps in the directory.

If you experience force close errors when trying to run the Android Market you may just need a newer version of the Market app.

You can also try grabbing the gapps.zip file for CyanogenMod from goo-inside.me, renaming it to “update.zip” and then following the steps above to reflash ClockworkMod Recovery on your Kindle Fire and install all of the gApps at once by copying the update.zip to your SD card and installing it the same way you installed CyanogenMod.

It’s also easy to install the Amazon Appstore for Android once you’re running CyanogenMod. Just enable installation of apps from unknown sources in your Android Application settings menu, and then visit the Appstore in your web browser and download and run the installer APK.

OK, so now you can install CyanogenMod. But what about going back to the stock software if you decide you like it better, or want to return your tablet?

It turns out JackpotClavin has us covered there too. This time the process is even easier.

Restoring your Kindle Fire to stock

Step 1: Download 2 files

You need to download two files to restore your Kindle Fire. The first is the latest official Amazon Kindle Fire software. As of December 6th, this is software version 6.2 and it works just fine. The other is a small file called command.

You should probably check out the xda-developers forum for links in case these files change at any time, but as of December 6th, you can download them from the following links.

Note that as with the log files above, you may need to rename the command file. It should just be called “command” not “command.txt.”

Step 2: Rename the Kindle Fire update

The official Kindle Fire software update will be called something like “update-kindle-6.2_D01E_3003020.bin.” We’re going to rename it “update.zip.” Don’t worry that we’re changing the file type, it doesn’t matter.

Just right-click on the file in Windows Explorer, choose “rename” and change the name to update.zip. These steps will vary a bit if you’re using OS X or Linux.

Step 3: Copy files to your Kindle Fire

Connect your Kindle Fire to your PC with a USB cable and mount the tablet as a USB mass storage device. While this happens automatically when you’re using the Amazon software, CyanogenMod will not automatically mount your tablet. Instead you can:

  • Connect your USB cable.
  • Tap the little circle/up arrow button in the taskbar at the bottom of the tablet.
  • Choose the option that says “USB connected”
  • Tap the button that says “turn on USB storage.”

Once your tablet is connected to your PC you can copy files from the computer to the tablet. Even though the tablet doesn’t have an actual SD card, the storage is treated as an SD card by Android. So /sdcard/ is the root directory.

With that in mind, copy the files to these locations:

  • Command should go in /sdcard/command (the root directory).
  • The update.zip file should go in /sdcard/kindleupdates/update.zip (the directory called kindleupdates).

Ultimately the command file needs to be in a different directory on your device though, but it will take a few command prompt options to move it.

Step 5: Move the command file

Disable USB mass storage mode by tapping the button on your tablet to turn it off. Then open a command prompt and navigate to your adb directory and type the following commands:

  • adb shell
  • cd cache
  • mkdir recovery
  • cp /sdcard/command /cache/recovery/

Note that you may already have a recovery directory if you’ve done this before. You can check by typing “ls” before typing “mkdir recovery.” This should show you a list of subdirectories under the “cache” directory.

Step 6: Reboot into the Amazon Kindle stock software

We’re almost home. Now all we need to do is reboot the device and have the stock recovery utility replace CyanogenMod with the Amazon Kindle Fire stock software. Type the following commands into your command prompt:

  • idme bootmode 0×5001
  • reboot

That’s it! You’ll have to connect to WiFi and re-enter your Amazon account information to access all of your settings, but you can re-download any books, magazines, movies, apps, or other content once you do that. Some of the media and apps previously installed on you device may already show up when you restore the Kindle Fire stock software.

I was also pleased to notice that Amazon recognizes that you’re using the same Kindle Fire when you register it a second or third time. You don’t have to worry about your Amazon account showing listings for Kindle Fire 2, or Kindle Fire 3 if you replace the stock software and then come back to it.

Ultimately it would be nice if someone can modify ClockworkMod or another custom recovery tool so that you can create a complete backup of your Kindle Fire’s software and settings before replacing the operating system. But until someone figures out how to do that, restoring the latest stock software from Amazon is the next best thing.

Latest Amazon Kindle Fire news and tips:

  • http://www.jkontherun.com Anonymous

    How’s the overall performance? I know you probably haven’t had much time with CM7 on the Fire, but any impressions?

    • http://www.liliputing.com Brad Linder

      Well, I’ve spent the last 5 hours installing and uninstalling it more than using it… but in my initial impressions it feels quite zippy.

      The lack of audio is a problem, but for playing games, surfing the web, etc, the Kindle Fire should be at least as good with CM7 as the Amazon software, and I’m happy to say the whole process is entirely reversible.

      When I get a chance maybe I’ll run some benchmarks to see if performance is substantially different with CM7… but benchmarks aren’t as important to me as real-world performance. What I really want to know is whether you can navigate the tablet without occasional lag. 

      • Jason

        From the video, the touchscreen still seems pretty unresponsive, missing a lot of taps. Is that the case or just a poor impression from the video? Missing taps has been my main frustration with the Fire using Amazon’s software. Whereas on the Nook everything was very responsive.

  • http://twitter.com/_stevenh Steven

    Assuming the audio thing works itself out soon, do you think there will be a way in the near future to retain the Amazon Lending library and video streaming via Prime via CM7? 

    • http://profiles.google.com/joseph.inglish Joe Inglish

      ^This.  My only two problems with the Fire are the custom interface and the lack of a volume rocker, and the second one’s not that big of a deal for a device I wouldn’t listen to music on anyway.  I’d buy one in a heartbeat if I could get the video streaming to work in CM.  Can CyanogenMod be unrooted using one of the one-click root apps?

      • Jason

        Streaming using the Amazon Instant app worked fine on the Nook Tablet, so don’t see why it wouldn’t work fine on the Fire w/CM7. You can use OTA Root Keeper to root and unroot as needed. It has an option to keep a ‘backup’ su so it can restore root on its own rather than having to reroot the traditional way.

      • http://www.liliputing.com Brad Linder

        I just tried that. It doesn’t work on the Kindle Fire with CM7.

  • http://wii4everybody.com/ Oziel

    Please someone let me know when the icecream sandwich version comes out for the kfire xD

  • Kyle Thompson

    Just an FYI to anyone who might run into this issue, I installed CM7 from Kindle 6.2, and when I went to revert, it would not allow me to revert to the 6.2 update, I had to use 6.1, also when it booted into the Kindle Launcher, I kept getting the message “android.process.media has stopped unexpectedly” Doing a factory reset took care of this problem.

    • Txk

      Where can I find the 6.1?

  • srish2

    Thanks for posting these directions!  I just got Cyanogenmod installed on my Kindle Fire and love it.

    Question for you.  Above you mentioned installing Android Market: “…manually copy the Market app to your /system/bin directory”
    isn’t it supposed to go in the /system/app directory?

    • http://www.liliputing.com Brad Linder

      Whoops. You’re correct, it should be system/app. I don’t know what I was thinking when I typed that.

  • David M

    The link to the “log” file takes you to the download link to “last log”, not “log”.

    • David M

      p.s. the files are identical i read through them 

  • Jason

    I wonder if CyangenMod allows you to connect a USB keyboard to the Kindle Fire.

  • bryan

    anyone having cp: not found

  • darrenTrNg

    If I reinstall the stocked ROM 6.2, would my kindle fire become unrooted?

  • Angel Patricio

    in paragraph 3 of your guide: Choose the option to install latest TWRP RecoveryKindle Fire is freezer with a yellow triangle with the screen on fire in the center icon. I press button power for recovery but nothing happens

  • LiliputingSucks

    Having the same problem as the guy below me, your guide actually bricked my Kindle fire. Can you guys revise the guide and provide a guide to unbrick it!

    • http://www.liliputing.com Brad Linder

      It sounds like you’re stuck in fastboot mode. Try opening a command prompt by typing “cmd” in the Windows run box and then navigating to the directory where you’ve placed the Kindle Fire Utility.

      Go into the tools directory and type “adb devices” to see if the Kindle Fire is listed. If it’s not, you need to use the included tool to install the drivers or try another method. 

      If your device is recognized, try this:

      fastboot oem idme bootmode 4000
      fastboot reboot

      • natemann133

        My Fire is bricked now too…followed your instructions to try to unbrick it but no luck. Can you direct me to the ‘other methods’ that you’ve said we now need to resort to?

      • http://www.liliputing.com Brad Linder

        Did your computer fail to recognize the Kindle Fire when you tried the “adb devices” command? You probably need to make sure the proper drivers are installed to recognize your computer in adb *and* fastboot mode.

        Even if your device shows up for adb, when you’re in fastboot your computer thinks it’s a different device and needs different drivers. 

        The simplest way to do that is to use Vashypooh’s Kindle Fire Utility. Sometimes you may need to reboot your computer before things work properly, or open Device Manager on your PC and uninstall existing drivers for your device.

        Unfortunately it’s hard to troubleshoot this problem because there are a number of situations that could lead to it. You may have to try a few different things before your device is recognized.

        It’s hard to actually *brick* a Kindle Fire, leaving it in a completely unbootable state. But unfortunately it’s not nearly as hard to get it into a state where it doesn’t seem to want to wake up with the tools you have at your disposal.

        I’ve run into similar trouble a number of times while testing out new software on the Fire.

        Here are some other sources that may provide some help:

        http://rootzwiki.com/topic/12363-how-to-windows-install-twrp-20-on-your-kindle-fire/page__view__findpost__p__304183

        http://rootzwiki.com/topic/12363-how-to-windows-install-twrp-20-on-your-kindle-fire/page__st__20__p__302104#entry302104 

      • natemann133

        Thanks for the quick response! Yes, my computer is NOT recognizing the Kindle (it says ‘USB Device Not Recognized’) and it doesn’t show up in abd. I will follow your advice and let you know my progress. 
        Sorry if I seem a little naive on the topic. I just got my Kindle Fire and since I am an avid iPhone jailbreaker I may have jumped into this too fast.

      • natemann133

        I feel like a moron, but could you quickly explain this step?
        ————————————————–
        To fix this in windows, I had to add the vendor ID 0x18d1 and
        %SingleAdbInterface%            = USB_Install, USBVID_18D1&PID_0100%CompositeAdbInterface%  = USB_Install, USBVID_18D1&PID_0100&MI_01

        to the android_winusb.inf (PID came from properties/detail under device manager)  

      • http://www.liliputing.com Brad Linder

        Basically he’s manually modifying a file called android_winusb.inf by adding an ID for the Kindle Fire so that Windows knows it’s there. 

        This is similar to the steps you need to take to enable adb support for the Kindle Fire to root it:

        http://liliputing.com/2011/11/how-to-root-an-amazon-kindle-fire.html 

        The difference is that when I first wrote that guide you *had* to do it manually, but now there are tools available that automate parts of the process.

        Kindle Fire Utility and the driver installation script attempt to do the same thing, but we’re still in the early days of Kindle Fire hacking and some of the scripts/tools are still pretty rough around the edges.

        So it’s a good idea to spend some time figuring out how they work so you can make manual changes if necessary.

        That’s not to say you need to figure out how to hack things yourself — but if you can find the android_winusb.inf file and open it in Notepad and make the changes suggested in the RootzWiki forum, that’s a useful thing to be able to do. 

      • natemann133

        Fixed and fixed. And I was actually able to run TWRP and so far Cyanogen Mod is running on my device.

      • natemann133

        Actually I just go it to wake from the dead! I guess my only other question is…will it boot normally next time I shut it off? 
        I really want CyanogenMod but now I’m nervous as hell to try it again ;) 

      • http://www.liliputing.com Brad Linder

        Use Kindle Fire Utility to make sure boot mode is set to 4000 and you should be fine!

  • Anonymous

    I did everything correctly up to the point of installing twrp. i successfully rooted use kindle fire utility and then selected the option to install twrp and it did nothing, it reccomended turning the device on and off but still did nothing after multiple attempts (i waited about a full minute before switching on and off each time) the fire will not boot on now and kindle fire utility is not detecting it at all. the device shows the kindle fire logo and freezes. please help me with this.

    • Anonymous

      the kindle is recognized in device manager as android adb interface.

  • Dominik mueller

    it worked with twrp… but i came accendentily on recovery at the android menu… now it doesnt boot… and when i try to flash the update.zip again, there is an error message “no md5file found. ignore”…
    what can i do?

    • Dominik mueller

      here is the whole error message:

      “– Verify md5 for /sdcard/TWRP/update.zip
      – no md5 file found, ignoring

      - Install /scdard/TWRP/update.zip…

      E:Cannot load volume /misc!
      Finding update package…
      Opening update package…
      Installing update…
      E:Cannot load volume /misc!”

      what can i do know?
      Please help me!

      p.s.: sorry for my bad english

      • joncdel

         I am also getting these error messages when trying to restore to stock/factory settings.

    • James Williams

      me too, I did and won’t work like what you did…

  • Ashley Lane

    Both log and last_log download as log. also when i copy and run the code for them it says “cp: not found”. I placed them on the sd card. Also the one that is called last_log before i download it and turns into just log, I renamed last_log.

  • moronta

    hello friends, I tell you that 3 days ago acquired a kindle fire and made him root and install the Cmod7 but not the latest version, I did kindle fire using 0.9 and the TWRP utility recovery. after installing an update utility to kindle fire I disconnect the cable is accidentally reset my kindle and stays in the yellow triangle icon and does not charge TWRP. would appreciate any help because I’m a little desperate.

    sorry for my English but I’m using a translator.

    Thank you.

  • Wangthoi

    After all I complet my installation touchscreen is not working what can i do now