Customising F-Droid client (Android repo)

This is part 2 of a 2 part series about rolling out your own “Play Store” based on F-Droid for Android devices.

Server set up instructions can be found at

The first thing that we need to do, is to get hold of the source for the client at gitorius.

Do a git clone of the code with

git clone fdroid-client

which will give you a checkout in the fdroid-client directory.
Directly afetr the checkout completes, cd into your new fdroid-client directory and grab the git submodules with:

git submodule update --init

and then we need to prepare for our ant biulds with:

./ # This runs 'android update' on the libs and the main project
ant clean release

Which will then build the stock release version of the client. Now, the point here is to do some customising right? OK, so let’s start with that then…

The first step here is to make sure that you can install your new package manager client alongside FDroid client too. In order to do this, edit tools/ and change the parameters that you need to (package name and identifier)

FDROID_NAME=${2:-Your FDroid}

Change these values to something closer to what you want i.e.

FDROID_NAME=${2:-Pauls FDroid Client}

Execute the package name changer script and get yourself a cookie for getting this far!

Now would be a good tme to import the code into an IDE like Eclipse or Android Studio. Note, however, that due to the way this project is built and laid out, it will probably not compile, and Eclipse will moan about it. No matter though, you are only modifying code in Eclipse, and will rebuild via the command line once done.

One thing that you really should change is to edit res/values/default-repo.xml and modify it to at least include your new server repo that you set up in part 1.
You probably also want to change no-trans.xml and the “about” clause to reflect your own installations too.
If you are rolling out a complete solution, don’t forget to check out strings.xml as well, so that your application makes sense!

Once that is done, you are free to look through the code to modify whatever else you think may be useful, but I think that the above should do for most situations. If you want to change the launcher icon etc, then create a new Android icon project in Eclipse and do it that way, as it is far easier than manually.

Once all your changes are done, rebuild and ship your brand new client!

ant clean emma debug install [test]


Liked this post? Follow this blog to get more. 

  • PhilT

    Hi Paul, this blog is an excellent reference!
    I have a problem while working though it though … ./ returns an error

    “Error: The project either has no target set or the target is invalid.
    Please provide a –target to the ‘android update’ command.” once for each of the three modules.
    Is there a dependency for this to work?

    • Paul Scott

      Try one of the targets in the ant build.xml file. IIRC there are a few, like “prepare”, “release” and “debug”. Probably best to start with debug as the target though