When accessing to a directory in a Samsung device, libmtp fails saying "Could not get object handles", if the number N of files in the directory makes the relation
N * 4 + 16 = i * 512
true (this has been tested for i=1, 2, 3 (124, 252, 380 files), but reasonably every next value for i would trigger the bug (?)).
The mailing list discussion leading to this is here:
https://sourceforge.net/p/libmtp/mailman/libmtp-discuss/thread/1525949259.3609.37.camel%40unipv.it/#msg36314380
, a downstream bug is here:
https://bugzilla.redhat.com/show_bug.cgi?id=1401826
, and a similar problem has been reported here:
https://sourceforge.net/p/libmtp/mailman/message/35954558/ .
The same device works in Windows 7.
Using libmtp 1.1.14 on Fedora 28.
Anonymous
https://sourceforge.net/p/libmtp/bugs/1220/ seems related
I have tried some more things, like replacing the getobjecthandles by getobjproplist, but it seems samsung does not do directory based getobjproplists :/ (or i am doing something wrong)
If it helps you to decide which issues to work on I waisted more time figuring this one out than you might expect getting some valuable photos off of a phone with a cracked screen... 380 of them.
Also, https://sourceforge.net/p/libmtp/bugs/1830 seems related
can you check current libmtp git?
I had for speed reasons enabled the proplist reader, but this seems to cause these breakage :/
I can try but need some help on how to do it. Can I do it on Ubuntu without uninstalling libmtp packages? How can I be sure to run the version (git) I want? Thx
I uploaded a temp snapshot of current git to: https://www.lst.de/~mm/libmtp-1.1.16.tar.gz
./configure --prefix=/usr ; make ; sudo make install will likely do the trick
I managed to install it but not sure how to do the test... should it be somewhere a mtp-file executable nested in the libmtp directory where I performed the above steps from?
I'm having the same problem here. Just bought a new android phone, put my old SD card on the new one and it doesn't work. Same computer, same SD card, diferent phone with diferent android version: the old one is Android 5, the new Android 8.
I have installer the snapshot that Marcus gave (thanks!) and it doesn't work either.
Two ways to see the problem (in my case):
Thanks!
is there any fix soon?
I was having this problem on release 1.1.16-1, but it seems to work on the latest git release (1.1.16.r95.g54e0507-1, as it's labelled in Arch's libmtp-git package).
Any news ??
can you check with 1.1.17 again?
I just tried the 1.1.17 (downloaded as .tar.gz by "download latest version"), and about the feedback some comments above:
this problem seems to be fixed!
Try to copy the 124th file on the folder: it takes some time and then it fails. The phone also fails until you disconnect and connect again. The folder remains "unbrowsable" until I delete the 124th folder in the phone file manager.this one seems to still exist :-(
But please note that, if I add the 124th file on the phone, the folder shows all the files correctly, and afterwards I can also add other files without any problem.
(note to the moderators: I am the author of the last comment)
I have tested also current git (f5ea96b1879dba9952c1c3ad12ada5aff1334352), and found that 123 files are ok, 125 files are ok, but 124 files generate "input/output error" (although it does not make the system freeze as it did before)
I got this libmtp "could not get object handles" message directly after my Samsung S2 Android phone did an automatic update. It was working perfectly prior to that, whenever I connected to my Lubuntu laptop via USB. AFTER the phone update, I could browse any folder EXCEPT the internal storage DCIM / Camera folder. It has 508 pics. I wanted to copy some pics to my Ubuntu laptop. As a workaround, I was able to use the phone MyFiles app to "move" some pics from the internal storage over to the SD Card DCIM / Camera folder (I have a 16GB SD card in the phone I use for music). I was then able to browse the SD card/DCIM/Camera folder normally after plugging in the USB to my laptop (only like 15 or so pics that I transferred). I could then copy those pics from the Phone SD card to the laptop. Still frustrating having that error on Phone/DCIM/Camera but at least I could see and transfer after moving the photo's I wanted to the camera's SD card/DCIM/Camera.