Hi Shaheen, ----- Original Message ----- > From: [email protected] > To: "mozilla dev b2g" <[email protected]> > Cc: [email protected], [email protected] > Sent: Monday, December 3, 2012 11:13:41 PM > Subject: Re: [b2g] SD card doesn't get detected in galaxy-nexus, > > On Monday, 3 December 2012 21:27:16 UTC+5:30, Dave Hylands wrote: > > Hi Shaheen, > > > > ----- Original Message ----- > > > > > From: [email protected] > > > To: [email protected] > > > Sent: Monday, December 3, 2012 6:19:48 AM > > > Subject: [b2g] SD card doesn't get detected in galaxy-nexus, > > > > > > I flashed a latest build of b2g to galaxy-nexus. But SD card > > > doesn't > > > > > get detected in galaxy-nexus,and hence camera app and media app > > > > > fail.Please help me to resolve this issue, > > > > I did a little write up about USB Mass Storage over here: > > > > https://wiki.mozilla.org/B2G/USBMassStorage > > > > > > > > The problem is that the Galaxy Nexus doesn't support UMS due to the > > way the partitions are laid out, and so it doesn't advertise any > > volumes in the vold process. > > > > DeviceStorage currently uses the VolumeManager (which uses vold), > > so currently DeviceStorage will only work on phones which have UMS > > support. > > > > I believe that we are planning to support MTP, but not in the v1 > > timeframe. > > > > I can point you to the source files which need to be changed (all > > C++) if you want to hack around the problem in the meantime. > > > > Dave Hylands > > Thanks Dave, > Could you please share those source files so that I can > have a try
ok - I filed bug https://bugzilla.mozilla.org/show_bug.cgi?id=818131 I think that you can get this to work by changing one line of code: https://mxr.mozilla.org/mozilla-central/source/dom/devicestorage/nsDeviceStorage.cpp#1197 1194 #ifdef MOZ_WIDGET_GONK 1195 nsresult rv = GetSDCardStatus(state); 1196 if (NS_FAILED(rv)) { 1197 state.Assign(NS_LITERAL_STRING("unavailable")); 1198 } 1199 #endif If we change this to look like: 1194 #ifdef MOZ_WIDGET_GONK 1195 nsresult rv = GetSDCardStatus(state); 1196 if (NS_FAILED(rv)) { .... // The volume won't exist on phones like the Nexus S which have no sdcard parition, .... // so we just assume that it's there to make those devices work. 1197 state.Assign(NS_LITERAL_STRING("available")); 1198 } 1199 #endif then that should allow the Nexus S to see the sdcard. UMS can't work on the Nexus S, so you'll need to adb push/pull your media files until MTP support shows up, but that minor change should allow gallery etc to at least show what files are present in the /sdcard directory. If you'd like to code/test this, I'd be happy to help you get it reviewed/landed. Dave Hylands _______________________________________________ dev-b2g mailing list [email protected] https://lists.mozilla.org/listinfo/dev-b2g
