Let's start with the fact that you need Linux. In Windows, you can only disassemble the firmware, but you can’t put it back together for purely technical reasons. Now about the firmware. Usually they are distributed as ZIP archives flashed through custom recovery. It is one of them that we will need for experiments. I recommend starting the romodeling path with some custom firmware as close as possible to AOSP, because it is often easier to figure it out than in stock.

  1. Unpack the archive with the firmware to any folder.
  2. Download the script from the link and unzip it to any folder.
  3. Run the ext file (if it complains about the lack of Java, just skip it by pressing y ; Java is only needed for packing).
  4. Now select unpacking by pressing button 1 and then Enter.
  5. A new folder named extract_* will appear next to the ext file and the tools folder. Copy the system.new.dat and system.transfer.list files into it.
  6. After copying the files, press Enter and wait. After a while, you will need to press Enter again, enter the administrator password and tap Enter again.
  7. Ready. The contents of system in the extract_*/output folder.

Manual way

Unpack the archive with the firmware to any folder (for example, to rom):

$ mkdir ~/rom $ unzip path_to_archive -d ~/rom/

Download the tools we need to this folder:

$ cd ~/rom $ wget https://github.com/xpirt/sdat2img/raw/master/sdat2img.py

Let's run the script:

$ chmod +x sdat2img.py $ ./sdat2img.py system.transfer.list system.new.dat system.img

It converts the system.new.dat file into a raw image named system.img . Mount the image to the mnt subfolder:

$ mkdir mnt $ sudo mount -t ext4 -o loop system.img ~/rom/mnt

Android directory structure

After unpacking system, the following directory structure will appear:

  • app- pre-installed applications with standard privileges;
  • priv-app- pre-installed applications with elevated privileges, including some system components;
  • bin- binary files of the ELF format, similar to the /bin and /usr/bin directories in Linux. Contains various system components used by higher-level system components;
  • etc- settings files. A complete analog of /etc in Linux, used, however, only by those very system components. Android applications store individual settings in the /data/data/ directories;
  • fonts- fonts. By default, it contains only Roboto branded fonts;
  • framework- libraries of Java classes used by the system and applications. There is also a framework-res.apk file containing a complete description of the operating system interface, including all graphic files;
  • lib and lib64- Linux libraries used by low-level system components. Similar to the /lib and /usr/lib directories on Linux, including such standard libraries as libc, libz, libssl. Devices with ARMv7 architecture and below will not have a lib64 directory;
  • media- media files: ringtones, notification sounds, interface sounds and OS boot animation;
  • tts- files needed by the speech synthesizer;
  • usr- a directory that usually contains the files needed to run applications from the bin directory. Essentially, an analogue of /usr/share ;
  • vendor- files supplied by the device manufacturer. Usually contains binary firmware for various hardware components, such as a Wi-Fi module;
  • xbin- optional directory; custom firmware uses it to store things like the bash interpreter, SSH, PowerTOP, BusyBox, and other useful tools;
  • build.prop- a file containing information about the assembly, as well as various low-level settings;
  • addon.d- contains scripts that run after installing the firmware. GApps also prescribe their own script here, thanks to which they are reborn after reinstalling the firmware.

Now that we're familiar with the basic structure of Android, let's start making changes.

Removing and adding applications

All pre-installed programs can be found in two folders:

  • /system/app/;
  • /system/priv-app/.

They differ from each other in access privileges. If programs from app have the same permissions as third-party programs (for example, those installed from the Play Store), then applications from priv-app can use privileged APIs (privileged rights). You can learn more about this from.

To pre-install the application into the firmware, just throw its APK file into /system/app/ . You can, of course, create a separate folder, but in our case this does not make sense, because the folder is used to store libraries and odex files, which we simply do not have. To delete, simply delete the folder with it.

You can go further and change stock applications for analogues. For example, to replace the calendar, delete the folder Calendar and copy our favorite com.rpagyc.simplecalendar.apk to /system/app . And you can not copy. Then the firmware will be without a calendar.

The main thing to remember is that stock programs can be linked. Therefore, the removal of one program may well lead to the complete inoperability of another (for example, CalendarProvider and Calendar: by deleting the first one, you will make not only the stock calendar inoperable, but also any other calendar). Fortunately, there are not so many relationships in pure AOSP firmware.

Changing the loading animation

Animations are stored as PNG images packed into the /system/media/bootanimation.zip archive without compression. Inside the archive are:

  • desc.txt- a file describing the animation;
  • part0- folder with animation files that are played first;
  • part1- a folder with animation files that are played second;
  • part?- extreme folder, images from which are played at the end.

The desc.txt file might contain something like

1920 1080 60 p 1 0 part0 p 0 0 part1

The purpose of these lines is intuitive: 1920 × 1080 is the image resolution, 60 is the number of frames per second. Part0 and part1 point to the folders from which the animation will play and the playback sequence. In general, there can be either one part or several (three or more).

The images in the part folders are numbered with five digits in order of playback: 00000.png , 00001.png , 00002.png ... These images can be changed to your own, thereby creating an original animation. Or you can just delete the bootanimation.zip file. Then the device will show animation from standard Android. Or use a ready-made collection of animations on w3bsit3-dns.com.

Changing the sound design

In fact, all the sounds that the system plays are stored in the /system/media/audio folder. Inside it you will find the following folders:

  • alarms- alarm ringtones;
  • notifications- notification sounds;
  • ringtones- ringtones;
  • ui- system sounds, such as low battery, camera focus, selection of interface elements.

In alarms, notifications, ringtones, you can add as many melodies as you like. You can take them, for example, here:

  • standard melodies from different Nokia phones and smartphones;

And a little life hack: deleting files from the ui folder will not lead to crashes and errors, but to the disappearance of system sounds. Therefore, you can easily turn off the sound of creating a picture from the camera, taking a screenshot, simply by deleting the files containing these sounds (their names are intuitive).

Adding Fonts

Fonts are stored in fonts . You can find archives with font files on w3bsit3-dns.com and XDA. To install, just copy and replace the ttf files from the archive to the fonts folder.

Change system settings (build.prop)

There is an interesting build.prop file in the system image, which contains a lot of useful information about the hardware of the device and the default settings for various stock applications. In fairness, I note that this is not always the case. For example, in Gigaset ME and ME Pro build.prop is divided into two parts. One part contains the settings for the Gigaset ME, and for the ME Pro some lines are duplicated, but the keys (smartphone name and so on) are different. This was done to ensure more or less correct performance of the same firmware on different devices.


Build.prop contains (or may contain) a huge number of settings. Some of them do not change anything, some improve one at the expense of the other, but there are those that are really useful:

  • ro.product.model and ro.product.manufacturer- smartphone model and manufacturer's name. By replacing these lines, you can make the Play Store think that you have a different smartphone, which will open access to more software. For any little-known Chinese smartphones, these lines can be saving;
  • hw.qemu.mainkeys- takes only two values: 0 - show on-screen navigation keys, 1 - do not show buttons. The absence of a string corresponds to 0;
  • debug.sf.nobootanimation- a value of 1 disables the loading animation, which slightly increases its speed. Setting it to 0 or deleting the line returns the animation to its place;
  • ro.telephony.default_network- tells the system which mode the mobile network should be switched to when booting;
  • ro.sf.lcd_density- DPI of the display, the most accurate value for the display can be calculated through a convenient site. But no one forbids you to set a larger or smaller value to your liking: higher values ​​make interface elements larger, low ones make them smaller;
  • ro.config.vc_call_vol_steps- number of volume steps during a call (default 8);
  • ro.config.media_vol_steps- number of steps for media volume (default 15).

Embedding Google Apps in firmware

Almost always, custom ROMs come without Google services and the app store. The developers suggest that we install them separately using the GApps package. However, it can be integrated directly into the firmware.

First you need to download the GApps package. I recommend taking the Open GApps archives. You select the Android version, processor architecture, and bundle variant (Pico, Nano, Stock...), which determines how many different Google apps the archive contains. I recommend downloading the Pico version. It contains only the Play Store and a set of libraries necessary for its operation.

The integration of GApps into the firmware is done as follows:

  1. Unpack the GApps ZIP archive using any archiver.
  2. Go to the Core folder.
  3. We see a lot of archives with the .tar.lz extension. Extract with lzip.
  4. After unpacking, copy the files from the folders to the corresponding folders in the system. What to throw where, it is easy to guess from the structure of the directories in the archive. For example, configupdater (from the screenshot) should be placed in the priv-app folder.
  5. Go to the GApps folder (located next to Core) and do steps 3 and 4 for the files in it.
  6. That's it, we have integrated GApps into our firmware!

Free place

It must be understood that the place for installing firmware is limited. You cannot install firmware that is larger than the device's system partition. You can see its value using:

$ adb shell df /system

The second option: put a terminal on the device and type the command

$ df /system

You can find out the partition size in bytes by installing BusyBox on your smartphone and running the command in the terminal

$ busybox df -B 1 /system

Or the same with ADB:

$ adb shell busybox df -B 1 /system

The space occupied by the firmware will be approximately equal to the size of the system when unpacked. In general, when creating a firmware, it must be taken into account that the user can also flash various modifications on top of it (SuperSU, Xposed) or transfer applications to the system section. For example, the Google Apps Minimum Package (Pico) requires a minimum of 150 MB of additional installation space.

If necessary, the size of the firmware file can be reduced by removing not only unnecessary programs from /system/app (/system/priv-app) and call sounds from system/media/audio and bootanimation.zip , but also:

  • /system/tts/lang_pico- languages ​​​​of the primitive voice engine Pico TTS, the voice engine of Google will not be affected;
  • /system/usr/srec/config/- offline languages. It can be downloaded online later if needed.

Assembly

After making changes, you need to collect everything back. First, let's pack the system partition into system.new.dat . Download the tools we need:

$ wget https://github.com/xpirt/img2sdat/raw/master/img2sdat.py $ wget https://github.com/xpirt/img2sdat/raw/master/blockimgdiff.py $ wget https://github. com/xpirt/img2sdat/raw/master/common.py $ wget https://github.com/xpirt/img2sdat/raw/master/rangelib.py $ wget https://github.com/xpirt/img2sdat/raw/ master/sparse_img.py $ sudo apt-get install android-tools-fsutils

Let's convert our folder back to a RAW image. Let's call it system_new.img:

$ sudo make_ext4fs -T 0 -S file_contexts -l 1073741824 -a system system_new.img output/

1073741824 change to the size of the system partition in bytes. It is even better to make it a little smaller. We make a sparse image from a RAW image:

$ img2simg system_new.img system_snew.img

Let's convert our image to system.transfer.list and system.new.dat , which should be thrown into the archive with the firmware, but first we will delete the old files:

$ rm -rf system.transfer.list $ rm -rf system.new.dat $ rm -rf system.patch.dat $ chmod +x img2sdat.py $ ./img2sdat.py system_snew.img

Let's separate the firmware files from the extra husks (files that we downloaded for work. For this, it is convenient to use the archive with the firmware). Removed? Now you need to pack the firmware into a ZIP archive (with any archiver).

It remains to sign the archive. You can do this both on Android itself using ZipSigner , and on a PC (you will need Java installed):

$ wget https://github.com/appium/sign/raw/master/dist/sign.jar $ java -jar file.zip

Underwater rocks

While building system.new.dat, you may run into several problems caused by constant changes in Android firmware generation mechanisms. The above method should work fine for Android 5.1-based firmware, newer ones can be tricky, so you need to use other versions of the build tools. Unfortunately, we can not describe all the nuances of the assembly, so you may have to google.

Installation

To install custom firmware, you need TWRP custom recovery, which allows you to install unsigned or signed firmware with a test key (this is what we created). In the magazine, we have repeatedly described the process of installing it, and in the forum threads dedicated to your device, there is usually enough information to do this.

TWRP

conclusions

This article describes only the tip of a huge iceberg called "firmware modification". "Serious" firmware not only complements the core and the firmware itself with stock applications with many functions (which are often torn from other cores and firmware), organizing or even changing the principles of their interaction, but they can also radically change the operating principles of the OS. True, such a craft is no longer Android, but a separate OS, even if Play services can be installed there (by the way, such actions, to put it mildly, are not encouraged by Google). Well, do not forget: all shells from manufacturers - TouchWiz, ZenUI, HTC Sense and so on - are just ordinary custom, maximally tied to the hardware of the device and to each other.

He maintains active customer support, releasing updates and upgrades for his gadgets with varying success. In practice, the developer delivers official firmware mainly “over the air” (via OTA updates), as well as posting a special firmware image file on his website or portal.

You can flash the image thanks to a set of special software:

  • CWM recovery.
  • TWRP recovery.
  • Using a computer and a special set of programs (Fastboot, KDZ Update, Odin and other utilities).

As a rule, firmware images before the update are packed in special archives with the ZIP, ISO, and other extensions.

In addition to official firmware, very often users and the gadget community form support for devices by releasing custom firmware versions and posting them on amateur forums and portals. Such updates can provide extended or reduced functionality of official images, adding or removing unnecessary features from them.

To begin with, before the flashing process, be sure to take care of your data on the internal memory of the device. When updating, all files are erased, which means that you need to make a backup in advance and save important files on external media.

On the question how to flash android we will not stop under OTA updates "over the air", but rather we will concentrate all our attention on other update methods.

Phone firmware using CWM Recovery

The rich functionality of CWM Recovery allows you to perform many manipulations with the device, including rolling firmware. By default, stock Recovery is installed in the devices, which means that first you need to install the ClockWorkMod Recovery utility itself.

The general flashing process described below is for ZIP files. Instruction:

  1. We go to Recovery. To do this, you need to completely turn off the device, and then hold down a certain sequence of buttons on the body of the device. The set of keys may vary depending on the manufacturer of the device. Each combination may differ from each other. Additional information can be found through search engines by asking the appropriate question. A universal option is a set of the following clicks:
  • Volume up button + power key
  • Volume down button + power key
  • Volume up/down buttons + Power key + Home.
  • Simultaneously clamped volume keys up + down and the power key of the device.

Once in the recovery, you will see the central menu, which you can navigate using the volume up and down buttons, and the power key will perform the function of selecting an action.

  1. Before starting the device, it obliges you to perform a complete reset of the gadget to factory settings. To do this, go to the “wipe data / factory reset” item and confirm the action by clicking on the line that says “Yes - Wipe all user data”.
  2. Back in the main lobby, select "Install zip".
  3. Next, click on the “Choose zip from / sdcard” item and select the file with the previously saved firmware in the explorer tree.
  4. We confirm the choice by clicking on the item "Yes - Install ...".
  5. The process of flashing the device will start. At the end of the process, the user will see the inscription on the screen "Install from sdcard complete".
  6. All that remains for the user to do is return to the main CWM Recovery lobby and perform the gadget reboot process by clicking the “reboot system now” line.

After these steps, the installation of the firmware will begin. Do not panic, because the installation algorithm can take up to 10 minutes.

How to flash an android phone using TWRP Recovery

For those who prefer working with the utility in the form of TWRP Recovery, the following instruction is provided for a step-by-step installation of the update in the form of a ZIP archive:

  1. Throw the file with the firmware image into the device's memory.
  2. Go to TWRP recovery. This is done by analogy with CWM.
  3. Perform a factory reset by clicking on the "Wipe" option in the main menu. Drag the lever to the right. After cleaning the gadget, return to the original lobby by pressing the "Back" button.
  4. In the main lobby, select the "Install" item and find the previously downloaded image in the file system tree. Click on it by dragging the slider to the side.
  5. After that, the firmware process will start. According to the standard, it does not exceed 2-3 minutes.
  6. Upon completion, the utility will automatically display a message about a successful flashing. By clicking on the "Reboot System" item, reboot the device.

Installing updates using ROM Manager

With this application, you can not only flash the firmware, but also create a system backup. Use this option in order not to lose important data and quickly restore all the functionality of your smartphone.

To get started, you will need special files on your device that allow you to access the internal files of your device at the system level. To do this, you can use any of the presented programs.

The second important aspect of the ROM Manager is custom recovery. All actions on the firmware take place directly in the Android launcher itself, and the ROM Manager serves as a visual add-on to Recovery.

To get started, download the firmware file for your gadget, and follow the instructions below:

  1. Transfer the firmware archive, in the ZIP extension, to the memory of your device.
  2. In the utility menu, go to the "Install ROM from SD card" item.
  3. Select your image among folders and files and click on it.
  4. In the new lobby, select "Reboot and Install". Don't forget to check the "Keep current ROM" checkbox. In this case, you will have the opportunity to restore the system at any time.
  5. By clicking "OK" your gadget will go into Recovery mode, and the process of updating the firmware will begin.

Thanks to the extended functionality of the ROM Manager application, users can directly download images for their device in it. You can do this by clicking on the "Download firmware" item. Access to some ROMs is available only in the paid version of the program.


How to flash android through a computer

A universal tool for flashing Android devices using a PC is the Fastboot utility. It is part of the SDK Platform Tools, which means it is suitable for a large number of devices.

The second step before starting the firmware is to gain access to the system kernel. Very often, many manufacturers block this system parameter, not wanting users to manually change the system image files of their firmware. These manufacturers include HTC, the Nexus line of devices, Sony and others. To do this, you need to unlock Bootloader. To do this, you need to study the detailed instructions for setting up and managing the command line. Before starting the firmware using a computer, do not forget to enable USB debugging in the device's engineering settings.

