0

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?

0

3 Answers 3

1

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"

6
  • For arch command i get the following response: i686
    – Robert-Dan
    Apr 17, 2016 at 12:50
  • Download the 32 bit version. Apr 17, 2016 at 12:53
  • ok, but is the same, bash: ./flash_tool.sh: Permission denied. btw i open the files folder as a administrator and in terminal i executed the flash_tool as superuser after i chmod +x the exec file!
    – Robert-Dan
    Apr 17, 2016 at 13:03
  • chmod +x flash_tool.sh ./flash_tool.sh ./flash_tool.sh: line 13: /.../SP_Flash_Tool_Linux_v5.1520.00.100/./flash_tool: cannot execute binary file: Exec format error
    – Robert-Dan
    Apr 17, 2016 at 13:08
  • type 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
1

The Download for 32bit Linux on http://spflashtool.com/ is not 32bit, it is the 64bit Version.

2
  • how does this answer the question? Nov 20, 2017 at 21:01
  • @Pierre.Vriens You might get this error is you execute the 64 bit version on a 32bit OS.
    – Seth
    Nov 20, 2017 at 23:06
-1

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!

1
  • That won't help. It's the wrong executable type for the system in question and unrelated to super-user privileges. See the other answers. -1 Jan 17, 2018 at 10:57

Not the answer you're looking for? Browse other questions tagged .