summaryrefslogtreecommitdiff
path: root/utils/nwztools/database/nvp/nodes-nwz-a860.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-a860.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-a860.txt')
-rw-r--r--utils/nwztools/database/nvp/nodes-nwz-a860.txt89
1 files changed, 89 insertions, 0 deletions
diff --git a/utils/nwztools/database/nvp/nodes-nwz-a860.txt b/utils/nwztools/database/nvp/nodes-nwz-a860.txt
new file mode 100644
index 0000000000..4a998d839a
--- /dev/null
+++ b/utils/nwztools/database/nvp/nodes-nwz-a860.txt
@@ -0,0 +1,89 @@
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
2527,4,battery calibration
2686,512,bluetooth pskey
275,4096,application parameter
287,20,secure clock
2912,160,aad icv
3013,520,empr key
3176,16,slacker time
3221,4,key mode (debug/release)
3371,64,marlin time
3472,16384,marlin crl
3589,512,btmw factory pair info
3688,512,btmw factory scdb
3787,4,btmw log mode flag
3885,4,europe vol regulation flag
398,8,middleware parameter
4022,4,quick shutdown flag
4169,4,time out to sleep
4278,4,application debug mode flag
4379,4,browser log mode flag
443,704,aad key
4528,64,wmt key
4681,8224,slacker id file
4773,33024,marlin device key
4833,64,starfish id
4935,2048,bluetooth address
5014,16384,EKB 0
5115,16384,EKB 1
5274,24576,marlin user key
5336,1024,EMPR 0
5437,1024,EMPR 1
5538,1024,EMPR 2
5639,1024,EMPR 3
5740,1024,EMPR 4
5841,1024,EMPR 5
5942,1024,EMPR 6
6043,1024,EMPR 7
6144,1024,EMPR 8
6245,1024,EMPR 9
6346,1024,EMPR 10
6447,1024,EMPR 11
6548,1024,EMPR 12
6649,1024,EMPR 13
6750,1024,EMPR 14
6851,1024,EMPR 15
6952,1024,EMPR 16
7053,1024,EMPR 17
7154,1024,EMPR 18
7255,1024,EMPR 19
7356,1024,EMPR 20
7457,1024,EMPR 21
7558,1024,EMPR 22
7659,1024,EMPR 23
7760,1024,EMPR 24
7861,1024,EMPR 25
7962,1024,EMPR 26
8063,1024,EMPR 27
8164,1024,EMPR 28
8265,1024,EMPR 29
8366,1024,EMPR 30
8467,1024,EMPR 31
851,262144,boot image
862,262144,hold image
8720,262144,low battery image
8819,262144,update image
896,262144,update error image