Installing Ubuntu Touch to a Xiaomi Mi A2 with Android 10
-
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
-
@embeddedmz said in Installing Ubuntu Touch to a Xiaomi Mi A2 with Android 10:
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 ?
Ignore the Play Store and get TWRP from their website for your phone when you need it!
https://twrp.me/xiaomi/xiaomimia2.html
And then install it with Fastboot commands while your phone is in Fastboot Mode :
fastboot flash recovery twrp-<version>.img fastboot oem reboot-recovery
REMEMBER: It's important that you boot directly into TWRP Mode from the Fastboot Mode because otherwise the TWRP installation will be overwritten with the Stock Recovery!
And in case you need it for your phone :
Flash the VBMETA.IMG for your phone and reboot to make sure the installation has succeeded!
(You might have to check XDA Forums for the right one...)No, the program is a joke and it doesn't install the drivers (I got a message in chinese)
Weird... it should install them!
You can try this in case it doesn't work as expected : https://github.com/fawazahmed0/Latest-adb-fastboot-installer-for-windows
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).
For what it's worth : I always use Windows 7 and USB 2.0 Ports for this kind of stuff!
One more TIP :
Try to keep your path to all the ROM's and Images and stuff as short as possible and without any spaces in the name!- C:\Xiaomi\ <All your files and Tools here> = GOOD!
- C:\Users\YourName\Xiaomi\All my ROMs\ = BAD!
- C:\Users\YourName\Xiaomi\All my Tools\ = BAD!
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)
I totally agree with you!
-
@mrt10001 @nero355 This archive https://github.com/ubports-xiaomi-sdm660/artifacts/releases/download/v0.1/jasmine_sprout_stock_android9.zip (after extraction) cannot be flashed with MiFlash. it says "can't find flash_all.bat"
What I can do to install Android 9 (provided by ubports) on my device ?
@mrt10001 said in Installing Ubuntu Touch to a Xiaomi Mi A2 with Android 10:
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.
In the ubports web site they say that a particular Android version must be installed first. I can't take the risks !