How-to: Use lineage-UL (ultra legacy) sources for /e/OS builds

How-to: Use lineage-UL (ultra legacy) sources for /e/OS builds

Works on /e/OS-S (LOS19) and /e/OS-T (LOS20), does not work (yet) for /e/OS-U (LOS21)

  1. Download /e/OS-S or /e/OS-T repos
  2. Download LineageOS-UL · GitHub sources for LOS19 or LOS20

LOS20:

LOS19:

The losul.xml shows which packages are available. You don’t need all packages, but I do not have the time to find out so I replaced all EXCEPT of android_vendor_lineage.
For LOS19 you also do not need to replace android_frameworks_base. You can do it, but you will get same build errors than in LOS20.
Do not replace android_vendor_lineage, keep it. Do not forget to copy the .git folder also if you replace manually.

There are not 2 build issues you need to take care of (if you use LOS19 without replacing android_frameworks_base you have one build error)

One build error (LOS 19 and LOS20) is related to OTA_ANON_HASH.
packages/apps/Updater/src/org/lineageos/updater/UpdatesCheckReceiver.java
packages/apps/Updater/src/org/lineageos/updater/misc/Utils.java

One can fix it by changing in /vendor/lineage/config/common.mk the following entry:

Lineage packages

PRODUCT_PACKAGES +=
LineageParts
LineageSettingsProvider
LineageSetupWizard
Updater

Change to:

Lineage packages

PRODUCT_PACKAGES +=
LineageParts
LineageSettingsProvider
LineageSetupWizard

This means that updater module and local update possibility wont be available anymore. I can live with that because my unofficial build do not offer OTA anyway and there are other ways to update the ROM.

The second one is related to SENTRY_USERID:

packages/apps/LineageParts/src/org/lineageos/lineageparts/utils/EUtils.java
packages/apps/LineageParts/src/org/lineageos/lineageparts/BootReceiver.java
packages/apps/Settings/src/com/android/settings/deviceinfo/firmwareversion/SentryDetailPreferenceController.java

Here you can either comment respective section out or replace SENTRY_USERID with a constant like SENTRY_USERID = “sentry_userid”;

There are surely much smarter ways of fixing, but I opted for a quick and dirty solution by now which works for me.
Any help is of course highly appreciated to streamline the LOS-UL emplacement and fixing the 2 build issues.

UPDATE:

I could resolve both issues now and also include full microG support (LOS20, /e/OS-T).

I just replaced the following base framework LOS-UL with the current eOS files from framework: base

frameworks/base/core/java/android/provider/Settings.java
→ This will fix both build issues

services/core/java/com/android/server/pm/ComputerEngine.java
services/core/java/com/android/server/pm/AppsFilterImpl.java
services/core/jni/Android.bp
services/core/jni/com_android_server_pm_ComputerEngine.cpp
services/core/jni/onload.cpp
core/api/current.txt
core/res/AndroidManifest.xml
core/res/res/values/strings.xml
→ This will include full microG support. I don’t know if you need all of them but did not have the time to find out

Also for LOS19 based (/e/OS-S) this are the steps to adapt framework base:
frameworks/base/core/java/android/provider/Settings.java
→ This will fix both build issues

core/res/AndroidManifest.xml
core/res/res/values/strings.xml
services/core/java/com/android/server/pm/PackageManagerService.java
services/core/jni/com_android_server_pm_PackageManagerService.cpp
services/core/jni/Android.bp
services/core/java/com/android/server/pm/AppsFilter.java
→ This will include full microG support. I don’t know if you need all of them but did not have the time to find out

So it seems /e/OS build with Lineage-UL sources are now pretty easily possible!

5 Likes

So nice Ron !
Did you ever build a rom based on LOS-UL ?

Yes, a couple now. For example latest Samsung S6 /e/OS-T builds as well as Samsung Tab S2 latest /e/OS-T builds…and some more!

Is there something to diff them in your SourceForge ?

No, but when I post them here I usually state that LOS-UL sources were used too

Adapted framework base and vendor lineage for /e/OS-S and /e/OS-T UL builds can now be found here: