summaryrefslogtreecommitdiffstats
path: root/utils
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
parentc8fa53050d30b667f224668ca5de2bb7f07a1b3d (diff)
downloadrockbox-76fbb33adf3cd0b6bcbe26dc47464904493160bd.tar.gz
rockbox-76fbb33adf3cd0b6bcbe26dc47464904493160bd.tar.bz2
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')
-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 @@
+dbg,000
+syi,001
+ubp,002
+fup,003
+prk,004
+hld,005
+rtc,006
+mid,007
+pcd,008
+ser,009
+ufn,010
+kas,011
+shp,012
+tst,013
+gty,014
+fmp,015
+sdp,016
+ncp,017
+psk,018
+nvr,077
+she,084
+btc,085
+ins,089
+ctr,090
+sku,091
+bpr,019
+bfp,020
+bfd,021
+bml,022
+apd,078
+blf,079
+slp,080
+vrt,081
+fni,082
+sid,083
+mso,086
+cng,023
+lyr,024
+dbv,025
+fur,026
+ums,027
+skd,028
+ups,029
+mdk,030
+fvi,031
+mac,032
+fpi,033
+tr0,034
+tr1,035
+e00,036
+e01,037
+e02,038
+e03,039
+e04,040
+e05,041
+e06,042
+e07,043
+e08,044
+e09,045
+e10,046
+e11,047
+e12,048
+e13,049
+e14,050
+e15,051
+e16,052
+e17,053
+e18,054
+e19,055
+e20,056
+e21,057
+e22,058
+e23,059
+e24,060
+e25,061
+e26,062
+e27,063
+e28,064
+e29,065
+e30,066
+e31,067
+clv,068
+sps,069
+rbt,070
+edw,071
+bti,072
+hdi,073
+lbi,074
+fui,075
+eri,076
+pci,087
+dbi,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
nwz-s760,NWZ-S760 Series,0x12000001,0x12000002,0x12000004,0x12000005,0x12000006,0x12010001,0x12010002,0x12010004,0x12010005,0x12010006
nwz-s770,NWZ-S770 Series,0x16000001,0x16000002,0x16000004,0x16000005,0x16010001,0x16010002,0x16010004,0x16010005
nw-s780,NW-S780 Series,0x19000001,0x19000002,0x19000004,0x19000005
-nw-wm1,NW-WM1 Series,0x20000007,0x21000008
+nw-wm1a,NW-WM1 Series,0x20000007
+nw-wm1z,NW-WM1 Series,0x21000008
nwz-x1000,NWZ-X1000 Series,0x5000002,0x5000004,0x5000005,0x5020002,0x5040002,0x5020004,0x5040004,0x5020005,0x5040005
nw-zx100,NW-ZX100 Series,0x1c000007,0x1c000001,0x1c000002,0x1c000004,0x1c000005,0x1c000006
nw-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[] =
{ "destination", "Destination", 0x23, 8, 4, DNK_EXACT_LENGTH | DNK_UINT32},
{ "model_id", "Model ID", 0x23, 9, 4, DNK_EXACT_LENGTH | DNK_UINT32 | DNK_HEX},
{ "ufn", "Update filename", 0x23, 21, 8, DNK_STRING},
- { "kas", "Key and Signature", 0x23, 22, 60, DNK_STRING},
+ { "kas", "Key and Signature", 0x23, 22, 64, DNK_STRING},
{ "devinfo", "Devide Info", 0x12, 0, 64, DNK_HEX},
/* there are more obscure commands:
* - 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[] =
{ "nwz-s610", false, "fe14a16d7c5c52cf56846d04305f994c"},
/* The following models use a different encryption, but we put the KAS here
* to not forget them */
- { "nw-a30", false, "c40d91e7efff3e3aa5c8831dd85526fe4972086283419c8cd8fa3b7dcd39" },
- { "nw-wm1", false, "e8d171a5d92f35eed9658c03fb9f86a169591659851fd7c49525f587a70b" },
+ { "nw-a30", false, "c40d91e7efff3e3aa5c8831dd85526fe4972086283419c8cd8fa3b7dcd39dee4" },
+ { "nw-wm1a", false, "e8d171a5d92f35eed9658c03fb9f86a169591659851fd7c49525f587a70b526c" },
+ { "nw-wm1z", false, "2b07114f06d0f63b8ef8e31c8bc9332c7bd70281f7f8d2f80dab58cd36f82c82" },
{ "nw-zx300", false, "3ab5bbcb999463c50aaa957496b066c6b76a25f4505bf5b42c0bc4815cbe3db6" },
{ "nw-nwa40", false, "a0d2b1317794074aff77dd2afb9c7aa6b28d6cf24a5e5eb60df87a87eb562de5" },
{ 0 }