wolpi / prim-ftpd

FTP server app for android
Other
583 stars 78 forks source link

Access main folder on non-rooted device possible? #305

Closed Gibtnix closed 1 year ago

Gibtnix commented 1 year ago

Hi wolpi,

first of all, thanks again for this brilliant app πŸ‘

Still, I recently ran into an issue with file system access on Android 12. Due to new restrictions, it seems to be impossible to use the internal storage's main folder (i.e. the most root-like directory which is accessible without rooting the device) as the ftp server's directory. For me, this is the best choice as it allows to organize all the device's data using a desktop PC. Still, I'm receiving this error message and Android restricts to use a subdirectory only.

I tried to use the GitHub version instead and granted all full system access, still this error message appears. Is there any option to solve this and access all files on a non-rooted device?

Of course, this issue is caused by Android's restriction... in case that there is no solution, I thought that this might be a workaround: Currently, virtual folders are supported, even though not really customizable. If no other solution exists, my proposal is to rework the virtual folder option such that the user can add/select an arbitrary selection of folders that are merged into the ftp server's virtual folder. Thus, the user could simply select all folders inside the device's main folder that Android allows to access, yielding the closest possible alternative to directly accessing the main folder itself. What do you think, could this be an option?

wolpi commented 1 year ago

When using a non-google-play-version (either from GitHub or F-Droid) and choosing "plain old fileystem" and granting the app full filesystem access, it should be possible to access all files. See README file here on GitHub.

Reworking virtual folders would be quite some work. I would accept PRs ...

Gibtnix commented 1 year ago

Thanks for the clarification! πŸ‘ I checked the readme before, but misunderstood the access-all-files permission. I thought this would work with SAF, too. Just switched to plain file system option and its not only working like a charm, but also is a lot more responsive than the SAF option. Thanks a lot!

By the way: Do you know what's required to accept this permission for the Google Play version? I installed VLC from Google Play and it also has the access-all-files permission, i.e. VLC passed the respective review stage. Did they explain to you where Primitive FTPd failed it? I mean, it's open source, has a clear use case, and the user does not even has to grant this permission...

Reworking virtual folders would be quite some work. I would accept PRs ...

Alright... I understand that this would be some work. Just got this idea because KDE Connect implemented virtual folders such that the user can opt-in the directories. But good to know that it is fine for you, too, to extend this option. Still for the moment. I don't think it's really required.

wolpi commented 1 year ago

By the way: Do you know what's required to accept this permission for the Google Play version?

Google's response is included in README as screenshot. They basically say: Access to device storage not required

Gibtnix commented 1 year ago

Yes, I noticed that. Still, they don't really explain why Primitive FTPd failed their review, whereas other software like VLC does not? I mean, a file server app has a more straightforward demand to access all files than a media player... just wanted to emphasize that Google's rejection seems absolutely unjustified to meπŸ‘ If there is the a developer-independent user-side option to complain about this and to ask for a re-review, I would directly do so... The plain old file system option is so much faster and more responsive than the SAF stuff, thanks a lot for pointing me to thisπŸ‘

Gibtnix commented 1 year ago

Closed as working as expected with plain old file system option. πŸ‘

wolpi commented 1 year ago

That is probably why it's bad when large corporations control platforms

Gibtnix commented 1 year ago

Agreed :+1: