When it comes to Android firmware, many users imagine a single file that can simply be copied or replaced. In reality, everything is more complicated: firmware is a set of system components distributed across several sections of the deviceโ€™s internal memory. These sections are not visible in the standard file manager, but they are the ones responsible for loading the system, the operation of the kernel and the interface.

Understanding this where is the firmware stored on Androidis critical not only for custom firmware enthusiasts, but also for ordinary users. For example, knowing the memory structure will help you avoid mistakes when resetting settings, recovering from crashes, or even when buying a used smartphone. In this article we will look at which partitions are responsible for storing the firmware, how they can be viewed (and whether this can be done without root), and also why some operations with these partitions can turn the phone into a โ€œbrickโ€.

What is Android firmware from a technical point of view

Firmware is not one file, but software complexincluding:

  • ๐Ÿ“ฑ Linux kernel (responsible for interaction with hardware)
  • ๐Ÿ–ฅ๏ธ System libraries and drivers
  • ๐Ÿค– Android Runtime (application runtime)
  • ๐Ÿ“‚ Pre-installed applications and Google services
  • ๐Ÿ”ง Bootloader (bootloader) and recovery menu

Unlike Windows or macOS, where the system is stored on disk in the form of files that can be freely modified, Android uses memory partitions with hardcoded addresses. These partitions are created during the production stage of the device and are protected from accidental changes. Even if you gain root access, most partitions will remain read-only without special commands.

It is important to understand that firmware is not the same as user data. Photos, videos and installed applications are stored in the /datasection, which is not part of the firmware. But the system files responsible for the operation of Android are distributed in other sections, which will be discussed further.

๐Ÿ“Š Have you ever tried to change the firmware of your Android device?
Yes, I installed custom firmware
Yes, I just updated the official one
No, but Iโ€™m interested in the topic
No and I donโ€™t plan to
I donโ€™t know what it is

The main memory sections where the firmware is stored

The internal memory of an Android device is divided into logical sections, each of which performs your role. Below is a table with key sections related to the firmware:

Section Path Contents Can this be changed without root?
boot /dev/block/bootdevice/by-name/boot Linux kernel and ramdisk (temporary file system for downloads) โŒ No
recovery /dev/block/bootdevice/by-name/recovery Alternative recovery environment (stock or custom, for example, TWRP) โŒ No
system /dev/block/bootdevice/by-name/system Basic Android system files (framework, libraries, standard applications) โŒ No
vendor /dev/block/bootdevice/by-name/vendor Drivers and proprietary components of the manufacturer (for example, for a camera or modem) โŒ No
dtbo /dev/block/bootdevice/by-name/dtbo DTS (Device Tree Source) - configuration for the kernel, describing the hardware platform โŒ No

These partitions are created during production and have a fixed size. For example, the section system on most modern smartphones takes up from 1.5 to 3 GB, and vendor -about 500 MB. Their contents are not visible through the standard File manager, but can be viewed using special utilities (we'll talk about them later).

โš ๏ธ Attention: On some devices (for example, Samsung s Exynos or Google Pixel) sections may have different names or additional protection. Always check the documentation for your model before attempting modification.

How to view firmware partitions without root access

If you are just wondering what partitions are on the device, you can do without getting root. Here are a few ways:

  1. Via ADB (Android Debug Bridge):

    Connect your phone to the PC, enable USB Debugging in the developer settings and run the command:

    adb shell ls /dev/block/bootdevice/by-name/

    This will list all partitions, including boot, system and others.

  2. Using memory analysis applications:

    Applications like DiskInfo or DevCheck show information about partitions, but without detailed content. For example, you will see the size of the partition system, but not the files inside it.

  3. Through the recovery menu:

    Boot into recovery (usually by pressing Power + Volume up) and select Mount or Advanced. In stock-recovery you will see only the main partitions, and in TWRP a complete list with the ability to mount.

Without root access you will not be able to read the contents of system partitions, but the list itself will give an idea of โ€‹โ€‹the memory structure. For example, if you see a partition adb you will see a section productin the command output, this means that your device uses Project Treble (architecture that separates system and vendor components).

๐Ÿ’ก

If you want to save the list of partitions for further analysis, redirect the command output to file: adb shell ls /dev/block/bootdevice/by-name/ > partitions.txt

Where the firmware is stored on devices with A/B partitions (Seamless Updates)

Modern Android devices (starting from Android 7.0 Nougat) often use the scheme A/B sections (or Seamless Updates). This means that critical sections of the firmware are duplicated:

  • ๐Ÿ”„ boot_a and boot_b โ€”two copies of the section boot
  • ๐Ÿ”„ system_a and system_b โ€”two copies of the section system
  • ๐Ÿ”„ vendor_a i vendor_b โ€”two copies of the section vendor

Why is this needed? When updating the system, the new firmware is installed on an inactive set of partitions (for example, in system_b), and after a reboot the device switches to it. If something goes wrong, the system will roll back to the previous working version. This reduces the risk of โ€œbrickingโ€ in the event of an unsuccessful update.

You can check whether your device uses A/B partitions with the command:

adb shell getprop ro.boot.slot_suffix

If the response contains _a or _b, then the A/B scheme is active. On such devices you cannot simply replace the firmware via fastboot - you need to take into account the active slot.

โš ๏ธ Attention: On devices with A/B partitions, try to flash only one partition (for example, system_a) without updating the second one can lead to a boot loop. Always use commands like fastboot flash --slot=all or follow the instructions for your model.

Is it possible to copy the firmware for backup?

Technically yes, but it requires root access and special tools. Here are the main ways:

Get root access (for example, through Magisk)

Install an application for working with partitions (for example, FlashFire or TWRP)

Create a partition dump with the command dd or via graphical interface

Save dumps to an external drive

Check the integrity of the files (the size must match the original partition)-->

The most reliable way is to use TWRP (custom recovery) It has a function Backup, which allows you to save images of partitions boot, system, vendor and others. The main advantage of this method is the ability to restore the firmware even if the system does not boot.

For advanced users, there is an option with a manual dump via adb shell:

adb shell

su

dd if=/dev/block/bootdevice/by-name/boot of=/sdcard/boot.img

This command will copy the partition boot to file boot.img on the memory card. Similarly, you can make dumps of other partitions. However, remember that:

  • ๐Ÿ”ง The size of the dumps will be equal to the size of the partitions (even if less space is actually occupied).
  • ๐Ÿ”’ Some partitions (for example, modem) may be are blocked for reading.
  • โš ๏ธ An error when writing a dump can damage the partition.

If your goal is simply to save the current firmware before experiments, it is better to use ready-made solutions like TWRP or OrangeFox RecoveryThey automate the process and reduce the risk. errors.

What to do if the partition dump is broken?

If the dump size does not match the original partition or the file does not open, try:

1. Repeat the operation with another memory card (there may be a problem with the drive).

2. Use another copying method (for example fastboot flash instead of dd).

3. Check the integrity of the partition file system with the command fsck.

If the dump is critical (for example, for a rare device), create it on two different media.

The dangers of editing firmware sections

Any changes in firmware sections are fraught with consequences - from minor glitches to complete inoperability of the device. Here are the main risks:

Action Possible consequences Is it possible fix?
Deleting files from /system Crash of system applications, boot loops โœ… (recovery via TWRP or fastboot)
Changing the kernel in boot Boot failure (bootloop), loss of network functions. ISP programmer) โœ… (firmware of the original boot.img)
Partition damage dtbo Unidentified hardware, no charging or display โŒ (ISP programmer required)
Error during firmware modem Loss of network, IMEI or full brick โš ๏ธ (sometimes fixable through service firmware)

