How to flash a custom recovery (like CWM or TWRP) on Android
Let’s start with the fact that every phone ships with stock recovery software. Stock recoveries vary slightly between phone makers, but they are identical in their essence - they allow you to manually flash official updates and clear your phone’s cache. Sounds limited? It is, and that’s why custom recoveries exist.
Custom recoveries that we’ll flash here replace the limited stock ones, adding all sorts of functionality to your phone. Flashing a custom recovery is often a key part of the rooting process, but that is not its only use. Here is a short summary of all that you can do with a custom recovery:
- Create and restore a backup image - A backup image makes a copy of all your phone settings, application and app data. Such a backup copy is crucial if your hacking experiments fail - in such cases, you can use the created backup image to restore your phone to a fully functional earlier state without losing any data.
- Flash custom ROMs - custom ROMs can completely overhaul the looks and functionality of an Android smartphone, and usually they are the main reason for first flashing a custom recovery.
Important: You have to unlock the bootloader on your phone before flashing a custom recovery! Here’s how to do it on Motorola phones.
How to flash a custom recovery
- USB drivers for your phone must be installed on a computer. You can grab them from the official website of the company that made the phone. Get the latest:
HTC Android USB drivers (included in HTC Sync) here
LG Android USB drivers here (go to “Software updates” > Select your phone > Click on “Install USB Drivers”)
Sony Android USB drivers here
Motorola Android USB drivers (included in Motorola Device Manager) here
- Android SDK must be installed on your computer. You can download from the official Android developer portal.
- Download the latest version of either CWM or TWRP (we prefer CWM, but both work equally well). For CWM go to this website, find your device, and download the image for it:
For TWRP go to this website, click on “Get TWRP for your device” and type you device's name to download the image for it:
- Your phone must be connected to your computer via USB. If you get stuck at some point in the tutorial, a common fix is to try disconnecting the phone and re-connecting it again.
2. Now, it’s time to open Command Prompt (terminal) and get serious. Don’t worry, all you’d need to do is copy and paste some code in it, it's not hard at all. To open the terminal in Windows 7, hit the ‘Windows’ key, type ‘cmd’, and hit Enter; in Windows 8, you’d need to navigate to the new Modern UI home panel, and just type in ‘cmd’ there.
Once you open the terminal, you need to change the folder to Platform Tools in the Android SDK. Typically, it looks something like this, but you have to find the exact path where you installed the Android SDK on your computer:
To change the folder you just copy the above path (as it is on your computer) and put ‘cd’ in front of it, so the whole command would look like so:
cd C:/Android SDK/adt-bundle-windows-x86_64-20131030/sdk/platform-tools/
3. In the terminal, enter the following:
Make sure your device is listed.
Next, type in:
adb reboot bootloader
Wait for the phone to reboot in bootloader mode.
4. Now, go to the platform-tools directory (a sub-directory of the Android SDK), and open Command Prompt there (you can do so by Shift + Right-click > Open Command Prompt).
In the command line, enter the following:
Make sure that your device is listed.
Finally, type in:
fastboot flash recovery FILE.IMG
Replace ‘FILE.IMG’ with the recovery you want to flash. We have given you links for CWM and TWRP at the beginning of the article, but if you've missed them, you would need to download them now from the following links:
5. IMPORTANT! After you have flashed the recovery, it is crucial that you you don't just reboot your device. Go to ‘Recovery’ by using volume down to scroll. Don’t scroll using the Volume Up button! In this case, Volume Up serves as the ‘Select’ button. Once you have gone to ‘Recovery’, only then press the Volume Up to boot in recovery mode.
If you don't follow these instructions, your device will simply re-flash the stock recovery, and you’d have to start all over with the custom recovery flash process.
And voila, that’s it! You now have custom recovery flashed on your phone, congrats!
12 October How to flash a custom recovery (like CWM or TWRP) on Android
28 March How to boot into custom recovery (like CWM or TWRP) on Android
28 March Here's how to root the Samsung Galaxy S5 (SM-G900F) step by step
14 March How to enable USB debugging on Android
13 March How to unlock the bootloader on Motorola phones (Moto X, Moto G)
1. XperiaFanZone (Posts: 1458; Member since: 21 Sep 2012)
Wait for it....."The beauty of Android". ;)
Sorry, that was terrible. If only there was a delete button.
2. PapaSmurf (Posts: 8842; Member since: 14 May 2012)
I was going to show you this article since you want to try rooting, but you beat me here. Did you actually do it or no?
3. XperiaFanZone (Posts: 1458; Member since: 21 Sep 2012)
No I needed to downgrade the kernel to root without unlocking the bootloader - not sure if downgrading such would wipe everything. :s
Just want to save app data from my old phone to use for the new one. Lesson learnt - when buying a new phone, root it ASAP!
4. XperiaFanZone (Posts: 1458; Member since: 21 Sep 2012)
Cont.: which is what I have done with the new one.
7. XperiaFanZone (Posts: 1458; Member since: 21 Sep 2012)
Anyways put a link up of the srticle.
10. SuperAndroidEvo (Posts: 4340; Member since: 15 Apr 2011)
It's never too late to root your phone. The reason you want to root your phone is so you can have FULL control. Once you root you can always put the most up to date ROMs & Kernels.
Just back up you phone to your PC just so you don't lose anything important & follow directions & you will be fine. The only time you could ever f*ck something up is if you deviate or just not follow directions.
Trust me I have been rooting EVERY phone I have ever owned that has been Android that is. Root is the only WAY to go & the reason why to me Android is the CLEAR winner in the mobile world.
My rooted Samsung Galaxy Note 3 is by FAR the most epic phone I have ever had the pleasure to root & install a custom ROM. TouchWiz is pure garbage. I have an AOSP ROM BUT with all the core Samsung Galaxy Note 3 functionality & it's truly a pleasure to use...
11. XperiaFanZone (Posts: 1458; Member since: 21 Sep 2012)
I just want my app DATA backed up from my non-rooted phone - in any way, root or no root.
13. SuperAndroidEvo (Posts: 4340; Member since: 15 Apr 2011)
15. XperiaFanZone (Posts: 1458; Member since: 21 Sep 2012)
I've seen that before but it doesn't work on Sony (and Moto) phones - Sony's disabled something on their phones.
16. SuperAndroidEvo (Posts: 4340; Member since: 15 Apr 2011)
That is very interesting... All I have to say is WOW. Looks like the only way you will be able to achieve what you want is through root.
Better get going on your root adventure. It will open your eyes to how locked down you really are when running STOCK...
5. antonioli (Posts: 185; Member since: 08 Sep 2013)
I made it for the first time. The options are more interesting by far.
6. kaikuheadhunterz (Posts: 775; Member since: 18 Jul 2013)
You don't actually need the whole Android SDK, just the necessary files
8. Victor.H (Posts: 452; Member since: 27 May 2011)
True. We recommend getting the whole Android SDK, though, in case you want to continue with development further on.
9. GTX_Ti (unregistered)
May be Mini-SDK from XDA.
12. tedkord (Posts: 5130; Member since: 17 Jun 2009)
It's been a while, but if you're already rooted, can't you just install ROM Manager on your phone and use it to install CWM over your recovery partition? Or GooManager if you prefer TWRP? Much easier. Just make sure it supports your device.
18. networkdood (Posts: 6310; Member since: 31 Mar 2010)
Yes..you can..that is how I do it...twrp is great.
14. AfterShock (Posts: 2904; Member since: 02 Nov 2012)
I am thankful, PA didn't suggest a took kit.
17. water99211 (Posts: 11; Member since: 11 Dec 2013)
Phone Arena, you guys should do a article explaining how to combine your micro sd card with your phones memory to putt apps on it for rooted phones :D
19. networkdood (Posts: 6310; Member since: 31 Mar 2010)
Some devices have toolkits on XDA that can make this process even easier..as long as you have the drivers for tour computer...
20. headaxe (Posts: 2; Member since: 26 Apr 2014)
Hi, what do you mean on step 4? I can't understand where i have to put the FILE.IMG (Cwm recovery image).
21. headaxe (Posts: 2; Member since: 26 Apr 2014)
By the way (also in the step 4) my phone doesn't appears on the cmd line! What can I do?
23. HC1Gunner (Posts: 1; Member since: 24 Jun 2014)
Everything goes great until step 3. In the terminal enter the following:
adb devices, my device is listed
Next, type in:
adb reboot bootloader
Wait for the phone to reboot in bootloader mode.
Which results in the following below
Phone shows green Android character and says...Downloading... do not turn off target!!
at top left it says...
Product name: SGH-I537
Current binary: Samsung official
System status: Official
KNOX Kernel Lock: 0x0
KNOX warranty void: 0x0
Write Protect: Enable (text grayed out)
eMMC Burst mode Enable (text grayed out)
4. Now, go to the platform-tools directory (a sub-directory of the Android SDK)
In the command line enter the following:
Make sure that your device is listed.
Nothing appears to be listed..
29. Mfa901 (Posts: 73; Member since: 14 Jul 2012)
hey....go to XDA...if you will use this article...than surely you are going to messup your phone.....
24. IlyasMiah (Posts: 1; Member since: 04 Jul 2014)
On step 3, after typing in 'adb reboot bootloader' it restarts, but doesn't go into bootloader mode.
26. smmytmc (Posts: 1; Member since: 11 Sep 2014)
How do I get from fastboot screen to recovery screen without shutting down phone?
27. Alexboey (Posts: 1; Member since: 10 Oct 2014)
Please my case is now diffrent I accidentally flashed everything now even there is no android os nor the CWM the device is off and cannot boot to anything. Please how do I install the CWM back to the phone so that I can Intsall the OS also. I have just remained with an empty device.HELP me out PLEASE.
28. GreekGeek (Posts: 844; Member since: 22 Mar 2014)
Ever heard of FLASHIFY? PA?
Yes it's an app
lol it only took me less than 20 seconds to install a TWRP on my device
No need to complicate things, really
Or if you own a MEDIATEK device just install an app called MTK Mobile Uncle.... Works similar to Flashify
32. StraightEdgeNexus (Posts: 3605; Member since: 14 Feb 2014)
Thanks bro, its way easier than old school flashing. Installing.
37. Deadeye37 (Posts: 82; Member since: 25 Jan 2011)
Heck, the new version of the TWRP app will download & flash TWRP recovery itself. Super easy!
31. greenelektron (Posts: 181; Member since: 10 Sep 2014)
I own a nexus 5 but haven't tried flashing it. Friend say that i am not fully harnessing its power. Hehe.. I will try it one of this days.
33. Planterz (Posts: 1006; Member since: 30 Apr 2012)
Custom ROMs are fun. So are kernels. And with TWRP (or CWM), full backups are absurdly easy (and ALWAYS a good idea), and Titanium makes bringing all your apps (with data) to new ROMs painless.
34. Planterz (Posts: 1006; Member since: 30 Apr 2012)
It's also really, really, REALLY hard to permanently screw up a Nexus, especially with custom recovery installed. Of course, that doesn't mean you should be careless, and you should definitely educate yourself on xda or at least some youtube guides.
35. Whitefur (Posts: 18; Member since: 13 Oct 2014)
Ya, I f**ked this up pretty bad... RIP my Droid RAZR M...
36. Deadeye37 (Posts: 82; Member since: 25 Jan 2011)
I rooted, loaded TWRP, and flashed Pac Man Rom on my Samsung Galaxy S III literally the day before this article came out. I remember jumping through all the hoops specified in the article when I rooted my old T-mobile G2. This time around it was super easy:
Rooted with TowelRoot (download app and tap the button to root)
Installed TWRP from Google Play and used the app to flash the custom recovery and to run a full phone backup to my SD card. No USB hookup required!
Downloaded the Pac Man 4.4.4 Rom (RC2) along with the requisite Google Apps package.
Installed the ROM using the TWRP app. The TWRP app lets you select the zip files that will be installed and also lets you select the options for the install (backup, wipe caches, etc). After you select everything, the phone automatically restarts and boots into recovery and does everything.
You win Team Win! TWRP FTW!