mirror of
https://github.com/bkerler/mtkclient.git
synced 2024-11-14 19:25:05 -05:00
Add error codes, fix legacy peek
This commit is contained in:
parent
da98d78cb6
commit
b6737a265b
2 changed files with 13 additions and 3 deletions
|
@ -639,6 +639,16 @@ ErrorCodes_XFlash = {
|
|||
0xc0020052: "Invalid Partition name",
|
||||
0xc0020053: "DA version Anti-Rollback error",
|
||||
0xc0020054: "Invalid msg size",
|
||||
0xc0020055: "Security level unsupported",
|
||||
0xc0020056: "Security level mismatch",
|
||||
0xc0020057: "Fault injection error",
|
||||
0xc0020058: "Public Key hash group invalid - too many root keys",
|
||||
0xc0020059: "Security level too large",
|
||||
0xc002005a: "Security config is formatted",
|
||||
0xc002005b: "Security config unknown error",
|
||||
0xc002005c: "Lockstate seccfg fail",
|
||||
0xc002005d: "Lockstate custom fail",
|
||||
0xc002005e: "Lockstate inconsistent",
|
||||
0xc0030001: "Scatter file invalid",
|
||||
0xc0030002: "DA file invalid",
|
||||
0xc0030003: "DA selection error",
|
||||
|
|
|
@ -107,9 +107,9 @@ class legacyext(metaclass=LogBase):
|
|||
dwords=length//4
|
||||
if length%4!=0:
|
||||
dwords+=1
|
||||
#data = bytearray(b"".join(int.to_bytes(val,4,'little') for val in [self.legacy.read_reg32(addr + pos * 4) for pos in range(dwords)]))
|
||||
res = self.legacy.custom_F0(addr, dwords)
|
||||
data = bytearray(b"".join([int.to_bytes(val,4,'little') for val in res]))
|
||||
data = bytearray(b"".join(int.to_bytes(val,4,'little') for val in [self.legacy.read_reg32(addr + pos * 4) for pos in range(dwords)]))
|
||||
#res = self.legacy.custom_F0(addr, dwords)
|
||||
#data = bytearray(b"".join([int.to_bytes(val,4,'little') for val in res]))
|
||||
return data[:length]
|
||||
|
||||
def writeregister(self, addr, dwords):
|
||||
|
|
Loading…
Reference in a new issue