Nexus 5 with stock Android 4.4.4
Ubuntu Desktop 14.04 LTS
If I plug my phone into my computer, it's automatically detected and mounted. Using nautilus I can navigate to my DCIM/Camera folder and copy the photos to my desktop.
I wanted to automate this process, and so I wrote a script that runs after the phone has been mounted. It automatically detects the mount point (usually something like
/run/user/1000/gvfs/mtp:host=%5Busb%3A001%2C004%5D/), retrieves a list of the photos and copies them to my desktop using
I took me a long time to notice, but command line tools (like
md5sum) do not see the last 32 bytes of the files. When I copy the files to my desktop, the final 32 byes of all files are missing. If I take an
md5sum hash of the files, the hash returned is for a file that is missing those same 32 bytes.
I've googled a bit, and can't find anyone with a similar problem.