A generic guide on porting /e/ OS to any device

This is a bit technical, and probably only for passionate software developers!

We took some time to write a first version of a generic guide to porting /e/ OS to potentially any smartphone.

It gives an overview of the Android stack, how to build from sources, and some guidelines to bring an unsupported device to an /e/ life.

This document is not fully complete, it lacks some “real examples” for instance, so it will be a work in progress. Therefore we are posting the source document to our /e/-Gitlab to make contributions easier. Any people with an account on our gitlab instance will be able to improve the document (we just need to authorize him after a request).

We hope that it will help to bring still more people to contribute, by porting /e/OS to interesting devices, since our core team cannot handle any existing smartphone!

It starts from this URL, and the summary is on the right column!
https://gitlab.e.foundation/e/documentation/a-generic-guide-on-porting-eos/-/wikis/01:-Introduction

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

9 Likes

The whole idea behind this document was to come out with a guide to help the average user who was interested in building a ROM.
Most of us who are remotely interested in the subject have tried and failed to find a simple document that explains the steps need to be taken to come up with a build for our device. There may be good documents but knowing where to look is the secret.
This is a first attempt from our side. As Gaël mentioned the document is still incomplete.
One section on the GSI is yet to be started. The section where we have building for unsupported devices needs more inputs. More scenarios on how to integrate hardware components to make them run.
Those of you who have good experience of building ROM’s can make updates to the document and help complete it.

1 Like

Hello !!

I try to build /e/OS for my One Plus 5T with the “Repo Sync way”.

But when I type breakfast dumpling in my terminal, I get :

including vendor/lineage/vendorsetup.sh
device/oppo/common/common.mk:25: error: _nic.PRODUCTS.[[device/oneplus/dumpling/lineage_dumpling.mk]]: "vendor/oneplus/msm8998-common/msm8998-common-vendor.mk" does not exist.
15:03:03 dumpvars failed with: exit status 1
Device dumpling not found. Attempting to retrieve device repository from LineageOS Github (http://github.com/LineageOS).
Found repository: android_device_oneplus_dumpling
Default revision: lineage-16.0
Checking branch info
Checking if device/oneplus/dumpling is fetched from android_device_oneplus_dumpling
LineageOS/android_device_oneplus_dumpling already fetched to device/oneplus/dumpling
Syncing repository to retrieve project.
repo sync has finished successfully.
Repository synced!
Looking for dependencies in device/oneplus/dumpling
Looking for dependencies in device/oneplus/msm8998-common
Looking for dependencies in device/oppo/common
Looking for dependencies in packages/resources/devicesettings
packages/resources/devicesettings has no additional dependencies.
Looking for dependencies in kernel/oneplus/msm8998
kernel/oneplus/msm8998 has no additional dependencies.
Done
device/oppo/common/common.mk:25: error: _nic.PRODUCTS.[[device/oneplus/dumpling/lineage_dumpling.mk]]: "vendor/oneplus/msm8998-common/msm8998-common-vendor.mk" does not exist.
15:03:07 dumpvars failed with: exit status 1
device/oppo/common/common.mk:25: error: _nic.PRODUCTS.[[device/oneplus/dumpling/lineage_dumpling.mk]]: "vendor/oneplus/msm8998-common/msm8998-common-vendor.mk" does not exist.
15:03:08 dumpvars failed with: exit status 1

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

Repo I used : repo init -u git://github.com/LineageOS/android.git -b lineage-16.0

Can you help me, please ?

Thank you @GaelDuval and for you help.

Hi @BugProg the guide is as yet incomplete. There is a lot of details that has to be added to it. It describes a ‘happy scenario’ where the build works perfectly the first time around. This may not always be the case. There are a lot of customizations required to tweak the files in the initial stages to get the build to start.
Pl refer this thread in the forum for some advice on building without docker.

Hello @BugProg, welcome in the forum :slight_smile:

First, a Pie build updated every week is already available for your device :


Secondly, right now you aren’t building for /e/ but for LineageOS. Change the repo init line with the following one :
repo init -u https://gitlab.e.foundation/e/os/releases.git -b refs/tags/v0.9-pie

then do a

repo sync --force-sync


Finally, if breakfast fails, it’s because there is only one thing that is not automatically fetched for LineageOS supported devices, it’s the vendor blobs that can be found at github.com/TheMuppets.

Create a “roomservice.xml” file in : your-build-directory/.repo/local_manifests/roomservice.xml
(“.repo” is a hidden folder).
And copy paste the following text in this roomservice.xml file :

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <project name="TheMuppets/proprietary_vendor_oneplus" path="vendor/oneplus" remote="github" revision="lineage-16.0" />
</manifest>  

Restart your build and it should start.

Hello !!

Thank you so much for you help !!

Thank you @Anonyme, I will try this. It’s very very long :slight_smile:

Can I update the os directly in the the phone or I should flash it again ?

Backup, try a dirty flash (without any wipe) and see.

But a clean flash (with a wipe or format of the data partition) is better to avoid potential issues.

Thank you. That seems to work.