July 1, 2020, 12:01pm
Yes it will.
I can confirm this. However I’m trying to see where the thing is defined.
It downloads Wireguard from there :
It downloads the version defined by
BASH_REMATCH and then expands it. The root cause is that there’s no Wireguard release bound to the BASH_REMATCH variable.
This is the script :
If there’s a need I can try to fork the repo to modify the script.
EDIT : forked the repo, disabled the offending script and included manually wireguard. Let’s check now.
July 1, 2020, 1:41pm
Forked repo for the kernel. New repo is
https://github.com/jaubin/android_kernel_samsung_exynos7870 and all what it does is including
Now I’m stuck with this :
I’ve seen that CONFIG_KEYBOARD_MELFAS_MHS2041B set to y and I suspect there’s something wrong with its definition. The actual definition is there (line 178) :
This file has been truncated.
# kbuild file for firmware/
# Create $(fwabs) from $(CONFIG_EXTRA_FIRMWARE_DIR) -- if it doesn't have a
# leading /, it's relative to $(srctree).
fwdir := $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE_DIR))
fwabs := $(addprefix $(srctree)/,$(filter-out /%,$(fwdir)))$(filter /%,$(fwdir))
fw-external-y := $(subst $(quote),,$(CONFIG_EXTRA_FIRMWARE))
# There are three cases to care about:
# 1. Building kernel with CONFIG_FIRMWARE_IN_KERNEL=y -- $(fw-shipped-y) should
# include the firmware files to include, according to .config
# 2. 'make modules_install', which will install firmware for modules, and
# _also_ for the in-kernel drivers when CONFIG_FIRMWARE_IN_KERNEL=n
# 3. 'make firmware_install', which installs all firmware, unconditionally.
# For the former two cases we want $(fw-shipped-y) and $(fw-shipped-m) to be
# accurate. In the latter case it doesn't matter -- it'll use $(fw-shipped-all).
I guess the culprit line is there :
fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-)
EDIT : Okay got it by updating the firmware directory Makefile. Let’s see if this works, fingers crossed.
EDIT 2 :
I got two clang segfaults but the build process seems to be
much better with my kernel fixes. If you want to have a try on your side use this file :
<?xml version="1.0" encoding="UTF-8"?>
<project name="nailyk-fr/android_device_samsung_j5y17lte" path="device/samsung/j5y17lte" remote="github" revision="lineage-15.1" />
<project name="nailyk-fr/android_vendor_samsung" path="vendor/samsung/" remote="github" revision="lineage-15.1" />
<project name="jaubin/android_kernel_samsung_exynos7870" path="kernel/samsung/exynos7870" remote="github" revision="lineage-15.1" />
<project name="nailyk-fr/android_hardware_samsung" path="hardware/samsung" remote="github" revision="lineage-15.1" />
<project name="nailyk-fr/android_device_samsung_exynos7870-common" path="device/samsung/exynos7870-common" remote="github" revision="lineage-15.1" />
<project name="nailyk-fr/android_hardware_samsung_slsi-cm_exynos" path="hardware/samsung_slsi-cm/exynos" remote="github" revision="lineage-15.1" />
<project name="nailyk-fr/android_hardware_samsung_slsi-cm_exynos5" path="hardware/samsung_slsi-cm/exynos5" remote="github" revision="lineage-15.1" />
<project name="nailyk-fr/android_hardware_samsung_slsi-cm_exynos7870" path="hardware/samsung_slsi-cm/exynos7870" remote="github" revision="lineage-15.1" />
<project name="LineageOS/android_hardware_samsung_slsi-cm_openmax" path="hardware/samsung_slsi-cm/openmax" remote="github" revision="lineage-15.1" />
<project name="LineageOS/android_packages_resources_devicesettings" path="packages/resources/devicesettings" remote="github" revision="lineage-15.1" />
Edit again : I have had various Clang segfaults at the point below. Any idea ?
[ 83% 60337/72249] //external/llvm/lib/Analysis:libLLVMAnalysis clang++ AliasAnalysisSummary.cpp
PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-4053586/bin/clang++ -c -Iexternal/llvm/lib/Analysis -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -fno-exceptions -Wno-multichar -ffunction-sections -fdata-sections -funwind-tables -fstack-protector-strong -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -DNDEBUG -g -Wstrict-aliasing=2 -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DNDEBUG -UDEBUG -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-expansion-to-defined -fdebug-prefix-map=$PWD/= -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -nostdlibinc -msoft-float -mfloat-abi=softfp -mfpu=neon -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -D__ARM_FEATURE_LPAE=1 -Iexternal/llvm/include -Iexternal/llvm/device/include -I/srv/src/OREO/out/soong/.intermediates/external/llvm/llvm-gen-attributes/gen -I/srv/src/OREO/out/soong/.intermediates/external/llvm/llvm-gen-intrinsics/gen -Iexternal/libcxx/include -Iexternal/libcxxabi/include -Isystem/core/include -Isystem/media/audio/include -Ihardware/libhardware/include -Ihardware/libhardware_legacy/include -Ihardware/ril/include -Ilibnativehelper/include -Iframeworks/native/include -Iframeworks/native/opengl/include -Iframeworks/av/include -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -Ilibnativehelper/include_deprecated -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -fomit-frame-pointer -Wall -W -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers -Wwrite-strings -Werror -Dsprintf=sprintf -Wno-error=unused-lambda-capture -Wno-error=user-defined-warnings -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -fPIC -D_USING_LIBCXX -std=gnu++14 -Wsign-promo -Wno-inconsistent-missing-override -Wno-null-dereference -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-thread-safety-negative -Wno-sign-promo -std=c++11 -Woverloaded-virtual -fno-rtti -fvisibility-inlines-hidden -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=return-type -MD -MF /srv/src/OREO/out/soong/.intermediates/external/llvm/lib/Analysis/libLLVMAnalysis/android_arm_armv7-a-neon_cortex-a53_static_core/obj/external/llvm/lib/Analysis/AliasAnalysisSummary.o.d -o /srv/src/OREO/out/soong/.intermediates/external/llvm/lib/Analysis/libLLVMAnalysis/android_arm_armv7-a-neon_cortex-a53_static_core/obj/external/llvm/lib/Analysis/AliasAnalysisSummary.o external/llvm/lib/Analysis/AliasAnalysisSummary.cpp
Any idea ? These ones are definitely
not bound to my patches, I got them also with a5y17lte.
July 1, 2020, 7:31pm
I finally managed to create an image using the roomservice.xml file above, after several attempts.
Could you try on your own to guarantee it’s not the “it works on my box” effect ? I’ve created the scripts which are on this thread plus the roomservice.xml file - the kernel fork is on my GitHub. If needed I can post all of this on my GitHub.
BTW do you know how we could get someone who has this smartphone testing (the smartphone must not be a “production” one, meaning it can safely be bricked - this is the reason why mine is not a good candidate as of now).
Post your build under ‘unofficial builds’ with the normal ‘warnings’ like ‘untested’ ; ‘use on your own risc’
By the way: congrats.
Have I over read something again
Why have you build for an device which you don’t own?
July 1, 2020, 8:11pm
I own the device but cannot risk to brick it right now as it is my only phone, see the first post.
When I have confirmations (or the Galaxy S7 under /e/OS ) it works I’ll happily install it.
How do you upload images and more importantly, where ?
Thanks for the support, and I guess this model was a bit more painful than others. At least you can happily use my small patches to the kernel source tree so that everything works. The build scripts are there :
I’m using ecloud for rom’s.
Why don’t make a full backup of your device with TWRP, store it on externalSD or PC and try your rom. Waiting of an user makes no sense.
July 1, 2020, 11:26pm
@julek and welcome to the ROM Builders club!
July 2, 2020, 7:53am
I’ve created a small project which could make it easier to both share roomservice.xml and build ROMs - something very simple.
Could you please have a look and tell me what you think ?
July 2, 2020, 8:19am
@julek . In this thread itself we have team members who have put in a lot of effort to organize the roomservice xmls. All can have a look at your tool and if the consensus is in its favor it can be added to gitlab so that it helps all.
July 2, 2020, 8:24am
Don’t hesitate to adapt the script. Anyway it will make this thing much simpler :
How to build an /e/ ROM?
Definitions: Custom vs Unofficial vs Official
A custom build is a build that is using most of the /e/ source code to generate a new ROM. It can be modified in any manner by the developer, for any purpose.
An unofficial /e/ build is a build from the /e/ source code that is intended to generate the /e/ ROM for a new, not yet supported, device. It’s not been approved officially and is not included yet to the list of official /e/ ROMs. It can be published publicly, tagged a…
July 2, 2020, 8:37am
Not exactly confident in my ROM. I guess I’ll have to by a new /e/OS phone first, so that I could use my current one as a scratchpad - dedicated to science…
hi. just wanted to say I will start building for that device soon
I ported together with nailyk LOS to that device but haven’t done anything since then.
@julek so you did some stuff already, can I find everything at your github?
July 24, 2020, 7:46am
Yes I have created a script that automates the building process and makes it much easier to do than with the official documentation, and I have a patched kernel because some of the makefiles were broken and some files were missing as well. All is on my github. However my script does not do magic and the toughest work is still to create a custom
roomservice.xml or sometimes patching the code.
Entry point is :
Samsung has released a security fix this June for this phone, still on Android 9. I guess it would be possible to port the kernel sources from repo Exynos7870 to /e/OS but no confirmation at all. We need first to start making all work with Android 8.1 and maybe later Android 9. I don’t really care of the Android version, but I do for security fixes.
I am using another approach for building:
Coming from first CyanogenMod and after that LineageOS building I was puzzled when starting with building /e/ first. The approach of
sharing a Docker setup to prepare an easy build environment is really awesome(!) and keeps the barriers low for users who never build Android before and for those who not wanting/having Linux running.
On the other site, if you can answer any or all of the following with yes, then this guide
is for you:
you have build Android before and are used to the cla…
and I’ve updated my j5y17lte manifest including all the RIL fixes which are missing on nailyk’s repos here:
I had to first sort everything but the manifest repo is now clean (haven’t build yet though
). If you want to use my manifest and do not want to create or link an account on my git server then ensure you comment these lines and instead remove the comment tags from here . That is not needed when you have an account on that server and SSH key set though. If you like I can add your account then for commit access as well…
anyways now that I have finished my /e/ builds for the LG G4 I begin with that one here
August 4, 2020, 10:55am
Thanks ! If it works I’m interested
looks good so far
haven’t found any issues yet. RIL working fine, Cam (pic and video rec) working fine, audio works, screen lock works, fingerprint works, sync with /e/ is working fine as well. ah well and GPS is working good as well (just a quick test with the F-Droid app “GPSTest”)
Next thing will be be backporting the security patches to the kernel and making a current TWRP build.
GPS tested on my bike tour for 2 hours. worked fine.
custom build + TWRP is online. Details can be found here:
[CUSTOM BUILD][OREO] Samsung J5 2017 - SM-J530F (j5y17lte)
August 5, 2020, 7:59pm
Great thing !
One thing would be to have reproducible builds (a make build is by definition not reproducible since it could build on your env but not on mine for example).
what exactly do you mean by that?
it is reproducible. take the manifest follow the guide to add
vendor/e and build
its 100% the same unless you change anything else.
August 6, 2020, 5:45am
I’m kinda purist towards C-I servers. Part of my day-to-day job.