Hi Shaheen,

...snip...
> > > 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.

So, I actually coded up a slightly different way of doing this that should also 
allow device storage to work for your scenario.

You can find it in https://bugzilla.mozilla.org/show_bug.cgi?id=818131

Dave Hylands
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to