google / samba-documents-provider

Access network file shares directly from the Android Downloads/Files app
GNU General Public License v3.0
638 stars 125 forks source link

Download/Files app and mounted folder path? #37

Closed carlox97 closed 6 years ago

carlox97 commented 7 years ago

Hello, I dowloaded Android Samba Client. After i set up my network options, the app launches what it seems to be a google app where i see all the directories from my pc (that's great!). This launched app is called "Downloads" but I can't find it on my S8. It just launches after i set up the smb server on android samba client and if i close it i won't be able to open it again. Why can't i find this app on my phone? But most of all, how can i find the mounted smb folder's path in the archive? (Try to speak simple, thanks)

ttanxu commented 7 years ago

The explanation is Samsung hides "Downloads" app from launcher. This app doesn't mount SMB share to any physical path, so 3rd party file manager can't work with it.

Since the app has launched once, Samsung didn't remove the actual functionality. There is an app that might be able to help you launch "Downloads" app. Note that it doesn't mean this is a recommended alternative or a use supported by us. Use it at your own discretion.

carlox97 commented 7 years ago

Thanks for your help. Is there a way (not recommended or supported by you) to make this "mounted" folder accessible to third party apps?

ttanxu commented 7 years ago

Third party apps can already use Android Samba Client, if their developers choose to use it. Those apps that can take Android Samba Client usually start with picking a file/folder, or you explicitly select these apps to view them in "Downloads".

An example of 3rd party apps that support it is Microsoft Office. It can only open files in read-only mode, but it's good enough to be an example.

It's not yet a trend for app developers to support this mechanism, but we hope that it will be so soon.

carlox97 commented 7 years ago

First of all thank you for your help ttanxu. I begin to understand this app... poorly explained by google imo.

"or you explicitly select these apps to view them in Downloads"

What do you mean?

So if i've understood well, "android samba client" does NOT mount a folder on local phone memory which the user can browse as he wants (like vlc or foobar in-app browsing for example, or the archive), right? I just can use "downloads" to pick files in app i want these files to be streamed or imported?

carlox97 commented 7 years ago

Ps: i don't know why "what do you mean?" Is so bolded in upper post.

ttanxu commented 6 years ago

Sorry it takes a long time to get back to you.

First, GitHub uses markdown so you accidentally make "What do you mean?" a section title.

By "explicitly select apps view them in Downloads", I mean you can open Downloads app and view files there, and click on them. Android system will allow you select an app that claims to be able to open that type of files (or open that file if there is only one app that claims so).

I don't think Google needs to explain the underlying technologies Android uses in this project as they're part of Android system, but I'll try to explain it here. These technologies are actually conceptually similar to those in desktop OS. Files are exposed via URLs that only Android system recognizes instead of raw file paths in desktop OS. Apps that work with these URLs can seamlessly work with Android Samba Client. You can take a look at Storage Access Framework, which is the official documentation for the underlying technology. The main reason why Android uses Storage Access Framework rather than raw files is security.

Storage Access Framework only came along in API 19 (KitKat). On the other hand Android allows apps from accessing a specific file system (external storage) since API 1, app developers are so used to using raw file paths that make Storage Access Framework somewhat marginalized. Actually Android team has been promoting Storage Access Framework use, and adding more and more restrictions on raw access to files. Hopefully more apps can adopt Storage Access Framework in the near future.

carlox97 commented 6 years ago

Thank you for your clarification! In my opinion that is limited in a way... let's say I've my 500GB music library on my PC, well, I can't access and browse it with foobar2000 android app, since the folder I previously shared through smb is not mounted in any physical path on the android device.

ttanxu commented 6 years ago

You need to contact foobar2000 for that. Android doesn't provide public API to mount a customized partition.