rockbox/utils/rbpms/rbpms.py
Vencislav Atanasov 0781195c22 Add iPod Nano 2G post-mortem memory dumper by Michael Sparmann
The files are downloaded from https://www.rockbox.org/tracker/task/11701

Change-Id: Ic6415f76207868661c231cb534cb179160eb60e0
2025-08-14 20:45:19 -04:00

31 lines
711 B
Python

#!/usr/bin/env python
import sys
import librbpms
def usage():
print ""
print "Please provide a command and (if needed) parameters as command line arguments"
print ""
print "Available commands:"
print ""
print " download <address> <size> <file>"
print " Downloads <size> bytes of data from the specified address on the device,"
print " and stores it in the specified file."
print ""
print "All numbers are hexadecimal!"
exit(2)
def parsecommand(dev, argv):
if len(argv) < 2: usage()
elif argv[1] == "download":
if len(argv) != 5: usage()
dev.download(int(argv[2], 16), int(argv[3], 16), argv[4])
else: usage()
dev = librbpms.rbpms()
parsecommand(dev, sys.argv)