Sorry, The patch is fairly simple, so I'll just put it here:

diff --git a/dom/system/gonk/VolumeManager.cpp 
b/dom/system/gonk/VolumeManager.cpp
--- a/dom/system/gonk/VolumeManager.cpp
+++ b/dom/system/gonk/VolumeManager.cpp
@@ -288,16 +288,24 @@ VolumeManager::OnLineRead(int aFd, nsDep
   if (responseCode >= ResponseCode::UnsolicitedInformational) {
     // These are unsolicited broadcasts. We intercept these and process
     // them ourselves
     HandleBroadcast(responseCode, responseLine);
   } else {
     // Everything else is considered to be part of the command response.
     if (mCommands.size() > 0) {
       VolumeCommand* cmd = mCommands.front();
+#if 1
+      if ((responseCode >= ResponseCode::CommandOkay) &&
+          (strcmp(cmd->CmdStr(), "volume list") == 0)) {
+        nsDependentCString fakeResponseLine("storage /data/storage X");
+        cmd->HandleResponse((int)ResponseCode::VolumeListResult,
+                            fakeResponseLine);
+      }
+#endif
       cmd->HandleResponse(responseCode, responseLine);
       if (responseCode >= ResponseCode::CommandOkay) {
         // That's a terminating response. We can remove the command.
         mCommands.pop();
         mCommandPending = false;
         // Start the next command, if there is one.
         WriteCommandData();
       }

For v1.1, it goes in the OnFileCanReadWithoutBlocking function, and line 288 is 
around line 315 instead. The surrounding block of code should be very similar.

Dave Hylands

----- Original Message -----
> From: "Alfredos (fredy) Damkalis" <[email protected]>
> To: [email protected]
> Sent: Friday, May 24, 2013 10:33:45 AM
> Subject: Re: [b2g] Fake SDCARD
> 
> "You are not authorized to access bug #838038."
> 
> Unfortunately is not accessible, probably for security reasons or
> confidential partners data. :(
> 
> On 05/24/2013 06:55 PM, Dave Hylands wrote:
> > There is a patch in bug 838038.
> >
> > If you apply that patch, and change the 4 in "storage /data/storage
> > 4" to an X, then this will add a new storage area. You'll need to
> > manually create the /data/storage directory.
> >
> > Dave Hylands
> >
> > ----- Original Message -----
> >> From: "pancake" <[email protected]>
> >> To: [email protected]
> >> Sent: Friday, May 24, 2013 4:24:22 AM
> >> Subject: [b2g] Fake SDCARD
> >>
> >> I would like to test camera/gallery/media apps without depending
> >> on
> >> an
> >> SDCARD, on Android faking the sdcard is as simple as:
> >>
> >>     mount -t tmpfs none /mnt/sdcard
> >>
> >> But this doesn't seems to fool Gonk detection.
> >>
> >> How can I tell 'vold' or 'b2g' to not require an SDCARD for that?
> >>
> >> Thanks
> >> _______________________________________________
> >> dev-b2g mailing list
> >> [email protected]
> >> https://lists.mozilla.org/listinfo/dev-b2g
> >>
> > _______________________________________________
> > dev-b2g mailing list
> > [email protected]
> > https://lists.mozilla.org/listinfo/dev-b2g
> >
> 
> _______________________________________________
> dev-b2g mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-b2g
> 
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to