プラットフォーム アーキテクチャ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
Android は、さまざまなデバイスとフォーム ファクタ用に作成された、Linux ベースのオープンソース ソフトウェア スタックです。図 1 に、Android プラットフォームの主なコンポーネントを示します。
図 1. Android ソフトウェア スタック。
Linux カーネル
Android プラットフォームの基盤は Linux カーネルです。たとえば、Android ランタイム(ART)は、基本機能(スレッド化や低レベルのメモリ管理など)について Linux カーネルに依存しています。
Linux カーネルを使用すると、Android は主要なセキュリティ機能を活用でき、デバイス メーカーはよく知られたカーネル用のハードウェア ドライバを開発できます。
Hardware Abstraction Layer(HAL)
Hardware Abstraction Layer(HAL)は、デバイスのハードウェア機能を上位レベルの Java API フレームワークに公開するための標準インターフェースを提供します。HAL は複数のライブラリ モジュールで構成され、各ライブラリ モジュールには、カメラや Bluetooth モジュールなど、特定の種類のハードウェア コンポーネント用のインターフェースが実装されています。フレームワーク API がデバイス ハードウェアにアクセスするための呼び出しを行うと、Android システムはそのハードウェア コンポーネントのライブラリ モジュールを読み込みます。
Android ランタイム
Android バージョン 5.0(API レベル 21)以降を搭載しているデバイスの場合、各アプリは独自のプロセスと、独自の Android ランタイム(ART)のインスタンスで実行されます。ART は、Dalvik Executable 形式(DEX)ファイルを実行することにより、低メモリデバイスで複数の仮想マシンを実行するように書き込まれます。DEX は、Android 用に設計されたバイトコード形式であり、メモリ使用量を最小限に抑えるよう最適化されています。d8
などのビルドツールは、Java ソースを Android プラットフォームで実行可能な DEX バイトコードにコンパイルします。
ART の主な特長は次のとおりです。
- 事前(AOT)コンパイルとジャストインタイム(JIT)コンパイル
- 最適化されたガベージ コレクション(GC)
- Android 9(API レベル 28)以降の場合、アプリ パッケージの DEX ファイルを、よりコンパクトなマシンコードに変換する
- デバッグ サポートの強化(専用のサンプリング プロファイラ、詳細な診断例外とクラッシュ レポート、特定のフィールドをモニタリングするためのウォッチポイントの設定機能など)
Android 5.0(API レベル 21)より前のバージョンでは、Dalvik が Android ランタイムでした。ART でアプリが正常に動作する場合は Dalvik でも動作しますが、その逆は当てはまらない場合があります。
Android には、Java API フレームワークが使用する Java 8 言語機能など、Java プログラミング言語のほとんどの機能を提供する基本的なランタイム ライブラリのセットも含まれています。
ネイティブ C/C++ ライブラリ
ART や HAL などの主要な Android システム コンポーネントとサービスの多くは、C や C++ で記述されたネイティブ ライブラリを必要とするネイティブ コードからビルドされています。Android プラットフォームには、これらのネイティブ ライブラリの一部をアプリに公開するための Java フレームワーク API が用意されています。たとえば、Android フレームワークの Java OpenGL API を介して OpenGL ES にアクセスすると、2D および 3D グラフィックの描画と操作のサポートを追加することができます。
C または C++ コードを必要とするアプリを開発している場合は、Android NDK を使用して、こうしたネイティブ プラットフォーム ライブラリの一部にネイティブ コードから直接アクセスできます。
Java API フレームワーク
Android OS の機能セット全体は、Java 言語で記述された API を介して利用できます。次のような主要なモジュラー システム コンポーネントやサービスの再利用を簡素化できるため、これらの API は Android アプリの作成に必要な構成要素となっています。
デベロッパーは、Android システムアプリが使用するのと同じフレームワーク API のすべてにアクセスできます。
システムアプリ
Android には、メール、SMS メッセージ、カレンダー、インターネット ブラウジング、連絡先などの主要アプリのセットが用意されています。プラットフォームに含まれるアプリは、ユーザーがインストールしたアプリに対して特別なステータスを持つわけではありません。そのため、サードパーティ アプリをユーザーのデフォルトのウェブブラウザ、SMS メッセンジャー、さらにはデフォルトのキーボードにすることができます。ただし、システムの設定アプリなど、一部の例外が適用されます。
システムアプリは、ユーザー向けのアプリとして機能し、デベロッパーが独自のアプリからアクセスできる主要な機能を提供します。たとえば、アプリで SMS メッセージを配信する場合、その機能を自身で構築する必要はありません。代わりに、インストール済みの SMS アプリのいずれかを呼び出して、指定した受信者にメッセージを配信できます。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2025-07-27 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-27 UTC。"],[],[],null,["# Platform architecture\n\nAndroid is an open source, Linux-based software stack created for a wide\narray of devices and form factors. Figure 1 shows the major\ncomponents of the Android platform.\n\n\n**Figure 1.** The Android software stack.\n\nLinux kernel\n------------\n\n\nThe foundation of the Android platform is the Linux kernel. For example,\n[the Android Runtime (ART)](#art) relies on the Linux kernel for\nunderlying functionalities such as threading and low-level memory management.\n\n\nUsing a Linux kernel lets Android take advantage of [key\nsecurity features](https://source.android.com/security/overview/kernel-security.html) and lets device manufacturers develop hardware\ndrivers for a well-known kernel.\n\nHardware abstraction layer (HAL)\n--------------------------------\n\n\nThe [hardware abstraction layer (HAL)](https://source.android.com/devices/architecture/hal) provides standard interfaces that expose\ndevice hardware capabilities to the higher-level [Java API framework](#api-framework). The HAL consists of multiple library\nmodules, each of which implements an interface for a specific type of hardware\ncomponent, such as the [camera](https://source.android.com/devices/camera/index.html) or [Bluetooth](https://source.android.com/devices/bluetooth.html) module.\nWhen a framework API makes a call to access device hardware, the Android\nsystem loads the library module for that hardware component.\n\nAndroid runtime\n---------------\n\n\nFor devices running Android version 5.0 (API level 21) or higher, each app\nruns in its own process and with its own instance of the [Android Runtime\n(ART)](https://source.android.com/devices/tech/dalvik/index.html). ART is written to run multiple virtual machines on low-memory\ndevices by executing Dalvik Executable\nformat (DEX) files, a bytecode format designed specifically for\nAndroid that's optimized for a minimal memory footprint. Build tools, such\nas [`d8`](/studio/command-line/d8), compile\nJava sources into DEX bytecode, which can run on the Android platform.\n\n\nSome of the major features of ART include the following:\n\n- Ahead-of-time (AOT) and just-in-time (JIT) compilation\n- Optimized garbage collection (GC)\n- On Android 9 (API level 28) and higher, [conversion](/about/versions/pie/android-9.0#art-aot-dex) of an app package's DEX files to more compact machine code\n- Better debugging support, including a dedicated sampling profiler, detailed diagnostic exceptions and crash reporting, and the ability to set watchpoints to monitor specific fields\n\n\nPrior to Android version 5.0 (API level 21), Dalvik was the Android runtime.\nIf your app runs well on ART, then it can work on Dalvik as well, but\n[the reverse might not be\ntrue](/guide/practices/verifying-apps-art).\n\n\nAndroid also includes a set of core runtime libraries that provide most of\nthe functionality of the Java programming language, including some [Java 8 language features](/guide/platform/j8-jack), that the Java\nAPI framework uses.\n\nNative C/C++ libraries\n----------------------\n\n\nMany core Android system components and services, such as ART and HAL, are\nbuilt from native code that requires native libraries written in C and C++.\nThe Android platform provides Java framework APIs to expose the functionality\nof some of these native libraries to apps. For example, you can access\n[OpenGL ES](/develop/ui/views/graphics/opengl/about-opengl) through the\nAndroid framework's [Java OpenGL API](/reference/android/opengl/package-summary) to add\nsupport for drawing and manipulating 2D and 3D graphics in your app.\n\n\nIf you are developing an app that requires C or C++ code, you can use the\n[Android NDK](/ndk) to access some of these [native platform libraries](/ndk/guides/stable_apis) directly from\nyour native code.\n\nJava API framework\n------------------\n\n\nThe entire feature-set of the Android OS is available to you through APIs\nwritten in the Java language. These APIs form the building blocks you need to\ncreate Android apps by simplifying the reuse of core, modular system\ncomponents and services, which include the following:\n\n- A rich and extensible [view\n system](/guide/topics/ui/overview) you can use to build an app's UI, including lists, grids, text boxes, buttons, and even an embeddable web browser\n- A [resource manager](/guide/topics/resources/overview), providing access to non-code resources such as localized strings, graphics, and layout files\n- A [notification\n manager](/guide/topics/ui/notifiers/notifications) that enables all apps to display custom alerts in the status bar\n- An [activity manager](/guide/components/activities/intro-activities) that manages the lifecycle of apps and provides a common [navigation back stack](/guide/components/tasks-and-back-stack)\n- [Content\n providers](/guide/topics/providers/content-providers) that enable apps to access data from other apps, such as the Contacts app, or to share their own data\n\n\nDevelopers have full access to the same [framework APIs](/reference/packages) that Android system apps use.\n\nSystem apps\n-----------\n\n\nAndroid comes with a set of core apps for email, SMS messaging, calendars,\ninternet browsing, contacts, and more. Apps included with the platform have\nno special status among the apps the user chooses to install. So, a\nthird-party app can become the user's default web browser, SMS messenger, or\neven the default keyboard. Some exceptions apply, such as the system's\nSettings app.\n\n\nThe system apps function both as apps for users and to provide key\ncapabilities that developers can access from their own app. For example, if\nyou want your app to deliver SMS messages, you don't need to build that\nfunctionality yourself. You can instead invoke whichever SMS app is already\ninstalled to deliver a message to the recipient you specify."]]