Decompile apk for Mac to obtain resource files and source code.

Source: Internet
Author: User

Decompile apk for Mac to obtain resource files and source code.
Preparations

  • Download decompilation tools apktool and dex2jar
  • Jar viewing tool jd-gui for mac
: Http://download.csdn.net/detail/linsen618/8668209
1. decompile the contributed source file
  • Open the terminal cd to the directory where apktool is stored (you can use ls to view the folder under the current directory, and then keep searching for cd to apktool)


  • Enter chmod + x apktool and modify apktool to be executable.
  • Input./apktool d xx.apk for decompilation



2. decompile the source code
  • Change the suffix of the APK file to. Zip and decompress it. Obtain the classes. dex file, which is compiled by the java source code and packaged by the dx tool.
  • Copy the classes. dex file to the folder where dex2jar is located.
  • Terminal cd to the dex2jar directory and run sh dex2jar. sh classes. dex
  • Generate classes_dex2jar.jar
  • Open the source code in jd gui.




  • Click jd-gui-0.3.5.osx.i686.dmg to open jd gui
  • Drag classes_dex2jar.jar to jd gui to view the source code.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.