CalyxOS

Install on Xiaomi Mi A2

From a Windows computer

Install / Xiaomi Mi A2 / Windows

Terminology

Prepare your Android device

There are a few things you must do to prepare your device to accept a new operating system:

Enable Developer Options

SettingsAbout Phone → tap Build number 7 times

Enable USB debugging

SettingsSystemAdvancedDeveloper OptionsUSB Debugging

Enable OEM Unlocking

SettingsSystemAdvancedDeveloper OptionsOEM unlocking

This step might fail if there is no internet connection. In that case, connect to a WiFi network and remove SIM card, then try again.

Prepare your host computer

Install USB drivers for Windows

Windows requires specific USB drivers in order for device-flasher to work.

Download Google USB Driver

Open that page, click Click here to download Google USB Driver ZIP file, then accept the terms and conditions. Save the ZIP file to your host computer.

  1. Put your Android device in Fastboot mode.
  2. Connect your Android device to your computer’s USB port.
  3. On the Windows computer, open the Device Manager
    (windows key + X, select Device Manager from the list)
  4. Expand the list item Other Devices
    Not there? Make sure the Android device is plugged in and in Fastboot mode.
  5. Right-click the name of the device you connected, and then select Update Driver.
  6. In the Hardware Update wizard, select Browse my computer for driver software and click Next.
  7. Click Browse and then locate the USB driver ZIP file.
  8. Click Next to install the driver.

For more information, see Android developer site.

Download device-flasher

Download device-flasher.exe

Save this executable to a new directory, where you will also later save the CalyxOS image.

Verify Digest

This is an optional step, useful for ensuring you have the correct device-flasher executable. Open a terminal on your host computer, change to the directory where you saved device-flasher, and then run:

CertUtil -hashfile device-flasher.exe SHA256

And ensure the result says 0cdaf47f1c97e43c70e0fe7cfff63fcaa140799ccc494bebf6451e96cbcdda6c. This is the unique digest of the device-flasher. If it doesn’t match, then you have a corrupted or incorrect file.

Download factory image

Download CalyxOS Image

Save this image in the same directory as device-flasher. This image will only work for Xiaomi Mi A2 (jasmine_sprout). Any attempt to install this image on a different device model may brick (destroy) the Android device.

Do not extract or rename the zip, simply copy it as-is.

Once downloaded, the next step is to verify the image. This step is optional, but verification helps ensure that you downloaded the image correctly, and that you got the correct image.

Verify Digest

To verify the image, open a terminal window on the host computer where you saved the image and run the command:

CertUtil -hashfile jasmine_sprout-factory-202102100.zip SHA256

And ensure the result says 0728d0ff45d1555f914eb7bb86b5d19606f8efc45e89990ee6d8fc6b66690dc7. This is the unique digest of the image file. If it doesn’t match, then you have a corrupted or incorrect file.

Verify Signature

For the highest level of confidence, you can optionally download the signature file and then verify image signature.

Install CalyxOS

Run device-flasher

Now you are ready to install. Ensure that both the CalyxOS image and device-flasher are in the same directory.

Step 1. Connect the USB cable between the computer and the Android device.

Step 2. Run device-flasher

Double-click device-flasher to run it.

Your anti-virus may falsely flag device-flasher as infected. This is because the program is written in the Go programming language, see the Go FAQ for more information.

Unlock the bootloader

At some point in the installation process, it will ask you to unlock the bootloader.

NOTE: if the bootloader is already unlocked, you will not see the unlock bootloader menu and installation will proceed automatically without you needing to touch anything.

The bootloader unlock menu looks like this:

Press a volume key to select UNLOCK THE BOOTLOADER option. Then press the power key to activate that option.

After this, the android device will reboot, but in normal mode in the prior OS. Then follow these steps:

  1. Power down the Android device.
  2. Disconnect the USB cable.
  3. Boot into Fastboot mode.
  4. Reconnect the USB cable.
  5. The installation will resume automatically.

Success?

Once device-flasher is finished, you should now have a fully functional CalyxOS device. If not, please see our Community page for where you can post your questions.

Troubleshooting

Error running device-flasher

If you get a mysterious error when running device-flasher, or if device-flasher hangs, it may be a USB problem. Try connecting to a different USB port on your computer (yes, not all USB ports are created equal) or a different USB cable.

Back to Stock

If you would like to return to the default operating system, please see Back to Stock Android.

Security Notes

  • Over-the-air Updates: CalyxOS updates are delivered over-the-air (OTA) automatically, without any manual intervention needed. However, if you'd like to manually update your CalyxOS install, see OTA.
  • Security Updates: The Pixels 5a (5G), 4a (5G), 5, 4a, 4 XL, 4, 3a XL, 3a, 3 XL, 3 contain the full security patch, as they are still being updated by Google.
  • End-of-life: The Pixels 2 and 2 XL are no longer being updated by Google, so the CalyxOS releases for these devices only contain the fixes to the open source components, such as the OS code and the Linux kernel. Proprietary components such as the bootloader, modem firmware, and other firmware no longer get updates.
  • End-of-life: The Xiaomi Mi A2 is no longer being updated by Xiaomi, so the CalyxOS releases for it only contain the fixes to the open source components, such as the OS code and the Linux kernel. Proprietary components such as the bootloader, modem firmware, and other firmware no longer get updates. Additionally, due to a Xiaomi bug wherein updating causes the device to get wiped, we have to ship the September 2020 firmware.