0

I'd like to know if the lib compiled using the Android ndk are compressed or not. If yes there's a way to uncompressed it to be able to use objdump command?

I'm doing this question because I should check if a function is present or not into my lib

Thanks

Vladimir Sinenko
  • 4,629
  • 1
  • 27
  • 39

2 Answers2

0

They are not compressed at generation, or upon install.

An apk file itself is a variety of zip file; it's possible that the storage within is compressed (as unlike with some other parts of the package, the data has to be copied out as a plain file by the installer in order to be utilized), however any zip file tool will reverse that.

objdump (or at least the corresponding abi objdump from the ndk) will work on ndk libraries. For that matter, grep will as well.

However, you should note that the versions of libraries put into the apk's are stripped - which is to say that debug symbols and the names of functions which do not have any external linkage have been removed. To limit the size, any information which the toolchain knows for a fact to be unnecessary is gone, and that may well include the name of the function you are attempting to verify. You can find unstripped versions of the libraries under the project build directory.

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117
0

They're compressed when they're placed into the APK. APK is a renamed ZIP.

When you build, however, the library in (your project)/libs/(platform) is not compressed. It does not have debug symbols, though. The one in (your project)/obj/local/(platform) does have them. Sic objdump on that one.

Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281