From eee70913d1765f2e17ed27fbd97b8ed41426a149 Mon Sep 17 00:00:00 2001 From: Android Partner Docs Date: Wed, 5 Jul 2017 15:59:39 -0700 Subject: Docs: Changes to source.android.com - 161017723 Add warnings about incompatibility of FBE and adoptable s... by claym - 160996093 Docs: Nav changes to prep for O + new framework image by hvm - 160984727 Devsite localized content from translation request 76cba1... by Android Partner Docs - 160984408 Add instructions to check for device security update by daroberts - 160971202 July 2017 Security bulletin updates by daroberts - 160958735 Update audit2allow commands by daroberts - 160567793 Redirect old Dumpsys pages to DAC by claym - 160553240 Devsite localized content from translation request 29dc8d... by Android Partner Docs - 160550105 Use a SHA-256 checksum, not a SHA-1 checksum, for the lat... by Android Partner Docs - 160448356 Add researcher attribution for CVE-2017-0574 by daroberts - 160342125 Publish localized June security bulletin by daroberts - 160293585 Devsite localized content from translation request 3cdce1... by Android Partner Docs - 160292361 Adds link to go/sac-guide at top of README for Googlers. by blamb - 160281439 Include a mention of --cbr in the using-repo docs. by Android Partner Docs PiperOrigin-RevId: 161017723 Change-Id: Ie54ae2e7ac3aec03736d94fd13d6dbc16a804b9a Test: make online-sac-docs --- en/devices/_toc-interfaces.yaml | 82 +- en/devices/architecture/hal.html | 140 ++ en/devices/architecture/images/ape_fwk_hal.png | Bin 0 -> 27793 bytes .../architecture/images/treble_blog_after.png | Bin 0 -> 17812 bytes .../architecture/images/treble_blog_before.png | Bin 0 -> 21476 bytes en/devices/architecture/index.html | 79 + en/devices/architecture/treble.html | 73 + en/devices/automotive.html | 295 ---- en/devices/automotive/index.html | 109 ++ en/devices/automotive/properties.html | 231 +++ en/devices/images/ape_fwk_hal.png | Bin 22093 -> 38631 bytes en/devices/index.html | 199 +-- en/devices/input/diagnostics.html | 495 ------ en/devices/input/migration-guide.html | 5 +- en/devices/storage/adoptable.html | 8 +- en/devices/tech/debug/dumpsys.html | 109 -- en/devices/tech/debug/index.html | 6 +- en/devices/tech/debug/netstats.html | 151 -- en/devices/tech/debug/procstats.html | 371 ----- en/devices/tech/power/batterystats.html | 580 ------- en/security/_toc.yaml | 2 + en/security/bulletin/2017-04-01.html | 2 +- en/security/bulletin/2017-07-01.html | 1732 ++++++++++++++++++++ en/security/bulletin/2017.html | 18 +- en/security/bulletin/index.html | 21 +- en/security/encryption/file-based.html | 7 + en/security/overview/acknowledgements.html | 14 +- en/security/selinux/validate.html | 12 +- en/source/downloading.html | 2 +- en/source/using-repo.html | 5 +- 30 files changed, 2513 insertions(+), 2235 deletions(-) create mode 100644 en/devices/architecture/hal.html create mode 100644 en/devices/architecture/images/ape_fwk_hal.png create mode 100644 en/devices/architecture/images/treble_blog_after.png create mode 100644 en/devices/architecture/images/treble_blog_before.png create mode 100644 en/devices/architecture/index.html create mode 100644 en/devices/architecture/treble.html delete mode 100644 en/devices/automotive.html create mode 100644 en/devices/automotive/index.html create mode 100644 en/devices/automotive/properties.html delete mode 100644 en/devices/input/diagnostics.html delete mode 100644 en/devices/tech/debug/dumpsys.html delete mode 100644 en/devices/tech/debug/netstats.html delete mode 100644 en/devices/tech/debug/procstats.html delete mode 100644 en/devices/tech/power/batterystats.html create mode 100644 en/security/bulletin/2017-07-01.html (limited to 'en') diff --git a/en/devices/_toc-interfaces.yaml b/en/devices/_toc-interfaces.yaml index a4331e12..148c5630 100644 --- a/en/devices/_toc-interfaces.yaml +++ b/en/devices/_toc-interfaces.yaml @@ -1,41 +1,14 @@ toc: - title: Overview path: /devices/ -- title: Accessories - path: /devices/accessories +- title: Architecture section: - - title: Audio Accessories - section: - - title: Overview - path: /devices/accessories/audio - - title: Headset - section: - - title: Overview - path: /devices/accessories/headset/ - - title: 3.5 mm Headset Spec - path: /devices/accessories/headset/plug-headset-spec - - title: 3.5 mm Jack Spec - path: /devices/accessories/headset/jack-headset-spec - - title: USB Headset Spec - path: /devices/accessories/headset/usb-headset-spec - - title: Expected Behavior - path: /devices/accessories/headset/expected-behavior - - title: Testing - path: /devices/accessories/headset/testing - - title: Custom Accessories - section: - - title: Overview - path: /devices/accessories/custom - - title: AOA - section: - - title: Overview - path: /devices/accessories/protocol - - title: AOA 2.0 - path: /devices/accessories/aoa2 - - title: AOA 1.0 - path: /devices/accessories/aoa - - title: Stylus - path: /devices/accessories/stylus + - title: Overview + path: /devices/architecture/ + - title: Hardware Abstraction Layer (HAL) + path: /devices/architecture/hal + - title: Treble + path: /devices/architecture/treble - title: Audio section: - title: Overview @@ -95,7 +68,11 @@ toc: - title: TV Audio path: /devices/audio/tv - title: Automotive - path: /devices/automotive + section: + - title: Overview + path: /devices/automotive/ + - title: Vehicle Properties + path: /devices/automotive/properties - title: Bluetooth path: /devices/bluetooth - title: Camera @@ -206,6 +183,41 @@ toc: path: /devices/media/soc - title: OEM Dependencies path: /devices/media/oem +- title: Peripherals + path: /devices/accessories + section: + - title: Audio Accessories + section: + - title: Overview + path: /devices/accessories/audio + - title: Headset + section: + - title: Overview + path: /devices/accessories/headset/ + - title: 3.5 mm Headset Spec + path: /devices/accessories/headset/plug-headset-spec + - title: 3.5 mm Jack Spec + path: /devices/accessories/headset/jack-headset-spec + - title: USB Headset Spec + path: /devices/accessories/headset/usb-headset-spec + - title: Expected Behavior + path: /devices/accessories/headset/expected-behavior + - title: Testing + path: /devices/accessories/headset/testing + - title: Custom Accessories + section: + - title: Overview + path: /devices/accessories/custom + - title: AOA + section: + - title: Overview + path: /devices/accessories/protocol + - title: AOA 2.0 + path: /devices/accessories/aoa2 + - title: AOA 1.0 + path: /devices/accessories/aoa + - title: Stylus + path: /devices/accessories/stylus - title: Sensors section: - title: Overview diff --git a/en/devices/architecture/hal.html b/en/devices/architecture/hal.html new file mode 100644 index 00000000..17ccea71 --- /dev/null +++ b/en/devices/architecture/hal.html @@ -0,0 +1,140 @@ + + + Hardware Abstraction Layer (HAL) + + + + + + + + +

A HAL defines a standard interface for hardware vendors to implement, +which enables Android to be agnostic about lower-level driver implementations. +Using a HAL allows you to implement functionality without affecting or modifying +the higher level system. HAL implementations are packaged into modules and +loaded by the Android system at the appropriate time.

+ + + +

Figure 1. HAL components

+ +

You must implement the corresponding HAL (and driver) for the specific +hardware your product provides. HAL implementations are typically built into +shared library modules (.so files), but as Android does not mandate +a standard interaction between a HAL implementation and device drivers, you can +do what is best for your situation. However, to enable the Android system to +correctly interact with your hardware, you must abide by the +contract defined in each hardware-specific HAL interface.

+ +

To guarantee that HALs have a predictable structure, each hardware-specific +HAL interface has properties defined in +hardware/libhardware/include/hardware/hardware.h. This interface +allows the Android system to load correct versions of your HAL modules in a +consistent way. A HAL interface consists of two components: modules and devices. +

+ +

HAL modules

+

A module represents your packaged HAL implementation, which is stored as a +shared library (.so file). The +hardware/libhardware/include/hardware/hardware.h header file +defines a struct (hw_module_t) that represents a module and +contains metadata such as the version, name, and author of the module. Android +uses this metadata to find and load the HAL module correctly.

+ +

In addition, the hw_module_t struct contains a pointer to +another struct, hw_module_methods_t, that contains a pointer to +an open function for the module. This open function is used to initiate +communication with the hardware for which the HAL is serving as an abstraction. +Each hardware-specific HAL usually extends the generic hw_module_t +struct with additional information for that specific piece of hardware. For +example, in the camera HAL, the camera_module_t struct contains a +hw_module_t struct along with other camera-specific function +pointers:

+ +
+typedef struct camera_module {
+    hw_module_t common;
+    int (*get_number_of_cameras)(void);
+    int (*get_camera_info)(int camera_id, struct camera_info *info);
+} camera_module_t;
+
+ +

When you implement a HAL and create the module struct, you must name it +HAL_MODULE_INFO_SYM. Example from the Nexus 9 audio HAL:

+ +
+struct audio_module HAL_MODULE_INFO_SYM = {
+    .common = {
+        .tag = HARDWARE_MODULE_TAG,
+        .module_api_version = AUDIO_MODULE_API_VERSION_0_1,
+        .hal_api_version = HARDWARE_HAL_API_VERSION,
+        .id = AUDIO_HARDWARE_MODULE_ID,
+        .name = "NVIDIA Tegra Audio HAL",
+        .author = "The Android Open Source Project",
+        .methods = &hal_module_methods,
+    },
+};
+
+ +

HAL devices

+

A device abstracts the hardware of your product. For example, an audio +module can contain a primary audio device, a USB audio device, or a Bluetooth +A2DP audio device.

+ +

A device is represented by the hw_device_t struct. Similar to a +module, each type of device defines a detailed version of the generic +hw_device_t that contains function pointers for specific features +of the hardware. For example, the audio_hw_device_t struct type +contains function pointers to audio device operations:

+ +
+struct audio_hw_device {
+    struct hw_device_t common;
+
+    /**
+     * used by audio flinger to enumerate what devices are supported by
+     * each audio_hw_device implementation.
+     *
+     * Return value is a bitmask of 1 or more values of audio_devices_t
+     */
+    uint32_t (*get_supported_devices)(const struct audio_hw_device *dev);
+  ...
+};
+typedef struct audio_hw_device audio_hw_device_t;
+
+ +

In addition to these standard properties, each hardware-specific HAL +interface can define more of its own features and requirements. For details, +see the HAL reference documentation as well as +the individual instructions for each HAL.

+ +

Building HAL modules

+

HAL implementations are built into modules (.so) files and are +dynamically linked by Android when appropriate. You can build your modules by +creating Android.mk files for each of your HAL implementations +and pointing to your source files. In general, your shared libraries must be +named in a specific format so they can be found and loaded properly. The naming +scheme varies slightly from module to module, but follows the general pattern +of: <module_type>.<device_name>. +

+ +

For details on setting up the build for each HAL, see the HAL-specific +documentation through the Porting section of this website.

+ + + diff --git a/en/devices/architecture/images/ape_fwk_hal.png b/en/devices/architecture/images/ape_fwk_hal.png new file mode 100644 index 00000000..0b931194 Binary files /dev/null and b/en/devices/architecture/images/ape_fwk_hal.png differ diff --git a/en/devices/architecture/images/treble_blog_after.png b/en/devices/architecture/images/treble_blog_after.png new file mode 100644 index 00000000..c82bc0a5 Binary files /dev/null and b/en/devices/architecture/images/treble_blog_after.png differ diff --git a/en/devices/architecture/images/treble_blog_before.png b/en/devices/architecture/images/treble_blog_before.png new file mode 100644 index 00000000..47affe2e Binary files /dev/null and b/en/devices/architecture/images/treble_blog_before.png differ diff --git a/en/devices/architecture/index.html b/en/devices/architecture/index.html new file mode 100644 index 00000000..a4a415e3 --- /dev/null +++ b/en/devices/architecture/index.html @@ -0,0 +1,79 @@ + + + Architecture + + + + + + + + +

+Android system architecture contains the following components: +

+ + + +

Figure 1. Android system architecture

+ +

Application framework

+ +

The application framework is used most often by application developers. As a +hardware developer, you should be aware of developer APIs as many map directly +to the underlying HAL interfaces and can provide helpful information about +implementing drivers.

+ +

Binder IPC

+

The Binder Inter-Process Communication (IPC) mechanism allows the application +framework to cross process boundaries and call into the Android system services +code. This enables high level framework APIs to interact with Android system +services. At the application framework level, this communication is hidden from +the developer and things appear to "just work".

+ +

System services

+

System services are modular, focused components such as Window Manager, +Search Service, or Notification Manager. Functionality exposed by application +framework APIs communicates with system services to access the underlying +hardware. Android includes two groups of services: system (such as +Window Manager and Notification Manager) and media (services involved +in playing and recording media).

+ +

Hardware abstraction layer (HAL)

+

A HAL defines a standard interface for hardware vendors to implement, +which enables Android to be agnostic about lower-level driver implementations. +Using a HAL allows you to implement functionality without affecting or modifying +the higher level system. HAL implementations are packaged into modules and +loaded by the Android system at the appropriate time. For details, see +Hardware Abstraction Layer (HAL). +

+ +

Linux kernel

+

Developing your device drivers is similar to developing a typical Linux +device driver. Android uses a version of the Linux kernel with a few special +additions such as wake locks (a memory management system that is more aggressive +in preserving memory), the Binder IPC driver, and other features important for a +mobile embedded platform. These additions are primarily for system functionality +and do not affect driver development.

+ +

You can use any version of the kernel as long as it supports the required +features (such as the binder driver). However, we recommend using the latest +version of the Android kernel. For details, see +Building Kernels.

+ + + diff --git a/en/devices/architecture/treble.html b/en/devices/architecture/treble.html new file mode 100644 index 00000000..343858df --- /dev/null +++ b/en/devices/architecture/treble.html @@ -0,0 +1,73 @@ + + + Treble + + + + + + + +

The upcoming Android O release includes Project Treble, a major re-architect +of the Android OS framework designed to make it easier, faster, and less costly +for manufacturers to update devices to a new version of Android.

+ +

Android updates

+

Project Treble separates the vendor implementation (device-specific, +lower-level software written by silicon manufacturers) from the Android OS +framework via a new vendor interface.

+ +

In Android 7.x and earlier, no formal vendor interface exists so device +makers must update large portions of the Android code to move a device to a +newer version of Android:

+ + + +

Figure 1. Pre-Treble Android update +environment

+ +

With Treble, a new stable vendor interface provides access to the +hardware-specific parts of Android, enabling device makers to deliver new +Android releases simply by updating the Android OS framework—without any +additional work required from the silicon manufacturers:

+ + + +

Figure 2. Treble Android update +environment

+ +

Testing Treble

+

To ensure forward compatibility of the vendor implementation, the new vendor +interface will be validated by the Vendor Test Suite (VTS), which is analogous +to the Compatibility Test Suite (CTS). VTS is +already launched and can be used to automate HAL and OS kernel testing even in +pre-Treble environments; for details, see +Systems Testing +With VTS.

+ +

Coming soon

+

Project Treble is coming to all new devices launching with Android O and +beyond, and the new architecture is already running on the Developer Preview of +O for Pixel phones. When Android O launches, we'll have full details here (on +source.android.com). In the interim, +you can find more details on Treble over at the +Android +Developers Blog.

+ + + + diff --git a/en/devices/automotive.html b/en/devices/automotive.html deleted file mode 100644 index 8ee3f53a..00000000 --- a/en/devices/automotive.html +++ /dev/null @@ -1,295 +0,0 @@ - - - Automotive - - - - - - - - -Android vehicle HAL icon - -

Many car subsystems interconnect with each other and the in-vehicle -infotainment (IVI) system via various bus topologies. The exact bus type and -protocols vary widely between manufacturers (and even between different vehicle -models of the same brand); examples include Controller Area Network (CAN) bus, -Local Interconnect Network (LIN) bus, Media Oriented Systems Transport (MOST), -as well as automotive-grade Ethernet and TCP/IP networks such as BroadR-Reach. -

-

Android Automotive has a hardware abstraction layer (HAL) that provides a -consistent interface to the Android framework regardless of physical transport -layer. This vehicle HAL is the interface for developing Android Automotive -implementations.

-

System integrators can implement a vehicle HAL module by connecting -function-specific platform HAL interfaces (e.g. HVAC) with technology-specific -network interfaces (e.g. CAN bus). Typical implementations may include a -dedicated Microcontroller Unit (MCU) running a proprietary real-time operating -system (RTOS) for CAN bus access or similar, which may be connected via a serial -link to the CPU running Android Automotive. Instead of a dedicated MCU, it may -also be possible to implement the bus access as a virtualized CPU. It is up to -each partner to choose the architecture suitable for the hardware as long as the -implementation fulfills the interface requirements for the vehicle HAL.

- -

Architecture

-

The vehicle HAL is the interface definition between the car and the vehicle -network service:

- -Android vehicle HAL architecture -

Figure 1. Vehicle HAL and Android -automotive architecture

- -
    -
  • Car API. Contains the APIs such as CarHvacManager -and CarSensorManager. For details on all supported APIs, -refer to /platform/packages/services/Car/car-lib.
  • -
  • CarService. Located at -/platform/packages/services/Car/.
  • -
  • VehicleNetworkService. Controls vehicle HAL with built-in -security. Access restricted to system components only (non-system components -such as third party apps should use car API instead). OEMs can control access -using vns_policy.xml and vendor_vns_policy.xml. -Located at /platform/packages/services/Car/vehicle_network_service/; -for libraries to access the vehicle network, refer to -/platform/packages/services/Car/libvehiclenetwork/.
  • -
  • Vehicle HAL. Interface that defines the properties OEMs can -implement and contains property metadata (for example, whether the property is -an int and which change modes are allowed). Located at -hardware/libhardware/include/hardware/vehicle.h. For a basic -reference implementation, refer to -hardware/libhardware/modules/vehicle/.
  • -
- -

Vehicle properties

-

The vehicle HAL interface is based on accessing (read, write, subscribe) a -property, which is an abstraction for a specific function. Properties can be -read-only, write-only (used to pass information to vehicle HAL level), or read -and write. Support of most properties is optional.

-

Each property is uniquely identified by an int32 key and has a predefined -type (value_type):

- -
    -
  • INT32 (and array), INT64, BOOLEAN, -FLOAT (and array), string, bytes.
  • -
  • Zoned type has zone in addition to value.
  • -
- -

Zone types

-

The vehicle HAL defines three zone types:

-
    -
  • vehicle_zone: Zone based on rows.
  • -
  • vehicle_seat: Zone based on seats.
  • -
  • vehicle_window: Zone based on windows.
  • -
-

Each zoned property should use pre-defined zone type. If necessary, you can -use a custom zone type for each property (for details, see -Handling custom properties).

- -

Configuring a property

-

Use vehicle_prop_config_t to provide configuration information -for each property. Information includes:

-
    -
  • access (r, w, rw)
  • -
  • change_mode (represents how property is monitored: on change vs -continuous)
  • -
  • min_value (int32, float, int64), max_value (int32, -float, int64)
  • -
  • min_sample_rate, max_sample_rate
  • -
  • permission_model
  • -
  • prop (Property ID, int)
  • -
  • value_type
  • -
  • zone_flags (represents supported zones as bit flags)
  • -
-

In addition, some properties have specific configuration flags to represent -capability.

- -

HAL interfaces

-

The vehicle HAL uses the following interfaces:

-
    -
  • vehicle_prop_config_t const *(*list_properties)(..., int* -num_properties). List configuration of all properties supported by the -vehicle HAL. Only supported properties will be used by vehicle network service. -
  • -
  • (*get)(..., vehicle_prop_value_t *data). Read the current value -of the property. For zoned property, each zone may have different value.
  • -
  • (*set)(..., const vehicle_prop_value_t *data). Write a value to -property. Result of write is defined per each property.
  • -
  • (*subscribe)(..., int32_t prop, float sample_rate, int32_t -zones).
      -
    • Start monitoring property value's change. For zoned property, subscription -applies to requested zones. Zones = 0 is used to request all zones supported. -
    • -
    • Vehicle HAL should call separate callback when the property's value changes -(=on change) or in const interval (=continuous type).
  • -
  • (*release_memory_from_get)(struct vehicle_hw_device* device, -vehicle_prop_value_t *data). Release memory allocated from get call.
- - - -

The vehicle HAL uses the following callback interfaces:

-
    -
  • (*vehicle_event_callback_fn)(const vehicle_prop_value_t -*event_data). Notifies vehicle property's value change. Should be done -only for subscribed properties.
  • -
  • (*vehicle_error_callback_fn)(int32_t error_code, int32_t property, -int32_t operation). Return global vehicle HAL level error or error per -each property. Global error causes HAL restart, which can lead to restarting -other components, including applications.
  • -
- -

Handling zone properties

-

A zoned property is equivalent to a collection of multiple properties where -each sub property is accessible by specified zone value.

-
    -
  • get call for zoned property always includes zone in request, so -only the current value for the requested zone should be returned.
  • -
  • set call for zoned property always includes zone in request, so -only the requested zone should be changed.
  • -
  • subscribe call includes flags of all zones subscribed. Events -from un-subscribed zones should not be reported.
  • -
- -

Get calls

-

During initialization, the value for the property may not be available yet as -the matching vehicle network message has not yet been received. In such cases, -the get call should return -EAGAIN. Some properties -(such as HVAC) have separate on/off power property. Calling get for -such a property (when powered off) should return a special value -(VEHICLE_INT_OUT_OF_RANGE_OFF/VEHICLE_FLOAT_OUT_OF_RANGE_OFF) -rather than returning an error.

-

In addition, some properties (such as HVAC temperature) can have a value to -indicate it is in max power mode rather than in specific temperature value. In -such cases, use special values to represent such state.

-
    -
  • VEHICLE_INT_OUT_OF_RANGE_MAX/MIN
  • -
  • VEHICLE_FLOAT_OUT_OF_RANGE_MAX/MIN
  • -
- -

Example: get HVAC Temperature

-Vehicle HAL get HVAC example -

Figure 2. Get HVAC temperature (CS = -CarService, VNS = VehicleNetworkService, VHAL = Vehicle HAL)

- -

Set calls

-

A set call is an asynchronous operation involving event -notification after a requested change is made. In a typical operation, a -set call leads to making a change request across vehicle network. -When the change is performed by the electronic control unit (ECU) owning the -property, the updated value is returned through vehicle network and the vehicle -HAL sends an updated value as an event to vehicle network service (VNS).

-

Some set calls may require initial data to be ready but during -initialization, such data may not be available yet. In such cases, the -set call should return -EAGAIN. Some properties with -separate power on /off should return -ESHUTDOWN when the property -is powered off and set cannot be done.

-

Until set is made effective, get does not -necessarily return the same value as what is set. The exception is a property -with change mode of VEHICLE_PROP_CHANGE_MODE_ON_SET. This property -notifies change only when it is set by external component outside Android (for -example, clock properties such as VEHICLE_PROPERTY_UNIX_TIME).

- -

Example: set HVAC Temperature

-Vehicle HAL set HVAC example -

Figure 3. Set HVAC temperature (CD = -CarService, VNS = VehicleNetworkService, VHAL = Vehicle HAL)

- -

Handling custom properties

-

To support partner-specific needs, the vehicle HAL allows custom properties -that are restricted to system apps. Use the following guidelines when working -with custom properties:

-
    -
  • Key should be in [VEHICLE_PROPERTY_CUSTOM_START, -VEHICLE_PROPERTY_CUSTOM_END] range. Other ranges are reserved for future -extension; using such ranges can cause conflicts in future Android releases.
  • -
  • Use only defined value_type. BYTES type allows passing raw -data, so this is enough in most cases. Sending big data frequently through -custom properties can slow down the whole vehicle network access, so be careful -when you add a big payload.
  • -
  • Add access policy into vendor_vns_policy.xml (otherwise, all -access will be rejected).
  • -
  • Access via VendorExtensionManager (for Java components) or -via Vehicle Network Service API (for native). Do not modify other car APIs as it -can lead to compatibility issues in the future.
  • -
- -

Handling HVAC properties

-

You can use the vehicle HAL to control HVAC by setting HVAC-related -properties. Most HVAC properties are zoned properties, but a few are non-zoned -(global) properties. Example properties defined include:

-
    -
  • VEHICLE_PROPERTY_HVAC_TEMPERATURE_SET (set temperature per each -zone).
  • -
  • VEHICLE_PROPERTY_HVAC_RECIRC_ON (control recirculation per each -zone).
  • -
-

For full list of HVAC properties, search for -VEHICLE_PROPERTY_HVAC_* in vehicle.h.

- -

Handling sensor properties

-

Vehicle HAL sensor properties represent real sensor data or policy -information such as driving status. Some sensor information (such as driving -status and day/night mode) is accessible by any app without restriction as the -data is mandatory to build a safe vehicle application. Other sensor information -(such as vehicle speed) is more sensitive and requires specific permissions that -users can manage.

-

Supported sensor properties include:

-
    -
  • DRIVING_STATUS (should support). Represents allowed operations -in the current driving state. This information is used to block unsafe -applications while driving.
  • -
  • NIGHT_MODE (should support). Determines day/night mode of -display.
  • -
  • GEAR_SELECTION/CURRENT_GEAR. Gear selected by driver vs. -actual gear.
  • -
  • VEHICLE_SPEED. Vehicle speed. Protected with permission.
  • -
  • ODOMETER. Current odometer reading. Protected with permission. -
  • -
  • FUEL_LEVEL. Current fuel level in %.
  • -
  • FUEL_LEVEL_LOW. Fuel level is low or not (boolean).
  • -
- -

Security

-

The vehicle HAL supports three levels of security for accessing data:

-
    -
  • System only (controlled by vns_policy.xml)
  • -
  • Accessible to app with permission (through car service)
  • -
  • Accessible without permission (through car service)
  • -
-

Direct access to vehicle properties is allowed only to selected system -components with vehicle network service acting as the gatekeeper. Most -applications go through additional gatekeeping by car service (for example, only -system applications can control HVAC as it requires system permission granted -only to system apps).

- -

Validation

-

AOSP includes the following testing resources for use in development:

-
    -
  • hardware/libhardware/tests/vehicle/vehicle-hal-tool.c. -Command-line native tool to load vehicle HAL and do simple operations. Useful -for getting the system up and running in the early stages of development.
  • -
  • packages/services/Car/tests/carservice_test/. Contains car -service testing with mocked vehicle HAL properties. For each property, expected -behavior is implemented in the test. This can be a good starting point to -understand expected behavior.
  • -
  • hardware/libhardware/modules/vehicle/. A basic reference -implementation.
  • -
- - - diff --git a/en/devices/automotive/index.html b/en/devices/automotive/index.html new file mode 100644 index 00000000..83a7a6ef --- /dev/null +++ b/en/devices/automotive/index.html @@ -0,0 +1,109 @@ + + + Automotive + + + + + + + + +Android vehicle HAL icon + +

Many car subsystems interconnect with each other and the in-vehicle +infotainment (IVI) system via various bus topologies. The exact bus type and +protocols vary widely between manufacturers (and even between different vehicle +models of the same brand); examples include Controller Area Network (CAN) bus, +Local Interconnect Network (LIN) bus, Media Oriented Systems Transport (MOST), +as well as automotive-grade Ethernet and TCP/IP networks such as BroadR-Reach. +

+

the Android Automotive hardware abstraction layer (HAL) provides a +consistent interface to the Android framework regardless of physical transport +layer. This vehicle HAL is the interface for developing Android Automotive +implementations.

+

System integrators can implement a vehicle HAL module by connecting +function-specific platform HAL interfaces (e.g. HVAC) with technology-specific +network interfaces (e.g. CAN bus). Typical implementations may include a +dedicated Microcontroller Unit (MCU) running a proprietary real-time operating +system (RTOS) for CAN bus access or similar, which may be connected via a serial +link to the CPU running Android Automotive. Instead of a dedicated MCU, it may +also be possible to implement the bus access as a virtualized CPU. It is up to +each partner to choose the architecture suitable for the hardware as long as the +implementation fulfills the interface requirements for the vehicle HAL.

+ +

Architecture

+

The vehicle HAL is the interface definition between the car and the vehicle +network service:

+ +Android vehicle HAL architecture +

Figure 1. Vehicle HAL and Android +automotive architecture

+ +
    +
  • Car API. Contains the APIs such as CarHvacManager, +CarSensorManager, and CarCameraManager. For details on supported APIs, +refer to /platform/packages/services/Car/car-lib.
  • +
  • CarService. Located at +/platform/packages/services/Car/.
  • +
  • VehicleNetworkService. Controls vehicle HAL with built-in +security. Access restricted to system components only (non-system components +such as third party apps should use car API instead). OEMs can control access +using vns_policy.xml and vendor_vns_policy.xml. +Located at /platform/packages/services/Car/vehicle_network_service/; +for libraries to access the vehicle network, refer to +/platform/packages/services/Car/libvehiclenetwork/.
  • +
  • Vehicle HAL. Interface that defines the vehicle properties +OEMs can implement. Contains property metadata (for example, whether the vehicle +property is an int and which change modes are allowed). Located at +hardware/libhardware/include/hardware/vehicle.h. For a basic +reference implementation, refer to +hardware/libhardware/modules/vehicle/.
  • +
+

For more details, see Vehicle +Properties. + +

Security

+

The vehicle HAL supports three levels of security for accessing data:

+
    +
  • System only (controlled by vns_policy.xml)
  • +
  • Accessible to app with permission (through car service)
  • +
  • Accessible without permission (through car service)
  • +
+

Direct access to vehicle properties is allowed only to selected system +components with vehicle network service acting as the gatekeeper. Most +applications go through additional gatekeeping by car service (for example, only +system applications can control HVAC as it requires system permission granted +only to system apps).

+ +

Validation

+

AOSP includes the following testing resources for use in development:

+
    +
  • hardware/libhardware/tests/vehicle/vehicle-hal-tool.c
    +Command-line native tool to load vehicle HAL and do simple operations. Useful +for getting the system up and running in the early stages of development.
  • +
  • packages/services/Car/tests/carservice_test/
    Contains car +service testing with mocked vehicle HAL properties. For each property, expected +behavior is implemented in the test. This can be a good starting point to +understand expected behavior.
  • +
  • hardware/libhardware/modules/vehicle/
    A basic reference +implementation.
  • +
+ + + diff --git a/en/devices/automotive/properties.html b/en/devices/automotive/properties.html new file mode 100644 index 00000000..5a69edef --- /dev/null +++ b/en/devices/automotive/properties.html @@ -0,0 +1,231 @@ + + + Vehicle Properties + + + + + + + +

The vehicle HAL interface defines the properties OEMs can implement and +contains property metadata (for example, whether the property is an int and +which change modes are allowed). The vehicle HAL interface is based on accessing +(read, write, subscribe) a property, which is an abstraction for a specific +function.

+ +

HAL interfaces

+

The vehicle HAL uses the following interfaces:

+
    +
  • vehicle_prop_config_t const *(*list_properties)(..., int* +num_properties) +
    List configuration of all properties supported by the vehicle HAL. Only +supported properties are used by vehicle network service. +
  • +
  • (*get)(..., vehicle_prop_value_t *data) +
    Read the current value of the property. For zoned property, each zone may +have different value.
  • +
  • (*set)(..., const vehicle_prop_value_t *data) +
    Write a value to property. Result of write is defined per property.
  • +
  • (*subscribe)(..., int32_t prop, float sample_rate, int32_t +zones) +
      +
    • Start monitoring a property value change. For zoned property, subscription +applies to requested zones. Zones = 0 is used to request all zones supported. +
    • +
    • Vehicle HAL should call separate callback when the property's value changes +(=on change) or in const interval (=continuous type).
    • +
  • +
  • (*release_memory_from_get)(struct vehicle_hw_device* device, +vehicle_prop_value_t *data) +
    Release memory allocated from get call.
  • +
+ +

The vehicle HAL uses the following callback interfaces:

+
    +
  • (*vehicle_event_callback_fn)(const vehicle_prop_value_t +*event_data) +
    Notifies vehicle property's value change. Should be done only for +subscribed properties.
  • +
  • (*vehicle_error_callback_fn)(int32_t error_code, int32_t property, +int32_t operation) +
    Return global vehicle HAL level error or error per property. Global error +causes HAL restart, which can lead to restarting other components (including +applications).
  • +
+ +

Vehicle properties

+

Properties can be read-only, write-only (used to pass information to vehicle +HAL level), or read and write (support of most properties is optional). Each +property is uniquely identified by an int32 key and has a predefined type +(value_type):

+ +
    +
  • INT32 (and array), INT64, BOOLEAN, +FLOAT (and array), string, bytes.
  • +
  • Zoned type has zone in addition to value.
  • +
+ +

Zone types

+

The vehicle HAL defines three zone types:

+
    +
  • vehicle_zone +
    Zone based on rows.
  • +
  • vehicle_seat +
    Zone based on seats.
  • +
  • vehicle_window +
    Zone based on windows.
  • +
+

Each zoned property should use pre-defined zone type. If necessary, you can +use a custom zone type for each property (for details, see +Handling custom properties).

+ +

Configuring a property

+

Use vehicle_prop_config_t to provide configuration information +for each property. Information includes:

+
    +
  • access (r, w, rw)
  • +
  • change_mode (represents how property is monitored: on change vs +continuous)
  • +
  • min_value (int32, float, int64), max_value (int32, +float, int64)
  • +
  • min_sample_rate, max_sample_rate
  • +
  • permission_model
  • +
  • prop (Property ID, int)
  • +
  • value_type
  • +
  • zone_flags (represents supported zones as bit flags)
  • +
+

In addition, some properties have specific configuration flags to represent +capability.

+ +

Handling zone properties

+

A zoned property is equivalent to a collection of multiple properties where +each sub property is accessible by specified zone value.

+
    +
  • get call for zoned property always includes zone in request, so +only the current value for the requested zone should be returned.
  • +
  • set call for zoned property always includes zone in request, so +only the requested zone should be changed.
  • +
  • subscribe call includes flags of all zones subscribed. Events +from un-subscribed zones should not be reported.
  • +
+ +

Get calls

+

During initialization, the value for the property may not be available yet as +the matching vehicle network message has not yet been received. In such cases, +the get call should return -EAGAIN. Some properties +(such as HVAC) have separate on/off power property. Calling get for +such a property (when powered off) should return a special value +(VEHICLE_INT_OUT_OF_RANGE_OFF/VEHICLE_FLOAT_OUT_OF_RANGE_OFF) +rather than returning an error.

+

In addition, some properties (such as HVAC temperature) can have a value to +indicate it is in max power mode rather than in specific temperature value. In +such cases, use special values to represent such state.

+
    +
  • VEHICLE_INT_OUT_OF_RANGE_MAX/MIN
  • +
  • VEHICLE_FLOAT_OUT_OF_RANGE_MAX/MIN
  • +
+ +

Example: get HVAC Temperature

+Vehicle HAL get HVAC example +

Figure 1. Get HVAC temperature (CS = +CarService, VNS = VehicleNetworkService, VHAL = Vehicle HAL)

+ +

Set calls

+

A set call is an asynchronous operation involving event +notification after a requested change is made. In a typical operation, a +set call leads to making a change request across vehicle network. +When the change is performed by the electronic control unit (ECU) owning the +property, the updated value is returned through vehicle network and the vehicle +HAL sends an updated value as an event to vehicle network service (VNS).

+

Some set calls may require initial data to be ready but during +initialization, such data may not be available yet. In such cases, the +set call should return -EAGAIN. Some properties with +separate power on /off should return -ESHUTDOWN when the property +is powered off and set cannot be done.

+

Until set is made effective, get does not +necessarily return the same value as what is set. The exception is a property +with change mode of VEHICLE_PROP_CHANGE_MODE_ON_SET. This property +notifies change only when it is set by external component outside Android (for +example, clock properties such as VEHICLE_PROPERTY_UNIX_TIME).

+ +

Example: set HVAC Temperature

+Vehicle HAL set HVAC example +

Figure 2. Set HVAC temperature (CD = +CarService, VNS = VehicleNetworkService, VHAL = Vehicle HAL)

+ +

Handling custom properties

+

To support partner-specific needs, the vehicle HAL allows custom properties +that are restricted to system apps. Use the following guidelines when working +with custom properties:

+
    +
  • Key should be in [VEHICLE_PROPERTY_CUSTOM_START, +VEHICLE_PROPERTY_CUSTOM_END] range. Other ranges are reserved for future +extension; using such ranges can cause conflicts in future Android releases.
  • +
  • Use only defined value_type. BYTES type allows passing raw +data, so this is enough in most cases. Sending big data frequently through +custom properties can slow down the whole vehicle network access, so be careful +when you add a big payload.
  • +
  • Add access policy into vendor_vns_policy.xml (otherwise, all +access will be rejected).
  • +
  • Access via VendorExtensionManager (for Java components) or +via Vehicle Network Service API (for native). Do not modify other car APIs as it +can lead to compatibility issues in the future.
  • +
+ +

Handling HVAC properties

+

You can use the vehicle HAL to control HVAC by setting HVAC-related +properties. Most HVAC properties are zoned properties, but a few are non-zoned +(global) properties. Example properties defined include:

+
    +
  • VEHICLE_PROPERTY_HVAC_TEMPERATURE_SET +
    Set temperature per zone.
  • +
  • VEHICLE_PROPERTY_HVAC_RECIRC_ON +
    Control recirculation per zone).
  • +
+

For full list of HVAC properties, search for +VEHICLE_PROPERTY_HVAC_* in vehicle.h.

+ +

Handling sensor properties

+

Vehicle HAL sensor properties represent real sensor data or policy +information such as driving status. Some sensor information (such as driving +status and day/night mode) is accessible by any app without restriction as the +data is mandatory to build a safe vehicle application. Other sensor information +(such as vehicle speed) is more sensitive and requires specific permissions that +users can manage.

+

Supported sensor properties include:

+
    +
  • DRIVING_STATUS +
    Should support. Represents allowed operations in the current driving state. +This information is used to block unsafe applications while driving.
  • +
  • NIGHT_MODE +
    Should support. Determines day/night mode of display.
  • +
  • GEAR_SELECTION/CURRENT_GEAR +
    Gear selected by driver vs. actual gear.
  • +
  • VEHICLE_SPEED +
    Vehicle speed. Protected with permission.
  • +
  • ODOMETER +
    Current odometer reading. Protected with permission. +
  • +
  • FUEL_LEVEL +
    Current fuel level in %.
  • +
  • FUEL_LEVEL_LOW +
    Fuel level is low or not (boolean).
  • +
+ + + diff --git a/en/devices/images/ape_fwk_hal.png b/en/devices/images/ape_fwk_hal.png index 03f27e94..c22b2984 100644 Binary files a/en/devices/images/ape_fwk_hal.png and b/en/devices/images/ape_fwk_hal.png differ diff --git a/en/devices/index.html b/en/devices/index.html index 49bea636..e6d7b152 100644 --- a/en/devices/index.html +++ b/en/devices/index.html @@ -21,190 +21,27 @@ limitations under the License. --> - - -

-Android gives you the freedom to implement your own device specifications and +

Android gives you the freedom to implement your own device specifications and drivers. The hardware abstraction layer (HAL) provides a standard method for creating software hooks between the Android platform stack and your hardware. The Android operating system is also open source, so you can contribute your own -interfaces and enhancements. -

- -

-To ensure devices maintain a high level of quality and offer a consistent user -experience, each device must pass tests in the compatibility test suite (CTS). -The CTS verifies devices meet a quality standard that ensures apps run reliably -and users have a good experience. For details on the CTS, see -Compatibility. -

- -

-Before porting Android to your hardware, take a moment to understand the Android -system architecture at a high level. Because your drivers and the HAL interact -with Android, knowing how Android works can help you navigate the many layers of -code in the Android Open Source Project (AOSP) source tree. -

- - - -

Figure 1. Android System Architecture

- -

Application framework

-

-The application framework is used most often by application developers. As a -hardware developer, you should be aware of developer APIs as many map directly -to the underlying HAL interfaces and can provide helpful information about -implementing drivers. -

- -

Binder IPC

-

-The Binder Inter-Process Communication (IPC) mechanism allows the application -framework to cross process boundaries and call into the Android system services -code. This enables high level framework APIs to interact with Android system -services. At the application framework level, this communication is hidden from -the developer and things appear to "just work." -

- -

System services

-

-Functionality exposed by application framework APIs communicates with system -services to access the underlying hardware. Services are modular, focused -components such as Window Manager, Search Service, or Notification Manager. -Android includes two groups of services: system (services such as -Window Manager and Notification Manager) and media (services involved -in playing and recording media). -

- -

Hardware abstraction layer (HAL)

-

-The hardware abstraction layer (HAL) defines a standard interface for hardware -vendors to implement and allows Android to be agnostic about lower-level driver -implementations. The HAL allows you to implement functionality without -affecting or modifying the higher level system. HAL implementations are -packaged into modules (.so) file and loaded by the Android system -at the appropriate time. -

- - - -

Figure 2. Hardware abstraction layer -(HAL) components

- -

-You must implement the corresponding HAL (and driver) for the specific hardware -your product provides. HAL implementations are typically built into shared -library modules (.so files). Android does not mandate a standard -interaction between your HAL implementation and your device drivers, so you have -free reign to do what is best for your situation. However, to enable the Android -system to correctly interact with your hardware, you must abide -by the contract defined in each hardware-specific HAL interface. -

- -

Standard HAL structure

-

- Each hardware-specific HAL interface has properties that are defined in - hardware/libhardware/include/hardware/hardware.h, which - guarantee that HALs have a predictable structure. - This interface allows the Android system to load the correct versions of your - HAL modules in a consistent way. There are two general components - that a HAL interface consists of: a module and a device. -

-

- A module represents your packaged HAL implementation, which is stored as a shared library (.so file). It contains - metadata such as the version, name, and author of the module, which helps Android find and load it correctly. The - hardware/libhardware/include/hardware/hardware.h header file defines a - struct, hw_module_t, that represents a module and contains information such as - the module version, author, and name.

- -

In addition, the hw_module_t struct contains - a pointer to another struct, hw_module_methods_t, that contains a pointer to - an "open" function for the module. This open function is used to initiate communication with - the hardware that the HAL is serving as an abstraction for. Each hardware-specific HAL usually - extends the generic hw_module_t struct with additional information - for that specific piece of hardware. For example in the camera HAL, the camera_module_t struct - contains a hw_module_t struct along with other camera-specific function pointers: -

- -
-typedef struct camera_module {
-    hw_module_t common;
-    int (*get_number_of_cameras)(void);
-    int (*get_camera_info)(int camera_id, struct camera_info *info);
-} camera_module_t;
-
- -

When you implement a HAL and create the module struct, you must name it - HAL_MODULE_INFO_SYM. For instance, here is an example from the Nexus 9 audio HAL:

- -
-struct audio_module HAL_MODULE_INFO_SYM = {
-    .common = {
-        .tag = HARDWARE_MODULE_TAG,
-        .module_api_version = AUDIO_MODULE_API_VERSION_0_1,
-        .hal_api_version = HARDWARE_HAL_API_VERSION,
-        .id = AUDIO_HARDWARE_MODULE_ID,
-        .name = "NVIDIA Tegra Audio HAL",
-        .author = "The Android Open Source Project",
-        .methods = &hal_module_methods,
-    },
-};
-
-

- A device abstracts the actual hardware of your product. For example, an audio module can contain - a primary audio device, a USB audio device, or a Bluetooth A2DP audio device. A device - is represented by the hw_device_t struct. Like a module, each type of device - defines a more-detailed version of the generic hw_device_t that contains - function pointers for specific features of the hardware. For example, the - audio_hw_device_t struct type contains function pointers to audio device operations: -

- -
-struct audio_hw_device {
-    struct hw_device_t common;
-
-    /**
-     * used by audio flinger to enumerate what devices are supported by
-     * each audio_hw_device implementation.
-     *
-     * Return value is a bitmask of 1 or more values of audio_devices_t
-     */
-    uint32_t (*get_supported_devices)(const struct audio_hw_device *dev);
-  ...
-};
-typedef struct audio_hw_device audio_hw_device_t;
-
- -

- In addition to these standard properties, each hardware-specific HAL interface can define more of its - own features and requirements. See the HAL reference documentation - as well as the individual instructions for each HAL for more information on how to implement a specific interface. -

- -

HAL modules

-

HAL implementations are built into modules (.so) files and are dynamically linked by Android when appropriate. - You can build your modules by creating Android.mk files for each of your HAL implementations - and pointing to your source files. In general, your shared libraries must be named in a certain format, so that - they can be found and loaded properly. The naming scheme varies slightly from module to module, but they follow - the general pattern of: <module_type>.<device_name>.

- -

For more information about setting up the build for each HAL, see its respective documentation.

- -

Linux kernel

-

-Developing your device drivers is similar to developing a typical Linux device -driver. Android uses a version of the Linux kernel with a few special additions -such as wake locks (a memory management system that is more aggressive in -preserving memory), the Binder IPC driver, and other features important for a -mobile embedded platform. These additions are primarily for system functionality -and do not affect driver development. - -

-You can use any version of the kernel as long as it supports the required -features (such as the binder driver). However, we recommend using the latest -version of the Android kernel. For details on the latest Android kernel, see Building Kernels. -

+interfaces and enhancements.

+ +

Before porting Android to your hardware, take a moment to understand the +Android system architecture. +Because your drivers and the HAL interact with Android, knowing its structure +can help you navigate the many layers of code in the Android Open Source Project +(AOSP) source tree. When you are comfortable with the basic Android +architecture, review the interface-specific documentation in this section to +learn about specific HALs and how to build them for your device.

+ +

To maintain a high level of quality and offer a consistent user experience, +Android requires that all implementations meet the requirements stated in the +Compatibility Definition Document (CDD) +and that all devices pass tests in the +Compatibility Test Suite (CTS). For +details on the Android compatibility program, see +Compatibility.

diff --git a/en/devices/input/diagnostics.html b/en/devices/input/diagnostics.html deleted file mode 100644 index 160ceaed..00000000 --- a/en/devices/input/diagnostics.html +++ /dev/null @@ -1,495 +0,0 @@ - - - Dumpsys Input Diagnostics - - - - - - - - -

The dumpsys input command dumps the state of the -system’s input devices, such as keyboards and touchscreens, and the -processing of input events.

- -

Input

-

To dump the input system’s state, run the following command:

-
-adb shell dumpsys input
-
- -

Output

- -

The set of information reported varies depending on the version of Android -but consists of three sections:

- -
    -
  • Event Hub State -
  • Input Reader State -
  • Input Dispatcher State -
- -

Event Hub State

- -
-INPUT MANAGER (dumpsys input)
-
-Event Hub State:
-  BuiltInKeyboardId: -2
-  Devices:
-    -1: Virtual
-      Classes: 0x40000023
-      Path: 
-      Descriptor: a718a782d34bc767f4689c232d64d527998ea7fd
-      Location:
-      ControllerNumber: 0
-      UniqueId: 
-      Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
-      KeyLayoutFile: /system/usr/keylayout/Generic.kl
-      KeyCharacterMapFile: /system/usr/keychars/Virtual.kcm
-      ConfigurationFile:
-      HaveKeyboardLayoutOverlay: false
-    1: msm8974-taiko-mtp-snd-card Headset Jack
-      Classes: 0x00000080
-      Path: /dev/input/event5
-      Descriptor: c8e3782483b4837ead6602e20483c46ff801112c
-      Location: ALSA
-      ControllerNumber: 0
-      UniqueId:
-      Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
-      KeyLayoutFile:
-      KeyCharacterMapFile:
-      ConfigurationFile:
-      HaveKeyboardLayoutOverlay: false
-    2: msm8974-taiko-mtp-snd-card Button Jack
-      Classes: 0x00000001
-      Path: /dev/input/event4
-      Descriptor: 96fe62b244c555351ec576b282232e787fb42bab
-      Location: ALSA
-      ControllerNumber: 0
-      UniqueId:
-      Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
-      KeyLayoutFile: /system/usr/keylayout/msm8974-taiko-mtp-snd-card_Button_Jack.kl
-      KeyCharacterMapFile: /system/usr/keychars/msm8974-taiko-mtp-snd-card_Button_Jack.kcm
-      ConfigurationFile:
-      HaveKeyboardLayoutOverlay: false
-    3: hs_detect
-      Classes: 0x00000081
-      Path: /dev/input/event3
-      Descriptor: 485d69228e24f5e46da1598745890b214130dbc4
-      Location:
-      ControllerNumber: 0
-      UniqueId:
-      Identifier: bus=0x0000, vendor=0x0001, product=0x0001, version=0x0001
-      KeyLayoutFile: /system/usr/keylayout/hs_detect.kl
-      KeyCharacterMapFile: /system/usr/keychars/hs_detect.kcm
-      ConfigurationFile:
-      HaveKeyboardLayoutOverlay: false
-    4: touch_dev
-      Classes: 0x00000014
-      Path: /dev/input/event1
-      Descriptor: 4e2720e99bd2b59adae8529881343531fff7c98e
-      Location:
-      ControllerNumber: 0
-      UniqueId:
-      Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
-      KeyLayoutFile:
-      KeyCharacterMapFile:
-      ConfigurationFile: /system/usr/idc/touch_dev.idc
-      HaveKeyboardLayoutOverlay: false
-    5: qpnp_pon
-      Classes: 0x00000001
-      Path: /dev/input/event0
-      Descriptor: fb60d4f4370f5dbe8267b63d38dea852987571ab
-      Location: qpnp_pon/input0
-      ControllerNumber: 0
-      UniqueId:
-      Identifier: bus=0x0000, vendor=0x0000, product=0x0000, version=0x0000
-      KeyLayoutFile: /system/usr/keylayout/qpnp_pon.kl
-      KeyCharacterMapFile: /system/usr/keychars/qpnp_pon.kcm
-      ConfigurationFile:
-      HaveKeyboardLayoutOverlay: false
-    6: gpio-keys
-      Classes: 0x00000081
-      Path: /dev/input/event2
-      Descriptor: d2c52ff0f656fac4cd7b7a118d575e0109a9fe1c
-      Location: gpio-keys/input0
-      ControllerNumber: 0
-      UniqueId:
-      Identifier: bus=0x0019, vendor=0x0001, product=0x0001, version=0x0100
-      KeyLayoutFile: /system/usr/keylayout/gpio-keys.kl
-      KeyCharacterMapFile: /system/usr/keychars/gpio-keys.kcm
-      ConfigurationFile:
-      HaveKeyboardLayoutOverlay: false
-
- -

Things to check

