summaryrefslogtreecommitdiffstats
path: root/utils/nwztools/database/nvp
AgeCommit message (Collapse)AuthorFilesLines
2020-01-29sonynwz/scsitools: add NWZ-S610 seriesAmaury Pouly1-0/+35
Change-Id: I8977e1bcc805df463f7b08f11be889368db4eab2
2019-04-22nwztools: add DMP-Z1 to the databaseAmaury Pouly2-1/+94
This is one of those fancy gold-plated devices. Of course it breaks my scripts that were nicely expecting every device to start with NW. Change-Id: I161320f620f65f4f92c2650d192b26a9831eeb9d
2018-11-30sonynwz: add NW-ZX300G nvp infoAmaury Pouly1-0/+93
There is something weird going on: the Sony website has two different entries: - NW-ZX300/NW-ZX300A/NW-A45/NW-A47/NW-A45HN/NW-A46HN - NW-ZX300,NW-ZX300A update(20181004)/NW-ZX300G with slightly different nvp entries, but it is impossible to tell whether an NW-ZX300(A) belong to one or the other. Since the diff is very small, I am adding this as nw-zx300g but treat all devices as nz-zx300 since the destination node is the same and that is the main usage of the tool anyway. Change-Id: I3dc2fdec52650f938d568bed578184f6bc43d130
2018-10-29sonynwz: add nvp map for NW-A50 seriesAmaury Pouly1-0/+93
Change-Id: I49f3399552721e515cc01021c2e0aa28c781ec28
2018-01-13Add information for NWZ-S630 and NWZ-S730Amaury Pouly2-0/+140
Change-Id: I4c48c9a8d862eaf67ec27c1c13b9b7f1fb204fc0
2018-01-07sonynwz: Add NVP information for NWZ-A810Amaury Pouly2-2/+53
Change-Id: I37671ddf15ee1a4b469f97fe06ec86249ff9ce60
2017-10-06sonynwz: add nvp nodes for NW-A40/ZX300, various fixes for toolsAmaury Pouly3-1/+186
We still miss the model IDS for those device so scsitool won't be able to recognize them automatically. Change-Id: I17ae0f0d95c011cea8e289def63c7673b6c4b667
2017-06-13nwztools: add nvp description for NW-S10 seriesAmaury Pouly1-0/+89
Change-Id: Id6a6e51288f4ff24c0063b6c16b74109211e63c0
2017-04-25nwztools/database: misc improvementsIgor Skochinsky4-22/+111
* 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 Pouly2-4/+4
Change-Id: I4fde020ca0556a84d051f9b5e46f49ee1241266e
2017-01-09nwztools: fix typo (nwz-zx100 -> nw-zx100)Amaury Pouly2-0/+0
Also now gen_db.py can check for such mismatch Change-Id: I4d91aae0dde08c866eda2ed5da3c11431c46e06a
2017-01-08nwztools: add various info about S740, S750, S640, E050Amaury Pouly5-0/+395
Change-Id: I2cc887ce2824a2d0b9aeb2a89df662c621c28750
2017-01-08Makefile cleanupsAmaury Pouly1-2/+2
Change-Id: I69b8b81d357553c979682d42097eba864c951512
2017-01-08nwztools: rename nwz-a20 to nw-a20, that was a typoAmaury Pouly2-0/+0
Change-Id: I88ae7391732c6f41c3c4adccce2ddf0a92142067
2017-01-07nwztools: remove NW-ZX2Amaury Pouly1-90/+0
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-04nwztools: add NW-WM1 nvp table, regenerate databaseAmaury Pouly1-0/+92
Change-Id: If5781f0a98b3f2fee08a2daed383064cc59f1680
2017-01-04nwztools: small fixesAmaury Pouly4-2/+4
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 Pouly31-0/+3061
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