[Galaxy Y GT-S5360 General] deathviper:
What Is ClockworkMod Recovery And How To Use It On Android​

ClockworkMod – also known as Clockwork and CWM – is a custom recovery for Android phones and tablets that allows you to perform several advanced recovery, restoration, installation and maintenance operations on your Android device that aren’t possible with the stock recovery. In what follows, we will cover all that this recovery is capable of doing, and how to do it. We do not discuss Touch recovery (and you shouldn’t use it on the ET4G) or Rogue recovery here. Those are different tuts…

All About Android Recovery

All Android devices ship with a recovery console that is basically a partition on the device’s internal memory and can be booted into. The stock recovery of almost all Android devices provides a few basic yet handy options that allow you to factory reset your device and also to recover its operating system using an official ROM in zip format, but that’s all you can do with it. That’s where a custom recovery comes handy.

A custom Android recovery basically replaces the stock recovery with one that lets you do all you can do with the stock recovery, plus a plethora of more options to give you a lot more control on your device. With a custom recovery, you can install official and unofficial ROMs as well as other updates including apps, themes, kernels etc. using zip files, wipe not just user data but pretty much every partition on your device, mount the storage card for USB mass storage access without leaving recovery, partition your SD card, wipe Dalvik cache and battery stats, fix permissions, perform, manage and restore backups and so on.

Introduction to ClockworkMod

ClockworkMod recovery is one of the most widely used custom Android recoveries that is available for most mainstream Android devices. It is the needed recovery for AOKP, AOSP, CM7 and 9. ClockworkMod recovery has been developed by Koushik Dutta (also known as Koush) – the same guy who brought us the Android ROM Manager.

Booting into ClockworkMod

On most Android devices including ones by Samsung, you can enter recovery by powering your device off and then powering it back on while keeping either the ‘Volume Down’ or the ‘Volume-Up’ button pressed, depending on the device (volume up for our phones). This will enter the bootloader from where you can select the ‘RECOVERY’ option by navigating to it with the Volume key and entering it with the ‘Power’ key.

On most Samsung devices specifically Samsung Galaxy S series devices, you must keep both the ‘Volume-Up’ and ‘Home’ keys pressed while powering on the device, to directly enter recovery.

Tour

1.reboot system now

This one is self-explanatory.

2.apply update from sdcard

This can be used for installation of any official or unofficial update, ROM, kernel, theme etc. that is in a zip format installable from recovery, as long as the file is named update.zip and it has been placed on the root of your SD card (i.e. not in any sub-folder). Selecting this option (and most of the options featured below) will bring up a rather annoying confirmation prompt but this has saved us on multiple occasions from a lot of trouble we would have been into due to accidental key presses. This is what we are talking about:

3.	wipe data/factory reset

This option wipes all user data on the device as well as cache. Doing this will leave your phone in the state it was in when you bought it or when any custom ROM was first installed. It will also wipe any sd-ext partition that you might have setup (more on this later).

4.	wipe cache partition

Wipes the cache partition of the device to clear all the data accumulated there over use. This is often used before installing a new ROM, app, kernel or any similar mod via recovery.

5.	install zip from sdcard

This option brings up the following sub-menu

:

1.	apply /sdcard/update.zip

This one is essentially the same as the ‘apply update from sdcard’ option of the main menu.

2.	choose zip from sdcard

Lets you install any zip file (with any name) from any location on your SD card. The file can be for a ROM, a kernel, an application, a theme or any mod as long as it is in recovery-flashable zip format. This is the most widely used option for installing a ROM that you have downloaded and copied to your SD card.

3.	toggle signature verification

Turns the signature verification on and off. When signature verification is on, you will not be able to install any custom ROMs that haven’t been signed by the developers (most custom ROMs aren’t signed). Switching it off skips the signature verification check and proceeds with the installation.

4.	toggle script asserts

Seldom-used option for a vast majority of users. It simply turns script asserts on or off. If you don’t know about these (we don’t), it’s best not to change this option.

5.	+++++Go Back+++++

Takes you back to the main recovery menu, obviously!

6.	backup and restore Undoubtedly one of the most important features provided by a custom recovery, the backup and restore feature – also known as Nandroid backup – allows you to take a snapshot of your phone’s entire internal memory including all partitions, and save it on the SD card.

1.	Backup

Takes a Nandroid backup, as explained above.

2.	Restore

Lets you restore a previously taken backup. Entering this option presents you with a list of existing backups from the SD card that you can choose from for restoration.

3.	Advanced Restore

This option is similar to the Restore option but once a backup has been selected to be restored, this option allows you to choose what parts of it to restore. You can choose to restore the boot, system, data, cache and sd-ext partitions.

7.	mounts and storage

Allows you to perform maintenance tasks on all the internal and external partitions of your android device

1.	mount/unmount /system, /data, /cache, /sdcard or /sd-ext

These options let you toggle between mounting or unmounting these respective partitions. Most users don’t need to change these options.

2.	format boot, system, data, cache, sdcard or sd-ext

These let you directly format any of these partitions. Take extreme care with this option as formatting any of these partitions will result in losing all data on them, especially the boot and system partitions. Formatting the system partition will remove your ROM and leave your phone without an operating system while wiping the boot partition may brick your phone unless you restore or flash another one before rebooting your device.

3.	mount USB storage

Lets you enable USB mass storage mode for your SD card right from recovery so that you can connect it to your computer via USB and transfer any files to/from it without having to leave recovery.

8.	advanced

This section contains a few options most users will not require, though these can come handy quite often, especially wiping Dalvik cache, which is required before most ROM installations.

1.	Reboot Recovery

Lets you directly and very conveniently reboot from recovery right back into recovery. This is useful option for certain back-to-back installations that require the device to at least boot once between them.

2.	Wipe Dalvik Cache

Allows you to wipe the cache for the Dalvik virtual machine (the custom-built Java virtual machine for Android).This is required before most ROM installations and at other occasions too, for fixing some problems.

3.	Wipe Battery Stats

Wipes the saved battery usage statistics and effectively recalibrates the battery. Useful in various scenarios when Android isn’t showing correct battery levels.

4.	Report Error

In case of errors, this feature can be used to save a log of recent ClockworkMod recovery operations on the SD card that you can later report from Android using ROM Manager.

5.	Key Test

Lets you press any of the hardware keys to see if they are properly functioning, and to see their key codes.

6.	Partition SD Card

This option gives you a no-frills way to partition your SD card properly for use with ROMs that support data2ext (a very handy hack for low internal memory devices that enables an /sd-ext partition on the SD card to be used as the internal user data storage i.e. as the /data partition). Once this option is selected, you will be given options to choose the sizes for the /sd-ext partition as well as an optional /swap partition on the SD card, and will then automatically format it for you, leaving the remaining space for normal SD card usage. This option will wipe all data from your SD card so use it with caution!

7.	Fix Permissions

Fixes the file permissions for the internal memory partitions back to default. This is very useful as a fix for several errors and Force-Closes that start appearing after you or an application you installed and provided root access end up messing up the permissions of important files.

Using ClockworkMod for ROM, kernel, apps, theme or mod installation

While in the complete feature tour we have already shown you how to install a ROM, kernel, app, theme or any similar mod from a recovery-flashable zip file using the recovery options, those of you who jumped straight to this section expecting to get just this information quickly are at the right place!

This guide is primary focused on a full feature tour of ClockworkMod recovery but in our previously written guide on how to flash a ROM or app from a zip to an Android device file from recovery, we have already covered in detail how to use ClockworkMod for installing any ROM, kernel, app, theme or mod using a recovery-flashable zip file. While that guide is based on an older version of ClockworkMod recovery, everything in it still applies to the latest versions and should work flawlessly.

How To Install A ROM Or App From Zip File To Android Device From Recovery

Please note that the terms ‘installing’ and ‘flashing’ can be used interchangeably here and will mean the same thing.

Disclaimer: Although I have done my best to make the following procedure as safe as possible, you should still follow this guide at your own risk.

Rooting your device renders its warranty void.

ALWAYS take backups before rooting or flashing a custom ROM or app to your phone.

Flashing a defective ROM or app to your phone might brick it so choose the ROMs and software that you flash wisely and never install a ROM or application from an untrusted source.

AddictiveTips will not be liable if your device gets damaged or bricked during the process.

Official ROM updates from device manufacturers or carriers are released in conveniently packaged installation files that you can run on your computer while your Android device is connected to it, and they automatically take care of updating your phone’s system. Similarly, most applications are available directly in the Android Market for easy installation, or come packaged as convenient ‘.apk’ files that you can just run on your Android phone to install. The case is not the same with most custom ROMs and several custom applications, which come in .zip files rather than PC installers or .apk files.

The idea of installing a customized operating system to their smartphone can be quite intimidating for inexperienced users. Though once they get used to it, some of them end up trying out different ROMs for their devices several times a day. While I don’t exactly recommend that you flash every new ROM that is made available for your Android phone, we are here to help you get over the fear of flashing a ROM that enhances the capabilities of your device so that you can use it to its fullest potential.

Here is a quick look at what we will be covering in this guide. Feel free to skip to the real deal if you already meet the prerequisites.

•	Before We Begin: Battery Check

•	Before We Begin: Unlocking the Bootloader (Stock Android Devices Only)

•	Before We Begin: Rooting

•	Before We Proceed: Installing a Custom Recovery

•	The Real Deal: Installing a Custom ROM to your Phone

•	The Real Deal: Installing an App From a Zip File to your Phone

There are certain steps that you might not require, and we shall be mentioning them in each section.

Before We Begin: Battery Check

Before you proceed with any of the following steps, make sure your phone’s battery level is not too low. It is recommended to have it at 50% or more. Do NOT take this lightly. If your phone’s battery runs out while you are attempting to flash a custom ROM, there is a significant chance of your phone getting bricked and becoming unusable PERMANENTLY.

Before We Begin:Unlocking the Bootloader (Stock Android Devices Only)

Note: This step applies only to Android devices with stock version of Android installed. At the moment, Google Nexus One and Nexus S are the only two such devices available. You may skip this step if you are using any other Android device.

Users of stock Android devices such as the Google Nexus One or Nexus S also need to unlock its bootloader before they can proceed. Once you have done this, you may proceed to the next step.

Before We Begin: Rooting

Note: You may skip this step if your device is already rooted, or if you already know how to root it.

Before you can install a custom ROM to your device, your phone needs to be rooted. Rooting is basically administrator or root level access required to perform administrative tasks on your Android device. Once you are done with the rooting process, you may proceed to the next step.

Before We Proceed: Installing A Custom Recovery

Note: You may skip this step if you already have a custom recovery installed on your device.

Rooting grants you the necessary access level to execute administrative tasks on your Android device but it is the recovery that provides the tools necessary to actually perform those tasks. While every Android device ships with a recovery, the stock recovery is quite limited in what it lets you do, and you need a custom recovery image to perform advanced operations on your device. Once you have a custom recovery installed on your phone, you will be ready to proceed to the next step.

The Real Deal: Installing a Custom ROM to your Phone

Now that you have a custom recovery installed on your phone, you can perform all sorts of wonderful advanced operations on your device and this includes the ability to flash a ROM or application from a zip file. The procedure is pretty standard for most ROMs, though there are certain ROMs which require additional steps for their installation. Since those steps differ from ROM to ROM, pay attention to instructions and this includes only the standard instructions here.

•	Manually

1.	Download the ROM from the link given in the article featuring that ROM. It should be a zip file.

2.	Connect your phone to your computer via USB and mount its storage card.

3.	Copy the downloaded ROM to the root of the storage card.

4.	Power your phone off and reboot it into recovery. This will involve using a combination of your device’s hardware keys. Once in recovery, you can navigate its menu using the volume up and volume down hardware keys or your phone’s trackball / optical track pad if it comes equipped with one.

5.	Use the ‘backup and restore’ feature of recovery to backup your existing ROM installation, software and data. This step is known as performing a nandroid backup. ALWAYS perform a backup before flashing a custom ROM, UNLESS you can afford to lose everything that’s on your phone at the moment.

Note: ALWAYS choose to perform the following steps 6, 7 and 8 UNLESS the ROM you are attempting to flash is an updated version of the same ROM that you are currently using, and is compatible with the current installation’s data. It is usually mentioned with the update whether you can install it over a previous version without wiping its data or not.

6.	Get back to the main recovery menu and use the option ‘wipe data/factory reset’. You will be prompted to confirm this action. Select “Yes – Delete all user data”.

7.	From the main recovery menu, select ‘wipe cache partition’. You will be prompted to confirm this action. Select ‘Yes – Wipe Cache’.

8.	From the main recovery menu, enter the ‘advanced’ menu. From this menu, select ‘Wipe Dalvik Cache’. You will be prompted to confirm this action. Select ‘Yes – Format/System’.

9.	From the main recovery menu, enter the ‘Mounts and Storage’ menu. From this menu, select ‘Format/System’. You will be prompted to confirm this action. Select ‘Yes – Wipe Dalvik Cache’.

10.	Go back to the main recovery menu by pressing the back button and select the ‘Install zip from SD card’ option.

11.	Select ‘choose zip from sdcard’ to get a list of the files and folders on your SD card. Scroll to the ROM’s file that you copied there in step 3, and select it. You will be prompted to confirm this action. Select ‘Yes – Install file_name.zip’ where file_name.zip is the name of the zip file that you are trying to install.

12.	Wait patiently while the ROM is flashed to your phone via recovery.

13.	Once the installation is complete, head back to the main recovery menu if you aren’t there, and select ‘reboot system now’. Your phone will now boot into the newly installed ROM.

The Real Deal: Installing an App From a Zip File to your Phone

While most apps for Android devices are available at the app store for direct download and installation or as .apk files for direct installation, there are certain apps which are only available as zip files installable from recovery. Their installation procedure is the same as installing a custom ROM that we just featured above. However, there are a few minute differences.

•	When installing an app from a zip file, you do NOT need to perform the ‘wipe data/factory reset’ or ‘wipe/system’ step so NEVER do that unless you know what you are doing, have a complete backup and want to start using your ROM as a fresh installation with the new app added.

•	You might or might not need to wipe the cache and the dalvik cache for installing apps from zip file. This varies from app to app and the developers of such apps as well as many reviewers including us mention when featuring an app whether it requires a cache and dalvik cache wipe or not. However, it never hurts to wipe these caches anyway, and it does not effect the data on your device or its storage card.

There you go, this concludes the guide on how to flash a ROM or app from a zip file to your Android device using a custom recovery. To try out the skills that you just learned, search our site for custom ROMs for your phone and start flashing, always remembering to take backups first!