|
||
SETCAP
Version 9.0 and later
This is a tool that allows you to make a copy of an executable file and to assign a set of capabilities to it. It can also modify the Secure or Vendor IDs.
The purpose of the tool is to allow you to test the executable with
different capability combinations. It avoids the overhead of maintaining
multiple copies of the executable's .mmp
file for each capability
combination, and the need to rebuild each copy of the executable after a change
to the source code.
Note: this is not a native PC utility. It is a command line tool that runs under Symbian OS.
This is the command line syntax:
SETCAP source_exe capability [-SID secureId] [-VID vendorId] [destination_path]
The following arguments are used.
|
The name and the path of an executable file to be copied. If
the path is not specified, a default path of |
|
The hexadecimal representation of the set of capabilities. This should be a simple string of hexadecimal characters
(i.e. not preceded by For example, the three capabilities: LocalServices, ReadUserData and WriteUserData would be represented by the value of:
which in hexadecimal is If the value supplied includes capabilities that are not supported by the current version of Symbian OS, then these capabilities are ignored; they are not added to the file. |
|
The hexadecimal value of the secure ID that is to be assigned. This should be a simple string of hexadecimal characters
(i.e. not preceded by This is optional. |
|
The hexadecimal value of the vendor ID to be assigned. This should be a simple string of hexadecimal characters
(i.e. not preceded by This is optional. |
|
The name and path of the target executable to which the executable is copied. This is optional, and if not specified, defaults
to |
If the source executable is in ROM, then it must be a RAM executable image, not an execute-in-place (XIP) image. In other words, its entry in an OBY file must start with "data=" and not "file=".
For OBY files generated automatically using ABLD
ROMFILE
, this needs to be achieved by using lines similar to the
following in the executable's .mmp
file:
ROMTARGET // Empty ROM path means don't include normal execute-in-place file
RAMTARGET \sys\bin\ // Target path (in ROM) for RAM executable image
Symbian OS only allows one binary file with a given name; the
name does not include the file path or extension. This means that if
SETCAP
is used to make a copy of a binary which is already loaded,
then the copy will not be loaded when used with
RProcess::Create()
; instead the already loaded version is used. To
avoid this, use SETCAP
to give the copy a different name. For
example:
> SETCAP test.exe 1c000 test2.exe