[GUIDE]SP Flash Tools Explained with OT-6012

Search This thread

CyberianIce

Senior Member
Greeting to all owners of MTK SmartPhones!

As this devices are technically documented mainly on Chinese, I will teach you today something about low-level device flashing using SP Flash Tool. For those who may have some experiences, SP Flash Tool is MediaTek's equivalent tool for low level flashing like Odin on Samsung devices or RK Batch Tool on RockChip SoC.

Introduction 1 - What is low level flash tool
Let's just say: it's deeper than android flashing. This way you can backup and restore all parts of your NAND chip, and all partitions, not just android and kernel specific ones such as boot, system, data, cache but also nvram, uboot and so on, important for GSM radio. There are two main parts: preloader.bin, which is installed in very first block of your device's eMMC chip - it's first program which phone run after cold stard, and windows driver which is host-side part needed for DL/DA protocol utilized by SP Flash Tools. Both are essential. If you don't have preloader.bin in your phone, you may have very hard brick which is unable to revive unless jtagged or board remains dead. So, whatever you are doing, keep in mind that you must always have preloader.bin in your phone. If you are using format tools, don't ever format preloader area. This SP Flash Tool is must have backup option as this is only way for You to make complete backup of all partitions and block devices in your phone. You must note that some files like NVRAM are unit specific, they contains IMEI and GSM callibration data and You can't use that from another phone, even if it's from same manufacturer and model. That is exactly why everyone should have their own full backup made with SP Flash Tool. And why should You use SP Flash tools for restore? If you asking me, I'm happiest when i don't need to, but there are cases when it's only solution, because no matter how hard you brick your phone, as long as preloader sits inside, you will be able to restore it to fully working state this way as opposite for custom recoveries which requires some working partitions (recovery, boot, ...) SP Flash Tool is so powerful that you may install custom recovery even without rooting ie. Let's go see how it works:


For this occasion, I will use my Alcatel one touch idol MINI (OT-6012X) as test device, but this may work also for all MTK smartphone devices with EMMC, but I don't know abot their new UBIFS.

review-smartphone-alcatel-touch-idol-mini-raqwe.com-02.jpg


Tools needed:
MTK Preloader Drivers - Collection of drivers for MTK Phones
SP Flash Tool - Latest Smart Phone Flash Tool v3 5.1408.00 (20/03/2014)
MTK Droid Root & Tools - Version 2.5.3 needed for splitting dump IMG file into separate partition images and retrieving SCATTER file

Chapter 1 - BACKUP

I'm starting this with assumption You already have drivers installed. If you did not installed drivers, see how to install drivers in Appendix.

1. Shut down your phone with cold start (disable Quick Start/Fast Boot options in shutdown menu or settings)

2. Extract SP Flash Tool you downloaded form URL above and run flash_tool.exe as administrator.

3. Go to Download page and pusth scatter-loading button, than load scatter.txt for You device. You can find this file sometimes in OTA update.zip, or you can create it with MTKDroid Tools but they can be faulty. I provided scatter.txt for Alcatel one touch idol MINI (OT-6012X) as MTKDroid Tools can't generate working scatter for this Alcatel phone.

4. Now navigate to Readback tab and push Add to add new set for read. Save file as ROM_0.img, and for OT-6012X fill other fields just as show on this picture below.

ROM_ALL.img - start address: 0x0000000000000000 and for lenght open scatter.txt and find where /cache partition starts. In my case it's 0x534C0000. This way You will dump all data of your eMMC chip up to cache partition.

Last two eMMC partitions are /cache and /data and we need to add them as well, but separately, beacuse we need all partitions to flash after formatting eMMC. In my case, for OT-6012X it's:
cache.img - start address: 0x00000000534c0000 lenght: 0x09200000
userdata.img - start address: 0x000000005c6c0000 lenght: 0x60000000

Note that I took only first 1.5 GB of data because SP Flash Tool won't let me take more for some reason. But content of /data is not relevant for me, not just because last 0.7 GB was empty space, and I wiped it in recovery right after flashing anyway.


5. Now push Read Back button and connect your phone which is still OFF to PC with USB cable. Soon readback process will start. Depending on your USB speed and configuration it will take up to 45 min or 1h for 3GB im not sure but it's plenty of time to take full dump

6. Once readback is complete you will see green circle as sign all pass well. Congratulations now you have partial dump of your phone memory, you may now disconnect USB, exit SP Flash Tool, and turn on your phone.


Chapter 2 - PREPARING FILES FOR RESTORE

1. Turn on your phone with USB Debugging enabled and installed ADB drivers.
2. Extract MTKDroid Tools and run MTKdroidTools.exe as administrator. Once your phone is detected by MTKDroid Tools you can push Blocks Map button and than you can push Create scatter file button in new window which will popup. This way you can creat scatter file for some devices. With my phone, file which has been generated this way didn't work for an unknown reason, that is why i included this file for download.
3. Navigate to root, backup, recovery tab and push button To process file ROM_ from Flash Tool, and select image dump file you created in previous chapter (ROM_ALL.img). Now MTKDroid Tool will split IMG file into many separate files for each part of eMMC which you will flash later in Chapter 3. If you are asked to create CWM just say No and push Cancel when prompted to input recovery file.


4. Few minuts later you will see "---Task Completed---" in log, and prepared files are located in subdirectory backups of MTKDroid Tool folder. Afterwards you may close MTKDroid Tool. All files are prepared for flashing back into phone as they may bee needed sooner or later.


Chapter 3 - RESTORE
Finally we come to restore but you don't need to take a breath now as this easily could be an easiest step to do :D

1. Shut down your phone with cold start (disable Quick Start/Fast Boot options in shutdown menu or settings)

