Improvement of https://github.com/neilmarion/mtp