Everything you need to know about Android APK
The APK file format is default application package format used by operating system for smart phones and tablet computers called Google Android. Android APK archive contains all important data to run Android application stored in it.
The main source of applications for Android is Google Play (Previously Android Market), which is an application installed in the clean installation of Google Android, but users can also access it through web browser.
Useful information about Android packages
Default location of APK archives
- Pre-installed Android APKs are stored in the /system/app folder.
- User installed APKs are stored in the /data/app folder.
To manage installed applications in Android go to the Menu → Settings → Applications → Manage applications.
To view Android directory structure, you need to install Android file manager to system, such as Astro Explorer or Root Explorer.
Android application package structure
APK application package uses ZIP compression format, which is widely supported and ZIP archives are openable in a variety of operating systems, or compression utilities. To view the content of APK archive simply rename its APK file extension to ZIP and open it.
The structure of APK file after compilation:
- assets folder contains documents in HTML format that inform about application, license information, FAQ etc.
- META-INF folder contains data that are used to ensure the integrity of the APK package and system security. There are several files in the META-INF folder namely: CERT.RSA, CERT.DSA, CERT.SF and MANIFEST.MF.
- res folder contains resource files, such as graphics, sounds, settings etc..
- AndroidManifest.xml file contains information about name, version, access rights, also references to library files and other.
- classes.dex is Dalvik virtual machine executable file. This file contains compiled Java source codes. DEX file can be executed only in Dalvik virtual machine and Java Runtime Environment cannot run DEX files.
- resource.arsc is binary resource file after compilation.
Integrated development environments recommended by Google for development of applications for Android operating system are Eclipse with ADT Plugin and IntelliJ IDEA.
Other Android development tools, such as Android SDK and Android SDK Tools, are downloadable from Google Android developer website.
Installation of Android applications to memory card
This feature is supported since Android version 2.2 Froyo. Applications installed on the memory card are encrypted and stored in the .android_secure folder. Encrypted Android applications have the ASEC file extension. However, installation to memory card has to be also supported in the Android app.
Note: For older versions of Android (pre 2.1), this was only possible by rooting your device.
To move it to the memory card, go to the Menu ► Settings Applications ► Manage applications and tap on application and select Move to SD card option.
Move to SD card option in Android
Installation of Android applications via USB cable
To install applications downloaded as APK file from the Internet, you need a memory card inserted in the device and of course some file explorer installed. To install APK file via USB follow these few steps:
- Connect phone to USB port as a Mass Storage Device
- Open the memory card in Windows' explorer or Mac Finder and copy APK file to the card
- Disconnect the phone and open file explorer installed in phone
- Go to the /sdcard, or /mnt/sdcard folder, tap on the APK file and select Open App Manager option
Open APK file options in Astro Explorer
Some producers disable application installation service via USB in their phones. To enable this option, go to the Settings → Applications and set the Unknown sources option to enabled.
Unknown sources option in Application settings
If you are interested in development of Google Android applications, visit the Android developer website, which contains detailed instructions, sample codes, articles and other tutorials.