Resources | Resources |



Connect Tool

ConnectTool (CT) is a command-line tool that interacts with a device to copy files, start applications, and other actions.

CT is part of the Brew MP Toolset, and is located in the bin directory of the toolset.

CT provides a collection of device commands that share a common syntax for connecting to the device and getting help. CT commands have the following format:

ct [global options] command_name [command_options]

Global options pertain to the entire program, such as specifying the device to which the connectin will be made. Command_name is a required parameter. If no commands are specified, CT will display help for the entire program, including a list of supported commands. Command_options are specific to the command specified by command_name, such as whether to install an application to the device EFS or a removable memory card. Options for a particular command can be shown by invoking the -h option for the command. For example, to obtain the options for the cp command, type the following:

ct -h cp

This produces the following output:

cp: Copies files to/from a device
Copies a file to or from a target or within a target.
ct ... cp [-h] [-v] [-r] [-f]
-h, --help Show help for the program or a specific command
-v, --verbose Display extra information for commands
-r, --recursive Recursively copy the source directory
-f, --force Overwrite file if existing

Specifying devices with CT

CT requires that the user specify which device that the commands should be executed on, since it is possible to have multiple devices connected to the same PC simultaneously. This is done through the global -g and -p options. The gateway, or -g option, specifies the type of connection (USB or Simulator). The -p option specifies which device on that connection to use. The following commands cover various connection scenarios:

  • If there is a single target (Simulator or device) connected, no identification is required. A command can be executed without either the -p or -g options to Connect. The following command would execute properly:

    ct enablestatus

  • If there is one physical device and one simulator running, specify the -g option. For instance to refer to the physical device, use the following minimal command:

    ct -g usb enablestatus

  • If there are multiple physical devices connected, use the -p option to ensure the connection is unique. The -p option does a substring match, so you only need to specify enough of the device to provide a unique match. For example if the ct listtargets command shows 2 devices, one with an IMEI (serial number) of 351602000123456 and another with 351602000789789, you could use only the -p option with the last three or 4 digits, such as the following example:

    ct -p 789 enablestatus

    The following example will also work, because it's a minimal substring match, and the first number doesn't contain the number 7:

    ct -p 7 enablestatus

Specifying device paths with CT

Several CT commands manipulate the remote filesystem. Remote file paths should be specified using their full "fs:/" qualified paths. For instance, to show the contents of the "shared" directory, use the following:

ct ls fs:/shared

A leading colon can be used in place of "fs:". The following is a valid syntax to copy a file named "data.dat" from the PC's root directory to the shared directory:

ct cp c:\data.dat :/shared/data.dat

The following command can be used to copy a log file to the local PC:

ct cp :/usermods/myapp/myapp.log C:\logs\myapp.log

Developer Mode Enable a device using CT

The following commands enable Developer Mode on a device.

To supply a test signature to enable the device:

ct sigenable

To supply a username/password combination to the portal:

ct desenable

To display whether the given target is enabled/disabled, and if enabled, when the current enablement period ends. Privileges of the signature can be listed by using the -r command: ct enablestatus(es) -r.

ct enablestatus