Add support for MTP mode

Discuss new features and functions
Posts: 1
Joined: 30 Jul 2013

dilover

Because my new phone and PC to exchange files using MTP mode, but the current synchronization software does not support this mode.

If possible can be combined with MTP support it, thank you

The following is a selection in MTP mode folder screenshot
Image

=======================================
Above text Use Google Transla translated from Chinese, and if there is a place difficult to understand, please tell me
Posts: 20
Joined: 6 Jul 2005

wpwoodjr

My new phone also only supports MTP. Please add support for MTP to FFS because I'm pulling my hair out over how to sync pictures with my phone now.
Posts: 20
Joined: 6 Jul 2005

wpwoodjr

Hi Zenju, is MTP support possible? A lot of us have Android phones now which only support MTP. I tried some of the SMB servers for Android but they are buggy.
Posts: 1
Joined: 19 Nov 2000

dd-b

Because my new phone and PC to exchange files using MTP mode, but the current synchronization software does not support this mode.

If possible can be combined with MTP support it, thank you

The following is a selection in MTP mode folder screenshot
Image

=======================================
Above text Use Google Transla translated from Chinese, and if there is a place difficult to understand, please tell medilover
I've also just run into the limitation that you don't support devices (such as my Android phone) connected through MTP protocol. I really want something to use to keep my book library and a (big) selection of my music library updated on the phone, and FreeFileSync is what I use for such jobs on Windows in other contexts (rsync, of course, elsewhere).

So, yeah, let me add myself to the chorus of people suggesting that supporting MTP is desirable! (And, at the very least, an error message better than "[Window Title]
Select Folder

[Content]
Books
The folder name is not valid.

[OK]")
User avatar
Site Admin
Posts: 7048
Joined: 9 Dec 2007

Zenju

I've also just run into the limitation that you don't support devices (such as my Android phone) connected through MTP protocol. I really want something to use to keep my book library and a (big) selection of my music library updated on the phone, and FreeFileSync is what I use for such jobs on Windows in other contexts (rsync, of course, elsewhere).

So, yeah, let me add myself to the chorus of people suggesting that supporting MTP is desirable! (And, at the very least, an error message better than "[Window Title]
Select Folder

[Content]
Books
The folder name is not valid.

[OK]")dd-b
I'm working on it :) This is definitively top priority for FFS currently, but I can't give ETAs yet.
Posts: 1
Joined: 3 Nov 2014

andy777-777

Hi Zenju, MTP support would be greatly appreciated. I'm using FFS for some years now but with the new android 4.4 there is no way (except rooting .. ) to keep the phone with sd-card synchronized to several computers.
Posts: 1
Joined: 8 Nov 2014

iefbr14a

I'm working on it :) This is definitively top priority for FFS currently, but I can't give ETAs yet.Zenju
Please add me to the feature request list. ;-)
Posts: 2
Joined: 17 Apr 2011

frankvdhnzdr

Hi, Please add me to the list of people asking for MTP support :) Its been a while since your last post... any update on when this will be done?
User avatar
Site Admin
Posts: 7048
Joined: 9 Dec 2007

Zenju

I'm making great progress with MTP currently. The new file system abstraction layer is 95% done, which is by far the most difficult part. MTP support or any other type of non-native file system (FTP?) will be straight-forward. Current plans are to finish MTP support already for the next FreeFileSync release.
Posts: 1
Joined: 27 Oct 2012

oshmosh

Great. I'd really love to have this MTP feature in order to sync my android 5.0 phone.
Posts: 2
Joined: 12 May 2015

brds7t7

Wow, great to see MTP support! I am now syncing my Android phone...amazing!

Noticed one small bug, I tried clicking "Show in explorer" on a jpeg file on my MTP device and it opens up Internet Explorer instead.

Again, many thanks for MTP as this has always been my Top backup app.
User avatar
Site Admin
Posts: 7048
Joined: 9 Dec 2007

Zenju

> Noticed one small bug

While implementing MTP I noticed a number of limitations. Hopefully a few of those can be liftet or there exist work arounds:

- Context menu "Show file in explorer": Yes, this doesn't work, but is this even possible? Is there a command line syntax that lets you open Explorer and directly show a virtual file/folder?

- File modification times: I wasn't able to set modification times on any device I tested with. Even when set during file creation the property is just ignored. Is this an actual limitation? Win Explorer on the other hand couldn't do this either, so I believe it's a limitation. Since FFS is a sync tool, I expect this to come back as lots of bug reports of the kind "files still different even after sync".

- Some items on MTP devices have a different file size property than their actual stream size. FFS is quite strict and shows an error in this case.

=> As a general rules when it comes to reporting MTP bugs: If Win Explorer cannot do it either, it's most likely a limitation, not a FFS bug.
On the other hand if Explorer can do it, but not FFS, then FFS should probably support it, too.
Posts: 22
Joined: 6 Sep 2014

ferblaha

Adding MTP and FTP to FFS will be really great!
Posts: 2
Joined: 2 Feb 2011

