Installing Ubuntu Touch to a Xiaomi Mi A2 with Android 10
-
Hi everyone,
I bought a second hand Xiaomi Mi A2 with Android 10 installed on it. I need to install Android 9 : jasmine_sprout_stock_android9.zip I found a tool that's only available on Windows, but this last is having driver problems (in hardware manager it is not recognized) so I found Xiaomi ADB/Fastboot tools that can be run on Ubuntu 20 : https://github.com/Szaki/XiaomiADBFastbootTools/releases/tag/7.0.3
UBports is telling me to have a specific Android installed on the phone and gave me this link to download it : https://github.com/ubports-xiaomi-sdm660/artifacts/releases/download/v0.1/jasmine_sprout_stock_android9.zip
After unzipping this last, Xiaomi ADB/Fastboot tools can't recognize its content and outputs this error : Fastboot ROM not found.
I can continue the installation process but I'm afraid that will make the installation fails if I don't have the specific android version.
Thanks.
-
Make sure the phones bootloader is unlocked. This is vital for any ROM installation on phones. Do not relock the bootloader as this can brick the phone in certain circumstances. All Xiaomi stock ROM flashing seems to be aimed at a Windows PC (.exe files). You can install TWRP recovery through fastboot and install the ROM that way. The other way through fastboot is to extract the zip file and flash each file manually using the fastboot flash command. If you are OK with fastboot commands and flashing ROMs, try the install with Android 10 (it worked for me with a Redmi note 7). If it goes wrong you can always reflash to Android 9 and then try again. Ubuntu Touch in my experience won't brick your phone.
-
TWRP crashes + I need more precise instructions
-
@embeddedmz As I said make sure the bootloader is unlocked. Check this by enabling developer options (tapping the build version repeatedly to enable it). Once developer options are enabled go in and make sure USB debugging is enabled and OEM unlock is enabled. Reboot the phone and go back into developer options and there should be another option under OEM unlock to check the bootloader unlock status. Once that is done, connect the phone up to a PC and copy the Android 9 ROM for the phone to the root of the directory, i.e. not in a folder. Then reboot into fastboot mode and flash TWRP to the phone:
fastboot flash recovery /path/to/twrp-3.6.0_9-0-jasmine_sprout.img
As a side note, I install Android Studio, which gives me the latest ADB and Fastboot tools which for me on Windows and Linux work, rather than older versions that vary in their ability.
Once installed boot into TWRP and install from a zip file. Choose the ROM zip and it should flash to Android 9.
If you are unsure, Google as there are loads of sites that give really detailed instructions what to do.
-
@embeddedmz
Please only use official Xiaomi Tools to prepare your phone for Ubuntu Touch :- Xiaomi Flash Tool :
https://c.mi.com/in/miuidownload/detail?guide=2
It also installs the right drivers for you! - Xiaomi Unlock Tool :
https://en.miui.com/unlock/download_en.html
Only used for Unlocking the Bootloader!
Carefully follow their instructions and make sure that :
- You DO NOT lock your Bootloader EVER AGAIN !!!
- You have a phone that is 100% original!
So for example that the display has never been repaired by someone who has no idea what he is doing or accidentally used a non-original display to repair his phone!
Stick to those rules and you are all good to go!
- Xiaomi Flash Tool :
-
@nero355 - @embeddedmz is not on windows so the Mi Unlock tool won't work, neither will the flashing tool. It does make life easier using windows for these tasks, but if it is unlocked you can flash a ROM with TWRP or manually in the CLI using fastboot. I would also use Google to search how to do that specific phone, as it is a lot quicker than me explaining it and missing a step or getting a step wrong. Time is my enemy.......
-
@mrt10001
Boot a small VM under Linux with Windows inside and Passthrough the USB Hub and it's ports and GO GO GO -
@nero355 said in Installing Ubuntu Touch to a Xiaomi Mi A2 with Android 10:
@mrt10001
Boot a small VM under Linux with Windows inside and Passthrough the USB Hub and it's ports and GO GO GOYes, thats one thing I would do, but a VM with windows is a PIA for the time taken to get it going. I know there is enthusiasm for UT, but I don't know how far people would go to install it, let alone their expertise in working through an issue to resolve it.
-
@mrt10001 said in Installing Ubuntu Touch to a Xiaomi Mi A2 with Android 10:
As I said make sure the bootloader is unlocked. Check this by enabling developer options (tapping the build version repeatedly to enable it). Once developer options are enabled go in and make sure USB debugging is enabled and OEM unlock is enabled. Reboot the phone and go back into developer options and there should be another option under OEM unlock to check the bootloader unlock status.
This is already done ! and with the tool I got from github the phone is unlocked all the time (I used volume keys and unlock screen button to do it, the smartphone was is "fastboot" with a bunny working on an android logo).
I downloaded TWRP from the play store and I didn't checked "run as root" as it crashes the app. This software used the browser to download a file named "twrp-installer-3.6.0_9-0-jasmine_sprout.zip" what I do with this file ?
Otherwise, the 1 GB Android 9 zip file I downloaded from github contains the following items :
@mrt10001 said in Installing Ubuntu Touch to a Xiaomi Mi A2 with Android 10:
Once that is done, connect the phone up to a PC and copy the Android 9 ROM for the phone to the root of the directory, i.e. not in a folder. Then reboot into fastboot mode and flash TWRP to the phone:
fastboot flash recovery /path/to/twrp-3.6.0_9-0-jasmine_sprout.imgThese instructions are not clear for me
@nero355 said in Installing Ubuntu Touch to a Xiaomi Mi A2 with Android 10:
Xiaomi Flash Tool :
https://c.mi.com/in/miuidownload/detail?guide=2
It also installs the right drivers for you!No, the program is a joke and it doesn't install the drivers (I got a message in chinese)
In Windows 8.1, this is what it looks in the hardware manager + windows is not happy with the driver I found here : https://developer.android.com/studio/run/oem-usb for Xiaomi (it told me that it has a bad hash).
I'm doing all this because I want to ungoogle my life. Google is an evil company playing a key role in the new world order (and above all I'm fed up with Android spying on me through the microphone)
-
@embeddedmz , did you try to follow this instructions?
https://forums.ubports.com/topic/6951/ubports-quick-and-simple-install-on-xiaomi-mi-a2I was in same sittuation, phone I bought had Android 10 but I downgraded it following tutorial I linked above.
-
@mkarpicki No, I will follow it. Thanks !
-
@mkarpicki in the tutorial he doesn't explain where he got the fastboot program. Can you give me a link ? I work under Ubuntu as my Win8.1 doesn't have the proper drivers for Xiaomi.
I tried to use another tool (https://github.com/Szaki/XiaomiADBFastbootTools/releases/tag/7.0.3) to boot the TWRP image but I got a black screen.
UPDATE : okay, I started the smartphone by pressing volume down and plugging it into the computer.
fastboot package is already installed in ubuntu.
UPDATE 2: I got a black screen after this :
./fastboot boot ~/Downloads/twrp-3.5.2_9-0-jasmine_sprout.img -
This post is deleted! -
@embeddedmz you are fast.. before I noticed you replied, you already had 2 updates on progress..
(one more tutorial basically similar: https://forums.ubports.com/topic/7101/install-ubports-on-xiaomi-mi-a2 )
I did not have that black screen to be honest, I assume you did:
- activate the developer mode,
- list itemUSB debugging and
- list item bootloader unlock)
and then did
./fastboot flashing unlock ./fastboot flashing unlock_critical
?
let me think a bit but I really think I did not do anything more than described - only thing which comes to my mind (but I did not assume it makes any difference) , I had Android Studio installed in past already with adb and whatever tools included from times I did try doing some Android development in free time.
ps... please be aware I am also rookie here, I tried that week+ ago so I am not much more experienced in this area..
-
@mkarpicki Yes I have already followed those steps. On YouTube I found how to launch the FastBoot by pressing the volume down button then plugging the smartphone into the computer.
I tried 10 different images for TWRP and I still have black screens
-
@embeddedmz You could take the risk and complete the installation process with Android 10 on your phone. I did that and - amazingly - it worked.
Look here:
https://forums.ubports.com/topic/6349/installation-succes-at-the-first-tryAs the thread says, the installation was much easier than I thought, but I probably just got lucky.
-
@embeddedmz , hmm. No idea to be honest, you are on Ubuntu (host machine) or Windows?
I was on Ubuntu for whole process of reinstalling android , at some point I used Mac as ubports installer could not find device (I assume usb issue described somewhere). Do you have a chance try other host machine (or if on Win, check if you have some Google USB drivers - but no idea why would that help?) -
@messayisto , If I would know that week+ ago - it would also save me some stress and Saturday night (still was a pleasure but nice it worked with 10 for you!)
-
@embeddedmz - I thought you didn't have access to a windows machine. This makes life easier, however upgrade to window 10 at least, windows 8.1 will have woefully inadequate support for drivers and items such as fastboot and ADB (USB device drivers). As the phone is unlocked, use the Mi Flash tool to downgrade the ROM to Android 9, it is by far the easiest method. There is an US English version, ignore the pop up box in Chinese, it is pretty much no use. However try installing UT with Android 10 first, it may just work. As I said, I download and use Android Studio as it installs the correct and latest Fastboot and ADB drivers and has always worked for me.
This is my MiFlash tool in windows:
- note the phone ROM is for kenzo - Redmi Note 3(not a Mi A2) as I was downgrading a different phone, use the select to browse to your ROM and DO NOT relock the bootloader. -
@mrt10001 OK Thank you, I will use my office computer (Windows 10) wednesday and let you know if that worked