• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][UNOFFICIAL][Pie][Dipper][Halium][PORT]Ubuntu Touch port for Xiaomi Mi 8

Search This thread

itagizade

Member
Aug 3, 2021
7
5
Xiaomi Mi 8
View attachment 5376913
What is it? What is Ubuntu Touch?
Ubuntu Touch, as comes from naming, is Ubuntu managed to run on phone.
Well, Canonical abandoned it, so community organization, UBports, now develops, maintains, and ports UT to new devices.

And this is what the thread is about. The amount of devices able to run UT was 63(as written on website at the time of writing this post). But now it is 64 devices.
The 64th port to Xiaomi Mi 8.🥳

So, lets talk now what works, and what is not(you will also be able to see that on website, as soon as merge request will be accepted).
What works:
  • Actors​
    • Manual brightness(auto seems not supported by UT, idk)​
    • Notification LED​
    • Vibration​
    • Torchlight​
  • Camera​
    • Flashlight​
    • Photo​
    • Video​
    • Switch between front and rear cameras​
  • Cellular​
    • Carrier info​
    • Calls​
    • SMS​
    • Audio routings (switching between main speaker, and phone speakers)​
    • Volume control​
  • Misc
    • Battery percentage
    • Online charging(while phone is on, or in sleep/standby state)
    • UBports recovery
  • Network
    • WiFi(2.4GHz, 5GHz)
    • Bluetooth
    • Hotspot(partially, seems that 5G is not supported)
    • Flight Mode
  • Sensors
    • Fingerpring
    • GPS
    • Rotation
    • Touchscreen(ofc, otherwise I would write this post)
  • Sound
    • Microphone
    • Earphones
    • Loudspeaker
    • Volume Control
  • USB
    • ADB
    • MTP

Several things, are not tested, such as Wireless Display, NFC, SIM PIN Unlock, MMS, Dual SIM.

Non working features are Offline Charging, Auto-brightness, Proximity Sensor(you need to click the Power Button, that won't stop the call).


Big thanks to TheKit who helped me with the port.
TheKit's Gitlab and UBports forum profile.

Right now, config for UBports Installer is waiting approval of pull request, and merge request for
devices.ubuntu-touch.io is still not approved, you will have to do everything manually.

WARNING! YOU MUST HAVE UNLOCKED BOOTLOADER! EVERY THING YOU DO, YOU DO ON YOUR RISK, IF YOU BRICKED DEVICE, THATS YOUR FAULT, NOT MY! I DO NOT TAKE ANY RESPONSIBILITY FOR YOUR BRICKED DEVICE!

Preparations before installation.
  1. Flash TWRP recovery
  2. You need to download and flash stock firmware and vendor from Android 9, MIUI V11.0.6.0.PEAMIXM. It is compressed into ZIP file, so you will have to flash it though TWRP. Do not use adb sideload, push file to any directory you want, and install it from phone.
  3. Download boot.img, system.img, recovery.img from here.
  4. In TWRP go to "Wipe" ==> "Format Data" ==> Type "yes" ==> Enter. Then go to Reboot ==> Recovery. After restarted. Again go to Wipe ==> Advanced Wipe, and select all partition except USB-OTG
Now we have two ways of installation, from TWRP, and from Fastboot.
  • TWRP
    1. On PC:
      Code:
      $ adb push system.img /tmp
      $ adb push boot.img /tmp/

    2. Now go to "Install"
    3. Get to /tmp/ directory
    4. "Install Image"
    5. Flash boot.img to Boot partition, system.img to System.
    6. Then reboot to system.
    7. If system works, reboot to TWRP again and push recovery.img to /tmp/, then flash it to Recovery partition.
  • Fastboot method:
  • Code:
    #Simple as that
    $ fastboot flash boot boot.img
    $ fastboot flash system system.img
    $ fastboot flash recovery recovery.img
    #Flash recovery only after you are sure system works.
Optionally you can adjust your panel so it doesn't look weird. Rn idk how to move panel below the notch(display cutout, I hate Apple for that). It moves buttons in Panel below, and adjusts height of the panel. This repo will do everything for you. Just download it to device. And run apply-notch-hax.sh. It will automatically find device name, apply patches, and restart Unity.

Note: run the script as standard user, not root.

Device source: Gitlab
Kernel source: Gitlab
Gitlab CI build artifacts: Gitlab

See all supported devices at official website.
 
Last edited:

nSKN3i

New member
Aug 4, 2021
2
1
Amazing work! I've always wanted to port UBTouch to Mi 8 but I couldn't get WiFi and mobile data to work on my attempts. As my primary phone, I needed it to be online as much as possible. Really happy to be able to use it on our devices :)

I've noticed an issue (I haven't managed to recreate this however):
- The OS can't switch between audio outputs, for example I need to restart my phone to hear sounds from loudspeaker after making a phone call. Please let me know if there's a workaround for this issue.


I'll be looking out for more issues to report. Once again, thanks for this port it's amazing :)
 
Last edited:
  • Like
Reactions: itagizade

sadynx

New member
Aug 11, 2021
1
0
this amazing work. i have ran some x11 app on my phone,jt works. now i can say hava a pc in my pocket . one problem i found is system partion size too small (only 3g), this not enough if i want install more linux package lije chrome firefox
 

masterbook25

Member
May 4, 2014
37
0
40
Macapá-Ap
Xiaomi Mi 8
it is still complex for my level of knowledge to install this rom on my Mi 8 and it is with great joy that we have a port like this from Ubuntu Touch and that in the future it will be easier to install and maybe other ports as well as SailfishOS in the menu. Mi 8 great job Dev.
 

venomus001

Senior Member
Nov 25, 2013
211
46
OnePlus 3T
Xiaomi Mi 8
hey i was wondering about file system can we use f2fs ?
I tried installing apk files but getting error
Also notch fix gives me this error in terminal

EDIT: nevermind the apk i forgot to run anbox-tool install
EDIT2: nevermind notch fix i just pushed the file to downloads and run sh command
 

Attachments

  • PXL_20210831_100224770.jpg
    PXL_20210831_100224770.jpg
    2.7 MB · Views: 69
Last edited:
Aug 27, 2018
17
7
Athens
www.youtube.com
Amazing work! It is the fastest rom I have ever installed! The SIM PIN unlock works well and the offline charging partially (approximately, five minutes after connecting the charger). I hope NFC works, too. In the future, it would be nice if apply-notch-hax.sh was fixed (error, line 57). Anyway, thank you for porting and providing this rom!


For Waydroid support, there are some instructions here. To start the container service, use the following command:

Code:
sudo waydroid container start
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    View attachment 5376913
    What is it? What is Ubuntu Touch?
    Ubuntu Touch, as comes from naming, is Ubuntu managed to run on phone.
    Well, Canonical abandoned it, so community organization, UBports, now develops, maintains, and ports UT to new devices.

    And this is what the thread is about. The amount of devices able to run UT was 63(as written on website at the time of writing this post). But now it is 64 devices.
    The 64th port to Xiaomi Mi 8.🥳

    So, lets talk now what works, and what is not(you will also be able to see that on website, as soon as merge request will be accepted).
    What works:
    • Actors​
      • Manual brightness(auto seems not supported by UT, idk)​
      • Notification LED​
      • Vibration​
      • Torchlight​
    • Camera​
      • Flashlight​
      • Photo​
      • Video​
      • Switch between front and rear cameras​
    • Cellular​
      • Carrier info​
      • Calls​
      • SMS​
      • Audio routings (switching between main speaker, and phone speakers)​
      • Volume control​
    • Misc
      • Battery percentage
      • Online charging(while phone is on, or in sleep/standby state)
      • UBports recovery
    • Network
      • WiFi(2.4GHz, 5GHz)
      • Bluetooth
      • Hotspot(partially, seems that 5G is not supported)
      • Flight Mode
    • Sensors
      • Fingerpring
      • GPS
      • Rotation
      • Touchscreen(ofc, otherwise I would write this post)
    • Sound
      • Microphone
      • Earphones
      • Loudspeaker
      • Volume Control
    • USB
      • ADB
      • MTP

    Several things, are not tested, such as Wireless Display, NFC, SIM PIN Unlock, MMS, Dual SIM.

    Non working features are Offline Charging, Auto-brightness, Proximity Sensor(you need to click the Power Button, that won't stop the call).


    Big thanks to TheKit who helped me with the port.
    TheKit's Gitlab and UBports forum profile.

    Right now, config for UBports Installer is waiting approval of pull request, and merge request for
    devices.ubuntu-touch.io is still not approved, you will have to do everything manually.

    WARNING! YOU MUST HAVE UNLOCKED BOOTLOADER! EVERY THING YOU DO, YOU DO ON YOUR RISK, IF YOU BRICKED DEVICE, THATS YOUR FAULT, NOT MY! I DO NOT TAKE ANY RESPONSIBILITY FOR YOUR BRICKED DEVICE!

    Preparations before installation.
    1. Flash TWRP recovery
    2. You need to download and flash stock firmware and vendor from Android 9, MIUI V11.0.6.0.PEAMIXM. It is compressed into ZIP file, so you will have to flash it though TWRP. Do not use adb sideload, push file to any directory you want, and install it from phone.
    3. Download boot.img, system.img, recovery.img from here.
    4. In TWRP go to "Wipe" ==> "Format Data" ==> Type "yes" ==> Enter. Then go to Reboot ==> Recovery. After restarted. Again go to Wipe ==> Advanced Wipe, and select all partition except USB-OTG
    Now we have two ways of installation, from TWRP, and from Fastboot.
    • TWRP
      1. On PC:
        Code:
        $ adb push system.img /tmp
        $ adb push boot.img /tmp/

      2. Now go to "Install"
      3. Get to /tmp/ directory
      4. "Install Image"
      5. Flash boot.img to Boot partition, system.img to System.
      6. Then reboot to system.
      7. If system works, reboot to TWRP again and push recovery.img to /tmp/, then flash it to Recovery partition.
    • Fastboot method:
    • Code:
      #Simple as that
      $ fastboot flash boot boot.img
      $ fastboot flash system system.img
      $ fastboot flash recovery recovery.img
      #Flash recovery only after you are sure system works.
    Optionally you can adjust your panel so it doesn't look weird. Rn idk how to move panel below the notch(display cutout, I hate Apple for that). It moves buttons in Panel below, and adjusts height of the panel. This repo will do everything for you. Just download it to device. And run apply-notch-hax.sh. It will automatically find device name, apply patches, and restart Unity.

    Note: run the script as standard user, not root.

    Device source: Gitlab
    Kernel source: Gitlab
    Gitlab CI build artifacts: Gitlab

    See all supported devices at official website.
    1
    Amazing work! I've always wanted to port UBTouch to Mi 8 but I couldn't get WiFi and mobile data to work on my attempts. As my primary phone, I needed it to be online as much as possible. Really happy to be able to use it on our devices :)

    I've noticed an issue (I haven't managed to recreate this however):
    - The OS can't switch between audio outputs, for example I need to restart my phone to hear sounds from loudspeaker after making a phone call. Please let me know if there's a workaround for this issue.


    I'll be looking out for more issues to report. Once again, thanks for this port it's amazing :)