[ROM][UBports GSI] Ubuntu Touch for Poco F1 [Pie Based][Alpha 2][Unofficial][Updated]

amn1987

Senior Member
Jan 20, 2017
486
105
43
Bhubaneswar
Hi brothers and sisters,

there is something I wanted to share with you. I was looking for a Linux phone which can run 24*7 to aquire sensor data. There is a problem with battery life of Linux phones when they are always running. I found an usb-c adapter, which fits to the Poco F1, which has an usb-c adapter, a usb 3 and a HDMI adapter. I made some pictures of the adapter when attached to the Poco F1:

https://forum.pine64.org/showthread.php?tid=10886&page=2

there is a connector for an external power bank, and with the HDMI and the usb ports, you can use the Poco F1 as a mobile Linux computing platform which can easily be connected to an external monitor and keyboard.

Thanks for your attention, and good luck with coding.
Very interesting.
Have you tested whether HDMI-out works or not?
Also does the device actually draw power from the powerbank? From what I read in OTG mode the device cannot be charged. Only a few older Samsung devices had this feature.
Edit: From what little I understand Linux in mobile should be much less cumbersome going forward.
 
Last edited:

Marella ram_youtubr

Senior Member
May 25, 2016
102
15
18
Hyderabad
after installing it I did apt upgrade and restartd my phone,from then ui stopped working so i connected it to my pc and used ssh and also wifi stopped working, Later i did reverse internet to phone and installed xfce and tried vnc.Vnc is working good but i need wifi,

sorry for bad english

any idea
 

Peter Gamma

Senior Member
Oct 5, 2019
98
1
18
github.com
Very interesting.
Have you tested whether HDMI-out works or not?
Also does the device actually draw power from the powerbank? From what I read in OTG mode the device cannot be charged. Only a few older Samsung devices had this feature.
Edit: From what little I understand Linux in mobile should be much less cumbersome going forward.
Many questions have to be answered. Is Linux that picky? I did not test it yet for Linux. A similar usb-c adapter works for the Linux PinePHone as HDMI out. Why to choose OTG mode?
 

Peter Gamma

Senior Member
Oct 5, 2019
98
1
18
github.com
The PinePhone works with usb-c dock:


HDMI, usb keyboard and mouse are working. Someone mentioned also ethernet. If charging is not working with this adapter, then I have to find another solution. I'm looking for a Linux phone which runs 24*7 to acquire sensor data. Maybe I have to tear down a phone and solder and usb charger cable?
 

Dead Pool Brasil

Senior Member
Feb 14, 2017
95
4
8
Will try bro. I am currently trying to run mainline linux in poco f1. We got display, touchscreen, gpu, wifi, audio working on postmarketos + phosh ui. Some ideas getting even calls working. Most of the work was done by linaro guys. I m more interested on working on that to be frank. Anyways i ll give this an update next month :good:
Are you still testing postmarketos on the Poco F1? What doesn't work?
 

Zatsando

Member
Oct 16, 2017
10
2
3
Thanks for sharing, your experience is very helpful. I m a Linux enthousiast as well, and I m very interested in the Poco F1. But I still don t know whether to choose Xiami Redmi 7 or Poco F1. According to the Ubports community, the Redmi 7 has high maturity values. But what does that mean? And how mature is Poco F1?. I suppose whe have to test it.
I don't exactly know what maturity values means for the ubuntu touch community. Maybe it means how well the software communicates with the Redmi 7 hardware, you have to look it up. I choose F1 mainly because it has flagship specs (still a beast after 2 years) and has a huge community behind it because its very cheap nowdays (depends on your region).
 

Peter Gamma

Senior Member
Oct 5, 2019
98
1
18
github.com
Hello Sir verry big **** OK
I have Linux mint on my Eliteboock!!!!!!!!!!!!!!!!

Youtube Video not from Poco
It is not from Poco, I know, but the PinePhone is not far away. Martijn Braam commented on his youtube channel:

«USB-C connectors don't have OTG, that's strictly for USB-B devices. Charging works fine with the USB-C connector and the PinePhone».
 

amn1987

