Lineage OS for F(x)tec Pro1

Here are some useful links and notes on how to setup Lineage OS for your F(x)tec Pro¹ device.
Actually most of the information you need can be find on Lineage OS F(x)tec Pro¹ page.
From there you will learn how to install and build Lineage OS on your device.
Some of the tips below will be specific to Windows 10 as this is the environment I was using.

Installation

Since I had Android Studio installed already I did not need to download fastboot and adb. I just used the binaries provided with Android Studio. On my machine I could find those binaries in the following folder:
C:\Users\micro\AppData\Local\Android\sdk\platform-tools
You can find that path in Android Studio from File > Project Structure… > SDK Location.
Just add that path to your PATH environment variable to make it easier to invoke those commands from any location.

Google USB driver for fastboot

One issue I had was that fastboot could not find my device. Here is a link to F(x)tec forum explaining how to fix it.
You first need to download and install Google's USB driver. Before installation I actually needed to modify the driver INF file adding the following lines to the [Google.NTamd64] section:
android_winusb.inf:
;F(x)tec Pro1
%SingleAdbInterface%        = USB_Install, USB\VID_18D1&PID_D00D
%SingleBootLoaderInterface% = USB_Install, USB\VID_18D1&PID_D00D
As you want to install a modified USB driver you will also need to make sure Windows Test Mode is enabled.

Sideload

Past the initial Lineage recovery mode setup you will likely us and reuse the so called sideload. Sideload basically installs extra software or updates an existing package.
How to sideload a package:
adb reboot sideload
adb sideload <path-to-sideload>.zip
You will notably use it to install Google Apps and Magisk or update Lineage OS itself after doing your own build for instance.

Boot loop

If after sideloading a new ROM image you device is stuck on the animated Lineage OS logo try sideloading Gapps or possibly Magisk anew see if that help before doing a factory reset.

Google Apps

Lineage OS does not come with pre-installed Google Apps. You will need to download and sideload a Google Apps distribution of your choosing. I used MindTheGapps. That will give you access to the Google Play Store and from there you should be able to install most every app you want.

Magisk

Magisk is famously available on GitHub and lets you get root access to your device. It is mentioned here cause we will use some Magisk's extension namely MagiskHide Props Config to be able to pass SafetyNet and thus allowing us to install security conscious applications on your Lineage OS device that Google Play would otherwise not let you install.

You can sideload Magisk v23.0 by renaming the downloaded APK file with a ZIP extension. After reboot click the icon labelled Magisk in your launcher and it will prompt you to install the app that goes with it. Once the app is installed tap the puzzle piece icon to browse a list of available extensions and install MagiskHide Props Config. Go back to Magisk home screen to access the settings and enable MagiskHide.
From your PC you'll need to use that newly installed extension to setup your device identity spoof.
Run the following commands:
adb shell
su
Magisk will prompt you on your device to get give adb root access, make sure you satisfy that request.
props
Select Edit device fingerprint
Select Pick a certified fingerprint
Select Samsung
Select Samsung Galaxy S21 SM-G991B
You could try spoofing another device but for me using the F(x)tec Pro¹ identity would pass SafetyNet as reported by Magisk but some apps would still not be available in the app store.
After reboot go offline by turning on airplane mode.
Go to your device application settings and clear storage for Google Play Service and Google Play Store.
After reboot turn off airplane mode and you should have access to the full Google Play Store catalogue.

Issues

Once Lineage OS is up and running you will rapidly notice the following issues, depending of your setup and use cases of course.

Task switcher

Task switcher with keyboard open is broken unless you enable Allow Home screen rotation in Trebuchet Home application.

Gesture navigation

When using gesture navigation with the keyboard open you will get that empty bar at the bottom of your screen. It can be worked around using Fullscreen/Immersive Gestures (Q-S) Magisk extension as explained here and there. This solution has also the advantage of hiding the hide keyboard tool bar as already possible on Samsung and OnePlus devices.

Apps

Some apps will need extra step to work on your device.

Sky Go


Smart case

You want Lineage OS to lock your screen when closing your case? We have you covered with Fx Service.

Build

As mentioned above already, build instructions for Lineage OS on Pro¹ are already available. Here I'll discuss some hurdle I had to overcome to get this done on PC. I actually tried two different Linux environment to build Lineage OS on Windows. First WSL then VirtualBox running Ubuntu. I won't go into the setup of either solution there are plenty of only guides. WSL was easier to setup it seems and integrates better with Windows out-of-the-box as you Windows drives are already mounted and accessible from the Windows console. However Ubuntu on VirtualBox does have a UI compared to WSL command line only solution, that makes it easier to develop and modify source code for instance.

RAM

On WSL RAM was not an issue since I was building on a machine with 32GB. However my VirtualBox was initially setup with 8GB and that's simply not enough. Your build will fail saying you need at least 16GB. I could do a build with 18GB of RAM.

Disk space

You will need at least 300GB of disk space. Probably wise to set your upper limit to at least 400GB. Make it dynamically allocable so that you don't waste space from your host storage. Here an article on how to change maximum storage space on WSL.

Extract proprietary blob

Extraction of proprietary blob from both VirtualBox and WSL will require some extra adb setup for it to work over WiFi.

Sideload ROM

To sideload your ROM you will need to copy it from your Linux file system to your Windows file system as sideloading needs an USB adb connection. As mentioned earlier this is easily done on WSL however setting up a share with VirtualBox needs the following steps.

VirtualBox share

In your VM settings, do something like that:
1630526720110.png

Then in Ubuntu you will need to install the VirtualBox guest package and reboot it:
sudo apt-get install virtualbox-guest-x11
Finally run sudo adduser $USER vboxsf to be able to access that Windows folder from you mount point.

Development

To my knowledge, Lineage OS is using two code repositories specific to F(x)tec Pro¹, here are their GitHub mirrors and Gerrit review links:
You can easily inspect code changes on GitHub while the Gerrit reviews can give you more of an insight into what was going on through developer comments. You can also get involved with the review process.

Issue tracker

You can track current issues on GitLab.

Contribute code

Here is how to contribute code to Lineage OS.
Also if you have made local changes and pushed them to Gerrit you may want to switch back to the main branch and update your repositories, just run:
Code:
repo sync -d

ROM update

So you built a new ROM and want to update it, here is how it goes:
  • Sideload ROM
  • Reboot to recovery from Advanced menu to swap slots
  • Sideload GApps - only if you used it
  • Sideload Magisk - only if you used it
  • Reboot
Note that if you try to start Lineage after sideloading the ROM without reapplying GApps it will get stuck in a reboot loop on the Lineage logo animation.
You can fix this by sideloading GApps however some of your GApps may fails to start and will need to be reset, GMail notably.
Therefore, make sure you reboot to recovery from the advanced menu to sideload GApps on top of your new ROM.

Update Kernel only

Not tested:
Build and update kernel only:
# cd to the root of the LineageOS source tree
source build/envsetup.sh
repopick 315342
breakfast pro1
make bootimage
adb reboot bootloader
fastboot getvar current-slot
# Replace 'X' with the value of current-slot
fastboot flash boot_X out/target/product/pro1/boot.img
# Choose 'START' from the fastboot menu on the Pro1

Track down regressions

List all changes between specified dates:
repo forall -c 'git log --since "AUG 25 2021" --until "AUG 30 2021" --pretty=format:"===============================%n%Cred$(git config --get remote.github.projectname)%n%Creset%H%n%an%n%ad%n%B%n"'
 
Last edited:
Top