Submitting your Android app to F-Droid

OSDC Hobart, 2015

Workshop notes: http://polr.me/FDroidOSDC

What is

?

F-Droid is...

... an alternative to the Google Play store for free and open source apps.

F-Droid (client) is...

... an app that allows you to search for and install apps, be notified of updates, swap apps with your mates.

F-Droid (data) is...

... a repository of over 1,000 apps that are built from source.

F-Droid (server) is...

... a tool for managing repositories, including building apks from source in a safe and secure manner.

Goals for today

  1. Understand the 3 different parts of the F-Droid project
  2. Publish your apps via your own repository
  3. Submit an app to the main F-Droid repository

OSDC Workshop

fdroidserver + fdroiddata (not fdroidclient)

Workshop

Workshop part 0/3

Setting up

http://polr.me/FDroidOSDCSetup

Workshop part 1/3

Binary repository

http://polr.me/FDroidOSDCBinary

Workshop part 2/3

Binary repository (a bit better)

http://polr.me/FDroidOSDCBinary2

Workshop part 3/3

Building from source

http://polr.me/FDroidOSDCSource

Topics for diversion

Inclusion Policy

Only applies to https://f-droid.org repository.

https://f-droid.org/wiki/page/Inclusion_Policy

Common gotchas

Priorietary dependencies

  • Google Maps/Analytics/etc
  • Crashlytics
  • etc.

dependencies {
    compile 'com.android.support:appcompat-v7:22.1.1'
    compile 'com.android.support:cardview-v7:21.0.3'
    ...
    compile 'com.google.android.gms:play-services-ads:7.3.0'
}	
						

Random binary depenencies

(even if they are open source)


repositories {
    jcenter()
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.android.support:support-v4:23.0.0'
    compile 'com.android.support:cardview-v7:23.0.0'
    compile 'com.android.support:recyclerview-v7:23.0.0'
}
						

Not open source?!

Conflicting licenses

Common is GPLv2 using Apache licensed Android support libraries

GPLv3 is compatible

F-Droid Build Bot

Only applies to https://f-droid.org repository.

Checks for updates daily

Using the command:


fdroid checkupdates

Builds apps daily

Some apps (e.g. LibreOffice or Firefox/Fennec) take a long time

Logs posted to wiki

  • Navigate to your app https://f-droid.org
  • Click "See this applications page on the wiki"
  • In the info box on the right, click the buildlog link
  • Really only interesting for failures (e.g. this app)

AntiFeatures

"Some software, while being Free and Open Source, may engage in practices which are undesirable to some or all users. Where possible, we still include these applications in the repository, but they are flagged with the appropriate AntiFeatures"

Source: https://f-droid.org/wiki/page/Inclusion_Policy

AntiFeatures

  • Ads
  • Tracking
  • Non-Free Network Services
  • Non-Free Addons
  • Upstream Non-Free

Source: https://f-droid.org/wiki/page/Antifeatures

Auto updates

Based on git tags

Reproduceable Builds

All Android apks are signed

Can't upgrade an app to a new version with a different key (this is good)

F-Droid uses its own signing key

Have to uninstall upstream/Google Play version before installing F-Droid (this is annoying)

Reproduceable builds should solve this soon

Upstream builds .apk and signs for distribution

F-Droid builds from upstream source

If binaries match, F-Droid distributes upstreams .apk