Bye bye Play Store! Mirroring Play Store Apks to private F-Droid repo

This small tutorial will show you how to setup your own F-Droid repository containing automatically mirrored Play Store apps. Using this private repo, you don’t have to relay on Google Play Store or third party stores anymore to keep non-free apps up-to-date. All you need to have is a Linux server with a public web server configured :)


I’m using the Archlinux operating system in my example setup. It should also work on other Linux systems but might require some additional steps.

First, we have to enable the multilib-repository in Pacman for some installation dependencies later:

#Include = /etc/pacman.d/mirrorlist

Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.

I’m using the AUR helper aurutils to optain the Android-, Fdroid and Google Play tools. After that, I create the fdroid directory inside the public www directory and initialize it:

aur sync -c fdroidserver android-sdk android-sdk-build-tools gplaycli
pacman -Sy fdroidserver android-sdk android-sdk-build-tools gplaycli
mkdir -p www/fdroid
cd www/fdroid
env ANDROID_HOME=/opt/android-sdk fdroid init

Edit the file to customize the repository info:

repo_url = ""
repo_name = "Project-Insanity F-Droid repo"
repo_icon = "fdroid-icon.png"
repo_description = "This is a private F-Droid repository for the PI-crew :)"

Now we can create the configuration for the Google Play client. Put the app ids of the apps you want to mirror inside the apk.list file. You’ll find these ids by looking it up in the address bar of your browser for the specific app page on

mkdir ~/.config/gplaycli


In my setup, I will run the systemd timer inside a user session (replace the username onny and the repo path in the example below). You don’t have to do this like this and can use system wide timers or cron jobs instead.

Description=Gplaycli automatic APK mirror 

ExecStart=/usr/bin/sh -c "rm -f /home/onny/.cache/gplaycli/token && /usr/bin/gplaycli -v -dc oneplus3 --file /home/onny/.config/gplaycli/apk.list --folder /home/onny/www/fdroid/repo/ && cd /home/onny/www/fdroid && env ANDROID_HOME=/opt/android-sdk fdroid update --create-metadata"

Description=Gplaycli automatic APK mirror



After enabling this timer, the script will refetch the apks and update the repo every 12 hours :)

systemctl daemon-reload
systemctl --now enable gplaycli.timer

Go to the settings page of your F-Droid client and add the custom repository. The url might look like

This still requires the play store, so you haven’t eliminated a dependency and have added another point of failure.


Leave a Reply

Your email address will not be published. Required fields are marked *

* Checkbox GDPR is required


I agree

Officepad – Etherpad alternative based on Onlyoffice

During the Chaos Communication Camp 2019 I was working on a project called Officepad. The aim was to build a web interface comparable to Etherpad. Etherpad is a well established tool for online text collaboration used by software developers, activists and so on. Etherpad is relatively stable and works well …

Ebook reader app for Nextcloud

Because of lack of altenatives I decided to write a small ebook reader plugin for Nextcloud. The task of creating such an app was quite easy: I just forked the files_pdfviewer extension and replaced PDF.js with the Epub.js library. In the app template file, I used the reference ebook reader …

Hacking replay gain audio normalization into Jellyfin

There is already a feature request for audio normalization in Jellyfin media server. This is important if you want to listen to your music collection while always having the same loudness level. Usually, in different recordings or music genres some tracks are louder and others are more quiet. The standard …