Skip to main content

fdroid-dl

Build Status Documentation Status

Is a python based f-droid mirror generation and update utility. Point at one or more existing f-droid repositories and the utility will download the metadata (pictures, descriptions,..) for you and place it in your local system. Simply run fdroid-dl && fdroid update and you are set.

Motivation

The idea is to have an no internet local copy of one or more repositories, without the need to compile the thousands of apps on your own build server but rather download them like the android client does. So this tool came into existence to simply download a whole repository and import the apps into your own locally installed one. At the time of writing a full offline copy including assets is ~7.5GB of the official repository of f-droid.org.

Installation

fdroid-dl is available via pip, simply run pip install fdroid-dl and you can use fdroid-dl on your command line. pypi.org - fdroid-dl

Documentation

Can be found at fdroid-dl.readthedocs.io

Command Line Options

Usage: fdroid-dl [OPTIONS] COMMAND [ARGS]...

  Is a python based f-droid mirror generation and update utility. Point at
  one or more existing f-droid repositories and the utility will download
  the metadata (pictures, descriptions,..) for you and place it in your
  local system.

  Simply run "fdroid-dl update && fdroid update" in your folder with repo
  and you are set.

Options:
  -d, --debug               enable debug level logging
  -c, --config FILE         location of your fdroid-dl.json configuration file
                            [default: fdroid-dl.json]
  -r, --repo DIRECTORY      location of your fdroid repository to store the
                            apk files  [default: ./repo]
  -m, --metadata DIRECTORY  location of your fdroid metadata to store the
                            asset files  [default: ./metadata]
  --cache DIRECTORY         location for fdroid-dl to store cached data
                            [default: ./.cache]
  --help                    Show this message and exit.

Commands:
  update  starts updating process
Usage: fdroid-dl update [OPTIONS] COMMAND [ARGS]...

Options:
  --index / --no-index        download repository index files  [default: True]
  --metadata / --no-metadata  download metadata assset files  [default: True]
  --apk / --no-apk            download apk files  [default: True]
  --apk-versions INTEGER      how many versions of apk to download  [default:
                              1]
  --src / --no-src            download src files  [default: True]
  --threads INTEGER           configure number of parallel threads used for
                              download  [default: 10]
  --head-timeout INTEGER      maximum time in seconds a HEAD request is
                              allowed to take  [default: 10]
  --index-timeout INTEGER     maximum time in seconds index file download is
                              allowed to take  [default: 60]
  --download-timeout INTEGER  maximum time in seconds file download is allowed
                              to take  [default: 60]
  --help                      Show this message and exit.

Configuration File

TODO

  • Create backend to crawl existing repos
  • Fetch info directly index.jar and index-v1.jar
  • Compatibility with old and new repo styles
  • Download multi threaded
  • Verify apk checksum
  • Local cache for index files
  • Source code download not implemented yet
  • Metadata update to do delta not full download all the time
  • Cleanup strategy for old apk files (maybe fdroid update does this already?)
  • Create a CLI python click
  • pip package packaging.python.org
  • CI builds for pip package
  • Documentation ;-)
  • Writing tests pytest

CHANGELOG

  • WIP: Documentation added
  • WIP: Test added
    • requests-mock ?

Ideas

  • requests-cache ?

Development

Requirements

  • python 2.7.* or 3.5.*
  • pip 3.x
  • virtualenv 3.x

install locally

# git clone https://github.com/t4skforce/fdroid-dl.git
# cd fdroid-dl
# virtualenv .env
# source .env/bin/activate
# python setup.py install
# fdroid-dl --help
# python3 -m fdroid_dl --help

References

While this project was developed the following references where used

F-Droid

Python

Metadata

Release files for fdroid-dl 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fdroid-dl 0.1.0
File Size Uploaded
fdroid-dl-0.1.0.tar.gz 21.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fdroid-dl 0.1.0
File Interpreter ABI Platform
fdroid_dl-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 51.0 kB

Release files / fdroid-dl-0.1.0.tar.gz

Download URL fdroid-dl-0.1.0.tar.gz
Size 21.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8fb3ae5969c34d4ecc8314489fadcd7473f968f4857154c0e3b22643568ebdbc
BLAKE2b-256 checksum
How to use checksums
41f7d840aab8ea3bb5468b54abecf5b457b10d28d20b68e8d69d063ebf0705cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.3

Release files / fdroid_dl-0.1.0-py3-none-any.whl

Download URL fdroid_dl-0.1.0-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
878e8d43e40b338ca6467b47a7e77d5843aa677b27337b39d486dc745e978329
BLAKE2b-256 checksum
How to use checksums
a637ad0bdfe6662d7cce0f110a2a868fa01eb6c3b92c68df2077e5c08815a37e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

3 release files

0.0.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page