A stupid little script I wrote because I was tired of screwing with this crap.
I guess I should note that it requires jmtpfs and fuse to be installed, and /home/user/fuckandroid to exist.
I guess I should also mention that you need to unlock the device first.
#!/bin/bash
export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
jmtpfs /home/user/fuckandroid
read -rsp $'Allow connection on phone, then press any key to continue...\n' -n1 key
fusermount -u /home/user/fuckandroid
sleep 1
jmtpfs /home/user/fuckandroid
read -rsp $'Now press any key when you are ready to unmount it.\n' -n1 key
fusermount -u /home/user/fuckandroid