Closed Bug 1049244 Opened 8 years ago Closed 7 years ago

Add required MTP extensions for tako device

Categories

(Firefox OS Graveyard :: MTP/UMS, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dhylands, Unassigned)

References

Details

Add extensions required for the tako device.
I'll investigate what else we need to do.
Assignee: nobody → echou
Per offline discussion with
ok, I have studied the spec and Android's implementation to see what changes are necessary for
supporting MTP extension. It seems to me that we don't need to do anything in Gecko at this stage. Vendors who want to add MTP extensions can just port what they have done for Android to their Gonk codebase.

First, since we will only support MTP server role, vendors should modify MtpServer.cpp in AOSP[1] to respond with the information of the extension (MTP Vendor Extension ID & MTP extensions string) when the MTP client asks for device information.

After that, vendors need to implement handlers to deal with their customized commands in function MtpServer::handleRequest(). Vendors should be able to do something they want to do (based on the command) in the handler, then respond to the connected MTP client correspondingly.[2]

Please feel free to ask MTP extension related questions here.

[1] http://androidxref.com/source/xref/frameworks/av/media/mtp/MtpServer.cpp#422
[2] http://androidxref.com/source/xref/frameworks/av/media/mtp/MtpServer.cpp#307
(In reply to Eric Chou [:ericchou] [:echou] from comment #3)
> ok, I have studied the spec and Android's implementation to see what changes
> are necessary for
> supporting MTP extension. It seems to me that we don't need to do anything
> in Gecko at this stage. Vendors who want to add MTP extensions can just port
> what they have done for Android to their Gonk codebase.
> 
> First, since we will only support MTP server role, vendors should modify
> MtpServer.cpp in AOSP[1] to respond with the information of the extension
> (MTP Vendor Extension ID & MTP extensions string) when the MTP client asks
> for device information.
> 
> After that, vendors need to implement handlers to deal with their customized
> commands in function MtpServer::handleRequest(). Vendors should be able to
> do something they want to do (based on the command) in the handler, then
> respond to the connected MTP client correspondingly.[2]
> 
> Please feel free to ask MTP extension related questions here.
> 
> [1]
> http://androidxref.com/source/xref/frameworks/av/media/mtp/MtpServer.cpp#422
> [2]
> http://androidxref.com/source/xref/frameworks/av/media/mtp/MtpServer.cpp#307

Per offline discussion, the implementation that we currently have is enough for adding extensions. I'll leave this open until the feature gets resolved so that we can have a platform to answer more questions.
Remove myself from the assignee per comment 4.
Assignee: echou → nobody
Component: General → MTP/UMS
Alphan, is this bug tako-specific or general? Please mark as wontfix if it's tako-specific.
Flags: needinfo?(alchen)
Since it is a requirement for tako (status:suspend), I make this bug as WONTFIX.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(alchen)
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.