Changing the operating system on an Android device is a task that requires not only technical skills, but also an understanding of possible risks. Many users take this step to gain access to new features, improve performance, or restore the functionality of an old smartphone. However, incorrect flashing can turn a gadget into a โ€œbrick,โ€ so it is important to follow proven instructions and take into account the features of a specific model.

In this article we will analyze all stages of the process: from preparing the device and choosing an alternative OS to direct installation and configuration. You'll learn what tools you'll need, how to avoid common mistakes, and what to do if something goes wrong. We will pay special attention to custom firmware (such as LineageOS, Pixel Experience or Paranoid Android), since they are the most popular among enthusiasts, but require unlocking the bootloader and root access.

If your smartphone has slowed down, stopped receiving updates from the manufacturer, or you just want to try something new - this guide will help you do everything right. But remember: unofficial OS firmware voids the device warranty and may interfere with the operation of some functions (for example, banking applications or NFC).

1. Why do users change the OS to Android?

There are several main reasons for changing the operating system on a smartphone, and they depend on the ownerโ€™s goals. Here are the most common scenarios:

  • ๐Ÿ”„ Outdated version of Android. The manufacturer has stopped releasing updates, and new applications require a fresh OS. For example, Samsung Galaxy S8 officially settled on Android 9, although the hardware allows you to run also Android 13.
  • โšก Improved performance. Custom firmware is often devoid of โ€œgarbageโ€ software from the manufacturer (bloatware), which speeds up work even on weak devices.
  • ๐Ÿ›ก๏ธ Privacy. Firmwares like GrapheneOS or CalyxOS are focused on data protection and minimizing surveillance.
  • ๐ŸŽจ Customization. The desire to change the interface, add new functions or themes that are not available in the stock shell (for example, MIUI or One UI).
  • ๐Ÿ”ง Recovery performance. If the smartphone is "bricked" after an unsuccessful update or a virus attack, flashing the firmware may be the only way out.

However, replacing the OS is not always justified. For example, on flagship devices (Google Pixel, Samsung Galaxy S23), the stock firmware is usually better optimized than the custom one, and the risks of losing functionality (for example, a camera or wireless charging) are higher. Before you start, evaluate whether the game is worth the candle.

โš ๏ธ Attention: Some banking applications (for example SberBank Online or Tinkoff) may block operation on devices with an unlocked bootloader or root access. Check the policy of your bank before installing the firmware.

2. Preparing the device: what needs to be done before flashing

The first and most important stage is preparation. Neglecting this step often leads to data loss or unsuccessful installation. Let's start with the most obvious:

  • ๐Ÿ“ฑ Create a backup copy. Use Google Account to synchronize contacts, photos and applications, and for a complete backup. - utilities like Titanium Backup (requires root) or Swift Backup.
  • ๐Ÿ”‹ Charging the battery. Make sure the charge level is at least 70%. Firmware may take up to an hour, and discharge in the process will lead to failure.
  • ๐Ÿ”— Install drivers. To communicate with the PC you will need drivers ADB and Fastboot. Download them from the website Android SDK or use universal packages like 15 seconds ADB Installer.
  • ๐Ÿ”“ Unlock the bootloader. Without this step, installing a custom OS is impossible. The procedure differs for different brands (more details in the next section).

Also check whether your device supports the selected firmware:

  1. Find your smartphone model. in Settings โ†’ About phone โ†’ Model (for example, Xiaomi Redmi Note 10 Pro has a code name sweet).
  2. Check the list of supported devices on the firmware website (for example, LineageOS Wiki).
  3. Make sure that the version firmware is compatible with your processor (for example, Qualcomm Snapdragon vs Mediatek Helio).

Find out the device code name|

Download the firmware and test file (MD5)|

Install ADB/Fastboot on PC|

Create a backup copy data|

Charge the phone up to 70%+|-->

If you are flashing Google Pixel, OnePlus or a device with a chip Qualcomm, the process is usually simpler than for smartphones with Mediatek or Exynos. The latter often require additional manipulations with firmware or patches.

3. Unlocking the bootloader: instructions for different brands

Unlocking the bootloader is a mandatory step before installing a custom OS. The process differs depending on the manufacturer, and some brands (for example, Huawei or Sony) completely block this feature. Below are the current instructions for popular brands.

Brand Unlocking method Features
Google Pixel fastboot flashing unlock The simplest process. Requires confirmation on the phone.
Xiaomi Via Mi Unlock Tool (linking to account) You need to wait 7-168 hours after linking the account to the device.
Samsung Enable OEM Unlock in developer settings On new models it can work only 1 time (one-time unlock).
OnePlus fastboot oem unlock On some models requires additional confirmation through OxygenOS.
Realme/Oppo Unlock application through the official website May take up to 30 days. Not all models. are supported.

For devices Samsung with processors Exynos (for example, Galaxy S22 Ultra) after unlocking the bootloader, protection is triggered Knox, which leads to loss of functions. Samsung Pay, Secure Folder and warranty. On models with Snapdragon (sold in the USA/China) this problem does not exist.

Unlock example for Xiaomi:

  1. Activate Developer mode (click on Build number in Settings โ†’ About phone).
  2. Enable USB debugging i OEM unlocking in Settings โ†’ For developers.
  3. Download Mi Unlock Tool s official website.
  4. Connect the phone to the PC in mode Fastboot (press Volume down + Power).
  5. Run Mi Unlock Tool, enter account Mi and follow the instructions.
โš ๏ธ Attention: On devices Samsung with Android 12+ unlocking the bootloader may lead to network blocking (IMEI remains, but mobile communication does not work, check the forums before the procedure). (for example, XDA Developers) for solutions for your model.
๐Ÿ“Š What is the brand of your smartphone?
Samsung
Xiaomi
Google Pixel
OnePlus
Other

Custom firmware are divided into several types: based on AOSP (pure Android), with modifications from manufacturers (for example, MIUI or One UI), as well as specialized (for privacy or performance. Let's consider the most popular options.

Firmware Warp Pros Cons
LineageOS AOSP Stability, wide list of devices, minimalistic interface No GApps by default, rare updates for older devices
Pixel Experience Google Pixel Pixel features (for example Now Playing), frequent updates May be slow on weak devices
Paranoid Android AOSP Unique design, optimized for games Fewer supported devices
GrapheneOS AOSP (with a focus on security) Maximum protection from surveillance, application isolation Difficult to configure, no Google Services
Havoc-OS AOSP Rich customization, theme support Less stable than LineageOS

For most users the optimal choice would be LineageOS or Pixel Experience. The first is suitable for those who value stability and minimalism, the second for lovers of chips from Google Pixel. If privacy is a priority, pay attention to GrapheneOS or CalyxOS, but be prepared for the absence of Google Play Services.

Before downloading the firmware, check:

  • ๐Ÿ“… Build date. Fresh versions (no older than 3-6 months) are preferable.
  • ๐Ÿ” Reviews on forums. Look for topics mentioning your model on XDA Developers or 4PDA.
  • ๐Ÿ“ฅ Type firmware. Official (official) is more stable than Unofficial (collected by enthusiasts).
What are GApps and are they needed?

GApps (Google Apps) is a package of Google services (Play Market, Gmail, YouTube, etc.). Many custom firmwares come without them, so GApps need to be installed separately. If you do not use Google services, you can do without them (for example, use F-Droid to install applications).

5. Step-by-step guide: how to flash a custom OS

When all preparations are completed, you can begin installation. We will consider the universal method via TWRP (custom recovery), as it is suitable for most devices. An alternative method is through Fastboot (relevant for Google Pixel or devices without support TWRP).

Step 1: Installing TWRP Recovery

1. Download the image TWRP for your model from official website.

2. Connect the phone to the PC in Fastboot (hold Volume down + Power with the device turned off).

3. On the command line (on a PC), run:

fastboot flash recovery twrp-3.7.0_9-0-sweet.img

fastboot reboot recovery

4. If TWRP does not start, try the command fastboot boot twrp-3.7.0_9-0-sweet.img (temporary download).

Step 2: Cleaning partitions

In TWRP do the following:

  1. Go to Wipe โ†’ Advanced Wipe.
  2. Tick the boxes: Dalvik / ART Cache, System, Data, Internal Storage (if you need full formatting).
  3. Swipe to confirmation.

Step 3: Installing firmware and GApps

1. Transfer the firmware files (.zip) and GApps (if needed) to your phone or flash drive.

2. In TWRP select Install and specify the path to the firmware file.

3. After installing the firmware, repeat step for GApps (if required).

4. Reboot the device (Reboot โ†’ System).

โš ๏ธ Attention: On some devices (for example, Samsung s One UI), before flashing the firmware, you must disable DM-Verity i Force EncryptionTo do this, flash the file disable_dm-verity_forceencrypt.zip (you can download it at XDA).
๐Ÿ’ก

If after flashing the firmware the phone is stuck on the logo for more than 10 minutes, do not panic. Perhaps the system is being configured for the first time. Wait 15-20 minutes, and if nothing changes, reboot into TWRP and repeat the installation.

Step 4: First setup

After successful download:

  • ๐Ÿ”„ Go through the initial setup (selecting a language, connecting to Wi-Fi).
  • ๐Ÿ”’ Turn on USB debugging i OEM unlocking (if you plan further manipulations).
  • ๐Ÿ“ฑ Install the necessary applications via Play Market or F-Droid.
  • ๐Ÿ”‹ Check the operation main functions: calls, mobile data, camera, sensors.
๐Ÿ’ก

If mobile communication does not work after the firmware, check the APN settings in Settings โ†’ Mobile network โ†’ Access points (APN)Manually entering operator parameters often helps.

6. Typical errors and how to avoid them

Even if you strictly follow the instructions, problems may arise. Let's look at the most common errors and ways to solve them.

Error Cause Solution
Error 7 v TWRP Incompatibility of firmware with the device Check the model and download the correct firmware version
Stuck on the logo Incorrect or missing partitions being cleaned disable_dm-verity Repeat Wipe and flash the check disable file
Fastboot mode after reboot The bootloader or system is damaged Flash the stock firmware via Fastboot or Odin (for Samsung)
No mobile network Incorrect settings IMEI or APN Check IMEI via *#06# and configure APN manually
The camera does not work There are no drivers or patches Install GCam or find a patch for your model

If the device stops turning on ("brick"), do not panic. In most cases, it can be restored:

  1. For Qualcommdevices: use QFil or EDL Mode (requires an authorized account for some brands).
  2. For Samsung: flash the stock firmware via Odin to mode Download Mode.
  3. For Mediatek: use SP Flash Tool.

On forums there are often tips to use fastboot erase userdata or fastboot format userdata when freezing. Be careful: these commands completely erase user data!

7. What to do after installing a new OS?

Successful firmware is only half the battle. To make the new OS work stably, follow a few additional steps:

  • ๐Ÿ”„ Update the firmware. Many custom OSes support OTA updates (for example, they come in LineageOS they come to Settings โ†’ System โ†’ Updates).
  • ๐Ÿ”’ Set up securityEnable partition encryption Data (if not done automatically) and set a strong password.
  • ๐Ÿ“ฑ Restore data. Use backups, but avoid restoring system applications - this can cause conflicts.
  • ๐ŸŽฏ Optimize performance. Disable animations in Settings โ†’ For developers or use kernels like FrancoKernel overclocking.

If you installed firmware without Google Services (for example, GrapheneOS), but want to use Play Market, there are two options:

  1. Install MicroG โ€”an open alternative Google Play Services (supports push notifications and geolocation).
  2. Manually flash GApps via TWRP (but this may disrupt the stability of the system).

To check the functionality of the device, use the following applications:

  • CPU Identifier โ€” processor and memory test.
  • Sensors Multitool โ€” sensor test (accelerometer, gyroscope).
  • Network Signal Guru โ€”mobile network analysis.
๐Ÿ’ก

If the battery runs out quickly after flashing the firmware, calibrate it: completely discharge the phone, then charge it to 100% without interruption. Repeat 2-3 times.

8. Alternative ways to change the OS

The installation is not suitable for everyone. custom firmware. Let's consider other options for changing or modifying the OS on Android:

Method Description Pros Cons
MultiROM Installing multiple OS with choice download You can test firmware without removing the main one Complicated setup, not all devices are supported
Project Treble Installing GSI firmware (Generic System Image) Works on most devices with Android 8+ The camera, NFC or sensors may not work
Root + Magisk Modification of the stock OS without replacing it All functions are retained, you can install modules Risk of violating security, problems with banking applications
Emulation Running another OS through an emulator (for example, Waydroid for Linux) Safe, does not require unlocking the bootloader Low performance, not all functions work

For devices with support Project Treble (almost all smartphones with Android 8 Oreo and later) can be installed GSI firmware. These are universal images that work on most devices. Example commands for installation:

fastboot erase system

fastboot flash system system-arm64-ab.img

fastboot reboot

If you need root access without changing the OS, use Magisk:

  1. Download the latest version Magisk c GitHub.
  2. Flash the file via TWRP or patch boot.img using Magisk Manager.
  3. Reboot the device.
โš ๏ธ Attention: On devices with Android 12+ to work Magisk may be required disabling AVB 2.0 (Android Verified Boot). This increases the risk of system damage during failures.

FAQ: Answers to frequently asked questions

Is it possible to return stock firmware after installing custom firmware?

Yes, it is possible. For most devices, it is enough to download the official firmware from the manufacturerโ€™s website and flash it via Fastboot, Odin (for Samsung) or SP Flash Tool (for Mediatek). However, please note:

  • On some devices (for example, Xiaomi) protection may work Anti-Rollback, preventing you from rolling back to the old version.
  • After returning to the stock firmware, you will have to re-unlock the bootloader if you want to install again custom OS.
Will Google Pay work after changing the OS?

Most likely not. Google Pay and other banking applications check the integrity of the system through SafetyNet. On custom firmware or devices with an unlocked bootloader SafetyNet usually it does not work. Solutions:

  • Use Magisk with the module Universal SafetyNet Fix.
  • Install alternative payment systems (for example, Samsung Payif it is supported).
  • Return the stock firmware and block bootloader.
How to check if my device supports custom firmware?

There are several ways:

  1. Find your model on firmware sites (LineageOS, Pixel Experience).
  2. Check the topics on the forums XDA Developers or 4PDA (search by model code).
  3. Use applications like Treble Check to check support Project Treble.

If your device is not found in the supported lists, this does not mean that the firmware for it does not exist. It may be under development. or posted by enthusiasts on niche forums.

Is it possible to install Windows on an Android smartphone?

Technically yes, but with reservations:

  • On some devices (for example, Xiaomi Mi Mix 2S or OnePlus 6) can be installed Windows 10/11 ARM through the project WoA (Windows on ARM).
  • Performance will be low due to architecture emulation.
  • Most drivers (camera, mobile network) will not work.

For everyday use this option is not suitable, but it may be interesting as an experiment.

How often are updates for custom firmware released?

The frequency of updates depends on the firmware and device model: