Slightly related: A few years ago I tried getting the PIC24F USB working with Android's USB. I got it working, but discovered a flaw in the Android code that made disconnects invisible to the Android side. Once you had established a connection, if the cable was unplugged the PIC24F knew about it but Android did not. Worse, there was no way to detect nor clear the error within Android... the file handle remained open and active, and acted as a silent data sink.
I came up with various deadman/timeout schemes but the Android error was pretty effective at defeating every one. It was a very insidious bug. I got the Android group's attention and one of them submitted it as a formal bug report, but he was candid about that part of the code being very low on the priority list. A couple of years later I got a notice that the bug had STILL not been addressed. It may still be broken, I'm not sure.
I'm logging this here in case someone searches on PIC24F USB and runs into this bug. I lost several manweeks chasing it, without a fix, and had it confirmed as a valid Android bug (even had the inside guy send me his proposed fix, which as I recall was just one or two lines of error handling that should have been there in the first place).