Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 03 May 2016 08:23 AM by  bradb
USB Mass Storage using Android 2.3.4.
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages
mvly
Basic Member
Basic Member
Posts:104


--
08 Apr 2016 04:49 PM

    I noticed the DM3730 Torpedo, at least when running Android 2.3.4, does not show up as a Mass storage when I plug into a computer. I currently use ADB to transfer files between the device and the computer. However, is there a way to enable the mass storage interface for android? Normally all my android phones I have usually connect as a mass storage when you plug it into a computer.

     

    One of the main reason I ask this is I want an easy way to connect this device to a computer without having people install drivers and using ADB.

    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    13 Apr 2016 11:22 AM
    Here are some instructions, but make sure you read the notes at the bottom first to make sure you're OK with that. The instructions are written as part of the ICS package, but the kernel is mostly the same between ICS and GB, and a colleague thinks this should work in GB.


    The DM3730 Android Ice Cream Sandwich 4.0.4 BSP supports the use of an SD card on the DM3730 Development Kit as a mass storage partition when the kit’s USB OTG port is connected to a host PC via a USB A to mini-AB cable.
    To enable the mass storage device support, users need to set the CONFIG_USB_FILE_STORAGE=m and disable CONFIG_USB_G_ANDROID flag in the kernel configuration file kernel/arch/arm/configs/omap3logic_android_defconfig of the BSP source code. If kernel/.config exists, remove the old kernel configuration file in order for the new configuration change to take effect.
    If users want to enable mass storage device support at startup time, the following command can be mainlined by removing the “#” symbol at the start of a line in the device/logicpd/dm3730logic/partitions/root/init.logic.rc file of the BSP source code:

    # insmod /system/lib/modules/g_file_storage.ko file=/dev/block/mmcblk0p1 stall=0

    Alternatively, users can run the insmod command above at run time after an SD card is inserted in to the DM3730 Development Kit Baseboard.
    After the source code changes above, follow the procedures in Section 7.4 to rebuild the Android image.

    NOTE: Mass storage device support does not apply when the Android device is booted from an SD card and uses the SD card as a root filesystem.

    NOTE: The ADB is not functional when mass storage device support is enabled.
    mvly
    Basic Member
    Basic Member
    Posts:104


    --
    13 Apr 2016 05:55 PM

    Adam

    THanks for the response. 

     

    Address the first note,

    If I put the Android system on the internal NAND flash, make the modifications you mentioned, then would it should show up as mass storage? Otherwise, even with the modifications, it will not work if the SDcard is the root filesystem?

     

    Address 2nd Note:

    This is OK for now. I will have to address this down the road. Maybe when the software is super stable, there would not be a need for ADB.

     

     

    mvly
    Basic Member
    Basic Member
    Posts:104


    --
    02 May 2016 11:00 AM

    I successfully got it to go into mass storage mode using the recommendations you suggested Adam. For now, I will be using the ADB until I can get everything super stable to forgo the ADB link for the mass storage. Just as side question. What is the difference between CONFIG_USB_FILE_STORAGE and CONFIG_USB_MASS_STORAGE? Are they the same?

     

     

    Thanks!

     

     

    bradb
    Basic Member
    Basic Member
    Posts:203


    --
    03 May 2016 08:23 AM
    Here is the help text from the linux\drivers\usb\gadget\Kconfig of the driver that helps explain the difference between the two config options.

    config USB_MASS_STORAGE

    tristate "Mass Storage Gadget"
    depends on BLOCK
    help
    The Mass Storage Gadget acts as a USB Mass Storage disk drive.
    As its storage repository it can use a regular file or a block
    device (in much the same way as the "loop" device driver),
    specified as a module parameter or sysfs option.

    This is heavily based on File-backed Storage Gadget and in most
    cases you will want to use FSG instead. This gadget is mostly
    here to test the functionality of the Mass Storage Function
    which may be used with composite framework.

    Say "y" to link the driver statically, or "m" to build
    a dynamically linked module called "g_mass_storage". If unsure,
    consider File-backed Storage Gadget.

    In later versions of the kernel the Mass Storage Gadget is considered an updated replacement for the deprecated File-backed Storage Gadget (g_file_storage).
    You are not authorized to post a reply.