[HOWTO] build /e/ the (full) classic way (no docker, no scripts, just 'make')

About

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 classic way of building
  • you have already a good working build environment
  • you do not like docker :stuck_out_tongue:
  • you want to get the most speed possible
  • you want to learn how Android would be normally build
  • you plan to build other Android ROMs like LOS, AOSiP etc and do not want
    to start everytime from scratch
  • you already have Linux, have good experience with Linux and/or be willing
    to get used to it :slight_smile:

Some / all of the above matches on you? Well then go on!

You must have either Linux and Android building experience or you must be willing to learn these things on your own as these are not covered here.

Why another guide?

There are several guides available for doing (parts of) “classic” building like:

So why another one?

None of these covering the classic approach fully. You always have to run scripts manually and configuration options are usually within the scripts itself etc. That is not my understanding of classic building and other then that none of these covers all the things what you can do with the docker setup (e.g. signing, delta updates, etc).

Just to be crystal clear here: I appreciate the work of the users putting time and effort in doing the above guides! The mentioned guides are not bad in any way, they are just not fitting all of my personal needs.

So… I put a week of work (which is still ongoing :wink: ) going through all of these above guides and the docker setup and scripts as well to migrate those to the classic build approach.

That being said, the magic within comes from the docker scripts (90%) + some mods from the other guide’s scripts. I “just” bring that all together and migrated/removed/adjusted/optimized/added everything needed to finally make it work with just a:

source build/envsetup.sh && brunch <device> && mka eos

:grin:

Setup / Usage

Please find all steps in the README

Beware of the dragons :dragon: :dragon_face:

  1. Even though I suggest using vendor/e this is not an official way to build /e/ (yet) - while I hope it will be one day (I had send review requests to all I knew but if you can help me speeding this up write me a PM)
  2. Expect issues (pls report them here or open an issue in the repo)
  3. Review the known issues
  4. well, yea ofc the title says “no scripts” but there are scripts included - just nothing you need to care about!
  5. … and most important: Anything can change at any time!
4 Likes

Hi, thank you for this, we never have enough HOWTO about building /e/ :slight_smile:

repo init -u https://gitlab.e.foundation/e/os/android.git -b
e.g:
repo init -u https://gitlab.e.foundation/e/os/android.git -b v1-pie

  • It has changed. Now you have to use
    repo init -u https://gitlab.e.foundation/e/os/releases.git -b refs/tags/v0.9-<branch>
    And you have to check if a new version/tag is available, and change accordingly.
    For instance right now you could use :
    repo init -u https://gitlab.e.foundation/e/os/releases.git -b refs/tags/v0.9.4-pie

  • What about breakfast ? Isn’t it useful when we want to build for devices and version that are available on LineageOS github without any local_manifests ? If I’m right, that’s the command that fetches all the dependencies from LineageOS github.

1 Like

oh my… must have overseen that new init URL, thx!

technically mka eos will do a breakfast within. so this shouldn’t be an issue - hopefully :slight_smile:

1 Like

The thing is that the docker scripts referring to exactly that repo I am using (and using branch , not tag): https://gitlab.e.foundation/e/os/docker-lineage-cicd/-/blob/master/Dockerfile#L43
and:
https://gitlab.e.foundation/e/os/docker-lineage-cicd/-/blob/master/build-community.sh#L110

More informations toward the use of the new repo and tags instead of branch :

1 Like

wow thx! will go through it…
edit: fixed and here

thx again

well you put in there e.g. the device tree (if it is not official) and other resources you need for building for that particular device.
I cannot tell you what exactly to put in there as this depends on each device. even when there is another custom ROM available for your device not every ROM builder creates a manifest. overall it is not REQUIRED but recommended to have one.

this seems to be a good first start to learn about the manifests and local_manifests: https://forum.xda-developers.com/t/learn-about-the-repo-tool-manifests-and-local-manifests-and-5-important-tips.2329228/