Everything about Ubuntu Touch on the Fairphone 5
In this entry I will document everything about using Ubuntu Touch on the Fairphone 5. I independently volunteer as a beta tester.
Many parts can be done on any Ubuntu Touch device!
This entry uses the "Everything about Fairphone 5 Modding" entry as a base and is written in the same structure:
/Blog/2023.11.13_Fairphone-5_Stuff/Fairphone-5_Stuff.html
After almost 10 years, it is nice to see the beautiful UI again. After backing up as much as possible with "Neo Backup" (TWRP still does not allow DATA backups), downloading all the packages (LinageOS, FairphoneOS 13&14 and the UT installer) and making sure the phone was fully charged, I started.
I also have opened a topic on the UBports forum with the help of "Keneda". It's a bit chaotic because I have to merge some wrongly split topics thx to me LOL. I will clone my report over there for the convenience of the devs (But my main place for ALL information will remain here :D).
I linked ALL sources, used guides and manuals and fixes from users (with names).
https://forums.ubports.com/topic/10472/beta-bug-reports-catwithcode
https://gitlab.com/ubports/porting/community-ports/android11/fairphone-5/fairphone-fp5/-/issues
Note: I test drove the Fairphone 5 with UbuntuTouch for around 17 days. Don't worry I hand a second, fully configured phone on hand just in case (And a Android Phone was ready to swap in) ;). I relyed on some Android apps to work but the main once are covered more or less, but especially the Signal installation explained below can be skipped as soon as waydroid works.
What works, what dose not:
A list of stuff I tested with last tested Status and the Tickets if any:
UPDATED: 2024.11.20
SOFTWARE: r91 - 20241109-2283
✅ WORKS | 📈 WORKS, BUT STILL TESTING | ➖ NOT TESTED YET | ⭕ ISSUES | ❌ NOT WORKING
- ✅ Install
- ✅ Setup
- ✅ Working with German SIM-CARD
- ✅ WiFi (With Network enforced Pi-Hole)
- 📈 Camera (Photo, Video, with and without Flash, Switching between cameras. Sometimes I need to reboot for it to work.)
- 📈 LTE [Works but sometimes I need to reboot for it to work]
- ✅ Alarm and Timer
- ✅ Stability
- ➖ 5G
- ➖ VoLTE
- ❌ GPS [Never got it to work]
- ✅ Battery Life - Really good! X11 App's running can consume a good bit more.
- ✅ Heat
- ✅ Snap's (Using Snapz0r - Many Apps run! BUT onscreen keyboard dose not work in general for snap on UbuntuTouch! Normal USB-Keyboards do!)
- ✅ Tap to wake
- ✅ Performance (Can be a little laggy sometimes (X11 especially). Display seems to run at 60hz (not the possible 90hz), but performance-intensive stuff like streaming 1080p@60fps is working great.)
- ✅ SMS
- ✅ CALL (2G? 3G?)
- ✅ FLASH
- ✅ Vibration
- 📈 Screen Brightness (Auto often dose not work)
- ✅ Proximity
- ✅ Rotation
- ❌ Fingerprint reader (The OS knows it dose not work)
- ⭕ USB-OTG [BUG: USB-OTG Hard Crashes Phone (2.0 WORKS! 3.0+ CABLES CRASH.)]
- ⭕ Keyboard [BUG: IT WORKS THE FIRST TIME. AFTER RECONECTING A MOUSE THE COURSER IS NO LONGER USABLE. Probably related too; USB-OTG Hard Crashes Phone (2.0 WORKS! 3.0+ CABLES CRASH.)]
- ⭕ Mouse [BUG: IT WORKS THE FIRST TIME. AFTER RECONECTING A MOUSE THE COURSER IS NO LONGER USABLE. Probably related too; USB-OTG Hard Crashes Phone (2.0 WORKS! 3.0+ CABLES CRASH.)]
- ⭕ USB-HUB (3.0 and lower) [Keyboard, Mouse and USB-Drive work]
- ✅ USB-AUDIO - Works perfectly... surprisingly.
- ⭕ USB-VIDEO [BUG: Black Screen, Then Soft-Reboot and a broken Dekstop is half visible on a 1080p display. Tested with a SteamDeck Dock. Other Docks don't work. Eventually hard crash. Probably related too; USB-OTG Hard Crashes Phone (2.0 WORKS! 3.0+ CABLES CRASH.)]
- ❌ Waydroid - [BUG: ERROR: Binder node "binder" for waydroid not found]
- ❌ NFC [Never really worked]
- 📈 Bluetooth [Works better now BUT still see's a lot of "unkown devices". Can connect with BT-Audio to some devices.]
- ✅ Libertine (Tested with Firefox and Signal-Desktop [AUDIO/MIC WORKS IF YOU INSTALL "pavucontrol".])
Lessens when working with Ubuntu Touch:
- "Libertine" and "Libertine Tweak Tool" are your way around missing apps.
- Installing with Libertine must stay in the foreground. Set your screen to never turn off and never leave the screen until its done. Libertine can be sensitive to being closed / backgrounded.
- If you rotate your phones X11 will not allow you to touch outside the original Startup Resolution. You must restart Firefox in the orientation you need for the full season. Annoying but not to bad.
- Libertine dose not run in the Background! Meaning you must keep open the Task-Tap. Also meaning: You should create a Libertine-Container for your Main App's and one for your background App's. For example Jellyfin, SuperSonic and Firefox in the MainContainer, E-Mail-Client or IRC e.g. in your Background container. Keep the windows in the Task-overview for your Background-apps always open..
- When deleting Libertine-Container files in home like configs stay behind and will not be deleted. Meaning if you broke something inside of the Apps you should delete the files inside the container and not the Container itself.
- Container take up a lot of space (each around one Linux install). Meaning you should not have more then 3. Main, Background and testing (Testing is to check if the App works. That way you don't bloat or break your main container).
- For a very limited number of apps you can use Snap. But from my testing most Programs just don't work (Firefox e.g.). Snap can not use ANY hardware (Touch, one-screen keyboard, microphone, …) which makes it very useless.
- When modding SSH is useful because keyboard. But SSH did not work out of the box. I followed the manual from UBports and it refused connections. Fix was to execute sudo /etc/init.d/ssh start. Found by "delight_aug"
- adb shell works perfectly and should be used instead of SSH.
- Special keys (like Backspace) have issues with some Terminals when using SSH or adb shell. Works when executing export TERM=vt100 inside the shell after connecting (Found by paul). Adding it to the end of the .bashrc file and exit and reconnect fixes it permanently (Still has some minor issues).
- It is possible to install .deb in Libertine-Container with the commands over at the UBports wiki. It is important to not escalate root by accidentally to the real os.
- To get root in Libertine you can follow the official way if it works for you or you execute "sudo -E bash" and then lish CONTAINER_ID into it. BE VERY CAREFUL! Found by nom.
"Pulsar33" has summarized a lot of useful information for debugging and tweaking over at the UBports forum: https://forums.ubports.com/topic/6912
- If you have done anything inside a Libertine-Container with root, you can only delete it if you change to root in the terminal and "chmod -R 777 .cache/libertine-container/focal-2/ your container. After that the Settings UI can delete it just fine.
- Libertine-Container (especially broken once, like Signal) can actually cause boot to take longer (several black screens before the password screen appears).
- MORE COMING SOON! WAYDROID LESSENS I LEARNED, COME AS SOON AS WAYDROID WORKS ON THE FAIRPHONE 5! HAVE ALREADY A FEW, BUT CAN NOT TEST THEM ON THE FAIRPHONE 5!
Snap's:
Snaps do work on the Fairphone 5. Compatibility is hit or miss.
Snaps can be enabled with the app "Snapz0r". The only issue I have is that it lets you uninstall things in ways where you don't know what is being done. It is great for installing snap and seeing whats on the phone but I installed and managed snap's with the terminal.
Snap also dose not allow hardware access which makes most apps useless.
Here are the apps I tested:
- ❌ Firefox - Did not work
- ⭕ Signal-Desktop - Did start but menu's crash the app immediately. You can connect and use Signal but Text and interactions with Calls are not possible.
Installing Signal (Desktop):
This was a lot of work. And believe me when I say: be prepared for a lot of jank.
I got Signal Desktop fully working. Yes its a bit janky to use, but keyboard, UI, Calls, Microphone, Popup-notifications (EVEN WHEN THE SCREEN IS OF FOR A LONG TIME! !BUT! only if you leave Signal, meaning: Open Signal without opening a chat (too safe battery) and then swith to a other App or simmular. Off screen detection in X11 is a little inconsistent) (Not notifications in the Ubuntu Touch notifications center) and File Browser work. Video call dose work but dose not get any feed (Probably a Libertine limitation): https://forums.ubports.com/topic/10431/
History on how I got there:
I tried to use it natively (did not work), Snap (unusable and non of the needed hardware features were accessible), and the with Libertine and Flatpak (dependencies-Hell). The last thing I wanted to try was Libertine native. Signal-Desktop is a self packaged Electron app. Meaning it has (nearly) everything it needs build in. And that guess was right! BUT to get it to work there were two issue. glibc is exactly 0.01v too old... yes that little. The second issue was to get Signal-Desktop for arm64. There is currently no official versions BUT I found a git repository that has the current version forked. They use the latest source and build it with custom build-scripts in the GitHub build pipeline. This as save as its gonna get with this amount of jank.
Signal uses more battery then it should. It uses a little less if you close it and reopen it and don't open any chats.
WARNING: THIS USES UNOFFICIAL SIGNAL FORK! It builds with the Source and just different build setups but still be careful! ALSO: YOU ARE ON YOUR OWN!
The best is to have two terminals open on your PC to be able to push and work inside the container at once.
Replace "focal-2" if your container ID is different.
THIS WILL BREAK AT SOME POINT! DEBUG CAN BE DONE WITH ENTERING THE CONTAINER AND CHECKING LOG WITH: "nano nano /home/phablet/.local/share/libertine-container/user-data/focal-2/.config/Signal/logs/main.log"
- Create a new Libertine container for signal-desktop and never install anything else inside it!
- UPDATE 2024.11.11: This setting changes the output at full system level and not only the container. Mayber just turn down the volume of the Main Speaker? :S
Install pavucontrol in the container and set the Output-Speaker to earpiece (This can/will reset on reboot. Needs to be set every reboot!).
- Get yourself a ARM64/AARCH64 build of Signal-Desktop: https://github.com/signalflatpak/signal
- Push it into the Libertine-Container: "adb push Downloads/signal-desktop_arm64.deb /home/phablet/.cache/libertine-container/focal-2/rootfs/".
- Access the Container as root: "sudo -E bash" then "lish focal-2"
- Install Signal-Desktop: "apt install /signal-desktop_arm64.deb"
- Here it gets hard to know whats better. There are two options that need to be done inside the container:
- Breaking all dependecies:
- Now comes the extremely janky breaking part. Get yourself the two libc library's Signal-Desktop's SQL implementation needs. These are the ONLY two version that worked without breaking everything. I got them from Debian. This also makes you unable to install/update/upgrade with apt. It breaks this part of the container:
- Now Push them both into the container:
- adb push libstdc++6_12.2.0-14_arm64.deb /home/phablet/.cache/libertine-container/focal-2/rootfs/
- adb push libc6_2.40-3_arm64.deb /home/phablet/.cache/libertine-container/focal-2/rootfs/
- The big issue now is that apt "respects" dependencies. To "get around that" we force it with dpkg:
- dpkg --force-all -i /libc6_2.40-3_arm64.deb
- dpkg --force-all -i /libstdc++6_12.2.0-14_arm64.deb
- Forcing the container to switch over to Debian (I tried "bookworm"):
- Now comes the extremely janky "better?" part. You need to turn the Ubuntu Container into a Debian Container. Debian has not all packages libertine-container need. Meaning it will ask you to use autoremove (DON'T! IT WILL BREAK ALL LIBERTINE-CONTAINERS AND YOU NEED TO REMOVE AND REINSTALL THEM ALL!):
- Change the Repository to Debian (I used the first one I saw on the page. Don't copy paste. DO IT YOURSELF TO MAKE SURE ITS UP-TO-DATE). Replace the URL and the current Version: nano /etc/apt/sources.list
-
#deb http://ports.ubuntu.com/ubuntu-ports focal main
#deb http://ports.ubuntu.com/ubuntu-ports focal-updates main
#deb http://ports.ubuntu.com/ubuntu-ports focal universe
#deb http://ports.ubuntu.com/ubuntu-ports focal-updates universe
#deb http://ports.ubuntu.com/ubuntu-ports focal multiverse
#deb http://ports.ubuntu.com/ubuntu-ports focal-updates multiverse
deb http:// .org/debian bookworm main non-free-firmware
deb-src http://deb.debian.org/debian bookworm main non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main non-free-firmware
- Now try to update: apt update
- You will get an error. You need the Debian Keys. Copy all keys missing and add them to the command (Replace all keys from me. They are probably are old and invalid):
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 54404762BBB6E853 BDE6D2B9216EC7A8 0E98404D386FA1D9 6ED0E7B82643E131 F8D2585B8783D481 0E98404D386FA1D9 6ED0E7B82643E131
- apt update and apt full-upgrade
- The only issue I faced was libc-bin. I could not install. I could for it to with the following:
- Downloading the current build (libc-bin_2.36-9+deb12u9_arm64): https://packages.debian.org/bookworm/arm64/libc-bin/download
- Extracting the Data Folder inside and pushing them into the Container:
- adb push etc/ /home/phablet/.cache/libertine-container/focal-2/rootfs/
- adb push sbin/ /home/phablet/.cache/libertine-container/focal-2/rootfs/
- adb push usr/ /home/phablet/.cache/libertine-container/focal-2/rootfs/
- adb push var/ /home/phablet/.cache/libertine-container/focal-2/rootfs/
- Then I pushed the current build to the container and installed it normally with apt. This time it worked.
- adb push libc-bin_2.36-9+deb12u9_arm64.deb /home/phablet/.cache/libertine-container/focal-2/rootfs/
- apt install /libc-bin_2.36-9+deb12u9_arm64.deb
- apt update, apt upgrade and apt full-upgrade
- Do it in this order. It can also happen that you need to install a package manualy. And then it could happen that you need to use "apt --fix-broken install" (read!, then execute). Just get it to a point where it says 0 updates available.
- I said yes to every overwrite and then exited and reentered the container.
- If you forgot to change the output to earpiece, you can use pavucontrol from a other Container (They change the full system output) or you can fix it with these commands (pavucontrol must be installed in evey Container that should output audio, but in this container the UI for settings changes crashes after the "Debian swap"):
- apt install pulseaudio-utils
- Exit out of the container and root and then reenter the container.
- pactl list sinks
- You should find "Sink #1" with it's output "output-earpeace". Use it.
- pactl set-sink-port 1 output-earpiece
- Now everything needed to be installed should be done.
- Open "libertine-tweak-tool" and select your container and set DPI to 149
- Now you can use a different phone (IPhone, Android or an Android-VM with a WebCam) to connect your account.
- Wait for two minutes for syncing and the force close Signal and reopen it.
- Now you open the Settings at the bottom left and the change the scaling to 150%. Dropdown menus are broken and to be able to set them connect a keyboard and open the menu with a mouse or touch and then use Tap to navigate to the menu points and use the arrow keys to change your selection.
- Go into the Settings and in the permissions-area in general set "Allow access to microphone". Same for camera.
- It can be handy to use a mouse and make the chat-bar so small it becomes an icon-bar. Press right and left mouse button at the same time and pull it fast to the left multiple times.
- DONE!
Current known Issues:
- UPDATE 2024.11.10: You can get "somewhat" around the sending issue. Type enough so the "Expand Text Box Arrow" is usable (or move you finger around the text box a little (up works very often), for some reason the arrow shows up then too), press it and now you can press the blue send button to the right. It is far FAR from working / good but it works for now. That also allows selecting and then "overwriting" the current text. That can be considered as a "backspace" workaround.
---
Sending Text without a external Keyboard is broken because Enter and backspace dose not get processed by Signal-Desktop. As far as I can tell that could be fixed with a custom layout that has CTRL and the other modifiers. I'm currently looking into the Keyboard's source code. I do not know yet if creating such a layout is possible (maybe based on the emoji keyboard?): :
- Loading Images is currently broken. It has to do with the "fs-extra" library Signal-Dekstop uses that falsely thinks it could not create a file. This is fixed in a full fork of Signal-Dekstop but this fork is far behind main and uses it's own forked source code. Integration of the patch should be easy but I don't have much experience with GitHub's workflow pipeline yet:
THIS IMAGE IS EDITED! EVERYTHING WAS WORKING NORMALLY! JUST REMOVED INFORMATION!
Installing a usable Browser (FULL FIREFOX):
Installing as usable browser is possible with Libertine.
Open Libertine and create a new Container, open view and show log. Then wait until nothing happens anymore for 2 minutes. Then install the package "Firefox". Make sure to open the container and show the shell log while it is doing its thing. After it is done and Firefox (and VIM...) is in your Homemenu you can install a other app called "pavucontrol". Open it once. After that you can start Firefox. It will be way to small and unusable. You need to do a few modifications to fix that. We will fix the scaling, the UI and a few other things.
When changing the UI connect a mouse to right click or make precise inputs can be helpful. You must configure the UI now because later Firefox will crash when moving UI elements. Make everything as large as possible (density) and remove all elements you don't need. Add resize to the bookmarkbar and set it to always be visible. The enable TitelBar to make the Titelbar go away (LOL). If you need a reference, an image is at the end of this section.
Fixes:
- Use the Terminal and nano into the file "/home/phablet/.cache/libertine-container/focal/rootfs/usr/share/applications/firefox.desktop" and add env MOZ_USE_XINPUT2=1 in every exec command inside the Desktop file. That enables full touchscreen support. Found by moodroid.
- UI and Scaling: Using "Libertine Tweak Tool" setting DPI to 149. Then in Firefox open “about:config” and set perpx to 1.4. This works really well together with the "MOZ_USE_XINPUT2" touch fix. This makes the UI very usable but breaks a some Website Sizes. This can be mitigated by adding the size widgets to the bookmarkbar. Then you can just resize the page.
- Performance: Easy. Install uBlock Origin and leave it at the default Settings. More aggressive is better but cost to much battery on a phone. Stuff like Firefox-Strict-Mode also helps.
- Disable Keyboard auto-features. Meaning: Spell checking, Auto correction, Word suggestions, Auto capitalization and Auto punctuation. It breaks inside Libertine-Containers. I know that these are nice features but as long as waydroid is not working you will have to relay more on Libertine for some apps and that means setting everything up to work with at as well as possible.
- Thats it! Now firefox works great.
This is how Firefox looks when everything was done right:
Installation:
I had LinageOS installed, so I flashed the Stock Android 13 Rom (Android 14 was already out but the installer wants Android 13. It is very important to use the right Android Version).
I use Arch (BTW.) and used the official UBports Installer. It did all the udev stuff for me and flashed the phone without any issues.
I use a very good USB 3.2 cable that came with a SanDisk SSD (I think something like "SanDisk Extreme Portable" or along those lines.). It's short, it's annoying, but it's the only USB-C cable I trust with stuff like this. I hate the inconsistency with USB-C cables.
I had so many issues in the past with OEM cables or even good ones that were out of spec. If you ever have problems with low level flashing, it could be the cable. Try different ones until you find a reliable one.
https://devices.ubuntu-touch.io/installer/
Sources: