Table of Contents

Table of Contents

Getting Started

  1. Make a shallow clone (unless you need the old versions)

    git clone --shallow-since=2019-09-15 git@github.com:x0b/rcx.git
    
  2. Use flavor oss:

    gradlew assembleOss
    
  3. Open Android Studio and import from Gradle. After the import finishes, restart Android Studio before continuing.

  4. Acquire compatible rclone binaries. You can:

    • extract them from the respektive apk
    • compile them yourself using a golang/ndk cross-compile build chain (see § Building from source).
    • compile them yourself using a termux shell on the target device (only works to compile for the devices own architecture)

    The version contained in the apk is built from the corresponding git tag in the rclone repo. If the rclone version was changed, this is usually specified in the changelog. This should be followed closely since sometimes rclone changes even between patch versions (e.g. 1.49.4+ vs 1.49.3). Starting in app version 1.12, the compatible rclone version is specified in ./rclone/build.gradle:

    def buildTag = 'v1.51.0'
    
  5. Place the binaries in the appropriate directory for each architecture. It should look like this:

    app/lib/arm64-v8a/librclone.so
    app/lib/armabi-v7a/librclone.so
    app/lib/x86/librclone.so
    app/lib/x86_64/librclone.so
    

    If you are building from source, the gradle build should automatically place the binaries in the target directories and will overwrite previous versions should they exist.

  6. Build and deploy the APK..

  7. If you’re planning on distributing your build, remember the Iceweasel-clause from the README. We may waive this if you talk to us.

    If you want to convey a modified version (fork), we ask you to use a different name, app icon and package id as well as proper attribution to avoid user confusion.

Building from source

The app is composed of multiple components in multiple languages which in turn require the installation of multiple SDKs. You only need the Android NDK and Golang if you want to build completely from source.

Java (app) build

Requirements

Build on Windows

rcx> gradlew assembleOss

Build on Linux

rcx $ gradlew assembleOss

Golang (rclone) build

Requirements

  • Windows (x86, x64), Linux (x64) or Mac (x64)
  • Golang, version 1.13 or later
  • Set $ANDROID_HOME (Linux) or %ANDROID_HOME% (Windows) to the location of the installed Android SDK
  • Android NDK must be installed into the default location ($ANDROID_HOME/ndk-bundle). If it is installed elsewhere, you must change the paths in the rclone build script (./rclone/build.gradle)
  • For RCX v1.11.4, use NDK r20.

Build on Windows

rcx> gradlew rclone:nativeBuild

Build on Linux

rcx $ ../gradlew rclone:nativeBuild