A newbie who wants to build /e/ Pie, possible?

Hi everyone !

My goal is to make an /e/ Pie build for my j5nlte | SM-J500FN (currently on /e/ Oreo).

Consider I know NOTHING about how I’m supposed to do, and that I just know what is Ubuntu, the apt, ls and cd commands. That’s all.

I have already read every HOWTO on the subject. Sadly, there is only one that seems doable for me but I think it’s just to build a ROM already downloadable, so interesting but not perfect for what I want.

I will clearly need help at every step and be a nightmare, BUT if I succeed, I want to make a really easy “HOWTO build an unofficial /e/ ROM” thanks to this topic, so helping me is helping others (good argument, isn’t it ?). Of course, I will need you to understand how to do so.

Hope this topic won’t die quickly for a reason or another :yum:


An /e/OS Oreo version is already available, and I found an unofficial working LineageOS 16.0 version here (yes it says “j8” but it’s for “j5”).

  • At the end of the page, there are links for the device tree and kernel.
  • I have also found device tree, kernel and vendor here but it’s for CM-12.1 (Lolipop).
  • I found vendor but it’s from RevengeOS Q, don’t know if it’s good.

EDIT : I run Ubuntu 20.04 LTS in VirtualBox on Windows with 240 GB of disk space and 3.5 GB of RAM alocated to Ubuntu (6 GB in total on my laptop).

1)

First of all, have I everything needed to build it with only command lines and without development ? Or do I have to give up now ?

On a lot of HOWTO here, it says to copy/paste lines and just replace the device name and the branch. I don’t see how it could be so easy, what do we do with those device tree, kernel and vendor files (actually they are not files but links for now) ?

I guess first of all I have to install Docker right ?

Thanks :slight_smile:

Best thing is you check who build these device trees and lineage 16.0 version and check if they have everything including patches and stuff in a manifest along with the sources in their github :slight_smile:

You may have to install some packages to create a building environment ? aren’t you ?
I have never build any ROM image, the only thing i had to compile in my life was Heimdall, and I remember that we needed many packages to do that, installing all those packages was the most difficult part of the migration to /e/OS.

That is right, there are various tutorials about that, and best thing is to run a build for a supported device if that works you now you have set up your environment correctly…

All right I will create a build for /e/ Oreo (what I’m using) following this howto and see if I succeed. Thanks :slight_smile:

Depending on what you want to build later on i would go for the same android version as you want to build for your j5

Sorry I’m a bad student, I tested to build for /e/ Oreo (and not Pie) because in this case I’m absolutely sure it’s possible since it’s already available. I guess it doesn’t matter.


I moved from “Windows subsystem for Linux” feature to a real VM with VirtualBox (240 GB of disk and 3.5 GB or RAM) because I don’t want to have 2 potential sources of failure of my build.

I tried to install docker-ce by following the docker documentation but it failed. So I installed the docker.io package which is (I think) quite the same thing but from ubuntu repository instead docker repository.
(Now I know that if it failed, it was because Ubuntu 20.04 isn’t supported yet by docker so the solution would be to change “focal” by “bionic” in the /etc/apt/sources.list file in order to be able to download docker-ce. If in the future I need to restart from scratch, I will install Ubuntu 18.04 instead of 20.04 to directly solve this little issue.)

I ran “docker run hello-world” in order to test, and it worked. So I started to build my /e/ Oreo for j5nlte.

Now I wanted to build my /e/ Oreo in order to see if I could at least build something already available. I followed the /e/ documentation, here is what I got :

As you can see, it failed. I tried to understand the following “eelo-0.9-20200430-UNOFFICIAL-j5nlte.log” file but I’m not able to understand what is wrong and what I’m supposed to do. /e/OS Oreo is already available, everything should work directly without issue, right ?

>> [Thu Apr 30 01:27:01 UTC 2020] Starting build for j5nlte, v1-oreo branch
including vendor/lineage/vendorsetup.sh
build/core/product_config.mk:238: *** Can not locate config makefile for product "lineage_j5nlte".  Stop.
Device j5nlte not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Repository for j5nlte not found in the LineageOS Github repository list. If this is in error, you may need to manually add it to your local_manifests/roomservice.xml.
build/core/product_config.mk:238: *** Can not locate config makefile for product "lineage_j5nlte".  Stop.
build/core/product_config.mk:238: *** Can not locate config makefile for product "lineage_j5nlte".  Stop.

** Don't have a product spec for: 'lineage_j5nlte'
** Do you have the right repo manifest?

No such item in brunch menu. Try 'breakfast'
>> [Thu Apr 30 01:27:05 UTC 2020] Failed build for j5nlte
>> [Thu Apr 30 01:27:05 UTC 2020] Finishing build for j5nlte
>> [Thu Apr 30 01:27:05 UTC 2020] Cleaning source dir for device j5nlte
01:27:10 Entire build directory removed.

#### build completed successfully (5 seconds) ####

For your information, my j5nlte isn’t officialy supported by LineageOS. So I guess it’s not in their github. Could it be a start of answer ? (Even if I don’t see why LineageOS would be needed)

Thanks :slight_smile:

1 Like

if you want to build with docker for a supported device, it should be one with lineage OS support, as /e/'s base is lineage, it doesn t need to be maintained anymore but the sources have to be available on official lineage github…

Did you create a roomservice.xml with your sources? example

1 Like

At the time of creating the howto i did not know you can specify the branch, so renaming is not necessary,

revision="branchname"

1 Like

if using a local_manifest/roomservice.xml you have to specify it also in your docker build script, so to say you have to add the file directory which would most probably be a line like this:
-v "/home/.../srv/local_manifests:/srv/local_manifests:delegated" \
but also add this line:
-e "INCLUDE_PROPRIETARY=false" \

I don’t think the source are available. When I search for “j5nlte” in their github there is no result. When I search for “msm8916” (don’t know exactly what it means but looks like my device enter in the “msm8916” category) I find 1, 2, 3, 4 results but I don’t know if this is usefull.

Is docker useless and can be deleted because now I have to use a “script” or will I use docker anyway ?

I didn’t. After some research, I made the following “roomservice.xml” file, is it good ? I’m sure it’s not :yum:
I have a doubt about the vendor part. The kernel part I think both are ok. And the “path=” I just followed the same scheme that others.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

<!-- tree : -->

<!-- https://github.com/Galaxy-MSM8916/android_device_samsung_j5nlte/tree/lineage-15.1 -->
<project name="Galaxy-MSM8916/android_device_samsung_j5nlte" path="device/samsung/j5nlte" remote="github" revision="lineage-15.1"/>

<!-- kernel : -->

<!-- https://github.com/Galaxy-MSM8916/android_kernel_samsung_msm8916/tree/lineage-15.1 -->
<project name="Galaxy-MSM8916/android_kernel_samsung_msm8916" path="kernel/samsung/j5nlte" remote="github" revision="lineage-15.1"/>
or
<!-- https://github.com/LineageOS/android_kernel_cyanogen_msm8916/tree/lineage-15.1 -->
<project name="LineageOS/android_kernel_cyanogen_msm8916" path="kernel/samsung/j5nlte" remote="github" revision="lineage-15.1"/>

<!-- vendor : -->

<!-- https://github.com/TheMuppets/proprietary_vendor_samsung/tree/lineage-15.1/msm8916-common -->
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung/j5nlte" remote="github" revision="lineage-15.1"/>

</manifest>

I think a headache is coming, I guess it’s a good sign.
Thank you :slight_smile:

1 Like

so first of its up to you if you want to use docker or not i build with cusom roomservice and script all the time with docker… i will double check your roomservice.xml…

1 Like

btw why don t you use the manifest on github.com/Galaxy-mMSM8916? they provide manifests for all the device sources they have on their github, just delete the unused resources…
https://github.com/Galaxy-MSM8916/local_manifests/blob/master/lineage-15.1.xml
also i fear the vendor you specified in your roomservice is not providing sources for j5nlte, anmd that is where your error came from in your build attempt

1 Like

To continue once you have the roomserivce.xml, put that file in …/srv/local_manifests , then you will have to edit a docker script, if you want to continue with docker, so it fits your machine (RAM-usage, ccache size, directories) and device to build for (Device_name and Branchname) this is what it looks like for s5mini…:

sudo docker run \
    -v "/home/jannes/srv/src:/srv/src:delegated" \
    -v "/home/jannes/srv/zips:/srv/zips:delegated" \
    -v "/home/jannes/srv/logs:/srv/logs:delegated" \
    -v "/ccache:/srv/ccache:delegated" \
    -v "/home/jannes/srv/local_manifests:/srv/local_manifests:delegated" \
    -e "BRANCH_NAME=v1-pie" \
    -e "DEVICE=kminilte" \
    -e "CCACHE_SIZE=75G" \
    -e "INCLUDE_PROPRIETARY=false" \
    -e "CUSTOM_PACKAGES=' PdfViewer GmsCore GsfProxy FakeStore com.google.android.maps.jar Mail BlissLauncher BlissIconPack MozillaNlpBackend OpenWeatherMapWeatherProvider AccountManager MagicEarth OpenCamera eDrive Weather Notes Tasks NominatimNlpBackend Light DroidGuard OpenKeychain Message Browser BrowserWebView Apps LibreOfficeViewer '" \
    -e "SIGNATURE_SPOOFING=restricted" \
    -e "ANDROID_JACK_VM_ARGS=-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx12G" \
    -e "REPO=https://gitlab.e.foundation/e/os/android.git" \
    registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:latest

I didn’t use this because I didn’t know if I could use that. Now that you told me I could use it, I removed everything I was sure wasn’t for my device, and here is what remains :

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

  <remote  name="Galaxy-MSM8916"
           fetch="https://github.com"
           review="review.msm8916.com"
           revision="lineage-15.1" />

  <remove-project name="device/generic/mini-emulator-arm64" />
  <remove-project name="device/generic/mini-emulator-x86" />
  <remove-project name="device/generic/mini-emulator-x86_64" />
  <remove-project name="device/generic/qemu" />
  <remove-project name="device/generic/x86" />
  <remove-project name="device/generic/x86_64" />

  <remove-project name="platform/prebuilts/android-emulator" />
  <remove-project name="platform/prebuilts/clang/host/darwin-x86"/>
  <remove-project name="platform/prebuilts/gcc/darwin-x86/arm/arm-eabi-4.8" />
  <remove-project name="platform/prebuilts/gcc/darwin-x86/arm/arm-linux-androideabi-4.9" />
  <remove-project name="platform/prebuilts/gcc/darwin-x86/aarch64/aarch64-linux-android-4.9" />
  <remove-project name="platform/prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1" />
  <remove-project name="platform/prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.9" />
  <remove-project name="platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9" />
  <remove-project name="platform/prebuilts/gdb/darwin-x86"/>
  <remove-project name="platform/prebuilts/go/darwin-x86"/>
  <remove-project name="platform/prebuilts/python/darwin-x86/2.7.5" />
  <remove-project name="platform/prebuilts/gradle-plugin" />
  <remove-project name="platform/prebuilts/libs/libedit" />

  <remove-project name="platform/sdk" />

 <!-- Samsung MSM8916 Common Repos -->
  <project path="device/samsung/msm8916-common" name="Galaxy-MSM8916/android_device_samsung_msm8916-common" groups="device" remote="Galaxy-MSM8916"/>
  <project path="device/samsung/qcom-common" name="LineageOS/android_device_samsung_qcom-common" groups="device" remote="github" revision="lineage-15.1"/>

 <!-- Samsung Hardware Repo -->
  <project path="hardware/samsung" name="LineageOS/android_hardware_samsung" />

 <!-- Common Samsung MSM8916 Kernel -->
  <project path="kernel/samsung/msm8916" name="Galaxy-MSM8916/android_kernel_samsung_msm8916" remote="Galaxy-MSM8916"/>

 <!-- Vendor Trees (for all devices) -->
  <project path="vendor/samsung" name="Galaxy-MSM8916/proprietary_vendor_samsung" groups="device" remote="Galaxy-MSM8916"/>

 <!-- Qcom audio  -->
  <remove-project name="LineageOS/android_hardware_qcom_audio"/>
  <project path="hardware/qcom/audio-caf/msm8916" name="Galaxy-MSM8916/android_hardware_qcom_audio" groups="qcom,qcom_audio,pdk" revision="lineage-15.1-caf-8916" />

 <!-- Qcom Common -->
  <project path="device/qcom/common" name="LineageOS/android_device_qcom_common"/>

 <!-- TWRP -->
  <project path="bootable/recovery-twrp" name="OmniROM/android_bootable_recovery" remote="github" revision="android-8.1"/>

 <!-- Dependencies -->
  <project path="external/busybox" name="omnirom/android_external_busybox" remote="github" revision="android-8.1"/>
  <project path="external/sony/boringssl-compat" name="LineageOS/android_external_sony_boringssl-compat" remote="github" revision="lineage-15.1"/>
  <project path="packages/resources/devicesettings" name="LineageOS/android_packages_resources_devicesettings"/>

 <!-- arm-eabi-7.2 -->
  <project path="prebuilts/gcc/linux-x86/arm/arm-eabi-7.2" name="Galaxy-MSM8916/android-prebuilts-gcc-linux-x86-arm-arm-eabi-7.2" remote="github" revision="master"/>

 <!-- Galaxy J5 (2015) -->
  <project path="device/samsung/j5-common" name="Galaxy-MSM8916/android_device_samsung_j5-common" groups="device" remote="Galaxy-MSM8916"/>
  <project path="device/samsung/j5nlte" name="Galaxy-MSM8916/android_device_samsung_j5nlte" groups="device" remote="Galaxy-MSM8916"/>

</manifest>

I guess there is still too much things remaining (don’t know if it has to be removed or if we can leave unnecessary lines though).


Thanks for the steps once I will have the final “roomservice.xml” (and for still being here :yum:). Some of the instruction are outdated (according to what I read on this forum) and I will change things accordingly. Like “CUSTOM_PACKAGES” not needed anymore (if I understood correctly) for instance, or the “-lineage-cicd:community” instead of “-lineage-cicd:latest”.

1 Like

except for the twrp sources which are not needed it looks good, though i m never sure about all the different sources fo j5 modells, but you can add them back if it throws an error…
if you are using the community branch make sure to adapt the devicelist line correctly.
i m not sure about the custompackage list, maybe someone from @support group knows more about it ? would be interested in the answer as well
:slight_smile:

That’s the new wiki for building eOS with docker. The docker command is different now

1 Like

Thanks, it’s done.

What is the difference between “community” and “latest” and what do you mean by “adapt the devicelist line” please ? On every HOWTO it was “latest” but in the recently updated documentation it’s “community”.

My memory tells me that I saw somewhere it wasn’t necessary anymore because now it was part of something. And again, in the recently updated documentation, this line isn’t here.