[Xiaomi Mi A1 Questions & Answers] halb9:
Hello there,

I have quite some trouble getting LineageOS 17.1 running on my second Xiaomi Mi A1.

I like to think I am quite familiar with the overall topic of flashing devices.

I flashed my first smartphone (Galaxy S5) and did so ever since.

I'm currently running LineageOS 17.1 on my main Xiaomi Mi A1.

What I want to achieve today is flashing a new Xiaomi Mi A1 I just recently purchased from ebay.

This did not go as planned.

What I have:

Xiaomi Mi A1. Bought from ebay.

Notebook using Ubuntu Linux

Using platform-tools_r30.0.4-linux currently for fastboot and adb commands

What I want:

Xiaomi Mi A1 running with the latest LineageOS 17.1 ROM and the pico OpenGapps package.

What I tried already:

Normally the steps are a bit like the following (assuming coming from stock ROM)

Boot Stock ROM

Enable Developer Options

Enable USB Debugging

reboot device into download mode and oem unlock the device via fastboot

This part worked. The device is unlocked.

Next step is usually to flash or hotboot the recovery image.

here is where the fun begins.

root@halb9-ntb:/home/halb9/Apps/Android SDK/platform-tools_r30.0.4-linux# ./fastboot boot /home/halb9/Downloads/xiaomi/twrp-3.4.0-0-tissot.img
Sending 'boot.img' (29460 KB) OKAY [ 0.809s]
Booting OKAY [ 0.740s]
Finished. Total time: 1.583s
root@halb9-ntb:/home/halb9/Apps/Android SDK/platform-tools_r30.0.4-linux#

It looks like it is working. But the phone just shuts itself off.

The same happens with the lineageos recovery..

root@halb9-ntb:/home/halb9/Apps/Android SDK/platform-tools_r30.0.4-linux# ./fastboot boot /home/halb9/Downloads/xiaomi/lineage-17.1-20201013-recovery-tissot.img
Sending 'boot.img' (22351 KB) OKAY [ 0.632s]
Booting OKAY [ 0.738s]
Finished. Total time: 1.398s
root@halb9-ntb:/home/halb9/Apps/Android SDK/platform-tools_r30.0.4-linux#

So I went on a little google hunt and tried researching the issue.

I found an issue in the gitlab repo: TWRP booting on Xiaomi Mi A1 does not work

The description there pretty much is identical to what I am seeing here. Unfortunately the issue got closed due to not following the template.

So I went on with my search and found the following topic. Can't install twrp

In there is a link pointing to this post which is a part of this thread.

Post #81 also links to the mediafire filesharing site where I downloaded the mentioned recovery that supposedly works.

So I tried that one out and luckily enough, not only does it look good on the shell

root@halb9-ntb:/home/halb9/Apps/Android SDK/platform-tools_r30.0.4-linux# ./fastboot boot /home/halb9/Downloads/xiaomi/xda-recovery-twrp.img
Sending 'boot.img' (20236 KB) OKAY [ 0.547s]
Booting OKAY [ 0.560s]
Finished. Total time: 1.130s
root@halb9-ntb:/home/halb9/Apps/Android SDK/platform-tools_r30.0.4-linux#

it actually boots into recovery mode!

I noticed the version on this one is 3.2.1-0. So just out of curiosity I tested with different twrp versions.

I can report on the following behavior.

3.2.1-0: Recovery flash works. Recovery boots up. Touch is working fine.

3.2.2-0: Recovery flash works. Recovery boots up. Touch is working fine.

3.2.3-1: Recovery flash works. Recovery boots up. But touch does not work reliable.

3.3.0-0: Recovery flash works. Recovery boots up. But touch does not work reliable.

3.3.0-1: Recovery flash works. Recovery does not boot up. Phone shuts down.

3.3.0-2: Recovery flash works. Recovery does not boot up. Phone shuts down.

3.3.1-0: Recovery flash works. Recovery does not boot up. Phone shuts down.

3.4.0-0: Recovery flash works. Recovery does not boot up. Phone shuts down.

There are some reportings of no touch functionality from people who replaced their screens.

Like this one or this one.

I have no knowledge whether my phone got a screen replacement before my purchase or not. I asked the seller but no answer yet.

I tried flashing the LineageOS ROM with TWRP 3.2.2-0. I followed the instructions on the wiki of LineageOS.

Boot into recovery

Format Data

adb sideload filename.zip

root@halb9-ntb:/home/halb9/Apps/Android SDK/platform-tools_r30.0.4-linux# ./adb sideload /home/halb9/Downloads/xiaomi/lineage-17.1-20201013-nightly-tissot-signed.zip
Total xfer: 0.00x
root@halb9-ntb:/home/halb9/Apps/Android SDK/platform-tools_r30.0.4-linux#

But everytime I do that I get the following error on my phone

Where I am right now:

This means currently I have the following situation.

I can only flash TWRP 3.2.2.0. Anything above that does not work.

With TWRP 3.2.2.0 I am unable to flash LineageOS 17.1.

Any ideas moving forward from here are highly appreciated!