Lineage 15.1 Build For Athene: Multiple Errors

gamemaker1

New member
Mar 6, 2020
4
0
0
Hello developers!

I am a newbie to XDA and also a newbie to ROM development, so if I am doing anything wrong, please do tell me. I own a Motorola Moto G4 Plus and I am very ready to invest as much time as needed in building and creating ROMs for this phone.

I am currently building LineageOS for this phone, and once that is done, I want to try my hand at porting Lineage 16 to this device. I had recently successfully built the cm-14.1 branch for this device (which seems to be the only official build for athene, see the LineageOS Wiki https:// wiki.lineageos.org/ devices/athene/ build#initialize-the-lineageos-source-repository). Now, I downloaded the code for LineageOS 15.1 onto my Linux computer (running Ubuntu 19.04) and have tried to build it.

Steps I took to build -
- Initialised repo with repo init.
- Synced the repository to my Linux computer with
Code:
repo sync -c --no-tags --no-clone-bundle -j24
- Created .repo/local_manifests/roomservice.xml for the device tree, kernel, etc. with the following content:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="LineageOS/android_device_motorola_athene" path="device/motorola/athene" remote="github" revision="lineage-15.0" />
  <project name="LineageOS/android_kernel_motorola_msm8952" path="kernel/motorola/msm8952" remote="github" revision="lineage-15.0" />
  <project name="TheMuppets/proprietary_vendor_motorola" path="vendor/motorola" remote="github" revision="lineage-15.0" />
  <project name="LineageOS/android_device_qcom_common" path="device/qcom/common" remote="github" revision="lineage-15.0" />
  <project name="LineageOS/android_external_bson" path="external/bson" remote="github" />
  <project name="LineageOS/android_external_stlport" path="external/stlport" remote="github" />
  <project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" />
</manifest>
- Ran
Code:
repo sync -c -j24
- Then ran
Code:
export ROOMSERVICE_BRANCHES="lineage-15.0"
to specify a fallback branch
- Ran
Code:
source build/envsetup.sh
- Ran
Code:
breakfast athene
The command ran successfully, no errors until now.
- Then ran
Code:
brunch athene
This is where the problems started popping up. I got errors while building in the following places -
(Treat .(dot) as my source dir)
ERROR 1 - In out/soong/make-vars(don't remember correct file name) - Still get it after
Code:
make clobber[\CODE], I have to always comment line 692 which throws the my-check error to suppress it.
ERROR 2 - Couple of old CyanogenMod dependencies and packages which I managed to get past after messing about with the ./device/motorola/athene/BoardConfig.mk file.
ERROR 3 - Errored out because BOARD_KERNEL_IMAGE_NAME was not defined, finally found an old XDA thread for the 15.1 ROM that told me that I had to set that to zImage in device/motorola/athene/BoardConfig.mk
ERROR 4 - In file ./system/core/init/init.h - Could not find <android-base/chrono_utils.h>, Could not find <selinux/label.h> - Got rid of it by putting in relative file paths and also modifying the ./system/core/init/Android.mk's LOCAL_C_INCLUDES to have relative file paths.
ERROR 5 - In file system/core/adb/daemon/main.cpp, system/core/base/include/android-base/macros.h: Cannot identify arraysize(groups).
ERROR 6 - In file system/core/adb/daemon/main.cpp - Use of undeclared identifier 'AID_UHID'

I can try to fix these errors, but I feel that there must be some branch/fork of the LOS15.1 code that must have all these issues fixed. If anyone has any pointers regarding this or the errors, I would be very grateful.

Thanks in advance,
gamemaker1
 

Wheels564

Senior Member
Apr 13, 2019
120
80
28
Genoa, U.S.A.
I don't believe Lineage 15 or 15.1 ever made it to official status. LOS 14.1 was the last official rom for athene that I know of. You might take a look at this roomservice file and other noteworthy things.

https://forum.xda-developers.com/showpost.php?p=81772343&postcount=348

I've just started building myself and have built LOS 14.1 for a couple unsupported devices (atrix hd and razr hd). Also just started trying to build 16.0 for the old Razr HD but have quite a task ahead of me. Hope the link helps and good luck.
 
  • Like
Reactions: gamemaker1

gamemaker1

New member
Mar 6, 2020
4
0
0
I don't believe Lineage 15 or 15.1 ever made it to official status. LOS 14.1 was the last official rom for athene that I know of. You might take a look at this roomservice file and other noteworthy things.

https://forum.xda-developers.com/showpost.php?p=81772343&postcount=348

I've just started building myself and have built LOS 14.1 for a couple unsupported devices (atrix hd and razr hd). Also just started trying to build 16.0 for the old Razr HD but have quite a task ahead of me. Hope the link helps and good luck.
Ok, thanks! I just saw the link, it seems good. Will try it out today and let you know the result.
 

gamemaker1

New member
Mar 6, 2020
4
0
0
@Wheels564 Thanks a lot! You really made my day - the extra dependencies in the roomservice.xml got my build done in less than 40 minutes.

From here, I want to get (LOS 15.1 with some extra features of mine, maybe I could cherry pick some features from HavocOS or AEX) an official build out, maybe become an official contributor. If you have any tips about this, please do let me know.

Once again, thanks a ton for your timely help!

Regards,
gamemaker1
 
Last edited:

Wheels564

Senior Member
Apr 13, 2019
120
80
28
Genoa, U.S.A.
@Wheels564 Thanks a lot! You really made my day - the extra dependencies in the roomservice.xml got my build done in less than 40 minutes.

From here, I want to get (LOS 15.1 with some extra features of mine, maybe I could cherry pick some features from HavocOS or AEX) an official build out, maybe become an official contributor. If you have any tips about this, please do let me know.

Once again, thanks a ton for your timely help!

Regards,
gamemaker1
No problem at all. The only thing about LOS 15.1 is that Lineage will never make it official. They've dumped all the rest of the phone on 15.1 because of repo changes I believe. Check here: https://review.lineageos.org/269773
I'm sure they will continue to submit security patches just like 14.1. Looks like the only way to become official is to jump to 16.1. It looks like developers have had issues with athene on LOS 16.1. Glad you were able to build the rom and good luck with future projects.
 
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