Skip to content

Commit 7c0aaa9

Browse files
committed
tests: Adjust for Mavic 3 keys being published
1 parent f4d0edc commit 7c0aaa9

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

tests/test_bin_partimg_extract1.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,9 @@ def test_bin_bootimg_imah_v1_extract(capsys, modl_inp_dir, test_nth):
214214
('out/wm247-mavic_2_enterpr_rtk',1,),
215215
('out/wm260-mavic_pro_3',1,),
216216
('out/wm2605-mavic_3_classic',1,),
217+
('out/wm265e-mavic_pro_3_enterpr',1,),
218+
('out/wm265m-mavic_pro_3_mulspectr',1,),
219+
('out/wm265t-mavic_pro_3_thermal',1,),
217220
] )
218221
def test_bin_bootimg_imah_v2_extract(capsys, modl_inp_dir, test_nth):
219222
""" Test if boot images are extracting correctly, and prepare data for tests which use the extracted files.

tests/test_bin_sparseimg_solidify1.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ def case_bin_sparseimg_solidify(img_inp_fn):
108108
('out/wm247-mavic_2_enterpr_rtk',1,),
109109
('out/wm2605-mavic_3_classic',1,),
110110
('out/wm260-mavic_pro_3',1,),
111+
('out/wm265e-mavic_pro_3_enterpr',1,),
112+
('out/wm265m-mavic_pro_3_mulspectr',1,),
113+
('out/wm265t-mavic_pro_3_thermal',1,),
111114
] )
112115
def test_bin_sparseimg_imah_v2_solidify(capsys, modl_inp_dir, test_nth):
113116
""" Solidify sparse images so that they can be later extracted.

tests/test_dji_imah_fwsig_rebin1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -522,11 +522,11 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
522522
platform = m.group(1)
523523
# specific first level modules
524524
if (re.match(r'^.*{:s}_1502_[^/]*[.]fw[.]sig$'.format(platform), modl_inp_fn, re.IGNORECASE)): # the module uses 2048-bit PRAK
525-
module_cmdopts = "-k PRAK-9999-99 -k UFIE-9999-99 -f" # UFIE not published, forcing extract encrypted
525+
module_cmdopts = "-k PRAK-2020-01 -k UFIE-2020-04"
526526
# allow change of 2 bytes from auth key name, 256+16 from signature, up to 3x16 chunk padding
527527
module_changes_limit = 2 + 256 + 16 + 3*16
528528
else: # if first level module
529-
module_cmdopts = "-k PRAK-9999-98 -k UFIE-9999-99 -f" # UFIE not published, forcing extract encrypted
529+
module_cmdopts = "-k PRAK-2021-09 -k UFIE-2021-08"
530530
# allow change of 2 bytes from auth key name, 384+32 from signature, up to 3x16 chunk padding
531531
module_changes_limit = 2 + 384 + 32 + 3*16
532532
elif (m := re.match(r'^.*/(wm240|wm245|wm246)([._].*)?[.](bin|cfg|enc|fw|img|sig|ta|txt)$', modl_inp_fn, re.IGNORECASE)):
@@ -580,12 +580,12 @@ def get_params_for_dji_imah_fwsig(modl_inp_fn):
580580
module_changes_limit = 2 + 4 + 4 + 256 + 9*16 + 32 + 6*16
581581
# specific nested modules
582582
elif (re.match(r'^.*{:s}_0802_[^/]*[.]fw_0802.*$'.format(platform), modl_inp_fn, re.IGNORECASE)):
583-
module_cmdopts = "-k PRAK-2021-09 -k TBIE-2021-08" # first level key is not published, making this unused
583+
module_cmdopts = "-k PRAK-2021-09 -k TBIE-2021-08"
584584
# allow change of 2 bytes from auth key name, 384+32 from signature, up to 3x16 chunk padding
585585
module_changes_limit = 2 + 384 + 32 + 3*16
586586
# specific first level modules with different keys
587587
elif (re.match(r'^.*{:s}_0802_v[0-9a-z_.-]*[.]pro[.]fw[.]sig$'.format(platform), modl_inp_fn, re.IGNORECASE)):
588-
module_cmdopts = "-k PRAK-2021-09 -k UFIE-2021-08 -f" # UFIE not published, forcing extract encrypted
588+
module_cmdopts = "-k PRAK-2021-09 -k UFIE-2021-08"
589589
# allow change of 2 bytes from auth key name, 384+32 from signature, up to 3x16 chunk padding
590590
module_changes_limit = 2 + 384 + 32 + 3*16
591591
# specific first level modules with encrypted data checksum verification issues

0 commit comments

Comments
 (0)