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

[Treble][GSI] Ubuntu touch for Oneplus 3/3T

Search This thread

slash.tux

Senior Member
Jul 25, 2010
71
53
https%3A%2F%2Fmiro.medium.com%2Fmax%2F1400%2F0%2AxXfO04nJkRitzXe6


Code:
/*
 * Your warranty is now void.
 *
 * I am not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this ROM
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at me for messing up your device, I will laugh at you.
 */

What is Ubuntu Touch?
Ubuntu Touch is the touch-friendly mobile version of Ubuntu.
This operating system is developed and maintained by UBports: An international community of passionate volunteers.
This means Ubuntu Touch is 100% community driven and independent.

What is Halium?
Halium is the collaborative project to unify the Hardware Abstraction Layer for projects which run GNU/Linux on mobile devices with pre-installed Android.

How it is a GSI?
First of all, I should mention ubports GSI definition is different from android, but both are generic.
ubports root file system was always generic and works for most cases, but devs were porting halium system image to add device-specific (HALs and configs) support to ubports Android container.
But after project treble which introduced in android 8, all device-specific parts of android system image moved to vendor partition and we can use "Generic system images" over one vendor partition.
In halium version 9, we use this adventure and have a totally generic system image + root file system.

Requirements:
The only Requirement of booting this GSI is having Halium patched kernel.
Keep in mind having android 9 firmware installed on the device as GSI base is mandatory

What's needed ?


  • Ubports GSI image are required

Installation steps:

- Download:
  • Recovery : twrp-op3treble-3.3.1-1.img : there
  • LineageOS 16 Ubuntu touch custom : there
  • Firmware 9.0.6 : oxygenos-9.0.6 be careful the firmwares are device specific : there
  • Download the latest GSI zip from there
  • Download the Halium-ramdisk there
  • Download the halium-boot.img there
  • Download the OP3_GSI_Fix_V1.1.zip there

- Reboot into fastboot and install the TWRP recovery => Check the official link for installation TWRP link
- Treblelize your OP3(t), by following the information there : https://forum.xda-developers.com/on...eble-lineageos-15-1-treble-oneplus-3-t3830455
- Reboot into the TWRP Recovery
- Update the firmware
- Install LineageOS 16 Ubuntu touch custom
- Reboot into Lineage, confirm everything works fine.
- Ensure your /vendor (after mounting) is populated with content from an Android 9 ROM (LineageOS)
- Flash the GSI zip file
- Flash the halium-boot.img from before to your boot partition (if you didn't yet):
Code:
adb push ~/Halium/out/target/product/oneplus3/halium-boot.img /tmp/
adb shell "dd if=/tmp/halium-boot.img of=/dev/block/bootdevice/by-name/boot"
Or
Code:
fastboot flash boot out/target/product/oneplus3/halium-boot.img
- Flash the halium-ramdisk.zip
- Flash the fix for OP3 : OP3_GSI_Fix_V1.1.zip
- Reboot
- Enjoy


What's work:
Audio
Calling
SMS
4G - Yes but no icons - need to activated once after GSI is flashed
Wifi - Need a fix to restart it see the github repo
GPS
Vibration
Orientation sensor
Bluetooth
camera - zooming is sluggish
Video recording/decoding
Fingerprint + home button calling the dash <= Sweet !

What's Missing:
GSM tends to crash time to time on low signal.
Flash light
ADB/MTP - replaced by SSH
Libertine - didn't try yet
Anbox - Not tried yet
others ?



Thanks to :
https://forum.xda-developers.com/on...eble-lineageos-15-1-treble-oneplus-3-t3830455
https://forum.xda-developers.com/pr...development/gsi-ubuntu-touch-ubports-t4110581
And Ubports team : https://ubports.com/
 
Last edited:

Sbodezzi

Senior Member
Jul 5, 2013
74
23
Hi, thanks for this port.
What's the differences between this gsi build and the official build that flash with ubports-installer?
 

slash.tux

Senior Member
Jul 25, 2010
71
53
Hi, thanks for this port.
What's the differences between this gsi build and the official build that flash with ubports-installer?

Hello Sorry, I didn't see your reply.
It's a good question, I'm trying to maintain both port, as a quick glance :
- Official Ubports is based on halium 7.1 based on lineage 14.1.
- Ubports GSI is based on halium 9 based on lineage 16.0.

The first one doesn't need partition modification while the second requires the dedicated vendor partition.
On the other side installing via the ubports installer is annoying sometime due to the partition management of oneplus3. (The same to format to install lineage)

Experience wise, the GSI tends to be smoother than the official Ubports on the other side the update (edge = unstable) on the GSI are currently coming randomly depending on Erfan works. I don't know in the future how this will be handle. GSI doesn't have OTA while Official ubports yes.

Hardware wise the GSI has the advantage to have : Video recording, fingerprint reading, incall volume working, on the other side there are some bugs graphic/touch glitch, no data icon etc...

Some bug listed in the github repository, I found a fix and now I need to create a script post GSI install.

I personally prefer to use daily the GSI due to the feeling to be smoother.
A good video describing this port : https://www.youtube.com/watch?v=UyOcQtNDZwM
 

Sbodezzi

Senior Member
Jul 5, 2013
74
23
Hello Sorry, I didn't see your reply.
It's a good question, I'm trying to maintain both port, as a quick glance :
- Official Ubports is based on halium 7.1 based on lineage 14.1.
- Ubports GSI is based on halium 9 based on lineage 16.0.

The first one doesn't need partition modification while the second requires the dedicated vendor partition.
On the other side installing via the ubports installer is annoying sometime due to the partition management of oneplus3. (The same to format to install lineage)

Experience wise, the GSI tends to be smoother than the official Ubports on the other side the update (edge = unstable) on the GSI are currently coming randomly depending on Erfan works. I don't know in the future how this will be handle. GSI doesn't have OTA while Official ubports yes.

Hardware wise the GSI has the advantage to have : Video recording, fingerprint reading, incall volume working, on the other side there are some bugs graphic/touch glitch, no data icon etc...

Some bug listed in the github repository, I found a fix and now I need to create a script post GSI install.

I personally prefer to use daily the GSI due to the feeling to be smoother.
A good video describing this port : https://www.youtube.com/watch?v=UyOcQtNDZwM
Thank you for your exhausting answer.
It seems worth taking a ride ?
 

zaryasa

New member
Nov 21, 2020
1
0
stuck at oneplus logo

EDIT:

Now it works!!!!!!!!!!!!!!!! I made the Format Data with TWRP and then flashed the boot image by fastboot. It seems like the path is wrong, I think the right path for the dd would be /dev/block/by-name/boot. But now it works!




Hello all,

I am not totally new to the whole flashing thing but also not an expert so please excuse some lack of knowledge.

But I tried now several times this instrucions and got some issues fixed by myself, but always I end up with a stucked boot logo.

Flash TWRP treble -> treblized -> flash LOS 16.0 treble - > Updated Firmware with op3.zip (more to that later) -> flash LOS 16.0 Ubuntu -> check if LOS works -> Flash halium-boot.img with adb -> Flash GSI -> flash halium-ramdisk.img -> flash GSI Fix -> Reboot

So my first question, and sorry for my dumbness, but what is meant by " - Update Firmware " ? Are there maybe some more detailed instructions for that ?
Because what I did was downloaded the linked git repository, and then I zipped the files wich were inside the op3 folder only. And this zip I "installed" with TWRP. But that felt always kida wrong so maybe thats my issue. But what else I have to do?

The second thing I noticed is that the command for flashing the boot.img with adb points to "/dev/block/bootdevice/by-name/boot" but "bootdevice" seems to be a file if I got to FileManager within TWRP. The only place where a "boot" file is located at my device is "/dev/block/by-name/boot" so should I use this path instead then?

Besides that I didn´t do "Format Data" before flashing the boot.img like it mentioned in the linked description. But not this thread here so I was not sure if I will destroy something by formatting....

I hope you can help me :)

And pls apologize my bad language
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 9
    https%3A%2F%2Fmiro.medium.com%2Fmax%2F1400%2F0%2AxXfO04nJkRitzXe6


    Code:
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */

    What is Ubuntu Touch?
    Ubuntu Touch is the touch-friendly mobile version of Ubuntu.
    This operating system is developed and maintained by UBports: An international community of passionate volunteers.
    This means Ubuntu Touch is 100% community driven and independent.

    What is Halium?
    Halium is the collaborative project to unify the Hardware Abstraction Layer for projects which run GNU/Linux on mobile devices with pre-installed Android.

    How it is a GSI?
    First of all, I should mention ubports GSI definition is different from android, but both are generic.
    ubports root file system was always generic and works for most cases, but devs were porting halium system image to add device-specific (HALs and configs) support to ubports Android container.
    But after project treble which introduced in android 8, all device-specific parts of android system image moved to vendor partition and we can use "Generic system images" over one vendor partition.
    In halium version 9, we use this adventure and have a totally generic system image + root file system.

    Requirements:
    The only Requirement of booting this GSI is having Halium patched kernel.
    Keep in mind having android 9 firmware installed on the device as GSI base is mandatory

    What's needed ?


    • Ubports GSI image are required

    Installation steps:

    - Download:
    • Recovery : twrp-op3treble-3.3.1-1.img : there
    • LineageOS 16 Ubuntu touch custom : there
    • Firmware 9.0.6 : oxygenos-9.0.6 be careful the firmwares are device specific : there
    • Download the latest GSI zip from there
    • Download the Halium-ramdisk there
    • Download the halium-boot.img there
    • Download the OP3_GSI_Fix_V1.1.zip there

    - Reboot into fastboot and install the TWRP recovery => Check the official link for installation TWRP link
    - Treblelize your OP3(t), by following the information there : https://forum.xda-developers.com/on...eble-lineageos-15-1-treble-oneplus-3-t3830455
    - Reboot into the TWRP Recovery
    - Update the firmware
    - Install LineageOS 16 Ubuntu touch custom
    - Reboot into Lineage, confirm everything works fine.
    - Ensure your /vendor (after mounting) is populated with content from an Android 9 ROM (LineageOS)
    - Flash the GSI zip file
    - Flash the halium-boot.img from before to your boot partition (if you didn't yet):
    Code:
    adb push ~/Halium/out/target/product/oneplus3/halium-boot.img /tmp/
    adb shell "dd if=/tmp/halium-boot.img of=/dev/block/bootdevice/by-name/boot"
    Or
    Code:
    fastboot flash boot out/target/product/oneplus3/halium-boot.img
    - Flash the halium-ramdisk.zip
    - Flash the fix for OP3 : OP3_GSI_Fix_V1.1.zip
    - Reboot
    - Enjoy


    What's work:
    Audio
    Calling
    SMS
    4G - Yes but no icons - need to activated once after GSI is flashed
    Wifi - Need a fix to restart it see the github repo
    GPS
    Vibration
    Orientation sensor
    Bluetooth
    camera - zooming is sluggish
    Video recording/decoding
    Fingerprint + home button calling the dash <= Sweet !

    What's Missing:
    GSM tends to crash time to time on low signal.
    Flash light
    ADB/MTP - replaced by SSH
    Libertine - didn't try yet
    Anbox - Not tried yet
    others ?



    Thanks to :
    https://forum.xda-developers.com/on...eble-lineageos-15-1-treble-oneplus-3-t3830455
    https://forum.xda-developers.com/pr...development/gsi-ubuntu-touch-ubports-t4110581
    And Ubports team : https://ubports.com/
    2
    Hi, thanks for this port.
    What's the differences between this gsi build and the official build that flash with ubports-installer?

    Hello Sorry, I didn't see your reply.
    It's a good question, I'm trying to maintain both port, as a quick glance :
    - Official Ubports is based on halium 7.1 based on lineage 14.1.
    - Ubports GSI is based on halium 9 based on lineage 16.0.

    The first one doesn't need partition modification while the second requires the dedicated vendor partition.
    On the other side installing via the ubports installer is annoying sometime due to the partition management of oneplus3. (The same to format to install lineage)

    Experience wise, the GSI tends to be smoother than the official Ubports on the other side the update (edge = unstable) on the GSI are currently coming randomly depending on Erfan works. I don't know in the future how this will be handle. GSI doesn't have OTA while Official ubports yes.

    Hardware wise the GSI has the advantage to have : Video recording, fingerprint reading, incall volume working, on the other side there are some bugs graphic/touch glitch, no data icon etc...

    Some bug listed in the github repository, I found a fix and now I need to create a script post GSI install.

    I personally prefer to use daily the GSI due to the feeling to be smoother.
    A good video describing this port : https://www.youtube.com/watch?v=UyOcQtNDZwM