summaryrefslogtreecommitdiffstats
path: root/media/mtp
Commit message (Collapse)AuthorAgeFilesLines
...
* MTP: Turn off excessive loggingMike Lockwood2010-07-275-16/+12
| | | | | Change-Id: Ib0dd8cb99efa324d0b4e742bffeb913d6122ace2 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP host: Add support for reading files from an MTP device via ↵Mike Lockwood2010-07-264-2/+263
| | | | | | | | | | ParcelFileDescriptor Also added some support for sending files to the device that hasn't been debugged yet. Add locking to MtpDevice to prevent it from attempting multiple transactions simultaneously. Change-Id: I2b995ba0af086cc6920bd6b8c869f540ad78560a Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Don't request thumbnails for folder objects in MtpCursorMike Lockwood2010-07-262-13/+19
| | | | | Change-Id: I75a0a834ab746bed0a35883539c8dbc104789157 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add hard coded support to recognize a couple MTP music players for ↵Mike Lockwood2010-07-261-3/+37
| | | | | | | testing purposes. Change-Id: I2d09d78e83d13cfb3edff02372a6fc34b1e4d8b1 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Merge "MTP host fixes:"Mike Lockwood2010-07-202-39/+53
|\
| * MTP host fixes:Mike Lockwood2010-07-202-39/+53
| | | | | | | | | | | | | | | | Add support for detecting android MTP devices Fix problem reading data packet with header sent separately from payload. Change-Id: I07b34af6783ebe2e63a317796ba0c8223df86edf Signed-off-by: Mike Lockwood <lockwood@android.com>
* | Fix sim-eng build.Andy McFadden2010-07-201-2/+2
|/ | | | | | | The LOCAL_PATH assignment was not available to the new host library on simulator builds. Change-Id: I7727f17ecc8f457f92bd6fa9ec13025dd8a56390
* MTP: Remove race condition in initial device enumeration for host mode.Mike Lockwood2010-07-202-11/+31
| | | | | Change-Id: Iee01aaae3f8cca4234daa289bef6631da4d6c2b6 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Fix problems reading and writing arrays in property values.Mike Lockwood2010-07-203-6/+39
| | | | | Change-Id: Idd53b63fd32698a3ffc90f174d16ae597b4feb36 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: add Linux host library for MTP/PTP host support.Mike Lockwood2010-07-202-0/+32
| | | | | Change-Id: Ie2ce60b957ee428a8e8db46a70c5a0ade8445007 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Only send events to host if we have an open session.Mike Lockwood2010-07-191-12/+16
| | | | | Change-Id: I7b2d0c88c2d2ae0490247703d0fb1b862154db92 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Exclude MTP implementation from simulator buildMike Lockwood2010-07-151-0/+5
| | | | | Change-Id: I93364c74c26ba6e2bf6b08f1bd82802b966c8dfb Signed-off-by: Mike Lockwood <lockwood@android.com>
* Remove our copy of the f_mtp.h kernel header, now that it is in bionic.Mike Lockwood2010-07-153-55/+2
| | | | | Change-Id: I2b5e72bf25b3525ace4b919c6e8b6bd6750f6dfa Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for sending events to the host when objects are added and ↵Mike Lockwood2010-07-137-1/+154
| | | | | | | removed Change-Id: Ia1d5232b919c644c670ff9ca651eca92b3f9ad42 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Integrate host to device file transfer with the media provider.Mike Lockwood2010-07-123-14/+36
| | | | | | | | | | | | | | | | | | | | | MTP file transfers happen in two stages. The SendObjectInfo command sends some information about the file and reserves an ObjectHandle for the new file. The file transfer is then performed using the SendObject command. To support this in the media provider, MtpDatabase.beginSendObject receives the information from SendObjectInfo and creates an row for it in the MTP objects table for the new file. After the file transfer has completed, then MtpDatabase.endSendObject is called. In endSendObject, we run the media scanner on the new file, which will add a row to the images, audio, video or audio playlist table. To avoid the media scanner creating a second row for the file in the MTP objects table, we pass the ObjectHandle created in beginSendObject to the media scanner, which then passes it to the media provider via the content values when it performs its insert. Change-Id: I1ebcc63d6bd4404b0d3a93c703a9d3c097381d3a Signed-off-by: Mike Lockwood <lockwood@android.com>
* Remove some scafolding and test code that is no longer worth maintaining.Mike Lockwood2010-07-0917-1295/+1
| | | | | Change-Id: I9ee62d2463d8df1246a84774e8ac7e674778279a Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Use media provider database to implement MTP device support.Mike Lockwood2010-07-086-22/+32
| | | | | | | | | | | | | Uses a new "MTP objects" table in the media provider to support basic enumeration of the external storage file system. Support for accessing audio, video and image metadata in the existing media provider tables will be added in a later commit. The C++ MtpDatabase class is now abstract, to support a proxy subclass that calls through JNI to the Java MtpDatabase class in the media provider. Change-Id: I90f0db5f3acc5d35ae78c27a8507edff16d14305 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: remove separate audio table from prototype MTP databaseMike Lockwood2010-07-089-426/+42
| | | | | Change-Id: I5e4b49b741a0a3c6ddf5afcbb20a0d7c9515c8ce Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Fix ownership and file permissions for transferred files and foldersMike Lockwood2010-07-023-4/+24
| | | | | | | | All new files and folders are created with group sdcard_rw Permissions for new files are 0664 and directories 0775 Change-Id: I6d508231150f687e2e529112fd47f10e30fa594f Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Make MtpDatabase class abstract so we can have multiple implementationsMike Lockwood2010-07-029-571/+715
| | | | | | | | Rename existing test database to MtpSqliteDatabase This is the first step in transitioning to using the media provider database Change-Id: I5f36c854c6e76a79137c267b000a52ced803776c Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Remove an unnecessary thread from the MtpClient class.Mike Lockwood2010-07-012-23/+67
| | | | | | | Now a single thread is used for passing USB host events up to MtpClient. Change-Id: I0e3a277956cb3d1036da122ea10acb03a27844d6 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Try to fix the simulator build.Mike Lockwood2010-06-301-5/+4
| | | | | Change-Id: I3640e9eba433e711e23af1c6182e38c86c5b60bb Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Implement GetObjectPropDescMike Lockwood2010-06-305-15/+192
| | | | | Change-Id: I283651257254fc9cd9d93eab4605c5e33d3db93e Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add MtpServer Java class to wrap MTP device support.Mike Lockwood2010-06-302-28/+21
| | | | | Change-Id: I818c2d3b3f52ad5bb515acc4d3288b2b43e11908 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: replace printfs with logcatMike Lockwood2010-06-3022-80/+123
| | | | | Change-Id: I2c30921098e2dc049dc5fc1e0a548ead33c363e0 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Use a fd instead of a file path in file transfer ioctls.Mike Lockwood2010-06-222-10/+15
| | | | | | | | This restricts the driver to the client's permissions when copying files to avoid potential security problems. Change-Id: I9b3151168d334fe4374875804d4ba82bef44db3b Signed-off-by: Mike Lockwood <lockwood@android.com>
* mtptest: Add option to specify storage path at the command line.Mike Lockwood2010-06-222-4/+10
| | | | | Change-Id: Iac8a34ffb8177018a9164b3f2f97b2e84c3d8f1c Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Use stat.st_mode instead of dirent.d_type to determine file type.Mike Lockwood2010-06-141-2/+2
| | | | | | | dirent.d_type is not implemented on all file systems. Change-Id: I50a01fd77a9f976f215e7ff98dd04f0f2611bbce Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP device: Read manufacturer name and serial number from system properties.Mike Lockwood2010-06-142-3/+10
| | | | | Change-Id: I8d1ad79f38aaaa50fa8899e6b614096af95fdf39 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Fix uninitialized pointer bug.Mike Lockwood2010-06-141-0/+1
| | | | | Change-Id: Ia07ebd48aeb483e66957f5a174992d200494a744 Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add host support for deleting objects.Mike Lockwood2010-06-112-0/+31
| | | | | | For example, deleting pictures on a digital camera. Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: Add support for retrieving thumbnails to MTP content provider.Mike Lockwood2010-06-106-5/+78
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP provider: Add columns for MTP ObjectInfo dataset to the MTP objects tableMike Lockwood2010-06-102-6/+109
| | | | | | Signed-off-by: Mike Lockwood <lockwood@android.com> Change-Id: Ife0563ad1c3b3dbc2461e1a9e784cbb4653b3435
* Include stdlib to fix sim buildKenny Root2010-06-081-0/+1
| | | | Change-Id: I7732461a9351f53f9ddadcfb26485f2e553e056b
* MTP: host support for retrieving device property descriptorsMike Lockwood2010-06-0711-24/+339
| | | | Signed-off-by: Mike Lockwood <lockwood@android.com>
* Merge "MTP: Add support for host cancellation of file transfers."Mike Lockwood2010-06-042-22/+52
|\
| * MTP: Add support for host cancellation of file transfers.Mike Lockwood2010-06-042-22/+52
| | | | | | | | | | Change-Id: I72df423f8017286e41adae525e6fbcb6b8440687 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | Add missing library to linker command line.Doug Kwan2010-06-031-1/+1
| | | | | | | | Change-Id: Ia9ddf6e6bb5e72c32372a2f460806b6cbb7ec660
* | Add missing libraries, in order for gold to work.Jing Yu2010-06-031-1/+2
|/ | | | | | | gold is more strict than ld. If building A depends on libB directly, we must specify -lB at link time. Change-Id: Iac7cec58cbae5e0cbcfc9adab924db6733192d20
* Prototype Content Provider support for MTP/PTP devices.Mike Lockwood2010-06-019-363/+859
| | | | | | | | | | | | At this point much of the plumbing is in place, but only a few simple queries are supported. This is enough to support a proof of concept sample program that navigates the file hierarchy of a digital camera connected via USB. Also removed obsolete ptptest host test program. Change-Id: I17644344b9f0ce1ecc302bc0478c1f3d44a1647f Signed-off-by: Mike Lockwood <lockwood@android.com>
* MTP: adjust ptptest app for changes in libusbhost API.Mike Lockwood2010-05-251-3/+3
| | | | | Change-Id: I775e08c851a55d775b532129be11fb19515fbf6e Signed-off-by: Mike Lockwood <lockwood@android.com>
* PTP host: Implement getObjectHandles and getObjectInfo commandsMike Lockwood2010-05-1910-26/+234
| | | | | Change-Id: I3ff6e52237f400b4e50c534a1f964c80789bfe98 Signed-off-by: Mike Lockwood <lockwood@android.com>
* More work on PTP host support.Mike Lockwood2010-05-1920-64/+500
| | | | | Change-Id: Ifbd5bd5efa3cdb750ae1a2aae38181457554d34d Signed-off-by: Mike Lockwood <mike@spruce.(none)>
* MTP: More prototyping work:Mike Lockwood2010-05-1810-170/+858
| | | | | | | | | | New media scanner test program Media scanner now cleans up after files that no longer exist Separate database table for audio files Extract metadata from audio files with libstagefright Change-Id: I2bd0fe877836c741658e72fcfeb89c11be0d9b41 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Add -p option to mtptest program to run in PTP mode instead of MTPMike Lockwood2010-05-172-4/+29
| | | | | Change-Id: Idbd1437756daab8d6141db49b07d4eb0814c9e7e Signed-off-by: Mike Lockwood <lockwood@android.com>
* Move MTP code to the android namespaceMike Lockwood2010-05-1428-8/+109
| | | | | Change-Id: I5da48038fd5e4cdeefaeba42cdc74eb588b3448d Signed-off-by: Mike Lockwood <lockwood@android.com>
* Exclude mtptest program from simulator builds.Mike Lockwood2010-05-131-0/+4
| | | | | Change-Id: Ia9751a06d7607363e8c16b71f6f3c524833395a0 Signed-off-by: Mike Lockwood <lockwood@android.com>
* Checkpoint work on MTP and PTP investigation.Mike Lockwood2010-05-1331-0/+3656
This change includes work in progress on a C++ library for both host and device MTP and PTP support. Currently the makefile builds two test programs: mtptest - a command line test program that implements a small subset of device side MTP. Requires a kernel driver that has not been checked in yet. ptptest - a host tool to test USB host support for detecting and communicating with digital cameras over PTP. Runs on Linux host. Later this will be reformulated as a native library that will be used in the media process. Change-Id: I81aab279975b600b59d99013ab97f9adf0b58da7 Signed-off-by: Mike Lockwood <lockwood@android.com>