Install UBports on Xiaomi Mi A2
-
Hello,
It would be useful to find synthetic and updated instructions to install UBports on the page of the device: https://devices.ubuntu-touch.io/device/jasmine-sprout/
In the same way as the "Preparatory steps" paragraph for the Sony Xperia X: https://devices.ubuntu-touch.io/device/suzu/Others before me have posted their experience in installing UBports on Xiaomi Mi A2:
- https://forums.ubports.com/topic/6951/ubports-quick-and-simple-install-on-xiaomi-mi-a2
- https://forums.ubports.com/topic/6933/mi-a2-installing-using-the-ubports-installer
- https://forums.ubports.com/topic/6922/mi-a2-installing-ut-over-android-one-the-bootloader-issue
- https://forums.ubports.com/topic/6840/ubports-install-fails-with-permission-error-on-the-device
- https://forums.ubports.com/topic/6812/how-to-install-ubuntu-touch-on-mi-a2-by-simple-way
They helped me but the information is not necessarily up to date or does not correspond to the computer system I used, and information of interest may be hidden in the thread. Moreover the style of this forum which displays only a part of the posts does not help to find (or retrieve) information.
In my turn I describe (from memory) my experience:
I started with a phone bought second hand, with Android 10, last update.
I mainly use a computer with Linux, Debian 11.
- I downloaded :
- Android 9 stock version, suggested by the installer (0.8.9): https://github.com/ubports-xiaomi-sdm660/artifacts/releases/download/v0.1/jasmine_sprout_stock_android9.zip
- TWRP: last version was twrp-3.6.0_9-0-jasmine_sprout.img https://eu.dl.twrp.me/jasmine_sprout/
-
On phone: activate the developer mode, USB debugging and bootloader unlock
-
From the computer I copied Android 9 to a folder on the phone
-
From the computer I executed the following commands:
$ adb reboot fastboot $ fastboot flashing unlock $ fastboot boot twrp-3.6.0_9-0-jasmine_sprout.img
-
In TWRP: install Android 9 by selecting the file already copied in the phone.
I didn't understand anything about the A/B slots... I validated the default options (installation slot A I think).
To avoid mistakes and anxieties related to this step, it would be interesting to write a note what this specificity means. I have installed UBports on other phones and I was not aware of this.
An error message appeared after the installation in TWRP. The phone restarted in recovery mode (I guess) and I validated the reinstallation of android. When it restarted, it was running version 9. -
From this step fastboot was not working from my Linux computer:
$ fastboot boot twrp-3.6.0_9-0-jasmine_sprout.img Sending 'boot.img' (31684 KB) FAILED (remote : 'unknown command') fastboot : error : Command failed
I am stubborn and I tested several reboots, several cables, several attempts from ubports-installer... nothing worked.
I don't know if it was useful, at one point I ran $ fastboot flashing unlock_critical: this operation worked, but all other commands remained without effect and the device in fastboot mode still not detected by ubports-installer-
I managed to finish the installation from a computer with Windows 10: once the phone in fastboot mode and plugged in, in Device Manager it is possible to install a specific driver. Problem described here : https://github.com/ubports/ubports-installer/issues/2330
-
With the fastboot driver installed, ubport-installer (on Windows) recognized the device in fastboot mode and proceeded to the next steps without problems. On reboot the system works fine.
-
So far only a few minor bugs
- photo application got stuck at the first use, it worked after a reboot
- sound (ringtones, loudspeaker) crackling at high volume
- Question: if I didn't have access to a Windows computer, what solution to finish the installation with Debian 11?
Thanks for your work. Thanks for your help.
-
@rafa The answer may be absurd, but try using a liveusb from another Linux distribution. I have been able to install it with debian 10 and Linux mint.
If you install it in slot B, it will not boot. At least in my case I had to install it on A
-
Kubuntu 20.04 LTS running on my laptop does a very good job at recognizing many phones via ADB without any issue!
However when I need some Windows tool(s) for specific phones or issues I use a older laptop that is running Windows 7 Home 64-bit as my "Dedicated Phone Flashing Machine"
Also :
After flashing a Custom Recovery you should simply tell the phone to reboot into the OEM Recovery and not from the Image File on your PC
So try this :fastboot oem reboot-recovery
For more info see here for example : https://forum.xda-developers.com/t/recovery-3-4-0-10-davinci-official-unofficial-twrp-for-xiaomi-redmi-k20-stable.3960726/
-
-
-
-