[HD2 Android Q&A, Help & Troubleshooting and Genera] clyder:
Hi

for the last few hours I am trying to resolve the issue that I only today found out and after lots of testing, reflashing different roms I realized that this is a general issue and not related only to me or the rom I am using. So far tried only CM7 roms and NexusHD 3.0.

First it only happens if you have second partition on your sdcard. If you have only one fat32 partition everything works OK.

To see the issue try next:

-Enable USB Mass storage via default mount option in notification area. (issue is not present with 3rd party mount apps)

-On your computer open some folder on your SD card and remember its content

-Turn off USB Mass storage

-copy any file to that folder via any file manager app ib your phone

-Turn on USB Mass Storage and again open that folder to check for the new file (second mount lasts much longer then the first)

-File is not visible via USB mount until next phone reboot.

I have tried so far:

-HyperDroid 3 and Hyperdroid GBX v12

-Typhoon 3.6.4

-NexusHD 3.0 and 3.1a

-UltimateDroid 3.3

(all cLK)

Tried to use vold files from several other roms (MIUI and sense rom) but the issue is always there.

Also tried disabling USB debugging, changing USB ports, even PC's.

After some testing I realized that it only occurs if there is extra partition on sd. I tried ReiserFS and ext4 format, no difference. Only when I deleted all the partitions, created one and reformat it to fat32 mount was working fine.

I am currently using AdamG's a2sd modified by Seader for Hyperdroid, but while trying this on NexusHD I used Darktremor 2.7.5.2 and the issue is there.

Workaround for this is to use alternative apps for mounting. I am using Multi Mount SD-Card Lite.....

I have several people so far confirming this, on HyperDroid and Typhoon. All have partitions for a2sd.

I am not sure when this started happening. I will try tommorow some older roms but until then any information about this is helpfull. Please post if you have the issue and what rom you are on.

This is a log while mounting the USB for the second time. I see lots of vold, mount lines.

http://pastebin.com/XKUqpU56

update:

The cause of this issue is definitely a2sd. After I installed fresh rom (hyperdroid) with a2sd script removed from init.d folder USB mount doesn't have this issue.

So something is happening during mount or unmount process with active a2sd which breaks the ability of USB mount to update its file index which is sent to the computer.

This is happening with both Darktremor (tried 2.7.5.2 and 2.7.5.3. beta4) and AdamG's a2sd scripts.

update2:

this is another logcat

while mounting, checking Camera folder on a computer, unmounting, takes a picture, mounting again(this mount takes about 3 times longer then the first) and then checking the Camera folder again.

http://pastebin.com/HtqXzVx4

update3:

I found a way to stop this issue from happening. I have modified one line in vold.fstab file that is located in /system/etc

from

dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1

to

dev_mount sdcard /mnt/sdcard 1 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1

As soon as I change 1 to auto again and reboot issue is back.

This way only the first partition (fat32) is mounted and the issue is gone. I dont know if this change can cause any other issues, but so far only thing I noticed that is different is that when you turn USB Mass storage on while connecting the phone to a linux computer it only mounts first partition and no sdext one. For me this is not important, but as I said I am not sure if this change could have an impact on stability to any part of the system or phone functionality.

So to summ up:

- there is an issue of phone doesnt updating file index after first mount and you can't see any new files on your PC that are created in the meanwhile until phone reboot (for example new pictures taken with Camera)

-this only happens if you have extra partition on sdcard (for a2sd) and installed a2sd script (so far tried only Darktremors and AdamG's, but I guess that they all basically are doing the same thing). If you remove one of this elements the issue is gone

-after changing line in /system/etc/vold.fstab

"dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1 "..........from auto to 1

so the system will mount first and not automaticaly the first available partition, the issue is gone but someone with more knowledge then me could say what kind of issues this change might produce.

(Some time ago while applying this change in hyperdroid release at that time lots of people had issues with getting an corrupt SD card error. Not sure why it happened because it worked fine on my phone)