View Issue Details

IDProjectCategoryView StatusLast Update
0012997MMW v4Synchronizationpublic2016-08-09 22:03
Reporterpeke Assigned To 
PriorityurgentSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version4.1 
Target Version4.1.10Fixed in Version4.1.14 
Summary0012997: USB Sync do not get correct Storage names
DescriptionOn Clean MMW 1773 and on first connection of device Storages are incorrectly fetched.

Internal and External storages are switched (MMA 515 Detect Them correctly)
TagsNo tags attached.
Attached Files
profiledup.zip (574,889 bytes)
dups2.zip (110,908 bytes)
Fixed in build1804

Relationships

related to 0002464 closedjiri Support external memory cards on MTP devices 
related to 0013119 closedLudek Duplicate profiles can occur due to deletion of storageInfo.xml 
related to 0013005 closedLudek MWM Create double Profile each MMW Start (when info file cannot be written) 
related to 0013028 closedLudek Sync: Multiple USB Thumb Drives of same type get same profile 

Activities

Ludek

2015-12-04 10:38

developer   ~0043511

Last edited: 2015-12-04 11:06

Peke, I guess that you deleted the StorageInfo.xml file manually, right?

In that case it is paired based on USB ID which is not reliable because the USB IDs for the internal/card storages could be swapped.
I should probably skip the old profiles that already have the pairing key from StorageInfo.xml assigned and never use USB ID for them when pairing.

Looking into this...

Ludek

2015-12-04 11:04

developer   ~0043512

Last edited: 2015-12-04 11:07

Fixed in build 1774.

The old profiles that were already paired by storageGUID aren't re-paired again by USB ID in case the storageInfo.xml was deleted.
This will result in profile duplication, but it is all right.

The reasons are that single SD card can be put to various Android devices or SD card slots and there isn't any other way how to pair a storage with a profile without this info file.

Also this KB article was updated by Rusty to mention that duplicate profiles are generated by manual deletion of the StorageInfo.xml file:
http://www.mediamonkey.com/support/index.php?/Knowledgebase/Article/View/154/24/android-how-do-i-do-a-clean-install

Ludek

2015-12-04 12:30

developer   ~0043514

Last edited: 2015-12-04 12:30

OK, discussing this with Peke he indicated that he deleted all profiles and the newly created were swapped with his Moto G LTE XT1045 , but he cannot reproduce anymore, to see more once he can repro.

Ludek

2015-12-10 09:59

developer   ~0043582

Last edited: 2015-12-10 10:15

I finally found how the profile swap can happen.

Ludek

2015-12-10 10:14

developer   ~0043584

Fixed in 4.1.10.1776

peke

2015-12-11 16:18

developer   ~0043613

Verified 1776

Ludek

2016-08-01 13:14

developer   ~0045278

Last edited: 2016-08-02 08:07

Based on one log from Marek this issue still can happen in certain scenarios.
'Internal' storage got name of 'SD card'.

It is very hard to replicate, but could be what Peke originally observed.

To reproduce:
a) delete all profiles
b) Access MMA options> WiFi sync so that the "first time Wifi access" dialog for 'SD card' is shown in MMW
c) Grant the permission in MMW for the 'SD card' at the same time while connecting the device over USB (in one second or less)

=> Fixed in build 4.1.14.1803

marek

2016-08-01 22:15

developer   ~0045285

Last edited: 2016-08-02 04:59

It still occurs with different repro steps and the profiles are duplicated too:

1. Delete all profiles
2. Connect MMA via USB cable. Everything is ok.
I can see in MMW:
BHIEFER:af1abbceeb0ae153:0 - Interní úložišt? (LGH81556d33365.0.bf617918-a188-432f-adb6-19bc1bb2eada - not sure)
BHIEFER:af1abbceeb0ae153:1 - SD karta (LGH81556d33365.1.4fc094a5-5b88-46bc-81e6-fc0ce705632b)
3. Uninstall MMA and disconnect cable
4. Reinstall and reconnect, now MMW shows duplicates:
BHIEFER:af1abbceeb0ae153:0 - Interní úložišt? (LGH81556d33365.1.e0bdbae3-7d21-4589-917e-85e8bffb6377)
BHIEFER:af1abbceeb0ae153:0 - Interní úložišt? (1) (LGH81556d33365.0.bf617918-a188-432f-adb6-19bc1bb2eada)
BHIEFER:af1abbceeb0ae153:0 - SD karta (LGH81556d33365.1.4fc094a5-5b88-46bc-81e6-fc0ce705632b)

So internal storage has now suffix (1) and external SD card looks like Internal storage and is duplicated...

