How to build Nougat version of e/os?

Dear all

I would like to try e/os on my Samsung S5 mini SM-800H (kmini3g), an ancient device from 2015. Latest stock rom is Android 6. Repos for device, kernel and vendor can be found on Github for CM-14.1. So I thought I could build the respective e release for nougat.
But, having built several versions of e for Android 10/11 before, my building system (Ubuntu 20.4) seems not to be compatible with the old sources any more.
Any suggestions on how to do it the easy way? Should I use the Docker images (I never used that before)? Or do I have to reconstruct a historical setting fit to build nougat?
Is it possible at all (without a Phd in AOSP/Lineage/CM ROM building)?

Thanks for any advice!

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

1 Like

Ok, I take from Week 12, 2022 : Development and Testing Updates

Issues with device still on Oreo or Nougat

We are facing build issues with devices still stuck on Oreo and Nougat. The attempt is to check which can be upgraded. If not possible, we will have to stop supporting those specific devices.

So, the build system is broken for Android 7 and cannot be fixed? I assume that the Docker image then won’t work as well, right? Well, I hoped by choosing the right tag from https://gitlab.e.foundation/e/os/releases I would be able to init a repo consistent for building something like v.21.1-nougat… But apparently it is not so easy…

I don’t think that is the case: I have been able to make unofficial nougat builds for several Sony devices, with no problems, for /e/OS versions up to 0.21. I haven’t tried with 0.22 or 0.23 yet, but I don’t foresee any problems. I build using the builde.sh script from here, amended with the following environment variables

export CCACHE_SIZE=300G
export RELEASE_TYPE='UNOFFICIAL'
export BRANCH_NAME='v0.21-nougat'
export INCLUDE_PROPRIETARY=true
export DEVICE_LIST='taoshan,nicki,ivy'
export LC_ALL=C

That script picks up the scripts that do the actual work from the /e/ Docker CI/CD repo

1 Like

my building system (Ubuntu 20.4) seems not to be compatible with the old sources any more

sorry for topic revive - did a nougat build recently and saw some devices old 3.x kernels need a small yacc/bison fix to continue to compile with gcc10+ - some kernels still received the fix, but then the branch was deprecated with Lineage and some device kernels are still without the correction.

If someone runs into

/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x50): multiple definition of `yylloc'

apply this change (for kernels <4.14 in _shipped suffixed file, in 4.14<5.6 in the real source files, not shipped… but as those are active branches they received that)

--- a/scripts/dtc/dtc-lexer.lex.c_shipped
+++ b/scripts/dtc/dtc-lexer.lex.c_shipped
@@ -637,7 +637,7 @@ char *yytext;
 #include "srcpos.h"
 #include "dtc-parser.tab.h"
 
-YYLTYPE yylloc;
+extern YYLTYPE yylloc;

You can build cm-14.1 / nougat easily with current distributions java/gcc versions - but you’ll need to have java+javac from openjdk-8 installed and set as default for Android 7. Ubuntu+Debian can have jdks in parallel and switched via update-alternatives. Later Androids from 8 come with prebuilt java anyway.

2 Likes

I was also curious if it is possible to still build Nougat versions of /e/OS. And yes, it is possible :slight_smile:

For this cause I setup a virtual machine with Ubuntu version 18.04
Then installed all requirements for be able to build lineageOS / eOS.
I used the repo way as I do still for my current /e/OS builds.

Important is that one use OpenJDK 1.8 and Python 2.
There are how-to’s how to configure to be able to use different Java and python versions and with using following commands one can switch between the versions:

sudo update-alternatives --config python
sudo update-alternatives --config java

I faced following issues which I could address:

Flex issues
Fixed with using command:
export LC_ALL=C

Jack SSL issues
After the two steps below were applied, the AOSP was successfully built.

Remove TLSv1, TLSv1.1 from jdk.tls.disabledAlgorithms in /etc/java-8-openjdk/security/java.security file
Restart the jack server: cd /prebuilts/sdk/tools/ ./jack-admin kill-server ./jack-admin start-server or reboot computer…

This is often shown when using LineageOS 14.1 and running out of memory:
export ANDROID_JACK_VM_ARGS=“-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4G

One need to switch sometimes between python 2 and python 3, because building requires python 2 but repo and other commands needs python 3

Update: It is also possible to build for Oreo and Pie! One needs to switch then the java version.

4 Likes

I did not find working sources for nougat for the S5mini (kmini3g).
I found sources for Pie, Q and R.
I tried building for Q but could not finish build.

https://xdaforums.com/f/galaxy-s5-mini-android-development.3300/

Here you find a local manifest:
https://xdaforums.com/t/rom-9-0-unofficial-g800h-lineageos-16-0-28-03-2022.4423021/

I found a manifest for 14.1, but this did not work for me (breakfast did not find device).
<manifest><project name="CM-Kmini3g/android_device_samsung_kmini3g" path="device/samsung/kmini3g" remote="github" revision="cm-14.1" /><project name="CM-Kmini3g/android_device_samsung_msm8226-common" path="device/samsung/msm8226-common" remote="github" revision="cm-14.1" /><project name="CM-Kmini3g/android_kernel_samsung_kmini3g" path="kernel/samsung/kmini3g" remote="github" revision="cm-14.1" /><project name="CM-Kmini3g/android_vendor_samsung_kmini3g" path="vendor/samsung/kmini3g" remote="github" revision="cm-14.1" /><project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="cm-14.1" /><project name="LineageOS/android_device_samsung_qcom-common" path="device/samsung/qcom-common" remote="github" revision="cm-14.1" /><project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" revision="cm-14.1" /><project name="LineageOS/android_hardware_samsung" path="hardware/samsung" remote="github" revision="cm-14.1" /><project name="LineageOS/android_external_sony_boringssl-compat" path="external/sony/boringssl-compat" remote="github" revision="cm-14.1" /><project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" revision="cm-14.1" /><project name="LineageOS/android_packages_apps_FlipFlap" path="packages/apps/FlipFlap" remote="github" revision="cm-14.1" /></manifest>

Here are respective repositories:
https://github.com/orgs/CM-Kmini3g/repositories