A wrapper of Syncthing for Android. This is intended to be the revival and continuation of the original syncthing/syncthing-android project.
I want to thank all contributors of the original project for their awesome work!
(May be out of date. If so, please open an issue!)
These dependencies and instructions are necessary for building from the command line. If you build using Android Studio, you can set up SDK, Java and NDK differently. The Docker file is not needed for building, and is out of date or non-functional.
- Set up JDK version 21.
- Android SDK and NDK
- Download SDK command line tools from https://developer.android.com/studio#command-line-tools-only.
- Unpack the downloaded archive to an empty folder. This path is going
to become your
ANDROID_HOMEfolder. - Inside the unpacked
cmdline-toolsfolder, create yet another folder calledlatest, then move everything else inside it, so that the final folder hierarchy looks as follows.cmdline-tools/latest/bin cmdline-tools/latest/lib cmdline-tools/latest/source.properties cmdline-tools/latest/NOTICE.txt - Navigate inside
cmdline-tools/latest/bin, then executeThe required tools and NDK will be downloaded automatically.yes | ./sdkmanager "platform-tools" "build-tools;36.0.0" "platforms;android-36" "extras;android;m2repository" "ndk;29.0.14206865"
- You also need a C compiler for the Go build process. This is not the one included in the NDK.
(Go is downloaded automatically by Gradle when building.) (Python is not needed anymore.)
-
Clone the project with
git clone https://github.com/syncthing/syncthing-android.git --recursiveAlternatively, if already present on the disk, run
git pull && git submodule init && git submodule updatein the project folder.
-
Make sure that the
ANDROID_HOMEenvironment variable is set to the path containing the Android SDK (see Dependencies). -
Navigate inside
syncthing-android, then build withTo build the APK:
./gradlew assembleDebugTo build the AAB:
./gradlew bundleDebug -
Once completed, the result will be in
app/build/outputs/apk/debugandapp/build/outputs/bundle/debugrespectively.
NOTE: On Windows, you must use the Command Prompt (and not PowerShell) to
compile. When doing so, in the commands replace all forward slashes / with
backslashes \.
The project is licensed under the MPLv2.