From 2c219cd706e0ad6ace7eaf17543b109d03215697 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 11 Mar 2024 12:55:29 +0100 Subject: [PATCH] docs/shell: Give users some hints on what to do if encoding/decoding fails Change-Id: I557991da748126f3585b88b27706b29e0264635b Related: OS#6385 --- docs/shell.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/docs/shell.rst b/docs/shell.rst index 487d22ed..a27c4502 100644 --- a/docs/shell.rst +++ b/docs/shell.rst @@ -505,6 +505,9 @@ read_record_decoded :module: pySim.filesystem :func: LinFixedEF.ShellCommands.read_rec_dec_parser +If this command fails, it means that the record is not decodable, and you should use the :ref:`read_record` +command and proceed with manual decoding of the contents. + read_records ~~~~~~~~~~~~ @@ -519,6 +522,9 @@ read_records_decoded :module: pySim.filesystem :func: LinFixedEF.ShellCommands.read_recs_dec_parser +If this command fails, it means that the record[s] are not decodable, and you should use the :ref:`read_records` +command and proceed with manual decoding of the contents. + update_record ~~~~~~~~~~~~~ @@ -533,6 +539,9 @@ update_record_decoded :module: pySim.filesystem :func: LinFixedEF.ShellCommands.upd_rec_dec_parser +If this command fails, it means that the record is not encodable; please check your input and/or use the raw +:ref:`update_record` command. + edit_record_decoded ~~~~~~~~~~~~~~~~~~~ @@ -551,6 +560,12 @@ back to the record on the SIM card. This allows for easy interactive modification of records. +If this command fails before the editor is spawned, it means that the current record contents is not decodable, +and you should use the :ref:`update_record_decoded` or :ref:`update_record` command. + +If this command fails after making your modificatiosn in the editor, it means that the new file contents is not +encodable; please check your input and/or us the raw :ref:`update_record` comamdn. + decode_hex ~~~~~~~~~~ @@ -579,6 +594,8 @@ read_binary_decoded :module: pySim.filesystem :func: TransparentEF.ShellCommands.read_bin_dec_parser +If this command fails, it means that the file is not decodable, and you should use the :ref:`read_binary` +command and proceed with manual decoding of the contents. update_binary ~~~~~~~~~~~~~ @@ -632,6 +649,10 @@ The below example demonstrates this by modifying the ciphering indicator field w "extensions": "ff" } +If this command fails, it means that the file is not encodable; please check your input and/or use the raw +:ref:`update_binary` command. + + edit_binary_decoded ~~~~~~~~~~~~~~~~~~~ This command will read the selected binary EF, decode it to its JSON representation, save @@ -645,6 +666,12 @@ to the SIM card. This allows for easy interactive modification of file contents. +If this command fails before the editor is spawned, it means that the current file contents is not decodable, +and you should use the :ref:`update_binary_decoded` or :ref:`update_binary` command. + +If this command fails after making your modificatiosn in the editor, it means that the new file contents is not +encodable; please check your input and/or us the raw :ref:`update_binary` comamdn. + decode_hex ~~~~~~~~~~