Catfriend1 / syncthing-android

Syncthing-Fork - A Syncthing Wrapper for Android.
Mozilla Public License 2.0
1.14k stars 40 forks source link

Export fails #1089

Closed bege10 closed 5 months ago

bege10 commented 5 months ago

Description of the issue

Export fails. The backup folder contains the index folder and sharedpreferences.dat The logcat shows missing access permission. Syncthing-Fork has permission to access all files and root permission. Syncing works flawlessly.

Reproduction Steps

This was normal behavior on my recent phone but a second try always worked. Now it constantly fails.

Version Information

Device platform info

[ro.product.ab_ota_partitions]: [ImageFv,abl,aop,bluetooth,boot,cmnlib,cmnlib64,devcfg,dsp,dtbo,hyp,keymaster,modem,odm,product,qupfw,recovery,storsec,system,system_ext,tz,vbmeta,vbmeta_system,vbmeta_vendor,vendor,xbl,xbl_config]
[ro.product.board]: [sdm845]
[ro.product.brand]: [SHIFT]
[ro.product.build.date]: [Fri Jan 12 18:58:46 UTC 2024]
[ro.product.build.date.utc]: [1705085926]
[ro.product.build.fingerprint]: [SHIFT/axolotl/axolotl:10/QSV1.210329.038/20220824:user/release-keys]
[ro.product.build.id]: [TQ3A.230901.001]
[ro.product.build.tags]: [release-keys]
[ro.product.build.type]: [user]
[ro.product.build.version.incremental]: [eng.root.20240112.190000]
[ro.product.build.version.release]: [13]
[ro.product.build.version.release_or_codename]: [13]
[ro.product.build.version.sdk]: [33]
[ro.product.cpu.abi]: [arm64-v8a]
[ro.product.cpu.abilist]: [arm64-v8a]
[ro.product.cpu.abilist32]: []
[ro.product.cpu.abilist64]: [arm64-v8a]
[ro.product.device]: [axolotl]
[ro.product.first_api_level]: [29]
[ro.product.locale]: [en-US]
[ro.product.manufacturer]: [SHIFT]
[ro.product.model]: [SHIFT6mq]
[ro.product.name]: [lineage_axolotl]
[ro.product.odm.brand]: [SHIFT]
[ro.product.odm.device]: [axolotl]
[ro.product.odm.manufacturer]: [SHIFT]
[ro.product.odm.model]: [SHIFT6mq]
[ro.product.odm.name]: [lineage_axolotl]
[ro.product.product.brand]: [SHIFT]
[ro.product.product.device]: [axolotl]
[ro.product.product.manufacturer]: [SHIFT]
[ro.product.product.model]: [SHIFT6mq]
[ro.product.product.name]: [lineage_axolotl]
[ro.product.system.brand]: [SHIFT]
[ro.product.system.device]: [axolotl]
[ro.product.system.manufacturer]: [SHIFT]
[ro.product.system.model]: [SHIFT6mq]
[ro.product.system.name]: [lineage_axolotl]
[ro.product.system_ext.brand]: [SHIFT]
[ro.product.system_ext.device]: [axolotl]
[ro.product.system_ext.manufacturer]: [SHIFT]
[ro.product.system_ext.model]: [SHIFT6mq]
[ro.product.system_ext.name]: [lineage_axolotl]
[ro.product.vendor.brand]: [SHIFT]
[ro.product.vendor.device]: [axolotl]
[ro.product.vendor.manufacturer]: [SHIFT]
[ro.product.vendor.model]: [SHIFT6mq]
[ro.product.vendor.name]: [lineage_axolotl]
[ro.product.vendor_dlkm.brand]: [SHIFT]
[ro.product.vendor_dlkm.device]: [axolotl]
[ro.product.vendor_dlkm.manufacturer]: [SHIFT]
[ro.product.vendor_dlkm.model]: [SHIFT6mq]
[ro.product.vendor_dlkm.name]: [lineage_axolotl]$

Android Log

2024-02-16 00:44:06.986 8613 9354 com.github.catfriend1.syncthingandroid W SyncthingService : Failed to export config
java.io.FileNotFoundException: /data/user/0/com.github.catfriend1.syncthingandroid/files/config.xml: open failed: EACCES (Permission denied)
    at libcore.io.IoBridge.open(IoBridge.java:574)
    at java.io.FileInputStream.<init>(FileInputStream.java:160)
    at com.google.common.io.Files$FileByteSource.openStream(Files.java:130)
    at com.google.common.io.Files$FileByteSource.openStream(Files.java:120)
    at com.google.common.io.ByteSource.copyTo(ByteSource.java:264)
    at com.google.common.io.Files.copy(Files.java:326)
    at com.nutomic.syncthingandroid.service.SyncthingService.exportConfig(SyncthingService.java:844)
    at com.nutomic.syncthingandroid.activities.SettingsActivity$SettingsFragment$ExportConfigTask.doInBackground(SettingsActivity.java:1031)
    at com.nutomic.syncthingandroid.activities.SettingsActivity$SettingsFragment$ExportConfigTask.doInBackground(SettingsActivity.java:1012)
    at android.os.AsyncTask$3.call(AsyncTask.java:394)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at java.lang.Thread.run(Thread.java:1012)
Caused by: android.system.ErrnoException: open failed: EACCES (Permission denied)
    at libcore.io.Linux.open(Native Method)
    at libcore.io.ForwardingOs.open(ForwardingOs.java:563)
    at libcore.io.BlockGuardOs.open(BlockGuardOs.java:274)
    at libcore.io.ForwardingOs.open(ForwardingOs.java:563)
    at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7810)
    at libcore.io.IoBridge.open(IoBridge.java:560)
    ... 13 more
Catfriend1 commented 5 months ago

Hmm i don't know... Mine exports just fine under Android 13 or 14. 🤷‍♂️