4

Is there a way to check if an APK file hosts native code?

There are many reverse engineering tools (e.g. apktool, androguard) from which you can reproduce the source files of an Android app but I'm not sure if there is a de facto solution which you can use to assure that an APK contains native code. Maybe someone can search for ARM binary files in the source files of an app. But how to know which directories to check?

Is there a more standard way to do this?

4

I think this StackOverflow answer should point you in the right direction:

All of the native code for an app is stored in the libs/ directory in the root of the apk. It's compiled ARM or x86 code, or both. You can find it in libs/architecture_type/lib_name.so. You can dissemble the code with objdump or gdb. Decompiling is a much harder task, but you can find some software that might work for you.

  • 1
    Thank you for your answer! I will try to make a script that searches for executables in /libs directory. – Thanasis Petsas Dec 13 '12 at 11:22
1

An APK is also an archive so unarchive it on a computer (with tools like 7-Zip) and look at its content.

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.