jasonhpchu

> Noticed one small bug

While implementing MTP I noticed a number of limitations. Hopefully a few of those can be liftet or there exist work arounds:

- Context menu "Show file in explorer": Yes, this doesn't work, but is this even possible? Is there a command line syntax that lets you open Explorer and directly show a virtual file/folder?

- File modification times: I wasn't able to set modification times on any device I tested with. Even when set during file creation the property is just ignored. Is this an actual limitation? Win Explorer on the other hand couldn't do this either, so I believe it's a limitation. Since FFS is a sync tool, I expect this to come back as lots of bug reports of the kind "files still different even after sync".

- Some items on MTP devices have a different file size property than their actual stream size. FFS is quite strict and shows an error in this case.

=> As a general rules when it comes to reporting MTP bugs: If Win Explorer cannot do it either, it's most likely a limitation, not a FFS bug.
On the other hand if Explorer can do it, but not FFS, then FFS should probably support it, too.Zenju
you are right about the issue with the "files still different even after sync".
Is it possible to split the comparison option of the time and size to two separate options so the user can pick which method of comparison to use?
I'm seeing that the files that gets copied to the MTP device gets the date modified set to the current time. Size is the same though.
I'd suppose the ignore time shift could be a work around, but that's only limited to a day's worth of time difference, where as my files are years.
All in all very impressed with this big step ahead, keep up the good work.
User avatar
Site Admin
Posts: 7048
Joined: 9 Dec 2007

Zenju

MTP shell integration is complete!

- Accept Explorer drag and drop from MTP devices
- Support showing MTP files with Explorer
- Support opening MTP files with default application
- Preselect active MTP folder in folder picker dialog

