diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2017-07-30 14:22:39 +0200 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2017-07-30 14:32:12 +0200 |
commit | d1ca2e45e9ebab9f9e254317e625c0a40f377315 (patch) | |
tree | ae21739bd91fbd5eecba4c23b0b65f4f3b397c86 /lib/rbcodec/metadata/metadata.c | |
parent | 51984098ef2f60e0a1e4a870fc8842a8f7577413 (diff) | |
download | rockbox-d1ca2e45e9ebab9f9e254317e625c0a40f377315.tar.gz rockbox-d1ca2e45e9ebab9f9e254317e625c0a40f377315.zip |
atjboottool: cleanup and add support for atj2127
Several people asked me recently how to decrypt atj2127 firmware. Someone
posted on github (https://github.com/nfd/atj2127decrypt) a decrypt utility
clearly reverse engineered from some unknown source. The code is an absolute
horror but I concluded that ATJ changed very little between ATJ213x and ATJ2127
so I added support for the ATJ2127, credit to this github code that I stole
and rewrite (code was under MIT licence). At the same time do some small code
cleanups.
Note that there is not 100% sure way that I know to distinguish between the
two firmware types, so the code tries to do an educated guess to detect
ATJ2127. If this does not work, use --atj21217 option. Also note that contrary
to the github tool that decrypts and unpack in one go, this tool only does one
step at once. So first decrypt: HEX -> AFI, then unpack AFI -> files.
I also added for a different version of AFI. Based on AFI files I have, there
are, I think, two versions: the "old" ones (pre-ATJ213x) and "new" ones. The
tool only supported the new one but for some reason the ATJ2127 uses the old
ones without a mostly empty header. Strangely, even this mostly empty header
does not seem to follow the old layout as reverse engineered by the s1mp3
project (https://sourceforge.net/p/s1mp3/code/HEAD/tree/trunk/s1fwx/heads.h),
so in fact there might be three versions. In any case, only the header is
different, the rest of the file is identical so at the moment I just don't
print any header info for "old" files.
Change-Id: I1de61e64f433f6cacd239cd3c1ba469b9bb12442
Diffstat (limited to 'lib/rbcodec/metadata/metadata.c')
0 files changed, 0 insertions, 0 deletions