Skip to content

Commit 6498743

Browse files
committed
dji_imah_fwsig: Unsigning adsb_soc from within m1502
1 parent 3ac7827 commit 6498743

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

tests/test_bin_partimg_extract1.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ def test_bin_bootimg_imah_v2_extract(capsys, modl_inp_dir, test_nth):
233233
"{}/*/*_1301-extr1/bootarea.img".format(modl_inp_dir),
234234
"{}/*/*_1301-extr1/loader.img".format(modl_inp_dir),
235235
"{}/*/*_1502-extr1/bootarea.img".format(modl_inp_dir),
236+
"{}/*/*_1502-extr1/vendor-extr1/adsb/adsb_soc.img".format(modl_inp_dir),
236237
"{}/*/*_2607.bin".format(modl_inp_dir), # in ag500 and ag501, this module is a bootarea.img as well
237238
"{}/*/*_2801-extr1/bootarea.img".format(modl_inp_dir),
238239
) ]) if os.path.isfile(fn)]

tests/test_dji_imah_fwsig_rebin1.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,12 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
523523
# specific FW version with keys reused from wm260
524524
if (re.match(r'^.*/V00.01.0101[^/]*/{:s}.*$'.format(platform), modl_inp_fn, re.IGNORECASE)):
525525
# specific nested modules
526-
if (re.match(r'^.*{:s}_1502_[^/]*[.]fw_1502.*$'.format(platform), modl_inp_fn, re.IGNORECASE)):
526+
if (re.match(r'^.*{:s}_1502_[^/]*[.]fw_1502.*adsb_soc[^/]*[.]img[.]sig$'.format(platform), modl_inp_fn, re.IGNORECASE)):
527+
module_cmdopts = "-k PRAK-2020-04 -k TBIE-9999-99 -f" # TBIE not published, forcing extract encrypted
528+
# allow change of 2 bytes from auth key name, 4+4 from enc+dec checksum, 256 from signature, up to 11x16 chunk padding, 32 payload digest
529+
module_changes_limit = 2 + 4 + 4 + 256 + 11*16 + 32
530+
# specific nested modules
531+
elif (re.match(r'^.*{:s}_1502_[^/]*[.]fw_1502.*$'.format(platform), modl_inp_fn, re.IGNORECASE)):
527532
module_cmdopts = "-k PRAK-2020-01 -k TBIE-2020-02"
528533
# allow change of 2 bytes from auth key name, 4+4 from enc+dec checksum, 256 from signature, up to 9x16 chunk padding, 32 payload digest, 6x16 unknown additional
529534
module_changes_limit = 2 + 4 + 4 + 256 + 9*16 + 32 + 6*16
@@ -1000,6 +1005,7 @@ def test_dji_imah_fwsig_v2_nested_rebin(capsys, cmdargs, modl_inp_dir, test_nth)
10001005
"{}/*/*-loader_p*.img.sig".format(modl_inp_dir),
10011006
"{}/*/*-unpack_p*.img.sig".format(modl_inp_dir),
10021007
"{}/*/*-part_p*.img.sig".format(modl_inp_dir),
1008+
"{}/*/*-adsb_soc_p*.img.sig".format(modl_inp_dir),
10031009
# output from test_bin_archives_imah_v2_nested_extract
10041010
"{}/*/*-extr1/vendor-extr1/ta/*-*-*0.ta".format(modl_inp_dir),
10051011
"{}/*/*-extr1/vendor-extr1/ta/*-*-*1.ta".format(modl_inp_dir),

0 commit comments

Comments
 (0)