I thought I'd do a little more debugging to see if the MTP issue resided in the Device or in Calibre, and I came up with some potentially useful results.
I tried the same transfer to my phone (Samsung Galaxy S20+), which also has a microSD (what can I say, I like microSD devices). And the transfer succeeded, placing the book(s) into the correct place, i.e. the SDcard.
So, initially, I guessed that the firmware on the TCL tablet was at fault. I further tried to again transfer book(s) to the TCL tablet, but instead I specified that Calibre place them in the internal storage. And, as you have probably guessed by now, the books ended up on the SDcard. Calibre was evidently confusing the SDcard and the internal storage.
I reviewed the device information from each device. The TCL tablet returned:
Spoiler:
Code:
{'device_version': '1.0',
'friendly_name': 'TCL NXTPAPER 11',
'has_bulk_properties': True,
'has_storage': True,
'manufacturer_name': 'TCL',
'model_name': 'TCL NXTPAPER 11',
'protocol': 'MTP: 1.00',
'storage': [{'capacity': 128145522688,
'capacity_objects': 0,
'description': 'SD card',
'filesystem': 'Generic hierarchical',
'free_objects': 1073741824,
'free_space': 128142671872,
'id': 's10001',
'name': 'SD card',
'rw': True,
'type': 'removable_ram'},
{'capacity': 113995907072,
'capacity_objects': 0,
'description': 'Internal shared storage',
'filesystem': 'Generic hierarchical',
'free_objects': 1073741824,
'free_space': 98897649664,
'id': 's20001',
'name': 'Internal shared storage',
'rw': True,
'type': 'fixed_ram'}],
'type': 'unknown'}
while the Samsung phone returned the following:
Spoiler:
Code:
{'device_version': 'G986U1UESBHXJ1',
'friendly_name': 'Galaxy S20+ 5G',
'has_bulk_properties': True,
'has_storage': True,
'manufacturer_name': 'samsung',
'model_name': 'SM-G986U1',
'protocol': 'MTP: 1.00',
'storage': [{'capacity': 115519483904,
'capacity_objects': 0,
'description': 'Internal storage',
'filesystem': 'Generic hierarchical',
'free_objects': 1073741824,
'free_space': 29999812608,
'id': 's10001',
'name': 'Internal storage',
'rw': True,
'type': 'fixed_ram'},
{'capacity': 128144375808,
'capacity_objects': 0,
'description': 'SD card',
'filesystem': 'Generic hierarchical',
'free_objects': 1073741824,
'free_space': 92647325696,
'id': 's20001',
'name': 'SD card',
'rw': True,
'type': 'removable_ram'}],
'type': 'phone'}
Did you see the difference? The TCL device returned the SDcard storage first, then the internal storage, while the Samsung device returned the internal storage first, followed by the SDcard. I speculate that the Calibre code assumes the internal storage is always returned first, followed by whatever external storage is available.
I did a quick scan of the MTP protocol spec (available
here), and found no particular order specified in the device description transaction, but it is several hundred pages long, and I might have missed it.
My guess is that the Calibre MTP code could be made a bit more robust by actually examining the "type" and "name" fields and making decisions based on them, rather than on the order returned.
In any case, I have a short-term workaround, until the code is changed. Hopefully, the change notes will reference MTP when and if the code is corrected.
Regards,
Wanderson