Porting Ubuntu Touch (@UBPorts) to tenshi (BQ Aquaris U Plus)

  • Since early 2018, I've been working on porting Ubuntu Touch on tenshi, a mid range BQ Aquaris U Plus, commercialized with Android 6, thus suitable to work with Halium-7.1.
    See the HAL port specific details: https://github.com/Halium/projectmanagement/issues/54.

    The device is equipped with:

    • 5" HD 1280x720 screen, 294 HDPI
    • 3GB RAM,
    • 32 Gb ROM (in my case),
    • Qualcom(c) Snapdragon(c) 430 (msm8937) up to 1,4GHz

    as in his specs page (https://store.bq.com/en/aquaris-u-plus-2-gb).

    Nowadays the device has reached an interesting level of support, as the following features works well:

    • Kernel 3.18.31 for armv7l
    • Graphical User Interface, with unity8 (8.17+ubports5+0) and mir (0.24.20ubuntu11) for 32 bits libraries,
    • Data connection: up to 4G (depending on your Mobile Network Operator, but here in Spain tested either with Movistar and Vodafone),
    • wifi (embedded in the kernel, not as module,
    • Audio (and extrenal output with jack): thanks to pulseaudio and recent pulseaudio-modules-droid-24 development,
    • GPS: it passes test_gps and shows its location using Ubuntu Touch Platform API,
    • Screen rotation, using Ubuntu Touch Platform API, too. Rotation block also works,
    • SMS: inbound and outbound fully working, and notifications appear in the menu,
    • Ofono: audio in inbound and outbound calls work works out-of-the-box
    • test_sensors produces a congruent output,
    • Power, Volume up and down buttons
    • Printscreen by pressing at the same time Volume+ and Volume- during 2-3 seconds
    • Bluetooth: works
    • Apparmor patch applied and working
    • Dual SIM enabled
    • Notification partially works (for teleports, for instance)

    Note: NOT NEEDED ANYMORE just before a call, manually run

    phablet@ubuntu-phablet:~$  pactl set-card-profile droid_card.primary voicecall && pactl set-sink-port sink.primary_output output-parking && pactl set-sink-port sink.primary_output output-speaker && pactl set-sink-volume sink.primary_output 200

    from terminal as phablet to activate audio in calls

    Lxc contained is fully working.

    Still to improve:

    • LEDs: manually working, but no sign of them to be used with notifications,
    • Camera and Video decoding,
    • Sound playback form media-hub (e.g. ringtones notification from inbound calls)

    Still to test:

    • Anbox: binder already enabled in kernel, /dev/binder and /dev/ashmem created

    At this moment it has been successfully tested with:

    (updated on 2019-11-19)

    Since I am still working on some features, please, run as root the following script after connecting via ssh: fix_prop.sh

    I personalized JBBgameich's halium-install script to be functional for tenshi:

  • thank you for your great work, is a good phone to port to UT, has many improvements over other phones already ported, thank you very much Guf...


  • You can find the proper resources:

    I personalized JBBgameich's halium-install script to be functional for tenshi:

    Feel free to provide any comment and to contribute, test, ...

  • A small guide for dummies (like me) to install from those resources. Better to work under

    mkdir $HOME/Download/UT-tenshi
    export PROJECT_ROOT=$HOME/Download/UT-tenshi
    export HALIUM_INSTALL_ROOT=$HOME/Download/UT-tenshi/halium-install
    export DEVICE=tenshi
    cd $HOME/Download/

    Copying the installation script to the project root directory

    if [ -f halium-install-tenshi.tar]; then
            mv $HOME/Download/halium-install-tenshi.tar $PROJECT_ROOT

    Untar the installation script

    tar -xvf halium-install-tenshi.tar

    Fetching the official rootfs

    wget -c https://ci.ubports.com/job/xenial-rootfs-armhf/lastSuccessfulBuild/artifact/out/ubports-touch.rootfs-xenial-armhf.tar.gz

    Please, fetch halium-boot and system.img from my repository to $PROJECT_ROOT, too

    Then, let's start:
    Download TWPR from the following page: https://eu.dl.twrp.me/tenshi/twrp-3.3.1-0-tenshi.img.html
    Set developer mode and Unlock device: accordingly with https://wiki.lineageos.org/devices/tenshi/install#
    Connect your PC with tenshi using USB cable.
    From Android running (once a developer and enabled USB debugging:

    To reboot device to bootloader from PC terminal, run:

    adb reboot bootloader

    On bootloader, from terminal:

    sudo fastboot devices

    If it returns the serial numbero of your tenshi, then:

    sudo fastboot oem unlock

    Flashing TWPR into recovery

    sudo fastboot flash recovery twrp-3.3.1-0-$DEVICE.img

    Flashing halium-boot into the boot partition:

    sudo fastboot flash boot halium-boot.img
    sudo fastboot reboot

    Stop boot process to recovery by pushing Volume up and down at the black screen menu

    ./halium-install -v -p ut ubports-touch.rootfs-xenial-armhf.tar.gz system.img

    Manually insert password (for phablet) when asked

    If the process successfully end, you then can reboot to system from TWPR and enjoy UT on your device.

    Feel free to contact me in case of doubts.

  • @Guf thanks a million for your work!

    Just to be clear, when you say:

    Please, fetch halium-boot and system.img from my repository

    Can you paste the exact links for those packages? Thanks again !!

    Edit: I assume those links are these https://forums.ubports.com/post/21498 what I mean is that'd be nice if you include that info inside your how-to 🙂

Log in to reply