Analyst android ELF dependency-graph by elf-dependency-walker

Someone asked me in email about using elf-dependency-walker to analyst library or executable in linux. I found out android is using ELF format for its libraries or executables too. So the rest is simple. Please download the android emulator, within the directory there is the system image, which contain the file system.

system image
system image

You can see in the above graph, it is a file called “system.img”. It is the file system image in ext4 format. So you can mount it by this command:

mkdir temp
mount -o loop system.img temp
mount it
mount it

Now, cd to the temp directory, you can see all android files in there.

change the lookup directory path in elf-dependency-wwalker
change the lookup directory path in elf-dependency-wwalker

Just start elf-dependency-walker by “java -jar elf-dependency-walker.jar”. You can download it in https://code.google.com/p/elf-dependency-walker. Click on “Setting”, and place the full path of your mounted directory (The directory you mounted to your android fs) in it.

select any executable/library from the android fs
select any executable/library from the android fs

Click “Analyst” button, choose any file (must be elf format file).

eld chart is generated
eld chart is generated

It will analyst the dependency for you.

Leave a Reply

Your email address will not be published. Required fields are marked *