Senior Member
Jan 20, 2017
486
105
43
Bhubaneswar
It is not from Poco, I know, but the PinePhone is not far away. Martijn Braam commented on his youtube channel:

«USB-C connectors don't have OTG, that's strictly for USB-B devices. Charging works fine with the USB-C connector and the PinePhone».
That doesn't sound right as I have successfully connected pen drives, USB card readers even ext. HDDs with my F1.
 
Mar 19, 2015
46
17
28


View attachment 5153867

Ubuntu Touch for Poco F1

This rom is based on Ubuntu Touch linux distribution which uses halium as its hardware abstraction layer. Its not a typical android ROM. Ubuntu Touch is a mobile version of the Ubuntu operating system that was originally developed by Canonical Ltd. and is now being developed by the UBports community.

More can be read here : UBports Link & Halium Link

THIS ROM IS IN ALPHA STAGE. In short, it's not meant to be your daily driver, you may face many bugs.

Code:
#include <std_disclaimer.h>

/*
* Your warranty is now void.
*
* We are 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 us for messing up your device, we will laugh at you. Hard & a lot.
*
*/
Changelogs:
Alpha 2:
  • Fixed battery drain issue. Should get multi-day standby now
  • Now using Lineage based kernel rather than Mi original kernel. So we got relatively new patches compared to older build

What Works
  • Wifi
  • Bluetooth
  • Mobile Data
  • Calls
  • Audio
  • GPS
  • Fingerprint
  • Sensors

What Doesn't Work Properly
  • Dual Sim usage. Sometimes calls on sim 1 crash with dual sims. Best config is a single sim on slot 2.
  • The wifi driver doesnt go into sleep mode leading to battery drain when left on for a long time. (Fixed in Alpha 2 release)
  • Overall Reliability. This is an early/initial effort to run linux on Poco F1. Expect lot of bugs.

You can track the overall porting status here


Instructions
Requires Unlocked Bootloader and Custom Recovery (TWRP recommended). Backup your files. We will be doing a clean installation.

1. Wipe Dalvik/ART Cache, Cache, System, Data.
2. Download Android Pie firmware V11.0.5.0 from here and install it from twrp.
3. Download and install the UNOFFICIAL Lineage-16.0 (Pie) from twrp (I built it from source since OFFICIAL pie builds are no longer available from lineage website).
4. After installing lineageos, FORMAT DATA from twrp. (Your Internal Storage will be wiped)
5. Download the latest UBports GSI image from here and copy it to your device and install the zip file from twrp.
6. Download the latest halium-boot image from here
7. You can copy it to device, and use "Install Image" option in twrp to install the halium-boot.img to the Boot partition.
or
7. You can use your computer to flash the halium boot image using fastboot.
8. Reboot to the system. Ubuntu should boot.
9. Both the default username and password is "phablet". You can change it later from terminal using `passwd` command as in linux os.
10. To install the proper camera app, open the terminal app in the phone
OR connect your phone to the computer with USB and `ssh [email protected]`
and run the following commands (Internet Required)
Code:
wget https://static.peat-network.xyz/junk/ubports/com.ubuntu.camera_3.1.2+gstdroid3_armhf.click

pkcon install-local --allow-untrusted com.ubuntu.camera_3.1.2+gstdroid3_armhf.click
Thats it!

Downloads
Firmware (Pie) V11.0.5.0 - https://xiaomifirmwareupdater.com/archive/firmware/beryllium/
Lineage-16.0 (Pie) - https://download.lineageos.org/beryllium
UBports GSI by Erfan Abdi- https://build.lolinet.com/file/halium/GSI/
Halium Boot kernel - https://github.com/ubports-beryllium/android_kernel_xiaomi_sdm845/releases

Issues/Bug Reports
Feel free to report issues here: Github. Do attach the below logs for debugging:
kernel log:
Code:
dmesg
syslog:
Code:
cat /var/log/syslog
logcat:
Code:
sudo -s

LD_LIBRARY_PATH=/system/lib64 lxc-attach -e -n android -- /system/bin/logcat
You can also reach out to the respective telegram group mentioned below for support.

Contribute
Do contribute to the project by helping in fixing bugs, adding features and testing. You can reach out to the community through

Credits
@erfanoabdi for his work on the Ubuntu Touch GSI. You can read his XDA thread on UBports GSI here
@geekyneo for helping in testing and bug reports.
@notkit, @RealDanct12
UBports and Halium Community for their extraordinary work and support.


Hack, Have Fun and Peace!
(This is my first ever thread in XDA, pardon my ignorance if any;))

XDA:DevDB Information
UBports Beryllium, ROM for the Xiaomi Poco F1

Contributors
jodev
Source Code: https://github.com/ubports-beryllium

ROM OS Version: 9.x Pie
ROM Kernel: Linux 4.x
ROM Firmware Required: V11.0.5.0 from https://xiaomifirmwareupdater.com/archive/firmware/beryllium/
Based On: Ubuntu Touch, LineageOS

Version Information
Status:
Alpha

Created 2020-07-14
Last Updated 2020-11-04
Thank you for your hard work
 
  • Like
Reactions: jodev

Peter Gamma

Senior Member
Oct 5, 2019
98
1
18
github.com
No one could convince me either, that Poco F1 is not for daily use. I ve read that flashing is a bit more tricky than for the Xiaomi Redmi 7 Onclite, for instance. I can live with a reboot every now an then.
 

amn1987

Senior Member
Jan 20, 2017
486
105
43
Bhubaneswar
No one could convince me either, that Poco F1 is not for daily use. I ve read that flashing is a bit more tricky than for the Xiaomi Redmi 7 Onclite, for instance. I can live with a reboot every now an then.
Here's a video showing beryllium running mainline kernel 5.9 albeit Android (12)
Kernel trees have been published. It ought to augur well for Linux development.
 

jodev

Member
Mar 25, 2020
26
99
23
Update Guys. So i earlier worked on trying to get official builds over here: https://gitlab.com/ubports/community-ports/android9/xiaomi-poco-f1/xiaomi-beryllium

But i was having issue with mobile data not working in official builds. Part of the reason why i didnt proceed with it after trying hard to fix it.

But recently, got to know about a workaround! Its to related to this. ubports/ubuntu-touch#1657.

Steps to fix mobile data issue in official builds:
  • Turn off the mobile data.
  • ssh/open terminal app and run
  • Code:
    /usr/share/ofono/scripts/set-context-property 0 Protocol ip
  • Turn on mobile data.
Its a one time fix. it seems to persist after reboots. so first time after installation, we might have to do this temporarily. they ll eventually fix though!

For those who want to try out Official Ubports Build:
If few of you can test this, confirm its working fine and report here, i can update the post and release the official version and add support for flashing beryllium using the official UBports installer software. Thank you guys for your interest and support!
 
Last edited:

S.M.R.T

Member
Dec 18, 2020
35
9
18
Update Guys. So i earlier worked on trying to get official builds over here: https://gitlab.com/ubports/community-ports/android9/xiaomi-poco-f1/xiaomi-beryllium

But i was having issue with mobile data not working in official builds. Part of the reason why i didnt proceed with it after trying hard to fix it.

But recently, got to know about a workaround! Its to related to this. ubports/ubuntu-touch#1657.

Steps to fix mobile data issue in official builds:
  • Turn off the mobile data.
  • ssh/open terminal app and run
  • Code:
    /usr/share/ofono/scripts/set-context-property 0 Protocol ip
  • Turn on mobile data.
Its a one time fix. it seems to persist after reboots. so first time after installation, we might have to do this temporarily. they ll eventually fix though!

For those who want to try out Official Ubports Build:
If few of you can test this, confirm its working fine and report here, i can update the post and release the official version and add support for flashing beryllium using the official UBports installer software. Thank you guys for your interest and support!
Thanks Mr.

can i flash with official recovery ....the
ub ports recovery.....and after reboot recovery
the boot and system image....
without fastboot....

regards
 

S.M.R.T

Member
Dec 18, 2020
35
9
18
Hello Sir
  • make sure you have android 9 firmware and vendor (by installing lin-16)
  • fastboot flash system system.img
  • fastboot flash boot boot.img
  • fastboot flash recovery ubports-recovery.img
  • reboot. thats it!
  • IMAGE DONT BOOT UP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone