Syncthing release v0.14.50-rc.1 don't work in Android


(Boris Brakhin) #1

Hi to everybody ! Today I have downloaded the source of Syncthing for Android v0.14.50-rc.1 but when I started the compiled application I have such error :

08-08 20:53:24.881 1144-1144/com.nutomic.syncthingandroid.debug E/WindowManager: android.view.WindowLeaked: Activity com.nutomic.syncthingandroid.activities.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{3b8f4519 V.E..... R......D 0,0-683,224} that was originally added here
        at android.view.ViewRootImpl.<init>(ViewRootImpl.java:461)
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:315)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
        at android.app.Dialog.show(Dialog.java:338)
        at android.app.AlertDialog$Builder.show(AlertDialog.java:1009)
        at com.nutomic.syncthingandroid.activities.StateDialogActivity.showLoadingDialog(StateDialogActivity.java:135)
        at com.nutomic.syncthingandroid.activities.StateDialogActivity.onServiceStateChange(StateDialogActivity.java:75)
        at com.nutomic.syncthingandroid.activities.StateDialogActivity.bridge$lambda$0$StateDialogActivity(StateDialogActivity.java)
        at com.nutomic.syncthingandroid.activities.StateDialogActivity$$Lambda$6.onServiceStateChange(Unknown Source)
        at com.nutomic.syncthingandroid.service.SyncthingService.registerOnServiceStateChangeListener(SyncthingService.java:545)
        at com.nutomic.syncthingandroid.activities.StateDialogActivity.lambda$onCreate$0$StateDialogActivity(StateDialogActivity.java:36)
        at com.nutomic.syncthingandroid.activities.StateDialogActivity$$Lambda$0.onServiceConnected(Unknown Source)
        at com.nutomic.syncthingandroid.activities.SyncthingActivity$$Lambda$0.accept(Unknown Source)
        at com.annimon.stream.Stream.forEach(Stream.java:1479)
        at com.nutomic.syncthingandroid.activities.SyncthingActivity.onServiceConnected(SyncthingActivity.java:74)
        at com.nutomic.syncthingandroid.activities.MainActivity.onServiceConnected(MainActivity.java:295)
        at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1338)
        at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1355)
        at android.os.Handler.handleCallback(Handler.java:815)
        at android.os.Handler.dispatchMessage(Handler.java:104)
        at android.os.Looper.loop(Looper.java:194)
        at android.app.ActivityThread.main(ActivityThread.java:5940)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:987)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:782)

And another error is :

8-08 21:31:02.763 8141-8224/? E/SyncthingRunnable: Failed to execute syncthing binary or read output
    java.io.IOException: Error running exec(). Command: [/data/app/com.nutomic.syncthingandroid.debug-1/lib/arm/libsyncthing.so, -generate, /data/data/com.nutomic.syncthingandroid.debug/files, -logflags=0] Working Directory: null Environment: [STTRACE=, ANDROID_ROOT=/system, EMULATED_STORAGE_SOURCE=/mnt/shell/emulated, LOOP_MOUNTPOINT=/mnt/obb, USBOTG_STORAGE=/storage/usbotg, ANDROID_BOOTLOGO=1, EMULATED_STORAGE_TARGET=/storage/emulated, STNORESTART=1, STHASHING=minio, STGUIASSETS=/storage/emulated/0/Android/data/com.nutomic.syncthingandroid.debug/files/gui, EXTERNAL_STORAGE=/storage/emulated/legacy, SYSTEMSERVERCLASSPATH=/system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar:/system/framework/hwServices.jar:/system/framework/hwcustservices.jar:/system/framework/hwWifi-service.jar, ANDROID_SOCKET_zygote=11, PATH=/sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin, ANDROID_DATA=/data, ANDROID_ASSETS=/system/app, ASEC_MOUNTPOINT=/mnt/asec, HOME=/storage/emulated/0, BOOTCLASSPATH=/system/framework/core-libart.jar:/system/framework/conscrypt.jar:/system/framework/okhttp.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/telephony-common.jar:/system/framework/voip-common.jar:/system/framework/ims-common.jar:/system/framework/mms-common.jar:/system/framework/android.policy.jar:/system/framework/apache-xml.jar:/system/framework/hwEmui.jar:/system/framework/hwTelephony-common.jar:/system/framework/hwAndroid.policy.jar:/system/framework/hwframework.jar:/system/framework/hwcustframework.jar:/system/framework/hwpostcamera.jar:/system/framework/hwcustTelephony-common.jar:/system/framework/hwcustAndroid.policy.jar:/system/framework/org.simalliance.openmobileapi.jar:/system/framework/mediatek-common.jar:/system/framework/mediatek-framework.jar:/system/framework/mediatek-telephony-common.jar, ANDROID_PROPERTY_WORKSPACE=9,0, STNOUPGRADE=1, SECONDARY_STORAGE=/storage/sdcard1, ANDROID_STORAGE=/storage]
        at java.lang.ProcessManager.exec(ProcessManager.java:211)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:195)
        at com.nutomic.syncthingandroid.service.SyncthingRunnable.setupAndLaunch(SyncthingRunnable.java:464)
        at com.nutomic.syncthingandroid.service.SyncthingRunnable.run(SyncthingRunnable.java:136)
        at com.nutomic.syncthingandroid.service.SyncthingRunnable.run(SyncthingRunnable.java:107)
        at com.nutomic.syncthingandroid.util.ConfigXml.<init>(ConfigXml.java:69)
        at com.nutomic.syncthingandroid.service.SyncthingService$StartupTask.doInBackground(SyncthingService.java:337)
        at com.nutomic.syncthingandroid.service.SyncthingService$StartupTask.doInBackground(SyncthingService.java:322)
        at android.os.AsyncTask$2.call(AsyncTask.java:292)
        at java.util.concurrent.FutureTask.run(FutureTask.java:237)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
        at java.lang.Thread.run(Thread.java:831)
     Caused by: java.io.IOException: No such file or directory
        at java.lang.ProcessManager.exec(Native Method)
        at java.lang.ProcessManager.exec(ProcessManager.java:209)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:195) 
        at com.nutomic.syncthingandroid.service.SyncthingRunnable.setupAndLaunch(SyncthingRunnable.java:464) 
        at com.nutomic.syncthingandroid.service.SyncthingRunnable.run(SyncthingRunnable.java:136) 
        at com.nutomic.syncthingandroid.service.SyncthingRunnable.run(SyncthingRunnable.java:107) 
        at com.nutomic.syncthingandroid.util.ConfigXml.<init>(ConfigXml.java:69) 
        at com.nutomic.syncthingandroid.service.SyncthingService$StartupTask.doInBackground(SyncthingService.java:337) 
        at com.nutomic.syncthingandroid.service.SyncthingService$StartupTask.doInBackground(SyncthingService.java:322) 
        at android.os.AsyncTask$2.call(AsyncTask.java:292) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:237) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
        at java.lang.Thread.run(Thread.java:831) 

Please help to solve it.


(Catfriend1) #2

Hi, Does the APK 4147 on the gplay beta channel work correctly? On my phone it does. It looks to me you are trying to build on your own? Then please check you’ve correctly built the syncthing.so native binary for arm and arm64 before packaging the apk. Go version currently is 1.9.x


(Boris Brakhin) #3

Everything works - I did not build the library properly