UBports "quick" and "simple" install on Xiaomi Mi A2
-
@scream314 Thanks
-
Hi @scream314 ,
the links to download vendor.img and Android 9 stock image do not work, "404 page not found".
Are they no longer active?Thanks
-
-
@danilo748
Try opening it from here: https://github.com/ubports-xiaomi-sdm660/artifacts/releases/tag/v0.1
(Note: download was extremely slow for me.) -
-
-
This guide worked well for me.
Unfortunately I could not install Ubuntu at the end ( installer was getting <waiting for device> error due to fastboot crashing after downgrade to Andreoid 9). On some other articles people were suggesting it could be USB Port issue, that may be true actually. As I had no other idea I installed "installer" on other laptop (switched from Ubuntu to Mac) and there it worked.. -
-
-
After booting TWRP :
./fastboot boot ~/Downloads/twrp-3.5.2_9-0-jasmine_sprout.imgI have a black screen. I tried also with the 3.6.0 version and I still have the same issue
Tested all the 9 available images and I always have a black screen
-
I reinstalled Android 10 from a Xiaomi image and now I can boot TWRP.
-
@scream314 Thank you very much ! No more google's tracking device on my smartphone !
I will donate money to Ubports !
-
UBports is the foundation, Ubuntu touch is the operating system.
Regards... -
@scream314 In reply to the starting post, I confirm the initial steps, i.e. becoming "a developer", enabled USB debug and OEM unlock from the Android interface and the two fastboot commands from the PC cmd prompt, being straight forward. Contrary to other resources no further complications or tools were required.
For the downgrade and occasional reversal of the same, I downloaded TWRP 3.6.0 img from the same location and each latest Android 9 and 10 zip and tgz file from https://xiaomifirmwareupdater.com/archive/miui/jasmine/.
However, no matter whether I changed the active slot with fastboot or TWRP, rebooted to the active slot prior to installation, verified again the active slot with fastboot or TWRP and contrary to the TWRP output, indicating the installation to the inactive slot, I had the impression from multiple reboots to either slot, that the installation always ended up in slot B.
Therefore I unzipped and untared the tgz file and simply installed with flash_all.bat. Since booting slot B then went into a bootloop before defaulting back to and booting slot A, I changed flash_all.bat to also install system.img instead of system_other.img to slot B and the downgrade was finally successful.
For the UT installation on W7 pro 64bit I downloaded the ADB driver from https://flashxiaomi.com/xiaomi-mi-a2-usb-driver/ respectively https://dl-ssl.google.com/android/repository/latest_usb_driver_windows.zip and appended in android_winusb.inf file to Google.NTamd64 section the following lines (the end justifies the means?):
;Xiaomi Mi A2
%SingleAdbInterface% = USB_Install, USB\VID_18D1&PID_0000
%CompositeAdbInterface% = USB_Install, USB\VID_18D1&PID_0000&MI_01 -
@scream314 In reply to the video recording freezing, I initially observed the exactly same issue. After flipping to and recording with the front camera, I can now also record with the back camera. The nice thing, unlike with my previous Nexus 5, where I had to use the video player app, the play back can be launched from the gallery with the standard media player.
-
First of all thanks for this beautiful post. I followed all the instructions mentioned here and managed to install Ubuntu Touch OS (stable) almost effortlessly on my Xiaomi Mi A2. Here are a few things I need to put here for any to whom this would be helpful.
Error while flashing TWRP recovery:
./fastboot boot twrp-3.5.2_9-0-jasmine_sprout.img
FAILED (command write failed (No error)) finished. total time: 0.029s
After this, you will be asked(in the top left corner or somewhere in small letters) on your phone to press any button to shut down, which will simply reboot your phone.
I faced this error while I was trying to flash the TWRP recovery on my Laptop. I have a laptop that has an AMD Ryzen processor which for some reason is known to have similar issues. Although I must add that it is not uncommon to have the same error on Intel-based laptops.
SOLUTION
- Try different USB ports and preferably USB 2.0
- If you are on windows try updating your drivers. I use Linux but updating the driver has known to solve the issue.
- Use a different PC or laptop. This is the one which is you should try without wasting any more time on finding the fix for that. You will be wasting your time and will get frustrated over the issue over which have no control. I faced the same issue and lots of ways to make it work eventually I tried on a different Linux PC and it was a breeze thereafter.
I tried on a windows PC as well but it was not recognizing my device in fast boot. I tried installing a few drivers but eventually, it was way too much hassle for simple stuff
BONUS TIP:
This is a tip that might work or might not like it worked partially for me. If a similar error like the above occurs while looking for fast boot devices or even during TWRP recovery, try the following.- Put your phone in fastboot but do not connect via USB right now.
- On your PC/Laptop write the command which you would have done while the phone was connected. The command will say, Waiting for any device
- Now plug your phone via USB and "hopefully" it will work. If this doesn't work, go for the tested method above.
Finally thanks again for this post and I didn't need to follow any other sources to flash the Ubuntu Touch.
-
@mschmids
Indeed, thanks, it worked!
Really weird. -
Hello,
I'M on linux. after typing db sideload ./jasmine_sprout_stock_android9.zip
the process always stops in 48%Someone can helpme?
thank you,
Frédéric -
@fredo333 If you reboot the device, does it boot into Android? When I sideload a ROM through TWRP it always gets to 47~49% and tells me it is successful. I reboot and it will boot fine into Android.
-
@mrt10001 After repeating many times the same operation, it worked. I Do not how, but it worked. Thank you for your answer.
Best regards,
Frédéric -
Hi, I just installed Ubuntu Phone on a Xiami A2, the experience has been somewhat bittersweet. I followed scream314's instructions, they are very detailed. I have had some difficulties with the slots. The first time you can install Android9 in a slot but already then I could not reload TWRP and therefore install Android9 in the other slot. Now when I run the command on slot info it tells me.
jv@mx-hpa6613 /h/shared> fastboot getvar current-slot
getvar:current-slot FAILED (remote: 'unknown command')
Finished. Total time: 0.001sjv@mx-hpa6613 /h/shared> fastboot --set-active=b
fastboot: error: Device does not support slotsSince I installed Androis9 in slot b the 'fastboot boot' or fastboot flash' commands do not work. With the same cable, the same pc and usb2 as before I was able to do it.
I tried to reinstall Android 10, I downloaded the .zip and .tgz files but I have not managed to get the phone to take them what commands to use?
I have also followed the information from
https://forums.ubports.com/post/73137
but I can't get itSince I installed Android9 I get a warning when starting the mobile,
'the boot loader is unlocked and software integrity cannot be saved. Any data stored on the device may be available to attackers. Do not store any sensitive data on the device.'Even so I tried to use the installer, the deb package, the latest version. Surprisingly the installation was completed. I still get the warning about the bootloader and the androidone logo. But Ubuntu Phone works
How could I go back to the original system and reinstall? to solve the problem of the slots.
-
@josevidal said in UBports "quick" and "simple" install on Xiaomi Mi A2:
Since I installed Android9 I get a warning when starting the mobile,
'the boot loader is unlocked and software integrity cannot be saved. Any data stored on the device may be available to attackers. Do not store any sensitive data on the device.'That is completely normal.