tincapp icon indicating copy to clipboard operation
tincapp copied to clipboard

/sdcard/Android/data inaccessible on Android 13

Open platise opened this issue 1 year ago • 1 comments

I am struggling to edit files on Android 13:

adb: can read but no write permissions, cannot go to adb root unless I root the phone
usb storage mode, can only read
ssh server: same, ready only

Could you return the ftp feature that was removed not that long ago: v0.38 -- 2023-07-30

make configuration files and logs accessible in the user-accessible storage
(in USB storage mode). The embedded FTP server has been removed

platise avatar May 23 '24 10:05 platise

Hi,

The embedded FTP server was removed because it has maintainability, security and reliability issues.

I'm currently investigating other ways to expose the configuration files more reliably on all devices, since the shared directory doesn't seem to be accessible on all vendor variants of Android.

In the meantime, you can still download an older version of the app, containing the embedded FTP server here: https://tincapp.pacien.org/downloads/tincapp.0.37.apk

I might re-introduce it in later versions if I cannot find another way. However I'd like to avoid that for the reasons explained above.

pacien avatar Jun 20 '24 18:06 pacien

Could you allow saving network configuration directory as a ZIP file or updating network configuration directory from a ZIP file?

NyanSten avatar Jul 24 '24 09:07 NyanSten

Yes, I'm considering adding config dir ZIP import/export as a fallback. I'm currently busy with other things and trying to satisfy new requirements from Google Play… Patches are always welcome!

pacien avatar Jul 31 '24 13:07 pacien

Release v0.41 now makes the config and log directories available to the stock file manager and other editor apps. Please test :)

pacien avatar Sep 22 '24 22:09 pacien

When upgrading to 0.41 via the play store all existing configurations are missing from the UI. If I connect via adb they're still in /storage/emulated/0/Android/data/org.pacien.tincapp/files/networks which I can download with adb pull /storage/emulated/0/Android/data/org.pacien.tincapp/files/networks . then push to the Download folder in the file system using adb push networks /storage/emulated/0/Download and then using the file manager UI move the networks to the tinc networks folder.

It would be nice if on upgrade the files are migrated or have some warning about it.

rwky avatar Oct 04 '24 20:10 rwky

Quoting Rowan (2024-10-04 22:32:19)

When upgrading to 0.41 via the play store all existing configurations are missing from the UI. If I connect via adb they're still in /storage/emulated/0/Android/data/org.pacien.tincapp/files/networks which I can download with adb pull /storage/emulated/0/Android/data/org.pacien.tincapp/files/networks . then push to the Download folder in the file system using adb push networks /storage/emulated/0/Download and then using the file manager UI move the networks to the tinc networks folder.

It would be nice if on upgrade the files are migrated or have some warning about it.

That's what is supposed to happen: the files should have been moved automatically when upgrading.

Do you see any error message in the app's log file regarding automatic configuration location migration?

pacien avatar Oct 04 '24 20:10 pacien

Here's the logs

20:40:24.611 [main] INFO  org.pacien.tincapp.context.App - Starting tinc app 0.41 (release build), running on REL (14)
20:40:24.639 [main] INFO  o.p.tincapp.context.StorageMigrator - Migrating files present in old configuration directory at /storage/emulated/0/Android/data/org.pacien.tincapp/files to /data/user/0/org.pacien.tincapp/files
20:40:24.642 [main] WARN  o.p.tincapp.context.StorageMigrator - Could not complete configuration directory migration: /storage/emulated/0/Android/data/org.pacien.tincapp/files/rList -> /data/user/0/org.pacien.tincapp/files/rList: The destination file already exists.
20:40:24.646 [main] INFO  o.p.tincapp.context.StorageMigrator - Clearing old cache directory at /storage/emulated/0/Android/data/org.pacien.tincapp/cache
22:01:31.661 [main] INFO  org.pacien.tincapp.context.App - Starting tinc app 0.41 (release build), running on REL (14)
22:01:31.934 [main] INFO  o.p.tincapp.context.StorageMigrator - Migrating files present in old configuration directory at /storage/emulated/0/Android/data/org.pacien.tincapp/files to /data/user/0/org.pacien.tincapp/files
22:01:31.936 [main] WARN  o.p.tincapp.context.StorageMigrator - Could not complete configuration directory migration: /storage/emulated/0/Android/data/org.pacien.tincapp/files/rList -> /data/user/0/org.pacien.tincapp/files/rList: The destination file already exists.
22:01:43.631 [main] INFO  org.pacien.tincapp.context.App - Starting tinc app 0.41 (release build), running on REL (14)
22:01:43.637 [main] INFO  o.p.tincapp.context.StorageMigrator - Migrating files present in old configuration directory at /storage/emulated/0/Android/data/org.pacien.tincapp/files to /data/user/0/org.pacien.tincapp/files
22:01:43.639 [main] WARN  o.p.tincapp.context.StorageMigrator - Could not complete configuration directory migration: /storage/emulated/0/Android/data/org.pacien.tincapp/files/rList -> /data/user/0/org.pacien.tincapp/files/rList: The destination file already exists.

I've done this on two devices so far the same thing happened on both

rwky avatar Oct 04 '24 21:10 rwky

Quoting Rowan (2024-10-04 23:11:54)

/data/user/0/org.pacien.tincapp/files/rList: The destination file already exists.

Thank you for sharing the log; Seems like some system file made the whole automatic migration process fail. I've just released a new version (v0.42) which should fix that.

pacien avatar Oct 04 '24 21:10 pacien

I can confirm that v0.41 works for me and I can edit the configuration files on my phone. Thanks!

NyanSten avatar Oct 04 '24 22:10 NyanSten

I can confirm that upgrading from 0.40 to 0.42 the configuration files migrate, thanks :)

rwky avatar Oct 07 '24 09:10 rwky

Thanks everyone for the feedbacks! I think this issue is now resolved; closing.

pacien avatar Oct 07 '24 09:10 pacien