What is an APK file? What is the relationship between him and Android phones?
APK is the abbreviation of Android package, that is, the android installation package. APK is a file format similar to Symbian sis Or sisx. Directly upload the APK file to the android simulator or Android mobile phone for installation.
The APK file is actually in ZIP format, but its suffix is changed to APK. After unzip is decompressed, you can see the DEX file. Dex is the full name of Dalvik VM executes, that is, Android Dalvik execution.ProgramNot Java me bytecode, but Dalvik bytecode.
The structure of an APK file is:
The mete-INF \ JAR file is often seen
Res \ directory for storing resource files
Global configuration file of androidmanifest. xml Program
Classes. Dex Dalvik bytecode
Resources. ARSC compiled binary resource file
In summary, we found that android requires unzip before running a program, and then is as direct as Symbian. It is different from the PE file in Windows Mobile. In this way, the confidentiality and reliability of the program are not very high, the dexdump command can be used for decompilation, but this is in line with the development rules. Microsoft's Windows Gadgets or WPF also adopts this architecture.
In the Android platform, the Dalvik VM execution file is packaged into the APK format. The loader decompress the package and then obtains the compiled androidmanifest. security Access related to the permission branch in the XML file, but there are still many security restrictions. If you upload the APK file to the/system/APP folder, you will find that the execution is unrestricted. In the end, the files we usually install may not be in this folder, but the APK files in the android Rom system will be placed in this folder by default, and they have the root permission.