GithubHelp home page GithubHelp logo

catfriend1 / syncthing-android Goto Github PK

View Code? Open in Web Editor NEW
1.2K 28.0 40.0 28.79 MB

Syncthing-Fork - A Syncthing Wrapper for Android.

License: Mozilla Public License 2.0

Shell 0.42% Java 92.14% Python 2.70% Dockerfile 0.14% Batchfile 4.46% PowerShell 0.14%
file-synchronization

syncthing-android's Introduction

Syncthing-Fork - A Syncthing Wrapper for Android:

License: MPLv2 Translation status

A wrapper of Syncthing for Android. Head to the "releases" section or F-Droid for builds. Please open an issue under this fork if you need help. Important: Please don't file bugs at the upstream repository "syncthing-android" if you are using this fork.

screenshot 1 screenshot 2 screenshot 3

Major enhancements in this fork are:

  • Folder, device and overall sync progress can easily be read off the UI.
  • "Syncthing Camera" - an optional feature (with optional permission to use the camera) where you can take pictures with your friend, partner, ... on two phones into one shared and private Syncthing folder. No cloud involved. (deprecated)
  • "Sync every hour" to save even more battery
  • Individual sync conditions can be applied per device and per folder (for expert users).
  • Recent changes UI, click to open files.
  • Changes to folder and device config can be made regardless if syncthing is running or not.
  • UI explains why syncthing is running or not.
  • "Battery eater" problem is fixed.
  • Discover other Syncthing devices on the same network and easily add them.
  • Supports two-way synchronization on external sd cards since Android 11.
  • Supports encrypted folders on untrusted devices.

About Play Store releases:

  • Planning to close my Google Play Developer Account. Please say hi if you are interested in obtaining the latest gplay release files from me to help in publishing this app.

Privacy Policy

See our document on privacy: privacy-policy.md.

Goal of the forked version

  • Develop and try out enhancements together
  • Release the wrapper more frequently to identify and fix bugs together caused by changes in the syncthing submodule
  • Make enhancements configurable in the settings UI, e.g. users should be able to turn them on and off
  • Let's get ready for newer Android versions that put limits on background syncing tools. We need your bug reports as detailed as possible

Building

Prerequisites

If you miss any prerequisite, the shell scripts will abort with an error and tell you what you need to do. In case you like to dive into building directly, you can skip this section and jump directly to "Build instructions".

  • Android SDK
# This command will help you install the minimum Android SDK components to build this project in case you don't use Android Studio.
python install_minimum_android_sdk_prerequisites.py
  • Android NDK r26b
$ANDROID_NDK_HOME environment variable should point at the root directory of your NDK. If the variable is not set, build-syncthing.py will automatically try to download and setup the NDK.
  • Go 1.21.4
Make sure, Go is installed and available on the PATH environment variable. If Go is not found on the PATH environment variable, build-syncthing.py will automatically try to download and setup GO on the PATH.
  • Python 3.9.6 64-Bit
Make sure, Python is installed and available on the PATH environment variable. Download 'https://www.python.org/ftp/python/3.9.6/python-3.9.6-amd64.exe' and run 'python-3.9.6-amd64.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0'
  • Git (for Linux) or Git for Windows
Make sure, git (or git.exe) is installed and available on the PATH environment variable. If Git is not found on the PATH environment variable, build-syncthing.py will automatically try to download and setup MinGit 2.19.0-x64 on the PATH.
  • Java Development Version 17
"java" should be on the PATH environment variable. Download from Oracle and run the installer. Log off and back on to let the new PATH variable take effect.

Build instructions

Edit "App_build_and_release.cmd" and set "SKIP_RELEASE_BUILD=1" if you don't need to upload signed releases to Google Play. This will simplify things for you.

Build on Linux

A Linux VM, for example running Debian, is recommended to build this.

Build SyncthingNative and the Syncthing-Android wrapper using the following commands:

apt-get -y install git openjdk-11-jdk python
mkdir -p /root/work
cd /root/work
git clone https://github.com/Catfriend1/syncthing-android.git --recursive
cd /root/work/syncthing-android
./gradlew buildNative
./gradlew lint assembleDebug

You can also use Android Studio to build the apk after you manually ran the ./gradlew buildNative command in the repository root.

To clean up all files generated during build, use the following commands:

./gradlew cleanNative
./gradlew clean

Build on Windows

git clone https://github.com/Catfriend1/syncthing-android.git --recursive
cd /d "YOUR_CLONED_GIT_ROOT"
SyncthingNative_update_and_build
App_build_and_release

Development Notes

It is recommended to change the GUI and Listen Address ports for the debug app, e.g. to 8385 and 22001 respectively.

The Syncthing native 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 command to connect to the single currently running emulator/AVD.

adb forward tcp:18384 tcp:8384

Start Syncthing app on your emulator and access the web interface from you favorite browser of your development machine via https://127.0.0.1:18384

License

The project is licensed under the MPLv2.

syncthing-android's People

Contributors

acolomb avatar androw avatar audriusbutkevicius avatar bugith avatar capi avatar catfriend1 avatar chr15m avatar dependabot-preview[bot] avatar easyvector avatar flashsystems avatar helium314 avatar jmintb avatar kdot avatar krelyshy avatar licaon-kter avatar lkwg82 avatar mscheidemann avatar mstrecke avatar njardarheim-1337 avatar nutomic avatar paulannekov avatar pawel-smth avatar proactiveservices avatar rickylam11 avatar sferra avatar stoyandimitrov avatar unrud avatar weblate avatar wweich avatar zillode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

syncthing-android's Issues

[QA] - Syncthing core 0.14.52

Hi together,

I need your help on this. As the android app "Syncthing-Fork" is only a wrapper for the syncthing core binary which is built from the upstream repo located at https://github.com/syncthing/syncthing/releases . As this question often has been discussed, I CAN include the most recent version of syncthing-core, at time of writing this, 0.14.52, and after 10 minutes of work we would have a new "Syncthing-Fork" wrapper app which contains this core binary version up2date.

BUT it's a hard time for me testing alone, if the newly released syncthing core binary works CORRECTLY on Android (battery eater, NDK sandbox, inotify support, probably new bugs due to upstream changes, ...). That's why I'd like to encourage YOU to help in quality assurance testing.

Everytime a new syncthing core gets released, I'll put the wrapper in its current considered-stable master state including that new version with a link to an ready-to-use built APK here and mark this as "qa-[versionNumber.wrapperRevision]".

If you'd like to help testing, please read ahead.

RULES FOR QUALITY ASSURANCE

  • (Below) Give a "thumbs up" if you have tested the APK and didn't observe major bugs or problems during the timeframe you've used it.
  • (Below) Give a "thumbs down" if you have tested the APK and encountered major bugs, problems or data loss during the timeframe you've used it. Please try to capture and attach the Android logcat output if possible. We'll then see if it's a problem with the wrapper or syncthing core and accordingly forward the bug report to the right repo.
  • Please do not use this issue for discussion, enhancement wishes or bug reports that already are filed as an issue on this repository.

A release of the wrapper including the new syncthing core version will be pushed out

  • when a qa-post below reached 20 thumbs up
  • and no critical bugs were reported so far.

[FR] Show percentage of used RAM on status tab

Especially older devices have problems when syncthing core is using up too much memory. The user should be warned using a notification when RAM usage is too high related to the setup "how many data is being synced" as this triggers RAM usage.

Thank You

@Catfriend1 - Thank you very much for doing this. While I have used STA for several years, I have never felt comfortable recommending it to anyone. It's perpetually been in a state of 'never quite working right' - and sometimes worse. I have often said that STA is a crack-addicted elephant riding a unicycle on a high-wire; it eats too much, sweats a lot, and frequently falls over.

With respect to UX and features, the wrapper has not changed much over the years. This would be forgivable if stability and performance were steadily improving. But, I think that many would share my opinion that they have not. From the outside, the STA project feels stuck, and reading through recent discussions (including the links you provided, justifying the fork) has only validated that perception.

This fork, in my opinion, is the most positive development since @Zillode's 'Silk' fork, which similarly addressed some UX shortfalls (as well as file-watching, of course). In fact, I used Silk for many months past its expiration date... but ultimately abandoned STA, altogether, because the mainline releases were either hurting my batteries or falling over - or both. More than that, it seemed from the outside that obvious shortcomings were not being addressed (or even acknowledged) in a timely manner, and this undermined Syncthing's credibility as a viable alternative to closed-source solutions. If STA wants to be a perpetual experiment - just for fun, that's totally cool; but then it needs to stop making claims that it's a contender.

So I'm grateful for your decision. In the short term, I and many others will immediately benefit from this nimble, sensible fork; in the long term, hopefully, it will influence the mainline project in a meaningful way. You're doing the right thing - and nobody expects perfection.

Syncthing for Android is suddenly interesting again. Thank you.

IllegalStateException: Fragment already added

Description of the issue

Reproducer

Version Information

App Version: 0.x.y
Syncthing Version: v0.x.y
Android Version: Android x.y / Cyanogenmod x / ...

Android Log

adb shell / logcat
or MatLog (search on GitHub) output

java.lang.IllegalStateException: Fragment already added: DeviceListFragment{6c7fa09 #9 id=0x7f0900b0}
at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1892)
at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:760)
at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2590)
at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2377)
at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2332)
at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:2209)
at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:649)
at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:167)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1238)
at android.support.v4.view.ViewPager.populate(ViewPager.java:1086)
at android.support.v4.view.ViewPager.setAdapter(ViewPager.java:534)
at com.nutomic.syncthingandroid.activities.MainActivity.updateViewPager(MainActivity.java:267)
at com.nutomic.syncthingandroid.activities.MainActivity.onServiceStateChange(MainActivity.java:108)
at com.nutomic.syncthingandroid.service.SyncthingService.lambda$onServiceStateChange$10$SyncthingService(SyncthingService.java:599)
at com.nutomic.syncthingandroid.service.SyncthingService$$Lambda$12.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java)
at android.os.Handler.dispatchMessage(Handler.java)
at android.os.Looper.loop(Looper.java)
at android.app.ActivityThread.main(ActivityThread.java)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)

Override changes button not appearing on sendonly folder

Wrapper UI does not show the "override changes" button. It only shows "Out of sync".

Description of the issue

Folder endpoint: {
"globalBytes": 26015110,
"globalDeleted": 52,
"globalDirectories": 0,
"globalFiles": 1,
"globalSymlinks": 0,
"ignorePatterns": false,
"inSyncBytes": 0,
"inSyncFiles": 0,
"invalid": "",
"localBytes": 0,
"localDeleted": 27,
"localDirectories": 0,
"localFiles": 0,
"localSymlinks": 0,
"needBytes": 26015110,
"needDeletes": 0,
"needDirectories": 0,
"needFiles": 1,
"needSymlinks": 0,
"pullErrors": 0,
"sequence": 145,
"state": "idle",
"stateChanged": "2018-08-26T08:25:01.816026593Z",
"version": 145
}
Web UI
image

Version Information

App Version: 0.14.50.rc2.4

[FR] Syncthing should complain loudly when items fail

Quote from @klement syncthing/syncthing-android#747

Nexus 6P/Android 7.0/Syncthing v0.14.6
I recently hit a permissions issue which stopped my sync - even though SOME items couldn't sync, NO items would be synced. I only noticed this because I changed my pwd database on the PC and needed to use it the next day on mobile and it wasn't synced.
So if there are any items failed - syncthing should complain loudly using a notification instead of silently not doing its job.

Onboarding screen doesn't look well in smaller screens

Description of the issue

The onboarding screen is a nice thing to have which is missing in the official android app. It could be made a little more better on smaller screens. The following is how it looks on a 4.3" screen:

screenshot_2018-11-17-00-47-37

Reproducer

  1. If already installed, clear the data of the app or re-install the app.
  2. Open the app

Version Information

App Version: 0.14.51.13
Syncthing Version: 0.14.51.13
Android Version: Android 5.1.1

Syncthing silently quits or is terminated, show user notification

Quote from @wiwie syncthing/syncthing-android#1172

what happened
folder only syncs with other devices if I open the web UI in the syncthing android client.
what you expected to happen instead
the sync should start immediately after adding the sync, without having to open the web UI
any steps to reproduce the problem.
-> Opened syncthing android client
-> Added a new local folder as sync
-> Added some remote devices for sync
-> waiting for folder to be synced for other devices
-> other devices get "new folder" request
-> confirm request
-> no sync is happening
-> opening web UI on syncthing android
-> sync starts instantly

[FR] Exit button that can disable service mode

Quote from @Jonast

the Exit button remains available but prompts a dialog that tells me exiting is only possible with disabling the service along with it, and asks me to confirm? At least that would make it much clearer what the culprit is and what is going to change when fully exiting anyway

If you have issues with this fork, feel free to post them. I'll look into them if a good reproducer or log is provided.

Description of the issue

Reproducer

Version Information

App Version: 0.x.y
Syncthing Version: v0.x.y
Android Version: Android x.y / Cyanogenmod x / ...

Android Log

adb shell / logcat
or MatLog (search on GitHub) output

[FR] Feature Request: Different synchronisation conditions per folder

Quote from @cdrfun at syncthing/syncthing-android#1225

Hi there, it would be great if you could define different synchronisation conditions per folder.
Possible use case:
One folder which is important should always be up to date - no matter if I'm on WiFi or battery. For me this would be my folder with the password manager database.
Other folders like photos could be synched only with WiFi and/or battery.
Would this be possible given the current architecture?
What do you think about this idea, aside from technicalities.
Greetings!

[FR] Add option to trigger sync every hour

Quote from @alok0 syncthing/syncthing-android#769

If set to "Always run in background" and "Sync only on wifi" it prevents me from manually starting syncthing with the dialog box "Syncthing is disabled"
Feature Request: The "Syncthing is disabled" dialog should have options other than "Exit" and "Change Settings".
Perhaps a "Manually enabled" for one session, or "Enable for 15 minutes".
Sometimes I just need to pull down a file that didn't make it while I was at home.

android.view.ViewRootImpl$CalledFromWrongThreadException if key generation failed

Description of the issue

Reported by @Avamander in #44.
Quote: @Catfriend1 the app crashes on the key generation screen.

Reproducer

Run app for the first time. Simulate key generation to fail. App will crash then instead of showing a message.

Version Information

App Version: 0.14.51.rc3.2
Syncthing Version: v0.14.51-rc.3
Android Version: Android 7.1.2

Android Log

E/AndroidRuntime( 9864): FATAL EXCEPTION: AsyncTask #1
E/AndroidRuntime( 9864): Process: com.github.catfriend1.syncthingandroid.debug, PID: 9864
E/AndroidRuntime( 9864): java.lang.RuntimeException: An error occured while executing doInBackground()
E/AndroidRuntime( 9864):        at android.os.AsyncTask$3.done(AsyncTask.java:300)
E/AndroidRuntime( 9864):        at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
E/AndroidRuntime( 9864):        at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
E/AndroidRuntime( 9864):        at java.util.concurrent.FutureTask.run(FutureTask.java:242)
E/AndroidRuntime( 9864):        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
E/AndroidRuntime( 9864):        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
E/AndroidRuntime( 9864):        at java.lang.Thread.run(Thread.java:841)
E/AndroidRuntime( 9864): Caused by: android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
E/AndroidRuntime( 9864):        at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6027)
E/AndroidRuntime( 9864):        at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:820)
E/AndroidRuntime( 9864):        at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 9864):        at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 9864):        at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 9864):        at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 9864):        at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:352)
E/AndroidRuntime( 9864):        at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 9864):        at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 9864):        at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:352)
E/AndroidRuntime( 9864):        at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 9864):        at android.view.View.requestLayout(View.java:16455)
E/AndroidRuntime( 9864):        at android.widget.TextView.checkForRelayout(TextView.java:6600)
E/AndroidRuntime( 9864):        at android.widget.TextView.setText(TextView.java:3813)
E/AndroidRuntime( 9864):        at android.widget.TextView.setText(TextView.java:3671)
E/AndroidRuntime( 9864):        at android.widget.TextView.setText(TextView.java:3646)
E/AndroidRuntime( 9864):        at com.nutomic.syncthingandroid.activities.FirstStartActivity$KeyGenerationTask.doInBackground(FirstStartActivity.java:484)
E/AndroidRuntime( 9864):        at com.nutomic.syncthingandroid.activities.FirstStartActivity$KeyGenerationTask.doInBackground(FirstStartActivity.java:465)
E/AndroidRuntime( 9864):        at android.os.AsyncTask$2.call(AsyncTask.java:288)
E/AndroidRuntime( 9864):        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
E/AndroidRuntime( 9864):        ... 3 more
W/ActivityManager(  600):   Force finishing activity com.github.catfriend1.syncthingandroid.debug/com.nutomic.syncthingandroid.activities.FirstStartActivity

App has hang bug

