summaryrefslogtreecommitdiff
path: root/utils/nwztools/database (unfollow)
Commit message (Collapse)Author
2017-06-13nwztools: add nvp description for NW-S10 seriesAmaury Pouly
Change-Id: Id6a6e51288f4ff24c0063b6c16b74109211e63c0
2017-06-05Add NW-A36 and NW-A37 model IDs, based on the A30 service manual.Amaury Pouly
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-04-25nwztools/database: misc improvementsIgor Skochinsky
* make gen_db.py work on Windows/Python 2 - use hashlib module instead of md5sum, also don't rely on / for file path matching - don't use 'file' for a variable name * fix parse_nvp_header.sh for older kernels pre-emmc kernel sources use a slightly different #define format; adjust regexp to catch it. * add nwz-x1000 series NVP layout (from icx1087_nvp.h) some new tags have no description, alas the driver doesn't have them :/ * minor fixes to nvp/README fixed typos/wording Change-Id: I77d8c2704be2f2316e32aadcfd362df7102360d4
2017-04-25nwztools: small cleanupsAmaury Pouly
Change-Id: I4fde020ca0556a84d051f9b5e46f49ee1241266e
2017-01-09nwztools: fix typo (nwz-zx100 -> nw-zx100)Amaury Pouly
Also now gen_db.py can check for such mismatch Change-Id: I4d91aae0dde08c866eda2ed5da3c11431c46e06a
2017-01-08nwztools: add various info about S740, S750, S640, E050Amaury Pouly
Change-Id: I2cc887ce2824a2d0b9aeb2a89df662c621c28750
2017-01-08Makefile cleanupsAmaury Pouly
Change-Id: I69b8b81d357553c979682d42097eba864c951512
2017-01-08nwztools: add A35 model and KASAmaury Pouly
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-08nwztools: rename nwz-a20 to nw-a20, that was a typoAmaury Pouly
Change-Id: I88ae7391732c6f41c3c4adccce2ddf0a92142067
2017-01-07nwztools: remove NW-ZX2Amaury Pouly
It is Android based and despite the fact that Sony wrote an NVP driver for it, experiments suggest it is unused because it returns ff all the time... Change-Id: I37750b659e341b21bed5ebaccf60f9f5fe569f64
2017-01-07nwztools: add NW-WM1A/Z model IDsAmaury Pouly
Also fix code that was supposed to sort things deterministically and was a massive failure. Change-Id: Iedf25f05a94ef51421710a283eb60f33ee977de1
2017-01-04nwztools: add NW-WM1 nvp table, regenerate databaseAmaury Pouly
Change-Id: If5781f0a98b3f2fee08a2daed383064cc59f1680
2017-01-04nwztools: small fixesAmaury Pouly
Make sure scripts use bash, make nwz database generator more deterministic Change-Id: I26812b697abe0406fb3c60d6eb231cb27edc81d5
2016-11-11nwztools/database: add database of information on Sony NWZ linux playersAmaury Pouly
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