- -
    -
  • All of the expected input devices are present.
  • - -
  • Each input device has an appropriate key layout file, key character map - file and input device configuration file. If the files are missing or contain - syntax errors, then they will not be loaded.
  • - -
  • Each input device is being classified correctly. The bits in the - Classes field correspond to flags in EventHub.h such - as INPUT_DEVICE_CLASS_TOUCH_MT.
  • - -
  • The BuiltInKeyboardId is correct. If the device does not - have a built-in keyboard, then the id must be -2, otherwise it - should be the id of the built-in keyboard.
  • - -
  • If you observe that the BuiltInKeyboardId is not - -2 but it should be, then you are missing a key character map file - for a special function keypad somewhere. Special function keypad devices - should have key character map files that contain just the line type - SPECIAL_FUNCTION (that's what in the tuna-gpio-keykad.kcm - file we see mentioned above).
  • -
- -

Input Reader State

-

The InputReader is responsible for decoding input events from the kernel. -Its state dump shows information about how each input device is configured -and recent state changes that have occurred, such as key presses or touches on -the touch screen.

- -

As an example, this is what a special function keypad looks like:

- -
-Input Reader State
-...
-  Device 3: tuna-gpio-keypad
-    IsExternal: false
-    Sources: 0x00000101
-    KeyboardType: 1
-    Keyboard Input Mapper:
-      Parameters:
-        AssociatedDisplayId: -1
-        OrientationAware: false
-      KeyboardType: 1
-      Orientation: 0
-      KeyDowns: 0 keys currently down
-      MetaState: 0x0
-      DownTime: 75816923828000
-
- -

Here is a touch screen. Notice all of the information about the resolution of -the device and the calibration parameters that were used.

- -
-Input Reader State
-...
-  Device 6: Melfas MMSxxx Touchscreen
-      IsExternal: false
-      Sources: 0x00001002
-      KeyboardType: 0
-      Motion Ranges:
-        X: source=0x00001002, min=0.000, max=719.001, flat=0.000, fuzz=0.999
-        Y: source=0x00001002, min=0.000, max=1279.001, flat=0.000, fuzz=0.999
-        PRESSURE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000
-        SIZE: source=0x00001002, min=0.000, max=1.000, flat=0.000, fuzz=0.000
-        TOUCH_MAJOR: source=0x00001002, min=0.000, max=1468.605, flat=0.000, fuzz=0.000
-        TOUCH_MINOR: source=0x00001002, min=0.000, max=1468.605, flat=0.000, fuzz=0.000
-        TOOL_MAJOR: source=0x00001002, min=0.000, max=1468.605, flat=0.000, fuzz=0.000
-        TOOL_MINOR: source=0x00001002, min=0.000, max=1468.605, flat=0.000, fuzz=0.000
-      Touch Input Mapper:
-        Parameters:
-          GestureMode: spots
-          DeviceType: touchScreen
-          AssociatedDisplay: id=0, isExternal=false
-          OrientationAware: true
-        Raw Touch Axes:
-          X: min=0, max=720, flat=0, fuzz=0, resolution=0
-          Y: min=0, max=1280, flat=0, fuzz=0, resolution=0
-          Pressure: min=0, max=255, flat=0, fuzz=0, resolution=0
-          TouchMajor: min=0, max=30, flat=0, fuzz=0, resolution=0
-          TouchMinor: unknown range
-          ToolMajor: unknown range
-          ToolMinor: unknown range
-          Orientation: unknown range
-          Distance: unknown range
-          TiltX: unknown range
-          TiltY: unknown range
-          TrackingId: min=0, max=65535, flat=0, fuzz=0, resolution=0
-          Slot: min=0, max=9, flat=0, fuzz=0, resolution=0
-        Calibration:
-          touch.size.calibration: diameter
-          touch.size.scale: 10.000
-          touch.size.bias: 0.000
-          touch.size.isSummed: false
-          touch.pressure.calibration: amplitude
-          touch.pressure.scale: 0.005
-          touch.orientation.calibration: none
-          touch.distance.calibration: none
-        SurfaceWidth: 720px
-        SurfaceHeight: 1280px
-        SurfaceOrientation: 0
-        Translation and Scaling Factors:
-          XScale: 0.999
-          YScale: 0.999
-          XPrecision: 1.001
-          YPrecision: 1.001
-          GeometricScale: 0.999
-          PressureScale: 0.005
-          SizeScale: 0.033
-          OrientationCenter: 0.000
-          OrientationScale: 0.000
-          DistanceScale: 0.000
-          HaveTilt: false
-          TiltXCenter: 0.000
-          TiltXScale: 0.000
-          TiltYCenter: 0.000
-          TiltYScale: 0.000
-        Last Button State: 0x00000000
-        Last Raw Touch: pointerCount=0
-        Last Cooked Touch: pointerCount=0
-
- -

Here is an external keyboard / mouse combo HID device. (This device doesn't actually -have a mouse but its HID descriptor says it does.)

- -
- Device 7: Motorola Bluetooth Wireless Keyboard
-    IsExternal: true
-    Sources: 0x00002103
-    KeyboardType: 2
-    Motion Ranges:
-      X: source=0x00002002, min=0.000, max=719.000, flat=0.000, fuzz=0.000
-      Y: source=0x00002002, min=0.000, max=1279.000, flat=0.000, fuzz=0.000
-      PRESSURE: source=0x00002002, min=0.000, max=1.000, flat=0.000, fuzz=0.000
-      VSCROLL: source=0x00002002, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
-    Keyboard Input Mapper:
-      Parameters:
-        AssociatedDisplayId: -1
-        OrientationAware: false
-      KeyboardType: 2
-      Orientation: 0
-      KeyDowns: 0 keys currently down
-      MetaState: 0x0
-      DownTime: 75868832946000
-    Cursor Input Mapper:
-      Parameters:
-        AssociatedDisplayId: 0
-        Mode: pointer
-        OrientationAware: false
-      XScale: 1.000
-      YScale: 1.000
-      XPrecision: 1.000
-      YPrecision: 1.000
-      HaveVWheel: true
-      HaveHWheel: false
-      VWheelScale: 1.000
-      HWheelScale: 1.000
-      Orientation: 0
-      ButtonState: 0x00000000
-      Down: false
-      DownTime: 0
-
-

Here is a joystick. Notice how all of the axes have been scaled to a normalized -range. The axis mapping can be configured using key layout files.

-
-Device 18: Logitech Logitech Cordless RumblePad 2
-    IsExternal: true
-    Sources: 0x01000511
-    KeyboardType: 1
-    Motion Ranges:
-      X: source=0x01000010, min=-1.000, max=1.000, flat=0.118, fuzz=0.000
-      Y: source=0x01000010, min=-1.000, max=1.000, flat=0.118, fuzz=0.000
-      Z: source=0x01000010, min=-1.000, max=1.000, flat=0.118, fuzz=0.000
-      RZ: source=0x01000010, min=-1.000, max=1.000, flat=0.118, fuzz=0.000
-      HAT_X: source=0x01000010, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
-      HAT_Y: source=0x01000010, min=-1.000, max=1.000, flat=0.000, fuzz=0.000
-    Keyboard Input Mapper:
-      Parameters:
-        AssociatedDisplayId: -1
-        OrientationAware: false
-      KeyboardType: 1
-      Orientation: 0
-      KeyDowns: 0 keys currently down
-      MetaState: 0x0
-      DownTime: 675270841000
-    Joystick Input Mapper:
-      Axes:
-        X: min=-1.00000, max=1.00000, flat=0.11765, fuzz=0.00000
-          scale=0.00784, offset=-1.00000, highScale=0.00784, highOffset=-1.00000
-          rawAxis=0, rawMin=0, rawMax=255, rawFlat=15, rawFuzz=0, rawResolution=0
-        Y: min=-1.00000, max=1.00000, flat=0.11765, fuzz=0.00000
-          scale=0.00784, offset=-1.00000, highScale=0.00784, highOffset=-1.00000
-          rawAxis=1, rawMin=0, rawMax=255, rawFlat=15, rawFuzz=0, rawResolution=0
-        Z: min=-1.00000, max=1.00000, flat=0.11765, fuzz=0.00000
-          scale=0.00784, offset=-1.00000, highScale=0.00784, highOffset=-1.00000
-          rawAxis=2, rawMin=0, rawMax=255, rawFlat=15, rawFuzz=0, rawResolution=0
-        RZ: min=-1.00000, max=1.00000, flat=0.11765, fuzz=0.00000
-          scale=0.00784, offset=-1.00000, highScale=0.00784, highOffset=-1.00000
-          rawAxis=5, rawMin=0, rawMax=255, rawFlat=15, rawFuzz=0, rawResolution=0
-        HAT_X: min=-1.00000, max=1.00000, flat=0.00000, fuzz=0.00000
-          scale=1.00000, offset=0.00000, highScale=1.00000, highOffset=0.00000
-          rawAxis=16, rawMin=-1, rawMax=1, rawFlat=0, rawFuzz=0, rawResolution=0
-        HAT_Y: min=-1.00000, max=1.00000, flat=0.00000, fuzz=0.00000
-          scale=1.00000, offset=0.00000, highScale=1.00000, highOffset=0.00000
-          rawAxis=17, rawMin=-1, rawMax=1, rawFlat=0, rawFuzz=0, rawResolution=0
-
-

At the end of the input reader dump there is some information about global configuration -parameters such as the mouse pointer speed.

-
-  Configuration:
-    ExcludedDeviceNames: []
-    VirtualKeyQuietTime: 0.0ms
-    PointerVelocityControlParameters: scale=1.000, lowThreshold=500.000, highThreshold=3000.000, acceleration=3.000
-    WheelVelocityControlParameters: scale=1.000, lowThreshold=15.000, highThreshold=50.000, acceleration=4.000
-    PointerGesture:
-      Enabled: true
-      QuietInterval: 100.0ms
-      DragMinSwitchSpeed: 50.0px/s
-      TapInterval: 150.0ms
-      TapDragInterval: 300.0ms
-      TapSlop: 20.0px
-      MultitouchSettleInterval: 100.0ms
-      MultitouchMinDistance: 15.0px
-      SwipeTransitionAngleCosine: 0.3
-      SwipeMaxWidthRatio: 0.2
-      MovementSpeedRatio: 0.8
-      ZoomSpeedRatio: 0.3
-
-

Things To Look For

-
    -
  1. -

    All of the expected input devices are present.

    -
  2. -
  3. -

    Each input device has been configured appropriately. Especially check the - touch screen and joystick axes.

    -
  4. -
-

Input Dispatcher State

-

The InputDispatcher is responsible for sending input events to applications. -Its state dump shows information about which window is being touched, the -state of the input queue, whether an ANR is in progress, and so on.

-
-Input Dispatcher State:
-  DispatchEnabled: 1
-  DispatchFrozen: 0
-  FocusedApplication: <null>
-  FocusedWindow: name='Window{3fb06dc3 u0 StatusBar}'
-  TouchStates: <no displays touched>
-  Windows:
-    0: name='Window{357bbbfe u0 SearchPanel}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x01820100, type=0x000007e8, layer=211000, frame=[0,0][1080,1920], scale=1.000000, touchableRegion=[0,0][1080,1920], inputFeatures=0x00000000, ownerPid=22674, ownerUid=10020, dispatchingTimeout=5000.000ms
-    1: name='Window{3b14c0ca u0 NavigationBar}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x01840068, type=0x000007e3, layer=201000, frame=[0,1776][1080,1920], scale=1.000000, touchableRegion=[0,1776][1080,1920], inputFeatures=0x00000000, ownerPid=22674, ownerUid=10020, dispatchingTimeout=5000.000ms
-    2: name='Window{2c7e849c u0 com.vito.lux}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x0089031a, type=0x000007d6, layer=191000, frame=[-495,-147][1575,1923], scale=1.000000, touchableRegion=[-495,-147][1575,1923], inputFeatures=0x00000000, ownerPid=4697, ownerUid=10084, dispatchingTimeout=5000.000ms
-    3: name='Window{31c9f22 u0 Heads Up}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x01820328, type=0x000007de, layer=161000, frame=[0,0][1794,750], scale=1.000000, touchableRegion=[0,0][1794,192], inputFeatures=0x00000000, ownerPid=22674, ownerUid=10020, dispatchingTimeout=5000.000ms
-    4: name='Window{3fb06dc3 u0 StatusBar}', displayId=0, paused=false, hasFocus=true, hasWallpaper=false, visible=true, canReceiveKeys=true, flags=0x81960040, type=0x000007d0, layer=151000, frame=[0,0][1080,1920], scale=1.000000, touchableRegion=[0,0][1080,1920], inputFeatures=0x00000004, ownerPid=22674, ownerUid=10020, dispatchingTimeout=5000.000ms
-    5: name='Window{278c1d65 u0 KeyguardScrim}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x01110900, type=0x000007ed, layer=131000, frame=[0,0][1080,1776], scale=1.000000, touchableRegion=[0,0][1080,1776], inputFeatures=0x00000000, ownerPid=745, ownerUid=1000, dispatchingTimeout=5000.000ms
-    6: name='Window{869f213 u0 com.android.systemui.ImageWallpaper}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=true, canReceiveKeys=false, flags=0x00000318, type=0x000007dd, layer=21025, frame=[0,0][2328,1920], scale=1.000000, touchableRegion=[0,0][2328,1920], inputFeatures=0x00000000, ownerPid=22674, ownerUid=10020, dispatchingTimeout=5000.000ms
-    7: name='Window{16ab6320 u0 InputMethod}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x01800108, type=0x000007db, layer=21020, frame=[0,75][1080,1920], scale=1.000000, touchableRegion=[0,986][1080,1920], inputFeatures=0x00000000, ownerPid=8409, ownerUid=10056, dispatchingTimeout=5000.000ms
-    8: name='Window{cf4ff0b u0 com.google.android.googlequicksearchbox/com.google.android.launcher.GEL}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x81910120, type=0x00000001, layer=21015, frame=[0,0][1080,1920], scale=1.000000, touchableRegion=[0,0][1080,1920], inputFeatures=0x00000000, ownerPid=14722, ownerUid=10022, dispatchingTimeout=5000.000ms
-    9: name='Window{1a7be08a u0 com.android.systemui/com.android.systemui.recents.RecentsActivity EXITING}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x81910120, type=0x00000001, layer=21010, frame=[0,0][1080,1920], scale=1.000000, touchableRegion=[0,0][1080,1920], inputFeatures=0x00000000, ownerPid=22674, ownerUid=10020, dispatchingTimeout=5000.000ms
-    10: name='Window{2280455f u0 com.google.android.gm/com.google.android.gm.ConversationListActivityGmail}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x81810120, type=0x00000001, layer=21005, frame=[0,0][1080,1920], scale=1.000000, touchableRegion=[0,0][1080,1920], inputFeatures=0x00000000, ownerPid=9897, ownerUid=10070, dispatchingTimeout=5000.000ms
-    11: name='Window{657fee5 u0 com.mobilityware.freecell/com.mobilityware.freecell.FreeCell}', displayId=0, paused=false, hasFocus=false, hasWallpaper=false, visible=false, canReceiveKeys=false, flags=0x01810520, type=0x00000001, layer=21000, frame=[0,0][1080,1776], scale=1.000000, touchableRegion=[0,0][1080,1920], inputFeatures=0x00000000, ownerPid=3189, ownerUid=10085, dispatchingTimeout=5000.000ms
-  MonitoringChannels:
-    0: 'WindowManager (server)'
-  RecentQueue: length=10
-    MotionEvent(deviceId=4, source=0x00001002, action=2, flags=0x00000000, metaState=0x00000000, buttonState=0x00000000, edgeFlags=0x00000000, xPrecision=1.0, yPrecision=1.0, displayId=0, pointers=[0: (335.0, 1465.0)]), policyFlags=0x62000000, age=217264.0ms
-    MotionEvent(deviceId=4, source=0x00001002, action=1, flags=0x00000000, metaState=0x00000000, buttonState=0x00000000, edgeFlags=0x00000000, xPrecision=1.0, yPrecision=1.0, displayId=0, pointers=[0: (335.0, 1465.0)]), policyFlags=0x62000000, age=217255.7ms
-    MotionEvent(deviceId=4, source=0x00001002, action=0, flags=0x00000000, metaState=0x00000000, buttonState=0x00000000, edgeFlags=0x00000000, xPrecision=1.0, yPrecision=1.0, displayId=0, pointers=[0: (330.0, 1283.0)]), policyFlags=0x62000000, age=216805.0ms
-    MotionEvent(deviceId=4, source=0x00001002, action=2, flags=0x00000000, metaState=0x00000000, buttonState=0x00000000, edgeFlags=0x00000000, xPrecision=1.0, yPrecision=1.0, displayId=0, pointers=[0: (330.0, 1287.0)]), policyFlags=0x62000000, age=216788.3ms
-    MotionEvent(deviceId=4, source=0x00001002, action=2, flags=0x00000000, metaState=0x00000000, buttonState=0x00000000, edgeFlags=0x00000000, xPrecision=1.0, yPrecision=1.0, displayId=0, pointers=[0: (331.0, 1297.0)]), policyFlags=0x62000000, age=216780.0ms
-    MotionEvent(deviceId=4, source=0x00001002, action=2, flags=0x00000000, metaState=0x00000000, buttonState=0x00000000, edgeFlags=0x00000000, xPrecision=1.0, yPrecision=1.0, displayId=0, pointers=[0: (332.0, 1316.0)]), policyFlags=0x62000000, age=216771.6ms
-    MotionEvent(deviceId=4, source=0x00001002, action=2, flags=0x00000000, metaState=0x00000000, buttonState=0x00000000, edgeFlags=0x00000000, xPrecision=1.0, yPrecision=1.0, displayId=0, pointers=[0: (333.0, 1340.0)]), policyFlags=0x62000000, age=216763.3ms
-    MotionEvent(deviceId=4, source=0x00001002, action=2, flags=0x00000000, metaState=0x00000000, buttonState=0x00000000, edgeFlags=0x00000000, xPrecision=1.0, yPrecision=1.0, displayId=0, pointers=[0: (333.0, 1362.0)]), policyFlags=0x62000000, age=216755.0ms
-    MotionEvent(deviceId=4, source=0x00001002, action=2, flags=0x00000000, metaState=0x00000000, buttonState=0x00000000, edgeFlags=0x00000000, xPrecision=1.0, yPrecision=1.0, displayId=0, pointers=[0: (332.0, 1384.0)]), policyFlags=0x62000000, age=216747.2ms
-    MotionEvent(deviceId=4, source=0x00001002, action=1, flags=0x00000000, metaState=0x00000000, buttonState=0x00000000, edgeFlags=0x00000000, xPrecision=1.0, yPrecision=1.0, displayId=0, pointers=[0: (332.0, 1384.0)]), policyFlags=0x62000000, age=216738.9ms
-  PendingEvent: <none>
-  InboundQueue: <empty>
-  ReplacedKeys: <empty>
-  Connections:
-    0: channelName='WindowManager (server)', windowName='monitor', status=NORMAL, monitor=true, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    1: channelName='278c1d65 KeyguardScrim (server)', windowName='Window{278c1d65 u0 KeyguardScrim}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    2: channelName='357bbbfe SearchPanel (server)', windowName='Window{357bbbfe u0 SearchPanel}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    3: channelName='869f213 com.android.systemui.ImageWallpaper (server)', windowName='Window{869f213 u0 com.android.systemui.ImageWallpaper}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    4: channelName='3fb06dc3 StatusBar (server)', windowName='Window{3fb06dc3 u0 StatusBar}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    5: channelName='2c7e849c  (server)', windowName='Window{2c7e849c u0 com.vito.lux}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    6: channelName='cf4ff0b com.google.android.googlequicksearchbox/com.google.android.launcher.GEL (server)', windowName='Window{cf4ff0b 
-u0 com.google.android.googlequicksearchbox/com.google.android.launcher.GEL}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    7: channelName='2280455f com.google.android.gm/com.google.android.gm.ConversationListActivityGmail (server)', windowName='Window{2280455f u0 com.google.android.gm/com.google.android.gm.ConversationListActivityGmail}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    8: channelName='1a7be08a com.android.systemui/com.android.systemui.recents.RecentsActivity (server)', windowName='Window{1a7be08a u0 com.android.systemui/com.android.systemui.recents.RecentsActivity EXITING}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    9: channelName='3b14c0ca NavigationBar (server)', windowName='Window{3b14c0ca u0 NavigationBar}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    10: channelName='16ab6320 InputMethod (server)', windowName='Window{16ab6320 u0 InputMethod}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    11: channelName='657fee5 com.mobilityware.freecell/com.mobilityware.freecell.FreeCell (server)', windowName='Window{657fee5 u0 com.mobilityware.freecell/com.mobilityware.freecell.FreeCell}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    12: channelName='31c9f22 Heads Up (server)', windowName='Window{31c9f22 u0 Heads Up}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-  AppSwitch: not pending
-    7: channelName='2280455f com.google.android.gm/com.google.android.gm.ConversationListActivityGmail (server)', windowName='Window{2280455f u0 com.google.android.gm/com.google.android.gm.ConversationListActivityGmail}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    8: channelName='1a7be08a com.android.systemui/com.android.systemui.recents.RecentsActivity (server)', windowName='Window{1a7be08a u0 com.android.systemui/com.android.systemui.recents.RecentsActivity EXITING}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    9: channelName='3b14c0ca NavigationBar (server)', windowName='Window{3b14c0ca u0 NavigationBar}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    10: channelName='16ab6320 InputMethod (server)', windowName='Window{16ab6320 u0 InputMethod}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    11: channelName='657fee5 com.mobilityware.freecell/com.mobilityware.freecell.FreeCell (server)', windowName='Window{657fee5 u0 com.mobilityware.freecell/com.mobilityware.freecell.FreeCell}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-    12: channelName='31c9f22 Heads Up (server)', windowName='Window{31c9f22 u0 Heads Up}', status=NORMAL, monitor=false, inputPublisherBlocked=false
-      OutboundQueue: <empty>
-      WaitQueue: <empty>
-  AppSwitch: not pending
-  Configuration:
-    KeyRepeatDelay: 50.0ms
-    KeyRepeatTimeout: 500.0ms
-
-

Things To Look For

-
    -
  1. In general, all input events are being processed as expected.
  2. -
  3. If you touch the touch screen and run dumpsys at the same time, - then the TouchStates line should show the window that - you are touching.
  4. -
- - - - diff --git a/en/devices/input/migration-guide.html b/en/devices/input/migration-guide.html index 4ddc8274..6f50f004 100644 --- a/en/devices/input/migration-guide.html +++ b/en/devices/input/migration-guide.html @@ -44,8 +44,9 @@ USB product id / vendor id or by device name.

function input devices. These files should simple contain a line to set the keyboard type to SPECIAL_FUNCTION.

A good way to ensure that all built-in input devices are appropriately configured -is to run Dumpsys and look for devices that -are inappropriately using Generic.kcm.

+is to run Dumpsys +and look for devices that are inappropriately using Generic.kcm.

Migrating to Android Honeycomb 3.2

In Honeycomb 3.2, we added support for joysticks and extended the key layout file format to enable joystick axis mapping.

diff --git a/en/devices/storage/adoptable.html b/en/devices/storage/adoptable.html index 7bef04da..7d167628 100644 --- a/en/devices/storage/adoptable.html +++ b/en/devices/storage/adoptable.html @@ -28,10 +28,16 @@ these accessories were historically limited to simple file storage, due to their expected impermanence and the minimal data protection offered to traditional external storage. -Android 6.0 introduces the ability to +Android 6.0 introduced the ability to adopt external storage media to act like internal storage.

+

Warning: File-based encryption cannot +currently be used together with adoptable storage. On devices using file-based +encryption, new storage media (such as an SD card) must be used as traditional storage.

+

When external storage media is adopted, it’s formatted and encrypted to only work with a single Android device at a time. Because the media is strongly tied to the Android device that adopted it, it can safely store both apps and diff --git a/en/devices/tech/debug/dumpsys.html b/en/devices/tech/debug/dumpsys.html deleted file mode 100644 index e87722ba..00000000 --- a/en/devices/tech/debug/dumpsys.html +++ /dev/null @@ -1,109 +0,0 @@ - - - Dumpsys System Diagnostics - - - - - - - - -

The dumpsys tool runs on the device and provides information about the status -of system services.

- -

How to use dumpsys

- -

If you run adb shell dumpsys, you’ll get diagnostic output for -all system services, which is usually more than you want. For more manageable -output, specify the service you would like to examine.

- -

For example, the following command:

- -
-adb shell dumpsys input
-
- -

provides system data for input components such as touchscreens or built-in -keyboards.

- -

List of system services

- - -

For a complete list of system services that you can use with dumpsys, try the -following command:

- -
-adb shell dumpsys -l
-
- -

Example output:

-
-Currently running services:
-  DockObserver
-  SurfaceFlinger
-  accessibility
-  account
-  activity
-  alarm
-  android.security.keystore
-  appops
-  appwidget
-  assetatlas
-  audio
-  backup
-  battery
-  batteryproperties
-  batterystats
-  bluetooth_manager
-  clipboard
-  connectivity
-  consumer_ir
-  content
-  country_detector
-  cpuinfo
-  dbinfo
-...
-
- -

Dumpsys command-line options

- -

Command-line options are different for different services. Here are a few -common ones:

- -
    -
  • For many services, you can append -h to see the help -text. -
  • For some services, you can append -c to view the data in -a machine-friendly format.
- -

Understanding diagnostic output

- -

For details on some of the most commonly used dumpsys services, see the -following articles:

- - - - - - diff --git a/en/devices/tech/debug/index.html b/en/devices/tech/debug/index.html index 268f24ee..5400bb9e 100644 --- a/en/devices/tech/debug/index.html +++ b/en/devices/tech/debug/index.html @@ -30,10 +30,10 @@ platform-level features.

This page covers use of debuggerd, a daemon process for collecting error information after applications crash. Other pages in this section explore system services with -Dumpsys, viewing +Dumpsys, viewing native memory, -network, and -RAM usage, using +network, and +RAM usage, using AddressSanitizer to detect memory bugs in native code, evaluating performance issues (includes diff --git a/en/devices/tech/debug/netstats.html b/en/devices/tech/debug/netstats.html deleted file mode 100644 index 78ddef02..00000000 --- a/en/devices/tech/debug/netstats.html +++ /dev/null @@ -1,151 +0,0 @@ - - - Viewing Network Usage Data - - - - - - - - -

Using the command adb shell dumpsys netstats detail provides -network usage statistics collected since the device booted up.

- -

Input

- - -

To view network usage statistics, run the following command:

- -
-adb shell dumpsys netstats detail
-
- - -

Output

- - -

The set of information reported varies depending on the version of Android but -consists of several sections:

- -
    -
  • Active interfaces -
  • Active UID interfaces -
  • Dev statistics -
  • Xt statistics -
  • UID statistics (sometimes also called "Detailed UID statistics") -
  • UID tag statistics -
- -

Active interfaces/Active UID interfaces

- -

Here is sample output for the active interfaces and active UID interfaces -sections:

- -
-Active interfaces:
-  iface=wlan0 ident=[{type=WIFI, subType=COMBINED, networkId="GoogleGuest"}]
-Active UID interfaces:
-  iface=wlan0 ident=[{type=WIFI, subType=COMBINED, networkId="GoogleGuest"}]
-
- - -

This shows network statistics for the whole device. In most cases, the -information in these two section is the same.

- -

Dev statistics/Xt statistics

- - -

Here is sample output for the Dev statistics section:

- -
-Dev stats:
-  Pending bytes: 170775
-  Complete history:
-  ident=[[type=MOBILE_HIPRI, subType=COMBINED, subscriberId=311111...]] uid=-1 set=ALL tag=0x0
-    NetworkStatsHistory: bucketDuration=3600000
-      bucketStart=1406138400000 activeTime=3603995 rxBytes=19467 rxPackets=53 txBytes=7500 txPackets=61 operations=0
-      bucketStart=1406142000000 activeTime=20730 rxBytes=25403 rxPackets=66 txBytes=9140 txPackets=74 operations=0
-      bucketStart=1406145600000 activeTime=29161 rxBytes=9263 rxPackets=37 txBytes=5180 txPackets=38 operations=0
-      bucketStart=1406149200000 activeTime=9054 rxBytes=12387 rxPackets=31 txBytes=4052 txPackets=35 operations=0
-  ident=[[type=WIFI, subType=COMBINED, networkId="MySSID"]] uid=-1 set=ALL tag=0x0
-    NetworkStatsHistory: bucketDuration=3600000
-      bucketStart=1406138400000 activeTime=4811082 rxBytes=335913292 rxPackets=265144 txBytes=9729261 txPackets=117220 operations=0
-      bucketStart=1406142000000 activeTime=3513477 rxBytes=1193606876 rxPackets=956855 txBytes=29450792 txPackets=306634 operations=0
-      bucketStart=1406145600000 activeTime=3297986 rxBytes=729381849 rxPackets=586396 txBytes=24247211 txPackets=237438 operations=0
-      bucketStart=1406149200000 activeTime=3580941 rxBytes=57168575 rxPackets=51610 txBytes=5291167 txPackets=29260 operations=0
-  ident=[[type=WIFI, subType=COMBINED, networkId="MySecondSSID"]] uid=-1 set=ALL tag=0x0
-    NetworkStatsHistory: bucketDuration=3600000
-
- -

UID stats

- -
-UID stats:
-  Pending bytes: 744
-  Complete history:
-  ident=[[type=MOBILE_SUPL, subType=COMBINED, subscriberId=311111...], [type=MOBILE, subType=COMBINED, subscriberId=311111...]] uid=10007 set=DEFAULT tag=0x0
-    NetworkStatsHistory: bucketDuration=7200000
-      bucketStart=1406167200000 activeTime=7200000 rxBytes=4666 rxPackets=7 txBytes=1597 txPackets=10 operations=0
-  ident=[[type=WIFI, subType=COMBINED, networkId="MySSID"]] uid=10007 set=DEFAULT tag=0x0
-    NetworkStatsHistory: bucketDuration=7200000
-      bucketStart=1406138400000 activeTime=7200000 rxBytes=17086802 rxPackets=15387 txBytes=1214969 txPackets=8036 operations=28
-      bucketStart=1406145600000 activeTime=7200000 rxBytes=2396424 rxPackets=2946 txBytes=464372 txPackets=2609 operations=70
-      bucketStart=1406152800000 activeTime=7200000 rxBytes=200907 rxPackets=606 txBytes=187418 txPackets=739 operations=0
-      bucketStart=1406160000000 activeTime=7200000 rxBytes=826017 rxPackets=1126 txBytes=267342 txPackets=1175 operations=35
-
- - -

Interpreting the results

- - -

To find the UID for your application, you can run this command: -adb shell dumpsys package <your package name>. -Then look for the line labeled userId.

- -

In our example, suppose we are trying to find network usage for our app -“com.example.myapp”. We would run the following command:

- -
-adb shell dumpsys package com.example.myapp | grep userId
-
-

This returns the following output:

-
-    userId=10007 gids=[3003, 1028, 1015]
-
- -

Looking at the dump above, we look for lines that have uid=10007. Two such -lines exist, the first indicating a mobile connection, and the second a Wi-Fi -connection. Underneath each line, the number of bytes and packets sent and -received can be seen, bucketed into two-hour windows.

- -

A bit more explanation:

- -
    -
  • set=DEFAULT indicates foreground - network usage, while set=BACKGROUND indicates -background usage. set=ALL implies both. -
  • tag=0x0 indicates the socket tag associated with the traffic. -
  • rxBytes and rxPackets represent received bytes and received packets in the -corresponding time interval. -
  • txBytes and txPackets represent sent (transmitted) bytes and sent packets in -the corresponding time interval. -
- - - - diff --git a/en/devices/tech/debug/procstats.html b/en/devices/tech/debug/procstats.html deleted file mode 100644 index 285ea7e0..00000000 --- a/en/devices/tech/debug/procstats.html +++ /dev/null @@ -1,371 +0,0 @@ - - - Viewing RAM Usage Data (procstats) - - - - - - - - -

The procstats tool is used to analyze application memory usage over time (versus at a -particular snapshot in time, like meminfo). Its state dump displays statistics about every application’s runtime, -proportional set size (PSS) and unique set size (USS).

- -

Input

- - -

To get application memory usage stats for the last three hours, in -human-readable form, run the following command:

- -
-adb shell dumpsys procstats --hours 3
-
- - - -

Output

- - -

As can be seen in the example below, percentages display what percentage of -time the application was running, while the numbers following show PSS and USS -as minPSS-avgPSS-maxPSS/minUSS-avgUSS-maxUSS over samples.

- -
-AGGREGATED OVER LAST 3 HOURS:
-  * com.android.systemui / u0a20 / v22:
-           TOTAL: 100% (109MB-126MB-159MB/108MB-125MB-157MB over 18)
-      Persistent: 100% (109MB-126MB-159MB/108MB-125MB-157MB over 18)
-  * com.android.nfc / 1027 / v22:
-           TOTAL: 100% (17MB-17MB-17MB/16MB-16MB-16MB over 18)
-      Persistent: 100% (17MB-17MB-17MB/16MB-16MB-16MB over 18)
-  * android.process.acore / u0a4 / v22:
-           TOTAL: 100% (14MB-15MB-15MB/14MB-14MB-14MB over 20)
-          Imp Fg: 100% (14MB-15MB-15MB/14MB-14MB-14MB over 20)
-  * com.google.android.inputmethod.latin / u0a56 / v21483:
-           TOTAL: 100% (57MB-59MB-59MB/56MB-58MB-58MB over 19)
-          Imp Fg: 100% (57MB-59MB-59MB/56MB-58MB-58MB over 19)
-  * com.redbend.vdmc / 1001 / v1:
-           TOTAL: 100% (9.5MB-9.6MB-9.7MB/8.8MB-8.9MB-9.0MB over 18)
-      Persistent: 100% (9.5MB-9.6MB-9.7MB/8.8MB-8.9MB-9.0MB over 18)
-  * com.android.phone / 1001 / v22:
-           TOTAL: 100% (19MB-22MB-27MB/18MB-21MB-26MB over 18)
-      Persistent: 100% (19MB-22MB-27MB/18MB-21MB-26MB over 18)
-  * com.google.android.gms.persistent / u0a8 / v7319438:
-           TOTAL: 100% (32MB-35MB-40MB/30MB-33MB-37MB over 19)
-          Imp Fg: 100% (32MB-35MB-40MB/30MB-33MB-37MB over 19)
-  * com.android.bluetooth / 1002 / v22:
-           TOTAL: 100% (9.3MB-9.7MB-10MB/8.5MB-8.9MB-9.2MB over 19)
-          Imp Fg: 100% (9.3MB-9.7MB-10MB/8.5MB-8.9MB-9.2MB over 19)
-  * com.google.android.googlequicksearchbox:interactor / u0a22 / v300404573:
-           TOTAL: 100% (3.4MB-3.5MB-3.6MB/2.8MB-2.8MB-2.8MB over 19)
-          Imp Fg: 100% (3.4MB-3.5MB-3.6MB/2.8MB-2.8MB-2.8MB over 19)
-  * com.google.process.gapps / u0a8 / v7306438:
-           TOTAL: 100% (23MB-24MB-28MB/21MB-22MB-26MB over 19)
-          Imp Fg: 100% (23MB-24MB-28MB/21MB-22MB-26MB over 19)
-  * com.vito.lux / u0a84 / v237:
-           TOTAL: 100% (32MB-48MB-83MB/31MB-47MB-82MB over 134)
-          Imp Fg: 100% (32MB-48MB-83MB/31MB-47MB-82MB over 134)
-         Service: 0.05%
-  * system / 1000 / v22:
-           TOTAL: 100% (79MB-85MB-102MB/78MB-83MB-100MB over 18)
-      Persistent: 100% (79MB-85MB-102MB/78MB-83MB-100MB over 18)
-  * com.rhapsody / u0a83 / v125:
-           TOTAL: 100% (7.9MB-12MB-19MB/6.9MB-11MB-17MB over 15)
-         Service: 100% (7.9MB-12MB-19MB/6.9MB-11MB-17MB over 15)
-      Service Rs: 0.04%
-  * com.qualcomm.qcrilmsgtunnel / 1001 / v22:
-           TOTAL: 100% (2.5MB-2.6MB-2.7MB/1.7MB-1.8MB-1.9MB over 15)
-         Service: 100% (2.5MB-2.6MB-2.7MB/1.7MB-1.8MB-1.9MB over 15)
-      Service Rs: 0.13%
-  * com.amazon.kindle / u0a82 / v1143472216:
-           TOTAL: 100% (44MB-54MB-77MB/43MB-52MB-74MB over 17)
-         Service: 100% (44MB-54MB-77MB/43MB-52MB-74MB over 17)
-      Service Rs: 0.04%
-  * com.outplaylab.VideoDiet2 / u0a93 / v21:
-           TOTAL: 100% (2.8MB-3.1MB-4.0MB/2.0MB-2.2MB-3.0MB over 15)
-         Service: 100% (2.8MB-3.1MB-4.0MB/2.0MB-2.2MB-3.0MB over 15)
-      Service Rs: 0.03%
-  * android.process.media / u0a6 / v800:
-           TOTAL: 99% (4.6MB-5.9MB-8.1MB/3.4MB-4.7MB-6.7MB over 25)
-          Imp Fg: 0.02%
-         Service: 99% (4.6MB-5.9MB-8.1MB/3.4MB-4.7MB-6.7MB over 25)
-      Service Rs: 0.02%
-        (Cached): 0.94%
-  * kr.sira.sound / u0a108 / v41:
-           TOTAL: 77% (117MB-191MB-219MB/111MB-187MB-213MB over 68)
-             Top: 77% (117MB-191MB-219MB/111MB-187MB-213MB over 68)
-      (Last Act): 18% (58MB-127MB-161MB/53MB-123MB-158MB over 3)
-        (Cached): 0.06%
-  * com.google.android.gms / u0a8 / v7319438:
-           TOTAL: 37% (41MB-45MB-57MB/38MB-42MB-53MB over 23)
-             Top: 13% (41MB-46MB-57MB/39MB-42MB-53MB over 16)
-          Imp Fg: 13% (41MB-44MB-47MB/39MB-41MB-44MB over 5)
-          Imp Bg: 0.38%
-         Service: 11% (42MB-42MB-42MB/38MB-38MB-38MB over 2)
-        Receiver: 0.03%
-      (Last Act): 2.0% (38MB-38MB-38MB/36MB-36MB-36MB over 1)
-        (Cached): 61% (39MB-40MB-43MB/37MB-37MB-40MB over 28)
-  * com.google.android.googlequicksearchbox / u0a22 / v300404573:
-           TOTAL: 22% (129MB-153MB-162MB/125MB-149MB-156MB over 20)
-             Top: 22% (129MB-153MB-162MB/125MB-149MB-156MB over 20)
-          Imp Bg: 0.04%
-        Receiver: 0.01%
-          (Home): 78% (75MB-84MB-122MB/74MB-82MB-117MB over 12)
-  * com.google.android.apps.thehub / u0a102 / v12:
-           TOTAL: 21% (6.4MB-7.6MB-8.7MB/4.8MB-6.0MB-7.2MB over 2)
-         Service: 21% (6.4MB-7.6MB-8.7MB/4.8MB-6.0MB-7.2MB over 2)
-  * com.google.android.talk / u0a54 / v22314462:
-           TOTAL: 9.3%
-             Top: 0.04%
-         Service: 9.3%
-        Receiver: 0.01%
-      (Last Act): 3.9% (69MB-70MB-71MB/67MB-68MB-69MB over 6)
-        (Cached): 87% (42MB-53MB-77MB/40MB-51MB-74MB over 137)
-  * com.google.android.apps.plus / u0a67 / v413836278:
-           TOTAL: 8.2% (9.6MB-12MB-18MB/8.1MB-11MB-16MB over 3)
-          Imp Bg: 0.10%
-         Service: 8.0% (9.6MB-12MB-18MB/8.1MB-11MB-16MB over 3)
-        Receiver: 0.05%
-        (Cached): 59% (7.8MB-19MB-33MB/6.8MB-18MB-31MB over 22)
-  * com.android.providers.calendar / u0a2 / v22:
-           TOTAL: 3.5% (7.3MB-7.7MB-8.0MB/5.9MB-6.5MB-6.9MB over 10)
-          Imp Bg: 0.32%
-         Service: 3.2% (7.3MB-7.7MB-8.0MB/5.9MB-6.5MB-6.9MB over 10)
-        Receiver: 0.01%
-        (Cached): 69% (4.7MB-6.6MB-7.8MB/3.5MB-5.5MB-6.7MB over 23)
-  * com.amazon.mShop.android / u0a104 / v5030102:
-           TOTAL: 2.7% (25MB-40MB-47MB/24MB-37MB-43MB over 6)
-         Service: 2.6% (25MB-40MB-47MB/24MB-37MB-43MB over 6)
-        Receiver: 0.15%
-        (Cached): 97% (25MB-33MB-48MB/24MB-31MB-44MB over 46)
-  * com.google.android.gm / u0a70 / v51001620:
-           TOTAL: 2.2% (209MB-209MB-209MB/203MB-203MB-203MB over 1)
-             Top: 0.48% (209MB-209MB-209MB/203MB-203MB-203MB over 1)
-          Imp Bg: 0.70%
-         Service: 1.0%
-        Receiver: 0.01%
-      (Last Act): 0.02%
-        (Cached): 94% (25MB-67MB-116MB/23MB-63MB-109MB over 61)
-  * com.google.android.googlequicksearchbox:search / u0a22 / v300404573:
-           TOTAL: 2.1% (66MB-66MB-66MB/63MB-63MB-63MB over 1)
-             Top: 1.4% (66MB-66MB-66MB/63MB-63MB-63MB over 1)
-          Imp Fg: 0.01%
-         Service: 0.66%
-        Receiver: 0.02%
-        (Cached): 98% (52MB-59MB-79MB/50MB-56MB-77MB over 56)
-  * com.google.android.calendar / u0a31 / v2015030452:
-           TOTAL: 1.4%
-          Imp Bg: 0.33%
-         Service: 1.1%
-        Receiver: 0.02%
-        (Cached): 80% (7.4MB-12MB-17MB/5.8MB-9.8MB-14MB over 18)
-  * com.android.vending / u0a16 / v80341100:
-           TOTAL: 1.3% (88MB-154MB-220MB/85MB-151MB-217MB over 2)
-             Top: 1.3% (88MB-154MB-220MB/85MB-151MB-217MB over 2)
-         Service: 0.06%
-        Receiver: 0.02%
-      (Last Act): 4.4% (46MB-68MB-89MB/45MB-66MB-87MB over 2)
-        (Cached): 11% (15MB-74MB-133MB/13MB-72MB-131MB over 2)
-  * com.google.android.apps.photos / u0a65 / v5616:
-           TOTAL: 0.94%
-         Service: 0.90%
-        Receiver: 0.04%
-        (Cached): 80% (9.2MB-12MB-17MB/7.5MB-11MB-15MB over 20)
-  * com.amazon.avod.thirdpartyclient / u0a107 / v451210:
-           TOTAL: 0.52%
-         Service: 0.49%
-        Receiver: 0.03%
-        (Cached): 97% (14MB-24MB-34MB/13MB-22MB-31MB over 40)
-  * com.google.android.gms.wearable / u0a8 / v7319438:
-           TOTAL: 0.51%
-          Imp Fg: 0.47%
-         Service: 0.04%
-        (Cached): 65% (4.7MB-6.5MB-8.2MB/3.6MB-4.2MB-5.4MB over 10)
-  * com.amazon.mShop.android.shopping / u0a103 / v5040011:
-           TOTAL: 0.50%
-         Service: 0.37%
-        Receiver: 0.13%
-        (Cached): 77% (13MB-17MB-21MB/11MB-15MB-19MB over 15)
-  * com.google.android.gms:car / u0a8 / v7319438:
-           TOTAL: 0.49% (7.1MB-7.1MB-7.1MB/4.3MB-4.3MB-4.3MB over 1)
-             Top: 0.05%
-          Imp Fg: 0.39% (7.1MB-7.1MB-7.1MB/4.3MB-4.3MB-4.3MB over 1)
-         Service: 0.05%
-        (Cached): 0.60% (6.6MB-6.6MB-6.6MB/3.6MB-3.6MB-3.6MB over 1)
-  * com.amazon.mp3 / u0a92 / v4033010:
-           TOTAL: 0.46%
-         Service: 0.43%
-        Receiver: 0.03%
-        (Cached): 84% (12MB-16MB-23MB/9.7MB-14MB-21MB over 25)
-  * com.android.chrome:privileged_process1 / u0a34 / v2272096:
-           TOTAL: 0.43%
-         Service: 0.04%
-      Service Rs: 0.39%
-        (Cached): 100% (2.9MB-4.0MB-4.9MB/1.7MB-2.9MB-3.9MB over 18)
-  * com.google.android.dialer / u0a10 / v20100:
-           TOTAL: 0.39% (93MB-93MB-93MB/89MB-89MB-89MB over 1)
-             Top: 0.23% (93MB-93MB-93MB/89MB-89MB-89MB over 1)
-          Imp Fg: 0.16%
-        (Cached): 16% (5.0MB-31MB-57MB/4.1MB-29MB-54MB over 2)
-  * com.google.android.apps.maps / u0a58 / v906101124:
-           TOTAL: 0.38%
-         Service: 0.33%
-        Receiver: 0.05%
-        (Cached): 69% (8.7MB-15MB-18MB/7.2MB-14MB-17MB over 8)
-  * com.google.android.youtube / u0a80 / v101451214:
-           TOTAL: 0.26%
-         Service: 0.26%
-        (Cached): 36% (15MB-22MB-29MB/13MB-19MB-27MB over 5)
-  * com.google.android.apps.fitness / u0a45 / v2015109100:
-           TOTAL: 0.26%
-         Service: 0.23%
-        Receiver: 0.02%
-        (Cached): 82% (3.9MB-6.4MB-9.2MB/2.8MB-5.3MB-7.9MB over 19)
-  * com.google.android.apps.enterprise.dmagent / u0a37 / v630:
-           TOTAL: 0.06%
-         Service: 0.06%
-        Receiver: 0.01%
-        (Cached): 2.2% (6.5MB-7.4MB-8.2MB/4.8MB-5.8MB-6.8MB over 2)
-  * com.audible.application / u0a95 / v3068:
-           TOTAL: 0.06%
-        Receiver: 0.06%
-        (Cached): 34% (14MB-16MB-19MB/11MB-14MB-17MB over 7)
-  * com.android.defcontainer / u0a5 / v22:
-           TOTAL: 0.06%
-          Imp Fg: 0.06%
-        (Cached): 0.12%
-  * com.google.android.music:main / u0a60 / v1847:
-           TOTAL: 0.04%
-             Top: 0.01%
-         Service: 0.02%
-        Receiver: 0.01%
-        (Cached): 9.8% (10MB-12MB-14MB/8.3MB-9.6MB-11MB over 2)
-  * com.google.android.apps.magazines / u0a61 / v2015040100:
-           TOTAL: 0.03%
-             Top: 0.02%
-        Receiver: 0.01%
-        (Cached): 8.7% (12MB-14MB-16MB/9.7MB-11MB-13MB over 2)
-  * com.google.android.videos / u0a77 / v37191:
-           TOTAL: 0.03%
-          Imp Fg: 0.01%
-         Service: 0.02%
-        (Cached): 1.3% (11MB-12MB-13MB/9.1MB-10MB-12MB over 2)
-  * com.google.android.apps.books / u0a28 / v30336:
-           TOTAL: 0.03%
-          Imp Fg: 0.01%
-         Service: 0.02%
-        (Cached): 1.3% (7.9MB-9.6MB-11MB/6.3MB-8.0MB-9.7MB over 2)
-  * com.google.android.keep / u0a71 / v3115:
-           TOTAL: 0.02%
-         Service: 0.01%
-        Receiver: 0.01%
-        (Cached): 11% (6.3MB-8.7MB-9.6MB/5.1MB-7.4MB-8.3MB over 4)
-  * com.android.chrome / u0a34 / v2272096:
-           TOTAL: 0.02%
-         Service: 0.01%
-        Receiver: 0.02%
-        (Cached): 90% (5.1MB-70MB-96MB/3.4MB-66MB-92MB over 15)
-  * com.google.android.apps.gcs / u0a94 / v14:
-           TOTAL: 0.02%
-         Service: 0.02%
-        (Cached): 17% (5.8MB-5.9MB-6.0MB/4.6MB-4.7MB-4.8MB over 2)
-  * com.android.chrome:privileged_process0 / u0a34 / v2272096:
-           TOTAL: 0.02%
-         Service: 0.01%
-        Receiver: 0.01%
-        (Cached): 73% (162MB-163MB-164MB/157MB-157MB-157MB over 13)
-  * com.android.chrome:sandboxed_process12 / u0a34 / v2272096:
-           TOTAL: 0.02%
-         Service: 0.01%
-        Receiver: 0.01%
-        (Cached): 73% (48MB-49MB-51MB/46MB-47MB-50MB over 13)
-  * com.google.android.apps.docs / u0a40 / v51410735:
-           TOTAL: 0.01%
-        Receiver: 0.01%
-        (Cached): 0.45% (10MB-10MB-10MB/9.3MB-9.3MB-9.3MB over 1)
-  * com.google.android.deskclock / u0a38 / v303:
-           TOTAL: 0.01%
-        Receiver: 0.01%
-        (Cached): 82% (2.5MB-3.3MB-4.3MB/1.7MB-2.3MB-3.2MB over 13)
-  * com.google.android.gm.exchange / u0a69 / v500065:
-           TOTAL: 0.01%
-          Imp Bg: 0.01%
-        (Cached): 27% (3.3MB-3.7MB-3.9MB/2.2MB-2.7MB-2.9MB over 6)
-  * com.android.cellbroadcastreceiver / u0a3 / v22:
-           TOTAL: 0.01%
-         Service: 0.01%
-        (Cached): 1.1% (3.5MB-3.5MB-3.5MB/2.5MB-2.5MB-2.5MB over 1)
-  * com.coulombtech / u0a106 / v26:
-           TOTAL: 0.01%
-        Receiver: 0.01%
-        (Cached): 21% (4.9MB-5.0MB-5.2MB/3.8MB-3.9MB-4.1MB over 2)
-  * com.softcoil.mms / u0a86 / v32:
-           TOTAL: 0.01%
-        (Cached): 0.25%
-  * com.udemy.android / u0a91 / v38:
-           TOTAL: 0.01%
-        Receiver: 0.01%
-        (Cached): 0.75% (9.8MB-9.8MB-9.8MB/8.5MB-8.5MB-8.5MB over 1)
-  * com.qualcomm.timeservice / u0a76 / v22:
-        (Cached): 16% (2.3MB-2.4MB-2.4MB/1.6MB-1.6MB-1.6MB over 4)
-  * com.lge.SprintHiddenMenu / 1000 / v22:
-        (Cached): 0.16%
-  * com.android.chrome:sandboxed_process13 / u0a34 / v2272096:
-        (Cached): 0.01%
-  * com.google.android.partnersetup / u0a13 / v22:
-        (Cached): 0.14%
-  * com.android.musicfx / u0a15 / v10400:
-        (Cached): 0.41% (2.5MB-2.5MB-2.5MB/1.6MB-1.6MB-1.6MB over 1)
-  * com.android.chrome:sandboxed_process9 / u0a34 / v2272096:
-        (Cached): 30% (34MB-34MB-34MB/32MB-32MB-32MB over 9)
-  * com.android.chrome:sandboxed_process11 / u0a34 / v2272096:
-        (Cached): 7.2% (56MB-56MB-56MB/54MB-54MB-54MB over 3)
-
-Run time Stats:
-  SOff/Norm: +32m52s226ms
-  SOn /Norm: +2h10m8s364ms
-       Mod : +17s930ms
-      TOTAL: +2h43m18s520ms
-
-Memory usage:
-  Kernel : 265MB (38 samples)
-  Native : 73MB (38 samples)
-  Persist: 262MB (90 samples)
-  Top    : 190MB (325 samples)
-  ImpFg  : 204MB (569 samples)
-  ImpBg  : 754KB (345 samples)
-  Service: 93MB (1912 samples)
-  Receivr: 227KB (1169 samples)
-  Home   : 66MB (12 samples)
-  LastAct: 30MB (255 samples)
-  CchAct : 220MB (450 samples)
-  CchCAct: 193MB (71 samples)
-  CchEmty: 182MB (652 samples)
-  Cached : 58MB (38 samples)
-  Free   : 60MB (38 samples)
-  TOTAL  : 1.9GB
-  ServRst: 50KB (278 samples)
-
-          Start time: 2015-04-08 13:44:18
-  Total elapsed time: +2h43m18s521ms (partial) libart.so
-
- - - - diff --git a/en/devices/tech/power/batterystats.html b/en/devices/tech/power/batterystats.html deleted file mode 100644 index 10cf934f..00000000 --- a/en/devices/tech/power/batterystats.html +++ /dev/null @@ -1,580 +0,0 @@ - - - Viewing Battery Use Data - - - - - - - - -

The dumpsys batterystats command generates interesting - statistical data about battery usage on a device, organized by unique user - ID (UID). The statistics include the following:

- -
    -
  • History of battery-related events
  • - -
  • Global statistics for the device
  • - -
  • Approximate power use per UID and system component
  • - -
  • Per-app mobile milliseconds per packet
  • - -
  • System UID aggregated statistics
  • - -
  • App UID aggregated statistics
  • -
- -

Use the Battery - Historian tool on the output of the dumpsys command to generate an HTML - visualization of power-related events from the logs. This information makes it - easier to understand and diagnose battery-related issues.

- -

Command input

-

The basic batterystats command is:

-
-adb shell dumpsys batterystats
-
-

Supported options:

-
    -
  • --help displays additional options for tailoring the output. -
  • -
  • --checkin exports results in machine-readable csv format. -
  • -
-

For example, to print battery usage statistics in csv format for all apps - since the device was last charged, run the command:

-
-adb shell dumpsys batterystats --charged --checkin
-
-

You can also specify a package name to get statistics for a single app. For - example, to print battery usage statistics for a given app package - since the device was last charged, run the command:

-
-adb shell dumpsys batterystats --charged <package-name>
-
- -

Command output

- -

The batterystats command generates aggregated observations - about battery use on the device since it was last charged. Observations may be - per-UID or system-level; data is selected for inclusion based on its - usefulness in analyzing battery performance. Output includes one (1) entry - per observation, and each entry consists of a comma-separated list of values - in the format: - int,uid,mode,section,fields - (one or more).

- -

The first four values correspond to the following:

- -
    -
  • Dummy integer
  • - -
  • UID
  • - -
  • Aggregation mode - -
      -
    • "i" for information not tied to charged/uncharged status.
    • -
    • "l" for --charged (usage since last charge).
    • -
    • "u" for --unplugged (usage since last unplugged). Deprecated in - Android 5.1.1.
    • -
    -
  • - -
  • Section identifier, which - determines how to interpret subsequent values in the line.
  • -
- -

Sample output:

- -
-  9,0,i,vers,11,116,K,L 9,0,i,uid,1000,android
-  9,0,i,uid,1000,com.android.providers.settings
-  9,0,i,uid,1000,com.android.inputdevices
-  9,0,i,uid,1000,com.android.server.telecom
-  9,0,i,uid,1000,com.android.keychain 9,0,i,uid,1000,com.android.settings
-  9,0,i,uid,1000,com.android.location.fused
-  9,0,i,uid,1001,com.android.providers.telephony
-  9,0,i,uid,1001,com.android.mms.service 9,0,i,uid,1001,com.android.stk
-  9,0,i,uid,1001,com.android.phone 9,0,i,uid,1027,com.android.nfc
-  9,0,i,uid,2000,com.android.shell
-  9,0,i,uid,10002,com.android.providers.calendar
-  9,0,i,uid,10003,com.android.cellbroadcastreceiver
-  9,0,i,uid,10004,com.android.providers.userdictionary
-  9,0,i,uid,10004,com.android.providers.contacts
-  9,0,i,uid,10005,com.google.android.apps.enterprise.dmagent
-  9,0,i,uid,10006,com.android.defcontainer
-  9,0,i,uid,10007,com.android.providers.media
-  9,0,i,uid,10007,com.android.providers.downloads
-  9,0,i,uid,10007,com.android.providers.downloads.ui
-  9,0,i,uid,10008,com.android.externalstorage
-  9,0,i,uid,10009,com.google.android.syncadapters.contacts
-  9,0,i,uid,10009,com.google.android.gms
-  9,0,i,uid,10009,com.google.android.gsf
-  9,0,i,uid,10009,com.google.android.gsf.login
-  9,0,i,uid,10009,com.google.android.backuptransport
-  9,0,i,uid,10011,com.google.android.dialer
-  9,0,i,uid,10013,com.google.android.onetimeinitializer
-  9,0,i,uid,10014,com.google.android.partnersetup
-  9,0,i,uid,10015,com.android.launcher
-  9,0,i,uid,10016,com.android.managedprovisioning
-  9,0,i,uid,10017,com.android.mms 9,0,i,uid,10018,com.android.musicfx
-  9,0,i,uid,10019,com.android.vending
-  9,0,i,uid,10022,com.android.sharedstoragebackup
-  9,0,i,uid,10023,com.android.systemui
-  9,0,i,uid,10025,com.google.android.googlequicksearchbox
-  9,0,i,uid,10027,com.google.android.apps.walletnfcrel
-  9,0,i,uid,10029,com.google.android.marvin.talkback
-  9,0,i,uid,10031,com.google.android.apps.books
-  9,0,i,uid,10034,com.google.android.calendar
-  9,0,i,uid,10037,com.android.chrome
-  9,0,i,uid,10039,com.google.android.configupdater
-  9,0,i,uid,10040,com.google.android.deskclock
-  9,0,i,uid,10041,com.android.documentsui
-  9,0,i,uid,10042,com.google.android.apps.docs
-  9,0,i,uid,10047,com.google.android.ears
-  9,0,i,uid,10054,com.google.android.talk
-  9,0,i,uid,10057,com.google.android.inputmethod.latin
-  9,0,i,uid,10061,com.google.android.music
-  9,0,i,uid,10064,com.android.packageinstaller
-  9,0,i,uid,10068,com.google.android.apps.plus
-  9,0,i,uid,10069,com.google.android.gm
-  9,0,i,uid,10070,com.google.android.keep
-  9,0,i,uid,10071,com.google.android.apps.genie.geniewidget
-  9,0,i,uid,10072,com.android.printspooler
-  9,0,i,uid,10076,com.google.android.videos
-  9,0,i,uid,10079,com.google.android.youtube
-  9,0,i,uid,10084,com.google.android.apps.magazines
-  9,0,i,dsd,1820451,97,s-,p- 9,0,i,dsd,3517481,98,s-,p-
-  9,0,l,bt,0,8548446,1000983,8566645,1019182,1418672206045,8541652,994188
-  9,0,l,gn,0,0,666932,495312,0,0,2104,1444
-  9,0,l,m,6794,0,8548446,8548446,0,0,0,666932,495312,0,697728,0,0,0,5797,0,0
-  9,0,l,br,9,0,6785,0,0 9,0,l,sgt,8548446,0,0,0,0 9,0,l,sst,9000
-  9,0,l,sgc,0,0,0,0,0 9,0,l,dct,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
-  9,0,l,dcc,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 9,0,l,wst,0,0,0,0,0,0,0,0
-  9,0,l,wsc,0,0,0,0,0,0,0,0 9,0,l,wsst,0,0,0,0,0,0,0,52,0,0,8548394,0,0
-  9,0,l,wssc,0,0,0,0,0,0,0,2,0,0,2,0,0 9,0,l,wsgt,0,0,0,3016,8545430
-  9,0,l,wsgc,0,0,0,2,1 9,0,l,bst,0,0,0,0 9,0,l,bsc,0,0,0,0 9,0,l,dc,2,3,0,3
-  9,0,l,kwl,msm_ipc_read00000001:00000001,0,0
-  9,0,l,kwl,rpm_regulator_tcxo,0,0 9,0,l,kwl,wlan,25423,32
-  9,0,l,kwl,event4-648,0,0 9,0,l,kwl,qcril,187,2 9,0,l,kwl,ssr(dsps),0,0
-  9,0,l,kwl,bq51051b_wireless_chip,0,0 9,0,l,kwl,qmi0,0,0
-  9,0,l,kwl,event5-648,7755,1231
-  9,0,l,kwl,PowerManagerService.WakeLocks,680435,3908
-  9,0,l,kwl,msm_hsic_host,66258,35 9,0,l,kwl,qcom_sap_wakelock,0,0
-  9,0,l,kwl,sns_async_ev_wakelock,91954,1244 9,0,l,kwl,qmuxd_port_wl_12,0,0
-  9,0,l,kwl,pil-wcnss,0,0 9,0,l,kwl,event0-648,11364,1212
-  9,0,l,kwl,dofstrim,0,0 9,0,l,kwl,ssr(lpass),0,0
-  9,0,l,kwl,qmuxd_port_wl_11,0,0 9,0,l,kwl,event2-648,0,0
-  9,0,l,kwl,pil-vidc,0,0 9,0,l,kwl,mmc0,0,0
-  9,0,l,kwl,tabla_gpio_irq_resend,0,0 9,0,l,kwl,pil-q6,0,0
-  9,0,l,kwl,radio-interface,0,0 9,0,l,kwl,msm_ipc_read00000001:00000002,0,0
-  9,0,l,kwl,event3-648,8143,1231 9,0,l,kwl,ssr(wcnss),0,0
-  9,0,l,kwl,ssr(gss),0,0 9,0,l,kwl,KeyEvents,98,1263
-  9,0,l,kwl,unknown_wakeups,0,0 9,0,l,kwl,qmuxd_port_wl_10,0,0
-  9,0,l,kwl,pil-gss,0,0 9,0,l,kwl,qcom_rx_wakelock,161828,3205
-  9,0,l,kwl,ssr(external_modem),0,0 9,0,l,kwl,power-supply,228,23
-  9,0,l,kwl,pil-dsps,0,0 9,0,l,kwl,wcnss,0,0 9,0,l,kwl,msm_otg,0,0
-  9,0,l,kwl,pm8921_eoc,0,0 9,0,l,kwl,slimport_wake_lock,0,0
-  9,0,l,kwl,smsm_snapshot,0,0 9,0,l,kwl,suspend_backoff,239760,24
-  9,0,l,kwl,event1-648,9331,1212 9,0,l,kwl,main,429,0
-  9,0,l,kwl,alarm,2892,270 9,0,l,kwl,PowerManagerService.Display,432,1
-  9,0,l,kwl,qmi1,0,0 9,0,l,kwl,kickstart,211,1
-  9,0,l,kwl,qmuxd_port_wl_9,9,102 9,0,l,kwl,ear_hook,0,0
-  9,0,l,kwl,mmc0_detect,52,1232 9,0,l,kwl,deleted_wake_locks,0,0
-  9,0,l,kwl,PowerManagerService.Broadcasts,7331,0 9,0,l,kwl,qmi2,0,0
-  9,0,l,kwl,smd_sns_dsps,456,1340 9,0,l,kwl,alarm_rtc,36084,122
-  9,0,l,pws,2100,64.4,42.0,63.0 9,10009,l,pwi,uid,20.6 9,0,l,pwi,cell,18.5
-  9,0,l,pwi,idle,8.73 9,0,l,pwi,uid,5.46 9,1000,l,pwi,uid,5.11
-  9,0,l,pwi,wifi,3.28 9,10019,l,pwi,uid,0.847 9,10069,l,pwi,uid,0.408
-  9,0,l,pwi,scrn,0.385 9,10034,l,pwi,uid,0.322 9,10025,l,pwi,uid,0.185
-  9,0,l,pwi,blue,0.0273
-  9,0,l,pwi,cell,14.0
-  9,10002,l,pwi,uid,0.180 9,10023,l,pwi,uid,0.168 9,1001,l,pwi,uid,0.0297
-  9,10068,l,pwi,uid,0.0296 9,10057,l,pwi,uid,0.0234 9,1027,l,pwi,uid,0.0157
-  9,10079,l,pwi,uid,0.00905 9,10054,l,pwi,uid,0.00527
-  9,10005,l,pwi,uid,0.00341 9,10004,l,pwi,uid,0.00204
-  9,2000,l,pwi,uid,0.00192 9,10070,l,pwi,uid,0.00144
-  9,10061,l,pwi,uid,0.000860 9,10014,l,pwi,uid,0.000495
-  9,10040,l,pwi,uid,0.000286 9,1014,l,pwi,uid,0.00000157 9,0,l,pwi,over,1.36
-  9,0,l,nt,0,0,127699,11159,0,0,975,163,0,0
-  9,0,l,pr,file-storage,0,140,0,0,0,0 9,0,l,pr,TX_Thread,0,440,0,0,0,0
-  9,0,l,pr,flush-179:0,0,850,0,0,0,0 9,0,l,pr,sync_supers,10,0,0,0,0,0
-  9,0,l,pr,dhcpcd,0,30,0,0,0,0 9,0,l,pr,kauditd,50,10,0,0,0,0
-  9,0,l,pr,sdcard,20,110,0,0,0,0 9,0,l,pr,flush-0:18,40,100,0,0,0,0
-  9,0,l,pr,zygote,250,90,0,0,0,0 9,0,l,pr,bdi-default,0,610,0,0,0,0
-  9,0,l,pr,ueventd,940,2630,0,0,0,0 9,0,l,pr,kswapd0,0,180,0,0,0,0
-  9,0,l,pr,debuggerd,180,610,0,0,0,0 9,0,l,pr,jbd2/mmcblk0p20,0,50,0,0,0,0
-  9,0,l,pr,jbd2/mmcblk0p21,0,250,0,0,0,0
-  9,0,l,pr,jbd2/mmcblk0p22,0,90,0,0,0,0
-  9,0,l,pr,jbd2/mmcblk0p23,0,1150,0,0,0,0 9,0,l,pr,MC_Thread,0,1270,0,0,0,0
-  9,0,l,pr,adbd,10,40,0,0,0,0 9,0,l,pr,lmkd,360,990,0,0,0,0
-  9,0,l,pr,logd,1550,1670,0,0,0,0 9,0,l,pr,netd,80,330,0,0,0,0
-  9,0,l,pr,rild,160,0,0,0,0,0 9,0,l,pr,vold,50,100,0,0,0,0
-  9,0,l,pr,/init,0,70,0,0,0,0 9,0,l,pr,mpdecision,1400,7820,0,0,0,0
-  9,0,l,pr,khubd,0,10,0,0,0,0 9,0,l,pr,kthreadd,0,600,0,0,0,0
-  9,0,l,pr,kworker/0:0,0,3520,0,0,0,0 9,0,l,pr,sensors.qcom,380,720,0,0,0,0
-  9,0,l,pr,healthd,20,190,0,0,0,0 9,0,l,pr,thermald,60,360,0,0,0,0
-  9,0,l,pr,mmcqd/0,0,8700,0,0,0,0 9,0,l,pr,qseecomd,0,90,0,0,0,0
-  9,0,l,pr,ksoftirqd/0,0,420,0,0,0,0 9,0,l,pr,wpa_supplicant,170,160,0,0,0,0
-  9,0,l,pr,migration/0,0,1630,0,0,0,0 9,0,l,pr,migration/1,20,0,0,0,0,0
-  9,0,l,pr,RX_Thread,0,790,0,0,0,0 9,0,l,pr,netmgrd,40,20,0,0,0,0
-  9,1000,l,nt,0,0,11054,11216,0,0,26,29,0,0 9,1000,l,ua,2,0,0
-  9,1000,l,sr,5,6813,1 9,1000,l,wl,*alarm*,0,f,0,23856,p,151,0,w,0
-  9,1000,l,st,8548446,8548446,8548446 9,1000,l,pr,system,83310,35060,0,0,0,0
-  9,1000,l,pr,surfaceflinger,6620,9330,0,0,0,0 9,1000,l,pr,ks,0,60,0,0,0,0
-  9,1000,l,pr,qcks,0,90,0,0,0,0 9,1000,l,pr,efsks,0,50,0,0,0,0
-  9,1000,l,pr,com.android.server.telecom,110,100,0,0,0,0
-  9,1000,l,pr,servicemanager,40,110,0,0,0,0
-  9,1001,l,st,8548446,8548446,8548446 9,1001,l,pr,qmuxd,0,30,0,0,0,0
-  9,1001,l,pr,com.android.phone,450,300,0,0,0,0
-  9,1014,l,nt,0,0,3410,3370,0,0,10,10,0,0 9,1027,l,st,8548446,8548446,8548446
-  9,1027,l,pr,com.android.nfc,250,160,0,0,0,0
-  9,10002,l,apk,15,com.android.providers.calendar,com.android.providers.calendar.CalendarProviderIntentService,2383,15,15
-  9,10005,l,nt,0,0,1241,2488,0,0,6,10,0,0
-  9,10009,l,nt,0,0,232255,258511,0,0,472,600,0,0
-  9,10009,l,wfl,7689000,9814000,0
-  9,10009,l,jb,com.google.android.gms/.gcm.nts.TaskExecutionService,81,3
-  9,10009,l,sr,0,43643,46 9,10025,l,nt,0,0,152461,42850,0,0,267,243,0,0
-  9,10025,l,wfl,1593000,629000,0 9,10034,l,nt,0,0,77657,40093,0,0,172,170,0,0
-  9,10068,l,nt,0,0,11929,8383,0,0,50,47,0,0
-  9,10069,l,nt,0,0,41553,22886,0,0,85,91,0,0
- -

Section identifiers

- -

Command output for batterystats supports the following - sections:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Section IdentifierDescriptionRemaining Fields

vers

Version

checkin version, parcel version, start platform version, end - platform version

uid

UID

uid, package name

apk

APK

wakeups, APK, service, start time, starts, launches

pr

Process

process, user, system, foreground, starts

sr

Sensor

sensor number, time, count

vib

Vibrator

time, count

fg

Foreground

time, count

st

State Time

foreground, active, running

wl

Wake lock

wake lock, full time, 'f', full count, partial time, 'p', partial - count, window time, 'w', window count

sy

Sync

sync, time, count

jb

Job

job, time, count

kwl

Kernel Wake Lock

kernel wake lock, time, count

wr

Wakeup Reason

wakeup reason, time, count

nt

Network

mobile bytes RX, mobile bytes TX, Wi-Fi bytes RX, Wi-Fi bytes TX, - mobile packets RX, mobile packets TX, Wi-Fi packets RX, Wi-Fi packets - TX, mobile active time, mobile active count

ua

User Activity

other, button, touch

bt

Battery

start count, battery realtime, battery uptime, total realtime, - total uptime, start clock time, battery screen off realtime, battery - screen off uptime

dc

Battery Discharge

low, high, screen on, screen off

lv

Battery Level

start level, current level

wfl

Wi-Fi

full Wi-Fi lock on time, Wi-Fi scan time, Wi-Fi running time, Wi-Fi - scan count, Wi-Fi idle time, Wi-Fi receive time, Wi-Fi transmit time

-

gwfl

Global Wi-Fi

Wi-Fi on time, Wi-Fi running time, Wi-Fi idle time, Wi-Fi receive - time, Wi-Fi transmit time, Wi-Fi power (mAh)

gble

Global Bluetooth

BT idle time, BT receive time, BT transmit time, BT power (mAh)

-

m

Misc

screen on time, phone on time, full wakelock time total, partial - wakelock time total, mobile radio active time, mobile radio active - adjusted time, interactive time, power save mode enabled time, - connectivity changes, device idle mode enabled time, device idle mode - enabled count, device idling time, device idling count, mobile radio - active count, mobile radio active unknown time

gn

Global Network

mobile RX total bytes, mobile TX total bytes, Wi-Fi RX total - bytes, Wi-Fi TX total bytes, mobile RX total packets, mobile TX total - packets, Wi-Fi RX total packets, Wi-Fi TX total packets

br

Screen Brightness

dark, dim, medium, light, bright

sst

Signal Scanning Time

signal scanning time

sgt

Signal Strength Time

none, poor, moderate, good, great

sgc

Signal Strength Count

none, poor, moderate, good, great

dct

Data Connection Time

none, GPRS, EDGE, UMTS, CDMA, EVDO_0, EVDO_A, 1xRTT, HSDPA, HSUPA, - HSPA, IDEN, EVDO_B, LTE, EHRPD, HSPAP, other

dcc

Data Connection Count

none, GPRS, EDGE, UMTS, CDMA, EVDO_0, EVDO_A, 1xRTT, HSDPA, HSUPA, - HSPA, IDEN, EVDO_B, LTE, EHRPD, HSPAP, other

wst

Wi-Fi State Time

off, off scanning, on no networks, on disconnected, on connected - STA, on connected P2P, on connected STA P2P, soft AP

wsc

Wi-Fi State Count

off, off scanning, on no networks, on disconnected, on connected - STA, on connected P2P, on connected STA P2P, soft AP

wsst

Wi-Fi Supplicant State Time

invalid, disconnected, interface disabled, inactive, scanning, - authenticating, associating, associated, four-way handshake, group - handshake, completed, dormant, uninitialized

wssc

Wi-Fi Supplicant State Count

invalid, disconnected, interface disabled, inactive, scanning, - authenticating, associating, associated, four-way handshake, group - handshake, completed, dormant, uninitialized

wsgt

Wi-Fi Signal Strength Time

none, poor, moderate, good, great

wsgc

Wi-Fi Signal Strength Count

none, poor, moderate, good, great

bst

Bluetooth State Time

inactive, low, med, high

bsc

Bluetooth State Count

inactive, low, med, high

pws

Power Use Summary

battery capacity, computed power, minimum drained power, maximum - drained power

pwi

Power Use Item

label, mAh

dsd

Discharge Step

duration, level, screen, power-save

csd

Charge Step

duration, level, screen, power-save

dtr

Discharge Time Remaining

battery time remaining

ctr

Charge Time Remaining

charge time remaining

- -

Bluetooth, cellular, and Wi-Fi usage

- -

Support for battery usage data on Bluetooth, cellular, and Wi-Fi data -requires the device Bluetooth, cellular, and Wif-Fi chipsets implement radio -support and the chipset firmware passes usage data to the framework. OEMs must -work with their chipset providers to facilitate in-field firmware updates on -existing chipsets and compatible firmware on new chipsets.

- -

Additionally, OEMs must continue to configure and submit the power profile -for their devices. However, when the platform detects that Bluetooth, cellular -(as of Android 7.0), or Wi-Fi radio power data is available from the chipset, it -uses chipset data instead of power profile data. For details, see -Power values.

- -

Note: Prior to Android 6.0, power use for -Bluetooth radio, cellular radio, and Wi-Fi was tracked in the m (Misc) -section category. In Android 6.0 and higher, power use for these components is -tracked in the pwi (Power Use Item) section with individual labels -(wifi, blue, cell) for each component.

- - - diff --git a/en/security/_toc.yaml b/en/security/_toc.yaml index 61e02b71..c9c9e46e 100644 --- a/en/security/_toc.yaml +++ b/en/security/_toc.yaml @@ -37,6 +37,8 @@ toc: path: /security/advisory/ - title: 2017 Bulletins section: + - title: July + path: /security/bulletin/2017-07-01 - title: June path: /security/bulletin/2017-06-01 - title: May diff --git a/en/security/bulletin/2017-04-01.html b/en/security/bulletin/2017-04-01.html index 446616ed..e80bb6ed 100644 --- a/en/security/bulletin/2017-04-01.html +++ b/en/security/bulletin/2017-04-01.html @@ -116,7 +116,7 @@ successfully exploited on Android.

  • Guang Gong (龚广) (@oldfresher) of Alpha Team, Qihoo 360 Technology Co. Ltd.: CVE-2017-0547
  • Hao Chen and Guang Gong of Alpha Team, Qihoo 360 Technology Co. Ltd.: - CVE-2017-6424, CVE-2017-0584, CVE-2017-0454, CVE-2017-0575, CVE-2017-0567
  • + CVE-2017-6424, CVE-2017-0584, CVE-2017-0454, CVE-2017-0574, CVE-2017-0575, CVE-2017-0567
  • Ian Foster (@lanrat): CVE-2017-0554
  • Jack Tang of Trend Micro Inc.: CVE-2017-0579
  • Jianjun Dai (@Jioun_dai) of + + Android Security Bulletin—July 2017 + + + + + +

    Published July 5, 2017

    + +

    The Android Security Bulletin contains details of security vulnerabilities +affecting Android devices. Security patch levels of July 05, 2017 or later +address all of these issues. Refer to the Pixel +and Nexus update schedule to learn how to check a device's security patch +level.

    + +

    Partners were notified of the issues described in the bulletin at least a month +ago. Source code patches for these issues will be released to the Android Open +Source Project (AOSP) repository in the next 48 hours. We will revise this +bulletin with the AOSP links when they are available.

    + +

    The most severe of these issues is a critical security vulnerability in media +framework that could enable a remote attacker using a specially crafted file to +execute arbitrary code within the context of a privileged process. The severity +assessment is based on the effect that exploiting the vulnerability would +possibly have on an affected device, assuming the platform and service +mitigations are turned off for development purposes or if successfully bypassed.

    + +

    We have had no reports of active customer exploitation or abuse of these newly +reported issues. Refer to the Android and Google Play +Protect mitigations section for details on the Android +security platform protections and Google Play Protect, which improve the +security of the Android platform.

    + +

    We encourage all customers to accept these updates to their devices.

    + +

    Note: Information on the latest over-the-air +update (OTA) and firmware images for Google devices is available in the +Google device updates section.

    + +

    Announcements

    +
      +
    • This bulletin has two security patch level strings to provide Android + partners with the flexibility to more quickly fix a subset of vulnerabilities + that are similar across all Android devices. See Common questions and answers for + additional information: +
        +
      • 2017-07-01: Partial security patch level string. This + security patch level string indicates that all issues associated with 2017-07-01 + (and all previous security patch level strings) are addressed.
      • +
      • 2017-07-05: Complete security patch level string. This + security patch level string indicates that all issues associated with 2017-07-01 + and 2017-07-05 (and all previous security patch level strings) are + addressed.
      • +
      +
    • +
    + +

    Android and Google Play Protect mitigations

    +

    This is a summary of the mitigations provided by the Android +security platform and service protections such as Google Play Protect. These +capabilities reduce the likelihood that security vulnerabilities could be +successfully exploited on Android.

    +
      +
    • Exploitation for many issues on Android is made more difficult by + enhancements in newer versions of the Android platform. We encourage all users + to update to the latest version of Android where possible.
    • +
    • The Android security team actively monitors for abuse through Google Play Protect and warns + users about Potentially + Harmful Applications. Google Play Protect is enabled by default on devices + with Google Mobile Services, and is + especially important for users who install apps from outside of Google Play. +
    • +
    + +

    2017-07-01 security patch level—Vulnerability details

    +

    In the sections below, we provide details for each of the security +vulnerabilities that apply to the 2017-07-01 patch level. Vulnerabilities are +grouped under the component that they affect. There is a description of the +issue and a table with the CVE, associated references, type of vulnerability, severity, +and updated AOSP versions (where applicable). When available, we link the public +change that addressed the issue to the bug ID, like the AOSP change list. When +multiple changes relate to a single bug, additional references are linked to +numbers following the bug ID.

    + +

    Runtime

    +

    The most severe vulnerability in this section could enable a remote attacker +using a specially crafted file to execute arbitrary code within the context of +an unprivileged process.

    + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityUpdated AOSP versions
    CVE-2017-3544A-35784677RCEModerate4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    +

    Framework

    +

    The most severe vulnerability in this section could enable a local malicious +application using a specially crafted file to execute arbitrary code within the +context of an application that uses the library.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityUpdated AOSP versions
    CVE-2017-0664A-36491278EoPHigh5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0665A-36991414EoPHigh4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0666A-37285689EoPHigh4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0667A-37478824EoPHigh5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0668A-22011579IDModerate4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0669A-34114752IDHigh6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0670A-36104177DoSHigh5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    +

    Libraries

    +

    The most severe vulnerability in this section could enable a remote attacker +using a specially crafted file to execute arbitrary code within the context of +an application that uses the library.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityUpdated AOSP versions
    CVE-2017-0671A-34514762RCEHigh4.4.4
    CVE-2016-2109A-35443725DoSHigh4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0672A-34778578DoSHigh7.0, 7.1.1, 7.1.2
    +

    Media framework

    +

    The most severe vulnerability in this section could enable a remote attacker +using a specially crafted file to execute arbitrary code within the context of +a privileged process.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityUpdated AOSP versions
    CVE-2017-0540A-33966031RCECritical5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0673A-33974623RCECritical6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0674A-34231163RCECritical6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0675A-34779227RCECritical6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0676A-34896431RCECritical5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0677A-36035074RCECritical6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0678A-36576151RCECritical7.0, 7.1.1, 7.1.2
    CVE-2017-0679A-36996978RCECritical6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0680A-37008096RCECritical6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0681A-37208566RCECritical4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0682A-36588422RCEHigh7.0, 7.1.1, 7.1.2
    CVE-2017-0683A-36591008RCEHigh7.0, 7.1.1, 7.1.2
    CVE-2017-0684A-35421151EoPHigh6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0685A-34203195DoSHigh6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0686A-34231231DoSHigh6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0688A-35584425DoSHigh6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0689A-36215950DoSHigh5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0690A-36592202DoSHigh4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0691A-36724453DoSHigh7.0, 7.1.1, 7.1.2
    CVE-2017-0692A-36725407DoSHigh4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0693A-36993291DoSHigh6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0694A-37093318DoSHigh4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0695A-37094889DoSHigh5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0696A-37207120DoSHigh6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0697A-37239013DoSHigh4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0698A-35467458IDModerate6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0699A-36490809IDModerate6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    +

    System UI

    +

    The most severe vulnerability in this section could enable a remote attacker +using a specially crafted file to execute arbitrary code within the context of a +privileged process.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityUpdated AOSP versions
    CVE-2017-0700A-35639138RCEHigh7.1.1, 7.1.2
    CVE-2017-0701A-36385715RCEHigh7.1.1, 7.1.2
    CVE-2017-0702A-36621442RCEHigh7.1.1, 7.1.2
    CVE-2017-0703A-33123882EoPHigh4.4.4, 5.0.2, 5.1.1, 6.0, 6.0.1, 7.0, 7.1.1, 7.1.2
    CVE-2017-0704A-33059280EoPModerate7.1.1, 7.1.2
    + +

    2017-07-05 security patch level—Vulnerability details

    +

    In the sections below, we provide details for each of the security +vulnerabilities that apply to the 2017-07-05 patch level. Vulnerabilities are +grouped under the component that they affect and include details such as the +CVE, associated references, type of +vulnerability, severity, +component (where applicable), and updated AOSP versions (where applicable). When +available, we link the public change that addressed the issue to the bug ID, +like the AOSP change list. When multiple changes relate to a single bug, +additional references are linked to numbers following the bug ID.

    + +

    Broadcom components

    +

    The most severe vulnerability in this section could enable a proximate attacker +to execute arbitrary code within the context of the kernel.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityComponent
    CVE-2017-9417A-38041027*
    + B-RB#123023
    RCECriticalWi-Fi driver
    CVE-2017-0705A-34973477*
    + B-RB#119898
    EoPModerateWi-Fi driver
    CVE-2017-0706A-35195787*
    + B-RB#120532
    EoPModerateWi-Fi driver
    +

    HTC components

    +

    The most severe vulnerability in this section could enable a local malicious +application to execute arbitrary code within the context of a privileged +process.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityComponent
    CVE-2017-0707A-36088467*EoPModerateLED driver
    CVE-2017-0708A-35384879*IDModerateSound driver
    CVE-2017-0709A-35468048*IDLowSensor hub driver
    +

    Kernel components

    +

    The most severe vulnerability in this section could enable a local malicious +application to execute arbitrary code within the context of a privileged +process.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityComponent
    CVE-2017-6074A-35784697
    +Upstream +kernel
    EoPHighNetworking subsystem
    CVE-2017-5970A-35805460
    +Upstream +kernel
    DoSHighNetworking subsystem
    CVE-2015-5707A-35841297
    +Upstream kernel +[2]
    EoPModerateSCSI driver
    CVE-2017-0710A-34951864*EoPModerateTCB
    CVE-2017-7308A-36725304
    +Upstream kernel +[2] +[3]
    EoPModerateNetworking driver
    CVE-2014-9731A-35841292
    +Upstream +kernel
    IDModerateFile system
    +

    MediaTek components

    +

    The most severe vulnerability in this section could enable a local malicious +application to execute arbitrary code within the context of a privileged +process.

    + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityComponent
    CVE-2017-0711A-36099953*
    + M-ALPS03206781
    EoPHighNetworking driver
    +

    NVIDIA components

    +

    The most severe vulnerability in this section could enable a local malicious +application to execute arbitrary code within the context of a privileged +process.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityComponent
    CVE-2017-0340A-33968204*
    + N-CVE-2017-0340
    EoPHighLibnvparser
    CVE-2017-0326A-33718700*
    + N-CVE-2017-0326
    IDModerateVideo driver
    +

    Qualcomm components

    +

    The most severe vulnerability in this section could enable a local malicious +application to execute arbitrary code within the context of the kernel.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityComponent
    CVE-2017-8255A-36251983
    +QC-CR#985205
    EoPHighBootloader
    CVE-2016-10389A-34500449
    +QC-CR#1009145
    EoPHighBootloader
    CVE-2017-8253A-35400552
    +QC-CR#1086764
    EoPHighCamera driver
    CVE-2017-8262A-32938443
    +QC-CR#2029113
    EoPHighGPU driver
    CVE-2017-8263A-34126808*
    + QC-CR#1107034
    EoPHighAnonymous shared memory subsystem
    CVE-2017-8267A-34173755*
    + QC-CR#2001129
    EoPHighAnonymous shared memory subsystem
    CVE-2017-8273A-35400056
    +QC-CR#1094372 +[2]
    EoPHighBootloader
    CVE-2016-5863A-36251182
    +QC-CR#1102936
    EoPModerateUSB HID driver
    CVE-2017-8243A-34112490*
    + QC-CR#2001803
    EoPModerateSoC driver
    CVE-2017-8246A-37275839
    +QC-CR#2008031
    EoPModerateSound driver
    CVE-2017-8256A-37286701
    +QC-CR#1104565
    EoPModerateWi-Fi driver
    CVE-2017-8257A-37282763
    +QC-CR#2003129
    EoPModerateVideo driver
    CVE-2017-8259A-34359487
    +QC-CR#2009016
    EoPModerateSoC driver
    CVE-2017-8260A-34624155
    +QC-CR#2008469
    EoPModerateCamera driver
    CVE-2017-8261A-35139833*
    + QC-CR#2013631
    EoPModerateCamera driver
    CVE-2017-8264A-33299365*
    + QC-CR#1107702
    EoPModerateCamera driver
    CVE-2017-8265A-32341313
    +QC-CR#1109755
    EoPModerateVideo driver
    CVE-2017-8266A-33863407
    +QC-CR#1110924
    EoPModerateVideo driver
    CVE-2017-8268A-34620535*
    + QC-CR#2002207
    EoPModerateCamera driver
    CVE-2017-8270A-35468665*
    + QC-CR#2021363
    EoPModerateWi-Fi driver
    CVE-2017-8271A-35950388*
    + QC-CR#2028681
    EoPModerateVideo driver
    CVE-2017-8272A-35950805*
    + QC-CR#2028702
    EoPModerateVideo driver
    CVE-2017-8254A-36252027
    +QC-CR#832914
    IDModerateSound driver
    CVE-2017-8258A-37279737
    +QC-CR#2005647
    IDModerateCamera driver
    CVE-2017-8269A-33967002*
    + QC-CR#2013145
    IDModerateIPA Driver
    +

    Qualcomm closed-source +components

    +

    These vulnerabilities affect Qualcomm components and are described in further +detail in Qualcomm AMSS security bulletins in 2014-2016. They are included in +this Android security bulletin in order to associate their fixes with an Android +security patch level. Fixes for these vulnerabilities are available directly +from Qualcomm.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEReferencesTypeSeverityComponent
    CVE-2014-9411A-37473054*
    + QC-CR#532956
    N/AHighSecure systems group
    CVE-2014-9968A-37304413*
    + QC-CR#642084
    N/AHighModem
    CVE-2014-9973A-37470982*
    + QC-CR#646919
    N/AHighSecure systems group
    CVE-2014-9974A-37471979*
    + QC-CR#654072
    N/AHighSecure systems group
    CVE-2014-9975A-37471230*
    + QC-CR#700125
    N/AHighSecure systems group
    CVE-2014-9977A-37471087*
    + QC-CR#703002
    N/AHighSecure systems group
    CVE-2014-9978A-37468982*
    + QC-CR#709939
    N/AHighSecure systems group
    CVE-2014-9979A-37471088*
    + QC-CR#717304
    N/AHighSecure systems group
    CVE-2014-9980A-37471029*
    + QC-CR#709766
    N/AHighSecure systems group
    CVE-2015-0575A-37296999*
    + QC-CR#715815
    N/AHighModem
    CVE-2015-8592A-37470090*
    + QC-CR#775396
    N/AHighCore
    CVE-2015-8595A-37472411*
    + QC-CR#790151
    N/AHighSecure systems group
    CVE-2015-8596A-37472806*
    + QC-CR#802005
    N/AHighSecure systems group
    CVE-2015-9034A-37305706*
    + QC-CR#614512
    N/AHighModem
    CVE-2015-9035A-37303626*
    + QC-CR#750231
    N/AHighModem
    CVE-2015-9036A-37303519*
    + QC-CR#751831
    N/AHighModem
    CVE-2015-9037A-37304366*
    + QC-CR#753315
    N/AHighModem
    CVE-2015-9038A-37303027*
    + QC-CR#758328
    N/AHighModem
    CVE-2015-9039A-37302628*
    + QC-CR#760282
    N/AHighModem
    CVE-2015-9040A-37303625*
    + QC-CR#761216
    N/AHighModem
    CVE-2015-9041A-37303518*
    + QC-CR#762126
    N/AHighModem
    CVE-2015-9042A-37301248*
    + QC-CR#762214
    N/AHighModem
    CVE-2015-9043A-37305954*
    + QC-CR#762954
    N/AHighModem
    CVE-2015-9044A-37303520*
    + QC-CR#764858
    N/AHighModem
    CVE-2015-9045A-37302136*
    + QC-CR#766189
    N/AHighModem
    CVE-2015-9046A-37301486*
    + QC-CR#767335
    N/AHighModem
    CVE-2015-9047A-37304367*
    + QC-CR#779285
    N/AHighModem
    CVE-2015-9048A-37305707*
    + QC-CR#795960
    N/AHighModem
    CVE-2015-9049A-37301488*
    + QC-CR#421589, QC-CR#817165
    N/AHighModem
    CVE-2015-9050A-37302137*
    + QC-CR#830102
    N/AHighModem
    CVE-2015-9051A-37300737*
    + QC-CR#837317
    N/AHighModem
    CVE-2015-9052A-37304217*
    + QC-CR#840483
    N/AHighModem
    CVE-2015-9053A-37301249*
    + QC-CR#843808
    N/AHighModem
    CVE-2015-9054A-37303177*
    + QC-CR#856077
    N/AHighModem
    CVE-2015-9055A-37472412*
    + QC-CR#806464
    N/AHighCore
    CVE-2015-9060A-37472807*
    + QC-CR#817343
    N/AHighSecure systems group
    CVE-2015-9061A-37470436*
    + QC-CR#824195
    N/AHighSecure systems group
    CVE-2015-9062A-37472808*
    + QC-CR#802039
    N/AHighSecure systems group
    CVE-2015-9067A-37474000*
    + QC-CR#848926
    N/AHighSecure systems group
    CVE-2015-9068A-37470144*
    + QC-CR#851114
    N/AHighSecure systems group
    CVE-2015-9069A-37470777*
    + QC-CR#854496
    N/AHighSecure systems group
    CVE-2015-9070A-37474001*
    + QC-CR#877102
    N/AHighSecure systems group
    CVE-2015-9071A-37471819*
    + QC-CR#877276
    N/AHighSecure systems group
    CVE-2015-9072A-37474002*
    + QC-CR#877361
    N/AHighSecure systems group
    CVE-2015-9073A-37473407*
    + QC-CR#878073
    N/AHighSecure systems group
    CVE-2016-10343A-32580186*
    + QC-CR#972213
    N/AHighModem
    CVE-2016-10344A-32583954*
    + QC-CR#1022360
    N/AHighModem
    CVE-2016-10346A-37473408*
    + QC-CR#896584
    N/AHighCore
    CVE-2016-10347A-37471089*
    + QC-CR#899671
    N/AHighCore
    CVE-2016-10382A-28823584*
    + QC-CR#944014
    N/AHighSecure systems group
    CVE-2016-10383A-28822389*
    + QC-CR#960624
    N/AHighSecure systems group
    CVE-2016-10388A-32580294*
    + QC-CR#992749
    N/AHighSecure systems group
    CVE-2016-10391A-32583804*
    + QC-CR#970283
    N/AHighWConnect
    CVE-2016-5871A-37473055*
    + QC-CR#883013
    N/AHighSecure systems group
    CVE-2016-5872A-37472809*
    + QC-CR#886220
    N/AHighSecure systems group
    +

    Google device updates

    +

    This table contains the security patch level in the latest over-the-air update +(OTA) and firmware images for Google devices. The Google device firmware images +are available on the Google Developer +site.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Google deviceSecurity patch level
    Pixel / Pixel XLJuly 05, 2017
    Nexus 5XJuly 05, 2017
    Nexus 6July 05, 2017
    Nexus 6PJuly 05, 2017
    Nexus 9July 05, 2017
    Nexus PlayerJuly 05, 2017
    Pixel CJuly 05, 2017
    +

    Acknowledgements

    +

    We would like to thank these researchers for their contributions:

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    CVEsResearchers
    CVE-2017-0711Chengming Yang, Baozeng Ding, and Yang Song of Alibaba Mobile Security +Group
    CVE-2017-0706Daxing Guo (@freener0) of +Xuanwu Lab, Tencent
    CVE-2017-8260Derrek (@derrekr6) and Scott +Bauer
    CVE-2017-8265Di Shen (@returnsme) +of KeenLab (@keen_lab), +Tencent
    CVE-2017-0703Dzmitry Lukyanenka
    CVE-2017-0692, CVE-2017-0694Elphet and Gong Guang of Alpha Team, Qihoo 360 Technology Co. Ltd.
    CVE-2017-8266, CVE-2017-8243, CVE-2017-8270Gengjia Chen (@chengjia4574) and pjf of IceSword Lab, Qihoo 360 Technology Co. +Ltd.
    CVE-2017-0665, CVE-2017-0681Hanxiang Wen, Mingjian Zhou (@Mingjian_Zhou), and Xuxian Jiang +of C0RE Team
    CVE-2017-8268, CVE-2017-8261Jianqiang Zhao (@jianqiangzhao) and pjf of IceSword Lab, Qihoo 360
    CVE-2017-0698Joey Brand of Census Consulting Inc.
    CVE-2017-0666, CVE-2017-0684Mingjian Zhou (@Mingjian_Zhou), Chi Zhang, and Xuxian Jiang of C0RE Team
    CVE-2017-0697, CVE-2017-0670Niky1235 (@jiych_guru)
    CVE-2017-9417Nitay Artenstein of Exodus Intelligence
    CVE-2017-0705, CVE-2017-8259Scott Bauer
    CVE-2017-0667Timothy Becker of CSS Inc.
    CVE-2017-0642, CVE-2017-0682, CVE-2017-0683, CVE-2017-0676, +CVE-2017-0696,CVE-2017-0675, CVE-2017-0701, CVE-2017-0702, CVE-2017-0699Vasily Vasiliev
    CVE-2017-0695, CVE-2017-0689, CVE-2017-0540, CVE-2017-0680, +CVE-2017-0679, CVE-2017-0685, CVE-2017-0686, CVE-2017-0693,CVE-2017-0674, +CVE-2017-0677V.E.O (@VYSEa) of Mobile +Threat Response Team, Trend Micro
    CVE-2017-0708Xiling Gong of Tencent Security Platform Department
    CVE-2017-0690Yangkang (@dnpushme) and +Liyadong of Qihoo 360 Qex Team
    CVE-2017-8269, CVE-2017-8271, CVE-2017-8272, CVE-2017-8267Yonggang Guo (@guoygang) of +IceSword Lab, Qihoo 360 Technology Co. Ltd.
    CVE-2017-8264, CVE-2017-0326, CVE-2017-0709Yuan-Tsung Lo (computernik@gmail.com) and Xuxian Jiang +of C0RE Team
    CVE-2017-0704, CVE-2017-0669Yuxiang Li (@Xbalien29) of +Tencent Security Platform Department
    CVE-2017-0678Zinuo Han of Chengdu Security +Response Center, Qihoo 360 Technology Co. Ltd.
    CVE-2017-0691, CVE-2017-0700Zinuo Han of Chengdu Security +Response Center, Qihoo 360 Technology Co. Ltd. and Ao Wang (@ArayzSegment) of Pangu Team
    +

    Common questions and answers

    +

    This section answers common questions that may occur after reading this +bulletin.

    + +

    1. How do I determine if my device is updated to address these issues? +

    + +

    To learn how to check a device's security patch level, read the instructions on +the Pixel +and Nexus update schedule.

    +
      +
    • Security patch levels of 2017-07-01 or later address all issues associated + with the 2017-07-01 security patch level.
    • +
    • Security patch levels of 2017-07-05 or later address all issues associated + with the 2017-07-05 security patch level and all previous patch levels.
    • +
    +

    Device manufacturers that include these updates should set the patch string +level to:

    +
      +
    • [ro.build.version.security_patch]:[2017-07-01]
    • +
    • [ro.build.version.security_patch]:[2017-07-05]
    • +
    +

    2. Why does this bulletin have two security patch levels?

    + +

    This bulletin has two security patch levels so that Android partners have the +flexibility to fix a subset of vulnerabilities that are similar across all +Android devices more quickly. Android partners are encouraged to fix all issues +in this bulletin and use the latest security patch level.

    +
      +
    • Devices that use the July 01, 2017 security patch level must include all + issues associated with that security patch level, as well as fixes for all + issues reported in previous security bulletins.
    • +
    • Devices that use the security patch level of July 05, 2017 or newer must + include all applicable patches in this (and previous) security + bulletins.
    • +
    +

    Partners are encouraged to bundle the fixes for all issues they are addressing +in a single update.

    + +

    3. What do the entries in the Type column mean?

    + +

    Entries in the Type column of the vulnerability details table reference +the classification of the security vulnerability.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AbbreviationDefinition
    RCERemote code execution
    EoPElevation of privilege
    IDInformation disclosure
    DoSDenial of service
    N/AClassification not available
    + +

    4. What do the entries in the References column mean?

    + +

    Entries under the References column of the vulnerability details table +may contain a prefix identifying the organization to which the reference value +belongs.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    PrefixReference
    A-Android bug ID
    QC-Qualcomm reference number
    M-MediaTek reference number
    N-NVIDIA reference number
    B-Broadcom reference number
    + +

    5. What does a * next to the Android bug ID in the References +column mean?

    + +

    Issues that are not publicly available have a * next to the Android bug ID in +the References column. The update for that issue is generally contained +in the latest binary drivers for Nexus devices available from the Google Developer +site.

    + +

    Versions

    + + + + + + + + + + + + + + +
    VersionDateNotes
    1.0July 5, 2017Bulletin published.
    + + diff --git a/en/security/bulletin/2017.html b/en/security/bulletin/2017.html index dcaad8f3..b6531fe2 100644 --- a/en/security/bulletin/2017.html +++ b/en/security/bulletin/2017.html @@ -37,16 +37,30 @@ of all bulletins, see the Android Security Bulletins ho Security patch level - June 2017 + July 2017 Coming soon + + July 5, 2017 + 2017-07-01
    + 2017-07-05 + + + June 2017 + English / 日本語 / 한국어 / ру́сский / 中文 (中国) / 中文 (台灣) - --> June 5, 2017 2017-06-01
    diff --git a/en/security/bulletin/index.html b/en/security/bulletin/index.html index 29967c80..94f405ca 100644 --- a/en/security/bulletin/index.html +++ b/en/security/bulletin/index.html @@ -22,7 +22,8 @@ --> - +

    Checking if your device is up-to-date? +Look at Google device updates in the most recent bulletin.

    Security has always been a major focus for Android and Google Play: Android was built from day one with security in mind. Monthly device updates are an important tool to make and keep Android users safe. This page contains the @@ -75,16 +76,30 @@ Android Open Source Project (AOSP), the upstream Linux kernel, and system-on-chi Security patch level - June 2017 + July 2017 Coming soon + + July 5, 2017 + 2017-07-01
    + 2017-07-05 + + + June 2017 + English / 日本語 / 한국어 / ру́сский / 中文 (中国) / 中文 (台灣) - --> June 5, 2017 2017-06-01
    diff --git a/en/security/encryption/file-based.html b/en/security/encryption/file-based.html index 37750fa0..0a01a938 100644 --- a/en/security/encryption/file-based.html +++ b/en/security/encryption/file-based.html @@ -33,6 +33,13 @@ This article describes how to enable file-based encryption on new devices and how system applications can be updated to take full advantage of the new Direct Boot APIs and offer users the best, most secure experience possible.

    + +

    Warning: File-based encryption cannot +currently be used together with adoptable storage. On devices using +file-based encryption, new storage media (such as an SD card) must be used as +traditional storage.

    +

    Direct Boot

    File-based encryption enables a new feature introduced in Android 7.0 called program.

    Amir Cohen of Ben Gurion University Cyber Lab

    +

    Ao Wang (@ArayzSegment) + of Pangu Team

    +

    Dr. Asaf Shabtai of Ben Gurion University Cyber Lab

    Baozeng Ding of Alibaba Mobile Security Group

    @@ -59,6 +62,9 @@ Rewards program.

    Chengming Yang of Alibaba Mobile Security Group

    +

    Chi Zhangof + C0RE Team

    +

    Chiachih Wu (@chiachih_wu) of C0RE Team

    @@ -84,6 +90,8 @@ of C0RE Team

    Ecular Xu (徐健) of Trend Micro

    +

    Elphet of Alpha Team, Qihoo 360 Technology Co. Ltd.

    +

    En He (@heeeeen4x) of MS509Team

    @@ -137,6 +145,8 @@ href="https://skyeye.360safe.com">Qihoo 360 Skyeye Labs

    Jianqiang Zhao (@jianqiangzhao) of IceSword Lab, Qihoo 360

    +

    Joey Brand of Census Consulting Inc.

    +

    Jon Sawyer (@jcase)

    Juhu Nie of Xiaomi Inc.

    @@ -182,6 +192,8 @@ of Tesla Motors Product Security Team

    Ning You of Alibaba Mobile Security Group

    +

    Nitay Artenstein of Exodus Intelligence

    +

    Omer Shwartz of Ben Gurion University Cyber Lab

    Peide Zhang of Vulpecker Team, Qihoo 360 Technology Co. Ltd.

    @@ -231,7 +243,7 @@ href="http://www.byterev.com">ByteRev

    Svetoslav Ganov of Google

    -

    Tim Becker

    +

    Timothy Becker of CSS Inc.

    Tong Lin of C0RE Team

    diff --git a/en/security/selinux/validate.html b/en/security/selinux/validate.html index 93ecc050..85f3bc44 100644 --- a/en/security/selinux/validate.html +++ b/en/security/selinux/validate.html @@ -125,10 +125,18 @@ is compiled automatically when you build Android from source.

    To use it, run:

    -
    -adb shell su root dmesg | audit2allow -p $OUT/root/sepolicy
    +
    +adb pull /sys/fs/selinux/policy
    +adb logcat -b all -d | audit2allow -p policy
     
    +

    Note: Running these commands does not change +bugreport.txt because all logs are already there, including the ones from +before the last reboot. On devices running an OTA or development flash, old +and new violations are mixed until another reboot. To address this, reboot +the device again or filter LAST_KMSG and LAST_LOGCAT from your bugreport. +

    +

    Nevertheless, care must be taken to examine each potential addition for overreaching permissions. For example, feeding audit2allow the rmt_storage denial shown earlier results in the following diff --git a/en/source/downloading.html b/en/source/downloading.html index 1821acad..7599338b 100644 --- a/en/source/downloading.html +++ b/en/source/downloading.html @@ -71,7 +71,7 @@ For version 1.22, the SHA-1 checksum for repo is da0514e484f74648a890c0467d61ca415379f791

    - For version 1.23, the SHA-1 checksum for repo is ac9d646f6d699f6822a6bc787d3e7338ae7ab6ed + For version 1.23, the SHA-256 checksum for repo is e147f0392686c40cfd7d5e6f332c6ee74c4eab4d24e2694b3b0a0c037bf51dc5

    Initializing a Repo client diff --git a/en/source/using-repo.html b/en/source/using-repo.html index 9fc473ff..2c0d62a0 100644 --- a/en/source/using-repo.html +++ b/en/source/using-repo.html @@ -127,15 +127,16 @@ single commit, use git rebase -i before you run repo upload.

  • For each commit in the series, enter the Gerrit change ID inside the brackets:

    -
    # Replacing from branch foo 
    +
    # Replacing from branch foo
     [ 3021 ] 35f2596c Refactor part of GetUploadableBranches to lookup one specific...
    -[ 2829 ] ec18b4ba Update proto client to support patch set replacments 
    +[ 2829 ] ec18b4ba Update proto client to support patch set replacments
     # Insert change numbers in the brackets to add a new patch set.
     # To create a new change record, leave the brackets empty.
     
  • After the upload is complete the changes will have an additional Patch Set.

    +

    If you only want to upload the currently checked out Git branch, you can use the flag --current-branch (or --cbr for short).

    diff

    -- 
    cgit v1.2.3
    
    
    From b37b7ebe275b6800d00934c00fecb275bbfc23c8 Mon Sep 17 00:00:00 2001
    From: John Reck 
    Date: Wed, 19 Jul 2017 15:27:58 -0700
    Subject: An update on ro.hwui.* props
    
    Bug: 63741221
    Test: Built docs
    Change-Id: If6cd68d96f823f2f1401087043627d25e886801c
    ---
     en/devices/tech/config/renderer.html | 212 -----------------------------------
     en/devices/tech/index.html           |   3 +-
     2 files changed, 1 insertion(+), 214 deletions(-)
     delete mode 100644 en/devices/tech/config/renderer.html
    
    (limited to 'en')
    
    diff --git a/en/devices/tech/config/renderer.html b/en/devices/tech/config/renderer.html
    deleted file mode 100644
    index 7ee28f10..00000000
    --- a/en/devices/tech/config/renderer.html
    +++ /dev/null
    @@ -1,212 +0,0 @@
    -
    -  
    -    OpenGLRenderer Configuration
    -    
    -    
    -  
    -  
    -  
    -
    -
    -

    This document describes performance tuning that you can do to get the most out of your - hardware.

    - -

    OpenGLRenderer (libhwui) Properties

    -

    This document lists all the properties that you can use to control -Android’s 2D hardware accelerated rendering pipeline. Set these properties -in the device.mk as PRODUCT_PROPERTY_OVERRIDES. -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PropertyTypeDefault ValueDescription
    ro.hwui.disable_scissor_optbooleanfalse

    Used to enable or disable scissor optimization. The accepted values are true and false. When scissor optimization is enabled, OpenGLRenderer attempts to minimize the use of scissoring by selectively enabling and disabling the GL scissor test.

    -

    When the optimization is disabled, OpenGLRenderer keeps the GL scissor test enabled and changes the scissor rect as needed. Some GPUs (for instance, the SGX 540) perform better when changing the scissor rect more often than enabling or disabling the scissor test often.

    -
    ro.hwui.texture_cache_sizefloat24Defines the size, in megabytes, of the per process texture cache. We - recommend using a cache large enough to hold several screens worth of 32-bit textures (for instance, on a 1280x800 display, a full screen buffer uses about 4 MB so the cache should be at least 20 MB.)
    ro.hwui.layer_cache_sizefloat16Defines the size, in megabytes, of the per process layers cache. We recommend - using a cache large enough to hold 4 times the screen in 32 bits. For instance, - on a 1280x800 display, a full screen buffer uses about 4 MB, so the cache should be at least 16 MB.
    ro.hwui.gradient_cache_size0.5floatDefines the size, in megabytes, of the per process gradients cache. A single - gradient generally occupies between 1 and 4 KB of memory. It is recommended to use a - cache large enough to hold at least twelve gradients.
    ro.hwui.patch_cache_sizeinteger128Defines the size, in kilobytes, of the 9-patches cache, per process. This -cache holds only vertex data and can therefore be kept small. Each vertex is -made of 4 floats, or 16 bytes.
    ro.hwui.path_cache_sizefloat4Defines the size, in megabytes, of the per process paths cache. We recommended using a - cache large enough to hold at least one screen worth of 32-bit textures. For instance, - on a 1280x800 display, a full screen buffer uses about 4 MB, so the cache should be at least 4 MB.
    ro.hwui.shape_cache_sizefloat1Defines the size, in megabytes, of the per process shapes caches. This value is used by - several caches such as circles and rounded rectangles. We recommend using a cache - large enough to hold at least one 8-bit screen. For instance, on a 1280x800 display, - a full screen buffer uses about 1 MB, so the cache should be at least 1 MB.
    ro.hwui.drop_shadow_cache_sizefloat2Defines the size, in megabytes, of the per process text drop shadows cache. We recommend - using a cache large enough to hold two screens worth of 8-bit textures. For instance, on a 1280x800 display, a full screen buffer uses about 1 MB, so the cache should be at least 2 MB.
    ro.hwui.r_buffer_cache_sizefloat2Defines the size, in megabytes, of the render buffers cache per process. It is recommended to use a cache large enough to hold twice the screen in 8 bits. For instance, on a 1280x800 display, a full screen buffer uses about 1 MB so the cache should be at least 2 MB. The cache can be smaller if the device supports 4 bits or 1 bit stencil buffers.
    ro.hwui.texture_cache_flush_ratefloat0.6Defines the percentage of the texture cache to keep after a memory flush. Memory flushes are triggered when the system needs to reclaim memory across all applications. We recommend releasing about 50% of the cache in such situations.
    ro.hwui.text_small_cache_widthinteger1024Defines the width in pixels of the default font cache. The upper bound depends on how fast the GPU can upload textures. - We recommend using at least 1024 pixels but at most 2048 pixels. You should also use a power of two value.
    ro.hwui.text_small_cache_heightinteger256Defines the height in pixels of the default font cache. The upper bound depends on how fast the GPU can upload textures. - We recommend using at least 256 pixels but at most 1024 pixels.
    ro.hwui.text_large_cache_widthinteger2048Defines the width in pixels of the large font cache. This cache is used for glyphs too large to fit in the default font cache. The upper bound depends on how fast the GPU can upload textures. We recommended using at least 2048 pixels but at most 4096 pixels. You should also use a power of two value.
    ro.hwui.text_large_cache_heightinteger512Defines the height in pixels of the large font cache. The large font cache is used for glyphs too large to fit in the default font cache. The upper bound depends on how fast the GPU can upload textures. - We recommend using at least 512 pixels but at most 2048 pixels. You should also use a power of two value.
    ro.zygote.disable_gl_preloadbooleanfalseUsed to enable/disable preloading of EGL/GL drivers in Zygote at boot time. When this property is -set to false, Zygote will preload the GL drivers by invoking eglGetDisplay(EGL_DEFAULT_DISPLAY). -The goal is to load the dynamic libraries code in Zygote to share it with all the other processes. If a driver -does not support being shared, set this property to true.
    hwui.text_gamma_correctionstringlookupSelects the text gamma correction technique. There are four possible choices: -
      -
    • lookup3: A correction based on lookup tables. Gamma correction is different for black - and white text (see thresholds below).
    • - -
    • lookup: A correction based on a single lookup table.
    • - -
    • shader3: A correction applied by a GLSL shader. Gamma correction is different - for black and white text (see thresholds below).
    • - -
    • shader: A correction applied by a GLSL shader.
    • -
    - Lookup gamma corrections function best on GPUs with limited shader math. Shader gamma corrections are best to save memory. We recommend using the default lookup technique, which offers a good compromise in terms of quality, speed, and memory usage. -
    hwui.text_gammafloat1.4Defines the gamma value used for text gamma correction. - This value can be adjusted based on the display that is used by the device.
    hwui.text_gamma.black_thresholdinteger64Defines the luminance threshold below which black gamma correction is applied. - The value must be defined in the range 0..255.
    hwui.text_gamma.white_thresholdinteger192Defines the luminance threshold above which white gamma correction is applied. - The value must be defined in the range 0..255.
    hwui.use_gpu_pixel_buffersbooleantrueUsed to enable or disable the use of PBOs on OpenGL ES 3.0 hardware. PBOs are used by the renderer to perform asynchronous texture uploads, especially for the font cache. This property should always remain enabled but can be disabled during bringup or development if the use of PBOs causes corruptions or terrible performance. This is why the property is not read-only.
    - - - diff --git a/en/devices/tech/index.html b/en/devices/tech/index.html index 45567c7e..8792b43f 100644 --- a/en/devices/tech/index.html +++ b/en/devices/tech/index.html @@ -40,8 +40,7 @@ Information

    Configuration

    Getting the most out of Android requires tuning of the kernel, OpenGLRenderer, and +href="/devices/tech/config/kernel.html">kernel and more. See the subpages of this section for details.

    » Configuration Information

    -- cgit v1.2.3