Let me know if you find any issues:
[404, Invalid URL: https://freefilesync.org/FreeFileSync_7.1_beta_Windows_Setup.exe]
Posts: 1
Joined: 7 May 2001

skibbi

MTP shell integration is complete!

- Accept Explorer drag and drop from MTP devices
- Support showing MTP files with Explorer
- Support opening MTP files with default application
- Preselect active MTP folder in folder picker dialog

Let me know if you find any issues:
[404, Invalid URL: https://freefilesync.org/FreeFileSync_7.1_beta_Windows_Setup.exe]Zenju
How can I add MTP device to FFS? Whenever I try to select my Nexus 5 I'm getting this error:
The selected folder "This computer\Nexus 5\Internal memory" cannot be used with FreeFileSync. Please select a folder on a local file system, network or an MTP device.
Posts: 2
Joined: 2 Feb 2011

jasonhpchu

Zenju, with regards with the modified date issue with MTP, I've figured out that on the bottom of the program, you can select what view to look at, which I could use to remove all time based items.
All works well, except one minor thing, more annoyance, dunno if it's cosmetics or what.
When playing with the views, I was under the impression, the items shown on screen and checked off are the ONLY items that will be involved in a sync action. Where as in fact, checked off items in other hidden views could also be involved in a sync. To further this, the right click menu in the middle column of include/exclude all, is applied to all views, not just the current visible one.
A workaround would be to first exclude all, then select to see all non-time related items, then use the mouse to "shift" select everything in that view/screen.
No need to really DO any changes, just giving some feedback.
Again, thanks for adding in MTP, made my life easier syncing songs around.
Posts: 2
Joined: 31 May 2015

mschuess556

Tagging - I have the same problem. It's too bad; I wish the MTP protocol was either to deal with.

Jason: How were you able to compare of file size only?
Posts: 3
Joined: 11 Nov 2013

henning74

Hi Zenju,
I am seriously happy about the MTP support, while experiencing the same issues with file timestamps.
Idea: A new comparison option could allow FreeFileSync to synchronize without control over third party file systems.
Such a comparison option might be/include the detection of change (e.g. time and size) after the last sync operation, whose result would be stored in the sync.ffs_db. Example: FFS writes to an Android device, and after each complete file transfer, it would immediately read the new time and size from the device, and update the corresponding remote sync.ffs_db with these new information. A later comparison would then check whether the file properties have changed since the last status in sync.ffs_db.
I know that in theory this method might not be 100% failsafe, as the device might alter a file's properties within this fraction of a second (yet very unlikely for user documents). I don't know the details of the protocol. Maybe the file properties can be read out before closing the file pointer - in this case this problem would disappear. Otherwise this issue would pose a general theoretical limitation, unavoidable when facing the MTP limitation.
To put it in context and first discuss it, I posted this here in the MTP thread. It could be understood as a more generic feature request also: to provide a method for detecting file changes in third party devices whose file system is not under control of FFS.
User avatar
Site Admin
Posts: 7048
Joined: 9 Dec 2007

Zenju

Hi Zenju,
I am seriously happy about the MTP support, while experiencing the same issues with file timestamps.
Idea: A new comparison option could allow FreeFileSync to synchronize without control over third party file systems.
Such a comparison option might be/include the detection of change (e.g. time and size) after the last sync operation, whose result would be stored in the sync.ffs_db. Example: FFS writes to an Android device, and after each complete file transfer, it would immediately read the new time and size from the device, and update the corresponding remote sync.ffs_db with these new information. A later comparison would then check whether the file properties have changed since the last status in sync.ffs_db.
I know that in theory this method might not be 100% failsafe, as the device might alter a file's properties within this fraction of a second (yet very unlikely for user documents). I don't know the details of the protocol. Maybe the file properties can be read out before closing the file pointer - in this case this problem would disappear. Otherwise this issue would pose a general theoretical limitation, unavoidable when facing the MTP limitation.
To put it in context and first discuss it, I posted this here in the MTP thread. It could be understood as a more generic feature request also: to provide a method for detecting file changes in third party devices whose file system is not under control of FFS.henning74
In my tests the modification time seemed to be totally unreliable: On most devices it is simply ignored and set to "whatever the device considers current time", or worse on Galaxy S4 setting modification time seemed to work, but after unplugging and reinserting the device, the modification time observably changed. So a "read file time after copy" may not be a reliable solution, the performance drawback of one additional file access aside.
But also more fundamentally, FreeFileSync will show files as not in sync when they have different modification times. This is after all what the user has selected, "compare by time ans size", so ignoring the time when comparison against DB entries shows no change, still seems incorrect, at least with this model.
Posts: 20
Joined: 6 Jul 2005

wpwoodjr

Perhaps modifying the rule for MTP filesystems so that an offset is kept for the modification time from the true modification time, and applied during the comparison, would keep the model intact while helping with the issue (except with GS4)?
User avatar
Site Admin
Posts: 7048
Joined: 9 Dec 2007

Zenju

SFTP integration has been completed for version 7.2:
[404, Invalid URL: https://freefilesync.org/FreeFileSync_7.2_beta_Windows_Setup.exe]
Posts: 1
Joined: 30 Nov 2012

dlglive

I have a problem with MTP: when I have to select (also with drag&drop) a folder from my android smp, simply FFS doesn't see the device in the "Browse For Folder" list!
With PC explorer I can manually read&write files from both internal storage and SD card (exFAT).
I have winXP SP3, a Note4 (Android 5.1.1) with KNOX Active Protection and I have updated FFS from 6.13 directly to 7.4 version.
Please help me!
User avatar
Posts: 71
Joined: 22 May 2006

Giangi

In my tests the modification time seemed to be totally unreliable: On most devices it is simply ignored and set to "whatever the device considers current time", or worse on Galaxy S4 setting modification time seemed to work, but after unplugging and reinserting the device, the modification time observably changed. So a "read file time after copy" may not be a reliable solution, the performance drawback of one additional file access aside.
But also more fundamentally, FreeFileSync will show files as not in sync when they have different modification times. This is after all what the user has selected, "compare by time ans size", so ignoring the time when comparison against DB entries shows no change, still seems incorrect, at least with this model.Zenju
Unfortunately MTP is just... ehm... "a poor thing" (to be polite :-) )

I can see the "why" has been developed and indeed I can see the benefit for a MEDIA PLAYER, but using it for a smartphone (can we call them for what they really are? They are REAL computers!!) is a non-sense.

Personally I gave FFS a try with my Motorola MotoG 2014 with Lollipop 5.0.1 (unrooted) and found immediately that is not usable, but NOT for FFS's fault!!! It's the Google's MTP implementation that is really "poor".
I have searched a bit to understand why, for example, my picture folders on Explorer (I'm using Seven SP1) are different from what is really on the phone memory! I have found that Android is making a "cache" for MTP and this can be not-up-to-date!! I can't believe it... :-(
Have a look at these (some really old) bugs with "MTP" search
https://code.google.com/p/android/issues/list?can=1&q=MTP&colspec=ID+Type+Status+Owner+Summary+Stars&cells=tiles

I voted a few:
https://code.google.com/p/android/issues/detail?id=182084
https://code.google.com/p/android/issues/detail?id=95729

https://code.google.com/p/android/issues/detail?id=92635 this one is specific for FFS... "Transfering files to device, via MTP, resets timestamp to current time/date!"

Personally I use MyPhoneExplorer to manage/backup/sync my phone data, it does a pretty good job (but sometimes it fails too on bidirectional sync!) but it use a "client app" on Android to do its job!

I believe that without a "client side app" Zenju couldn't do more on FFS for supporting Android phone via MTP... :-(
User avatar
Site Admin
Posts: 7048
Joined: 9 Dec 2007

Zenju

I have a problem with MTP: when I have to select (also with drag&drop) a folder from my android smp, simply FFS doesn't see the device in the "Browse For Folder" list!
With PC explorer I can manually read&write files from both internal storage and SD card (exFAT).
I have winXP SP3, a Note4 (Android 5.1.1) with KNOX Active Protection and I have updated FFS from 6.13 directly to 7.4 version.
Please help me!dlglive
MTP support in FFS requires windows Vista and later.