My own build server

Hello to all.

I will make my own build server for making APK files. This will help understand why maybe some app is not on fdroid with latest version and also help making latest app to fdroid.

When searching i can find Docs | F-Droid - Free and Open Source Android App Repository and this is detaild and good for me but is it fresh instruction or better looking at newer document for description?

I thank you in before.

The easiest way to start is running on a Debian (stretch or buster) baremetal box or KVM VM, then you can use this Ansible project to do the whole thing automatically:

This should probably work on Ubuntu LTS (18.04 or 20.04), but I don’t think its been tested there, also other Debian-derivatives too. It probably won’t work on other distros since it includes Debian-specific things

If you want a different setup, then I think the best approach is to read the docs, then read that Ansible project’s provision.yml file, and ask here when you get stuck.

1 Like

@hans I just provisioned a VM in KVM with the Ansible playbook and followed the instructions in the README to finish installation. When I run the command fdroid build --latest org.fdroid.fdroid, I get CRITICAL: Android SDK '$ANDROID_HOME' does not have 'build-tools' installed!.

I find the Installing the Server and Repo Tools in the Docs section of the website where in the Building apps section I found that I have to download Android SDK tools and set it in the PATH variable. The link for the SDK took seems quite old, the last update was maybe 3 year ago?

If we go to Android Studio website and check for SDK Tools we see a Command line tools only section where the latest SDK Tools are available, and they are different from the one mentioned in the doc.

Now here is my question: Why are we using 3-year-old SDK tool when we have new one available? Is it just that the docs are outdated but the new tools work fine or new tools are not tested, so we are rallying on our tested-trusted old tool?

A minor clarification, the apt-get command on the first line of the same page has a long list of packages but at the end there are 3 dots (…) which is unusual for a command like this and raises the question if it means some packages are still remaining but got warped.

I am very new to building Android app with SDK tools, so I might have asked some stupid questions would be grateful for your help.

My guess is that $ANDROID_HOME is not being set properly in your instance.

As for the old SDK version, the one we use keeps working. Try a newer version and let us know how it goes for you.

I understood this error and fixed that with the help of Server and Repo Tools doc.

My problem or question is why we are using an old version.

So I followed the Server and Repo Tools doc and finished setting up everything. Now when I try to build F-Droid Client (org.fdroid.fdroid) I get Repository mismatch error.

If I try to build NewPipe I get Failed to install the following Android SDK packages as some licences have not been accepted. error but with android list sdk I can’t find it. So it seems not to be working.

seems to me that the buildserver setup didn’t complete, since the licenses should already be accepted. You could read the provisioning scripts in fdroidserver.git, e.g. in buildserver/. Look at the Android SDK one, for example, and you can manually run those commands. Or rerun the whole process.

Thanks for the hint on provisioning scripts. While browsing I got two file that seemed interesting.

  • provision-android-sdk
  • provision-apt-get-install

I will try to run the provision-android-sdk and check in here with the result.

About the second script, provision-apt-get-install, is this the complete list of packages needed to be installed? I asked for clarification here

A minor clarification, the apt-get command on the first line of the same page has a long list of packages but at the end there are 3 dots (…) which is unusual for a command like this and raises the question if it means some packages are still remaining but got warped.

but at the end there are 3 dots (…)

Saw them and left them there as in “there might be more” and I’ve already updated them twice iirc :slight_smile:

Ignore it for now

2 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.