Learn by using Apktool to get pictures and layout resources in other people's apps

Source: Internet
Author: User

When we see an app with a nice UI layout and want to understand how others are doing it, you can use the Apktool tool to decompile other people's apk to get pictures and layout resources to learn.


In fact, we downloaded the Android app, you can directly change the suffix name to zip, and then extract the zip to get the corresponding file directory


Where res is all resource files, Meta-inf is the signature information, Classes.dex is the Java source code generated after compiling the bytecode.

Originally thought so easy can get someone else's layout source, actually otherwise, point open res/layout under a layout file to see




And then found that there are XML files compiled machine code. So how do you get someone else's layout file? At this time, Apktool will come in handy.


First download the installation Apktool:

: http://ibotpeaches.github.io/Apktool/install/


Download the corresponding version

1. Save the wrapper script right-click on the connection to get the Apktool.bat file,

2. Download the latest version of the Apktool.jar package in Https://bitbucket.org/iBotPeaches/apktool/downloads as now the newest apktool_2.1.0.jar, and remove the version number with the duplicate name Apktool.jar

3. Place the Apktool.bat, Apktool.jar, and apk files you want to compile in the same folder

4. Run apktool.bat d-f [apk file] [output folder] through cmd into the corresponding directory to get the corresponding layout resource file, as follows



At this point open res file directory will find a lot of ABC and notfication beginning files, these files are automatically generated, not the developer really write layout files, we need to look at other XML files, such as the yellow section.


Click Open to see the corresponding XML layout source.



If you want to see others Java source code, learn the realization of other people's functions, it is necessary to use Dex2jar and Jd-gui,

Where Dex2jar can convert the apk into a zip-pressurized classes.dex file to be compiled into a jar file.

Jd-gui: You can view the Dex2jar converted jar file, which is the Java source code we want.


To see the detailed use of the reference:Android apk Anti-compilation detailed


Reprint Please specify Source:http://blog.csdn.net/fzw_faith/article/details/51188815

Learn by using Apktool to get pictures and layout resources in other people's apps

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.