Phone Sync via USB?

Get help for specific problems
Posts: 36
Joined: 22 Jul 2016

bevhoward

Thanks to the help here, I've been syncing to an sdcard since last year and it is invaluable... thanks.

I carry that sdcard in my Android phone and because of the sync option, I now have access to current files on the go.

On this phone (a MotoG6) taking out the sdcard to insert it into a memory card reader to sync on a pc works, but is less than ideal since the holder is designed to insert a card and leave it there permanently, so, I'm hoping that there is an option for FreeFileSync to address the card mounted in the phone directly, but I have not had any success experimenting with syntax similar to the sdcard identifier. [<CARDNAME>]

I am able to connect via USB (using the "File Transfer" option after connecting) and transfer files to and from the sdcard mounted in the phone using File Explorer

File Explorer shows the file location as;
PC\moto g(6)\BHSYNC-2\PhnSync

which, in FreeFileSync when used as;
[PC\moto g(6)\BHSYNC-2]\PhnSync

returns the error;
Cannot read file attributes of "?:\[PC"

This may not be possible, but, if it is, it would be a valuable time saving feature.

Any info would be appreciated,
Beverly Howard
User avatar
Posts: 3583
Joined: 11 Jun 2019

xCSxXenon

Can you try browsing to the SD card instead of manually typing in the location? For me, it enters it at an mtp location and works fine
Posts: 36
Joined: 22 Jul 2016

bevhoward

Will give that a shot. If nothing else, it might expose the file id syntax.

However, not sure about mtp files... almost none of the files that I want to sync are "media" files and based on prior experience I found that things not associated with definitions of "media" were often not included... (presumably via mime info embedded in the files)

Will tinker, and report back... thanks,
Beverly Howard
Posts: 36
Joined: 22 Jul 2016

bevhoward

I just took a look, and, as suspected, mtp is expecting "media" files.

For example, I have working folders full of "plain text" (.TXT) files, and the mtp connection shows all of the folders on the sdcard inserted in the phone, but browsing shows those folders as empty.

Will keep searching... thanks again,
Beverly Howard
Posts: 36
Joined: 22 Jul 2016

bevhoward

YE-HA!

"mtp" didn't work, but your browse suggestion revealed the syntax.

In my case, "moto g(6)" is the phone name and "BHSYNC-1" is the SD card name so the syntax;

PC\moto g(6)\BHSYNC-1

works to point FreeFileSync to the SDCard mounted in the phone connected to the pc via a USB cable and the USB connection is set to "File Transfer"

I anticipate running into other problems such as file transfer speeds but I am now hopeful about ending up with an easy way to carry a full synced set of important files in my phone.

I'll report back with details... but, hopefully no dead stop problems.

Thanks again for the clue,
Beverly Howard
Last edited by bevhoward on 06 Jul 2020, 20:20, edited 1 time in total.
User avatar
Posts: 3583
Joined: 11 Jun 2019

xCSxXenon

Ah, gotcha! Didn't consider non-media files. Glad you are getting somewhere though!
Posts: 36
Joined: 22 Jul 2016

bevhoward

Well, the news is all good with respect to FFS although there were some transfer speed limits that I expected.

Again, the FFS location syntax in my case was;
PC\moto g(6)\BHSYNC-1

Note that if you are using multiple sdcards, you will have to either use the same "name" (i.e. BHSYNC-1) or create a separate ffs_gui file for each sdcard.

I finally had a few minutes to finalize a ffs_gui sync configuration for the MotoG6's sdcard and there were no FFS problems, so a few observations and notes in case they may be of value to other FFS users.

The usb PC connection (set to "File Transfer) is, as expected, significantly slower than a card reader sync. As a result, if you have a large sync (mine is 11+GB and 10,000 files) the best option is to run the initial sync using an sd card reader (will require a different ffs_gui selection)

Since subsequent syncs only transfer altered files, the transfer speed is not a factor. I did note that the initial "comparison" took longer, probably because FFS was populating the new ffs_gui file.

If you don't know about it, be prepared for daylight savings time issues with the file date stamps. (see https://freefilesync.org/manual.php?topic=daylight-saving-timehttps://freefilesync.org/manual.php?topic=daylight-saving-time)

Remember also that it is essential to use android settings to "eject" the sdcard before physically removing the sdcard from the phone.

The only major "gotcha" in my case was discovering that my android text editor Jota+ can open and read text files located on the sdcard, but it cannot "save" or write new files to the sdcard.

Anyone know of an android text editor that can write to the sdcard?

Hope this information is useful,
Beverly Howard
Posts: 36
Joined: 22 Jul 2016

bevhoward

Update...

FFS is working, but confusing... not sure what/how the android file system functions.

First, files modified or added on the phone show up in FFS's compare. Files modified or added on the PC are the same as PC to PC syncs.

Files synced to the phone work exactly as expected.

Files synced back to the PC sometimes trigger FFS retries and a timeout... when FFS' "retry" is accepted, the files are immediately and successfully synced back to the PC

As mentioned, the Jota+ text editor was unable to save edits to files stored on the sdcard. I then discovered that Cx File Explorer has a very basic text file editor that was able to write to the sdcard.

I later opened multiple text file with Jota+ from within Cx File Explorer and was able to edit and save them back to the sdcard, so, it looks like using Cx's text editor opened up Jota+'s ability to write to the sdcard.

When a compare was run after the file edits, FFS's compare then recognize the edits.

However when syncing them back to the PC, FFS times out, but when "retry" is selected, the sync completes successfully.

Bottom line, it's working... I suspect that if I edit and create sdcard files on the phone and don't immediately try to sync that the android file system will "catch up" ...fingers crossed ;-)

Beverly Howard
Posts: 36
Joined: 22 Jul 2016

bevhoward

Another question on this transfer.

I have successfully synced a number of times using the above address syntax. I may have already posted this, but, it is essential to give the android time to populate the USB file transfer connection. A long time... over 5 minutes in my case.

Now, another problem...

I just tried to run a sync to an SD card in the Android today with the "Compare" result that selected ALL of the files on the synced directories on the SD card to be copied to update the directories on the PC.

Comparing the file properties on both sides showed that they were identical EXCEPT for the file times which were exactly 1 hour newer on the SD card, obviously since DST ended since the previous sync.

FFS has an option that deals with this...

Select the configuration for the USB sync
Menu
Actions
Comparison Settings
File Time and Size
Ignore Time Shift (Set to "1")
Save the configuration


This will only ignore file time differences of exactly 1 hour

Nice... thanks!

Beverly Howard
Posts: 36
Joined: 22 Jul 2016

bevhoward

One other Android SD Card anomaly that relates to files on an SD card installed in an Android Device.

I had problems with notification alerts that it took me a while to track down to the SD card.

Several (not all) notifications would stop working and I would find a 4 digit number in that the app's notification settings in place of the notification tone that I had specified. I then noticed that the notifications that had disappeared were custom audio files that I had added to the phone... audio files that I had backed up in a folder on my PC... and that folder was one of the folders synced via USB to the SD card in the phone.

Turns out that when the phone was rebooted, one of the first processes is to set up the user's selected notification tones ...and that happens before the SD card is fully initialized by the phone.

The tones displayed in the notification selection menus included tones stored both in internal memory and on the SD card, so, on reboot, if the selection pointed to a file on the SD card, it was not there, assigned a 4 digit code of some kind, and became unusable.

Solution, don't include or sync any notifications or other files that might be used in app initialization on the SD card.

Hope this sames someone the same month long quest that I had to go through.

Beverly Howard