Issue quote from syncthing/syncthing-android#1226
@Jonast
This problem is fixed in Syncthing-Fork. Feel free to try it from this repo and provide feedback.

If you have issues with this fork, feel free to post them. I'll look into them if a good reproducer or log is provided.

Description of the issue

Reproducer

Version Information

App Version: 0.x.y
Syncthing Version: v0.x.y
Android Version: Android x.y / Cyanogenmod x / ...

Android Log

adb shell / logcat
or MatLog (search on GitHub) output

Looking for translators

Hi together!

I'd appreciate any help in doing the translations for Syncthing-Fork as I'm currently working on English and German translations. If you like to assist the project providing translations for "your language", please chime in here and tell me your account name on Transifex. The project is located here (as mentioned in the Wiki):
https://www.transifex.com/catfriend1/syncthing-android-1

Kind regards
Catfriend1

Looking for translators

Hi together!

I'd appreciate any help in doing the translations for Syncthing-Fork as I'm currently working on English and German translations. If you like to assist the project providing translations for "your language", please chime in here and tell me your account name on Transifex. The project is located here (as mentioned in the Wiki):
https://www.transifex.com/catfriend1/syncthing-android-1

Kind regards
Catfriend1

When I try to select a folder on the device, the application crashes

Quote from @rakleed at ( #44 (comment) )

LineageOS 15.1, Android 8.1.0, OnePlus 3.
10-23 23:34:04.592 D/AndroidRuntime(20068): Shutting down VM
10-23 23:34:04.595 E/AndroidRuntime(20068): FATAL EXCEPTION: main
10-23 23:34:04.595 E/AndroidRuntime(20068): Process: com.github.catfriend1.syncthingandroid.debug, PID: 20068
10-23 23:34:04.595 E/AndroidRuntime(20068): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.OPEN_DOCUMENT_TREE (has extras) }
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1937)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1616)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.app.Activity.startActivityForResult(Activity.java:4487)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:767)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.app.Activity.startActivityForResult(Activity.java:4445)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:754)
10-23 23:34:04.595 E/AndroidRuntime(20068): at com.nutomic.syncthingandroid.activities.FolderActivity.onPathViewClick(FolderActivity.java:260)
10-23 23:34:04.595 E/AndroidRuntime(20068): at com.nutomic.syncthingandroid.activities.FolderActivity.lambda$onCreate$0$FolderActivity(FolderActivity.java:196)
10-23 23:34:04.595 E/AndroidRuntime(20068): at com.nutomic.syncthingandroid.activities.FolderActivity$$Lambda$0.onClick(Unknown Source:2)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.view.View.performClick(View.java:6294)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.view.View$PerformClick.run(View.java:24770)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.os.Handler.handleCallback(Handler.java:790)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.os.Handler.dispatchMessage(Handler.java:99)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.os.Looper.loop(Looper.java:164)
10-23 23:34:04.595 E/AndroidRuntime(20068): at android.app.ActivityThread.main(ActivityThread.java:6494)
10-23 23:34:04.595 E/AndroidRuntime(20068): at java.lang.reflect.Method.invoke(Native Method)
10-23 23:34:04.595 E/AndroidRuntime(20068): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
10-23 23:34:04.595 E/AndroidRuntime(20068): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
10-23 23:34:04.601 W/ActivityManager( 1030): Force finishing activity com.github.catfriend1.syncthingandroid.debug/com.nutomic.syncthingandroid.activities.FolderActivity
10-23 23:34:04.610 I/ActivityManager( 1030): Showing crash dialog for package com.github.catfriend1.syncthingandroid.debug u0

[FR] Add offline "Tips & Tricks" library

A tip of the day should be available built into the app not requiring any internet connection.

Reason:
There is currently much nice-to-knows and need-to-know knowledge around which users helps setting up the android sync part correctly. This would reduce support requests and be comfortable for the users as they won't have to open a browser to look at the wiki.

Draft:
It should be a new action on the pullable drawer on the left opening a separate activity where a user can swipe through tips shown as simple text with a headline one by one to learn more about using syncthing on android efficiently.

Sidenote:

  • No Popups
  • Multiple slides the user can swipe through

Possible topics:

  1. @schmendrik #44 (comment)

I can't activate any sync conditions other than "Run on WiFi". They are disabled/greyed out.
Edit: Alright, seems I have to first enable the options in the global Run Conditions settings. Not quite what I would expect from a user's perspective.

  1. Advice or solution to #82 "[FR] Advise users to let syncthing send data to local networks only"

Crash with "Explicit termination method 'close' not called" - exit code 9

Quote from @ProactiveServices syncthing/syncthing-android#1217

I switched off power saving mode on my Android and noticed Syncthing's notification icon shuffled, then found this in the log. Syncthing is set to respect battery saving mode.
App Version: 0.10.13
Syncthing Version: v0.14.49-dirty
Android Version: Android 5.0.2

The conditions/settings listed in the Status tab are the same from when I had the crash:
Syncthing is running.
Allowed to run on mobile data, but not connected
Allowed to run on WiFi and connected
Allowed to run on non-metered WiFi. Active WiFi is non-metered.
Allowed to run on the current WiFi.
In the options: Run when devices is powered by AC and battery.
Respect battery saving setting: Enabled
Respect Auto-sync data setting: Disabled
When I switch on power saving Syncthing is still running, the status pane is unchanged. I tried exiting and quitting the app, and starting it in power saving mode and the same happens. I can see in the Android options that power saving is enabled.

Crashed again and this time the Android log mentions a Syncthing crash, and I received a notification of the crash. The Syncthing logfile only showed the first few lines of a regular start-up and nothing else after folders being ready. I think (but not sure) that I had turned off WiFi at the time. I may have enabled Power Save but not sure. I'm using the debug build you linked earlier.
08-18 00:42:19.361 I/SyncthingNativeCode(14485): [YECXW] INFO: Ready to synchronize (sendreceive)
08-18 00:42:19.571 I/System (14485): exec(sh @ com.nutomic.syncthingandroid.util.Util.runShellCommand:181)
08-18 00:42:19.661 I/SyncthingRunnable(14485): Syncthing exited with code 9
08-18 00:42:19.661 W/SyncthingRunnable(14485): Syncthing has crashed (exit code 9)
08-18 01:13:40.572 I/System (14485): exec(/system/bin/logcat -t 300 -v time -s SyncthingNativeCode @ com.nutomic.syncthingandroid.activities.LogActivity$UpdateLogTask.getLog:155)
08-18 01:13:49.821 I/System (14485): exec(/system/bin/logcat -t 300 -v time *:i ps:s art:s @ com.nutomic.syncthingandroid.activities.LogActivity$UpdateLogTask.getLog:155)

I'm currently working on this on my branch.

W/SyncthingRunnable(14485): Syncthing has crashed (exit code 9)
The crash handler is little bit outdated, so I'm improving it with the UI telling if syncthing crashed and showing the notification under correct circumstances. When I've tested through enough, I'll make a new RC.

[Experimental] Looking for testers of new wrapper release

Hi,

I'm currently testing syncthing (core) 1.0.0 from upstream repository if it works well in the android wrapper. As event handling for example changed upstream, I need to test this before releasing a new version - and if there are problems - adjust the wrapper code.

I appreciate your help on this. If you'd like to help, please backup any important data and your syncthing configuration - then report any issues found during testing this APK referring to its version and date.

[FR] Use default folder path given in config.xml

