this is what happens after running ./flash_tool
libpng warning: iCCP: known incorrect sRGB profile
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x3400002
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x340000b
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x340000c
libpng warning: iCCP: known incorrect sRGB profile
QObject::moveToThread: Cannot move objects with a parent
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x340000c
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x13f
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x3400027
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
comboTimeout index(3) saved.
X Error: BadPixmap (invalid Pixmap parameter) 4
Major opcode: 54 (X_FreePixmap)
Resource id: 0x3400028
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 2 (X_ShmDetach)
Resource id: 0x3400027
X Error: BadPixmap (invalid Pixmap parameter) 4
Major opcode: 54 (X_FreePixmap)
Resource id: 0x340000c
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 2 (X_ShmDetach)
Resource id: 0x340000b
libpng warning: iCCP: known incorrect sRGB profile
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x3400002
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x340000b
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x340000c
libpng warning: iCCP: known incorrect sRGB profile
QObject::moveToThread: Cannot move objects with a parent
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x340000c
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x13f
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x3400027
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x3400028
comboTimeout index(3) saved.
X Error: BadPixmap (invalid Pixmap parameter) 4
Major opcode: 54 (X_FreePixmap)
Resource id: 0x3400028
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 2 (X_ShmDetach)
Resource id: 0x3400027
X Error: BadPixmap (invalid Pixmap parameter) 4
Major opcode: 54 (X_FreePixmap)
Resource id: 0x340000c
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 2 (X_ShmDetach)
Resource id: 0x340000b
This works only on Linux 64-bit
DISCLAIMER: It is always risky to flash your mobile device. I do not and will not take any responsibility for bootloops and bricks.
Please check carefully that the ROM or recovery.img you want to flash is suitable for your specific device and for the sp_flash_tool. The firmware directory should neither contain meta-inf nor system folder, but something_with_a_scatter.txt and a system.img
Backup your phone before flashing!
Your phone's battery should be at least half charged (50 percent) before you start this.
I successfully ran these steps on my UMI Hammer with Linux Ubuntu 14.04 and 16.04. I do not have other devices or Linux derivates and do not plan to buy/install any.
CREDITS and a zillion thanks to Sergio Rivero for his excellent tutorial on mibqyyo.com!!!!
Also many thanks to N2K1 for giving me some more background information!
So here we go:
Step 1:
If you haven't done so before, install the Linux generic usb-drivers package:Download SP Flash Tool Linux (latest version): http://mtk2000.ucoz.ru/load/soft/soft_mtk/sp_flash_tool/5-1-0-14 (Password to extract currently is mtk2000v3)Code:sudo apt-get update sudo apt install libusb-dev
or here https://androidmtk.com/smart-phone-flash-tool
In case you haven't done before, install unrar:
Extract the downloaded file -> graphic file manager (e.g. Nautilus): double-click and extract. Terminal:Code:sudo apt install unrar
(from now on: please adapt paths to your own settings)Code:unrar x path_to_file
Move the new folder „sp_flash_tool“ to a directory of your choice.You might also need to install libqtwebkit4 (it just happened to me on Linux Ubuntu 16.04):Code:mv /home/username/Downloads/sp_flash_tool /home/username/...
Code:sudo apt install libqtwebkit4
[Only For Ubuntu 16.10 and newer]
RunThese libraries are still required for the flash tool but have been removed from new Ubuntu versions.Code:sudo wget -q -O /tmp/libpng12.deb http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_amd64.deb && dpkg -i /tmp/libpng12.deb && rm /tmp/libpng12.deb
Thanks @hanalinqu and @z3r0c00l_2k for this information!
Step 2:
Change into the newly created directory:We make one file executable by typing:Code:cd /sp_flash_tool
Code:chmod +x flash_tool
In order to avoid running the flash_tool as root user, you need to add a standard user to the usergroup "dialout" (thanks to @egalus for this bit!)
For Arch Linux:Code:sudo adduser username dialout
Code:gpasswd -a username uucp
and activate the membership immediately
(Arch Linux):Code:newgrp - dialout
Code:newgrp - uucp
Step 3:
Now you can open the tool:
or double-click on the flash_tool icon.Code:./flash_tool
You can try at this stage if the flash tool connects to your phone:
In the user interface, choose tab „Download“. Hit "scatter-loading", navigate to a directory with a valid firmware for your device and choose the scatter-file.
For testing purposes uncheck "name" and check one of the smaller files in the list below (for example "logo")
Switch off your device. Hit the "Download" button in SP_Flash_Tool and connect your phone to the computer. Some devices require you to take off the battery for about 10 seconds, with others you need to press Vol+ or Vol- while plugging the cable into the phone. Please look up device-specific threads and try out different options.
If nothing happens at all, open a second terminal, runand look out for a MediaTek entry. If there is none → did you install libusb-dev (Step 1?)Code:dmesg | grep usb
If the answer is yes, you might need to create a persistent udev rule for the MTK Preloader:Add the following line to the file:Code:sudo gedit /etc/udev/rules.d/80-persistent-usb.rules
Save the file and exit.Code:SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0e8d", ATTR{idProduct}=="*"
Reload the usb-rules:Disconnect the usb data cable from the computer and the smartphone. Close the flash tool. Switch on your phone (fastboot mode will do). Repeat the first paragraph of Step 3.Code:sudo service udev restart
If the tool connects, within a few seconds a red progress bar will appear. Unfortunately, in my case an error message came along with it:
S_BROM_CMD_JUMP_DA_FAIL (2035)
There is a connection, but also one more obstacle to overcome...
Step 4:
Now we come to the interesting part, which cost me 2 weeks of (futile) research and frustration. Finally I found Sergio Riveros tutorial on mibqyyo. Thanks to him again and again and again for this priceless piece of information
To put it in different words: The modem manager controls port /dev/ttyACM0 and disables the Flash Tool. So we blacklist it for the two MTK vendor IDs the flash tool uses:You insert these two lines:Code:sudo gedit /etc/udev/rules.d/20-mm-blacklist-mtk.rules
Save the file, exit and restart udev:Code:ATTRS{idVendor}=="0e8d", ENV{ID_MM_DEVICE_IGNORE}="1" ATTRS{idVendor}=="6000", ENV{ID_MM_DEVICE_IGNORE}="1"
Code:sudo service udev restart
Switch your phone on (fastboot mode will suffice) and off again.
Step 5:
or double-click on the flash_tool icon.Code:./flash_tool
Now everything should run smoothly. In case you encounterchange the download agent to MTK_AllInOne_DA.bin (screenshot #4)Code:BROM ERROR : S_SECURITY_SF_CODE_FORMAT_FORBIDDEN (6012) , MSP ERROE CODE : 0x00
There are plenty of tutorials on the web for the further steps.
Happy flashing! When a green circle with a white checkmark appears, you are done. You can close the flash tool and disconnect your phone. For a clean start with a new ROM boot into recovery and wipe data/factory reset.