How to view the Android version supported by the apk and the apkandroid version

Source: Internet
Author: User

How to view the Android version supported by the apk and the apkandroid version

If there is an apk, you need to know what the Android version is at least supported by its installation. How should I check it?

Change the apk suffix to rar or zip to pull AndroidManifest. xml? No. AndroidManifest. xml has been compiled, and many of the content has been changed to binary.

In fact, you can use the built-in Android tool to enter the Android SDK directory.

Take cd sdk \ build-tools \ android-4.4.2 as an example. You can refer to your own platform version.

Aapt.exe list-a someapk.apk> apkversion.txt

After that, open apkversion.txt and search for similar applications.

MinSdkVersion. Here, for example, we can see that this is 0xf, that is, 15

E: uses-sdk (line = 8)
A: android: minSdkVersion (0x0101020c) = (type 0x10) 0xf


You can refer to the following link for the Android version 15:

Android version and API Level


How to view the source code of the android apk program?

Copy the apk file to sdcard.
The command order is as follows:

Go to the Android sdk Folder/tools directory
Enter adb shell
Input su
Input cd data
Enter the cd app
Then you can see all the apk files you have installed. Enter the apk space corresponding to the cp space/sdcard/
In this way, the apk file is copied out.
Convert the suffix of the apk file to the rar format. You can see the familiar directory structure,

The xml files are both binary and cannot be viewed.
In this case, an AXMLPrinter2 tool for android4me is used. (Please search Baidu by yourself)
Enter the following command to parse the xml file
Java-jar AXMLPrinter2.jar showtimes_list.xml
This command is used to view the showtimes_list.xml in the command line.
Run the following command to generate an xml file from showtimes_list.xml:
Java-jar AXMLPrinter2.jar showtimes_list.xml> h. xml
At this step, we can only see the content of the xml file, but still cannot see the java source file in the project. There is a classes under the directory structure. dex file. We need to change the dex file to a jar file.
Another tool dex2jar is used here. (Search and download by yourself)
The decompressed directory in Windows is shown in:

In the command line, go to this directory:
In Windows, enter the following command:
Dex2jar. bat c: \ classes. dex
After running, one more classes. dex. dex2jar. jar file will be added to drive C. This file is the jar file we need.
Use jd-gui to reverse engineer the jar file into java code. (Please search and download it by yourself)
It is divided into three versions: Windows, Linux, and max. Here I download the Windows version.
After decompression, double-click the exe file and select the classes. dex. dex2jar. jar file. The Java file in the corresponding jar file will be displayed by Reverse Engineering!

How does android install the apk extracted from other versions of the system to its own mobile phone

Different versions, the built-in installer should be related to its underlying implementation. Even if it can be installed, it may not be able to run normally. simply use the next third-party SMS management software.

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.