Read the warning before Installing a Custom Rom on the Xiaomi MiA1
Warning: Installing or Flashing a Custom ROM voids the warranty of your smart phone. So unless you are sure you want to do this and have a basic idea of ROM and how to flash them on smart phones, there is a good chance you may brick your phone. Please proceed at your own risk.
Now that you have been warned and despite it if you would want to risk your sanity and the sanctity of your smart phone then read on…
Process to install a custom ROM on the Xiomi MiA1 has been updated. The process for a clean flash is as under
- Open up ADB on your PC. Steps to start or install ADB on your PC are given here.
- Check ADB is detecting your phone. There should be a number followed by devices. If it shows as unknown device or something else please read the instructions given here
- Remove phone lock if enabled on your phone- this could be a pattern or fingerprint. Set it to none under Settings >>Security & Privacy >> Screen lock
- At the command prompt type
adb reboot bootloader
- This should take your phone into the boot loader mode.
- At the command prompt type
- When you see your device showing up type the following at the command prompt
fastboot boot boot-recovery.img
- Wait for a few seconds your phone screen will display the TWRP main screen
- Go to the main menu, and tap Wipe.
- Now tap Format Data and continue with the formatting process. This will remove encryption as well as delete all files stored on the internal storage.
- Return to the previous menu and tap Advanced Wipe.
- Select the System partition to be wiped and then Swipe to Wipe.
- Place the LineageOS
.zippackage, as well as any other .zip packages on the root of
- Using adb:
adb push filename.zip /sdcard/
- You can use any method you are comfortable with.
adbis universal across all devices, and works both in Android and recovery mode, providing USB debugging is enabled.
- Using adb:
- Go back to return to main menu, then tap Install.
- Navigate to
/sdcard, and select the LineageOS
- Follow the on-screen prompts to install the package.
- Once the Lineage OS is installed install TWRP immediately.
- Reboot to recovery. This will take you to the TWRP recovery. This is an important step for the MiA1 as it has two partitions.
- Once you are in the TWRP push the other files using adb push commands to the same /sdcard/ folder
- You can push the Magisk, Open Gaps and Camera fix zip files. All the urls for all the files are given on this page.
- Install in the following sequence
- Reboot system
Wait for the phone to reboot. It will take a few minutes to start.
————————————Previous Article __________________
Files to Download before proceeding
- Custom ROM of your choice. I prefer the Lineage 15.1 Unofficial version downloadable from here
Please note this is the site of the XDA forum for MiA1. To read more details on XDA and the other ROM options available please scroll down.
- TWRP and recovery
Download both the recovery image and the TWRP installer. Please check which version you are downloading as both the nougat and the Oreo version are available at the site. The choice will depend on which OS you have on your MiA1 currently. For e.g. if it is the Oreo 8.0 version from Xiaomi that you want to overwrite then download the oreo version of TWRP. Click here to download
- Google Platform Tools.
Once you have the files installed on your PC copy the recovery img downloaded in Step # 2 about and place it in this folder. Preferably on C Drive. To understand what exactly happens here read this article.
Google Platform Tools download urls
This is a suite of Google applications that will install the framework as well as google applications on your phone. Unless you plan not to use Google applications or do any downloads from google Play you will need a version of GApps as well.
I would recommend downloading the Aroma variant as it has a graphical interface where you can pick and choose which google applications to. For example, you can un select Gmail and Duo and the rest of the Google Apps will still work!
The other combinations to choose are Arm 64 and 8.1
All Variant under Arm64 and 8.1 work. PICO has the smallest size when it comes to downloads.
Gapps Url : https://opengapps.org/
- Magisk .Download the latest version from here
- The fix for the camera. The stock camera tends to misbehave on custom ROM’s. Remember Xiaomi also provides its own camera along with the default ROM!
Download the Google_Cam_Fix_for_LineageOS_v1.0 from here.
Steps to install the ROM
- Copy all the above files in your download folder.
- Enable developer options if not already done. To read how to do it click here.
- Remove any Pattern or Fingerprint locks you may have set. You can do this from Settings >> Security & Privacy >> Device Security >> Screen Pattern set it to none. It will ask you for the pattern to confirm. Select None.
- Power Off your phone.
- Wait for a minute for the phone to completely power down.
- Now there are two options. If you are installing the custom ROM and TWRP for the first time, then you have to Press the power button and the Volume Down – button together.
To better explain what that mean – the volume button is a long button right? Now press the lower end of it along with the power button.
You should feel the phone vibrate in about 2-3 seconds. Let go of all the buttons.
- The phone will boot into the Fastboot screen. This image of a Chinese army hat wearing bunny should appear on your screen with the words Fastboot written all over.
- Connect your phone via the data cable to your PC. Open command prompt (CMD) and browse to the folder where you have the Google Platform Tools copied.
- If you have not unlocked your phone, then you would need to read this and perform these steps first
- On your PC open up the command prompt and type
This would show you an ID and a device. This is your phone showing up in the fastboot mode.
- Now type at the command prompt
fastboot boot recovery…img
where recovery.img is the name of the recovery file you have downloaded and copied in to the Google Platform tools folder.
- This will install the recovery image on your phone. Wait for 2-3 seconds and you will get a message saying success.
- The TWRP screen as visible to the right will show up.
- Swipe to factory reset
- Got to Wipe and clear out Data, dalvik,system
- Go to Install
- Flash ROM zip
- Go to Twrp reboot options and switch to another slot (ex. if you are on slot_a then switch to slot_b)
- REMEMBER DO NOT REBOOT AT THIS STAGE. You do not have an operating system on your phone and will end up with a bricked phone if you reboot now.
- Flash latest Twrp installer
- Reboot into Twrp recovery
- Flash latest Magisk
- Flash gapps zip (platform ARM64 + Android 8.1 + Variant (all gapps will work))
- Flash Camera…zip
- Reboot to system
Remember the first time it reboots it will take about 10-15 minutes. So have a cup of tea or at least leave the phone alone. Let the OS do its magic. Once it reboots the phone will ask you for the setup details.
Go ahead use a custom ROM and declare your independence!!!
To download the latest build unofficial Lineage build for the MiA1 click the links below:
Please note that you are downloading and installing the build at your own risk. I will not be responsible for your phone bricking up and also will not be able to support you in case of any issues.
On a personal note I have been using the same build on my daily driver for the last couple of days with no issues. I have GApps installed and am able to use some 46 apps with no issues including Twitter, Whatsapp, Quora, XDA, WordPress among others. The phone camera and fingerprint features are working normally.
TWRP boot image :
Boot recovery image
TWRP Recovery Installer:
GApps Aroma 64bit ( please note all arm64 bit variant work,but i prefer Aroma as it gives me the option to select what I want to install. You can download the latest Gapps from here
Fix for the camera in case it does not work
Some important links: