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

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

Search This thread

itagizade

Member
Aug 3, 2021
22
6
Azerbaijan, Baku
Xiaomi Mi 8
It is global and after I install Ubuntu touch the screen never response to touch even in twrp
You installed UT using Installer or fastboot as said in here? Im not aware of issues with touchscreen outside of UT(even in UT it works), so it's either your hardware problem. Try installing stock MIUI(real stock MIUI, not Xiaomi.eu). If it didn't work, then it's your hardware problem not related to UT.
 

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. UBports Installer config PR finally merged, but only Global versions are supported, since firmware files that are flashed by Installer are for Global. If you do install, be sure to flash vendor and firmware packages for your variant after.

    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(be aware that this Vendor+Fw is for Global, if your Device is Chinese or Russian variant, or any other, flash vendor package according your phone variant). 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.

    Note2: if you get bootloop, wipe system, format data, restart bootloader, flash everything again, but before rebooting to system try flashing SELinux permissiver. And don't flash Magisk, it's useless, and may destroy your system.

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

    Join Telegram support group if you need any help.

    See all supported devices at official website.

    P.S. Since you have to use fastboot, and UBports Installer uses fastboot, there may be some difficulties for Ryzen CPU users. I attached zip file with executable (.bat file). It will allow you use fastboot with USB 3.x + Ryzen. Unpack it. And run .bat file as admin. Reboot. Voila, fastboot works as should.
    Linux users should either use another laptop with Intel CPU, or flash from Windows, or use USB 2.0 hub.

    P.S.S. Ok, I managed to get GitHub CI to work, so now if any of you want to test fixes and new features, head to this GitHub repo, and download artifacts from "Make OTA images"(in Actions tab), and flash them using fastboot.
    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 :)