Skip to content

Commit fbe6d02

Browse files
committed
docs/saip-tool: fix ERROR: Unexpected indentation
According to [1], the literal block must be indented (and, like all paragraphs, separated from the surrounding ones by blank lines). [1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#literal-blocks While at it, fix tabs-vs-spaces: use 2 spaces like in other places. Change-Id: If548bf66339433c1f3f9e2a557821e808c6afa26
1 parent aace546 commit fbe6d02

File tree

1 file changed

+51
-46
lines changed

1 file changed

+51
-46
lines changed

docs/saip-tool.rst

+51-46
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,25 @@ reference the load block AID and pick, among other application related parameter
3636

3737
Example: Adding a JAVA-card applet to an existing profile package
3838
::
39-
# Step #1: Create the application PE and load the ijc contents from the .cap file:
40-
$ ./contrib/saip-tool.py upp.der add-app --output-file upp_with_app.der --applet-file app.cap --aid '1122334455'
41-
Read 28 PEs from file 'upp.der'
42-
Applying applet file: 'app.cap'...
43-
application PE inserted into PE Sequence after securityDomain PE AID: a000000151000000
44-
Writing 29 PEs to file 'upp_with_app.der'...
45-
46-
# Step #2: Create the application instance inside the application PE created in step #1:
47-
$ ./contrib/saip-tool.py upp_with_app.der add-app-inst --output-file upp_with_app_and_instance.der \
48-
--aid '1122334455' \
49-
--class-aid '112233445501' \
50-
--inst-aid '112233445501' \
51-
--app-privileges '00' \
52-
--app-spec-pars '00' \
53-
--uicc-toolkit-app-spec-pars '01001505000000000000000000000000'
54-
Read 29 PEs from file 'upp_with_app.der'
55-
Found Load Package AID: 1122334455, adding new instance AID: 112233445501 to Application PE...
56-
Writing 29 PEs to file 'upp_with_app_and_instance.der'...
39+
40+
# Step #1: Create the application PE and load the ijc contents from the .cap file:
41+
$ ./contrib/saip-tool.py upp.der add-app --output-file upp_with_app.der --applet-file app.cap --aid '1122334455'
42+
Read 28 PEs from file 'upp.der'
43+
Applying applet file: 'app.cap'...
44+
application PE inserted into PE Sequence after securityDomain PE AID: a000000151000000
45+
Writing 29 PEs to file 'upp_with_app.der'...
46+
47+
# Step #2: Create the application instance inside the application PE created in step #1:
48+
$ ./contrib/saip-tool.py upp_with_app.der add-app-inst --output-file upp_with_app_and_instance.der \
49+
--aid '1122334455' \
50+
--class-aid '112233445501' \
51+
--inst-aid '112233445501' \
52+
--app-privileges '00' \
53+
--app-spec-pars '00' \
54+
--uicc-toolkit-app-spec-pars '01001505000000000000000000000000'
55+
Read 29 PEs from file 'upp_with_app.der'
56+
Found Load Package AID: 1122334455, adding new instance AID: 112233445501 to Application PE...
57+
Writing 29 PEs to file 'upp_with_app_and_instance.der'...
5758

5859
NOTE: The parameters of the sub-commands `add-app` and `add-app-inst` are application specific. It is up to the application
5960
developer to pick parameters that suit the application correctly. For an exact command reference see section
@@ -70,30 +71,32 @@ to check if the applet insertaion was carried out as expected.
7071

7172
Example: Listing applications and their parameters
7273
::
73-
$ ./contrib/saip-tool.py upp_with_app_and_instance.der info --apps
74-
Read 29 PEs from file 'upp_with_app_and_instance.der'
75-
Application #0:
76-
loadBlock:
77-
loadPackageAID: '1122334455' (5 bytes)
78-
loadBlockObject: '01000fdecaffed010204000105d07002ca440200...681080056810a00633b44104b431066800a10231' (569 bytes)
79-
instanceList[0]:
80-
applicationLoadPackageAID: '1122334455' (5 bytes)
81-
classAID: '112233445501' (8 bytes)
82-
instanceAID: '112233445501' (8 bytes)
83-
applicationPrivileges: '00' (1 bytes)
84-
lifeCycleState: '07' (1 bytes)
85-
applicationSpecificParametersC9: '00' (1 bytes)
86-
applicationParameters:
87-
uiccToolkitApplicationSpecificParametersField: '01001505000000000000000000000000' (16 bytes)
74+
75+
$ ./contrib/saip-tool.py upp_with_app_and_instance.der info --apps
76+
Read 29 PEs from file 'upp_with_app_and_instance.der'
77+
Application #0:
78+
loadBlock:
79+
loadPackageAID: '1122334455' (5 bytes)
80+
loadBlockObject: '01000fdecaffed010204000105d07002ca440200...681080056810a00633b44104b431066800a10231' (569 bytes)
81+
instanceList[0]:
82+
applicationLoadPackageAID: '1122334455' (5 bytes)
83+
classAID: '112233445501' (8 bytes)
84+
instanceAID: '112233445501' (8 bytes)
85+
applicationPrivileges: '00' (1 bytes)
86+
lifeCycleState: '07' (1 bytes)
87+
applicationSpecificParametersC9: '00' (1 bytes)
88+
applicationParameters:
89+
uiccToolkitApplicationSpecificParametersField: '01001505000000000000000000000000' (16 bytes)
8890

8991
In case further analysis with external tools or transfer of applications from one profile package to another is
9092
necessary, the executable code in the `loadBlockObject` field can be extracted to an `.ijc` or an `.cap` file.
9193

9294
Example: Extracting applications from a profile package
9395
::
94-
$ ./contrib/saip-tool.py upp_with_app_and_instance.der extract-apps --output-dir ./apps --format ijc
95-
Read 29 PEs from file 'upp_with_app_and_instance.der'
96-
Writing Load Package AID: 1122334455 to file ./apps/8949449999999990023f-1122334455.ijc
96+
97+
$ ./contrib/saip-tool.py upp_with_app_and_instance.der extract-apps --output-dir ./apps --format ijc
98+
Read 29 PEs from file 'upp_with_app_and_instance.der'
99+
Writing Load Package AID: 1122334455 to file ./apps/8949449999999990023f-1122334455.ijc
97100

98101

99102
Removing applications
@@ -104,23 +107,25 @@ An application PE can be removed using sub-command `remove-app`. The user passes
104107

105108
Example: Remove an application from a profile package
106109
::
107-
$ ./contrib/saip-tool.py upp_with_app_and_instance.der remove-app --output-file upp_without_app.der --aid '1122334455'
108-
Read 29 PEs from file 'upp_with_app_and_instance.der'
109-
Found Load Package AID: 1122334455, removing related PE (id=23) from Sequence...
110-
Removing PE application (id=23) from Sequence...
111-
Writing 28 PEs to file 'upp_without_app.der'...
110+
111+
$ ./contrib/saip-tool.py upp_with_app_and_instance.der remove-app --output-file upp_without_app.der --aid '1122334455'
112+
Read 29 PEs from file 'upp_with_app_and_instance.der'
113+
Found Load Package AID: 1122334455, removing related PE (id=23) from Sequence...
114+
Removing PE application (id=23) from Sequence...
115+
Writing 28 PEs to file 'upp_without_app.der'...
112116

113117
In some cases it is useful to remove only an instance from an existing application PE. This may be the case when the
114118
an application developer wants to modify parameters of an application by removing and re-adding the instance. The
115119
operation basically rolls the state back to step 1 explained in section :ref:`Inserting applications`
116120

117121
Example: Remove an application instance from an application PE
118122
::
119-
$ ./contrib/saip-tool.py upp_with_app_and_instance.der remove-app-inst --output-file upp_without_app.der --aid '1122334455' --inst-aid '112233445501'
120-
Read 29 PEs from file 'upp_with_app_and_instance.der'
121-
Found Load Package AID: 1122334455, removing instance AID: 112233445501 from Application PE...
122-
Removing instance from Application PE...
123-
Writing 29 PEs to file 'upp_with_app.der'...
123+
124+
$ ./contrib/saip-tool.py upp_with_app_and_instance.der remove-app-inst --output-file upp_without_app.der --aid '1122334455' --inst-aid '112233445501'
125+
Read 29 PEs from file 'upp_with_app_and_instance.der'
126+
Found Load Package AID: 1122334455, removing instance AID: 112233445501 from Application PE...
127+
Removing instance from Application PE...
128+
Writing 29 PEs to file 'upp_with_app.der'...
124129

125130

126131
saip-tool syntax

0 commit comments

Comments
 (0)