Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build decompilation environment under Mac os

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how to build a decompilation environment under Mac os. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Installation environment

Establish a basic folder

Mkdir-p ~ / study/apkkiller/soft/bin

Mkdir-p ~ / study/apkkiller/soft/src

Mkdir-p ~ / study/apkkiller/output/

The installation file for andorid app is the apk package. To decompile the apk file, you need to download apktool and dex2jar, both of which are hosted on google code:

Http://code.google.com/p/android-apktool/

Http://code.google.com/p/dex2jar/

Find the download address from the above two pages, and here we find the download address of apktool1.5.2 and dex2jar-0.0.9.15:

Cd ~ / study/apkkiller/soft/src

Wget http://android-apktool.googlecode.com/files/apktool1.5.2.tar.bz2

Wget http://dex2jar.googlecode.com/files/dex2jar-0.0.9.15.zip

After decompression, the files are stored in the following directory:

~ / study/apkkiller/soft/src/apktool1.5.2

~ / study/apkkiller/soft/src/dex2jar-0.0.9.15

For ease of use, establish two soft connections:

Ln-s ~ / study/apkkiller/soft/src/apktool1.5.2/apktool.jar ~ / study/apkkiller/soft/bin/apktool

Ln-s ~ / study/apkkiller/soft/src/dex2jar-0.0.9.15/dex2jar.sh ~ / study/apkkiller/soft/bin/dex2jar

Test decompilation environment

Let's start decompiling our test apk file to see if the environment is working properly

Cd ~ / study/apkkiller mkdir-p ~ / study/apkkiller/output/test/source mkdir-p ~ / study/apkkiller/output/test/result cp. / test.apk. / output/test/source/test.zip-d. / output/test/source/test cp. / output/test/source/test/classes.dex. / output/test/source/classes.dex ~ / study/apkkiller/soft/bin/dex2jar. / output/test/source/classes. Dex # output. / output/test/source/classes_dex2jar.jar

To view the decompiled file, download the jd-gui tool and open the. / output/test/source/classes_dex2jar.jar file generated above, which exports all the source packages. Download jd-gui from the following address:

Http://jd.benow.ca/

Http://jd.benow.ca/jd-gui/downloads/jd-gui-0.3.5.osx.i686.dmg

The resource files of apk are stored in the folder we extracted above. / output/test/source/test, there are a lot of xml files, but they are encrypted and cannot be viewed directly. At this point, you need to use the apktool tool:

Java-jar ~ / study/apkkiller/soft/bin/apktool d. / test.apk. / output/test/source/test_resource

Merge the exported source code and resource files and get the results we want.

This is the end of this article on "how to build a decompilation environment under Mac os". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report