Use Android-apktool to reverse (decompile) APK Package Method Introduction _android

Source: Internet
Author: User
Tags unpack

Google official provides apktool can reverse has been released APK application, that is, the reverse compilation has been packaged successfully apk files, use it can be compiled into a very close to the original packaging before the format, for APK, can be specific reverse androidmanifest.xml, Resource file RESOURCES.ARSC and decompile the Dex file into a Smali file that can be debugged.

Warnning

But Apktool does not mean that it can be used to violate the works of former authors, so users of the Apktool tool do not use it for improper, illegal use.

It isn't intended for piracy and other Non-legal uses. It could be used to localizing, adding some features or support for custom platforms and other good purposes. Just try to is fair with authors of the An app, which you use and probably like.

About Apktool

1. Decompile the resource files into the original format (including RESOURCES.ARSC, xmls and 9.png files) and reconstruct them;
2, Smali debugging:smalidebugging has not supported, guess that another type of dex2jar tool rise too fast, can be the Dex file directly decompile into a jar;
3, more about Apktool.

Using Apktool

Walfred feel apktool At present the biggest function is can reverse androidmanifest.xml, resource file RESOURCES.ARSC, here simply use Apktool to reverse a simple Hello program.

If you already have an Android development environment you can quickly use the apktool, assuming you can use Apktool directly.

Anti-compile decode

Copy Code code as follows:

walfred@ubuntu:~/lab/apktool$ Apktool D helloourandroid.apk


At this point we can see that the Helloourandroid/folder has been generated in the current directory, so let's look at the Androidmanifest.xml and Strings.xml files below:
The Androidmanifest.xml file is almost exactly the same as it was under the project, so we can check all the permissions on the Android application.

You can also view the contents of these hardcode:

Rebuild re-packaging
To repackage the helloourandroid.apk that has just been modified, we will modify the "Hello" in the Strings.xml directory as follows: hello,ourunix!

Then use Apktoo to repackage the following commands:

Copy Code code as follows:

walfred@ubuntu:~/lab/apktool$ Apktool b helloourandroid

Finally will be recompiled after the APK to be able to run, of course, if you do not want so troublesome to unpack look, aapt this tool can do similar functions Oh, but the biggest feature is that aapt do not need to unpack.

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.