This article describes how to install a custom ROM on your Android device, changing the look and functionality of your phone, giving it new life. This is an advanced procedure and it risks making the device unusable.
Steps
Part 1 of 4: Unlock the Bootloader
Step 1. Check if your device manufacturer allows unlocking the bootloader
Depending on your Android model, it may be possible to unlock the bootloader with the help of the manufacturer. Not all manufacturers allow it and even when they do, it doesn't apply to all models.
- To quickly find out if your model falls into this category, search for "bootloader unlock manufacturer" (eg "Samsung bootloader unlock"). This should make the manufacturer's bootloader website appear among the first results.
- Nexus phones can always be unlocked.
Step 2. Check if your carrier allows unlocking the bootloader
Even if your device manufacturer allows unlocking, it may be your carrier who prevents it.
Step 3. Understand the risks and limitations
When you unlock the bootloader, you usually void the warranty. You also interfere with your device's DRM and this can cause problems with music streaming services. Furthermore, this procedure also causes Apple Pay to be deactivated as a security measure and there is a possibility that the phone will become permanently inoperable.
Step 4. Download the Android SDK tools you will need
You need some computer programs if you want to unlock the bootloader.
- Visit the Android developer website.
- Scroll down to the "Get Command Line Tools Only" section at the bottom of the page.
- Click the link for the ZIP archive compatible with your operating system.
- Put the ZIP file in the folder where you will save the tools.
Step 5. Extract the ZIP archive
Double click on the file after placing it in the desired folder, then click the "Extract" item.
Step 6. Run Android SDK Manager
The list of available SDK tools will open.
Step 7. Uncheck all boxes except Android SDK Platform-tools
This is the only program you need to unlock the bootloader.
Step 8. Click Install
Step 9. Download and install the USB drivers for your device
You will find them on the support page of your phone manufacturer's website. Make sure you download the drivers compatible with your model.
Step 10. Connect the Android device to the computer via USB
Step 11. Open the platform-tools folder inside the path where the SDK tools are located
The directory was created when you installed the program.
Step 12. Hold Shift and right click on the folder
Make sure you do this in an empty spot.
Step 13. Click Open Command Prompt Window Here
A command prompt window will open that is already set to the correct path.
Step 14. Type adb devices, then hit Enter
You should see the serial number of your device.
Step 15. Open the Settings of your Android device
Step 16. Scroll down and press About phone
Step 17. Press the Build Number button seven times
This enables the Developer Options menu.
Step 18. Go back to Settings and hit Developer Options
Step 19. Enable OEM Unlock (if present)
You won't find this entry on all phones and you only need to enable it if it's available.
Step 20. Enable USB Debugging
This allows you to send commands to your Android device via ADB.
Step 21. Open the device manufacturer's unlock procedure instructions
The operation varies according to the manufacturer. Make sure you follow the directions provided to the letter. The following is a general guide.
Step 22. Reboot your device in fastboot mode
The steps to do this vary by phone, but you'll usually need to turn it off, then hold the Power and Volume Down buttons for 10 seconds.
Step 23. Enter the unlock key recovery command on ADB
The command is different for each manufacturer. For example, for HTC mobiles you should write fastboot oem get_identifier_token.
Make sure your Android device is still connected to your computer and that the Command Prompt window is open and on the path to the platform-tools program folder
Step 24. Copy the device identification code
You will see a long code appear on the screen, which can be divided by several dashes. Click and drag to select it all. Press Ctrl + C to copy it.
Step 25. Send the device code to the manufacturer
To do this, use the bootloader unlock request form and request the unlock code. It can take a week or two for the request to be processed, depending on the manufacturer.
Step 26. Run the command specified by the manufacturer
When you receive an unlock code, you get a command that you can use to apply it to your device, different for each manufacturer. The Android device must be connected to the computer and in fastboot mode.
- For Nexus devices, run fastboot oem unlock or fastboot flashing unlock for Nexus 5X and newer models.
- The command required by your device manufacturer may be different. For example, users with an HTC need to write fastboot oem unlocktoken Unlock_code.bin once the Unlock_code.bin file received from the manufacturer has been placed in the ADB folder.
Step 27. Confirm unlocking
The phone may ask you to confirm the operation.
Step 28. Write fastboot reboot on your computer
With this command the device will restart and exit fastboot mode.
Step 29. Look for the Bootloader Unlocked message
You will see this every time you turn on the device, as a safety measure. Make sure the Android OS starts normally. You are now ready to install a custom recovery.
Step 30. Find and follow a specific guide for your model if you are unable to unlock the bootloader
If your device manufacturer or operator does not allow this, the only solution is to find an exploit that can bypass the restriction. The process is different for all phones and some simply cannot be unlocked.
- The first place you should look is the XDA forum. Find your phone model and search for community-published unlocking methods.
- When unlocking with an exploit, make sure you follow all the steps on the forum to the letter, because the risk of breaking your phone permanently is much higher if you don't use an official method.
Part 2 of 4: Install a Custom Recovery
Step 1. Visit the TWRP website
This guide explains how to install TeamWinRecoveryProject (TWRP), one of the most used recovery methods for Android ROMs. Another popular software is ClockworkMod Recovery (CWM). With both you should be able to install almost any ROM, although some require a specific recovery environment.
Step 2. Click the Devices tab
Step 3. Check if your device is supported
If it's not on this page, try an alternative recovery environment, such as CWM.
Note that your carrier or region may not be supported even if the device is on the list
Step 4. Click the link for your device
This will allow you to view more details for the specific model.
Step 5. Click the Download button
You will download to your computer TWRP in IMG format.
Step 6. Copy the IMG file to your ADB folder
Put it in the same location as the ADB execution files. This way you can transfer it to your phone using ADB with command prompt.
Step 7. Rename the file to twrp.img
This will make it easier to enter the name during the transfer.
Step 8. Type adb reboot bootloader in the command prompt
If you haven't opened Command Prompt yet, hold down Shift, then right-click on the platform-tools folder. Select "Open Command Prompt Window Here".
Step 9. Type fastboot flash recovery twrp.img, then press Enter
Doing this will copy the TWRP image file to the Android device and replace the current recovery environment with it.
Step 10. Type fastboot reboot, then press Enter
Step 11. Press and hold the Volume Up and Power buttons while the device restarts
This procedure opens recovery mode for almost all phones.
Some devices require a different key combination to enter recovery mode. Search the internet for "(your phone model) recovery mode"
Step 12. Enter your PIN if asked
This allows TWRP to access the encrypted data of the device and is very important to create a backup.
Step 13. Press Backup
TWRP Backup Utility will open. By creating a full system backup (NANDroid) you will have the option to restore your device if something goes wrong during the ROM installation.
Step 14. Select Boot, System and Data
With this operation, you back up all system files and essential data.
Step 15. Slide the bar to start the backup
You will see it at the bottom of the screen. It will probably take a few minutes to complete, so let your Android device work.
Step 16. Go back to the Backup menu and delete all options
Step 17. Scroll to the bottom of the page and select your special partition after Recovery
The name will differ by device (PDS, EFS, WiMAX, etc.) and in some cases you won't find any entries.
Step 18. Start backup special partition after selecting it
This way you create a copy of the IMEI information, which is essential for restoring connectivity if something goes wrong later on.
Part 3 of 4: Finding a ROM
Step 1. Visit the XDA forum
This is the best known Android development community on the internet, where you can find almost any ROM available.
Step 2. Open the subsection of your device
The pages dedicated to the most used phones are listed on the main page, otherwise you can use the search bar to find your specific model.
When choosing the model make sure that the operator is also the right one. The same devices from two different carriers have different model numbers and you need a specific ROM for your phone
Step 3. Scroll to the ROMS, KERNELS, RECOVERIES, & OTHER DEVELOPMENT section
On the XDA forums, each device has a section dedicated to ROM development. On these pages you will find almost all the ROMs available for your model.
Step 4. Find a ROM that interests you
The number of ROMs available for your device varies a lot based on its popularity. For some you will find only one or two, while for others dozens. In extreme cases you will not find any ROMs, but these are usually the models whose bootloader cannot be unlocked.
The various ROMs have different functionalities. Some are designed as simply as possible to maximize performance, while others add tons of options not normally available
Step 5. Consider features and limitations
ROMs often add new features, but they can also have limitations that weren't present in the original device. Make sure that the ROM you have chosen fully satisfies you.
Step 6. Read carefully the entire post dedicated to the ROM
Many ROMs need to be installed following special instructions. It is very important to follow the author's directions to the letter or you may run into serious problems.
Step 7. Click the Download ROM file button
This will start downloading the ROM, usually in ZIP format. They can be quite large, so downloading can take a few minutes.
Step 8. Visit the GApps download site
Here you can download Google-owned apps, such as Gmail and the Play Store, as they cannot be included in ROMs for legal reasons.
Step 9. Select your device configuration on the GApps website
You must indicate the architecture (platform), the version of the operating system and the desired variant.
- If you don't know the platform of your device, you can find this information on the page dedicated to that model on the XDA forums.
- Make sure the OS version is the same as the ROM you want to install, not the current one.
- In most cases, you can choose Stock, which includes all the default Google apps.
Step 10. Click the Download button
This will start downloading the GApps package you have selected. You should now see two ZIP files: the ROM you have chosen and the GApps file.
Part 4 of 4: Install the ROM
Step 1. Connect the Android device to your computer
If you haven't done so already, you need to connect it via USB to your computer, so you can transfer the files to your phone's memory.
Step 2. Open the Android device folder on your computer
You can transfer files to the phone's internal memory, or to the SD card if you have one inserted.
Step 3. Copy the Gapps ROM and ZIP file to your Android device
You can drag them to the phone folder. Make sure you put them in the root folder of your internal storage or SD card (don't put them in subfolders).
Step 4. Unplug your phone after the transfer is complete
Step 5. Turn off the Android device
You have to open the Recovery mode and you can do it starting from the phone off.
Step 6. Boot your device into recovery mode
The procedure for doing this varies by model, so do an internet search if you don't know it. Generally, you will need to hold down the Power and Volume Down buttons until the recovery menu appears. You will know you are on the right screen if you see TWRP.
Step 7. Press Wipe
It is always advisable to wipe all device data before installing a new ROM.
Step 8. Slide the bar to initiate the factory reset
It will take a few moments for this operation.
Step 9. Press Install in the TWRP main menu
Step 10. Scroll down and hit your ROM's ZIP file
Make sure you start with the ROM and not the GApps file.
Step 11. Swipe the bar to start the device flash
This will start the ROM installation, which can take several minutes.
Step 12. Go back to the main menu after the flash and hit Install again
Now it's the turn of the GApps file.
Step 13. Scroll down and hit the GApps ZIP file
Step 14. Swipe the bar to start the installation
The procedure will begin and will take approximately the same time as the ROM installation or a little longer.
Step 15. Press Wipe cache / dalvik, then swipe to confirm
This will clear the cache contents, a necessary step before booting the ROM for the first time.
Step 16. Press Reboot System
The Android device will restart and if there are no errors, you will see the home screen of the newly installed ROM appear.