/e/OS on Samsung Galaxy J5 2017

Yes it will. :frowning: I can confirm this. However I’m trying to see where the thing is defined.

It downloads Wireguard from there : https://git.zx2c4.com/WireGuard/snapshot/

It downloads the version defined by BASH_REMATCH[1] and then expands it. The root cause is that there’s no Wireguard release bound to the BASH_REMATCH variable.

This is the script : https://github.com/nailyk-fr/android_kernel_samsung_exynos7870/blob/lineage-15.1/scripts/fetch-latest-wireguard.sh

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.

Forked repo for the kernel. New repo is https://github.com/jaubin/android_kernel_samsung_exynos7870 and all what it does is including net/wireshark sources.

Now I’m stuck with this : https://del.dog/anufagelak.txt

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) :

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"?>
<manifest>
  <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" />
</manifest>

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
FAILED: /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
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.

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).

Thanks !

1 Like

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 :thinking:

Why have you build for an device which you don’t own?

I own the device but cannot risk to brick it right now as it is my only phone, see the first post. :slight_smile: 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 : https://github.com/jaubin/eos_j5y17lte

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.

Congratulations @julek and welcome to the ROM Builders club!

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 ?

1 Like

Nice effort @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.

Don’t hesitate to adapt the script. Anyway it will make this thing much simpler :

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 :slight_smile:
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?

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.

1 Like

thx dude.

I am using another approach for building:

and I’ve updated my j5y17lte manifest including all the RIL fixes which are missing on nailyk’s repos here:

https://code.binbash.rocks:8443/MVA-VoLTE/local_manifests

I had to first sort everything but the manifest repo is now clean (haven’t build yet though :wink: ). 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 :slight_smile:

Thanks ! If it works I’m interested :slight_smile:

looks good so far :slight_smile:

EDIT 2020-08-04:

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.

EDIT 2020-08-05:

custom build + TWRP is online. Details can be found here: [CUSTOM BUILD][OREO] Samsung J5 2017 - SM-J530F (j5y17lte)

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 :slight_smile:
its 100% the same unless you change anything else.

I’m kinda purist towards C-I servers. Part of my day-to-day job. :wink: