More ATJ21XX stuff

I would like to report on what we have learned during our research into ATJ21XX-SoCs.

Have you ever come across a device such as AGPTEK, WOLFANG, YOTON, or RUIZU? These devices seem to all be built by the same company. All of them support MP3/OGG/FLAC/AAC/APE formats, have the same menu structures, and sometimes even may be capable of playing videos or count your steps.

We have confirmed that RUIZU and AGPTEK are the same company. That's written right on the box, but many other players use the same chip, the ATJ2157 from Actions Semiconductor. These OEMs do not start with just the data sheet but instead use an SDK based on uC/OS-II.

It is unfortunate that some of these devices are built so cheap – low-speed memory, a poor FM tuner, and random glitches in the OEM operating system lead to devices with little polish, given that these chips are very powerful.

These chips are all-in-one SoCs – lithium-ion battery protection, microphone input, USB 2.0 interface, SPI and SD interfaces, NOR/NAND flash controller, many GPIO pins, stereo headphone output for headphones, I²S up to 192kHz.

The SDK for the MIPS version was leaked – https://github.com/Suber/PD196_ATJ2127, and we can look into the wonders of UI built on an RTOS. Apart from data sheets and pinouts, we have found nothing for the ARM variant, which is unfortunate. We can buy chips on Alibaba, maybe then we can get SDK?

With such a rich set of supported media and so much versatility in a small package, an open SDK would allow users to address various software shortcomings with these devices (such as the strange fonts I mentioned earlier) or issues related to metadata processing where file names and order are incorrectly displayed.

So far, we have only been able to correct font types and adjust embedded string entries in the .STY files. While searching for information online, we found some repositories dealing with the device flashing process:

People from Rockbox have checked whether a custom operating system can be integrated into https://forums.rockbox.org/index.php?topic=51281.0, but 200K is simply too small.

We also found some people selling proprietary Actions Semiconductor firmware tools for ATJ2127 on a Chinese website that we do not want to include here, but you can find them.

Looking for ADFUS.BIN? PD196ATJ2127 has ADFUS.BIN inside case/fwpkg/US212ADEMO.fw sqlite3 database after you decrypt it with atjboottool for ATJ2127 and the ARM version of ADFUS.BIN is in all ATJ2157 firmwares you can download from RUIZU, AGPTEK etc.

SELECT writefile(FileName, File) FROM FileTable WHERE FileName = 'ADFUS.BIN';