Skip to content

Conversation

@euiccc2025
Copy link

This pull request introduces two new commands, readNvItem and writeNvItem, to enable direct reading and writing of individual NV items without needing to process entire directories or modem configuration files every time.

New Commands:

1. readNvItem

Reads a single NV item from the device.

Options:

  • -i, --itemId (Required): The ID of the NV item to read.
  • -o, --outComputerFilePath (Optional): Path to save the output file. If omitted, the output is printed to the console.
  • -f, --format (Optional): The output format. Can be Raw, Hex, or Dec. Defaults to Raw for files and Hex for console output.

Examples:

# Read NV item 441 and print its content as a hex string to the console
EfsTools.exe readNvItem -i 441 

# Read NV item 441 and save it as a raw binary file
EfsTools.exe readNvItem -i 441 -o lock_code.bin

# Read NV item 441 and save it as a hex string in a text file
EfsTools.exe readNvItem -i 441 -o lock_code.txt -f Hex

2. writeNvItem

Writes data to a single NV item on the device.

Options:

  • -i, --itemId (Required): The ID of the NV item to write.
  • -c, --inComputerFilePath (Optional): The input file containing the data to write.
  • -p, --payload (Optional): A string containing the data to write. (Use quotes for strings with spaces).
  • -f, --format (Optional): The format of the input data. Can be Raw, Hex, or Dec. Defaults to Raw. Raw format is only valid for file inputs.

Examples:

# Write to NV item 441 from a raw binary file
EfsTools.exe writeNvItem -i 441 -c lock_code.bin

# Write to NV item 441 from a hex string in a text file
EfsTools.exe writeNvItem -i 441 -c lock_code.txt -f Hex

# Write to NV item 441 using a hex payload from the command line
EfsTools.exe writeNvItem -i 441 -p "31 32 33 34 00 00 00 00" -f Hex

# Write to NV item 441 using a decimal payload from the command line
EfsTools.exe writeNvItem -i 441 -p "49 50 51 52 0 0 0 0" -f Dec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant