How to steal an Android-APK File

Source: Internet
Author: User

1. First, build the JDK environment. (Download here)

After the download, click Install. Then set the runtime environment parameters:

Right-click my computer and choose Properties> advanced> environment variables.
System variable-> New-> variable name: java_home variable value: C: \ Program Files \ Java \ jdk1.7.0
System variable-> edit-> variable name: path is added at the beginning of the variable value: % java_home % \ bin; (if a path item already exists, you do not need to create a new one, add directly to the backend, but use it; separate it from the existing items)
System variable-> New-> variable name: classpath variable value:
.; % Java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tools. jar;
Finally, test whether the environment variables are set successfully.

Click Start Menu-run-Enter cmd-press ENTER-enter javac

1. If the following information appears:

Usage: javac <option> <Source File>
Possible options include:
......

Congratulations, your Java environment variable configuration is successful!

2. if:

'Javac' is neither an internal or external command nor a running program.
Or batch files.

This shows that the Java environment variable configuration has failed. Check it carefully!

Ii. apktools Toolkit (including the apktools decompilation tool and apksign signature tool ). Download the notepad Code Editor (smali and XML files can be modified ).

Before modification, you should first have an understanding of the internal structure of the APK file:

Global configuration file of androidmanifest. xml Program
Classes. Dex this is the Dalvik bytecode
Resources. ARSC compiled binary resource file
META-INF \ This directory stores signature information
Res \ This directory stores resource files
Assets \ This directory can store some configuration files

Make some basic comments and introductions to these files and directories:

• Androidmanifest. xml
This file is a file that every application must define and contain. It describes the name, version, permission, and referenced library file of the application. You must unpack the package before reading it.
• Classes. Dex File
Classes. Dex is a Java bytecode file generated after Java source code compilation. Dex is the full name of Dalvik VM executes, that is, the android Dalvik execution program, not the Java me bytecode but the Dalvik bytecode.
• Resources. ARSC
The compiled binary resource file.
• META-INF catalog
The META-INF directory stores signature information to ensure the integrity of the APK package and system security. When eclipse compiles an APK package, it will do a verification calculation for all the files to be packaged, and put the calculation result under the META-INF directory. This ensures that the files in the APK package cannot be replaced at will. For example, after obtaining an APK package, if you want to replace an image, a piece of code, or a piece of copyright information, it is basically impossible to directly decompress, replace, and re-package the package. This increases the difficulty of virus infection and malicious modification, and helps protect the security of the system.
• Res directory
The res directory stores resource files. Including images and strings.
After unpacking, almost all possible modifications and edits are here.
• Assets Directory
The Assets Directory can store some configuration files. The content of these files can be obtained through related APIs during the program running.

The specific modification is available on the Internet!

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.