Is it possible to get Android.mk or native source file from .apk file?

旧时模样 提交于 2019-12-07 14:18:09

问题


It seems that it is quite easy to get Java source files from .apk file. But is it possible to get Android.mk or native source file from .apk file, by tools or tricky methods?

I am doing research on Android app native code security so that these files are quite important for me. Thanks.


回答1:


You cannot get Android.mk from an apk, it's only needed for building, as such, it's not stored in there (unless the programmer put it in the res/ folder or something like that).

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.

Edit: I noticed you seem to be worried about people reverse engineering your code. The only sure fire way to prevent someone from reverse engineering your code is to not write it in the first place. You can do some things to make it difficult for people however, but someone persistent enough can get around it.



来源:https://stackoverflow.com/questions/8028134/is-it-possible-to-get-android-mk-or-native-source-file-from-apk-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!