How to dump firmware

Before updating the firmware on your device, it is always a good idea to dump the default factory one.


Having a backup may really save you a lot of trouble if something goes wrong while updating. And if you brick you device, that may be the only way to restore it. I’ll show how to create a full backup of factory firmware on a MTK based device. You’ll need two utilities for that – MTKDroidTools and FlashTool. Download them online. First of all, enable USB-debugging mode in phone developer settings. The phone should connect in USB-debugging mode. Now locate special drivers in the Flash Tool folder to connect the device as a virtual serial port. The phone enters this mode on a split second while booting. So you have to speed your fingers up to specify the correct driver path for Windows in time. Use copy-paste. So now when we are through with driver setup, lets proceed with firmware dump. The first step is to copy the flash memory block map, the so called scatter file. If I understand correctly, this file specifies which portions of the firmware should be written to what parts of the flash memory, which is essential when restoring from a brick. Press the Blocks Map button. The utility will create the block map and open it in a separate window. Remember the address of the cache block – it is at line 17 in my case. We will be using this address later. Please note it can be at different position depending on the type of your device, but you need cache block address for any device with ext4 file system Press Create scatter file button. The path where the file was saved will appear in the status windows on the right. Devices with another file system type – yaffs2 – may require another address, but as such devices are becoming increasingly rare, I won’t comment on that. Without closing MTKDroidTools, run the other app, Flash Tool. Here select the scatter file we just created and go to the Read back tab. Here press Add button and double click the line that just pooped up. It will prompt you for a file name starting with ROM. Remember the file name and the path where it will be saved. In the next windows you have to select the address of backup start and end, in hex. The start is zero 0x000000, and for the end address use the cache address I draw you attention to a minute ago. Again, for yaffs2 blocks there will be another window to select dump type, but I don’t want to waste time on that. Switch you device off and disconnect it from the PC USB port. Press Read back and connect the still disabled phone to the PC USB port. If you’ve done everything right, firmware dump will start, and a green circle will appear when it’s over. Go back to MTKDroidTools. If the program doesn’t detect the phone, you may have to switch it on. After it is detected, go to root, backup, recovery tab and select To process… there, then choose ROM file we just created using Flash Tool. If everything is done correctly, you’ll be prompted to automatically create CWM, agree to that. If everything went OK, the right status window will display the path, where the program saved recovery for your device. Now we have to flash it with the said recovery. From now on, be extremely attentive. A single wrong tick can destroy your device firmware, so take caution. Go back to Flash Tool and select scatter file but not the one we created initially. Use the second one which was just created by MTKDroidTools while compiling CWM recovery. The path to this file can be seen in the status window. Untick all blocks in the lower part of the window, don’t forget to scroll down to make sure nothing is ticked. Now click on the Recovery item and select the CWM recovery file we just created. The Recovery will be ticked automatically. Now press Download – be careful not to press Firmware upgrade. Connect the phone and wait until it is flashed, which will be indicated by a green circle. The only thing left to do is a full backup. First, boot phone into recovery mode by holding device-specific buttons during boot or from reboot menu. After CWM loads, on the PC go to root, backup, recovery and press Backup. This will create two identical backup files – one of the PC, and another one of the device SD card. So if you don’t have much space on the SDcard, you can delete this file. Also make sure to press SuperUser button for instant root shell. The only thing left is to make secure copies of both utilities folders and all the files they created. The files may save you a lot of trouble, if you ever will have to unbrick your phone.

Leave a Comment