Brief instructions for installing ZIP firmware using Fastboot

  1. First, copy the .zip archive with the image, and place it in the "ADB" folder.
  2. Put your smartphone or tablet in fastboot mode and write the following request on the command line: fastbooflash zip filename.zip , where filename.zip is the name of your firmware.
  3. Wait for the installation to finish and reboot your device.

Need to flash Android using FastBoot, but don't know how? This article provides detailed instructions on how to use the FastBoot utility, how to use it, where to download from, and how to flash an Android device.

This manual will fully tell you how to use FastBoot! How to clear partitions using Fastboot, flash IMG files, reboot and many others.

If you do not know how to install archive updates, then you need an article - how to install firmware in zip format on android with pictures.

Download and install FastBoot

Before flashing Android using FastBoot, you need to download this utility and install it on your computer. There are several options:

  1. You can download FastBoot from the Android developers page in the kit platform-tools .
  2. Or use the program adb run, rather better, in which "all inclusive", and also knows how to unlock the Android pattern.

Why is ADB RUN better?

Launching the Fastboot Utility

Depending on what you chose, downloaded the fastboot utility separately or chose adb run, the launch may be different!

If you downloaded Separately Fastboot

Extract files:

  1. adb.exe
  2. AdbWinApi.dll
  3. AdbWinUsbApi.dll
  4. fastboot.exe
  5. libwinpthread-1.dll

Move them to the C:\ drive, Windows folder. You have successfully installed ADB and Fastboot on your computer!

After you have downloaded and installed FastBoot, open the program " Command line".

Windows command line example

An example of installing ADB and Fastboot.

If you downloaded ADB RUN

If your choice fell on a proprietary program ADB RUN, then run it, type the A button and press Enter.

Files which need to flash desirable place in the same folder with the Fastboot utility.

Instructions on how to flash Android
using fastboot

Android firmware in Fastboot means the firmware of individual files for different memory blocks of the device (system, data, boot).

It is very important to write commands and firmware files as they are indicated!

If you have a command:

fastboot flash cache NazvaniAFiLe.img

then you need to write exactly like that, and not otherwise. In other words case is important otherwise you will get - there is no such file.

Reboot Commands
Fastboot to firmware mode (bootloader)

  • In order to start working with an Android device using Fastboot, you first need to put your smartphone or tablet into bootloader mode using adb:

adb reboot bootloader

  • Rebooting Android from firmware mode (bootloader) to the same mode:

fastboot reboot-bootloader

  • Reboot Android from bootloader firmware mode to bootloader mode:

fastboot reboot-bootloader

  • Reboot Android to normal mode from bootloader firmware mode:

fastboot reboot

The command "sees" your Android PC

Get in the habit before doing anything in Fastboot to check if there is a connection between the computer and Android:

  • Checking if the PC "sees" your Android:

fastboot devices

This command must be executed when the device is already in firmware mode (bootloader)

Commands for unlocking and locking the bootloader
Google Pixel, Nexus in Fastboot

  • Unlock bootloader for Pixel, Nexus:

fastboot oem unlock or fastboot flashing unlock

  • Lock bootloader for Pixel, Nexus:

fastboot oem lock

Command to find out the bootloader version

Shows the version number of the bootloader installed on Android:

fastboot getvar version-bootloader

Partition formatting commands
in Fastboot (Fastboot Erase)

Before flashing any partition in Android, it must first be formatted so that there are no problems in further work:

  • Erases the Cache partition in Fastboot:

fastboot erase cache

  • Erases the Date section (Data / UserData) in Fastboot:

fastboot erase userdata or fastbot -w

  • Erases the System partition in Fastboot:

fastboot erase system

  • Erases the Recovery partition in Fastboot:

fastboot erase recovery

Commands for Flashing Android Partitions in Fastboot
(Fastboot Flash)

After you have formatted the Android partition or partitions, you can proceed to the next step, firmware:

  • Flash the system partition (System):

fastboot flash system imya.img

  • Flash the cache partition (Cache):

fastboot flash cache imya.img

  • Flash the date section (Data):

fastboot flash userdata imya.img

  • Flash the Recovery partition:

fastboot flash recovery imya.img

Instead of imya.img you need to insert the name of the file to be flashed!

  • Flash all partitions (boot, recovery and system):

fastboot flashall

Command to install update.zip

Flashes an update archive in the update.zip format on Android - a ZIP archive with IMG images of various sections:

fastboot update filename.zip

For Sony devices

Checking the connection of a Sony device, if the answer is 0.3 device, then it is connected:

fastboot.exe -i 0x0fce getvar version

Sony bootloader unlock

fastboot.exe -i 0x0fce oem unlock 0xGet_Key

More detailed information on unlocking the Sony Bootloader - How to unlock the Sony Bootloader.

Error Waiting for Device

If you have an inscription in the command window for a long time waiting for device- means:

  • The driver is not installed or installed incorrectly - reinstall or install
  • Android device not in Bootloader mode - translate
  • Incorrect connection to the USB port - use the rear USB 2.0 ports of the computer, do not use USB hubs

Video example of working with the Fastboot utility

For those who don't understand!

For those who do not understand anything, then use the proprietary application ADB RUN, this program contains almost all the commands that are needed for FASTBOOT!

Below is an example of how ADB RUN works - how to quickly flash a Recovery file using ADB RUN in less than 5 seconds (just remember to switch to bootloader mode first)!

That's all! Read more articles and instructions in the section Articles and Android Hacks. Stay with the site, it will be even more interesting!

For each smartphone or tablet, there are both official and custom firmware. Their installation is carried out in different ways: OTA updates come over the air, firmware in ZIP archives are installed manually via CWM, TWRP Recovery or the ROM Manager application, using a computer, you can flash Android using the Fastboot utilities and SP Flash Tool.

After flashing Android, all data from the internal memory will be erased, so in order to save contacts, settings and applications, first.

Android firmware through Recovery

Unofficial firmware in ZIP format, such as CyanogenMod, can be installed through custom Recovery: CWM or TWRP, as well as applications using Recovery, such as ROM Manager. Kernels and patches are sewn in the same way. To download the official "Update.zip", the capabilities of the standard recovery mode are enough, more details in the article at the link above.

Install ZIP file in CWM

On all devices out of the box there is a stock Recovery from the manufacturer, instead you need to install CWM by . Then find and download the ZIP archive with the firmware. Please note that firmware of other formats is not installed via CWM.

1. Now go to Recovery. To do this, turn off the device and press a certain combination of buttons. Depending on the manufacturer, the key combination is different, below are all the possible options (the new one says how to enter Recovery on specific models):

  • Volume up + power button
  • Volume down + power button
  • Volume up / down + power button + "Home"
  • Volume up + volume down + power button

Great, you are in Recovery. The movement is carried out using the volume buttons, and confirmation of the selection with the power button.

2. Before installing the firmware, you must first reset the settings: select "wipe data / factory reset".

4. Great! Return to the main menu and select "install zip".

5. After that "Choose zip from / sdcard".

6. Navigate to the folder where you saved the firmware and select it.

7. You will be prompted to confirm the action. Click "Yes - Install ...".

8. The firmware installation process will go through and at the end, the inscription “Install from sdcard complete” will appear on the screen below.

Great, Android was flashed. We return to the main menu of CWM Recovery and reboot the system. To do this, select "reboot system now".

How to install firmware via TWRP Recovery

If you prefer not CWM, but TWRP Recovery, flash it, guided by. Through it, you can also install firmware from a ZIP archive:

1. Download the firmware and place it in any convenient place in the smartphone's memory.

2. Go to TWRP. This is done in the same way as CWM.

3. Now you need to reset the system. To do this, select "Wipe" from the main menu.

4. To initiate a factory reset, drag the slider to the right.

5. Upon completion of cleaning the smartphone, tablet, press the "Back" button.

6. You will return to the main menu of TWRP Recovery. Now let's go directly to the firmware itself. To do this, select "Install".

7. Navigate to the location in memory where the firmware is stored. Click on it.

8. Drag the slider to the right to begin installing the firmware.

9. The process will start. It usually lasts 2-3 minutes.

10. At the end, a message will appear about the successful completion of the firmware. Click on "Reboot System" to boot Android.

Considered another way how to flash Android using a ZIP update. You can also use a special application. More on that below.

Using ROM Manager

The ROM Manager application allows . By the way, I advise you to make a backup of the internal memory before the firmware, in order to restore the data later. Now we will use another function of the program: to flash the phone using the ROM Manager.

The utility needs root rights to work - they are obtained using exploits: , or .

A custom Recovery must be installed (in fact, using the ROM Manager, you flash the device through it, but at the same time you work with a simple and understandable application interface, not Recovery). Links to instructions are in the previous paragraphs.

So, install ROM Manager, find and download the right firmware for your device. Open the app and follow the instructions:

1. Place the zip archive of the firmware in the memory of your Android phone or tablet.

2. In the ROM Manager menu, open the item "Install ROM from SD card".

3. Find the archive and click on it.

4. In the menu that opens, select "Reboot and Install". I advise you to check the box next to "Keep current ROM" in order to be able to restore the system if necessary.

5. In the next window, click "OK", after which the device will boot into Recovery mode and the firmware process will begin.

Also in ROM Manager there is a ROM search function for the device. In the main menu of the program, select "Download Firmware". Some of them are available only in the premium version of the program.

Above, I talked about three ways to install firmware from ZIP archives on the device itself. Next will be information about Android firmware using a PC.

How to flash Android through a computer

Many mobile devices are flashed using special utilities for PC: below are instructions for working with Fastboot and SP Flash Tool. Through the second program, various manipulations are performed with Chinese phones based on Mediatek processors.

Fastboot: phone firmware instructions

Many firmware must be installed from a computer using the Fastboot utility by rebooting the mobile device into the same mode. The program is included in the Android SDK Platform Tools, the installation of which is described in . In addition, you will need drivers (all information is at the link).

Also, on devices from some manufacturers, you first need to unlock the Bootloader:

  • How to do on HTC: ,

Next, download the archive with the required firmware and unzip it in the "platform-tools" folder, which contains "ADB" and "fastboot". It should turn out something like this (I have the necessary components in a separate “adb” folder).

Then we connect Android to the computer via USB and transfer the smartphone or tablet to fastboot mode. The easiest way to do this is as follows:

  1. Turn on
  2. On the computer, go to the command line
  3. Enter the commands in sequence and after each press "Enter":

cd path to adb file

For example, it is located in "C:\Program Files (x86)\Android\android-sdk\platform-tools". Then the path will look like this:

cd Program Files (x86)\Android\android-sdk\platform-tools

Then the Android gadget will reboot into fastboot mode.

Before flashing any of the partitions of the system, you must first format it so that there are no problems in operation. To do this, use the commands (after entering each press "Enter"):

fastboot erase boot

fastboot erase userdata

fastboot erase system

fastboot erase recovery

fastboot erase cache

After cleaning the partitions, they can be flashed. Enter commands (their number may be more - it all depends on the presence of certain files in a particular firmware, below is a set of basic ones):

fastboot flash boot imya-fayla.img

fastboot flash userdata imya-fayla.img

fastboot flash system imya-fayla.img

fastboot flash recovery imya-fayla.img

fastboot flash cache imya-fayla.img

"Imya-fayla.img" is the name of the corresponding firmware file. For example, since in my case Recovery is being sewn and its image is called “recovery.img”, I enter:

fastboot flash recovery recovery.img

Usually the firmware can be installed entirely, that is, flash all the files at once. To do this, “flash-all.bat” must be located in the folder with the firmware files. If it is, then just enter this command and the firmware installation process will begin:

As a result, at the end a message will appear about the successful completion of the firmware.

You can boot the system. To do this, you need to exit fastboot mode on the device itself or using a computer. In the second case, you need to enter another command:

Installing ZIP updates in Fastboot

Using Fastboot you can install ZIP firmware. To do this, download and place the firmware in the folder where "ADB" is located. Put your smartphone or tablet in fastboot mode and enter the command:

fastboot flash zip imya-fayla.zip

"Imya-fayla.zip" is the name of your firmware, replace it with your own.

Wait for the Android installation to finish and restart your device.

SP Flash Tool: flashing Chinese Android smartphones on MTK

Chinese smartphones Fly, Lenovo, Xiaomi, Meizu, ZTE, Doogee, Bluboo, UMI, Elephone, Oukitel, Blackview and others based on MTK processors are flashed with a special SP Flash Tool utility. She knows how to sew individual partitions, format the system and create backups. Supported models are MT6572, MT6577, MT6580, MT6582, MT6589, MT6592, MT6750, MT6737, Helio P10, Helio P20, Helio X10, Helio X20 and other less popular chips.

The current version of the program is available on the website: http://spflashtool.com/. Before starting the process, install the USB drivers for the MTK processor (the link to the FAQ is in the "Fastboot" section of this manual).

1. Unzip the SP Flash Tool folder on the C:\ drive, put the firmware next to it. The path to the files must not contain Cyrillic characters.

2. The folder contains the file "flash_tool". Run it.

3. In the "Download-agent" field, the path to "MTK_AllInOne_DA.bin" will already be indicated. Next, you need to click "Scatter-loading" and select the scatter file in the folder with the firmware.

4. Leave the switch on "Download Only" and mark which partitions you need to flash (by default, all are selected).

5. Click "Download". Then we turn off the phone, remove the battery for a few seconds, insert it back and connect the switched off Android smartphone to the computer via USB.

6. The red bar "Download DA 100%" will appear first.

7. Then yellow with the firmware process. Percentages show how close the end of the installation is.

8. SP Flash Tool will inform you about the completion of the firmware of the mobile device - the “Download Ok” window will open with a check mark.

Turn on your phone. The first start usually takes a long time.

Flashers for Samsung and LG

Devices from some manufacturers need to be flashed through special proprietary utilities (flashers). Our website has instructions on this topic:

  • Samsung-

Greetings to our regular readers and new visitors to the Fans Android site! Today I will try with you to figure out all these firmware, updates, which ones to install and whether they need to be installed at all.

The Android operating system is a beautiful operating system, dynamic, but sometimes not entirely understood. For example, if you give a beginner some kind of Android smartphone and the attached files for firmware, then with 100% probability he will simply be confused. Google (which created the Android mobile OS) did its best to distribute its OS, but did not take care of standardizing smartphone firmware. Each manufacturer has many types and methods of firmware, for example, using files with extensions KDZ, TAR, MD5, ZIP, IMG, ETX4, RFS. Somehow flash through the air, from a computer, go into some kind of menu, rename and install updates. Now let's deal with everything in order!

Updates for "stabilization" (to make the device less buggy)

By way of updating or firmware

By air (FOTA)

Using a computer

With Update.zip

Are updates needed at all?

In very distant times, when Nokia's Symbian OS reigned, the release of a new OS for your smartphone sounded like something fantastic, firmware was released to “stabilize” the smartphone, it was not buggy, there was no question of any increase in functionality, no global change in the characteristics of the OS. With the advent of Android and IOS smartphones on the market, everything has changed dramatically. For each of your smartphones, it is guaranteed (if it is new) to receive at least one upgrade of the mobile OS version. These updates add all possible interface optimizations, optimize the operation of the operating system, add any new features, and fix security vulnerabilities. Therefore, the question is whether it is necessary to update? The answer is YES! Your smartphone will only get better from updates.

Requirements

Never upgrade your device with a dead battery! Always back up your data!

Types and methods

By air

Almost all manufacturers that produce smartphones or tablets on the Android operating system have updates over the air (FOTA - updates). Such updates are best downloaded via WI-FI, since their weight can be from 1 mb to 500 mb, so you can download them with confidence and not spend money on your account. Basically, such updates come to stabilize the firmware and less often to change the OS.

Using a computer

Each manufacturer has its own firmware program, and here there are just a lot of options and types of different files with various extensions. Now let's try to figure it out and not get confused, start drinking and tearing your hair out!

Basically, all firmware consists of an image (for example, as an ISO) in which all the necessary files for the firmware are located. This image has the extension IMG, or EXT4 (which is basically the same thing). Manufacturers simply put their shell on this image. Samsung has TAR, MD5, LG has KDZ, HTC has IMG. To find out how to flash Android, it's best to find out on the manufacturer's website (or ours). Such firmware exists both to stabilize the device and to upgrade the version of the operating system.

Update.zip

The latest type of updates and firmware on the Android operating system. Manufacturers also often use this type of firmware. In order to install it, you need to download from the manufacturer's website ZIP Firmware or Update ( Maybe!) will need to be renamed to Update.zip (if it has a different name), by no means unzip file. The Update.zip file is installed from a special mode called Bootloader or Recovery. Whether this type of firmware installation or updates is possible can also be found on the manufacturer's website. Such updates can be as stabilizing as a complete update and upgrade of the Android operating system! Also, such files are used by craftsmen to obtain Root rights or what to modify in an Android device.

That's all! I hope that you, Dear, after reading, are not completely confused, for what and what firmware where to put them! Good luck with your firmware!

Thank you for visiting the Fans Android site! Leave the site bookmarked, add to our official page