After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 678344 - Rhythmbox fails to get storage info from locked Android 4.0 device using MTP
Rhythmbox fails to get storage info from locked Android 4.0 device using MTP
Status: RESOLVED NOTGNOME
Product: rhythmbox
Classification: Other
Component: Removable Media
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-18 17:48 UTC by Tristian Celestin
Modified: 2012-06-27 19:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tristian Celestin 2012-06-18 17:48:56 UTC
Description:
I have an Android device with Cyanogenmod 9 that uses MTP to transfer files. I have it configured so that after the screen is off for 15 seconds, the device locks and can only be unlocked with a correctly entered password. Whether the device is in the locked or unlocked state seems to affect whether or not certain MTP functions succeed.

If the device is unlocked, then connected to Rhythmbox, MTP access and transfer works as expected.

If the device is locked, then connected to Rhythmbox, only the name of the device can be retrieved. Rhythmbox can't get storage info or get track listings.  Maybe this is by design on Android? 


Steps to Reproduce
1. Lock the Android device
2. Plug the device into an available USB port
3. Start Rhythmbox. Ensure that the MTP plugin is enabled
4. Click the entry labelled "Media Player" in the left hand browser
5. Wait until "Media Player" is replaced by the name of the device
6. Right click on the new device and click "Properties"


Expected Results:
The properties window will display an accurate measurement of how much space is available and what kinds of media files are present. Furthermore, the music browser list on the right hand side is populated with the track names on the device. 



Received Results:
The properties window displays, but is empty. The music browser list is empty.

When "rhythmbox --debug" is run from a terminal, the following message appears:

PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
Android device detected, assigning default bug flags

(rhythmbox:5813): Rhythmbox-WARNING **: libmtp error: Get Storage information failed.

(rhythmbox:5813): Rhythmbox-WARNING **: libmtp error: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.

(rhythmbox:5813): Rhythmbox-WARNING **: libmtp error: (Look this up in ptp.h for an explanation.)
(13:41:31) [0x1834000] [queue_task] rb-mtp-thread.c:142: queueing task: get track list
(13:41:31) [0x1834000] [run_task] rb-mtp-thread.c:619: running task: get track list

(rhythmbox:5813): Rhythmbox-WARNING **: libmtp error: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.

(rhythmbox:5813): Rhythmbox-WARNING **: libmtp error: (Look this up in ptp.h for an explanation.)
(13:41:31) [0x1834000] [get_track_list] rb-mtp-thread.c:424: No albums
(13:41:31) [0xa31470] [device_opened_idle] rb-mtp-source.c:850: unknown libmtp filetype Folder supported
(13:41:31) [0xa31470] [device_opened_idle] rb-mtp-source.c:850: unknown libmtp filetype Text file supported
(13:41:31) [0xa31470] [device_opened_idle] rb-mtp-source.c:850: unknown libmtp filetype HTML file supported

(rhythmbox:5813): Rhythmbox-WARNING **: libmtp error: PTP Layer error 02fe: get_handles_recursively(): could not get object handles.



There is also another case:
If the device is unlocked, connected to Rhythmbox, and re-locks after the storage info and track listings have been acquired, any previous track listings can still be accessed. However, Rhythmbox seems more prone to crash unpredictably in this state.
Comment 1 Jonathan Matthew 2012-06-18 21:24:55 UTC
Yes, android does this deliberately.  I don't see anything we could possibly do about it.
Comment 2 Tristian Celestin 2012-06-18 22:36:56 UTC
Can there be an error message indicating that the device needs to be unlocked to read from it?
Comment 3 Jonathan Matthew 2012-06-19 00:25:15 UTC
If libmtp was capable of giving us that information, perhaps.
Comment 4 Linus Walleij 2012-06-27 19:56:03 UTC
Some people are discussing this at the libmtp mailing list, but we
need suggestions on how to detect it and how to report the condition.