I try to run SP Flash Tool under Ubuntu MATE but after I chmod +x
the executable file, I get this error:
bash: ./flash_tool: cannot execute binary file: Exec format error
bash: ./flash_tool.sh: Permission denied
Anyone have any idea why?
The Exec format error
means you are using the wrong file for your computer. Most likely you were trying to use the 64 bit version on a 32 bit Ubuntu. You need to download the right one.
Type arch
in a terminal to be sure which you should use.
If you get something like i386
as I suspect, download the "Linux 32 Bit version" under the heading "Direct links for SP Flash Tool Download" from http://spflashtool.com/
Currently, the supposed 32-bit version hosted there is in fact also 64-bit, and so no usable version is available for 32-bit Ubuntu. You might be able to find a 32-bit one elsewhere, but be careful. You cannot be certain any of these downloads (including the above link) are virus-free.
If you get x86_64
choose "Download SPFlashTool for Linux - 64 Bit Tool"
file flash_tool
while in the same directory as flash_tool.sh
. Does it say it is ELF 64-bit
?
Apr 17, 2016 at 13:18
The Download for 32bit Linux on http://spflashtool.com/ is not 32bit, it is the 64bit Version.
Run it as non root user. I'm on Kali Linux with root user by default and I was able to run the flash_tool using a non root user , through gksu:
<< gksu -u my_non_root_user ./flash_tool.sh >>
On Ubuntu it should work without sudo I suppose.
That works for me. I hope it may help!