How to Install SP Flash Tool on Ubuntu for MediaTek Android Flashing

Many of Appual’s guides for rooting and flashing Mediatek-based Android devices rely on a tool called SP Flash Tool. For users of Windows PCs, this is usually no problem at all, as the SP Flash Tool runs flawlessly after installing all the proper Mediatek VCOM drivers.

However, the latest versions of Ubuntu (16.04 – 17.10) have made changes to certain dependencies, and getting SP Flash Tool to communicate with your Mediatek-based Android device can be somewhat of a headache if you’re running one of the latest Ubuntu versions.

This guide will show you how to properly set up the dependencies required for SP Flash Tool on Linux.

Requirements:

  1. libpng12-0_1.2.54-1ubuntu1
  2. Latest SP Flash Tool for Linux

First you need to download and install the libpng12-0 package – SP Flash Tool is dependant on this package, but it was not included in the latest Ubuntu releases. So you will need to download and install it manually. Just right click on the .deb file and choose “Open with Software Install”.

You also need to install install libusb-dev package, so run:

sudo apt-get update
sudo apt install libusb-dev

Now download the latest SP Flash Tool for Linux, and extract it anywhere on your computer. I just left it inside the Downloads folder, it works fine.

Now right click on the newly extracted SP Flash Tool folder and choose “Open in Terminal”.

In the terminal type the following commands:

chmod +x flash_tool
sudo adduser username dialout
newgrp – dialout

And now you can run SP Flash Tool by typing in the terminal:

./flash_tool.sh

Troubleshooting

Phone will not connect / USB port not found:

Open a terminal and run:

dmesg | grep usb

Now look for your MediaTek device entry, and copy the idProduct string. Now in the terminal, type:

And then add the following line (replacing the idProduct with yours) to the file, and save.

SUBSYSTEM==”usb”, ACTION==”add”, ATTR{idVendor}==”0e8d”, ATTR{idProduct}==”*

If the terminal displays dialogue about timing out while trying to find the USB port, it may help to keep disconnecting your phone and trying different USB ports.

If you receive the error “S_BROM_CMD_JUMP_DA_FAIL (2035)”

Make sure you installed libusb-dev as instructed earlier in this guide. If so, we will need to blacklist Ubuntu’s modem manager (because it controls port /dev/ttyACM0, which is disabling SP Flash Tool from running properly).

Type in the terminal:

 

 

Then insert these two lines into the text file:

ATTRS{idVendor}==”0e8d”, ENV{ID_MM_DEVICE_IGNORE}=”1″
ATTRS{idVendor}==”6000″, ENV{ID_MM_DEVICE_IGNORE}=”1″

Then in the terminal: sudo service udev restart

ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.