Install /e/OS on a Samsung - Galaxy A21s a21s

This guide installs /e/OS on your a21s. Read it through once before you start, so you don’t hit surprises partway in. Downgrading from a newer OS version than the /e/OS build you’re about to install can cause instability or brick some devices — check your current OS version first. Flashing is done at your own risk: /e/OS builds are provided as best effort, without any guarantee, and the /e/OS project takes no responsibility for the consequences.

Requirements

  • Back up your important data to an external storage device — some of the steps below format the phone, wiping any backup left on it.
  • Charge your phone above 50%.
  • Enable adb on your PC — setup instructions.
  • Download every file listed in the Downloads section below before you start.
  • Use a real data cable — some cables only charge and can’t transfer data.
  • Enable USB debugging on your device — instructions.
  • Confirm your exact model in the Device Selector: where shown, hover the device name for the supported model number, and check it matches yours exactly.
  • Boot the stock OS at least once and check everything works — SMS, calls, and both over WiFi and LTE if available (some devices need VoLTE/VoWiFi used once on stock to provision IMS). Whatever’s broken on stock stays broken on /e/OS.
Warning: Log out of any accounts (Google, Samsung, Mi Account, etc.) set on the stock ROM before proceeding. Most vendors enable Factory Reset Protection (FRP): after a factory reset, a device that's still signed in will ask for the credentials of that account before it can be used again. Also remove any screen locks.

Downloads for a21s

Tip: Before installing /e/OS on the Samsung Galaxy A21s a21s for the first time, install the latest stock OS version 12 build on the device

Each build includes /e/OS Recovery — no separate download needed.

Not sure which one to pick? See official vs. community builds.

  • Before following these instructions please ensure that the device is on the latest Android 12 firmware.

  • If your device is currently using a newer or older version than the required version, please upgrade or downgrade to the required version before proceeding with your /e/OS installation.

  • The required version is Android 12 , which may be lower than the /e/OS version you are about to install - this is not an error! If there are multiple updates of that version (e.g. security updates), make sure to use the latest!

  • If you need to upgrade or downgrade your device, please search online for guides. We are unable to provide specific instructions here and on our support platforms.

Pre-Install Instructions

Warning: The following instructions will unlock the bootloader and wipe all userdata on the device.
  1. Connect the device to a Wi-Fi network.
  2. Enable Developer Options by pressing the “Build Number” option at least 7 times, in the “Settings” app within the “About” menu
  3. Within the “Settings” app go to “Date and Time” and change the date to be 2 years in the past
  4. Reboot the device
  5. Go to the Developer Options menu in the “Settings” app and enable OEM unlock
  6. Power off the device, and boot it into download mode:
    • devices.hold_volume_down_up_connect_usb
    • Now, click the button that the onscreen instructions correlate to “Continue” and/or “Unlock Bootloader”.
  7. Your device will reboot and format all user data, you may now unplug the USB cable from your device.
  8. Run through Android Setup, it is crucial that you connect to a Wi-Fi network when setting up the device
  9. Re-enable Development settings by clicking the “Build Number” option 7 times, in the “Settings” app within the “About” menu, and verify that “OEM Unlock” is still enabled in the “Developer options” menu.

Preparing for installation using Heimdall

Samsung devices come with a unique boot mode called “Download mode”, which is very similar to “Fastboot mode” on some devices with unlocked bootloaders. Heimdall is a cross-platform, open-source tool for interfacing with Download mode on Samsung devices. The preferred method of installing a custom recovery is through Download Mode – rooting the stock firmware is neither necessary nor required.

  1. Enable Developer Options by pressing the Build Number option in the Settings app within the About menu
  • From within the Developer options menu, enable OEM unlock.
  1. Download and install the appropriate version of the Heimdall suite for your machine’s OS
    • Windows: Extract the Heimdall suite zip and take note of the new directory containing heimdall.exe. You can verify Heimdall is functioning by opening a Command Prompt or PowerShell in that directory and running heimdall version.
    • Linux: Extract the Heimdall suite zip and take note of the new directory containing heimdall. Now copy heimdall into a directory in $PATH, a common one on most distros will be /usr/local/bin. For example cp heimdall /usr/local/bin. You can verify Heimdall is functioning by opening a Terminal and running heimdall version.
    • macOS: Mount the Heimdall suite DMG. Now drag heimdall down into the /usr/local/bin symlink provided in the DMG. You can verify Heimdall is functioning by opening a Terminal and running heimdall version.
Tip: These Heimdall suite distributions were built by LineageOS Developer Nolen Johnson (npjohnson) and Jan Altensen (Stricted)
  1. Power off the device, and boot it into download mode:
    • With the device powered off

    • hold Volume Down + Volume Up and connect the USB cable to PC.

    • Now, click the button that the on screen instructions correlate to Continue, and insert the USB cable into the device.

  2. For Windows users only: install the necessary drivers. A more complete set of instructions can be found in the Zadig user guide.
    1. If nothing relevant appears, try uninstalling any Samsung related Windows software, like Samsung Windows drivers and/or Samsung Kies.

    2. Run zadig.exe found in your extracted Heimdall directory.

      Tip: For the interested, source and documentation for zadig.exe can be found here.
    3. Choose Options » List all devices from the menu.

    4. Select Samsung USB Composite Device or MSM8x60 or Gadget Serial or Device Name from the drop down menu.

    5. Click Replace Driver, then selecting Install Driver from the drop down list built into the button.

    6. If you are prompted with a warning that the installer is unable to verify the publisher of the driver, select Install this driver anyway. You may receive two more prompts about security. Select the options that accept the warnings and allow you to carry on.

  3. On your machine, open a Command Prompt or PowerShell (Windows) window, or Terminal (Linux or macOS) window, and type:
heimdall print-pit
  1. If the device reboots that indicates that Heimdall is installed and working properly. If it does not, please refollow these instructions to verify steps weren’t missed, try a different USB cable, and a different USB port.

Installing a custom recovery using Heimdall

  1. Download the custom recovery linked in the Download section above

  2. Power off the device and connect the USB adapter to the computer (but not to the device, yet).

  3. Boot into download mode:

  • With the device powered off

  • hold Volume Down + Volume Up and connect the USB cable to PC.

    Accept the disclaimer, then insert the USB cable into the device.

  1. On the computer, open a command prompt (on Windows) or terminal (on Linux or macOS) window in the directory the recovery image is located, and type:
heimdall flash --RECOVERY recoveryfilename.img --no-reboot

Replace the recoveryfilename with the name of the recovery image you downloaded

  1. A blue transfer bar will appear on the device showing the recovery being transferred.
  2. Manually reboot into recovery:
  • With the device powered off, Reboot and immediately hold Volume Up + Power while the device is connected to a PC via USB cable.

    Note: Be sure to reboot into recovery immediately after having installed the custom recovery. Otherwise the custom recovery will be overwritten and the device will reboot (appearing as though your custom recovery failed to install).

Steps to install /e/OS from recovery

Use Volume to navigate and Power to select — to go back to the main screen, use Volume Up to choose the arrow at the top. If your PC can’t detect the device over adb, tap Advanced » Enable adb from the /e/OS recovery main screen.

Format the device

On /e/OS Recovery main screen:

  1. Select Factory reset

  2. Select Format data / Factory reset option

  3. Next screen will display a warning that this action cannot be undone

  4. Select Format data to proceed or Cancel if you want to go back

  5. If you selected Format data, the format process will complete

    You’ll see text in small font on the lower left side of the screen showing format progress, similar to this:

    Wiping data
    Formatting/data
    Formatting/cache
    Data wipe complete
    
  6. Display will now return to the Factory Reset screen

Install /e/OS

In /e/OS recovery main screen:

  1. Select Apply Update and in next screen Apply update from adb

  2. In the next screen, the device is now in sideload mode

    Note at this point the Cancel option is highlighted that does not mean you have canceled the action. The device is in adb sideload mode.

  3. On your PC begin adb sideload. Type the below command in a console

    adb sideload downloaded_file_name.zip
    

    Replace downloaded_file_name.zip with the name of the /e/OS file you downloaded in the previous section

  4. Press enter key on the keyboard to start the sideloading The screen will show the progress percentage…This might pause at 47%

  5. Give it some time

  6. The PC console will now display Total xfer: 1.00x

  7. The phone screen will now display some text with a message similar to:

    Script succeeded result was [1.000000]
    

    This means that the install was successful.

Reboot the device

In /e/OS recovery main screen:

  1. Select Reboot system now

    The reboot process may take 5 - 10 minutes

Success: Congratulations! Your phone should now be booting into /e/OS.
To find some troubleshooting tips… click here

adb

  • Getting a Total xFer ':' 0.01x message - Try to upload the /e/OS to internal storage and retry to install
  • adb ':' sideload connection failed ':' insufficient permissions for device error - Try to execute the commands adb kill-server and adb start-server and retry
  • Getting an insufficient permissions error - Try the solution given here
  • When running "adb devices" in bash a device is shown as "unauthorized" - Try the solution given here

Connectivity

  • Trying to troubleshoot mobile connectivity issues - Read this guide


Please share your experience , suggest tips or changes to this install guide documentation by visiting the Galaxy A21s specific topic on our community forum. To report issues in /e/OS please refer this guide

This documentation “Install /e/OS on a Samsung - Galaxy A21s - “a21s”” is a derivative of “install LineageOS on a21s” by The LineageOS Project, used under CC BY.