[UNOFFICIAL BUILD] Xiaomi Mi Mix 3 (perseus)

Hi,

This build is UNTESTED, I don’t own this device !
As usual, please take one or more backup(s) of your working device and ensure you can restore.

I am not responsible for what can happen, from the appliance catching fire to the cat scratching your mother-in-law :smiley:

Please share you feedback :handshake:

0.17 Q build (23 May 2021) : https://www.androidfilehost.com/?w=files&flid=325574 (logs included).

XDA thread : https://forum.xda-developers.com/t/rom-10-unofficial-lineageos-17-1-for-perseus.4076533/ (links to device & kernel source code included)

Proudly built using /e/ Docker , script :

#!/bin/bash
docker pull registry.gitlab.e.foundation/e/os/docker-lineage-cicd:community
docker run \
-v "/srv/src:/srv/src" \
-v "/srv/zips:/srv/zips" \
-v "/srv/logs:/srv/logs" \
-v "/srv/ccache:/srv/ccache" \
-v "/srv/mirror:/srv/mirror" \
-e "BRANCH_NAME=v1-q" \
-e "DEVICE_LIST=perseus" \
-e "REPO=https://gitlab.e.foundation/e/os/releases.git" \
-e "ANDROID_JACK_VM_ARGS=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx20G" \
registry.gitlab.e.foundation/e/os/docker-lineage-cicd:community

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

2 Likes

Hi, Thank you for the build and your time. After testing it on my device, I had noticed some issue using camera app. Actually it doesn’t open at all but stays stuck in loading I think. Other than this, I haven’t noticed any major issue yet.

Thank you very much for your feedback ! :blush:

Camera issues seem common by these days, not only for this device :frowning:

I’ll dig into that as soon as I have free time, meanwhile could you please try :

Hi, Thank you for your reply.
I’ve tried those two solutions but none of them are working.
Footej give me a error message regarding camera service which is unavailable

Someone from a MIX3 group on Telegram told me to send you those links which seems to be the only way to fix camera issues:
https://review.arrowos.net/c/ArrowOS/android_device_qcom_sepolicy/+/10896
https://review.arrowos.net/c/ArrowOS/android_device_arrow_sepolicy/+/10895

I hope it can help you to fix this and maybe for other devices you had the issues :slight_smile:

1 Like

Thank you !

I’ll take a close look ASAP (but not before next week-end …).

Good news, I was able to acquire a second-hand device :slight_smile:
So I will be able to test by myself and improve the build image.

After days and weeks of testing builds in the little free time I have, I can finally come back with a new 0.17 Q version, with a working camera! :smile_cat:

Next week I’ll switch from my good old Mi Mix 2 to conduct complete tests as a daily driver, you’re welcome to join !

Here is the link : https://www.androidfilehost.com/?fid=14943124697586360930

To “clean” flash over another ROM or Android version (you will lose your datas !) :

  • boot to TWRP
  • wipe cache + Dalvik + System
  • format Data
  • adb copy zip file to /sdcard
  • install with TWRP

For a “dirty” flash (from /e/ Q) you can only install then wipe cache + Dalvik.

Please be aware that the GPS can take a loooong time to acquire a decent location, and may not use BeiDou/Galileo. I’ll work on that later.

About the camera fix : @answer35 was totally right, thanks ! :slight_smile:
I’ll explain later this week how I applied it to /e/ building system (it is quite simple).

So far, so good : everything is working fine :slight_smile:

I’ll post the build method as soon as I’ve some free time …

How to build with camera fix (warning : time-consuming method !) :

Hints :

  • qva is in src/Q/device/qcom/sepolicy/
  • dynamic & vendor are in src/Q/device/lineage/sepolicy/
  • repo or git commands will not override your changes, nor synchronize other files anymore; thus I recommend to start over with a clean src tree for each new build

They are more efficient (in matter of time) ways to build this ROM, but I found the Docker way much more easier for others to reproduce :wink:

1 Like

Unfortunately, I won’t be able to enhance GPS :frowning:
/e/ is relying on LineageOS Xiaomi kernel, which is somehow behind latest Xiaomi releases.
It would be too much work for me to fork LOS tree and merge latest Xiaomi kernel :woozy_face:

I could confirm (hiking in France) that U.S. GPS is working fine, along with Radiocells.org location module instead of Mozilla’s one (because of the offline database :wink: ).

Today I got the 4th button (at left of screen) on duty :smile_cat:

Quite simple :

  • reboot to TWRP
  • mount System partition r/w (may have to play with TWRP settings if mounted r/o)
  • get key mapping file with adb pull /system/usr/keylayout/gpio-keys.kl
  • with a text editor (I used Notepad++), change Android key code for : key 689 VOICE_ASSIST (I’ve put key 689 APP_SWITCH for testing)
  • put back key mapping file with adb push gpio-keys.kl /system/usr/keylayout/
  • ensure (adb shell) that file is “-rw-r--r-- 1 root root
  • unmount System partition
  • reboot system
  • enjoy :partying_face:

Android key code for APP_SWITCH : KeyEvent  |  Android Developers
AFAIK, every KEYCODE_*** in the list can be mapped to (remove the KEYCODE_ header), of course some won’t do anything on a phone :wink:
You may try, for example :

  • Music Player (MUSIC)
  • Call (CALL)
  • Contacts (CONTACTS)
  • Screenshot (SYSRQ)
  • Mute/Unmute Media Volume (VOLUME_MUTE)
  • Play/Pause Media (MEDIA_PLAY_PAUSE)
  • Next Media (MEDIA_NEXT)
  • Recent Apps (APP_SWITCH)
  • Open/Close Quick Settings (QPANEL_ON_OFF)
  • Internet Browser (EXPLORER)
  • Calendar (CALENDAR)
  • Calculator (CALCULATOR)

Thanks to original author and Mi MIX 3 community Telegram group !