0

I want to mount my phone on my GNU/Linux machine. Mount Android phone file system on Linux manually mentions the Android file system and that is not exactly what I am looking for (which may be the reason I cannot really use the answers).

I tried jmtpfs but my phone does not show up as an MTP device.

The problem with accessing the Android file system is that as a normal user there are really only a few places that you have access to (e.g. you do not have read access to /).

I can access files on the phone using a filemanager installed on the phone. And it is these same files I want to access through a mount point. I imagine it could happen through FUSE that talks to a filemanager installed on the phone.

So I want to have the same access as any filemanager app running on the phone. No more (i.e. I do not want to root the phone), no less (I do not want to have to guess pathnames because some topdirs do not have -r permission). And I want this presented in a nice UNIX-file dir structure so I can do find . -type f | parallel grep foo or cp -r * /mnt/backup or du.

It would be fine if the dirs that I do not have access to where presented as empty read-only, so maybe /mnt/phone/storage/emulated/0 would contain files, but /mnt/phone/storage/ would be empty (apart from the dir emulated).

It would be OK to have to install an app on the phone. I can find some old projects that (try to?) give webdav support on the phone, and that might work, if there is a compatible FUSE webdav client for GNU/Linux.

So what I am really looking for, is someone who has the described setup running, and how this was done.

Ole Tange
  • 33,591
  • 31
  • 102
  • 198
  • 1
    I've always used an FTP server on my Android phone for that, e.g. this one https://play.google.com/store/apps/details?id=be.ppareit.swiftp (no ads, no unneeded features). – Artem S. Tashkinov Jan 26 '22 at 12:23
  • @ArtemS.Tashkinov This works very well. Thank you. One thing seems to be missing: I cannot see my SD-card. – Ole Tange Jan 26 '22 at 12:43

1 Answers1

1

Based on @ArtemS.Tashkinov's comment:

Install "FTP Server (free)" on the phone. Open it.

sudo apt install curlftpfs
mkdir phone
curlftpfs ftp://ftp:[email protected]:2121 phone

Then you can use the dir phone.

The solution has 2 drawbacks:

  • I cannot see how I can access the SD-card
  • There is no caching (so if you access the file twice, you have to transfer it twice).
Ole Tange
  • 33,591
  • 31
  • 102
  • 198