# HG changeset patch # User Mychaela Falconia # Date 1613587234 0 # Node ID 8a714fe98aa9c5ca72e3636afe30d43f48adf05e # Parent 629be330f92bfd370e5e1a4bc6b72884dfefb6c4 doc/User-oriented-commands: new lnd-* commands diff -r 629be330f92b -r 8a714fe98aa9 doc/User-oriented-commands --- a/doc/User-oriented-commands Wed Feb 17 17:39:26 2021 +0000 +++ b/doc/User-oriented-commands Wed Feb 17 18:40:34 2021 +0000 @@ -302,17 +302,47 @@ history lists. Because this LND store is a cyclic file, not linear fixed like phonebooks, it -can only be dumped - it cannot be freely edited. (The only update operation -allowed on cyclic files is writing a new record that becomes the new #1, -shifting all previous records down and losing the oldest one - but it is an -operation to be performed by phones if they support this LND as envisioned by -ancient spec writers, not something we are in the business of with fc-simtool.) +does not allow random access writes: it allows random access reads like all +regular record-based files, but the only write operation allowed by the SIM +interface protocol and the SIM file system architecture is writing a new record +that becomes the new #1, shifting all previous records down and losing the +oldest one. Because of this write access limitation, we do not provide the same +set of operations on LND as for regular phonebooks - but we still provide good +tinkering ability. The following commands are available: + +lnd-dump + +This command dumps the content of the LND store on the terminal, in the same +format as pb-dump for regular phonebooks. + +If you have had your SIM for a very long time, having used it in different +phones with different firmwares, it may be interesting to look at the output of +lnd-dump - you may have LND records that were generated ages ago by other +phones if your current one does not write into SIM LND. + +lnd-dump outfile -The command to dump the LND cyclic store is 'lnd-dump'. If you have had your -SIM for a very long time, having used it in different phones with different -firmwares, it may be interesting to look at the output of lnd-dump - you may -have LND records that were generated ages ago by other phones if your current -one does not write into SIM LND. +This form of the lnd-dump command produces the same dump format, but saves it +in the named file instead of sending it to the terminal. + +lnd-restore filename + +This command reads the named phonebook data file (presumably written previously +with lnd-dump) and writes it into EF_LND on the SIM. This command works by +first constructing a full binary image of the desired EF_LND content, then +writing every record in the reverse order from the last index to the first. + +lnd-write phone-number [alpha-tag] + +This command writes a new record into the LND cyclic store just like a standard +phone would do when making a record of a new outgoing call. The two arguments +(one required and one optional) are the same as for pb-update-imm. + +lnd-erase + +This command erases the EF_LND cyclic store, making it appear as if no outgoing +calls have ever been recorded. It works by writing a blank record (0xFF in +every byte) N times, where N is the size of the cyclic store in records. Manipulating stored SMS =======================