Android decompilation tool apktool

Source: Internet
Author: User

This tool is an open-source project. The address is:

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

 

I download the apktool-install-linux-r04-brut1.tar.bz2and apktool1.4.1.tar.bz2 files on the ubuntuplatform, and decompress them to obtain the apktool. jar, aapt (binary executable file), and apktool (shell file). Copy these three files to the/usr/local/bin directory (root permission is required ).

Make sure that the system's Java commands are of Java 1.6.

 

In this way, you can use the apktool command in the system.

Run:

Apktool

You can get help information.

 

Decompilation crasher.apk:

Apktool crasher.apk

Decompile and get the crasher folder in the current directory.

Supplement: 2011.7.26

The Code decompiled by the previous method is poorly readable. For example, the following is a decompiled Java method:

.method public restartGL(Landroid/view/SurfaceHolder;)Ljavax/microedition/khronos/opengles/GL;    .locals 1    invoke-direct {p0}, Lcom/ideaworks3d/airplay/AirplayGL;->stop()V    iget v0, p0, Lcom/ideaworks3d/airplay/AirplayGL;->m_GLVersion:I    invoke-virtual {p0, p1, v0}, Lcom/ideaworks3d/airplay/AirplayGL;->startGL(Landroid/view/SurfaceHolder;I)Ljavax/microedition/khronos/opengles/GL;    move-result-object v0    return-object v0.end method

It is not easy to understand. baksmali. jar is also useful on the Internet. In fact, apktool encapsulates baksmali. jar, which is the same thing. Refer to this document:
Android reverse APK Program (androidmanifest. xml and Class. Dex)
Http://blog.csdn.net/Zengyangtech/article/details/5807517

The following method is exactly used:
Use dex2jar to convert the APK file to jar, and then use JD-Gui to convert the JAR file to. java. Both tools are open-source projects, including Windows and Linux.
Http://code.google.com/p/dex2jar/
Http://java.decompiler.free.fr /? Q = jdgui
The specific use method is very simple, without any settings. See the document for reference: Android decompiling APK to Java source code
Http://blog.csdn.net/Zengyangtech/article/details/5967263

This is the result of decompilation.

private void stop()  {    this.m_Started = 0;    if (this.m_EglSurface == null)      return;    EGL10 localEGL101 = this.m_Egl;    EGLDisplay localEGLDisplay1 = this.m_EglDisplay;    EGLSurface localEGLSurface1 = EGL10.EGL_NO_SURFACE;    EGLSurface localEGLSurface2 = EGL10.EGL_NO_SURFACE;    EGLContext localEGLContext = EGL10.EGL_NO_CONTEXT;    boolean bool1 = localEGL101.eglMakeCurrent(localEGLDisplay1, localEGLSurface1, localEGLSurface2, localEGLContext);    EGL10 localEGL102 = this.m_Egl;    EGLDisplay localEGLDisplay2 = this.m_EglDisplay;    EGLSurface localEGLSurface3 = this.m_EglSurface;    boolean bool2 = localEGL102.eglDestroySurface(localEGLDisplay2, localEGLSurface3);    this.m_EglSurface = null;  }

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.