Application Fundamentals

Android apps can be written using Kotlin, Java, and C++ languages. The Android SDK tools compile your code along with any data and resource files into an APK, an Android package, which is an archive file with an .apk suffix. One APK file contains all the contents of an Android app and is the file that Android-powered devices use to install the app.

Each Android app lives in its own security sandbox, protected by the following Android security features:

Ø  The Android operating system is a multi-user Linux system in which each app is a different user.

Ø  By default, the system assigns each app a unique Linux user ID (the ID is used only by the system and is unknown to the app). The system sets permissions for all the files in an app so that only the user ID assigned to that app can access them.

Ø  Each process has its own virtual machine (VM), so an app's code runs in isolation from other apps.

Ø  By default, every app runs in its own Linux process. The Android system starts the process when any of the app's components need to be executed, and then shuts down the process when it's no longer needed or when the system must recover memory for other apps.

The Android system implements the principle of least privilege. That is, each app, by default, has access only to the components that it requires to do its work and no more. This creates a very secure environment in which an app cannot access parts of the system for which it is not given permission. However, there are ways for an app to share data with other apps and for an app to access system services:

The rest of this document introduces the following concepts:

Ø  The core framework components that define your app.

Ø  The manifest file in which you declare the components and the required device features for your app.

Ø  Resources that are separate from the app code and that allow your app to gracefully optimize its behaviour for a variety of device configurations.