summaryrefslogtreecommitdiff
path: root/utils/nwztools
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2020-06-13 16:15:34 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2020-10-11 13:08:03 +0200
commit76fbb33adf3cd0b6bcbe26dc47464904493160bd (patch)
treecfabff837f7153496faf41eb3853b9d6ac826a53 /utils/nwztools
parentc8fa53050d30b667f224668ca5de2bb7f07a1b3d (diff)
downloadrockbox-76fbb33adf3cd0b6bcbe26dc47464904493160bd.tar.gz
rockbox-76fbb33adf3cd0b6bcbe26dc47464904493160bd.zip
nwztools: fix MW-WM1/A30 KAS, fix KAS length
Split WM1A/WM1Z because they don't have the same KAS. On newer devices, the KAS is actually 64 bytes, not 60. The strange thing is that "get_dnk_nvp kas" returns 60 bytes whereas "get_dnk_prop kas" returns 64, not sure why. Change-Id: I944d3d838209ba58388439af0cdf5d7c74f1f7fc
Diffstat (limited to 'utils/nwztools')
-rw-r--r--utils/nwztools/database/nvp/nw-wm1a.txt (renamed from utils/nwztools/database/nvp/nw-wm1.txt)0
-rw-r--r--utils/nwztools/database/nvp/nw-wm1z.txt92
-rw-r--r--utils/nwztools/database/series.txt3
-rw-r--r--utils/nwztools/scsitools/scsitool.c2
-rw-r--r--utils/nwztools/upgtools/upg.c5
5 files changed, 98 insertions, 4 deletions
diff --git a/utils/nwztools/database/nvp/nw-wm1.txt b/utils/nwztools/database/nvp/nw-wm1a.txt
index dd058fb15e..dd058fb15e 100644
--- a/utils/nwztools/database/nvp/nw-wm1.txt
+++ b/utils/nwztools/database/nvp/nw-wm1a.txt
diff --git a/utils/nwztools/database/nvp/nw-wm1z.txt b/utils/nwztools/database/nvp/nw-wm1z.txt
new file mode 100644
index 0000000000..dd058fb15e
--- /dev/null
+++ b/utils/nwztools/database/nvp/nw-wm1z.txt
@@ -0,0 +1,92 @@
1dbg,000
2syi,001
3ubp,002
4fup,003
5prk,004
6hld,005
7rtc,006
8mid,007
9pcd,008
10ser,009
11ufn,010
12kas,011
13shp,012
14tst,013
15gty,014
16fmp,015
17sdp,016
18ncp,017
19psk,018
20nvr,077
21she,084
22btc,085
23ins,089
24ctr,090
25sku,091
26bpr,019
27bfp,020
28bfd,021
29bml,022
30apd,078
31blf,079
32slp,080
33vrt,081
34fni,082
35sid,083
36mso,086
37cng,023
38lyr,024
39dbv,025
40fur,026
41ums,027
42skd,028
43ups,029
44mdk,030
45fvi,031
46mac,032
47fpi,033
48tr0,034
49tr1,035
50e00,036
51e01,037
52e02,038
53e03,039
54e04,040
55e05,041
56e06,042
57e07,043
58e08,044
59e09,045
60e10,046
61e11,047
62e12,048
63e13,049
64e14,050
65e15,051
66e16,052
67e17,053
68e18,054
69e19,055
70e20,056
71e21,057
72e22,058
73e23,059
74e24,060
75e25,061
76e26,062
77e27,063
78e28,064
79e29,065
80e30,066
81e31,067
82clv,068
83sps,069
84rbt,070
85edw,071
86bti,072
87hdi,073
88lbi,074
89fui,075
90eri,076
91pci,087
92dbi,088
diff --git a/utils/nwztools/database/series.txt b/utils/nwztools/database/series.txt
index b40432688a..fa14b0d5e1 100644
--- a/utils/nwztools/database/series.txt
+++ b/utils/nwztools/database/series.txt
@@ -32,7 +32,8 @@ nwz-s750,NWZ-S750 Series,0x9000002,0x9000004,0x9000005,0xf000002,0xf000004
32nwz-s760,NWZ-S760 Series,0x12000001,0x12000002,0x12000004,0x12000005,0x12000006,0x12010001,0x12010002,0x12010004,0x12010005,0x12010006 32nwz-s760,NWZ-S760 Series,0x12000001,0x12000002,0x12000004,0x12000005,0x12000006,0x12010001,0x12010002,0x12010004,0x12010005,0x12010006
33nwz-s770,NWZ-S770 Series,0x16000001,0x16000002,0x16000004,0x16000005,0x16010001,0x16010002,0x16010004,0x16010005 33nwz-s770,NWZ-S770 Series,0x16000001,0x16000002,0x16000004,0x16000005,0x16010001,0x16010002,0x16010004,0x16010005
34nw-s780,NW-S780 Series,0x19000001,0x19000002,0x19000004,0x19000005 34nw-s780,NW-S780 Series,0x19000001,0x19000002,0x19000004,0x19000005
35nw-wm1,NW-WM1 Series,0x20000007,0x21000008 35nw-wm1a,NW-WM1 Series,0x20000007
36nw-wm1z,NW-WM1 Series,0x21000008
36nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5020004,0x5040004,0x5020005,0x5040005 37nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5020004,0x5040004,0x5020005,0x5040005
37nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006 38nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006
38nw-zx300,NW-ZX300 Series,0x23000004,0x23000006,0x23000007 39nw-zx300,NW-ZX300 Series,0x23000004,0x23000006,0x23000007
diff --git a/utils/nwztools/scsitools/scsitool.c b/utils/nwztools/scsitools/scsitool.c
index c4834b709a..4f7e6ad4b8 100644
--- a/utils/nwztools/scsitools/scsitool.c
+++ b/utils/nwztools/scsitools/scsitool.c
@@ -167,7 +167,7 @@ struct dnk_prop_t dnk_prop_list[] =
167 { "destination", "Destination", 0x23, 8, 4, DNK_EXACT_LENGTH | DNK_UINT32}, 167 { "destination", "Destination", 0x23, 8, 4, DNK_EXACT_LENGTH | DNK_UINT32},
168 { "model_id", "Model ID", 0x23, 9, 4, DNK_EXACT_LENGTH | DNK_UINT32 | DNK_HEX}, 168 { "model_id", "Model ID", 0x23, 9, 4, DNK_EXACT_LENGTH | DNK_UINT32 | DNK_HEX},
169 { "ufn", "Update filename", 0x23, 21, 8, DNK_STRING}, 169 { "ufn", "Update filename", 0x23, 21, 8, DNK_STRING},
170 { "kas", "Key and Signature", 0x23, 22, 60, DNK_STRING}, 170 { "kas", "Key and Signature", 0x23, 22, 64, DNK_STRING},
171 { "devinfo", "Devide Info", 0x12, 0, 64, DNK_HEX}, 171 { "devinfo", "Devide Info", 0x12, 0, 64, DNK_HEX},
172 /* there are more obscure commands: 172 /* there are more obscure commands:
173 * - 0x11 returns a 10-byte packet containing a 8-byte "LeftIdl8", scrambled 173 * - 0x11 returns a 10-byte packet containing a 8-byte "LeftIdl8", scrambled
diff --git a/utils/nwztools/upgtools/upg.c b/utils/nwztools/upgtools/upg.c
index 28cfae4f37..599fbbeaf6 100644
--- a/utils/nwztools/upgtools/upg.c
+++ b/utils/nwztools/upgtools/upg.c
@@ -46,8 +46,9 @@ struct nwz_model_t g_model_list[] =
46 { "nwz-s610", false, "fe14a16d7c5c52cf56846d04305f994c"}, 46 { "nwz-s610", false, "fe14a16d7c5c52cf56846d04305f994c"},
47 /* The following models use a different encryption, but we put the KAS here 47 /* The following models use a different encryption, but we put the KAS here
48 * to not forget them */ 48 * to not forget them */
49 { "nw-a30", false, "c40d91e7efff3e3aa5c8831dd85526fe4972086283419c8cd8fa3b7dcd39" }, 49 { "nw-a30", false, "c40d91e7efff3e3aa5c8831dd85526fe4972086283419c8cd8fa3b7dcd39dee4" },
50 { "nw-wm1", false, "e8d171a5d92f35eed9658c03fb9f86a169591659851fd7c49525f587a70b" }, 50 { "nw-wm1a", false, "e8d171a5d92f35eed9658c03fb9f86a169591659851fd7c49525f587a70b526c" },
51 { "nw-wm1z", false, "2b07114f06d0f63b8ef8e31c8bc9332c7bd70281f7f8d2f80dab58cd36f82c82" },
51 { "nw-zx300", false, "3ab5bbcb999463c50aaa957496b066c6b76a25f4505bf5b42c0bc4815cbe3db6" }, 52 { "nw-zx300", false, "3ab5bbcb999463c50aaa957496b066c6b76a25f4505bf5b42c0bc4815cbe3db6" },
52 { "nw-nwa40", false, "a0d2b1317794074aff77dd2afb9c7aa6b28d6cf24a5e5eb60df87a87eb562de5" }, 53 { "nw-nwa40", false, "a0d2b1317794074aff77dd2afb9c7aa6b28d6cf24a5e5eb60df87a87eb562de5" },
53 { 0 } 54 { 0 }