This procedure has been tested to fix the “crazy touchscreen” issue on Xiaomi Mi A1.

Very important: please read the following carefully before proceeding!

Installing a new operating system on a mobile device can potentially:

  1. lead to all data destruction on the device
  2. make it an unrecoverable brick.

So please only flash your device if you know what you are doing and are OK with taking the associated risk.

The /e/OS project and its project members deny any and all responsibility about the consequences of using /e/OS > software and/or /e/OS services.

Installing /e/OS coming from MiUI 10 beta (based on Android 9.0 Pie)

Note: The following procedure assumes you have already unlocked your device’s bootloader.

Warning: The following procedure WILL delete all data on your phone (including files stored on the internal storage). Please do not hesitate to backup your photos, videos, SMS, call-logs, etc. to an external drive or PC! Files stored on the external SD card (if you have inserted one into your device) will NOT be deleted.

Author’s advice: For the following procedure, make sure you are willing to use ~ 2.4 GB of your monthly internet quota.

  1. Download Xiaomi’s official “XiaoMiFlash” application and follow the installation instructions.
  2. Once installed, download XiaomiFirmware latest Nougat ROM such as “Android 7.1.2 Nougat (N2G47H.7.12.19)”.
  3. Once downloaded, un-zip the TGZ file. Then, un-tar the TAR file.
  4. Connect your device to your PC over USB. Then, run the following command:

    adb reboot bootloader
    
  5. On your PC, launch “XiaoMiFlash” and select the FOLDER you un-zipped above.
  6. In the bottom right corner, select “clean all” and then click “flash”.

    Author’s advice: Get yourself something to drink while you wait for the flash to complete.

  7. Once the flash is complete, your device should boot into AndroidOne (based on Android 7.12). Complete the setup wizard (you can skip setting up your accounts, fingerprint, etc.) and enable USB debugging under Developer options.

  8. Now run the following command:

    adb reboot bootloader
    
  9. OEM unlock

    fastboot oem unlock
    
  10. Flash this custom version of TWRP recovery-Oreo:

    fastboot boot /tmp/recovery-3.2.1-2-oreo.img
    

    Wait more than 10 sec for the device to automatically reboot in TWRP (recovery) mode.

  11. Once in recovery mode, copy this stock Oreo ROM to the device:

    adb push 9.6.4.0v8.1.zip /sdcard/
    
  12. In TWRP select tap install, select the file that was copied, and complete the zip installation

  13. Once completed press reboot

  14. Wait for the boot to complete, enable developer mode, enable USB debugging.

Now you can go back to the previous instructions and continue from “Installing a custom recovery”: this time, use the TWRP version listed in the documentation, not the custom one from this page.