[HOWTO] Build /e/

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 as “unofficial”.

An official /e/ build is an unofficial build from the /e/ source code that has reached a sufficient level of quality and has been validated. It has been published publicly as an official build on /e/ websites.

Requirements for differents builds:

  • Custom builds: if the source code has been modified and if the ROM is redistributed, we have several requirements:

    • any reference to /e/, including “/e/”, and our logo must be removed from the build
    • the redistribution must not let people think that it is /e/. The name must be changed and possibly say that it’s been forked from /e/
    • calls to our OTA server infrastructure should be removed
    • Custom ROMs can be built on /e/ servers only for exceptional reasons (special development…).
  • Unofficial /e/ builds: source code can be modified only to reach full support on the target device. /e/ features, list of installed apps etc. shouldn’t be modified. Unofficial builds can be published on the /e/ website at a specific place with warnings and a list of what works/what doesn’t work. It doesn’t have nightly builds nor OTA updates.

  • Official /e/ builds : the level of quality must have reached our conditions. It must have an official maintainer. Official builds have nightly builds and can be updated OTA. Source code have to be hosted on our GitLab instance, or on trusted sources (LineageOS GitHub group, AOSP).

How to build?

WARNING : This process will only work on case-sensitive filesystems!

  • Windows: will not work
  • macOS: doesn’t work either for HPS+ filesystem - adfs not tried
  • Linux: work on Ubuntu and CentOS

1. Install docker

If you have not already done so, install docker

2. Get our docker image

$ sudo docker pull registry.gitlab.e.foundation:5000/e/os/docker-lineage-cicd:community

3. Create directories

https://doc.e.foundation/how-tos/build-e#3-create-directories

4. Start build

Run the following command. Don’t forget to replace with your device code !

https://doc.e.foundation/how-tos/build-e#4-start-build

Example for kiwi:

https://doc.e.foundation/how-tos/build-e#4-start-build

The device code can be found on /e/ wiki, LineageOS wiki or with the following command:

$ adb shell getprop ro.product.device

5. Get your image!

When your build is finished, please find your images inside /e/zips/ folder. To install, please refer to our wiki.

If you need help, please join us on our community support Telegram channel.

To find more information about our docker image and its environment variables here.

To report an issue about a build, please refer to wiki issues documentation

https://doc.e.foundation/how-tos/build-e

Regain your privacy! Adopt /e/ the unGoogled mobile OS and online servicesphone

6 Likes

The build instructions for Docker are spot on! I had never tried Docker before. The online manuals I was looking at, were also not exactly helpful.Thanks to these instructions I built my first ROM with /e/ 0.1 as base. Now I am a Docker fan!! Thanks for proving that you are never too old to learn… certainly true in my case :smile:

1 Like

How do you enter these commands listed in step 4? If I cut and paste the above string of text I get multiple errors. I tried using gedit to make one long string of text and still get error arguments.

Copy & Paste of the text above will not work, because the text of the first post lacks the “\” at the end of several lines.
For using Copy & Paste I recommend, that you to go directly to the referenced build manual on https://gitlab.e.foundation/e/wiki/en/wikis/build.
@patrick It would be best, if you could update your post and add “\” to the end of the relevant lines.

Might have multiple reasons. Without detailed info, it is difficult to guess what the reason in your case is.

I used this to successfully build for a device

For build related commands please refer https://gitlab.e.foundation/e/wiki/en/wikis/build

The one major issue I face is the time it takes to sync the repositories. You can check the progress in the logs. Docker tries to download all the vendors available. The overall src folder size comes to about 40GB. Having said that the source folder for my LineageOS4MicroG docker build was 140 GB!!! Took about 2 days to download :slight_smile:

An update to the mail above … there is a mistake in the commands as it is missing the “\” at the end of each line. This happens as forum does not allow writing a single " \"
Note that the last line would not have any “\” at the end.

The correct command would be as under …

For build related commands please refer https://gitlab.e.foundation/e/wiki/en/wikis/build

Thanks @Markus for pointing this out.

Will this work with Ubuntu core? I use raspberry pi’s for experimental projects due to the fact that they’re super cheap and easy to mod. There are larger flash HD’s also available that can be used with the pi to provide adequate disk space for building.

@veeve01 Using Ubuntu or Ubuntu Core should make no difference. You should aim for 250GB empty hard-disk space and 8GB Ram. (210GB / 6GB was not enough for me when compiling for s2)

When installing docker with snap, you might run into problems: https://gitlab.e.foundation/e/management/issues/123.

@Markus Knowing ram and HD specs is useful… apparently pi’s don’t come in anything beyond 1gb ram. I’ll look around some more to see if there’s something else appropriate. All I have is a mac, and aside from partitioning the HD and installing ubuntu on part of it, I don’t have a current computer that I could use to build /e/ on. Do you have any ideas for smaller boards similar to pi’s that allow for mods and such?

No sorry, the smallest boards I have ever used are Mini-ITX boards.

1 Like

Thank you for providing the instructions. I want to suggest two changes:

  1. Step 3 should have \ at the end of the lines to make it copy-pasteable
  2. the instructions create an /e folder in the root directory. Is it possible to place these somewhere else (e.g. in a users directory)?

For example:

EBASE=/home/someuser/Projects/e
sudo mkdir -p $EBASE/src ...
sudo docker run -v "$EBASE/src:/srv/src:delegated" ...

Best regards
Mx

On the 2nd point the option of putting it in the user directory you can check out the commands used to create the LineageOS4MicroG https://github.com/lineageos4microg/docker-lineage-cicd/blob/master/README.md with some tweaks it should work. The LineageOS4Micro creates the folders inside the User directory

Have not tried moving the /e/ build under user directory but it should work.

Update done. Needed 2 backslashes to get 1 displayed.

I want to build an Oreo version of /e/ for the not yet officially Oreo-supported device LeEco Le2.
I would like to know, what changes I have to make to the docker command in order to achieve that.

Is it as easy as setting BRANCH_NAME to “eelo-0.2” and adding the device name “s2” to DEVICE_LIST?
For example what about OTA_URL?

The OTA URL needs to be changed only if you have a OTA server of your own. To start with the two changes you are making…Branch and Device list should be enough. I have made all my unofficial builds with changes to just these two parameters.

2 Likes

Hello Markus,

i’m very interesting for Oreo on LeEco 2. Can you keep us informed ?

Best regards

TMT

@TheMajorTom The devs already said, that official Oreo support for Nougat-supported devices (like LeEco Le2) is not a priority project - so this will take some time. But they will certainly announce it, when they are ready.
Regarding unofficial builds, I successfully built Oreo for Le2 and will give feedback about issues on gitlab, after I have installed it within the next few weeks.

Just a clarification on the Oreo/Nougat supported devices argument. The way builds are being done now is we have Device Maintainers for each device. Volunteers who help with the building of the ROM for specific devices. Each ROM is tested by flashing on a physical device and issues if any are noted and resolved. The idea is to have a uniform build across all devices which means

  • Similar set of apps and functionality across devices for a specific OS version.

Now some devices were released with Nougat and later upgraded to Oreo by their manufacturers. For /e/ this would mean the device maintainer would now have to build an Oreo build for the same device, test it and if it meets the /e/ specifications it is released as the official Oreo build for the device.
As you are aware /e/'s Oreo builds only rolled out last week. The device maintainers are working on the oreo builds and soon we will see them rolling out in batches. For devices where there is no Oreo support Nougat builds will continue as at present.
Pie is the next logical step. That will happen much later as for one the number of devices supporting Pie is very low and in most cases even the device manufacturers have not rolled out the Pie Stock ROM’s!
All this happens smoothly when we have a device already supported by Lineage officially.
That is we can find its builds here https://lineage.microg.org/ as initially /e/ was forked from Lineage
When it comes to Un supported devices… devices not on Lineage’s list then there is a slightly bigger problem of getting device maintainers. /e/ has the support of unsupported devices on its road map but it will be after some time.
The main issue with the delay in the Oreo releases is the small number of device maintainers we have at present. Users who can build ROM’s or have done it on Lineage earlier can try for their devices with the instructions available at https://gitlab.e.foundation/e/wiki/en/wikis/build if they find the builds are working perfectly they can contact @rhunault and get instructions on how to become device maintainers for their devices.