summaryrefslogtreecommitdiffstats
path: root/utils/nwztools/database/models.txt
AgeCommit message (Collapse)AuthorFilesLines
2018-10-29sonynwz: add NW-A55 to databaseAmaury Pouly1-0/+1
Change-Id: I59861119c59490f586b3c6ed32a1c41df8b3d365
2017-11-01nwztools: add NW-A46 to the databaseAmaury Pouly1-0/+1
Change-Id: I85dc2080e0be07ff689384c0445f4f1595baf4ac
2017-10-24nwztools: add NW-A45Amaury Pouly1-0/+1
Change-Id: I75a7723498564ee73c3682391582e354ad672fd7
2017-10-24nwztools: add NW-ZX300AAmaury Pouly1-0/+1
Change-Id: I8b311ed6b48b92b9ecf4fb25c19119cfb2d5beb1
2017-10-17sonynwz: add NW-A47 to the database and regenerate nwz_db.{c,h}Amaury Pouly1-0/+1
Change-Id: I6331a48a4d336348e90a32cf151427b29eeedb2b
2017-10-07Add Sony NW-ZX300 model id to databaseAmaury Pouly1-0/+1
Change-Id: I8e7a14b86408c52cbd4a059e2db6a9c9d0966fc6
2017-06-05Add NW-A36 and NW-A37 model IDs, based on the A30 service manual.Amaury Pouly1-0/+2
I am unsure about the names of the player, the manual says A36HN and A37HN but at the same time there is a A35 and A35HN with the same ID, and Sony does not usually put the "HN" in its device list. Change-Id: Idbf32970aa334b30f1b8947a78b8eebd524b193b
2017-01-08nwztools: add A35 model and KASAmaury Pouly1-0/+1
We don't know the encryption method, the KAS is completely different but it might be useful to record it anyway for future purposes. MID extracted from device, Japanese NW-A35. Change-Id: I4c4bb5b063da99003b5c316061d8c490b77428a4
2017-01-07nwztools: add NW-WM1A/Z model IDsAmaury Pouly1-0/+2
Also fix code that was supposed to sort things deterministically and was a massive failure. Change-Id: Iedf25f05a94ef51421710a283eb60f33ee977de1
2016-11-11nwztools/database: add database of information on Sony NWZ linux playersAmaury Pouly1-0/+181
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