It is especially dangerous to edit sections related to bootloader (boot, dtbo, vbmeta). For example, damage vbmeta (partition with hashes for integrity verification) on devices with AVB (Android Verified Boot) will lead to boot blocking. In such cases, access to factory firmware is often required. authorized service center with access to factory firmware.

Even if you are confident in your actions, always:

  • ๐Ÿ“‹ Make backup copies all critical sections.
  • ๐Ÿ” Check firmware compatibility (for example, the version for Snapdragon is not suitable for Mediatek).
  • ๐Ÿ› ๏ธ Have unlocking tools on hand bootloader (for example, fastboot oem unlock).
โš ๏ธ Attention: On some devices (for example, Huawei or Xiaomi with a locked bootloader), an attempt to flash unofficial firmware can lead to hard brick a state where the device does not respond even to connecting to a PC. Before experiments, study the forums for your model (for example XDA-Developers or 4PDA).
๐Ÿ’ก

The most common mistake of beginners is flashing components from different firmware versions. For example, the kernel from Android 12 is not compatible with the system from Android 13, even if the phone model is the same. Always use full firmware packages from one source.

FAQ: Frequently asked questions about storing Android firmware

Is it possible to transfer firmware from one phone to another?

No, even if the models are identical.

  • ๐Ÿ“ฑ Hardware platform. (for example, Snapdragon 865 vs Snapdragon 865+).
  • ๐Ÿ”ง Bootloader and memory layout versions.
  • ๐Ÿ“ก Regional settings (firmware for Europe may not work in China due to different network frequencies).

The exception is custom firmware like LineageOS, but they also require adaptation to a specific device.

Why is the firmware not deleted after resetting the settings?

Resetting to factory settings (Wipe Data/Factory Reset) clears only the /data partition (where user data and applications are stored). The firmware sections (system, boot etc.) remain intact. To remove the firmware completely, you need to flash a new one via fastboot or recovery.

Where is the firmware stored on phones with eMMC vs UFS?

Memory type (eMMC or UFS) does not affect the partition structure. The only difference is the read/write speed. However, on older devices from eMMC (before 2018), sometimes there are non-standard layouts where the firmware can be stored in the section firmware or kernel.

Is it possible to restore the firmware if the phone does not turn on?

Yes, but the method depends on status:

  • ๐Ÿ”„ Soft brick (boot cycle, logo hangs): firmware via fastboot or TWRP.
  • ๐Ÿงฑ Hard brick will help (no response to buttons): an ISP programmer is required (for example, EasyJTAG or RIFF Box).

In the first case, you can do it yourself, in the second - only in the service center.

Why do manufacturers not provide access to firmware partitions?

Main reasons:

  • ๐Ÿ”’ Security: modification of system files can bypass protection (for example, Samsung Knox or Google SafetyNet).
  • ๐Ÿ“ต Stability: changes in /system often lead to failures for which the manufacturer does not want to be held responsible.
  • ๐Ÿ’ฐ Ecosystem control: limitations make it difficult to install unofficial firmware, which is beneficial vendors (for example, Huawei blocks the bootloader so that users cannot delete company services).