4

I mounted my Android phone via jmtpfs (I'm on Centos 7) as a FUSE file system at an arbitrary mountpoint (/phone).

Is it possible to see the disk usage of all the content, the same way I would normally use du or ncdu?

If I try to use those utilities in /phone I get 0B as size for everything.

2 Answers 2

2

ArchWiki has this note:

MTP is messy and its implementation varies between devices. Try the above clients to see which one works best with your device.

I tried go-mtpfs and ncdu seems to work fine with it. If jmtpfs doesn't work for your device combination, try the other clients as well.

1

I was recently solving the same issue on my Ubuntu Focal. I found out, that the device is automatically mounted using MTP into /run/user/$USER/gvfs/ (or /var/run/user/$UID/gvfs). I opened terminal there and ncdu worked like a charm for me.

Related reading: https://askubuntu.com/a/342549

1
  • Works currently on my Fedora 37. Nice and simple answer! My path template: /run/user/$UID/gvfs/mtp:host=<deviceId>. Too bad the management tools on a non-root Android phone are pathetic, the OS takes most of my 32GB internal storage, plenty of apps can't be moved to the SD Card, my last phone of the same model prevented that for any probably due to a defect, other apps don't allow this, nothing seems to regularly clear app caches, but wouldn't help much anyway, and filling up storage quickly with random browsing causes me to miss notifications even with less battery restrictions..........
    – Pysis
    Dec 13, 2022 at 20:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .