2

When I install FaceNiff on Bluestack and try to run the executable file from adb shell by

./FaceNiff

I get the error:

/system/bin/sh: ./FaceNiff: not executable: magic 7F45

I have rooted the phone, su the adb. I think i need correct su and busybox. I tried but failed.

  • and where did you get this FaceNiff executable from? If it was compiled for GNU/Linux, it won't run on Android. – Dan Hulme Feb 18 '14 at 18:24
  • Why do you try to run it from the shell? Isn't it a normal APK? – onik Feb 18 '14 at 20:17
  • I downloaded it from faceniff.ponury.net; faceniff.apk has the binary in asset folder. trying to Reverse Engineer it to understand how ELF is called on android. – Nik Feb 19 '14 at 5:54
  • I am using Bluestack. I am getting the same error even when i try to run IDA android_server {rooted, updated su-x86, busybox-i686} – Nik Feb 19 '14 at 12:47
  • a reverse engineer without understanding the difference between ARM and x86 ABI? you have got a lot to learn – user23414 Feb 19 '14 at 16:17
6

7F45 are the first two bytes of the ELF header \x7FELF. Android also uses ELF, so the error message you encounter means that the FaceNiff binary is not recognised as executable by your kernel (unlikely, unless you forgot to chmod +x it), not for your architecture (e.g. x86 instead of ARM), or uses a dynamic linker not included (e.g. glibc or µClibc instead of Bionic).

If you need to run an Android-ARM executable on Android-x86 you must recompile it for x86 (and look for the correct bitness too, 32-bit vs. 64-bit is also different).

Disclaimer: I’m the mksh maintainer.

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.