blob: cb5c881fd3f1e95f20456127643d202fc84dd87b [file] [log] [blame]
Clay Murphy8aa3ad22014-11-26 16:59:21 -08001page.title=Security
Robert Ly35f2fda2013-01-29 16:27:05 -08002@jd:body
Robert Ly35f2fda2013-01-29 16:27:05 -08003<!--
Bert McMeen9cb839d2015-04-20 14:10:47 -07004 Copyright 2015 The Android Open Source Project
Robert Ly35f2fda2013-01-29 16:27:05 -08005
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17-->
Clay Murphy882fa882013-10-18 16:43:40 -070018<div id="qv-wrapper">
19 <div id="qv">
Clay Murphy06fe0992014-12-04 14:13:56 -080020 <h2>In this document</h2>
21 <ol id="auto-toc"></ol>
Clay Murphy882fa882013-10-18 16:43:40 -070022 </div>
23</div>
Clay Murphy06fe0992014-12-04 14:13:56 -080024
Robert Ly35f2fda2013-01-29 16:27:05 -080025<h2 id="introduction">Introduction</h2>
26<p>Android is a modern mobile platform that was designed to be truly open. Android
Clay Murphy8aa3ad22014-11-26 16:59:21 -080027 applications make use of advanced hardware and software, as well as local and
28 served data, exposed through the platform to bring innovation and value to
29 consumers. To protect that value, the platform must offer an application
30 environment that ensures the security of users, data, applications, the device,
31 and the network.</p>
Bert McMeen9cb839d2015-04-20 14:10:47 -070032<p>Securing an open platform requires a robust security architecture and
33 rigorous security programs. Android was designed with multi-layered
34 security that provides the flexibility required for an open platform, while
35 providing protection for all users of the platform. For information about
36 reporting security issues and the update process,
37 see <a href="{@docRoot}devices/tech/security/overview/updates-resources.html">Security Updates and Resources</a>.</p>
Robert Ly35f2fda2013-01-29 16:27:05 -080038<p>Android was designed with developers in mind. Security controls were designed
Clay Murphy8aa3ad22014-11-26 16:59:21 -080039 to reduce the burden on developers. Security-savvy developers can easily work
40 with and rely on flexible security controls. Developers less familiar with
41 security will be protected by safe defaults.</p>
Robert Ly35f2fda2013-01-29 16:27:05 -080042<p>Android was designed with device users in mind. Users are provided visibility
Clay Murphy8aa3ad22014-11-26 16:59:21 -080043 into how applications work, and control over those applications. This design
44 includes the expectation that attackers would attempt to perform common
45 attacks, such as social engineering attacks to convince device users to install
46 malware, and attacks on third-party applications on Android. Android was
47 designed to both reduce the probability of these attacks and greatly limit the
48 impact of the attack in the event it was successful.</p>
49<p>This documentation outlines the goals of the Android security program, describes the
50 fundamentals of the Android security architecture, and answers the most
51 pertinent questions for system architects and security analysts. This document
52 focuses on the security features of Android's core platform and does not
53 discuss security issues that are unique to specific applications, such as those
54 related to the browser or SMS application. Recommended best practices for
55 building Android devices, deploying Android devices, or developing applications
56 for Android are not the goal of this document and are provided elsewhere.</p>
Bert McMeen9cb839d2015-04-20 14:10:47 -070057
Clay Murphy8aa3ad22014-11-26 16:59:21 -080058<h2 id="background">Background</h2>
Robert Ly35f2fda2013-01-29 16:27:05 -080059<p>Android provides an open source platform and application environment for mobile
Clay Murphy8aa3ad22014-11-26 16:59:21 -080060 devices.</p>
61<p>The sections and pages below describe the security features of the Android
62 platform. <em>Figure 1</em> summarizes the security components and considerations of
63 the various levels of the Android software stack. Each component assumes that
64 the components below are properly secured. With the exception of a small amount
65 of Android OS code running as root, all code above the Linux Kernel is
66 restricted by the Application Sandbox.</p>
Heidi von Markham20981a82015-05-06 11:51:28 -070067<p><img alt="Figure 1: Android software stack" src="images/android_software_stack.png" /></p>
Robert Ly35f2fda2013-01-29 16:27:05 -080068<p><em>Figure 1: Android software stack.</em></p>
Clay Murphy8aa3ad22014-11-26 16:59:21 -080069<p>The main Android platform building blocks are:</p>
Robert Ly35f2fda2013-01-29 16:27:05 -080070<ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -080071 <li>
72 <p><strong>Device Hardware</strong>: Android runs on a wide range of hardware configurations
73 including smart phones, tablets, and set-top-boxes. Android is
74 processor-agnostic, but it does take advantage of some hardware-specific
75 security capabilities such as ARM v6 eXecute-Never.</p>
76 </li>
77 <li>
78 <p><strong>Android Operating System</strong>: The core operating system is built on top of
79 the Linux kernel. All device resources, like camera functions, GPS data,
80 Bluetooth functions, telephony functions, network connections, etc. are
81 accessed through the operating system.</p>
82 </li>
83 <li>
84 <p><strong>Android Application Runtime</strong>: Android applications are most often written
85 in the Java programming language and run in the Dalvik virtual machine.
86 However, many applications, including core Android services and applications
87 are native applications or include native libraries. Both Dalvik and native
88 applications run within the same security environment, contained within the
89 Application Sandbox. Applications get a dedicated part of the filesystem in
90 which they can write private data, including databases and raw files.</p>
91 </li>
Robert Ly35f2fda2013-01-29 16:27:05 -080092</ul>
Bert McMeen9cb839d2015-04-20 14:10:47 -070093<p>Android applications extend the core Android operating system. There are two
Clay Murphy8aa3ad22014-11-26 16:59:21 -080094 primary sources for applications:</p>
Robert Ly35f2fda2013-01-29 16:27:05 -080095<ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -080096 <li>
97 <p><strong>Pre-Installed Applications</strong>: Android includes a set of pre-installed
98 applications including phone, email, calendar, web browser, and contacts. These
99 function both as user applications and to provide key device capabilities that
100 can be accessed by other applications. Pre-installed applications may be part
101 of the open source Android platform, or they may be developed by an OEM for a
102 specific device.</p>
103 </li>
104 <li>
105 <p><strong>User-Installed Applications</strong>: Android provides an open development
106 environment supporting any third-party application. Google Play offers
107 users hundreds of thousands of applications.</p>
108 </li>
Robert Ly35f2fda2013-01-29 16:27:05 -0800109</ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -0800110<p>Google provides a set of cloud-based services that are available to any
Bert McMeen9cb839d2015-04-20 14:10:47 -0700111 compatible Android device. The primary services are:</p>
Robert Ly35f2fda2013-01-29 16:27:05 -0800112<ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -0800113 <li>
114 <p><strong>Google Play</strong>: Google Play is a collection of services that
115 allow users to discover, install, and purchase applications from their Android
Bert McMeen9cb839d2015-04-20 14:10:47 -0700116 device or the web. Google Play makes it easy for developers to reach Android
117 users and potential customers. Google Play also provides community review,
Clay Murphy8aa3ad22014-11-26 16:59:21 -0800118 application <a href="https://developer.android.com/guide/publishing/licensing.html">license
119 verification</a>, application security scanning, and other security services.</p>
120 </li>
121 <li>
122 <p><strong>Android Updates</strong>: The Android update service delivers new capabilities and
123 security updates to Android devices, including updates through the web or over
124 the air (OTA).</p>
125 </li>
126 <li>
127 <p><strong>Application Services</strong>: Frameworks that allow Android applications to use
128 cloud capabilities such as (<a href="https://developer.android.com/guide/topics/data/backup.html">backing
129 up</a>) application
130 data and settings and cloud-to-device messaging
131 (<a href="https://developers.google.com/android/c2dm/">C2DM</a>)
132 for push messaging.</p>
133 </li>
Robert Ly35f2fda2013-01-29 16:27:05 -0800134</ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -0800135<p>These services are not part of the Android Open Source Project and are out
Bert McMeen9cb839d2015-04-20 14:10:47 -0700136 of scope for this document. But they are relevant to the security of most
Clay Murphy8aa3ad22014-11-26 16:59:21 -0800137 Android devices, so a related security document titled “Google Services for
138 Android: Security Overview” is available.</p>
Bert McMeen9cb839d2015-04-20 14:10:47 -0700139
140