whoozle / android-file-transfer-linux

Android File Transfer for Linux (and macOS!)
http://whoozle.github.io/android-file-transfer-linux/
GNU Lesser General Public License v2.1
1.43k stars 120 forks source link

Mount `/` instead of `/storage/emulated/0/` #339

Closed bphd closed 4 months ago

whoozle commented 4 months ago

Can you start GUI and check if storage drop down is working for you?

bphd commented 4 months ago

Well I can acheive to mount as is when connecting, it mounts /storage/emulated/0/

Can you start GUI and check if storage drop down is working for you?

whoozle commented 4 months ago

The reason I'm asking, is that MTP can only access file system via "storages". Their list is in that drop down I mentioned, also there's a way of getting "combined" view of all storages all together. If there's no root - then it's not possible.

bphd commented 4 months ago

I'm rooted but I want to know how to modify the content of that drop-down list, to make appearing root

whoozle commented 4 months ago

it's sent via MTP protocol, I guess you need to look into android MTP host sources to achieve that, not MTP protocol itself

bphd commented 4 months ago

Where to look that?

whoozle commented 4 months ago

I think here:

https://android.googlesource.com/platform/packages/services/Mtp/+/refs/heads/main/src/com/android/mtp

I think the host side MTP entry point is

https://android.googlesource.com/platform/packages/services/Mtp/+/refs/heads/main/src/com/android/mtp/MtpService.java

But I'm no android expert at all.

There's also kernel helper for transferring files, but I guess it's irrelevant in a case you want to expose root fs.