Reported by @MartinX3 at ( #44 (comment) ):

Btw, I can't changed the standard folder path for new folders. I changed it in the web interface, but it doesn't change in the app itself.

  • Use default folder path given in config.xml
  • Preconfigure the default folder path to "/storage/emulated/0" or "/storage/xxxx-yyyy/Android/data/com.github.catfriend1.syncthingandroid/files"

Looking for translators

Hi together!

I'd appreciate any help in doing the translations for Syncthing-Fork as I'm currently working on English and German translations. If you like to assist the project providing translations for "your language", please chime in here and tell me your account name on Transifex. The project is located here (as mentioned in the Wiki):

Kind regards
Catfriend1

Documentation - Privacy policy document

Hi,
I think an app such as this, needs a proper privacy policy document. Which I will be glad to draft one for the project, while I'm constant communication with you.
I await your response.

Syncthing eats CPU even when doing nothing / Battery eater

Quote from @klement on syncthing-android issue tracker:

Phone is warm and little cluster is running at or near max frequency most of the time while syncthing is running. Looking at a local shell and 'top', I see that libsyncthing.so eats slightly more than 100% CPU (107, 103, 114, ...) i.e. 1 core and a bit.
This is in a state with one peer and both phone and the other peer say that everything is up to date.
image
Is it expected to take one CPU to do that if nothing in the folder changes? I'm using it as a backup - meaning that the other side (the other peer) never ever changes the directory. Syncthing is configured to run on wifi and charging. I plug it into charger in the evening and the syncing is usually finished quickly. But the phone is still warm in the morning (+8 hours) and the CPU is still ~100%.
Just before filling this bug, I removed syncthing and wiped all .stfolder stuff. Also made sure there is no stale Android data. It seems this didn't help. Screenshots of state in the morning. Last write to sdcard is titanium backup running at 3am. Screenshots taken at 8am.
That's not it. I've added /Whatsapp/Databases to .stignore but the CPU usage is still ~100% all the time. The other side says that the last update was over an hour ago. The folder is not being scanned and there are no incoming or outgoing transfers.
Side note: These whatsapp databases are updated rarely (I think once a day or once a couple of hours), so eitherway they wouldn't be the cause.

Context.startForegroundService() did not then call Service.startForeground()

Quote from @ Catfriend1 syncthing/syncthing-android#1192

From GPlay Console
image

Impact
Android 8+ users cannot run syncthing as a background service without getting a hang if the service startup takes longer than 5 seconds. This is due to a recently introduced android restriction. There were also some users leaving feedback on google play related to this problem that "Syncthing would hang a lot on Android 8+".

Quote from https://stackoverflow.com/a/45047542

From Google's docs on Android 8.0 behavior changes:

The system allows apps to call Context.startForegroundService() even while the app is in the background. However, the app must call that service's startForeground() method within five seconds after the service is created.
Solution: Call startForeground in Oncreate() for the Service which you use Context.startForegroundService().
https://developer.android.com/about/versions/oreo/android-8.0-changes.html
https://developer.android.com/about/versions/oreo/background.html

Wifi run condition needs location to be turned on (Android 8+)

Quote from @ec1oud syncthing/syncthing-android#1129

When I start the app, it immediately shows the dialog "Syncthing is disabled | Do you want to change your preferences?" so then I check Run Conditions yet again. In the case that the only checkbox that I have checked is Always run in background, it should never be disabled, right? But it says that it is anyway.
Now I try unchecking Always run in background. The idea is when I launch the app, it should sync once, right? But it still says it's disabled! What's the point of this checkbox then?
It's been a bit beyond comprehension for the entire life of this project that I can't get it to run quite exactly when I'd like it to: I probably want to run on wifi (except that it drains the battery a bit so maybe sometimes I don't), and I want a way to easily run it in other cases too, when I know I have some data to sync and don't mind the mobile data usage. So, automatic on wifi, and on-demand the rest of the time. So one problem is the settings don't quite enable this use case, and another is that the behavior doesn't correspond to the settings anyway. But it seems to me that it has gotten worse in 0.10.10: it's quite hard to get it to sync anything at all now.

Add information about the fork?

When forks happens theres a few reasons:

  • upstream is dead
  • upstream doesnt want my patches ( they disagree with them / they just hate me)
  • upstream is slow with patches

A few details about a fork

  • This fork (doesnt) rebase frecuently with upstream
  • upstream is slow but im not trying to get them upstream and they eventually all my patches

this are the biggest changes: (i think this is done already)

I know this is not how organically a fork is born, but when you search for syncthing in f-droid as an end user, you get 2 clients and you dont know which one to install

these bits of information would make a choice much easier for the end user

Thanks for considering!

Logo Design

Hey, I am graphic designer and my motivation is make my portfolio better by support open-source projects. I can design a logo for Syncthing Android if you interested.

I am waiting feedback from you.

Best Regards
Baran Pirinçal

Stupid a rule remotely my device

If you have issues with this fork, feel free to post them. I'll look into them if a good reproducer or log is provided.

Description of the issue

Reproducer

Version Information

App Version: 0.x.y
Syncthing Version: v0.x.y
Android Version: Android x.y / Cyanogenmod x / ...

Android Log

adb shell / logcat
or MatLog (search on GitHub) output

Android 8 - Fix home volume not recognized

Home and Downloads volume are not recognized.

Version Information

App Version: 0.14.51.rc3.2
Syncthing Version: v0.14.51-rc.3
Android Version: Android 8.1 @ Samsung I9100

