View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0012997 | MMW v4 | Synchronization | public | 2015-12-04 01:09 | 2016-08-09 22:03 |
Reporter | peke | Assigned To | |||
Priority | urgent | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 4.1 | ||||
Target Version | 4.1.10 | Fixed in Version | 4.1.14 | ||
Summary | 0012997: USB Sync do not get correct Storage names | ||||
Description | On Clean MMW 1773 and on first connection of device Storages are incorrectly fetched. Internal and External storages are switched (MMA 515 Detect Them correctly) | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
Fixed in build | 1804 | ||||
related to | 0002464 | closed | jiri | Support external memory cards on MTP devices |
related to | 0013119 | closed | Ludek | Duplicate profiles can occur due to deletion of storageInfo.xml |
related to | 0013005 | closed | Ludek | MWM Create double Profile each MMW Start (when info file cannot be written) |
related to | 0013028 | closed | Ludek | Sync: Multiple USB Thumb Drives of same type get same profile |
|
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... |
|
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 |
|
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. |
|
I finally found how the profile swap can happen. |
|
Fixed in 4.1.10.1776 |
|
Verified 1776 |
|
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 |
|
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 |
|
Please note that MediaMonkey folder on SD card contains StorageInfo.xml.mmw file with 0 length |
|
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 |
|
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) |
|
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. |
|
2) there was a bug in MMA too, where empty storageInfo.xml.mmw caused creation of new GUID. Fixed in build 610 |
|
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 |
|
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 |
|
Verified FIX in 1803 Can you please if also Adding Word "External" would also improve? Otherwise This can be closed. |
|
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. |
|
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 |
|
Verified 1804 |