Search This Blog

something

ClockworkMod Recovery: Everything you need to know

Doesn't matter if you're new to the Android operating system or it's been a year you're having an Android phone, you might have heard about the term "cwm recovery" or "clockworkmod recovery" and just kept wondering what it meant and what it can do. This article will answer both these questions.

Every Android phone in the market comes fitted with a stock recovery, a special boot mode activated by a combination of keypress in switched off condition, which can be used to perform various things to troubleshoot your device. The stock recovery can perform some basic yet important functions like install official updates to your device and factory reset your Android device. According to Wikipedia
A recovery image is a special boot mode, which is used to backup or restore the device's storage and repair or upgrade system software
That leaves Advanced users wanting much more. An Indian-origin Developer named Koushik Dutta sprang into action and developed a custom recovery called ClockworkMod recovery for all Android devices. Although the official list of supported devices is really narrow as compared to the range of Android smartphones available, a web builder for clockworkmod plus the mammoth amount of support by developers on forums like xda helped port cwm to almost every Android powered device on this planet.
ClockworkMod recovery comes with many additional features as compared to the stock recovery:
A typical CWM screen
I shall try to explain each option available in the clockworkmod recovery.

All options under Clockworkmod Recovery: Explained

  • Reboot System Now:
    Duh, it will reboot your device normally, and you will boot into your current ROM.
  • Apply update from sdcard:
    If you have got an update.zip file, usually an official signed update, then you can flash it using this option. The update must be named "update.zip" and should be present in the root of the sdcard i.e. outside any folders.
  • Wipe Data/ Factory Reset:
    Factory resets your device. You will see the startup menus you saw which helped you get started when you first booted into your device. This will wipe the /data partition on your device. All the accounts attached to your phone also will be lost. Nothing in /system or /sdcard will be affected. All user applications along with their data, will be lost irreversibly.
  • Wipe Cache Partition:
    Wipes the cache partition on your device. Cache files are stored by applications and games to speedup their loading times, and to perform somewhat faster. You can clear your cache just to give sort-of a breather to the internal storage.
  • Install Zip from sdcard:
    This options allows you to flash any zip from the sdcard of your device. Going to this option generally presents you four sub-options:
    • Apply /sdcard/update.zip:
      Works almost exactly as Apply update from sdcard, I can't get why this option is present here too!
    • Choose zip from sdcard:
      This option pops up a sort of file browser, you have to select the .zip file which you want to flash.
    • Toggle signature verification:
      Well, it toggles signature verification! I recommend keeping it disabled. (It is disabled by default.)
    • Toggle script asserts:
      It toggles script asserts on and off. If you don't know much about script asserts, better leave it to default. Script asserts will disable the recovery's search for edify script.
  • Backup and Restore:
    Entering this menu will aslo greet you with further sub-menus, I counted them and found that there were 3 of them! :P
    • Backup:
      Takes a nandroid backup of your device. One of the first things to do when you install cwm on your device. This will backup every single folder present in your phone's internal memory + external partition of the sdcard (which you might be using for linking apps via link2sd or a2sd). The backup is stored in a folder present at /sdcad/clockworkmod/backup
      The backups are stored with their name being the time at which they were taken. If you want, you can rename those files, so that you can remember which one is of which ROM, or just for your pleasure. Be careful, if you rename the file with something having a " " space in between, then when you will restore those files, MD5 sums won't match. I recommend storing a copy of these backups in the hard disk of your computer.
    • Restore:
      Selecting this option will ask you to choose which backup you would want to restore. Restoring any backup will take you to the exact same phone you had just before the backups. It is really helpful when you're stuck in a bootloop or have your phone soft bricked.
    • Advanced Restore:
      This is a really brainy addition. It asks you to restore only the partition you want. It can be really useful. If you install a new ROM, you lose all of your current user apps, selecting restore data from advanced restore option will restore only the /data folder, thus you can use your new ROM with all your ol apps! Another use of this can be when you try to create your own ROM. If the phone is not booting into your rom, then you can restore the partitions one by one and use the permutations and combinations to find out which problem is topping your device from booting.
  • Mounts and Storage:
    This menu gives you the option to mount/unmount any partition on your device. You can also format all of your partitions (one by one) from here. The last option "mount USB Storage" allows you to transfer files from your computer to the sdcard and vice versa, from within the cwm recovery.
  • Advanced:
    This is also one of the most used options in the cwm recovery.
    • Reboot recovery:
      Reboots your phone to the cwm recovery. Don't know why this option is present here, because I never catually used it! I guess you may need it when you think the recovery is acting weird and you should refresh it.
    • Wipe Dalvik Cache:
      Wipes the dalvik cache from your device. Once deleted, these files are then re-created when you reboot your device and thus the boot will take longer than usual, don't panic. You will get it more clearly once you know what dalvik cache is!
    • Wipe Battery Stats:
      Delets a file called batterystats.bin from . It sort-of calibrates  your battery. I recommend doing this once when you install a new ROM.
    • Report Error:
      Reports an error to Koushik Dutta and team. A popup to send the error report will pop up when you reboot your device.
    • Key Test:
      It tells you the number that has been allocated to any key on your phone. This is mainly used when you want to remap your hardware buttons, or just to check whether the system is registering the press of a particular hard button. You can press the back button on your phone to exit this test.
    • Partition sdcard:
      Creates two partitions on your sdcard. While one is used for general purpose like storing songs, movies and everything else, the second partition can be used to increase your RAM and internal memory. During this process, it asks you how much storage you will dedicate to the second partition. It also ask you what swap size you want. Swap partition is used for increasing RAM, as it acts as virtual memory. Swap works only if your ROM supports that.
      Caution: This will format your sdcard without even warning you!
    • Fix Permissions:
      This will fix some permissions gone-wrong in the internal storage. It will fix some force closes on system apps.(or on the apps you converted to system but forgot to change their permissions.
  • Power off:
    Duh (again!), it powers off your phone until you power it on again.

Booting into ClockworkMod recovery:

You won't be able to do anything above, if you don't know how to enter the recovery! To boot into clockworkmod recovery (or any recovery you have at present), you have three options in general:
  1. Key Combinations:
    As the key combination for entering the recovery is different for different devices, I can't help you out much here. Ask it on your device's forum/thread on xda-developers or just google it. One thing that's same for every device is that you need to switch off your device first. If googling doesn't help you (which is rare) and no one at xda knows the combination for your device (even rarer!), then you can use permutation and combination of various hard buttons. On my device, it is trackpad + volume up + power button. Another common one is, volume up + power button. Note that you have to press these buttons simultaneously and you don't have to release those buttons unless your screen lits up.
  2. Using ADB:
    For this option to work, you must have set up ADB for your device. Then typing "
    adb reboot recovery" in the console will boot you into recovery.
  3. Long Press of Power button:
    This option comes when you have installed a custom ROM (not every custom ROM comes with such a feature). This will surely work if you are running Cyanogenmod.
  4. Using Terminal Emulator:
    Typing the command: "
    /system/bin reboot recovery" in Terminal Emulator will boot you into recovery mode.

How to Flash ClockworkMod recovery:

  1. Flash CWM via ROM Manager:
    From the play store, download ROM Manager. From the option to flash cwm recovery, select your device and it will download and flash the recovery to your device.
    This won't work on most devices as a very few devices are present in the list, thus a large number of unsupported devices have to find other ways.
  2. Flash via Fastboot:
    Set up Fastboot for your device first. Find the cwm recovery for your device using Google, almost always you end up being on xda. Copy the file you downloaded to your fastboot folder and with your phone connected in fastboot mode, give the command "
    fastboot flash recovery recovery.img" Change the reocvery.img to whatever the name of the recovery file you are flashing.
  3. Flash using Terminal Emulator:
    Copy the cwm recovery file to your sdcard. Open up terminal emulator and give the command "
    su", followed by this "flash_image recovery /sdcard/abc/xyz.img"
    where abc is the path of the file and xyz denote the name of the cwm file.

Scrolling through CWM Recovery:

Unless you are using the touch version, which is supported by very less devices as of now, you can have some trouble scrolling through the options in clockworkmod (or any other) recovery. In most devices, you can use Volume up to scroll up, Volume Down to scroll Down, Power to select and the Back button to go back.

That's it!
I think that's a lot of material to gasp. Hats off to you for reading this far, and to me for writing this much. :P
Get all your remaining doubts (I doubt if you still have any doubt) cleared by posting your comments below. Follow us on various Social Networks to stay connected with us.