summaryrefslogtreecommitdiff
path: root/utils/nwztools/database/nvp/nodes-nwz-e450.txt
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-11-11 15:40:56 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2016-11-11 16:07:14 +0100
commit44bb2856a59be53ef5ede154a39c54a59b1cc6d0 (patch)
treece343ecff309d6d0172ea56946a9ce679329b250 /utils/nwztools/database/nvp/nodes-nwz-e450.txt
parent19de536ce2f3c8066ca5be9b570f72e5c1e88342 (diff)
downloadrockbox-44bb2856a59be53ef5ede154a39c54a59b1cc6d0.tar.gz
rockbox-44bb2856a59be53ef5ede154a39c54a59b1cc6d0.zip
nwztools/database: add database of information on Sony NWZ linux players
There must be an evil genius in Sony's Walkman division. Someone who made sure that each model is close enough to the previous one so that little code is needed but different enough so that an educated guess is not enough. Each linux-based Sony player has a model ID (mid) which is a 32-bit integer. I was able to extract a list of all model IDs and the correspoding name of the player (see README). This gives us 1) a nice list of all players (because NWZ-A729 vs NWZ-A729B, really Sony?) 2) an easy way to find the name of player programatically. It seems that the lower 8-bit of the model ID gives the storage size but don't bet your life on it. The remaining bytes seem to follow some kind of pattern but there are exceptions. From this list, I was able to build a list of all Sony's series (up to quite recent one). The only safe way to build that is by hand, with a list of series, each series having a list of model IDs. The notion of series is very important because all models in a series share the same firmware. A very important concept on Sony's players is the NVP, an area of the flash that stores data associated with keys. The README contains more information but basically this is where is record the model ID, the destination, the boot flags, the firmware upgrade flags, the boot image, the DRM keys, and a lot of other stuff. Of course Sony decided to slightly tweak the index of the keys regularly over time which means that each series has a potentially different map, and we need this map to talk to the NVP driver. Fortunately, Sony distributes the kernel for all its players and they contain a kernel header with this information. I wrote a script to unpack kernel sources and parse this header, producing a bunch of nw-*.txt files, included in this commit. This map is very specific though: it maps Sony's 3-letter names (bti) to indexes (1). This is not very useful without the decription (bti = boot image) and its size (262144). This information is harder to come by, and is only stored in one place: if icx_nvp_emmc.ko drivers, found on the device. Fortunately, Sony distributes a number of firmware upgrade, that contain the rootfs, than once extracted contain this driver. The driver is a standard ELF files with symbols. I wrote a parsing tool (nvptool) that is able to extract this information from the drivers. Using that, I produced a bunch of nodes-nw*.txt files. A reasonable assumption is that nodes meaning and size do not change over time (bti is always the boot image and is always 262144 bytes), so by merging a few of those file, we can get a complete picture (note that some nodes that existed in older player do not exists anymore so we really need to merge several ones from different generations). The advantage of storing all this information in plain text files, is that it now makes it easy to parse it and produce whatever format we want to use it. I wrote a python script that parses all this mess and produces a C file and header with all this information (nwz_db.{c,h}). Change-Id: Id790581ddd527d64418fe9e4e4df8e0546117b80
Diffstat (limited to 'utils/nwztools/database/nvp/nodes-nwz-e450.txt')
-rw-r--r--utils/nwztools/database/nvp/nodes-nwz-e450.txt78
1 files changed, 78 insertions, 0 deletions
diff --git a/utils/nwztools/database/nvp/nodes-nwz-e450.txt b/utils/nwztools/database/nvp/nodes-nwz-e450.txt
new file mode 100644
index 0000000000..438488acbc
--- /dev/null
+++ b/utils/nwztools/database/nvp/nodes-nwz-e450.txt
@@ -0,0 +1,78 @@
124,4,system information
223,32,u-boot password
39,4,firmware update flag
410,4,beep ok flag
534,16,rtc alarm
680,4,hold mode
716,64,model id
84,16,serial number
911,32,ship information
1068,4,color variation
1126,5,product code
1229,8,update file name
1332,64,key and signature
1417,4,test mode flag
1518,4,getty mode flag
1670,4,disable iptable flag
1730,64,sound driver parameter
1831,64,noise cancel driver parameter
1977,6,wifi mac address
2075,4,wifi protected setup
2182,16,fm parameter
2283,4,speaker ship info
2384,4,mass storage class mode
2425,4,exception monitor mode
255,4096,application parameter
2635,2048,bluetooth parameter
278,8,middleware parameter
2822,4,quick shutdown flag
2969,4,time out to sleep
3078,4,application debug mode flag
3179,4,browser log mode flag
327,20,secure clock
333,704,aad key
3412,160,aad icv
3513,520,empr key
3628,64,random data
3776,16,slacker time
3821,4,key mode (debug/release)
3981,8224,slacker id file
4014,16384,EKB 0
4115,16384,EKB 1
4236,1024,EMPR 0
4337,1024,EMPR 1
4438,1024,EMPR 2
4539,1024,EMPR 3
4640,1024,EMPR 4
4741,1024,EMPR 5
4842,1024,EMPR 6
4943,1024,EMPR 7
5044,1024,EMPR 8
5145,1024,EMPR 9
5246,1024,EMPR 10
5347,1024,EMPR 11
5448,1024,EMPR 12
5549,1024,EMPR 13
5650,1024,EMPR 14
5751,1024,EMPR 15
5852,1024,EMPR 16
5953,1024,EMPR 17
6054,1024,EMPR 18
6155,1024,EMPR 19
6256,1024,EMPR 20
6357,1024,EMPR 21
6458,1024,EMPR 22
6559,1024,EMPR 23
6660,1024,EMPR 24
6761,1024,EMPR 25
6862,1024,EMPR 26
6963,1024,EMPR 27
7064,1024,EMPR 28
7165,1024,EMPR 29
7266,1024,EMPR 30
7367,1024,EMPR 31
741,262144,boot image
752,262144,hold image
7620,262144,low battery image
7719,262144,update image
786,262144,update error image