Cause Last week I was working on the factory push feature for Android, and certain models could not be factory pushed offline, so I was ready to unpack the apk to see if something was wrong with the packing parameters.
Preface. In Android development, we may need to jump from our own application to another application’s interface, but in the case of not knowing another application’s package name as well as the class name, it is very difficult to do this, there is a simplest way is to download the application’s apk file, and then change the extension name to zip or rar, and then unpack the file afterward, in the unpacked file, there will be a AndroidManifest.xml file, but after opening, it may be garbled, which is embarrassing, how to do?
AXMLPrinter2.jar is a commonly used apk decompiler tool, mainly used to decompile the apk file, including package name, version number and icon and other information, you can use AXMLPrinter2 on androidmanifest.xml decompiler for plaintext view.
**How to use ** 1, download the tool AXMLPrinter2.jar tool address: https://code.google.com/archive/p/android4me/downloads 2, to view the AndroidManfist.xml file copied to the same folder as the tool 3, in the current folder to open a DOS window 4, the implementation of the following command
java -jar AXMLPrinter2.jar AndroidManifest.xml » AndroidManifest.txt
After executing this command, an AndroidManifest.txt file will be generated in the folder, which is the decoded file.
Of course, there may be some execution will report an error: ‘java’ is not an internal or external command, nor is it a runnable program or batch file. This is because the Java environment is not installed or environment variables are not configured.
**Installing the JDK First, let’s review the process of installing the JDK.
1. Download the JDK and install it
JDK1.6, 1.7, 1.8 you can choose to download, want to use which directly download which it! Download JDK from the official website https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Installation is very simple, brainless next operation on the line, will not repeat here!
2. Configure JDK environment variables
(1) right-click on the computer in the “My Computer”, Win10 for “this computer”, select “Properties”, select Advanced System Settings, in the new interface, select the “Environment Variables”, we only edit the “System Variables” on it. “Environment Variables”, we only edit the “System Variables” on it!
We can edit only the “System Variables”.
(2) Click New to add a variable named “JAVA_HOME”, the variable value is “C:\\Program Files\\\Java\\jdk1.8.0_60”, the value of this is the value of your installation of the JDK! This value is the path to the JDK you installed, where you installed it, just use that address.
and then create a new variable named “CLASSPATH”, the variable value is “. ;%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar” variable, and determine to save, pay attention to the value of “. ;” do not miss the value of each symbol can not be missing!
The most critical step is here, find out if there is a variable called “path”, both upper and lower case, if there is not, then create a new one, if there is, then directly point to edit. If there is already a variable called “path”, there must be some content stored in it, we don’t care about it, in order to make it more convenient to edit, let’s copy the value of the variable out first.
Then paste the content into a text editor, and add “%JAVA_HOME%\bin;%JAVA_HOME%\jre\\bin;” at the top of the content, the result is as follows
Then copy the entire value and paste it into the previously edited variable value, OK to save.
Review the steps above, in which a total of three values are added: JAVA_HOME: C:\\Program Files\\Java\jdk1.8.0_60 CLASSPATH: . ;%JAVA_HOME%/lib/dt.jar;%JAVA_HOME%/lib/tools.jar PATH: %JAVA_HOME%\\bin;%JAVA_HOME%\\jre\\bin;.
The following is to verify that the installation was successful
Win+R to open Run, type cmd to open the command line. Input “java”, the normal will display a large number of operation prompts Type “java -version” , normal will show you the version number of the installed java information Type “javac”, it will show you some usage of javac.
The end of sprinkle flowers!