Temp:S1fwx manual

From S1MP3 Wiki
Jump to: navigation, search

Introduction

S1fwx is a command line program that allows dumping, extracting, and repacking a firmware. This software was developed by wiRe (http://s1mp3.de). You can download the S1fwx program and also a GUI tool at the Tools page.

Dumped/Full firmware

We should introduce the concepts of "full firmware" and "dumped firmware". S1fwx is capable to extract the files that compose the firmware of a player, but, for this firmware to be flashed in order to recover a dead player, it should include additional informations, only found on firmware files from the manufacturers, the "full firmwares". Later we will show that by merging a dump with a full firmware, you can turn your dump into a full firmware.

If you only want to customize a your player, a "dumped firmware" is enought. However, if you need to recover your dead player, you will need a "full firmware".

Preparing

Connect your S1mp3 to the USB hub and wait for it to be recognized by the operating system. If your S1mp3 does not get recogized, see the Troubleshooting section.

It's recommended to create a work folder, (for example, c:\s1mp3), and to place the s1fwx.exe program and the .bat scripts there.

If you just wish to dump your firmware, you can just use the .bat scripts. However, for more advanced operations, you will need to enter commands at the command line. To get ready using the command line, open it up (start->run->cmd) and change dir(CD) to your working folder (Type the command cd \s1mp3).

S1fwx commands

S1fwx accepts commands(on the command line) according to this sintax:

s1fwx command file, where:

command is one of the following:

  • i => Display information about the extracted firmware.
  • x => Extract internal files(aplicações e outros) from a firmware.
  • s => Generates a script to rebuild the firmware.
  • a => Rebuild the firmware or "afi" files from a script.
  • l => List the entire content from any firmare.
  • f => Dumps the firmware to a file
  • r => "Repair" the firmware and creates a backup

and file is the name of the file being manipulated.

When s1fwx is entered without parameters, we have this screen, showing the available commands :

S1fwx1.jpg

Dumping a firmware

Run the extract.bat script, or enter s1fwx f dump.bin on the command line. This option dumps the firmware from the s1mp3, storing it on the file dump.bin. After entering this command, you will be told that s1fwx offers no warranty over your s1mp3/computer. You have to agree with this in order to continue (press space).

After, the program will scan the USB ports and display a screen like this one, indicating in with unit the s1mp3 is hooked in : S1fwx3.jpg

In this case, the device was found at unit "<e>". To start dumping, press the unit letter the s1mp3 is hooked in (in this case, "e").

Doing so, the program will dump the firmware, showing a screen similar to this one: S1fwx4.jpg

If you don't get a screen similar do this one, try executing again the dump.bat or the s1fwx f dump.bin command.

There are a few bytes that need to be changed on the dump for the Update tool accept it for flashing. Execute repair.bat, or s1fwx r dump.bin, and your dump.bin will be ready to be flashed.

Note that this command will also create a dump.bi$ file, witch is a backup of your non-repaired dump. It's a good idea to save your repaired dump (the dump.bin) to another folder in your computer, to retreive your firmware in case there are problems with your s1mp3. This IS important!

If you are here just to dump your firmware (to, for example, customize your firmware), you can already stop reading. The rest of the manual are for other operations.

Extracting your firmware

s1fwx l dump.bin list the files that compose dump.bin. They can be extracted using the command s1fwx x dump.bin. After running this command, your working folder will be populated with some bootloader code and the FWIMAGE.FW. This is yet another firmware image archive, and can again be listed or extracted using the x and l commands.

Repacking firmwares

First, you should know that there are two archive formats. The AFI format packs the FWIMAGE.FW and the bootloader files, composing the dump.bin firmware. The FW/FWI format packs all the internal firmwares files, composing the FWIMAGE.FW archive.

If you plan to, after extracting the dump.bin firmware internal files, edit them and merge your changes back to the dump.bin firmware, you will first need to generate script files with the command s1fwx s dump.bin > dump.bin.script, for the first (AFI) packing level, and s1fwx s firmware.fw > dump.fw.script for the second(FW/FWI) packing level.

Now, when you wish to repack the internal files back to the dump.bin firmware, enter the s1fwx a newfile.fw:fw < dump.fw.script, if you wish to repack your FWIMAGE.FW file. Then, enter s1fwx a newfile.bin:afi < dump.bin.script to combine the FWIMAGE.FW and the bootloader files back to dump.bin.

Flashing back your dump.bin

You can transfer your firmwares to the s1mp3 using the MP3 Player Update Tool. For more information, read the MP3 Update Tool manual(link). It's important to read it, since a wrong firmware flash can brick your player!

Warning!

The firmware dumped from one s1mp3 cannot be used on others "similar" S1mp3s, only on the device where it was dumped from.


Merging two firmware files

When a player is dead, or on ADFU mode, you can't flash a dumped firmware with s1fwx. You have to combine a "full firmware" from the manufacturer with your dump, in order to make your dump a full firmware.

This is the procedure:

  1. Extract the first level of the the FULL firmware file (s1fwx x FULL.bin)
  2. Generate first-level scripts for the FULL firmware file (s1fwx s FULL.bin > FULL.bin.script)
  3. Extract the first level of the dumped firmware file (s1fwx x FULL.bin)
  4. Replace the files from the FULL firmware with the ones from the dump (usually only 4 files)
  5. Re-compile the firmware file with the dumped files inside (s1fwx a newfile.bin:afi < FULL.bin.script)

You can find full firmwares on the forum. Check our Firmware archive too.