1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2024-11-22 20:31:16 +00:00
Wrapper of syncthing for Android.
Find a file
Felix Ableitner b5f38c5c19 Lots of new unit tests, refactoring.
New tests:
RestApiTest
NodesAdapterTest
ReposAdapterTest

Refactored:
extracted PollWebGuiAvailableTask from SyncthingService
some changes in return values/calling behaviour for easier/better testing
2014-09-25 02:28:58 +03:00
ext/syncthing/src/github.com/syncthing Updated syncthing to v0.9.18. 2014-09-25 02:03:20 +03:00
gradle/wrapper Prepare building environment for F-Droid. 2014-08-20 23:58:28 +02:00
graphics Added feature graphic. 2014-09-13 16:22:31 +03:00
libraries Use PreferenceFragments with a wrapper instead of SettingsFragments (fixes #64). 2014-09-25 02:28:04 +03:00
src Lots of new unit tests, refactoring. 2014-09-25 02:28:58 +03:00
.gitignore Prepare building environment for F-Droid. 2014-08-20 23:58:28 +02:00
.gitmodules Use PreferenceFragments with a wrapper instead of SettingsFragments (fixes #64). 2014-09-25 02:28:04 +03:00
build-syncthing.sh Fix building syncthing on darwin host 2014-08-22 20:59:37 +02:00
build.gradle Added various unit tests. 2014-09-25 02:28:58 +03:00
CONTRIBUTING.md Changed code style to use spaces instead of tabs. 2014-09-25 02:28:58 +03:00
LICENSE Added MIT license. 2014-05-05 23:52:51 +02:00
README.md Added app screenshots to Readme. 2014-08-26 01:31:14 +02:00
settings.gradle Use PreferenceFragments with a wrapper instead of SettingsFragments (fixes #64). 2014-09-25 02:28:04 +03:00

syncthing-android

tip for next commit

A wrapper of syncthing for Android.

screenshot 1 screenshot 2 screenshot 3

Get it on Google Play Get it on F-Droid

Requirements

  • sudo apt-get install build-essential
  • Android SDK 19+ and the Android Support Repository are required.
  • Use git clone --recursive https://github.com/Nutomic/syncthing-android to download the source and its submodules.

Building

Use gradlew assembleDebug to compile the APK.

Note: Gradlew is a gradle wrapper which allows to specify the gradle version. Use gradle -b gradle/wrapper/build.xml wrapper to create your own gradlew instance. Then add it to your path using export PATH=$PATH:$(pwd)/gradle/wrapper.

The build process follows three phases:

  • It downloads and compiles Golang v1.3 for x86 and ARM cross-compilation: Syncthing-android depends on Syncthing "native" (https://github.com/syncthing/syncthing) and this requires Go v1.3.
  • The Syncthing native libraries are compiled for the different architectures using gradlew buildNative.
  • The final APK is built using the gradlew assembleDebug task.

Getting Syncthing without building natively

To get Syncthing app for Android running on you device/emulator the native syncthing binary has to be available. There are multiple ways to get the native syncthing binary:

  • open the Syncthing apk (the one taken from the play store) running on your device as a zip, extract the lib/ folder into your project directory and rename it to libs/.
  • Depending on your target architecture, download syncthing-linux-386, syncthing-linux-armv5, syncthing-linux-armv7 or syncthing-linux-mips from syncthing releases, and extract the binary to libs/x86/libsyncthing.so, libs/armeabi/libsyncthing.so, libs/armeabi-v7a/libsyncthing.so or libs/mips/libsyncthing.so respectively.

Development Notes

The syncthing backend used for this android application provides a web interface by default. It can be accessed via the Settings menu -> 'Web GUI'. It is quite helpful to access this web interface from your development machine. Read android documentation on how to access the network of your emulator. Or use the following steps to connect to the single currently running emulator/AVD.

  • telnet localhost 5554
  • redir add tcp:18080:8080
  • Start syncthing app on your emulator and access the web interface from you favorite browser of your development machine via http://127.0.0.1:18080

License

All code is licensed under the MIT License.