Reading ROM, ROFS and E32 images
Run the following command to read a ROM, ROFS, or E32 image:
> readimage options <ROM/ROFS/E32
imagefile>
The command line options are as follows:
| Options | Description |
|---|
|
-o
|
Indicates output file name.
|
|
-d
|
Displays header information about the input image.
|
|
-s
|
Displays the directory structure of the input image.
|
|
-v
|
Displays image headers and the directory structure of the input
image.
|
|
-e
|
Displays the E32 image from the input ROM or ROFS image.
|
|
-h
|
Displays help information.
|
|
-z <path>
|
Extracts all files from the given image to the specified
location.
|
|
-l <logfile name>
|
Logs the image contents in a file.
|
|
-x <pattern>
|
Extracts a single or a set of files from a ROM or ROFS image
into the current directory. The pattern contains set of file names. For more
information about <pattern>, see
Extracting a set of files.
|
|
-r
|
Recursively extracts the files from ROM or ROFS image. This
option is always used with the -x option.
|
Note: Options are not case-sensitive. READIMAGE reports
an error if an argument is not passed for the -x or -z option.
Extracting one file
The command below extracts all the files from sample.img
to the C:\test location.
> readimage -z C:\test\
sample.img
Extracting a set of files with wildcard ?
The READIMAGE tool provides the -x option to extract one or more
files from a ROM or ROFS image, based on a pattern that matches the name of the
file. A question mark(?) indicates to match one instance of any character in a
file name, within the directory.
The command below extracts all the .exe files from the
\sys\bin directory present in the sample.img file,
whose file name consists of two characters.
> readimage -x \sys\bin\??.exe sample.img
Extracting a set of files with wildcard *
The READIMAGE tool provides the -x option to extract one or more
files from a ROM or ROFS image, based on a pattern that matches the name of the
file. A star sign(*) indicates to match zero or more instances of any character
in a file name, within the directory.
The command below extracts all the .exe files from the
\sys\bin directory present in the sample.img file, into the
current directory.
> readimage -x \sys\bin\*.exe sample.img
The command below extracts all the .exe files from the
\sys\bin directory present in the sample.img file, into the
C:\test location.
> readimage -x \sys\bin\*.exe -z C:\test
sample.img
The command below extracts all the .dll files from the \sys\bin\
directory and its sub-directories present in the sample.img file, into the
current directory.
> readimage -x \sys\bin\*.dll -r sample.img
Generating an IBY file from a SIS file
Run the following command to generate an .iby file from
a .sis file:
> readimage -sis2iby [-tmpdir <path> -outdir
<path>] <sisfile>
The following command-line options are supported when generating an
.iby file from a .sis file:
| Options | Description |
|---|
|
<sisfile>
|
Input .sis file.
|
|
-sis2iby
|
Used to generate .iby file for the given
.sis file.
|
|
-tmpdir <path>
|
Extracts contents of the .sis file to the
specified directory.
|
|
-outdir <path>
|
Generates .iby file in the specified directory.
|
To generate an .iby file from the given
.sis file, READIMAGE performs the steps as follows:
-
Reports an error if the .sis file is invalid or
missing.
-
Extracts the contents of the .sis file into a
specified directory, or the current directory if the path is not specified. A
.pkg script file is extracted from the sis file.
-
Creates an .iby file in the specified directoy or
the current directory based on the .pkg file.
The .sis file is created using the package (PKG) script
file. A .pkg file is a text file containing statements that define
the information needed by the installation (.sis ) file creation
utility, MAKESIS.
For more information about creating .sis file, see
Symbian Developer Library> Symbian OS Tools And Utilities > Software
Installation Toolkit - reference > MakeSIS - Installation file generator
syntax. For more information on the .pkg file format, see Symbian Developer
Library > Symbian OS Tools And Utilities > Software Installation
Toolkit-reference > Package file format.
READIMAGE extracts the .pkg file from the .sis
file. It then uses the .pkg file as input to generate the
.iby file.
Languages and Package-header section
The details of Languages and Package-header sections are written in
the .iby file as comments.
-
.pkg file
&EN
# {"HelloWorld application"}, (0xe8000091), 1, 0, 0, TYPE=SA
-
.iby file
// Generated IBY file for the package file: \dump\hwapp\hwapp.pkg
// Languages: EN
// Header: "HelloWorld application" (0xe8000091)
Install-file section
In the Install-file section, the standard installation files, which
are specified with the installation option FF, are written using
the FILE or DATA OBEY file keywords. The
File keyword is used if the file is an E32 image, Otherwise, the
Datakeyword is used.
-
.pkg file
"file0" - "!:\sys\bin\HelloWorld.exe", FF, VR
"file1" - "!:\System\Apps\AGENDA\Ericsson.txt", FF, VR
-
.iby file
file = "\test\dump\hwapp\file0" "\sys\bin\HelloWorld.exe"
data = "\test\dump\hwapp\sis0\file1" "\System\Apps\AGENDA\Ericsson.txt"
Embedded-SIS section
The details of the Embedded-SIS section are written using
#include pre-processor directive.
-
.pkg file
@"sis0.sis", (0x101f7771)
@"sis1.sis", (0x101f7773)
-
.iby file
#include "sis0.sis"
#include "sis1.sis"
Conditions-block section
In the Conditions-block section, the IF statements are written
using the #if - #else - #endif pre-processor directive block.
The condition-primitives and the functions in the .pkg
file are written as pre-processor macros.
The relational and logical operator keywords are written using the
appropriate operators.
-
.pkg file
;Display 2 options to the user
! ({"Option1", "Option1"}, {"Option2", "Option2"})
;Conditional installation
IF option1
"file0" - "!:\private\10000005\import\InstTest\option1.txt";
ENDIF
IF option2
"file0" - "!:\private\10000005\import\InstTest\option2.txt";
ENDIF
;Conditional installation
IF (MANUFACTURER) = (1)
"file1" - "!:\sys\bin\HelloWorld.exe"
ELSEIF (MANUFACTURER) = (4)
"file1" - "!:\sys\bin\HelloWorld1.exe"
ELSE
"file1" - "!:\sys\bin\HelloWorld2.exe"
ENDIF
-
.iby file
//Install Options: "OPTION1" "OPTION1" "OPTION2" "OPTION2"
#if defined (option1)
data = "s:\test\hwapp\file0"
"\private\10000005\import\InstTest\option1.txt";
#endif
#if defined (option2)
data = "s:\test\hwapp\file0"
"\private\10000005\import\InstTest\option2.txt";
#endif
#if (MANUFACTURER) = (1)
file = "s:\test\hwapp\file1" "\sys\bin\HelloWorld.exe"
#elseif (MANUFACTURER) = (4)
file = "s:\test\hwapp\file1" "\sys\bin\HelloWorld1.exe"
#else
file = "s:\test\hwapp\file1" "\sys\bin\HelloWorld2.exe"
#endif
Note: Using the .iby file with the
condition-block statements for the creation of ROM and ROFS images needs
appropriate macro definitions. For the preceding examples, the macros are
defined as follows:
#define option1 //selecting option1 block
#define MANUFACTURER 4 //selecting second conditional block