All firmware for tablets on the Allwinner processor have the same img format (IMAGEWTY).
After a long search, I finally found a program that allows you to disassemble and assemble firmware for tablets based on Allwinner. It's called unPacker
Let's move directly to disassembling the firmware file.
Disassembling the IMG file
For disassembly you will need:
- The firmware file itself
- unPacker program, which can be downloaded Here (For Allwinner a31s you can use imgRePacker )
Download the archive and unpack it. Run the unPacker.exe program
We drag our file into this window and wait for it to unpack.
After unpacking is complete, a new folder will appear called "firmware.img.dump"
In the out folder there is a file system.fex - this is a file with system files (system folder). This is what we need.
Editing the system.fex file
To edit this file you need a nix system and a conversion utility, which can be downloaded Here
Create a folder in your home directory where you will edit your firmware. Let's call it NEW, for example. Now unpack the files from the ext4_utils.zip archive into the NEW folder. Launch the terminal and type
cd NEW make
The program will compile and we will get a tool for editing Sim2img. Now we put our system.fex file in the NEW folder and rename it to sytsem.img
Enter in the terminal
./simg2img system.img output.img
Now we have a file output.img . Now we create a folder, for example, called sys
mkdir sys
And we mount our output file there.
sudo mount output.img sys
Now the sys folder contains files that can be edited. For example, you can make changes to the build.prop file that will improve the system's performance.
Read more about the changes in the build.prop file Here
After editing, we begin assembly.
./mkuserimg.sh -s sys/ ./factoryfs_custom.img ext4 ./temp 512M
Rename the resulting file factoryfs_custom to system.fex.iso
Note: you can edit other image files (boot and bootloader) in the same way.
Assembling img file
Now, to collect the edited files in the format required for flashing, you need to place the system.fex.iso file with a replacement in the folder (on Windows) _iso and drag the folder
firmware name.img.dump again in the unPacker program window and wait a bit. After the packing is complete, you will get a file firmware name.img which can be used to reflash the device to Allwinner