2. Run SP Flash Tool again and navigate to tab Download, load scatter.txt for your phone (if you using OT-6012X its included in SP Flash Folder by pressing on Scatter-loading and selecting scatter.txt

3. Double click on each partition and select respectable file from backups folder in MTKDroid Tools you created in Chapter 2. Note that last two partitions (/cache and /data) are located wherever you saved them with SP Flash Tool. See picture for more details:


4. Select Format All + Download from drop-down menu like on picture below. This is essential becasue if you broke partition table, whole eMMC be formatted and all partitions must be rewritten. That is why we need both /cache and /data partitions, all checkboxes must be checked. If you try to unselect single partition you wont be able to do format before flashing.
format.jpg


5. Push Download button and connect your phone (which is off) with PC via USB cable. Process should start, with formating eMMC, and downloading all data respectable. It can take up to 30 mins or so, depending on partition image sizes. After process is finished you will see green circle on screen again. Unplug USB from phone and turn it on.

That would be all.




Appendix - INSTALLING DRIVERS
This going into appendix section as this is needed to be done only once - when You use SP Flash Tool for the very first time. Theoretical background behind this is: we use memory testing routine as it is safe to do and it will initiate preloader to be detected into Windows OS device manager. Once we get new hardware found, we install drivers.

Install adequate drivers from MTK Preloader Drivers via automated setup.
1. Shut down your phone or prepare for cold start if you are in bootloop
2. Run SP Flash Tool and navigate to Memory Test tab
3. Check RAM Test and Data Bus Test ONLY, all other checkboxex must remain clear, than push Start button. DO NOT CHECK EMMC Test!
4. Connect your phone (which is still OFF) and PC with USB cable, afterwards new hardware found wizard should popup. If you installed drivers it should be automatically found, if not, you still may install drivers manually, respectably to device type and OS you are using.
5. Once driver setup is finished, SP Flash Tool will show green circle as signal that RAM is tested and it's ok. If you see red circle RAM is nok.


Addendum - COLD START from BOOTLOOP
If your OT-6012X is in bootloop, try this solution. It it discovered on OT-6012X but may also works for other MTK devices with embedded battery. (devices without detachable battery)

1. Press and hold power button and vol - button together and keep pressed. After 8 sec (when phone turns off) release power button but keep pressed volume - for few seconds more, than release it. Now your phone should stay off.

2. Connect to USB and wait for charging battery few seconds than unplug USB. Now your device is in COLD START state.

3. Now (from cold start state) press volume + and power button at same time, and after phone turns on release power but keep volume + pressed untill recovery loads than restore NAND backup if you have TWRP installed.



If I didn't referred some methods used in this guide it means that they are discovered by myself. If this guide helped you, please don't forget to push thanks button. Have fun.
 
Last edited:

paradiselost28

Senior Member
Aug 27, 2012
113
22
127.0.0.1
Hi CyberianIce and thanks for this tutorial, but BitDefender detected a Trojan in MTKDroid_Tools...
With Virustotal (scan of rar archive) : 17 / 51
EDIT : After verification, the same problem is in MTKDroid_Tools official link too but I'm not sure it's a false positive...
 
Last edited:

CyberianIce

Senior Member
Hi CyberianIce and thanks for this tutorial, but BitDefender detected a Trojan in MTKDroid_Tools...
With Virustotal (scan of rar archive) : 17 / 51
EDIT : After verification, the same problem is in MTKDroid_Tools official link too but I'm not sure it's a false positive...

One must turn A/V off when using MTK Droid Root & Tool and SP Flash Tool because they recognize common android exploits (faramir, boromir, etc) as potentially threat. However, that is false alarm, because it is harmless when used for this purpose and absolutely needed for rooting.
 
  • Like
Reactions: slikarslika

dfani511

Senior Member
Jan 12, 2012
65
2
One must turn A/V off when using MTK Droid Root & Tool and SP Flash Tool because they recognize common android exploits (faramir, boromir, etc) as potentially threat. However, that is false alarm, because it is harmless when used for this purpose and absolutely needed for rooting.

Can you upload somewhere a full backup with all partitions for sp flash tool ?

I have Alcatel 6012x and I bricked it with Sp Flash tool :(, I used format ALL + download without preloader and others,only cache,userdata and Android ( system ) ,I got an error and now only what can I see it is a blue LED :(.
 

dfani511

Senior Member
Jan 12, 2012
65
2
ok now it is alive,but I do not understand ,it had a very bad signal or what?
Because with Vodafone Romania I do not have signal no where inside of my home,outsite I have signal,and with Cosmote Romania 2G GSM I have 1-2 signal lines and with Cosmote Romania 3G WCDMA everywhere is on roming and I have with it 3-4 signal lines insite of my house .
 

CyberianIce

Senior Member
ok now it is alive,but I do not understand ,it had a very bad signal or what?
Because with Vodafone Romania I do not have signal no where inside of my home,outsite I have signal,and with Cosmote Romania 2G GSM I have 1-2 signal lines and with Cosmote Romania 3G WCDMA everywhere is on roming and I have with it 3-4 signal lines insite of my house .

It is possible you ruined your GSM calibration data which are located in NAND chip NVRAM. They contains unit-specific GSM radio calibration data and IMEI? How could you format all without preloader? Such operation is hardly possible because if you uncheck any part of emmc, format become regular update of selected partitions.
 

dfani511

Senior Member
Jan 12, 2012
65
2
No that isn't from the last write without preloader , because that problem I had it in the past and for that I tried to re-write the fw
Can I do something ?
 

CyberianIce

Senior Member
  • Like
Reactions: Mobile_doctor9

dfani511

Senior Member
Jan 12, 2012
65
2
I think it will work for others phone but not with the scatter from here,if you reed this tutorial he say there it work for others :D ....

and CyberianIce thank you for this tutorial was helpful
 

dfani511

Senior Member
Jan 12, 2012
65
2
Just restore previous backup as described in first post.


Yes but you must obtain scatter.txt for your specific phone.

this phone are not mine it belongs to a friend,today he say me the phone had this problem after when it come from service,they repair the touchscreen , and he doesn't want to sent it back because it stay on service too much (1 mounth)

Can I re-write these files which are responsable with GSM Calibration from NAND?
 

CyberianIce

Senior Member
You don't know that partitions are flashed, which are affected and which are not, and what is for what. How you expect from me to help? You don't know what is problem, and what they did in service. Sorry, this thread is for backup/restore OT-6012 with SP Flash Tool, not for general phone help. If you had NVRAM, protect_f and protect_s backup from your previous backup you could restore that, otherwise don't touch anything.
 

wertzPH

Senior Member
May 27, 2012
166
28
Is it safe to flash an updated preloader on the same device but different firmware version? E.g. On is running v01 rev and the other device is v02? This is on stock rom and newer bought device has newer firmware
 

Bagrat

New member
Sep 22, 2006
1
0
Help

Please help. I am new to Android. I bought Alcatel one touch idol mini 6012D with two sim and no sd card. I have installed Twrp and cant update my smart. Please tell how to remove twrp? How to install stock firmware? Please help.
 

CyberianIce

Senior Member
There is no TWRP for dual SIM mode. You tried to flash TWRP from 6012X into 6012D, what for Christ sake you thinked? You need SP Flash Tools backup which is different from this described in this tipic. You have to find stock recovery elsewhere and flash with mobileuncle if your phone can boot at all
 

kimerika

Senior Member
Apr 18, 2012
514
56
PEARL OF THE ORIENT
i think this TUT work on my OT d5 Kitkat 4.4.2 but for some reason SP flash tool did not detect my alacatel D5,,
can you help me,,
im making CWM ,,but when i click read back nothing happens?

and yes i have scatter file generated from MTK driod tool,
driver installed,
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Greeting to all owners of MTK SmartPhones!

    As this devices are technically documented mainly on Chinese, I will teach you today something about low-level device flashing using SP Flash Tool. For those who may have some experiences, SP Flash Tool is MediaTek's equivalent tool for low level flashing like Odin on Samsung devices or RK Batch Tool on RockChip SoC.

    Introduction 1 - What is low level flash tool
    Let's just say: it's deeper than android flashing. This way you can backup and restore all parts of your NAND chip, and all partitions, not just android and kernel specific ones such as boot, system, data, cache but also nvram, uboot and so on, important for GSM radio. There are two main parts: preloader.bin, which is installed in very first block of your device's eMMC chip - it's first program which phone run after cold stard, and windows driver which is host-side part needed for DL/DA protocol utilized by SP Flash Tools. Both are essential. If you don't have preloader.bin in your phone, you may have very hard brick which is unable to revive unless jtagged or board remains dead. So, whatever you are doing, keep in mind that you must always have preloader.bin in your phone. If you are using format tools, don't ever format preloader area. This SP Flash Tool is must have backup option as this is only way for You to make complete backup of all partitions and block devices in your phone. You must note that some files like NVRAM are unit specific, they contains IMEI and GSM callibration data and You can't use that from another phone, even if it's from same manufacturer and model. That is exactly why everyone should have their own full backup made with SP Flash Tool. And why should You use SP Flash tools for restore? If you asking me, I'm happiest when i don't need to, but there are cases when it's only solution, because no matter how hard you brick your phone, as long as preloader sits inside, you will be able to restore it to fully working state this way as opposite for custom recoveries which requires some working partitions (recovery, boot, ...) SP Flash Tool is so powerful that you may install custom recovery even without rooting ie. Let's go see how it works:


    For this occasion, I will use my Alcatel one touch idol MINI (OT-6012X) as test device, but this may work also for all MTK smartphone devices with EMMC, but I don't know abot their new UBIFS.

    review-smartphone-alcatel-touch-idol-mini-raqwe.com-02.jpg


    Tools needed:
    MTK Preloader Drivers - Collection of drivers for MTK Phones
    SP Flash Tool - Latest Smart Phone Flash Tool v3 5.1408.00 (20/03/2014)
    MTK Droid Root & Tools - Version 2.5.3 needed for splitting dump IMG file into separate partition images and retrieving SCATTER file

    Chapter 1 - BACKUP

    I'm starting this with assumption You already have drivers installed. If you did not installed drivers, see how to install drivers in Appendix.

    1. Shut down your phone with cold start (disable Quick Start/Fast Boot options in shutdown menu or settings)

    2. Extract SP Flash Tool you downloaded form URL above and run flash_tool.exe as administrator.

    3. Go to Download page and pusth scatter-loading button, than load scatter.txt for You device. You can find this file sometimes in OTA update.zip, or you can create it with MTKDroid Tools but they can be faulty. I provided scatter.txt for Alcatel one touch idol MINI (OT-6012X) as MTKDroid Tools can't generate working scatter for this Alcatel phone.

    4. Now navigate to Readback tab and push Add to add new set for read. Save file as ROM_0.img, and for OT-6012X fill other fields just as show on this picture below.

    ROM_ALL.img - start address: 0x0000000000000000 and for lenght open scatter.txt and find where /cache partition starts. In my case it's 0x534C0000. This way You will dump all data of your eMMC chip up to cache partition.

    Last two eMMC partitions are /cache and /data and we need to add them as well, but separately, beacuse we need all partitions to flash after formatting eMMC. In my case, for OT-6012X it's:
    cache.img - start address: 0x00000000534c0000 lenght: 0x09200000
    userdata.img - start address: 0x000000005c6c0000 lenght: 0x60000000

    Note that I took only first 1.5 GB of data because SP Flash Tool won't let me take more for some reason. But content of /data is not relevant for me, not just because last 0.7 GB was empty space, and I wiped it in recovery right after flashing anyway.


    5. Now push Read Back button and connect your phone which is still OFF to PC with USB cable. Soon readback process will start. Depending on your USB speed and configuration it will take up to 45 min or 1h for 3GB im not sure but it's plenty of time to take full dump

    6. Once readback is complete you will see green circle as sign all pass well. Congratulations now you have partial dump of your phone memory, you may now disconnect USB, exit SP Flash Tool, and turn on your phone.


    Chapter 2 - PREPARING FILES FOR RESTORE

    1. Turn on your phone with USB Debugging enabled and installed ADB drivers.
    2. Extract MTKDroid Tools and run MTKdroidTools.exe as administrator. Once your phone is detected by MTKDroid Tools you can push Blocks Map button and than you can push Create scatter file button in new window which will popup. This way you can creat scatter file for some devices. With my phone, file which has been generated this way didn't work for an unknown reason, that is why i included this file for download.
    3. Navigate to root, backup, recovery tab and push button To process file ROM_ from Flash Tool, and select image dump file you created in previous chapter (ROM_ALL.img). Now MTKDroid Tool will split IMG file into many separate files for each part of eMMC which you will flash later in Chapter 3. If you are asked to create CWM just say No and push Cancel when prompted to input recovery file.


    4. Few minuts later you will see "---Task Completed---" in log, and prepared files are located in subdirectory backups of MTKDroid Tool folder. Afterwards you may close MTKDroid Tool. All files are prepared for flashing back into phone as they may bee needed sooner or later.


    Chapter 3 - RESTORE
    Finally we come to restore but you don't need to take a breath now as this easily could be an easiest step to do :D

    1. Shut down your phone with cold start (disable Quick Start/Fast Boot options in shutdown menu or settings)

    2. Run SP Flash Tool again and navigate to tab Download, load scatter.txt for your phone (if you using OT-6012X its included in SP Flash Folder by pressing on Scatter-loading and selecting scatter.txt

    3. Double click on each partition and select respectable file from backups folder in MTKDroid Tools you created in Chapter 2. Note that last two partitions (/cache and /data) are located wherever you saved them with SP Flash Tool. See picture for more details:


    4. Select Format All + Download from drop-down menu like on picture below. This is essential becasue if you broke partition table, whole eMMC be formatted and all partitions must be rewritten. That is why we need both /cache and /data partitions, all checkboxes must be checked. If you try to unselect single partition you wont be able to do format before flashing.
    format.jpg


    5. Push Download button and connect your phone (which is off) with PC via USB cable. Process should start, with formating eMMC, and downloading all data respectable. It can take up to 30 mins or so, depending on partition image sizes. After process is finished you will see green circle on screen again. Unplug USB from phone and turn it on.

    That would be all.




    Appendix - INSTALLING DRIVERS
    This going into appendix section as this is needed to be done only once - when You use SP Flash Tool for the very first time. Theoretical background behind this is: we use memory testing routine as it is safe to do and it will initiate preloader to be detected into Windows OS device manager. Once we get new hardware found, we install drivers.

    Install adequate drivers from MTK Preloader Drivers via automated setup.
    1. Shut down your phone or prepare for cold start if you are in bootloop
    2. Run SP Flash Tool and navigate to Memory Test tab
    3. Check RAM Test and Data Bus Test ONLY, all other checkboxex must remain clear, than push Start button. DO NOT CHECK EMMC Test!
    4. Connect your phone (which is still OFF) and PC with USB cable, afterwards new hardware found wizard should popup. If you installed drivers it should be automatically found, if not, you still may install drivers manually, respectably to device type and OS you are using.
    5. Once driver setup is finished, SP Flash Tool will show green circle as signal that RAM is tested and it's ok. If you see red circle RAM is nok.


    Addendum - COLD START from BOOTLOOP
    If your OT-6012X is in bootloop, try this solution. It it discovered on OT-6012X but may also works for other MTK devices with embedded battery. (devices without detachable battery)

    1. Press and hold power button and vol - button together and keep pressed. After 8 sec (when phone turns off) release power button but keep pressed volume - for few seconds more, than release it. Now your phone should stay off.

    2. Connect to USB and wait for charging battery few seconds than unplug USB. Now your device is in COLD START state.

    3. Now (from cold start state) press volume + and power button at same time, and after phone turns on release power but keep volume + pressed untill recovery loads than restore NAND backup if you have TWRP installed.



    If I didn't referred some methods used in this guide it means that they are discovered by myself. If this guide helped you, please don't forget to push thanks button. Have fun.
    1
    Hi CyberianIce and thanks for this tutorial, but BitDefender detected a Trojan in MTKDroid_Tools...
    With Virustotal (scan of rar archive) : 17 / 51
    EDIT : After verification, the same problem is in MTKDroid_Tools official link too but I'm not sure it's a false positive...

    One must turn A/V off when using MTK Droid Root & Tool and SP Flash Tool because they recognize common android exploits (faramir, boromir, etc) as potentially threat. However, that is false alarm, because it is harmless when used for this purpose and absolutely needed for rooting.
    1
    No that isn't from the last write without preloader , because that problem I had it in the past and for that I tried to re-write the fw
    Can I do something ?
    Just restore previous backup as described in first post.

    Applies to all other phone?
    Yes but you must obtain scatter.txt for your specific phone.
    1
    Tried to download the MTKDroid_Tools.rar archive but Google Drive does not allow me to download because only the owner is allowed to download infected content. I know that they probably just detect the Android exploits but downloading then is not possible.

    Try downloading from this URL:
    MTKDroid_Tools (zippyshare mirror). Maybe your antivirus block /files/pwn as it is exploit for rooting but not a virus. Try disabling antivirus or add an exception.