Posts: 7
Joined: Fri Jun 01, 2012 6:03 pm

Launching i386 .x86 application

Fri Aug 17, 2012 11:20 pm

Hello everybody,

I am having an issue when trying to launch a terminal app that was designed for an i386 intel proc. The only error i get from terminal is:

"bash: ./program.x86: Cannot execute binary file"

Now this file is all of 103kb (very light weight) is there a way i can get this to launch on the Debian Pi?
Unfortunately i cannot get my hands on the source code to change the CFLAGS to CFLAGS=-Wall -m32 -march=armv6 and recompile.

I have started hacking away at it with IDA PRO but am hoping someone out there has a better solution then the one I am currently doing.

Thank you all very much in advanced,

Posts: 70
Joined: Wed Jul 27, 2011 10:59 pm

Re: Launching i386 .x86 application

Sat Aug 18, 2012 2:28 am

Well, the R-pi is a arm cpu not a x86. You might try something like wine or an emulator.

Posts: 7
Joined: Fri Jun 01, 2012 6:03 pm

Re: Launching i386 .x86 application

Sun Aug 19, 2012 6:32 pm

the .x86 is not a windows app. its a bash shell script that has the contents encrypted. looking for an easy way to emulate the proc.

Thank you for your insight,

User avatar
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Launching i386 .x86 application

Sun Aug 19, 2012 6:40 pm

Wine also known as "Wine Is Not an Emulator" does not emulate CPU hardware it executes blocks of machine code an transcodes Windows calls functions into X-Windows equivalent.
To run x86 applications you'll need Linux / Windows running in Qemu or DOS apps running in Dosbox.

Richard S.

User avatar
Posts: 3055
Joined: Tue Oct 11, 2011 8:38 pm

Re: Launching i386 .x86 application

Sun Aug 19, 2012 7:13 pm

dixeflatline wrote:its a bash shell script that has the contents encrypted.
Encrypted means scrambled using a secret key. If the file is executable then the key cannot be secret, so it is not meaningfully encrypted.

Bash scripts are not architecture-specific. If it is a script and it is x86-specific then it must write some binary data to a file and run that. Like an installer. You may want to remove that layer of obfuscation.

I do not think there is a way to emulate individual processes on Linux (the system call numbers and other details can differ between architectures), plus the binary may require linking against dynamic libraries. So you will need to run a complete virtual machine with its own version of Linux inside.

Why did you start two threads about this? Why are you being secretive about what the file does and where it came from?

Posts: 7
Joined: Fri Jun 01, 2012 6:03 pm

Re: Launching i386 .x86 application

Sun Aug 19, 2012 7:30 pm

sorry i didnt mean to start in 2 places. I added it in 1 thread then saw another thread that was a better fit for it. I am not being secretive of the file? nobody asked what it was or where it came from. the file it self doesnt matter as the extension is a .x86 in which executes "sh ./program.x86" and doesnt launch as said before. the program handles com interface /dev/ttyUSB*

Its weird cause i have the program for everything but an AMR or the source code:

Going to set up mips debian via qemu and try that for now.

Sorry for the double post,

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: Launching i386 .x86 application

Sun Aug 19, 2012 7:44 pm

The problem here is that the way most support boards work is that people (the help seekers) post problems, giving lots of details, but the people reading it (the help givers) pretty much ignore everything written and just try to drop it into one of the established slots - and then give pre-programmed help information for that "slot".

So, here, no one knows what you're really trying to do, and there isn't anywhere near enough bandwidth here to accurately ferret it out. Rather, people just assume that you are trying to run a Windows (*) program on the Pi - and giving out the standard, pre-programmed, "You can't run your WIndows apps [Word, Excel, etc] on the Pi, because the Pi is ARM, not x86 (you silly goose!)"

(*) Because for most people, the terms "computer", "PC", "x86", and "Windows" are all synonymous.

Now, kidding aside, we are beginning to get a glimpse of what you've got - some kind of encrypted shell script - presumably, one that starts out with ordinary plain text (since a shell script, by definition, has to start that way), followed by lots of binary glop - and somehow, the plain text part interprets (decrypts), and runs the binary glop part. But, note well, whatever it is you've got (and whatever evil vendor supplied it), it's way beyond anything any of us have ever dealt with - and, as I said earlier, there just isn't the bandwidth here for it to get explained to us to the point where we could comment intelligently.

Such is the support forum game...
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

Posts: 7833
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Launching i386 .x86 application

Sun Aug 19, 2012 9:47 pm

Qemu has a feature called user mode emulation - which could be verry useful for you.
Ask forum member Dietmar , he might know more.

• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Posts: 1
Joined: Tue Apr 05, 2016 8:15 pm

Re: Launching i386 .x86 application

Tue Apr 05, 2016 8:42 pm

At first, I'am from Germany so my English is'nt the best.

There is an emulator for this, but it you have to buy this software. It is called ExaGear and powered by Eltechs, I think so. I don't use it because I only need it for Skype and it costs more than 20$. It emulate the x86 on the ARM. That means you can install for example skype and chrome.

If you whant, you ca buy it over here:https://eltechs.com/product/exagear-des ... nd-prices/
I hope I can help you with this,


Posts: 1
Joined: Thu Nov 09, 2017 1:47 am

Re: Launching i386 .x86 application

Thu Nov 09, 2017 1:55 am

I know this is old/stale, but it's still a highly ranked search result.

qemu-user is meant to do exactly what the poster asks for (AFAIK) and is available in Raspbian.

If it's some kind of self-extracting-installer-type bash script, he'd probably need to identify the particular platform dependant part and wrap it in qemu-i386.

Return to “Debian”