@mschmids
Indeed, thanks, it worked!
Really weird.
Posts
-
RE: UBports "quick" and "simple" install on Xiaomi Mi A2
-
RE: UBports "quick" and "simple" install on Xiaomi Mi A2
@danilo748
Try opening it from here: https://github.com/ubports-xiaomi-sdm660/artifacts/releases/tag/v0.1
(Note: download was extremely slow for me.) -
RE: UBports "quick" and "simple" install on Xiaomi Mi A2
@danilo748
Did not test it excessively, but works fine with my Xiaomi Mi Basic 2 BT earbuds and the range is surprisingly good, it was playing music without any glitch 2 rooms away (~10 meters and 2 walls) from the phone.
I have an Android head unit in my car, the phone was able to connect to it, but did not try anything else yet. -
RE: UBports "quick" and "simple" install on Xiaomi Mi A2
@scream314 said in UBports "quick" and "simple" install on Xiaomi Mi A2:
- Camera is not working for me, I was able to open the app once, but after trying to take a photo it froze and I cannot even open it anymore (not even after reboot). (Edit: it seems to be an AppArmor permission issue:
****** ****** kernel: [ ******] audit: type=1400 audit(******): apparmor="DENIED" operation="open" profile="com.ubuntu.camera_camera_3.2.3" name="/proc/******/mountinfo" pid=****** comm="camera-app" requested_mask="r" denied_mask="r" fsuid=****** ouid=******
)
I listened to my instincts, after uninstalling, then reinstalling the app I can take pictures with both cameras.
Video is still not working, if I start the recording the timer starts to count, but the screen is frozen. After hitting stop, the timer stops, but nothing happens, the whole app freezes, and the video si not saved. - Camera is not working for me, I was able to open the app once, but after trying to take a photo it froze and I cannot even open it anymore (not even after reboot). (Edit: it seems to be an AppArmor permission issue:
-
RE: UBports "quick" and "simple" install on Xiaomi Mi A2
@messayisto
What I did to get it working:- System Settings>Security & Privacy>Fingerprint ID
- recorded my fingerprint(s, actually 2, both working)
- System Settings>Security & Privacy>Lock security>choose "Fingerprint"
I'm using the "stable" channel,
OTA-19
, UBports20210910-30030
, Device image20210910-14383
, Device buildlineage_halium_arm64-userdebug 9 PQ3A.190801.002 278 test-keys
. -
RE: UBports "quick" and "simple" install on Xiaomi Mi A2
Experience (after a half day)
- Much better than the Plasma Phone version I tried some time ago.
- Speed is ok.
- Fingerprint reader is working, surprisingly accurate and fast.
- Camera is not working for me, I was able to open the app once, but after trying to take a photo it froze and I cannot even open it anymore (not even after reboot). (Edit: it seems to be an AppArmor permission issue:
****** ****** kernel: [ ******] audit: type=1400 audit(******): apparmor="DENIED" operation="open" profile="com.ubuntu.camera_camera_3.2.3" name="/proc/******/mountinfo" pid=****** comm="camera-app" requested_mask="r" denied_mask="r" fsuid=****** ouid=******
) - Setting up a Libertine container takes forever (idk how long, it is still installing). (Edit: eventually it was done, but all the few apps I tried to launch in it are not working.)
- Anbox: no luck yet (
***** anbox: Failed to mount "/home/phablet/anbox-data/rootfs": No such device
)
-
UBports "quick" and "simple" install on Xiaomi Mi A2
Sorry for starting a new thread, but I struggled a lot finding the right steps, so this might help someone (or at least the future me).
Preparations
I was using MacOS something (should not matter).
I already had some old-ish version ofplatform-tools
(adb
,fastboot
& co), the version should not matter, as long as it is from this decade. (See the note later aboutmke2fs
on MacOS.)Stuff downloaded:
vendor.img
(https://github.com/ubports-xiaomi-sdm660/artifacts/releases/download/v0.1/vendor.img; a newer one gave me checksum error)- TWRP (https://eu.dl.twrp.me/jasmine_sprout/twrp-3.5.2_9-0-jasmine_sprout.img.html; I tried different versions, but this one worked fine; also tried the stock recovery, but it was complaining about the new build being older)
- Android 9 stock image (https://github.com/ubports-xiaomi-sdm660/artifacts/releases/download/v0.1/jasmine_sprout_stock_android9.zip; as I was starting from 10)
- installer (https://devices.ubuntu-touch.io/installer/dmg)
Steps
Unlocked bootloader by becoming "a developer", enabled USB debug and OEM unlock, then booted in Fastboot, then
./fastboot flashing unlock ./fastboot flashing unlock_critical
If if gets locked again (it dod for me somehow), just check status with
./fastboot oem device-info
and unlock what is locked...Booted in TWRP from Fastboot
./fastboot boot ~/Downloads/twrp-3.5.2_9-0-jasmine_sprout.img
TWRP asks about mounting stuff read-only, I just went with "no".
Not sure about wiping any cache/data, as my phone was empty, I just wiped everything if I got stuck, might not be necessary.
The phone has 2 "slots" (A & B). I had to install Android 9 on both. (You can check the active slot with./fastboot getvar current-slot
, and select a slot with./fastboot --set-active=<a|b>
, but as TWRP installs the new image on the passive slot and makes it active after, I just repeated the steps again to install Android 9 on the other slot.)
Then in the TWRP menu I went with "Advanced">"ADB Sideload", then./adb sideload ./jasmine_sprout_stock_android9.zip
Wait.
Reboot into Fastboot, then TWRP.
Repeat.
Thanks to Apple's "security" at this point I had to do a./fastboot -w
to runmke2fs
and get it blocked by MacOS, then allow it from "System Preferences">"Security and Privacy", otherwise the UBports installer might fail.Finally on stock Android 9, I started the UBports installer, followed the steps exactly, and got UBports installed.
Misc notes
- Neither "Mi Unlock Tool", nor "rooting" was necessary.
- For some reason after a point the device was detected as
jasmine
, I did not care, just selected "Xiaomi Mi A2" from the list. - I tried to use
vendor.img
from the latest stable artifacts (https://github.com/ubports-xiaomi-sdm660/artifacts/releases/tag/20211023), it gave me a checksum error, but as I was retrying a few times after using thevendor.img
the installer says, idk if it would work or not. - If the phone bootloops/etc. don't panic, just go back to Fastboot and repeat.
- At one point my PC did not detect the phone in Fastboot, but doing a random combination of "phone restart", "USB unplug/plug" and factory reset using the stock recovery fixed it, idk...
- Getting into the menu of the stock recovery is tricky, I do not have any good advice. My technique is to press power+vol up/down furiously until the menu appears