Log attached...
5. btw at the end of the log you can see that MMW got completely frozen during exporting of profiles, I had to force stop it

marek

2016-08-02 07:28

developer   ~0045287

Please note that MediaMonkey folder on SD card contains StorageInfo.xml.mmw file with 0 length

marek

2016-08-02 08:09

developer   ~0045288

Added another log "dups2.zip". MMA is not even started.

 - storageInfo.xml contains persistently id ***.1.322***
 - MMW has profile with id ***.1.6f5***
 - after reconnection of USB cable, MMW creates another profile with id ***.1.a8f***

storageInfo.xml is visible and readable over explorer. It is true that freeze occurs sometimes but it works after a while.

The MediaMonkey folder still contains StorageInfo.xml.mmw with 0 length

Ludek

2016-08-02 09:42

developer   ~0045289

Last edited: 2016-08-02 12:32

Re the first log (profiledup.zip from 0012997:0045285 ).
The zero bytes storageInfo.xml.mmw caused that MMA generated new GUID for the 'SD karta' after MMA re-install:
LGH81556d33365.1.4fc094a5-5b88-46bc-81e6-fc0ce705632b => LGH81556d33365.1.e0bdbae3-7d21-4589-917e-85e8bffb6377
but in the meantime MMA accessed MMW over WiFi with the new key for SD card, but MMW paired it with Internal based on serial number LGH81556d33365 which is same for both storages (this caused the profile swap)

In the second log (dups2.zip) the situation is very similar, but there was no WiFi access so the swap based on SN did not occur and another profile was created for SD card (because of the new GUID generated by MMA)

So:
1) On MMW side: we should try to improve the profile pairing based on serial number (so that it cannot cause the swap)
2) Try to find why StorageInfo.xml.mmw file had 0 bytes length (probably MTP error) and how to recover/repair this situation, this also needs to be done on MMW side as the location is non-writeable for MMA (related to 0013119)

Ludek

2016-08-02 10:42

developer   ~0045290

Last edited: 2016-08-03 11:07

1) The problem is that I supposed that 'Internal' storage has always suffix $0 in USB ID, but this is not true (in case of this device) so I cannot pair it, because I cannot distinguish between the 'SD' and 'Internal' storages just by SN, I need another key.

Solution: Marek could look into Windows Registry:
[HKLM\System\CurrentControlSet\Enum\USB\vid_1004&pid_633\LGH81556d33365\]
-- there is bunch of GUIDs and IDs and maybe some of them could be also known for MMA (to send to MMW as a key)?

2) This could be also resolved by modification of 0013119 , MMA could store the 'SD card's key on the internal storage after uninstall.

marek

2016-08-02 12:30

developer   ~0045291

Last edited: 2016-08-02 13:03

2) there was a bug in MMA too, where empty storageInfo.xml.mmw caused creation of new GUID. Fixed in build 610

Ludek

2016-08-02 12:56

developer   ~0045292

Last edited: 2016-08-02 13:12

1) Assigned to Marek to review the registry values (as described above), just note that it won't probably work 100% correctly either, because e.g. Nexus4 and Nexus7 have same VID/PID and false match can occur (0011432).

2) is fixed in 4.1.14.1803, i.e. once size of storageInfo.xml.mmw differs from the MMA version (storageInfo.xml) then storageInfo.xml.mmw is replaced/renewed by the MMA version -- tied to 0013119

Ludek

2016-08-03 10:36

developer   ~0045301

Last edited: 2016-08-03 11:08

1) There doesn't seem to be an usable key in the registry, but assigned back to me to tweak this on MMW side.
Namely to pair the SD card profile only once it contains 'SD' in the name, it should mostly work fine, because 'SD' is quite international.

=> Fixed in 4.1.14.1803

peke

2016-08-05 22:57

developer   ~0045348

Verified FIX in 1803

Can you please if also Adding Word "External" would also improve? Otherwise This can be closed.

Ludek

2016-08-07 10:19

developer   ~0045351

Yes, I was thinking about external too, but problem is that it isn't international, but looking into most used languages (EN, GE, FR, IT, ESP) the word prefix extern* seems common, so I will use it.

Also word 'card' could be used, but international variants are cart, karte, karta etc. , but I guess I will add them too to improve the accurancy.

Ludek

2016-08-07 10:55

developer   ~0045352

Last edited: 2016-08-07 11:01

Improved the accurancy of pairing based on serial number this way:
SD card profile is paired once it includes at least one of these:
[' SD', ' extern',' card',' kart',' cart']
but doesn't include any of these:
[' intern', ' phone']

Fixed in build 1804

peke

2016-08-09 22:03

developer   ~0045369

Verified 1804