How to Install Custom ROM using ADB Sideload on TWRP

 
 

This post was last updated on February 19th, 2020 at 05:35 pm

Very few know about ADB sideload, which is why today I am going to explain what is ADB sideload and how to install a custom ROM, magisk mod, or any other mod using ADB Sideload.

What is ADB sideload?

ADB Sideload is a feature of ADB interface on Android which allows to install files on an Android phone directly from a PC which is in zip file and in an installable format. There are many files such as a custom ROM, a LineageOS zip file, a mod file, a system modification script such as a Camera2 API enabler etc. are usually installed using the ADB sideload feature.

Any file that is in zip format, does not qualify to be installed using ADB sideload feature. A zip that must be recovery flashable, will be eligible to be installed on ADB sideload interface.

How to Install Custom ROM using ADB Sideload on TWRP

What all files can be installed using ADB Sideload?

An Android OTA or an update package has a updater binary script typically located in META-INF/com/google/android/update-binary location which is used to interpret and execute an updater-script to decide what to install.

A recovery is designed to interpret this script and execute accordingly.

Almost all custom ROMs such as LineageOS or rooting mods mods such as Magisk module etc. are designed to be installed using a custom recovery such as TWRP recovery.

Where to Download ADB?

ADB is a tool on Android SDK which is available in the form of platform tools in a zip file. Also there are some installers available for Windows and Linux or MAC. Below are the download links to the same:
15 Seconds ADB Installer for Windows
Minimal ADB and Fastboot for Windows
ADB Fastboot for Linux and MAC

How to Install using ADB Sideload on TWRP?

Make sure you have already installed ADB on your PC.

I am using the example of TWRP to install through ADB sideload. As of writing this article that is the only recovery widely used.

  1. Boot into TWRP recovery.
  2. Go to Advanced
    Go to Advanced on TWRP
  3. On the next screen click on ADB sideload
    Click on ADB Sideload
  4. On the next screen that appears, check the Wipe Dalvik Cache and Wipe Cahce and then swipe towards right to start the ADB sideload interface.
    Check Wipe Dalvik Cache and Wipe Cache on TWRP
  5. The TWRP screen will show something like: Starting ADB sideload feature…
    ADB sideload started
  6. Now on the PC, open a command prompt and change the directory to where the zip file is present.
  7. Then execute the following command to install the file using ADB sideload:
    adb sideload lineage-17.1-withMTG-20200108-UNOFFICIAL-sailfish.zip
    adb sideload command on PC

    In the above example I am installing LineageOS 17.1 on Google Pixel phone. The above command has to be modified with appropriate filename to be installed.
  8. Once started, the command prompt as well as the TWRP screen will show the progress.
    adb sideload in progress
  9. Once the installation is completed, on the TWRP screen click on the Back or Reboot system as per the need.
    adb sideload completed

Once the ADB sideload is done executing on TWRP, the process is complete. You can reboot the phone to see the installation.

That’s all for now. Stay tuned for more easy to follow step-by-step guides on Google Camera, LineageOS etc.

About the Author

A Software Engineer by profession who has worked for few big organizations; such as: Broadcom, Cypress Semiconductor, LSI Corporation, Toshiba, Western Digital; on various cutting edge technologies and product lines, such as: RAID storage Driver, SSD firmware, Wi-fi firmware etc. Having more than 8 years of experience in software engineering domain.

 
 
 

Leave a Reply

Your email address will not be published. Required fields are marked *

2 Comments

  1. parietale January 30, 2020
    • siba February 2, 2020