Skip to content

Integrating F-Droid in LineageOS (or any other Android) build

Good day. My goal is a custom ROM with F-Droid and a custom repo. I am currently building and signing LineageOS, both 14.1 and 16.0. I was able to integrate F-Droid in a 14.1 build, however it needed a little bit of help.

I created .repo/local_manifests/fdroid.xml

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
    <!-- Gitlab -->
  <remote name="fdroid" fetch="https://gitlab.com/fdroid/" />    
    <!-- F-Droid -->
    <project name="android_vendor_fdroid" path="vendor/fdroid" remote="fdroid" revision="master" />
    <!-- Privileged Extension -->
  <project path="packages/apps/F-DroidPrivilegedExtension" name="privileged-extension.git" remote="fdroid" revision="refs/tags/0.2.9" />
</manifest>

after running repo sync:

cd vendor/fdroid
./get_packages.sh

result: ERROR: Failed to download org.fdroid.fdroid_1000013.apk from proprietary/app/org.fdroid.fdroid_1000013.apk

edit manually '''vendor/fdroid/repo/fdroid.txt''' to 1006050

retrieved the GPG public key

gpg --keyserver pgp.mit.edu --recv-keys 7A029E54DD5DCE7A

and then I successfully built a ROM with F-Droid

export WITH_FDROID=true
brunch etc.

Questions

  1. How do I add my custom repo to the default repos in F-Droid? I do not mind if the repo can be deleted or disabled, but I do want this ROM to ship with my repo enabled by default

  2. There was quite some manual work above. Is any of this, in particular the editing of the apk revision number, automatable?

Thanks,

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information