For various testing reasons, I need to run my own 32-bit ARM ELF executables on various real ARM Android devices (I can't use emulators). Because it is not easy to buy an ARMv7 device nowadays, I'd like to run the executables on 64-bit Android devices. However, all the 64-bit devices from various vendors I have access to refuse to run the executables with this message:
not executable: 32-bit ELF file
This means that the system can't run 32-bit ELF files, or it can run them but it is configured to refuse them. Is there any trick to make the 64-bit OS running 32-bit executables, just like 64-bit Windows or 64-bit Linux can run 32-bit executables?
I use the following steps to push and execute the file:
adb push printf /data/local/tmp/
adb shell chmod 555 /data/local/tmp/printf
adb shell /data/local/tmp/printf
This returns:
/system/bin/sh: /data/local/tmp/printf: not executable: 32-bit ELF file
busybox printf
printf
executable toprintfx
and run./busybox-armv8l printfx
from/data/local/tmp/
, it says "printfx: applet not found" because it expects the parameter to be one of the functions supported by busybox.ls -lZ /data/local/tmp/printf; file /data/local/tmp/printf
return? Root? SELinux?armeabi-v7a
. See details here: android.stackexchange.com/a/208132/218526