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 749639 - afc: Show iDevices through MTP
afc: Show iDevices through MTP
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
: 779481 (view as bug list)
Depends on: 749638
Blocks:
 
 
Reported: 2015-05-20 14:55 UTC by Bastien Nocera
Modified: 2017-03-02 19:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
afc: Remove attempts at thumbnailing photos (7.46 KB, patch)
2015-05-20 14:55 UTC, Bastien Nocera
none Details | Review
gphoto2: Show iDevices through MTP (1.26 KB, patch)
2015-05-20 14:55 UTC, Bastien Nocera
none Details | Review
afc: Correct debug string (978 bytes, patch)
2015-05-20 14:55 UTC, Bastien Nocera
accepted-commit_now Details | Review
afc: Add debug info when house arrest fails to start (912 bytes, patch)
2015-05-20 14:55 UTC, Bastien Nocera
none Details | Review
afc: Remove attempts at thumbnailing photos (7.52 KB, patch)
2016-03-14 11:51 UTC, Bastien Nocera
committed Details | Review
gphoto2: Show iDevices through MTP (1.26 KB, patch)
2016-03-14 11:51 UTC, Bastien Nocera
committed Details | Review
afc: Don't mount the default AFC service (1.58 KB, patch)
2016-03-14 11:51 UTC, Bastien Nocera
committed Details | Review
afc: Add debug info when house arrest fails to start (912 bytes, patch)
2016-03-14 11:51 UTC, Bastien Nocera
committed Details | Review
afc: Do not use G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL (1.09 KB, patch)
2016-05-02 10:41 UTC, Ondrej Holy
committed Details | Review

Description Bastien Nocera 2015-05-20 14:55:14 UTC
.
Comment 1 Bastien Nocera 2015-05-20 14:55:18 UTC
Created attachment 303668 [details] [review]
afc: Remove attempts at thumbnailing photos

iDevices had a list of thumbnails available through afc:/// for photos
stored in the DCIM/ sub-directory, but the code to handle this was
always pretty fragile, relying on the iOS version to know which of a
number of different ways the thumbnails could be called or where they
would be stored.

It's easier to create the thumbnails ourselves from the JPG files, or
even access photos through PTP so that thumbnails are readily
accessible and in a way that doesn't change with each iOS release.
Comment 2 Bastien Nocera 2015-05-20 14:55:23 UTC
Created attachment 303669 [details] [review]
gphoto2: Show iDevices through MTP

There's no interesting data for users in afc:/// so it's best to show
iDevices through MTP instead. Stop hiding iDevices through the MTP.
Comment 3 Bastien Nocera 2015-05-20 14:55:28 UTC
Created attachment 303670 [details] [review]
afc: Correct debug string

g_vfs_afc_monitor_create_volume() can actually create volumeS. So
correct the debug output not to be misleading.
Comment 4 Bastien Nocera 2015-05-20 14:55:32 UTC
Created attachment 303671 [details] [review]
afc: Add debug info when house arrest fails to start

As can happen with some iOS and libplist combinations.
Comment 5 Ross Lagerwall 2015-05-23 19:58:38 UTC
Review of attachment 303668 [details] [review]:

Seems sensible.
Comment 6 Ross Lagerwall 2015-05-23 19:59:10 UTC
Review of attachment 303669 [details] [review]:

This is PTP rather than MTP isn't it? Otherwise seems OK.
Comment 7 Ross Lagerwall 2015-05-23 19:59:23 UTC
Review of attachment 303670 [details] [review]:

Looks good.
Comment 8 Ross Lagerwall 2015-05-23 19:59:56 UTC
Review of attachment 303671 [details] [review]:

::: monitor/afc/afcvolume.c
@@ +160,3 @@
       if (lerr != LOCKDOWN_E_SUCCESS)
         {
+          g_print ("Couldn't start com.apple.mobile.house_arrest for UUID %s: %d\n", self->uuid, lerr);

Probably better as g_warn()?
Comment 9 Bastien Nocera 2016-03-14 11:51:27 UTC
Created attachment 323851 [details] [review]
afc: Remove attempts at thumbnailing photos

iDevices had a list of thumbnails available through afc:/// for photos
stored in the DCIM/ sub-directory, but the code to handle this was
always pretty fragile, relying on the iOS version to know which of a
number of different ways the thumbnails could be called or where they
would be stored.

It's easier to create the thumbnails ourselves from the JPG files, or
even access photos through PTP so that thumbnails are readily
accessible and in a way that doesn't change with each iOS release.
Comment 10 Bastien Nocera 2016-03-14 11:51:33 UTC
Created attachment 323852 [details] [review]
gphoto2: Show iDevices through MTP

There's no interesting data for users in afc:/// so it's best to show
iDevices through MTP instead. Stop hiding iDevices through the MTP.
Comment 11 Bastien Nocera 2016-03-14 11:51:39 UTC
Created attachment 323853 [details] [review]
afc: Don't mount the default AFC service

There's no interesting data for users in afc:/// so it's best to show
iDevices through MTP instead. The only reason we'd want to use this
mount is if we had support for accessing the iTunes database.
Unfortunately, this database needs to be encrypted, and we don't know
how to encrypt it.

Even then, we would probably want the default AFC service to be hidden
so only applications access it, and not users.
Comment 12 Bastien Nocera 2016-03-14 11:51:45 UTC
Created attachment 323854 [details] [review]
afc: Add debug info when house arrest fails to start

As can happen with some iOS and libplist combinations.
Comment 13 Ondrej Holy 2016-03-15 08:35:57 UTC
Review of attachment 323854 [details] [review]:

It looks good!
Comment 14 Ondrej Holy 2016-03-15 08:36:20 UTC
Review of attachment 323851 [details] [review]:

Makes sense!
Comment 15 Ondrej Holy 2016-03-15 08:38:02 UTC
Review of attachment 323852 [details] [review]:

It makes sense to me to remove the condition if AFC backend is not used for showing files, however I am not sure that the patch is really doing what is in the description. The patch removes the code from gPhoto2 volume monitor to ignore iDevices, however still there is a code to ignore MTP devices. So it seems to me that there isn't any difference, because it returns just several lines later. Isn't necessary any modification also in MTP volume monitor allowing mounting of iDevices? Otherwise, it seems to me that iDevices are beeing mounted over MTP already.
Comment 16 Ondrej Holy 2016-03-15 08:43:00 UTC
Review of attachment 323853 [details] [review]:

What was the content of afc:///? It was something different then what we see over MTP? So is the AFC backend useless now? What is the content of the house arrest mount?
Comment 17 Bastien Nocera 2016-03-19 12:33:15 UTC
Attachment 323851 [details] pushed as fe83e09 - afc: Remove attempts at thumbnailing photos
Attachment 323852 [details] pushed as 7ca0618 - gphoto2: Show iDevices through MTP
Attachment 323853 [details] pushed as 0b68656 - afc: Don't mount the default AFC service
Attachment 323854 [details] pushed as 87ee9ea - afc: Add debug info when house arrest fails to start
Comment 18 Bastien Nocera 2016-03-19 12:36:54 UTC
Review of attachment 323852 [details] [review]:

It's actually not MTP, but PTP as handled by the gphoto2 plugin. So this patch is correct (it's not handled by MTP).
Comment 19 Bastien Nocera 2016-03-19 12:41:20 UTC
Review of attachment 323853 [details] [review]:

Content was implementation details, such as a raw list of photos (with a database that I guess Apple apps on OSX edit when removing photos for example), and an encrypted iTunes database that we don't know how to edit either.

The net result of this is usually:
- appears as an iTunes database in Rhythmbox but creates an unusable database when edited
- photos can be removed from the "disk" but still appear in the list of photos but are unreadable

So it doesn't make much sense to show it.

The "Documents on iPhone" mount shows applications, and allows adding files when the application supports it. Say, drag'n'dropping comic books in the CBR/CBZ reading app, or movies into the movie playback app. Much more useful, and works.
Comment 20 Ondrej Holy 2016-05-02 10:41:59 UTC
Created attachment 327140 [details] [review]
afc: Do not use G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL

I think we should change G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL to G_FILESYSTEM_PREVIEW_TYPE_IF_ALWAY, when the thumbnailing code is removed...
Comment 21 Ondrej Holy 2016-05-04 13:59:39 UTC
Comment on attachment 327140 [details] [review]
afc: Do not use G_FILESYSTEM_PREVIEW_TYPE_IF_LOCAL

Pushed to master in a modified version as commit a71469c...
Comment 22 Bastien Nocera 2017-03-02 19:11:51 UTC
*** Bug 779481 has been marked as a duplicate of this bug. ***