Installing LineageOS replaces your manufacturer’s Android build with an open-source distribution. The procedure varies by device, and one wrong partition image can leave a phone unbootable. This guide explains the universal concepts you need to understand, then points you to the exact instructions for your specific phone.
Quick Answer: How to Install LineageOS on Android
There is no universal command sequence for installing LineageOS on every Android phone. The general process is to verify your exact device model and codename on the official LineageOS device list, back up your data, install Android Platform Tools on a computer, unlock the bootloader, boot into the required recovery environment, factory-reset the device, and install LineageOS using ADB sideload. Bootloader unlocking normally erases your data. If you want Google Apps and your device’s official instructions support them, install the recommended package at the stage specified in those instructions, typically after LineageOS and before the first system boot. Always follow the official installation guide for your exact device rather than using generic flashing commands.
Can You Install LineageOS on Your Phone?
Before downloading anything, determine whether your specific phone is supported. This is the most important filter in the entire process. A “Galaxy S21” search is not enough. Samsung sells multiple S21 variants with different SoCs, modems, partition layouts, and bootloader policies. LineageOS builds are compiled for a specific codename, not a marketing name.
On your phone, open Settings → About phone and record:
- Manufacturer
- Device name
- Model number (for example, SM-G991B, not “Galaxy S21”)
- Region or carrier
- Current Android version
- Build number
Then visit the official LineageOS device list and search for your model number or codename. If your model is ABC-1234 and the instructions only list ABC-1235, do not assume compatibility. The codename matters. A mismatch in modem or bootloader can produce an unbootable device even if the phones look identical.
Device-Specific Warning
The exact procedure, commands, partition images, and recovery method depend entirely on your device. This article explains the architecture and common workflow. For an actual installation, follow the official instructions for your exact device on the LineageOS wiki and do not continue when a step fails.
What LineageOS Actually Replaces
LineageOS is an open-source Android distribution based on the Android Open Source Project (AOSP). It is not an app, a launcher, or a system update. It is a replacement for the Android build supplied by your manufacturer.
Think of the Android software stack as a layered system. A stock Samsung phone runs Samsung’s Android distribution with One UI. A Pixel runs Google’s Android build. Installing LineageOS replaces significant portions of that stack, but not every layer.
Proprietary firmware and vendor components typically remain in place. These include the cellular modem firmware, Wi-Fi and Bluetooth firmware, GPU drivers, camera firmware, and fingerprint sensor drivers. This is why LineageOS builds are device-specific: the ROM must integrate with the existing proprietary hardware abstraction layer for each phone.
Official vs Unofficial Builds
The distinction between official and unofficial LineageOS builds is important for both safety and support.
| Aspect | Official Build | Unofficial Build |
|---|---|---|
| Distribution | LineageOS infrastructure | Independent developer or forum |
| Device documentation | Official wiki with tested instructions | Varies by developer |
| Updater support | Built-in OTA updater | Usually manual updates |
| Maintainership | Established requirements and review | Depends on individual availability |
| Installation source | Follow official device guide | Follow developer’s specific instructions |
An unofficial build may work well, but the installation process can differ. LineageOS explicitly states that moving from an unofficial build to an official one should be done by following the official device installation guide rather than simply flashing the official build over the unofficial installation.
What Installation Will Erase
Assume everything on internal storage will be lost. Bootloader unlocking commonly triggers a factory reset, and LineageOS installation normally requires formatting user data. This is not optional cleanup. It is a security mechanism: unlocking the bootloader removes encryption keys and user data to prevent unauthorized access.
Back up the following before proceeding:
- Photos and videos
- Downloads and documents
- Contacts (verify sync or export)
- Text messages and call logs
- WhatsApp, Signal, or other messenger backups where applicable
- Authenticator applications and their recovery codes
- Password manager data
- Banking application credentials
- App-specific data that does not sync to the cloud
- Files stored in internal storage, not on an SD card
Critical Warning
If an authenticator application contains accounts that have not been backed up or exported, wiping the phone can lock you out of those accounts. Generate recovery codes before proceeding. Also remove Google accounts from the device before installation to avoid Factory Reset Protection (FRP) complications.
Requirements Checklist
Before starting, verify you have the following:
| Item | Why It Matters |
|---|---|
| Supported phone with exact model verified | Wrong model = wrong partitions = unbootable device |
| Computer running Windows, Linux, or macOS | Required for ADB, Fastboot, and flashing tools |
| USB data cable (not charge-only) | Charge-only cables will not transmit data |
| Phone battery above 60 percent | Prevents shutdown during flashing |
| Complete backup verified off the phone | Internal storage is erased during unlock and install |
| Android Platform Tools installed | Provides ADB and Fastboot commands |
| Required device drivers (Windows) | Windows often needs OEM-specific drivers |
| Official ROM and recovery files downloaded | Must match exact device codename |
| Required stock firmware version (if specified) | Some devices need specific base firmware |
| Google Apps package (if wanted) | Must match Android version and architecture |
Android Platform Tools: ADB and Fastboot
You will need two command-line tools: ADB (Android Debug Bridge) and Fastboot. They operate at different levels of the Android boot process and serve different purposes. Understanding the distinction prevents confusion when one works and the other does not.
ADB
ADB communicates with Android when the operating system is running, or with a compatible recovery environment. It is used for debugging, file transfer, and sideloading installation packages.
Examples of Fastboot commands you may encounter in device-specific instructions:
adb devices
adb reboot bootloader
adb sideload filename.zip Fastboot
Fastboot communicates with the bootloader on devices that implement the standard fastboot protocol. It is used for flashing partition images and unlocking the bootloader.
Examples of Fastboot commands you may encounter in device-specific instructions::
fastboot devices
fastboot flash recovery recovery.img
fastboot reboot Not every manufacturer uses standard Fastboot. Samsung devices commonly use Download Mode rather than standard Fastboot. Follow the flashing method and tool specified by the official LineageOS installation guide for your exact Samsung model. Do not replace your device’s documented procedure with generic Fastboot commands.
Download Android Platform Tools from the official Android developer site. After installation, verify both tools are accessible:
adb --version
fastboot --version On Windows, you may need to open your terminal inside the Platform Tools directory or add it to your system PATH. Test with adb devices while the phone is connected and USB debugging is enabled.
Enable Developer Options and USB Debugging
On most Android devices, Developer Options are hidden by default. Open Settings → About phone and tap Build number repeatedly (usually seven times) until Android reports that Developer Options have been enabled.
Then navigate to Settings → System → Developer options (or the manufacturer-specific equivalent) and enable:
- USB debugging: Allows ADB communication with the device.
- OEM unlocking: Allows the bootloader to be unlocked on supported devices. This setting does not itself unlock the bootloader; it merely permits the unlock command to work.
If OEM unlocking does not appear, possible causes include: the device is already unlocked, the carrier variant blocks unlocking, or the manufacturer requires a waiting period after enabling the option.
Test ADB Before Doing Anything Destructive
Connect the phone to the computer with a known-good data cable. Run:
adb devices The phone may display an authorization prompt: “Allow USB debugging?” with an RSA key fingerprint. Choose Allow. Run the command again. You want output similar to:
List of devices attached
XXXXXXXXXXXX device Possible states and their meanings:
| State | Meaning | Action |
|---|---|---|
device | Connected and authorized | Proceed |
unauthorized | Detected but not authorized | Check the phone screen and approve the prompt |
offline | Connection issue | Try a different cable or USB port |
| (empty list) | No device detected | Check drivers, cable, USB mode, and ADB installation |
Do not continue until ADB communication works if your device’s official procedure requires it.
The Android Boot Chain
Understanding the boot sequence helps explain why bootloader unlocking is necessary and why certain mistakes are unrecoverable.
The bootloader starts before Android. Manufacturers lock it to prevent arbitrary operating system images from being flashed. When locked, the bootloader verifies that the boot image, recovery, and system partitions are signed with the manufacturer’s key. Unlocking the bootloader disables this verification, allowing custom images to load. This is why bootloader unlocking is required by many LineageOS installation procedures and represents a significant change to the device’s security model.
Bootloader States: Locked vs Unlocked
Unlocking the bootloader is the point of no return for local data. The phone will generally perform a factory reset as part of the unlock process. Some devices display a warning screen on every boot after unlocking. This is normal and cannot be disabled on most devices.
Point of No Return for Local Data
Unlocking the bootloader generally wipes user data. Verify your backup has been copied off the phone and independently verified before proceeding. Do not rely on cloud sync that has not been confirmed.
Unlocking the Bootloader
This is where procedures diverge significantly between manufacturers and even between carrier variants of the same phone. Do not blindly execute generic commands.
Some devices use a process resembling the example below. Do not run these commands unless they appear in the official installation instructions for your exact device.
adb reboot bootloader
fastboot devices
fastboot flashing unlock Older devices may use fastboot oem unlock. But depending on the manufacturer, unlocking may require:
- A manufacturer website authorization and unlock token
- An account login, authorization process, unlock token, or waiting period imposed by the manufacturer
- A proprietary PC utility
- Download Mode instead of Fastboot (Samsung)
- A special key combination
Some carrier variants cannot be unlocked at all. The phone may present a warning: “Unlock bootloader? This will erase all user data.” Confirm only if this matches the procedure for your exact device.
Consequences of Unlocking
Before unlocking, understand the potential impact:
- Bootloader unlocking normally erases all user data. Treat data loss as guaranteed unless the official documentation for your exact device explicitly states otherwise.
- Some devices lose DRM functionality (Widevine L1 may revert to L3)
- Some banking and payment applications may refuse to run
- Manufacturer security features may be disabled
- Warranty support may be affected depending on jurisdiction and manufacturer policy
- Play Integrity API checks may fail, affecting Google Wallet and some games
LineageOS explicitly notes that applications can choose not to support devices with unlocked bootloaders. Installing LineageOS does not guarantee compatibility with every banking app, streaming service, or corporate device management application.
Do Not Relock the Bootloader Automatically
A common misconception is: unlock, install LineageOS, then relock. This is not universally safe. LineageOS explicitly warns that only a small number of devices properly support relocking with LineageOS installed. Inappropriate relocking can leave a device unusable. Unless your device’s official LineageOS documentation explicitly explains and supports relocking, leave it unlocked.
Current Android Partition Layouts
Older custom-ROM tutorials often describe a simple partition layout: boot, system, recovery, data, cache. Current Android devices are more complex. Understanding this prevents dangerous assumptions.
Current devices can include A/B slots (seamless update slots), dynamic partitions inside a super partition, vendor_boot, init_boot, dtbo, and vbmeta. Some devices use recovery-as-boot, where the recovery image is embedded in the boot partition. This is why a generic 2019 tutorial may be dangerous for a modern phone. Your device’s LineageOS installation page determines which images must be flashed and to which partitions.
Firmware vs LineageOS
A LineageOS ROM does not necessarily contain all low-level firmware. The device may already need a particular stock Android or firmware version before LineageOS can be installed.
If your device guide states that the phone must first be running a specific Android firmware version, comply before flashing LineageOS. Installing against incompatible firmware can cause problems with the modem, camera, Wi-Fi, fingerprint sensor, or boot process.
Recovery: Lineage Recovery and TWRP
Android devices have several boot environments. Normal boot loads Android. Recovery boot loads a minimal environment for maintenance. Bootloader mode provides a low-level flashing interface.
LineageOS provides Lineage Recovery for supported installation workflows. Older custom-ROM guides frequently mention TWRP. Do not automatically substitute TWRP for Lineage Recovery. Official LineageOS instructions for some devices specifically warn that other recoveries may not work correctly for installation or updates. Use whatever recovery the current device guide specifies.
| Feature | Lineage Recovery | TWRP (conceptual) |
|---|---|---|
| Primary purpose | Factory reset, apply updates, ADB sideload | Full-featured custom recovery with GUI |
| Official support | Provided and tested per device | Community-maintained per device |
| Update compatibility | Aligned with LineageOS updater | May require manual intervention |
| Recommendation | Use if official guide specifies it | Use only if explicitly recommended |
Complete Installation Workflow
The following sequence is a general conceptual workflow. The official device installation page overrides this generic sequence at every step.
Installing LineageOS via ADB Sideload
ADB sideload is a common official installation method. In Lineage Recovery, select Apply Update, then Apply from ADB. On your computer, run:
adb -d sideload lineage-XX.X-YYYYMMDD-nightly-device-signed.zip ADB sends the package from the PC to the recovery over USB. The recovery verifies the package signature, then installs LineageOS to the appropriate partitions.
The 47 Percent Behavior
A common point of confusion: ADB sideload may appear to stop around 47 percent on the computer, followed by a message such as “adb: failed to read command: Success.” This does not necessarily mean failure. The host-side ADB transfer can complete while the recovery-side installation continues. The recovery screen is the authoritative source for installation status. Do not unplug the cable or restart the process based solely on the PC output.
Verification Checkpoint
Do not unplug the USB cable during sideload. Wait for the recovery screen to report completion. If the recovery shows an error, investigate before retrying. If it reports success, proceed to the next step.
Google Apps Installation
LineageOS does not ship Google’s proprietary application suite due to licensing restrictions. A clean LineageOS installation does not include the Google Play Store, Gmail, Google Maps, or Google Play Services.
If you depend on Play Store applications, push notifications, Google authentication, or Maps APIs, you will need a Google Apps package. The exact package depends on the Android version and CPU architecture of your device. Your device’s LineageOS installation page links to the recommended package.
Critical Timing
For installations where Google Apps are supported and desired, install them through recovery immediately after LineageOS and before the first boot into the new system. The first boot performs system initialization. If you boot LineageOS and then decide to add Google Apps later, a factory reset and correct reinstall sequence is required.
The correct sequence is:
- Factory reset in recovery
- Install LineageOS via sideload
- Install Google Apps via sideload (without rebooting between steps)
- Reboot system
For a first installation, the lowest-risk configuration is LineageOS only, or LineageOS plus the recommended GApps package. Get the basic system working before experimenting with other modifications.
First Boot and Hardware Validation
After installation, select “Reboot system now.” The first boot is slower than an ordinary reboot because Android must initialize the new installation. Official LineageOS guides state that first boot generally should not take longer than about 15 minutes, depending on the device. Do not assume a few minutes of boot animation means the installation failed.
Before spending hours restoring applications, test the following:
| Component | Test Method | If Broken |
|---|---|---|
| Phone calls | Place and receive a test call | Check device-specific notes and firmware version |
| SMS | Send and receive a text message | Verify SIM and network settings |
| Mobile data | Disable Wi-Fi and load a webpage | Check APN settings and firmware compatibility |
| Wi-Fi | Connect to a network and stream data | May be a firmware or device-specific issue |
| Bluetooth | Pair with headphones or a speaker | Check device-specific quirks |
| Camera | Test front, rear, and video modes | Known limitation on some devices |
| GPS | Open a maps application and acquire location | May require configuration or firmware |
| Fingerprint | Enroll a fingerprint and test unlock | Device-specific implementation issue |
| NFC | Detect an NFC tag | May be unsupported on some devices |
| USB | Connect to a PC and verify recognition | Check cable, driver, and USB mode |
| Banking apps | Launch and log in | May refuse to run on unlocked/custom OS |
| Google Wallet | Check payment setup | Play Integrity may fail on unlocked devices |
Also test any work applications, VPNs, or streaming services that are important to you. Some applications check device integrity and may refuse to run regardless of whether the ROM itself is stable.
Updating LineageOS After Installation
Once LineageOS is installed correctly, normal supported updates are much easier than the initial installation. Typically:
Settings → System → Updater The updater downloads a newer LineageOS build and handles the update process. This is fundamentally different from manually reinstalling the ROM every time. Major version upgrades, however, may have their own instructions. Do not treat a major version upgrade (for example, LineageOS 22 to 23) like a routine security update. Check the device’s upgrade documentation before proceeding.
Troubleshooting Common Problems
When something goes wrong, the safest approach is to compare every completed step against the official device guide. Do not start randomly flashing partitions.
Specific Issues and Solutions
| Symptom | Likely Cause | Recovery Path |
|---|---|---|
adb devices shows nothing | USB debugging disabled, bad cable, driver issue, wrong port | Enable USB debugging, try a different data cable and USB port, reinstall drivers |
unauthorized | Phone has not approved the computer’s RSA key | Check the phone screen and tap “Allow” |
fastboot devices empty | Different driver needed for Fastboot mode, Windows driver issue | Install OEM Fastboot drivers, try a different port |
| Bootloop (repeating logo) | Wrong build, wrong firmware, missing partition image, bad add-on | Return to recovery, verify every step against official guide |
| Recovery does not boot | Wrong recovery image, wrong partition, stock OS restored recovery | Reflash recovery from bootloader, verify correct partition |
| No Play Store | LineageOS installed without GApps | Expected if GApps were skipped. Reinstall with GApps if needed |
| Banking app refuses to run | Device integrity check fails on unlocked bootloader | May be expected behavior. Some apps will not support custom ROMs |
| Sideload stops at 47% | Normal behavior; host transfer completes before device-side install | Wait for recovery screen to confirm completion |
| Signature verification failed on add-ons | The package may use a different signing key, be corrupted, or be incompatible | Stop and verify the package, source, checksum, and device-specific instructions. Continue past a signature warning only when the official installation guide explicitly says the warning is expected for that package. |
| OTA updates fail | Modified system, missing recovery, unofficial build | Use official build and specified recovery. Check device-specific notes |
Returning to Stock Android
Before installing LineageOS, understand the exit path. Returning to stock generally means restoring the manufacturer’s official firmware. This is device-specific and typically requires:
- Obtaining the correct factory firmware for your exact model and region
- Using the manufacturer-specific flashing method (Fastboot, Download Mode, or a proprietary tool)
- Flashing the stock boot, recovery, and system images
- Accepting that user data will be wiped again
The bootloader may remain unlocked after returning to stock, or it may be relockable depending on the device. Do not assume relocking is safe without explicit documentation for your specific phone and firmware combination.
Frequently Asked Questions
Does installing LineageOS root my phone?
LineageOS does not include root access by default. Rooting requires additional steps that LineageOS does not officially support or document.
Does LineageOS include Google Play?
No. LineageOS is based on AOSP and does not include Google proprietary applications. You must install a Google Apps package separately if you need them, and only at the correct stage of installation.
Can I install LineageOS without a computer?
Most devices require a computer for ADB, Fastboot, and flashing tools. A small number of devices support alternative methods, but the vast majority need a Windows, Linux, or macOS computer.
Will unlocking the bootloader erase my phone?
Yes. Bootloader unlocking almost always triggers a factory reset as a security measure. Back up everything before unlocking.
Can I relock the bootloader after installing LineageOS?
Only on a small number of devices with explicit official support. Inappropriate relocking can brick the device. Do not relock unless your device’s official LineageOS documentation specifically supports it.
Can I return to stock Android?
Yes, by flashing the manufacturer’s official firmware for your exact device model. The method is device-specific and usually requires the same tools used for LineageOS installation.
Does LineageOS work with banking apps?
Some banking applications check device integrity and may refuse to run on an unlocked bootloader or custom ROM. This is an application-level decision, not a ROM bug. LineageOS cannot force an app to support a modified device.
What is the difference between ADB and Fastboot?
ADB communicates with Android or recovery while the OS is running. Fastboot communicates with the bootloader before Android starts. They use different protocols and may require different drivers.
Why does ADB sideload stop around 47%?
The host-side ADB transfer often completes while the device-side installation continues. The recovery screen is the authoritative status indicator. Wait for it to report completion before unplugging.
Can I install Google Apps later?
If you have already booted LineageOS, installing Google Apps later requires a factory reset and reinstallation in the correct sequence. It is much simpler to install GApps during the initial setup before the first boot.
What is an A/B device?
An A/B device has two copies of bootable partitions (Slot A and Slot B). Updates can be installed to the inactive slot while the system runs, then the device switches slots on reboot. This enables seamless updates but changes how partitions are flashed.
Is unofficial LineageOS safe?
Unofficial builds vary in quality. They may work well, but they lack the infrastructure, review, and updater support of official builds. If you use an unofficial build, follow the developer’s specific instructions and understand the support limitations.
Sources and References
- LineageOS Official Device List and Wiki
- LineageOS Google Apps Guidance
- Android SDK Platform Tools
- Android Bootloader Architecture
- Android Partition Layout
- Android Verified Boot
Primary sources should be consulted for device-specific commands, current firmware requirements, and official installation steps. This guide explains universal concepts; the official device page provides the exact procedure.