Skip to content
steadfasterX edited this page Nov 2, 2023 · 21 revisions

Requirements

The following packages are needed on your build system (where extendrom will run):

  • git
  • curl
  • python v3
  • python v3 requests module (e.g: sudo python3 -m pip install requests)

Setup

create .repo/local_manifest/extendrom.xml and add:

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

     <!-- extendrom -->
     <remote name="sfX" fetch="https://github.com/sfX-Android/" />
     <project path="vendor/extendrom" name="android_vendor_extendrom" remote="sfX" revision="main" />

</manifest>

Now sync this repo with e.g: repo sync -j4 vendor/extendrom (this will happen automatically during a normal repo sync as well as long as you keep it in your local manifests).

activate and configure

You have 3 options to do that, choose the one you like more ;)

option 1: (DEPRECATED) just use an Android makefile

this option is marked deprecated and should not be used anymore. Please switch to option 2 which is the only recommended approach these days.

add the following in your device/<vendor>/<model>/device.mk (or any other existing device mk file):

# Enable extendrom
# !never use quotes here!
ENABLE_EXTENDROM := true
<add-any-EXTENDROM-flag> := <EXTENDROM-flag-value>

$(call inherit-product, vendor/extendrom/config/common.mk)

obviously change <add-any-EXTENDROM-flag> := <EXTENDROM-flag-value> with the extendrom feature(s) you want to add.

Example:

# Enable extendrom
# !never use quotes here!
ENABLE_EXTENDROM := true
EXTENDROM_PACKAGES := \
    F-Droid \
    AuroraStore

add the following section to your device/<vendor>/<model>/vendorsetup.sh:

########### extendrom section ###########
$PWD/vendor/extendrom/er.sh

option 2: (RECOMMENDED) just use vendorsetup.sh

add the following in your device/<vendor>/<model>/device.mk (or any other existing device mk file):

# Enable extendrom
$(call inherit-product, vendor/extendrom/config/common.mk)

add the following section to your device/<vendor>/<model>/vendorsetup.sh:

################## extendrom section ##################
# when using "EXTENDROM_PACKAGES" ensure you use quotes

export ENABLE_EXTENDROM=true

export <add-any-EXTENDROM-flag>=<EXTENDROM-flag-value>
# e.g.:
#export EXTENDROM_PACKAGES="F-Droid AuroraStore"

$PWD/vendor/extendrom/er.sh

option 3: (DEPRECATED) mix Makefile & vendorsetup.sh

extendrom is flexible enough to also mix both options above.

Just be aware that vendorsetup.sh will take precedence - so always wins when a flag has been defined with both options.

Adding NEW(!) public GPG keys for verifying signatures

extendrom comes with a list of gpg keys which get auto-imported but sometimes you might need to extend that list.

extendrom will then verify signatures (if available) fully automatically for regular F-Droid packages. There is no need to do anything if you do not plan to use other repos for downloading packages.

If you plan to add non-standard repositories though:

You need to know the key id first which you can usually find beneath the package you want to add.
Another option is to find it by searching: gpg --keyserver pgp.mit.edu --search-keys f-droid.org
Of course there are other keyservers if pgp.mit.edu fails for you.

Once you got the id just add it to the variable GPG_KEYS in vendor/extendrom/er.sh (separate by a space from the others).

More information and the current F-Droid fingerprint can be verified here

building / changes in behavior

vendorsetup.sh

whenever you change something in device/<vendor>/<model>/vendorsetup.sh you HAVE TO apply these changes first.

The regular build process should always be like:

source build/envsetup.sh
lunch lineage_j5y17lte-user
mka otapackage
# (or mka eos when buildin /e/)

Note:
brunch or breakfast will work as well ofc

(DEPRECATED) Android makefile / mixed with vendorsetup.sh

whenever you change something in device/<vendor>/<model>/<device>.mk you HAVE TO apply these changes first.

The regular build process should always be like:

source build/envsetup.sh  # (initializes 
the android build aliases)
lunch lineage_j5y17lte-user # (initializes the makefiles including the extendrom changes)
source build/envsetup.sh # (activates the extendrom settings)

mka otapackage
# (or mka eos when buildin /e/)

Note:
brunch or breakfast will work as well ofc