How to Install a Custom ROM on Android

Check if your manufacturer allows unlocking the bootloader., Check if your carrier allows unlocking the bootloader., Understand the risks and limitations., Download the Android SDK tools you'll need., Extract the ZIP file., Run Android SDK Manager...

79 Steps 9 min read Advanced

Step-by-Step Guide

  1. Step 1: Check if your manufacturer allows unlocking the bootloader.

    Depending on your Android device, you may be able to unlock the bootloader with the help of the manufacturer.

    Not all manufacturers allow this, and even if they do not all models may be supported.To quickly see which models your manufacturer allows to be unlocked, search "manufacturer unlock bootloader" (e.g. "HTC unlock bootloader").

    This will typically display the manufacturer's bootloader website as the first result.

    Nexus phones can always be unlocked.
  2. Step 2: Check if your carrier allows unlocking the bootloader.

    Even if your device's manufacturer allows unlocking the bootloader and your device is supported, your carrier may still block it., When you unlock your bootloader, you typically void any warranty that is currently active.

    You also break the DRM on your device, which can cause problems with streaming music services.

    Unlocking your bootloader also disables Apple Pay as a security measure.

    Finally, throughout the entire process you run the risk of permanently disabling your device., You'll need a few utilities on your computer in order to proceed with unlocking your bootloader.

    Visit the Android developer website.

    Scroll down to the "Get just the command line tools" section at the bottom of the page.

    Click the link for the ZIP file for your operating system.

    Place the ZIP file in a folder that you want the tools to be located in. , Double-click the ZIP file after you've placed it in its folder and click the "Extract" option., This will display a list of available SDK tools., This is the only software you'll need for unlocking your bootloader.,, You'll be able to find these on the support page of your device's manufacturer's website.

    Make sure to download the drivers that match your device's model.,, This folder was created when you installed the SDK software., Make sure you right-click in a blank spot., A Command Prompt window will appear already set to the correct location., You should see your device's serial number.,,, This will enable the Developer Options menu.,, Not all phones will display this option, and it is only necessary if it is there., This allows you to send commands to your Android through ADB., The following process will vary depending on your phone manufacturer.

    Be sure to follow the instructions they provide exactly.

    What follows here is a general guide., The process for this will vary depending on your device, but generally you'll need to turn off your phone and then hold Power and Volume Down for 10 seconds., This command is different for every manufacturer.

    For example, for HTC you would type fastboot oem get_identifier_token.

    Make sure your Android device is still connected to your computer and the Command Prompt window is open from the platform-tools folder. , You'll see a long code appear on the screen, and it may be broken up into several lines.

    Click and drag to highlight the entire code.

    Press Ctrl+C to copy it., Use the bootloader unlock code request form to submit your code and request your unlock code.

    This can take a week or two, depending on the manufacturer., When you receive your unlock code, you'll be given the command to use to apply it to your device.

    This command varies depending on the manufacturer.

    Your Android will need to be connected to your computer and in fastboot mode.

    For Nexus devices, run fastboot oem unlock, or fastboot flashing unlock for the Nexus 5X and newer.

    The command for your manufacturer may be different.

    For example, HTC users would type fastboot oem unlocktoken Unlock_code.bin after placing the Unlock_code.bin file received from HTC into the ADB folder. , You may be prompted by your phone to confirm the unlock., This command will reboot your device and exit fastboot mode., You'll see this message every time you turn on your device as a security measure.

    Make sure your device boots completely into the Android operating system as normal.

    You're now ready to install a custom recovery., If your manufacturer or carrier will not allow you to unlock the bootloader, your only other option is to find and use an exploit to bypass it.

    This process is different for every phone model, and some phones simply cannot be unlocked at all.

    The best place to get started are the XDA Forums.

    Find your phone model and look for any bootloader unlocks released by the community.

    When performing an unlock using an exploit, be sure to follow every step in the XDA thread exactly, as the risk for bricking your device increases dramatically when not using official methods. , This guide will cover installing TeamWinRecoveryProject (TWRP), one of the more popular recovery methods for Android ROMs.

    Another popular recovery is ClockworkMod Recovery (CWM).

    Both should work for installing most ROMs, though some ROMs will require a specific recovery environment.,, If your device is not on this list, try a different recovery environment like CWM.

    Note that while your device might be supported, your carrier or region may not. , This will display more details for your specific device., This will download TWRP in IMG format to your computer., Place it in the same location as your ADB binary files.

    This will allow you to transfer it to your phone using ADB in the Command Prompt., This will make it easy to enter the name during the transfer., If you don't still have the Command Prompt open, hold ⇧ Shift and right-click in the open platform-tools folder.

    Select "Open command window here."

    This will copy the TWRP image file to your Android device and replace your current recovery environment with it.,, This will enter recovery mode in most devices.

    Some devices may have a different button combination for entering recovery mode.

    Perform a web search for "model recovery mode."

    This will allow TWRP to access your encrypted device, which is essential for creating backups., This will open the backup utility in TWRP.

    Creating a full backup of your system (Nandroid) will allow you to restore your device in case something goes wrong during the ROM installation., This will back up all of your essential system files and data., You'll see this at the bottom of the Backup screen.

    The backup process will likely take a while to complete, so let your Android device process.,, This will have different names depending on your device (PDS, EFS, WiMAX, etc.), and your device may not have anything listed here., This will back up your IMEI information, which will be essential for restoring connectivity if you break something later., The XDA forums is the most popular Android development community on the internet, and you'll find virtually every available ROM here., You'll see popular devices listed on the main page, or you can use the search bar to find your specific model.

    Make sure your model matches both your device and your carrier.

    The same device on two different carriers will have two different model numbers, and you'll need a ROM that matches your exact model. , Each device on XDA will have a section that's dedicated to ROM development.

    You'll be able to find virtually any ROM of note for your device here., The number of ROMs available for your device is heavily dependent on how popular it is.

    Some devices may only have one or two ROMs to choose from, while others may have dozens.

    Some devices don't have any ROMs available at all, but these are usually devices that don't have unlockable bootloaders.

    Different ROMs can accomplish different things.

    Some ROMs are designed to be as barebones as possible for maximum performance, while others will add a bunch of features that aren't normally available on your device. , ROMs often add new features, but they also often have limitations that may not have been present on your original device.

    Make sure that you will be OK with the feature set of your new ROM., Many ROMs will have special instructions that you'll need to follow during installation.

    It is imperative that you follow the author's instructions exactly, or you may encounter serious problems., This will begin downloading the ROM file, usually in ZIP form.

    ROMs may be fairly large, and the file could take a while to download., This site allows you to download Googe's proprietary apps, like Gmail and the Play Store, since ROMs cannot legally include them., You'll need to select your device's architecture (platform), operating system version, and the variant you want.

    If you don't know your device's platform, you should be able to find it on the XDA Forum's device information page for your device.

    Make sure the OS version matches the ROM you are installing, not your current OS version.

    Most users can select Stock as the variant, which includes all of the default GApps. , This will begin downloading your selected GApps package.

    You should now have two ZIP files: your chosen ROM and the GApps file., If it isn't already, you'll need to connect your Android to your computer via USB so that you can transfer the files onto the device's storage., You can transfer the files to either your Android's internal storage, or to the SD card if you have one inserted., You can click and drag them to your device's storage.

    Make sure they are placed in the base directory for either the internal storage or the SD card (don't put them in folders).,, You'll need to open Recovery mode, which you'll do from the powered-off state., This process will vary depending on your device, so perform a web search if you aren't sure.

    Generally, you'll hold Power and Volume Down until the recovery menu appears.

    You'll know you're in the right place when you see TWRP., It is always recommended to wipe your device before installing a new ROM.

    This will delete all of the data on the device., The reset process will only take a few moments.,, Make sure to start with the ROM, not the GApps file., The ROM file will begin installing, which may take several minutes to complete., Now you'll be installing the GApps file,, The GApps installation will begin, which may take as long or longer than the ROM installation., This will clear the cache, which is necessary for starting the ROM the first time., Your Android device will reboot, and if everything went smoothly you'll load your ROM's home screen environment.It may take a long time for your new ROM to boot.

    This should only happen the first time you boot it up.
  3. Step 3: Understand the risks and limitations.

  4. Step 4: Download the Android SDK tools you'll need.

  5. Step 5: Extract the ZIP file.

  6. Step 6: Run Android SDK Manager.

  7. Step 7: Uncheck everything except Android SDK Platform-tools.

  8. Step 8: Click Install.

  9. Step 9: Download and install the USB drivers for device.

  10. Step 10: Connect your Android to your computer via USB.

  11. Step 11: Open the platform-tools folder in the folder your SDK tools are in.

  12. Step 12: Hold ⇧ Shift and right-click in the folder.

  13. Step 13: Click Open command window here.

  14. Step 14: Type adb devices and press ↵ Enter.

  15. Step 15: Open your Android's Settings.

  16. Step 16: Scroll to the bottom and tap About phone.

  17. Step 17: Tap the Build Number entry seven times.

  18. Step 18: Return to Settings and tap Developer Options.

  19. Step 19: Enable OEM unlocking (if present).

  20. Step 20: Enable USB debugging.

  21. Step 21: Open your device manufacturer's unlock code procedure instructions.

  22. Step 22: Reboot your device into the fastboot menu.

  23. Step 23: Type the unlock key retrieval command in ADB.

  24. Step 24: Copy the device ID code.

  25. Step 25: Submit your device ID code to the manufacturer.

  26. Step 26: Run the command specified by your manufacturer.

  27. Step 27: Confirm that you want to unlock.

  28. Step 28: Type fastboot reboot on your computer.

  29. Step 29: Look for the Bootloader Unlocked message.

  30. Step 30: Find and follow a device-specific guide if you can't unlock the bootloader.

  31. Step 31: Visit the TWRP website.

  32. Step 32: Click the Devices tab.

  33. Step 33: Verify that your device is supported.

  34. Step 34: Click the link for your device.

  35. Step 35: Click the Download link.

  36. Step 36: Copy the IMG file to your ADB folder.

  37. Step 37: Rename the file to twrp.img.

  38. Step 38: Type adb reboot bootloader in the Command Prompt.

  39. Step 39: Type fastboot flash recovery twrp.img and press ↵ Enter.

  40. Step 40: Type fastboot reboot and press ↵ Enter.

  41. Step 41: Press and hold the Volume Up and Power buttons as the device reboots.

  42. Step 42: Enter your PIN if prompted.

  43. Step 43: Tap Backup.

  44. Step 44: Select Boot

  45. Step 45: System

  46. Step 46: and Data.

  47. Step 47: Swipe the bar to begin the backup.

  48. Step 48: Return to the Backup menu and clear all of the options.

  49. Step 49: Scroll to the bottom and select your special partition after Recovery.

  50. Step 50: Start another backup with your special partition selected.

  51. Step 51: Visit the XDA forums.

  52. Step 52: Open the subforum for your device.

  53. Step 53: Scroll down to the ROMS

  54. Step 54: KERNELS

  55. Step 55: RECOVERIES

  56. Step 56: & OTHER DEVELOPMENT section.

  57. Step 57: Find a ROM that looks interesting.

  58. Step 58: Look for features and limitations.

  59. Step 59: Carefully read the entire post for the ROM.

  60. Step 60: Click the Download link for the ROM file.

  61. Step 61: Visit the GApps download site.

  62. Step 62: Select your device's configuration on the GApps site.

  63. Step 63: Click the Download button.

  64. Step 64: Connect your Android to your computer.

  65. Step 65: Open your Android's storage on your computer.

  66. Step 66: Copy the ROM and GApps ZIP files onto your Android.

  67. Step 67: Disconnect your phone after transferring.

  68. Step 68: Power off your Android device.

  69. Step 69: Boot your Android into recovery mode.

  70. Step 70: Tap Wipe.

  71. Step 71: Swipe the bar to perform a factory reset.

  72. Step 72: Tap Install on the TWRP main menu.

  73. Step 73: Scroll down and tap the ZIP file for your ROM.

  74. Step 74: Swipe the bar to start flashing.

  75. Step 75: Return to the main menu after flashing and tap Install again.

  76. Step 76: Scroll down and tap the GApps ZIP file.

  77. Step 77: Swipe the bar to begin the installation.

  78. Step 78: Tap Wipe cache/dalvik and then swipe to confirm.

  79. Step 79: Tap Reboot System.

Detailed Guide

Depending on your Android device, you may be able to unlock the bootloader with the help of the manufacturer.

Not all manufacturers allow this, and even if they do not all models may be supported.To quickly see which models your manufacturer allows to be unlocked, search "manufacturer unlock bootloader" (e.g. "HTC unlock bootloader").

This will typically display the manufacturer's bootloader website as the first result.

Nexus phones can always be unlocked.

Even if your device's manufacturer allows unlocking the bootloader and your device is supported, your carrier may still block it., When you unlock your bootloader, you typically void any warranty that is currently active.

You also break the DRM on your device, which can cause problems with streaming music services.

Unlocking your bootloader also disables Apple Pay as a security measure.

Finally, throughout the entire process you run the risk of permanently disabling your device., You'll need a few utilities on your computer in order to proceed with unlocking your bootloader.

Visit the Android developer website.

Scroll down to the "Get just the command line tools" section at the bottom of the page.

Click the link for the ZIP file for your operating system.

Place the ZIP file in a folder that you want the tools to be located in. , Double-click the ZIP file after you've placed it in its folder and click the "Extract" option., This will display a list of available SDK tools., This is the only software you'll need for unlocking your bootloader.,, You'll be able to find these on the support page of your device's manufacturer's website.

Make sure to download the drivers that match your device's model.,, This folder was created when you installed the SDK software., Make sure you right-click in a blank spot., A Command Prompt window will appear already set to the correct location., You should see your device's serial number.,,, This will enable the Developer Options menu.,, Not all phones will display this option, and it is only necessary if it is there., This allows you to send commands to your Android through ADB., The following process will vary depending on your phone manufacturer.

Be sure to follow the instructions they provide exactly.

What follows here is a general guide., The process for this will vary depending on your device, but generally you'll need to turn off your phone and then hold Power and Volume Down for 10 seconds., This command is different for every manufacturer.

For example, for HTC you would type fastboot oem get_identifier_token.

Make sure your Android device is still connected to your computer and the Command Prompt window is open from the platform-tools folder. , You'll see a long code appear on the screen, and it may be broken up into several lines.

Click and drag to highlight the entire code.

Press Ctrl+C to copy it., Use the bootloader unlock code request form to submit your code and request your unlock code.

This can take a week or two, depending on the manufacturer., When you receive your unlock code, you'll be given the command to use to apply it to your device.

This command varies depending on the manufacturer.

Your Android will need to be connected to your computer and in fastboot mode.

For Nexus devices, run fastboot oem unlock, or fastboot flashing unlock for the Nexus 5X and newer.

The command for your manufacturer may be different.

For example, HTC users would type fastboot oem unlocktoken Unlock_code.bin after placing the Unlock_code.bin file received from HTC into the ADB folder. , You may be prompted by your phone to confirm the unlock., This command will reboot your device and exit fastboot mode., You'll see this message every time you turn on your device as a security measure.

Make sure your device boots completely into the Android operating system as normal.

You're now ready to install a custom recovery., If your manufacturer or carrier will not allow you to unlock the bootloader, your only other option is to find and use an exploit to bypass it.

This process is different for every phone model, and some phones simply cannot be unlocked at all.

The best place to get started are the XDA Forums.

Find your phone model and look for any bootloader unlocks released by the community.

When performing an unlock using an exploit, be sure to follow every step in the XDA thread exactly, as the risk for bricking your device increases dramatically when not using official methods. , This guide will cover installing TeamWinRecoveryProject (TWRP), one of the more popular recovery methods for Android ROMs.

Another popular recovery is ClockworkMod Recovery (CWM).

Both should work for installing most ROMs, though some ROMs will require a specific recovery environment.,, If your device is not on this list, try a different recovery environment like CWM.

Note that while your device might be supported, your carrier or region may not. , This will display more details for your specific device., This will download TWRP in IMG format to your computer., Place it in the same location as your ADB binary files.

This will allow you to transfer it to your phone using ADB in the Command Prompt., This will make it easy to enter the name during the transfer., If you don't still have the Command Prompt open, hold ⇧ Shift and right-click in the open platform-tools folder.

Select "Open command window here."

This will copy the TWRP image file to your Android device and replace your current recovery environment with it.,, This will enter recovery mode in most devices.

Some devices may have a different button combination for entering recovery mode.

Perform a web search for "model recovery mode."

This will allow TWRP to access your encrypted device, which is essential for creating backups., This will open the backup utility in TWRP.

Creating a full backup of your system (Nandroid) will allow you to restore your device in case something goes wrong during the ROM installation., This will back up all of your essential system files and data., You'll see this at the bottom of the Backup screen.

The backup process will likely take a while to complete, so let your Android device process.,, This will have different names depending on your device (PDS, EFS, WiMAX, etc.), and your device may not have anything listed here., This will back up your IMEI information, which will be essential for restoring connectivity if you break something later., The XDA forums is the most popular Android development community on the internet, and you'll find virtually every available ROM here., You'll see popular devices listed on the main page, or you can use the search bar to find your specific model.

Make sure your model matches both your device and your carrier.

The same device on two different carriers will have two different model numbers, and you'll need a ROM that matches your exact model. , Each device on XDA will have a section that's dedicated to ROM development.

You'll be able to find virtually any ROM of note for your device here., The number of ROMs available for your device is heavily dependent on how popular it is.

Some devices may only have one or two ROMs to choose from, while others may have dozens.

Some devices don't have any ROMs available at all, but these are usually devices that don't have unlockable bootloaders.

Different ROMs can accomplish different things.

Some ROMs are designed to be as barebones as possible for maximum performance, while others will add a bunch of features that aren't normally available on your device. , ROMs often add new features, but they also often have limitations that may not have been present on your original device.

Make sure that you will be OK with the feature set of your new ROM., Many ROMs will have special instructions that you'll need to follow during installation.

It is imperative that you follow the author's instructions exactly, or you may encounter serious problems., This will begin downloading the ROM file, usually in ZIP form.

ROMs may be fairly large, and the file could take a while to download., This site allows you to download Googe's proprietary apps, like Gmail and the Play Store, since ROMs cannot legally include them., You'll need to select your device's architecture (platform), operating system version, and the variant you want.

If you don't know your device's platform, you should be able to find it on the XDA Forum's device information page for your device.

Make sure the OS version matches the ROM you are installing, not your current OS version.

Most users can select Stock as the variant, which includes all of the default GApps. , This will begin downloading your selected GApps package.

You should now have two ZIP files: your chosen ROM and the GApps file., If it isn't already, you'll need to connect your Android to your computer via USB so that you can transfer the files onto the device's storage., You can transfer the files to either your Android's internal storage, or to the SD card if you have one inserted., You can click and drag them to your device's storage.

Make sure they are placed in the base directory for either the internal storage or the SD card (don't put them in folders).,, You'll need to open Recovery mode, which you'll do from the powered-off state., This process will vary depending on your device, so perform a web search if you aren't sure.

Generally, you'll hold Power and Volume Down until the recovery menu appears.

You'll know you're in the right place when you see TWRP., It is always recommended to wipe your device before installing a new ROM.

This will delete all of the data on the device., The reset process will only take a few moments.,, Make sure to start with the ROM, not the GApps file., The ROM file will begin installing, which may take several minutes to complete., Now you'll be installing the GApps file,, The GApps installation will begin, which may take as long or longer than the ROM installation., This will clear the cache, which is necessary for starting the ROM the first time., Your Android device will reboot, and if everything went smoothly you'll load your ROM's home screen environment.It may take a long time for your new ROM to boot.

This should only happen the first time you boot it up.

About the Author

C

Cynthia Martin

Writer and educator with a focus on practical home improvement knowledge.

97 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: