- 1 What is firmware ?
- 2 The Firmware variety
- 3 Backing up the firmware
- 4 The firmware file structure
- 5 How does the flashing process work?
- 6 Bootloader
- 7 Supported file formats
- 8 Applications
- 9 Firmware flashing
- 10 Firmware Modification
- 11 Software that can be used with manufacturer firmwares
What is firmware ?
Take a look at Firmware in wikipedia. Firmware is a piece of code that comes embedded on a hardware device, such as the BIOS program on PC. It's the first code any computer machine runs, and it's usually recorded on Flash ROMs(read-only-memory), or on some embedded devices, such as on s1mp3, it's recorded in a rewritable media.
The Firmware variety
Although there are many different brands of portable flash based media players on the market which fall under the category of "S1 Mp3 Player", the firmware code for them are NOT all interchangeable, mainly due to minor differences on how the hardware is wired.
WARNING: If you flash a firmware which you have not certified to be compatible with your s1mp3, it may, and probably will result in a complete and catastrophic failure of the hardware. The same problems can occur if any flashing operation is interrupted. There are methods of recovering, but they aren't guaranteed, and you will need to find a compatible firmware.
In this firmware mess, the most accurate method of finding a compatible firmware to your hardware is by checking the ID numbers on the electronic board inside the case, and looking for a firmware in the s1mp3.org firmware database. The circuit board ID code is usually printed with very small characters in white on the (usually) green or red circuit board and sealed under the circuit boards varnish/laquer). Sometimes the Board ID code is concealed underneath a component attached to the circuit board and great care should be taken when moving delicate components in the search for a concealed code as some components are extremely fragile and easily damaged.
Because of this fact, instead of identifying the s1mp3 devices for their brand/model, we use the board ID code to uniquely identify a player. Not all players have a circuit Board ID code permanently printed on them but the vast majority of boards do have a code.
Backing up the firmware
We are very fortunate to have at our disposal various software tools one of which allows us to extract the majority of the firmware component files from our S1mp3 players into a single backup file (see Software Tools & Utilities for s1fwx - S1mp3 Firmware Extractor).
NOTE: At the present time - firmware back-ups made with S1fwx are not "FULL" firmware files and cannot be used to recover a player which is in ADFU recovery mode on their own. Only a FULL firmware file will put a player into a state in which the backup can be flashed in order to restore proper functionality of buttons etc'. For more details on this see [link to main site's recovery guide].
With special regard to S1mp3 Players - we would be wise to take certain precautions with our firmware. Given the high number of S1mp3 players which are prone to firmware corruption and the ease with which the firmware can become corrupt (as easily as by prematurely or incorrectly disconnecting the player from a computer) - If the manufacturer of your S1mp3 player has not provided any firmware for you to restore your player in the event of firmware corruption - then the best chance for recovering your players' original functionality is to use a backup of the firmware installed on the player from the factory (subject to the note above).
The firmware file structure
Some firmware files have some sort of encryption, with prevents one from exploring/disassembling the fitmware. Do help decrypting those firmwares, see How to decrypt manufacturer's firmware
How does the flashing process work?
During recovery mode itself, the device provides the host (the PC) some simple USB client called ADFU. ADFU, in its basic form, only receives and executes code from the host. This is not the usual USB mass-storage device, and therefore it needs a different driver called AdfuUd (Action Device Firmware Update USB Driver). The recovery follows these steps:
- Transfer ADFUS.BIN from the firmware file into memory and execute it. I [wiRe?] believe this code provides some API for the follow ups
(I plan on writing some tool which uses this command and enables us to upload selfmade code for testing purposes. This way, developers don't have to flash the entire firmware each time they want to test their code. Memory dumping should also be possible using the ADFU [this tool is available here])
- Transfer some image data to the device (RCSL7502.BIN, or RCSLOLED.BIN on MP4 players with OLED color displays), a common image is of the two elves trying to heal the player with their magic.
- Transfer HWSCAN.BIN (HardWare SCAN) from the firmware file into memory and execute it
- Report result of HWSCAN to host: IC version (3935 or 3951), subversion (A,B,C or D), BROM version and date, type of the flash containing the firmware image (F644, F641, F321, N---), storage information, and flash capacity.
- Transfer the flash-type-related boot code (BRECxxxx.BIN) and program it into the first pages of the flash (and also the mirror image)
- Transfer FWSCAN.BIN (FirmWare SCAN) from the firmware file into memory and execute it.
- Receive result of FWSCAN: vendor id, product id, firmware version, manufacturer, and device name.
- Transfer the flash-type-related firmware file and program it into the flash.
- Reboot, or if it does not work, disconnect power manually
Supported file formats
List of file formats that were reported to be supported on the s1mp3 running the manufacturer's firmware:
- .wav - PCM wav file
- .mp3 - MPEG II Layer 3 compressed audio
- .wma - Windows Media Audio format
- .ogg - OGG Vorbis audio
- .act - used by some mp3 and mp4 players for recording, proprietary format with some compression
For the best results while encoding videos to these formats, check Video encoding
- .txt - plain text file, used by most mp4 players as "ebooks"
Some firmwares include games. One is BoxMan
The manufacturer's firmware can be hacked in various ways, from changing the graphics to including new applications. See Manufacturer's Firmware Modification for details.
Software that can be used with manufacturer firmwares
A number of software tools and utilities are available for carrying out various functions and operations with S1mp3 players running the manufacturer's firmware.
- MP3 Player Utilities : Latest versions of the utilities usually supplied on Mini-CD with new S1mp3s. Includes:
- "MP3 Player Disk Tool" - formatting & encrypted partition tool.
- "MP3 Player Update Tool" - firmware flashing tool.
- "Sound Convert Tool" - converter for audio recorded on S1mp3 players' internal microphone and radio.
- "AMV/MTV Video Converting tools" - bundled in Mp4 S1mp3 utilities.
- Telbook Editors : generates a file with information to be imported by the "telbook" AP on some S1mp3s. Choose the one which is compatible with your player.
- FWModify : Firmware modifying tool for enabling/disabling FM, setting default language, changing contrast defaults etc.
S1mp3 Community Tools
- S1fwx : Firmware extractor for backing up firmware directly from any S1mp3 (can also extract deeper layers within the firmware and re-compile again).
- S1res : Resource editor for customizing text & logos in firmware files.
- S1ice : Tool aimed to allow recovering of dead s1mp3 players through the ICE interface. See S1ice.
- s1debug: I²C controlled debug console. See s1giveio
- s1giveio: Tool allows to access mp3 players hardware directly (read/write memory/ports or execute code) See s1giveio
- S1dump : Tool aimed to allow plain binary dump of NAND memories through the LPT port (not yet available)
- FIB - Search accurately any firmware file. See FIB.
- S1mp3 Tools - Graphical interface to S1fwx. See S1mp3 Tools.
- Loadram - Program that will load and execute code on the s1mp3. See Loadram
- daTOTOgra - Graphical visualization of firmware files. See Datotogra.
- Driver's disassembler - utility to help in disassembling drivers from the original firmware.
- S1mp3ls: list files in player's order on GNU/Linux
- Aurélio's tool Can export any CSV list to a telbook file, in all of the known formats.
- REWM - "Record Every Waking Moment" - Ease massive voice recording compression and storage. See REWM
- Jerome's Font Generator - PHP GD script to convert a font file to a .BMP font resource to be used on the manufacturer's s1mp3 firmware.
- S1mp3ls lists files in player's order on GNU/Linux.