简体   繁体   中英

How to get source code of .so file in android

I want to see source code of shared object library (so) file in android. how can i convert .so binary file to native c/c++ code.

The purpose of making an so file is to NOT share the source code, no matter if it is android or not. This is intentionally designed this way so as not to open the design. Following this, many firms share .so file (machine instructions) keeping their design confidential.

However, if you are keen to know what the .so file contains, you may read the ELF (Executable and Linkable Format) of the library. command

readelf -a yourLibraryName.so > yourLibraryName_elf.txt

The output contains symbol table. You may search for the function names, global variables etc from the generated text file.

More details of the contects here http://www.skyfree.org/linux/references/ELF_Format.pdf

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM