Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.

share|improve this answer
    
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

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

share|improve this answer
    
Thank you for your answer! –  Thanasis Petsas Dec 13 '12 at 11:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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