HOW TO FLASH A ROM TO ANDROID PHONE

In this guide we’ll show you the different ways you can flash a ROM or system image lớn your Android phone or tablet. These include how to lớn flash a custom ROM, how lớn manually flash an OTA zip file, & how khổng lồ flash a factory image supplied by your phone’s manufacturer.

Bạn đang xem: How to flash a rom to android phone

With Lollipop beginning lớn be rolled out to Nexus devices, as well as flagship phones from manufacturers such as Motorola and LG, many users will now be thinking about how they can update their device as quickly as possible.

You can wait for the over the air update to lớn be delivered automatically, of course. But this can take up khổng lồ a couple of week. If you cannot wait that long, there are other options you can explore.


*

Three ways to lớn flash

The flexibility và openness of Android means it is possible khổng lồ manually install và OS update, through a process called flashing. This replaces the entire system partition on your phone with a new one, overwriting all of the original OS files in the process.

There are three ways to bởi vì this, and we’ll explore each of them in this feature.

The first is to flash a factory image. This is the full OS software, officially released by many manufacturers on their websites. By flashing this you can update your device to lớn a newer version of the OS—or re-install the existing OS should you need to lớn. Flashing a factory image will restore your device to its factory conditions.The second is to manually flash an over the air zip file. This is the tệp tin that your phone checks for và installs when an official OTA update is available. If you don’t want to lớn wait for the notification khổng lồ hit your phone you can tải về the OTA file—so long as you have sầu the URL for it—và flash it manually.The third method is to flash a custom ROM. For many users this will be used to lớn install a different version of the OS on their phone, or to update a device that is no longer getting OS updates direct from the manufacturer. It also enables you to play with the hundreds of custom ROMs available, including this such as CyanogenMod, Paranoid Android and OmniROM.

Most of these methods require that your phone is rooted. If you’re flashing an official update you will need lớn disable root through the Superuser phầm mềm first, otherwise it will fail. You should also keep your phone plugged in, or at least have sầu it fully charged, before you attempt lớn flash anything.


With that explained, let’s get going.

Flash a factory image

Factory images are released by many manufacturers. They contain the full software in the khung it would installed when you first bought your phone.

*

Not all manufacturers release factory images, but you can find some at the following links:

The instructions for flashing a factory image may differ from one manufacturer khổng lồ the next. They’re always well sign-posted, though, so be sure lớn check before you proceed.


Also, you need lớn ensure you download the correct version for your precise Model, which may be listed under a codename rather than the consumer Model number (for instance, the Nexus 5 is called hammerhead).

Our guide will focus on the Nexus 5 specifically.

Download the SDK

To begin, download the factory image to your desktop.

Next download and phối up the Android SDK. The boot your phone into lớn fast boot. We’ve got a full guide on how lớn vày that. You’ll also need to lớn unloông chồng the bootloader if you haven’t already done so.

*

Flash the image

Now open a terminal or comm& line window và change the directory to the one containing your factory image, using the cd command in the terminal window.

Type flash-all khổng lồ run the flash-all file in the thư mục you downloaded. The image will now begin being copied & installed on your device. Wait for it khổng lồ finish then reboot your device.

cảnh báo that flashing a factory image will completely wipe your device và return it lớn a factory-like state. This includes all your data, photos and so on. Make sure you create a backup of all of this, so that you can restore it later.

It is possible to edit the downloaded files khổng lồ remove the wipe commvà (-w), but when installing a whole new version of the OS it’s best not lớn do this.

Flash a factory image without wiping data

Update 14 Nov: A user on reddit, Mikuro, has posted instructions on how you can flash only parts of a factory image, meaning you don’t wipe your data. We’ve sầu tested it và it works. The instructions are for the Nexus 5, but should be applicable to all factory images for Nexus, và possibly other devices too.

I personally don’t use the included shell scripts.

I vày it this way:

Edit: You must have sầu the Android SDK installed . It comes with the essential fastboot tool, as well as adb.

Xem thêm: Hướng Dẫn Mua Bitcoin Bằng Paypal Localbitcoins, Hướng Dẫn Mua Bán Bitcoin Bằng Paypal

Exp& image-hammerhead-lrx21o.zip Reboot phone to lớn bootloader, connect via USB

cd /path/to/hammerhead-lrx21ofastboot flash bootloader bootloader-hammerhead-hhz12d.imgReboot bootloader.

fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.21.imgcd image-hammerhead-lrx21ofastboot flash boot boot.imgfastboot flash system system.imgDone. I skip data, cache & recovery. If you use or want the stoông chồng recovery, flash that, too (I’d rather keep TWRP, myself). Clearing cabít might be a good idea, & should be harmless.

These instructions are for Windows. If you’re using fastboot on Mac or Linux you need to lớn precede the fastboot command with ./ (eg. ./fastboot flash boot boot.img)

Manually flash an OTA zip

If you have sầu got the URL for a over the air update you can download the OTA tệp tin to lớn your desktop & flash it manually. This way you won’t need lớn wait for your phone to lớn have sầu the update pushed khổng lồ it by the manufacturer.

To vì this you need to lớn mix up the Android SDK once again, as outlined above sầu. Copy the OTA tệp tin inlớn the platform-tools folder for easy access, then open a terminal or command line window và change the directory to the location of the file.

*

Sideload via ADB

Reboot your phone into lớn Recovery. If you’re running the lachạy thử version of TWRPhường Recovery tap Advanced and select ADB Sideload. If not you may need to hold the Volume Up and Power buttons together to lớn see a menu offering an ADB update option.

Connect your device to your desktop. In the terminal window type adb sideload . The tệp tin will now begin flashing lớn your device, with a progress bar indicating how cthua trận it is to completion.

Once it has finished, reboot your device, and your update OS should launch.

Because this is the same update that would be applied automatically by your phone’s manufacturer it will not result in an data loss or wipe your device. That said, it’s always good practice khổng lồ make a backup first.

Flash a custom ROM

The final method of flashing an update or new OS lớn your Android device is by flashing a custom ROM.

To bởi this you will need lớn have sầu rooted your phone & installed a custom Recovery (this normally happens during the root procedure).

Download the ROM you wish lớn flash, making sure that it is compatible with your device. Some devices have multiple variants configured for different regions or networks, so double kiểm tra that you’ve got the right one here, too.

The ROM will tải về in .zip khung. Don’t unzip it. Copy the file inlớn the internal storage on your device.

Flash through Recovery

Shut down your phone or tablet & reboot inkhổng lồ recovery mode.

The first thing you should vì is create a Nandroid backup, which you will be able lớn restore easily should there be any problems when flashing the ROM.

*

Navigate your way lớn the Backup section in Recovery & create a full backup. It’ll take a while khổng lồ complete.

Now navigate your way through the menu systems to lớn the Install section, & then locate where you saved the zip tệp tin and select it.

*

Follow the on-screen instructions when prompted, & then finally confirm that you are ready to lớn flash the ROM. Once you begin you won’t be able to lớn stop it.

The first boot after flashing may take a while, so be prepared to lớn leave sầu the phone for a good ten minutes or so while it boots. If ti doesn’t work after that the flash may have sầu failed. Try repeating the process, or restoring your Napp android to revert your device to lớn its previous state.

Further reading

The flashing process is relatively painless, but can be daunting the first time, và things can go wrong.

We recommend our guides on rooting Android, using TWRPhường. Recovery, and using Fastboot for a more thorough introduction lớn flashing an hacking Android. We also take a look at how lớn solve common flashing problems, including how to lớn unbrick your phone.