yashsingh1/xdaforums huggingface dataset:
[Upgrading, Modifying and Unlocking] Al3XKOoL:
Fixed.

The needed step to fix it is do "Firmware Upgrade" with lastest tool versions. (Something has changed)

After it i can flash anything in "download only" mode.

I don't know why not found info about it :confused:

Thanks for ur time.
[Upgrading, Modifying and Unlocking] Miss Montage:
Well, I read that you should run "Firmware Upgrade" when you get this error message, but how can you do this with only a boot.img and recovery.img? So you re-flashed your "old" ROM and camouflaged it as a Firmware-Upgrade?

I didn't have to run FW Upgrade in order to make the latest version(s) work. But maybe that's because I didn't go too far back in the versions, my phone was released this spring, the scatter files and firmwares are "young"...

And how did you find it out? Just tried around? With linux and windows tool?
[Upgrading, Modifying and Unlocking] Al3XKOoL:
I do all test in windows fisrt:

I test my working (older) version of SP... and i can flash single file like boot.img.

I tried same step with lastes SP.. version, and then give the mentioned error.

Bug confirmed at that point.

I do full backup in recovery, run "Firmware Upgrade" with my stock ROM. All with lastest SP...

After finish, restore my backup and test. Phone work well.

Now power off and try to flash only recovery.img and it work. Tried on linux and work also. :good:
[Upgrading, Modifying and Unlocking] Miss Montage:
Okay, but you didn't have to run another Firmware-Upgrade on the Linux tool then, right?

Which windows-version was the last that worked with single partitions?

edit: my "thanks" are exhausted for today - will keep them in mind :)
[Upgrading, Modifying and Unlocking] Al3XKOoL:
No more firmware upgrade is needed, that's like my scatter file is wrong, but i comfirmed by flashing single file on older version with same scatter.

I take lastest version from here: http://mtk2000.ucoz.ru/

WIndows and Linux "v5.1524"

Maybe something has changed in lastest versions for my emmc flash chip.

I see the error in my shared logs

FlashTool[6767][140168635037440][D]: CheckPMTLayoutChange(): PMT changed for <BMTPOOL>: addr<0xffff00a8>-->addr<0xffff00a8>, len<0x0>-->len<0x1500000>(../../../qt_flash_tool/Cmd/DLOnlyCommand.cpp,69)
FlashTool[6767][140168635037440][D]: run(): App Exception! (PMT changed for the ROM; it must be downloaded.)((fw_throw_error,../../../qt_flash_tool/Flow/ErrString.cpp,24))(../../../qt_flash_tool/UI/src/BackgroundWorker.cpp,104)

But "BMTPOOL" is right :silly:
[Upgrading, Modifying and Unlocking] Miss Montage:
Good to know. I read all the comments to the flash_tool in needrom earlier today, few people had that error code - most of them installing a more or less current version, I presume. I guess that to at least 50 percent conflicting partition management table and scatter file are the reason for it.

In case someone comes up with the same question, I'll bear your "case" in mind.

Unfortunately I forgot to copy my log files to a more persistent space than /tmp :)

BMT-Pool didn't seem to match last night (still have your log files :) :

I think that's what caused the "app exception"... But if the exact same combination of files works with a

different flash tool version, it is still odd...

My conclusion for now is that some read or write change has been made to the tool itself. It would be interesting to know when that change took place.

edit: I just went back to the first linux version available (v5.1436..00.100), again without error message. So probably the change has been made before a linux tool was released. Or it is device-specific...

This is what I found in a MTK_online_FAQ:
[Upgrading, Modifying and Unlocking] Miss Montage:
I probably found out why you had to run a Firmware Upgrade - which means formatting your device: The scatter file format has changed somewhere down the (Windows) SP_Flash_Tool line...
[Upgrading, Modifying and Unlocking] DerTeufel1980:
Wooohoo. Great stuff. Finally I can uninstall windows.
[Upgrading, Modifying and Unlocking] Miss Montage:
Well, that's what life's supposed to be - give and take :) You are especially welcome!
[Upgrading, Modifying and Unlocking] spikey-1973:
hey to start thank you!

i'm really glad to find your tutorial, i'm trying to flash my china brand mtk phone, but windows (8.1) doesn't let me.. driver signing thing. anyway i bumped into your tutorial and like going at this with linux much more anyway. unfortunately i'm not experienced.. yeah i am with gui van ubuntu, but not with the terminal. a little copy past of 'code' i found on webpages to help me install stuff. which makes me just that little bit more capable of correcting the code for personal use a bit more that changing directories..

