blob: b8b7dd86a30475738113042d5239a9da604b8dfc [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<!--
Clay Murphy8aa3ad22014-11-26 16:59:21 -08004 Copyright 2014 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 Murphy8aa3ad22014-11-26 16:59:21 -080020 <h3>In this document</h3>
Clay Murphy882fa882013-10-18 16:43:40 -070021 <ol id="auto-toc">
22 </ol>
23 </div>
24</div>
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>
Robert Ly35f2fda2013-01-29 16:27:05 -080032<p>Securing an open platform requires a robust security architecture and rigorous
Clay Murphy8aa3ad22014-11-26 16:59:21 -080033 security programs. Android was designed with multi-layered security that
34 provides the flexibility required for an open platform, while providing
35 protection for all users of the platform.</p>
Robert Ly35f2fda2013-01-29 16:27:05 -080036<p>Android was designed with developers in mind. Security controls were designed
Clay Murphy8aa3ad22014-11-26 16:59:21 -080037 to reduce the burden on developers. Security-savvy developers can easily work
38 with and rely on flexible security controls. Developers less familiar with
39 security will be protected by safe defaults.</p>
Robert Ly35f2fda2013-01-29 16:27:05 -080040<p>Android was designed with device users in mind. Users are provided visibility
Clay Murphy8aa3ad22014-11-26 16:59:21 -080041 into how applications work, and control over those applications. This design
42 includes the expectation that attackers would attempt to perform common
43 attacks, such as social engineering attacks to convince device users to install
44 malware, and attacks on third-party applications on Android. Android was
45 designed to both reduce the probability of these attacks and greatly limit the
46 impact of the attack in the event it was successful.</p>
47<p>This documentation outlines the goals of the Android security program, describes the
48 fundamentals of the Android security architecture, and answers the most
49 pertinent questions for system architects and security analysts. This document
50 focuses on the security features of Android's core platform and does not
51 discuss security issues that are unique to specific applications, such as those
52 related to the browser or SMS application. Recommended best practices for
53 building Android devices, deploying Android devices, or developing applications
54 for Android are not the goal of this document and are provided elsewhere.</p>
55<h2 id="background">Background</h2>
Robert Ly35f2fda2013-01-29 16:27:05 -080056<p>Android provides an open source platform and application environment for mobile
Clay Murphy8aa3ad22014-11-26 16:59:21 -080057 devices.</p>
58<p>The sections and pages below describe the security features of the Android
59 platform. <em>Figure 1</em> summarizes the security components and considerations of
60 the various levels of the Android software stack. Each component assumes that
61 the components below are properly secured. With the exception of a small amount
62 of Android OS code running as root, all code above the Linux Kernel is
63 restricted by the Application Sandbox.</p>
Robert Ly35f2fda2013-01-29 16:27:05 -080064<p><img alt="Figure 1: Android software stack" src="images/image00.png" /></p>
65<p><em>Figure 1: Android software stack.</em></p>
Clay Murphy8aa3ad22014-11-26 16:59:21 -080066<p>The main Android platform building blocks are:</p>
Robert Ly35f2fda2013-01-29 16:27:05 -080067<ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -080068 <li>
69 <p><strong>Device Hardware</strong>: Android runs on a wide range of hardware configurations
70 including smart phones, tablets, and set-top-boxes. Android is
71 processor-agnostic, but it does take advantage of some hardware-specific
72 security capabilities such as ARM v6 eXecute-Never.</p>
73 </li>
74 <li>
75 <p><strong>Android Operating System</strong>: The core operating system is built on top of
76 the Linux kernel. All device resources, like camera functions, GPS data,
77 Bluetooth functions, telephony functions, network connections, etc. are
78 accessed through the operating system.</p>
79 </li>
80 <li>
81 <p><strong>Android Application Runtime</strong>: Android applications are most often written
82 in the Java programming language and run in the Dalvik virtual machine.
83 However, many applications, including core Android services and applications
84 are native applications or include native libraries. Both Dalvik and native
85 applications run within the same security environment, contained within the
86 Application Sandbox. Applications get a dedicated part of the filesystem in
87 which they can write private data, including databases and raw files.</p>
88 </li>
Robert Ly35f2fda2013-01-29 16:27:05 -080089</ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -080090<p>Android applications extend the core Android operating system. There are two
91 primary sources for applications:</p>
Robert Ly35f2fda2013-01-29 16:27:05 -080092<ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -080093 <li>
94 <p><strong>Pre-Installed Applications</strong>: Android includes a set of pre-installed
95 applications including phone, email, calendar, web browser, and contacts. These
96 function both as user applications and to provide key device capabilities that
97 can be accessed by other applications. Pre-installed applications may be part
98 of the open source Android platform, or they may be developed by an OEM for a
99 specific device.</p>
100 </li>
101 <li>
102 <p><strong>User-Installed Applications</strong>: Android provides an open development
103 environment supporting any third-party application. Google Play offers
104 users hundreds of thousands of applications.</p>
105 </li>
Robert Ly35f2fda2013-01-29 16:27:05 -0800106</ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -0800107<p>Google provides a set of cloud-based services that are available to any
108 compatible Android device. The primary services are:</p>
Robert Ly35f2fda2013-01-29 16:27:05 -0800109<ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -0800110 <li>
111 <p><strong>Google Play</strong>: Google Play is a collection of services that
112 allow users to discover, install, and purchase applications from their Android
113 device or the web. Google Play makes it easy for developers to reach Android
114 users and potential customers. Google Play also provides community review,
115 application <a href="https://developer.android.com/guide/publishing/licensing.html">license
116 verification</a>, application security scanning, and other security services.</p>
117 </li>
118 <li>
119 <p><strong>Android Updates</strong>: The Android update service delivers new capabilities and
120 security updates to Android devices, including updates through the web or over
121 the air (OTA).</p>
122 </li>
123 <li>
124 <p><strong>Application Services</strong>: Frameworks that allow Android applications to use
125 cloud capabilities such as (<a href="https://developer.android.com/guide/topics/data/backup.html">backing
126 up</a>) application
127 data and settings and cloud-to-device messaging
128 (<a href="https://developers.google.com/android/c2dm/">C2DM</a>)
129 for push messaging.</p>
130 </li>
Robert Ly35f2fda2013-01-29 16:27:05 -0800131</ul>
Clay Murphy8aa3ad22014-11-26 16:59:21 -0800132<p>These services are not part of the Android Open Source Project and are out
133 of scope for this document. But they are relevant to the security of most
134 Android devices, so a related security document titled “Google Services for
135 Android: Security Overview” is available.</p>