I'm trying to get ProxyDroid or redsocks to run on the Genymotion Android emulator (x86). ADB shell into the device, run redsocks and I get not executable: magic 7F45.

I know it means that the version doesn't comply with the CPU. However, on Genymotion, I'm able to run a bunch of ARM packages with no problem (having installed the Genymotion ARM translation files).

I have compiled redsocks sources on my Ubuntu box (binary works fine on my Ubuntu x86), but when I copied the binary to the emulator, it still gives the same error message when I try to run it (not executable: magic 7F45). So, it looks like neither the ARM nor the x86 versions are working on the emulator.

I also have taken the redsocks binary that I compiled on my Ubuntu x86 box and pushed it to x86 AVD (standard SDK) - it worked perfectly. So it appears that the not executable: magic 7F45 error is not related to the cross-CPU compilation?

Is there a way to get redsocks run on Genymotion?


What file(1) utility says about your compiled binary?

Because compiling on x86-based PC does not promises your binary always will have x86 target platform - GCC can produce virtually any targets.


You can't freely copy binaries from your Ubuntu box to emulator one - even if all are x86-based, they use different basic OS libraries.

To compile binary for Android-x86 target you must use special cross-compiling tools\environment. See Android sources toolchain to take a look on how they configure gcc+ld switches to create android-x86 binaries on Ubuntu box.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.