Please make the version explicit on FDroid

Your version and the original one are almost identical on FDroid, which is misleading. At least, the title should be changed to avoid confusing people, with a clear indication that this is is a fork.

I'm also not sure that the original project will accept your use of the term "Syncthing", so renaming this fork completely now would avoid further trouble.

Enhancement request for per-folder(device) sync conditions

Quote from @cdrfun at ( #57 (comment) )

Really nice work!
I had some time to test today, and here is what I've found. (If needed I'll create a separate issue(s)). Some of my labels might not be correct, because I'm using the German version. I use numbers for better referencing, not to indicate any importance:

  1. Folder-Sync condition Start at selected Wifi can't be activated when a option page for an folder is opened where start with wifi is activated. When deactivating/activating the option start with wifi, the option Start at selected Wifi can be set.
  2. Currently folder sync conditions can only limit the folders sync conditions compared to the global conditions. I understand that it is good to have some kind of a global limit. But this puts the user in a tricky situation when he wants one folder to "always sync". He has to max out the global conditions and limit all folders bit the always sync folder. additionally he has to remember to limit all new folders, or he will use more traffic than he thought. Perhaps a separation of syncthing starting conditions and default folder conditions would be a solution.
  3. The Folder-Sync condition dialog has a checkmark in the upper right. This is not necessary, because changes are saved when going back (either using the arrow in the upper left or the back button). Additionally when pressing the checkmark the folder options dialog is revealed and here is the trash icon at the same position. This is not consistent.
  4. When wifi connection is lost, and some folders are configured to run on mobile, syncthing seems to restart completely instead of just pausing non mobile folders. When the wifi connection is regained, syncthing just unpauses the folders - which is correct.

Ignoring a device leads to wrapper crash

Description of the issue

Ignoring a device leads to a crash, accept still works.

Reproducer

Let a new device connect to your mobile syncthing 0.14.51 instance. Hit the "ignore" button on the notification > Crash.

Version Information

App Version: 0.14.51.rc3.1 4157
Syncthing Version: v0.14.51
Android Version: Android 7.1.2

startActivity called from non-Activity context

Reproducer

  1. Start syncthing app.
  2. Go to home screen.
  3. Click the notification to get into MainActivity again.

Version Information

App Version: 0.14.51.3
Syncthing Version: v0.14.51
Android Version: Android 8.1.0 MIUI 10

Android Log

adb shell / logcat
or MatLog (search on GitHub) output

editIgnores causes android.os.FileUriExposedException

Quote from @Catfriend1 syncthing/syncthing-android#1204

  1. Juli 15:14 in der App-Version 4146
    OnePlus One (A0001), Android 7.1
    Log:
    android.os.FileUriExposedException: at android.os.StrictMode.onFileUriExposed (StrictMode.java:1806) at android.net.Uri.checkFileUriExposed (Uri.java:2354) at android.content.Intent.prepareToLeaveProcess (Intent.java:8981) at android.content.Intent.prepareToLeaveProcess (Intent.java:8942) at android.app.Instrumentation.execStartActivity (Instrumentation.java:1519) at android.app.Activity.startActivityForResult (Activity.java:4229) at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult (BaseFragmentActivityApi16.java:54) at android.support.v4.app.FragmentActivity.startActivityForResult (FragmentActivity.java:67) at android.app.Activity.startActivityForResult (Activity.java:4187) at android.support.v4.app.FragmentActivity.startActivityForResult (FragmentActivity.java:732) at android.app.Activity.startActivity (Activity.java:4526) at android.app.Activity.startActivity (Activity.java:4494) at com.nutomic.syncthingandroid.activities.FolderActivity.editIgnores (FolderActivity.java:251) at com.nutomic.syncthingandroid.activities.FolderActivity.lambda$onCreate$3$FolderActivity (FolderActivity.java:178) at com.nutomic.syncthingandroid.activities.FolderActivity$$Lambda$3.onClick (Unknown Source) at android.view.View.performClick (View.java:5637) at android.view.View$PerformClick.run (View.java:22433) at android.os.Handler.handleCallback (Handler.java:751) at android.os.Handler.dispatchMessage (Handler.java:95) at android.os.Looper.loop (Looper.java:154) at android.app.ActivityThread.main (ActivityThread.java:6186) at java.lang.reflect.Method.invoke (Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:779)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.