Build it yourself

Build Omnify from source.

Nothing here is hidden behind a build server. Clone the repository, run one command, and out comes the same app the releases page hands you.

  • Around 15 minutes the first time
  • One command to build
  • Windows, macOS or Linux
Before you start

Two things to install.

Everything else, Gradle included and the exact Java version the project wants, is fetched by the build itself the first time it runs. There is nothing to configure by hand.

Git

To copy the repository onto your machine and pull later changes. Any recent version does.

Android Studio

The simplest way to get the Android SDK, and it settles the Java question on its own. You can build from the command line afterwards and never open it again.

Some room

The build is allowed up to 6 GB of memory, and the SDK plus the download cache take a few gigabytes of disk. A machine with 8 GB of RAM will manage, slowly.

The build

Three commands.

Run them from a terminal, in this order. On Windows, write gradlew.bat wherever you see ./gradlew.

  1. Copy the repository

    This creates an Omnify folder wherever you are.

    git clone https://github.com/Victor-root/Omnify.git
    cd Omnify
  2. Build the APK

    The first run downloads Gradle, the Android libraries and everything else the project depends on, so give it time. The ones after that are far quicker.

    ./gradlew assembleRelease
  3. Collect the file

    It is named after the version it was built from, for instance Omnify-v1.0.1.apk. Copy it to your phone and open it, or push it over from the computer.

    app/build/outputs/apk/release/
    ./gradlew installRelease

    That last one installs it straight onto a phone plugged in with USB debugging turned on.

Rather not use a terminal?

Open the Omnify folder in Android Studio, wait for the first sync to finish, then Build, Build Bundle(s) / APK(s), Build APK(s). It runs the very same build, and the file lands in the very same folder.

Variants

Which one to build.

Four builds come out of the same code. Swap the word in assembleRelease for the one you want.

  • assembleRelease
    Release Optimised and stripped down. This is exactly what the releases page publishes.
  • assembleBeta
    Beta The same build as release, except it installs next to a copy you already have instead of replacing it. The safe one to try.
  • assembleDebug
    Debug Compiles much faster and skips every optimisation. Handy while changing something, not meant for daily use.
  • assembleCanary
    Canary A throwaway build for confirming a fix on one bug report, labelled as a test build everywhere its name appears.
Signing

Your build is not the published one.

It cannot replace an install from the releases page

Android tells apps apart by the key they were signed with, not by their name. A build you made carries your key, not the project's, so Android refuses to install it over the published one. Uninstall that copy first, or build the beta variant, which lives alongside it.

Signing it with your own key

With no key configured the release build simply comes out unsigned, which is what an F-Droid style build server expects. To sign it yourself, put a keystore.properties file at the root of the project, next to settings.gradle.kts:

storeFile=my-key.jks
storePassword=your password
keyAlias=your alias
keyPassword=your key password

Android Studio creates the key file for you under Build, Generate Signed App Bundle / APK. Git is told to ignore both files, and neither should ever be committed.

If it goes wrong

The usual suspects.

  • "SDK location not found" Create a local.properties file at the root of the project holding one line, sdk.dir= followed by the path to your Android SDK. Opening the project in Android Studio once writes it for you.
  • It failed right after pulling changes Something cached went out of date. Run ./gradlew clean --refresh-dependencies and build again.
  • Gradle runs out of memory Open gradle.properties at the root and lower the -Xmx6g to what your machine can spare. The build takes longer, it still works.
  • The phone is not detected Turn on USB debugging in the developer options, then accept the prompt that appears on the phone when the cable goes in.
Or verify instead

Not going to build it?

You do not have to compile it to know what you installed. Every release carries the same certificate, and checking the one on your phone against the published fingerprint takes a few seconds.

Check a build