so in this context, and i realise i must look a complete nitwit, but there are more of people like me that try to learn.

so i think i found an typing error: cmod +x flash_tool should be chmod +x flash_tool.

as the teminal informed me that cmod didn't exist i even tried: sudo apt-get install cmod, this before ofcourse i understood that the difference between the two lines wasn't meant to me in the chmod but in the x.sh

besides that.. thank you very much.. learned a little bit extra today..
[Upgrading, Modifying and Unlocking] Miss Montage:
Thanks for your feedback, I'll correct the typo instantly :)
[Upgrading, Modifying and Unlocking] Doudoube:
It works fine for me too. Great thanks for this usefull post. I hate windows and didn't want to reinstall it only for flashing my phone...
[Upgrading, Modifying and Unlocking] laozhongyi:
Qt Error?

Tried it twice but kept getting the same error:

QThread::setPriority: Cannot set priority, thread is not running

"09-06-2015"

QObject::moveToThread: Cannot move objects with a parent

comboTimeout index(3) saved.

Help?!
[Upgrading, Modifying and Unlocking] Miss Montage:
Actually these lines appear in my terminal, too. But the flash tool opens and detects the phone once it is connected.

Does the flash tool not open at all in your case? Or does the timeout error occur when the graphic user interface is running?

Would you mind to upload the log files? (By default they are stored at /tmp/SP_FT_Logs)
[Upgrading, Modifying and Unlocking] BlueFlame4:
Hey,

I'm also on Arch and would like to know what exactly you did. My phone isn't recognized at all when I'm in the preloader. As soon as I switch to normal powerup or fastboot everything is fine but I can't use the flash tool then... Any special packages that you installed?

Edit: Figured it out. I didn't know I needed to shutdown my phone completely in order to activate the preloader.
[Upgrading, Modifying and Unlocking] laozhongyi:
Here are the logs and thank you for the quick response.
[Upgrading, Modifying and Unlocking] Miss Montage:
Hmm, not sure about this one, the first thing that strikes me in the log is

I assume this means that either the phone is not detected, or a necessary file cannot be found.

I also read several signature-fail messages in the log.

Do you try to flash a HTC device?

What is the output if you connect the phone (switched off) and enter?

dmesg | grep usb
[Upgrading, Modifying and Unlocking] gerstavros:
This is normal error, you use scatter or partitions with different partition table from your firmware. You must use firmware upgrade option and download a whole firmware. Or try to flash the boot img and recovery from fastboot. This is not a problem of the tool anyway.
[Upgrading, Modifying and Unlocking] Al3XKOoL:
You are miss?

Already know that cause, and this appears with the right scatter...

Please read all my post in this thread before posting.
[Upgrading, Modifying and Unlocking] DerTeufel1980:
That's weird. I used it in every possible variation. Flashed one file, multiple files, firmware upgrade,... I can't imagine how Linux flashtool could treat your scatter file differently.

Isn't it related to MTK_SHARED_SDCARD maybe?
[Upgrading, Modifying and Unlocking] Al3XKOoL:
It's already explained back.
[Upgrading, Modifying and Unlocking] TommeleTBone:
Hi there,

i have done the installation right through this docu, but i get:

/sp_flash_tool$ chmod +x flash_tool.sh

tommeletbone@tommeletbone-1005HA:/sp_flash_tool$ sudo ./flash_tool.sh

/sp_flash_tool/./flash_tool: 1: /sp_flash_tool/./flash_tool: Syntax error: "(" unexpected

tommeletbone@tommeletbone-10

checked rights:

ls -l | grep flash_tool

-rwxrwxrwx 1 tommeletbone tommeletbone 9029757 Jun 17 10:31 flash_tool

-rwxrwxrwx 1 tommeletbone tommeletbone 272 Jun 17 10:31 flash_tool.sh

tommeletbone@tommeletbone-1005HA:/sp_flash_tool$

i use SP_Flash_Tool_Linux_32Bit_v5.1520.00.100

Ubuntu 14.04.3 LTS.

am i missing something? i tried this also with a different ubuntu machine, same issue
[Upgrading, Modifying and Unlocking] ilomo:
Syntax error

I have the same issue as tommeleTBone; tried in Ubuntu 14.04 and Lubuntu...

How can we resolve it?

Thx in advance!!!!
[Upgrading, Modifying and Unlocking] Miss Montage:
[MENTION=4732520]ilomo[/MENTION] : Are you also running a 32-bit system?

What is your output of

file flash_tool

(run within the flash-tool-directory)?

-------------------------------------------------------------------------------------------------------------------

I ran the "file"-command on numerous Flash-Tool-versions, and the output always is:

flash_tool: ELF 64-bit LSB executable, x86-64

.

I wrote a PM [MENTION=5210252]hanuma[/MENTION] on needrom, I hope he knows of a version compatible with 32-bit systems...
[Upgrading, Modifying and Unlocking] ilomo:
Hi, [MENTION=6466472]Miss Montage[/MENTION], terminal says: flash_tool: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=07438213fbaa7d1ae8eadb517ea140e14c183f5b, not stripped

Yes I'm using a 32bit machine...
[Upgrading, Modifying and Unlocking] Miss Montage:
That's what I suspected. So far I haven't found a 32-bit executable...

I'm sorry!
[Upgrading, Modifying and Unlocking] ilomo:
I'll try...
[Upgrading, Modifying and Unlocking] Miss Montage:
Please keep me updated!
[Upgrading, Modifying and Unlocking] ilomo:
:good::good::good::good::cool:
[Upgrading, Modifying and Unlocking] przemo91r:
Hi,

I have problem with flashing my phone.

I use Ubunut 15.04 and Flash tool v5.1528.

After connect phone and normal run phone comand

show:

My file /etc/udev/rules.d/80-persistent-usb.rules

I go to Memory test but i heve error "Please Load Preloader or DSP_BL before execution ."

I try in fastboot too. If i run fastboot, select scatter and click download i see that:

^Cistrd@istrd-K53SV:~/Pobrane/SP_Flash_Tool_exe_Linux_v5.1528.00.100$ sudo ./flash_tool.sh
[sudo] password for istrd:
QObject::moveToThread: Cannot move objects with a parent
Connecting to BROM...
Scanning USB port...
Search usb, timeout set as 3600000 ms
change@/devices/virtual/thermal/thermal_zone1

change@/devices/virtual/thermal/thermal_zone1

change@/devices/virtual/thermal/thermal_zone1

change@/devices/virtual/thermal/thermal_zone1

Sorry for my english.
[Upgrading, Modifying and Unlocking] Miss Montage:
Your English is fine :)

That's how it should look like - apart from the "USB disconnect" that follows it.

That's not a reason to worry, actually you need to add some files to the flash tool in order to run the memory test. That bit of the tutorial only serves to check if a connection can be established.

That bit looks odd. The output should be like this:

Search usb, timeout set as 3600000 ms
add@/devices/pci0000:00/0000:00:13.2/usb2/2-2

add@/devices/pci0000:00/0000:00:13.2/usb2/2-2/2-2:1.0

add@/devices/pci0000:00/0000:00:13.2/usb2/2-2/2-2:1.1

add@/devices/pci0000:00/0000:00:13.2/usb2/2-2/2-2:1.1/tty/ttyACM0

vid is 0e8d

device vid = 0e8d

pid is 2000

device pid = 2000

com portName is: /dev/ttyACM0

Please run

modprobe cdc_acm

and try again. If you double-checked and prepared the files for the Flash_Tool Download (or Firmware Upgrade) you can try the "Download" button straight away.

Another idea: Have you tried a different USB-Port? I read that USB 2.0 is ideal (don't know if it works on USB 3.0 hubs)
[Upgrading, Modifying and Unlocking] buten:
looks interesting thanks for the tutorial
[Upgrading, Modifying and Unlocking] egalus:
Please change your tutorial and remove the security risk of executing flash_tool as root.

As far as I understand the flashing procedure it is just using a serial connection to upload the rom to the mobile device thus it only needs one special right not every user might have:

The user needs write permission to the MTK usb-device.

At least for ubuntu it suffices to add the user to the dialout group as groupmembers get access to every modem.

Maybe logging out and back in again after adding the user to the group is needed.

I tested this by flashing my Jiayu S3 (which used /dev/ttyACM0) using ubuntu 15.04 and a user who is a member of the dialout group - no problem at all, thus no need for root except for adding the user to the group dialout.

Never execute anything you download from places like needrom as root user - at least not on a system you need or have data on that you need!
[Upgrading, Modifying and Unlocking] przemo91r:
Thx for answer i try also other port 2.0 but not working. If i turn off phone and connect to PC i see loading page. Next my phone is detected. But i get error.

I can't attach screen. But I got :

How i must run phone? normaly or fastboot mode?
[Upgrading, Modifying and Unlocking] Miss Montage:
Hey, that looks far better! Your phone must be switched off ;)

For me it works best this way: Switch off the phone. Start flash_tool, prepare everything, hit the "Download" button, attach USB-cable to your computer, then attach it to the phone.
[Upgrading, Modifying and Unlocking] przemo91r:
I try this scenariou but i got this same errors.
[Upgrading, Modifying and Unlocking] Miss Montage:
Just try around, you are nearly there :) You can try to press vol+ or vol- while attaching the cable to the phone, or remove the battery and reinsert it after connecting the phone to the computer.
[Upgrading, Modifying and Unlocking] przemo91r:
I I tried all methods but i got same error. :(
[Upgrading, Modifying and Unlocking] Miss Montage:
I can only advice you to read through threads about your device then.
[Upgrading, Modifying and Unlocking] przemo91r:
This phone is very specific.

I can't find whatever about this phone and find solutions how flash it.
[Upgrading, Modifying and Unlocking] Miss Montage:
Why do you want to flash it? It is difficult for this kind of phone to get a valid ROM, and PLEASE backup your ROM before doing anything else. This would be easier with Windows and MTK Droidtools, but if you can get rid of the connection error and if you are willing to a lot of copy/paste work you can create a full backup with the readback tab in the flash tool.
[Upgrading, Modifying and Unlocking] przemo91r:
I try because i got error on screen after unlock phone "System has benn modiefied, pleace conctact the manufacturer, thank you!"

I try on Windows but i cant do this too. Becouse i can't install drivers correctly.
[Upgrading, Modifying and Unlocking] Miss Montage:
[sarcasm] Chances are high that the system has been modified by the manufacturer. Good luck in trying to contact him[/sarcasm]

But seriously, I can't help you there... I'm sorry

The reason is: even for a readback by flash-tool you need a valid scatter file for your device.

MTK DroidTools can generate it for you. Here you find a guide for the driver installation.

Good luck!
[Upgrading, Modifying and Unlocking] Sn4kes:
Very nice tutorial. I've had problems on my Chakra os with phone detection. I don't know why but I couldn't get it detect phone as MTK device.

Now I've tried on another PC with Debian and it worked without a problem. Well I had one problem, after running it from console I got error: could not connect to X server. I am not sure why, would I have to export x server?

Clicking on icon instead of running from console worked.
[Upgrading, Modifying and Unlocking] Miss Montage:
Unfortunately I'm not familiar with Debian. So I don't know why it refused to open the x-window from terminal.

Did you run "chmod +x" for both files? (flash_tool and flash_tool.sh)

And did you try both commands?

./flash_tool

and

./flash_tool.sh
[Upgrading, Modifying and Unlocking] Sn4kes:
Yes, both files were executable and I've tried to run both.

There is a workaround, just open file manager and click on one of the files, I am not sure if it is important which one is it.
[Upgrading, Modifying and Unlocking] pickarooney:
This won't run as non root and when I run it as root I get a syntax error

./flash_tool: 1: ./flash_tool: Syntax error: "(" unexpected
[Upgrading, Modifying and Unlocking] Miss Montage:
Are you running a 32-bit system?

uname -a

Unfortunately I found no SP_Flash_Tool for 32-bit-Linux...
[Upgrading, Modifying and Unlocking] pickarooney:
Yes. The packages is marked as 32-bit on the download page but I guess that's not the case.
[Upgrading, Modifying and Unlocking] Miss Montage:
file flash_tool

will tell...
[Upgrading, Modifying and Unlocking] pickarooney:
Yeah, it's 64-bit.
[Upgrading, Modifying and Unlocking] Y2Kot:
console

Can anyone write me an example of the console flash command? Thanks!
[Upgrading, Modifying and Unlocking] kadu247:
After i follow this tutorial all was working fine but now it doesnt work anymore! Has anything been changed by sp flash tool? Now the phone goes to battery charge after connecting it to the laptop! No errors in terminal...

PS: it happend after flashed a cyanogenmod rom. Dont know if it has something to do with that!
[Upgrading, Modifying and Unlocking] Miss Montage:
I don't know if the console mode works. There is an explanation from 2013 - long before any linux version - within the "Welcome" section of the GUI. You can have a look at the attached file. First you need to create a configuration file (XML) within the GUI. But there is no function for this... If you find a different way to create it, place it in the SP_Flash_Tool directory, navigate there and enter ./flash_tool -i name_of_file.xml

Here are some additional options:

Example: flash_tool -i download.xml

Mandatory:

-i console mode configuration file

Overwriting settings specified in the configuration file:

-d download agent file path

-s scatter file path

-c flash tool features, just support:

format

download

format-download

firmware-upgrade

-p specify com port(Windows Only), format is as COM4+COM6 (BROM download), COM5 (preloader download)

Miscellaneous:

-r redirect debug log to parent process

-h display this help and exit
[Upgrading, Modifying and Unlocking] Miss Montage:
[MENTION=5447299]kadu247[/MENTION] : Can you remove the battery and reinsert it later?
[Upgrading, Modifying and Unlocking] kadu247:
Already try that. Same result. Im having a strange behavior. The phone actualy boots up after sp flash tool detects the usb connection. Maybe something is very wrong with this rom, but how does it afect the flash tool?! Have to try it on windows! For now im stuck in this one!
[Upgrading, Modifying and Unlocking] Miss Montage:
You can still try to flash it without battery. (SP_Flash_Tool must be set to "auto detect battery" or "without battery")
[Upgrading, Modifying and Unlocking] kadu247:
All i get is this... without battery, same with battery but with battery it boots the OS after flash fail! (strange behavior)

https://www.dropbox.com/s/t63dh0bbuhlm5bz/Kazam_screencast_00000.mp4?dl=0
[Upgrading, Modifying and Unlocking] Miss Montage:
What happens if you enter

modprobe cdc_acm
[Upgrading, Modifying and Unlocking] kadu247:
Same... no luck! it's getting frustrating :eek:

I've also tried to unload and reload it

rmmod cdc_acm
modprobe cdc_acm
[Upgrading, Modifying and Unlocking] Miss Montage:
Have you tried a different data cable and a different usb 2.0-port?
[Upgrading, Modifying and Unlocking] kadu247:
Yes i've tried every usb port (3.0 and 2.0) also tried with an usb hub. It must be something wrong with the phone... What does affect the flash tool? Is it the kernel? The boot.img? I have a working cwm but if i flash a diferent ROM and it gets bricked i dont have a working flash tool to same myself :)

---------- Post added at 10:09 PM ---------- Previous post was at 10:03 PM ----------

I hate windows so much and but its the only OS that have all the tools for noob guys like me... What a week! How come a linux based mobile OS is so dam hard to work on it with a any linux distro?!
[Upgrading, Modifying and Unlocking] Miss Montage:
As far as I know, the phone's preloader, chipset, emmc-type and the PMT (partition management table) are double-checked by the flash tool before downloading. It has plenty error messages in store if something doesn't match :D

But you can't even establish a connection to the tool.

You can try to enable usb-debugging, but honestly I don't think that this is the point.

Double-checking the udev-rules is also an idea.

Third guess: the boot behaviour of your phone is indeed unusual. Does it also boot if you switch it off and connect it to a charger?

Would you mind to upload the last two SP_Flash_Tool log files? ("Help" -> "Open Logs Folder" )

That's a very good question. I read that MediaTek kept their sources closed until about 15 months ago. There was no flash tool for linux to be found... Consider yourself a pioneer :)
[Upgrading, Modifying and Unlocking] kadu247:
I just found out now that this rom's offline charging isn't working so maybe this is the reason that the OS boots after connected to the usb and make some kind of bypass through the flash tool (i realy do not know if this makes any sense :p im just a user not a dev)

Already tried with usb-debugging enabled and desabled

Already checked udev-rules and also restarted them

Attached

Until some dev has successfully built a custom kernel from "0" and MediaTek no longer had a point to keep their sources closed :D
[Upgrading, Modifying and Unlocking] Miss Montage:
I think this is the problem:

If your phone goes into boot mode once it is connected to a usb socket, it can't communicate with the flash tool.

Those log files are always long (1885 lines) and I cannot state to understand them, the only difference I found is a long streak of "validation, debug and m_sign_offset" modes that don't occur in mine. Probably because the tool is trying so hard to read your device - without avail...

Makes perfect sense to me, and I'm a user, too. Probably you can modify the init.rc file or something along those lines (I hope you'll find help in some device specific thread). Good luck!

edit: I just spotted that your friendly developer [MENTION=3774214]Al3XKOoL[/MENTION] is going to fix the issue with the next Release. So please be patient ;)
[Upgrading, Modifying and Unlocking] kadu247:
Thank you so much for all the help and replys. I think the issue was found. Sorry for messing up your thread with all this (offtopic after all) ... The offline charging feature... Who would guess!!! Thank you for your patience :)
[Upgrading, Modifying and Unlocking] Miss Montage:
Never mind :) You hinted on the boot behaviour earlier on, I might have picked up on that sooner.

I still don't get why you can't flash it without battery...

And I'm eager to learn about potential errors. As long as they are not linux specific, it might be worth having a look at these threads: http://xdaforums.com/showthread.php?t=1982587

http://xdaforums.com/showthread.php?t=2650125