Skip to content

Latest commit

 

History

History
350 lines (245 loc) · 15.6 KB

device-support-requirements.md

File metadata and controls

350 lines (245 loc) · 15.6 KB

Welcome to the CarbonROM Device Support Requirements. This document enumerates the requirements that must be met in order for devices to be deemed ship ready for CarbonROM releases, beginning with Android 11 (R). To be considered ready, device maintainers MUST meet the requirements presented in this document, including any documents incorporated via reference.

The use of “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” is per the IETF standard defined in RFC2119.

Table of Contents

Attaining exceptions

Process

  • Device or software deviations from our core product (as described below) MUST be approved by the Project Lead.
  • Device or software exceptions SHOULD be made via change request to this repository.
  • All device or software exceptions that are granted MUST be documented in Exceptions.

Hardware Support

Audio

  • All devices MUST support audio playback for media content.
  • Phones MUST support in-call audio.
  • Phones MUST support speaker audio.
  • Tablet devices capable of in-call audio/speaker audio MUST support in-call/speaker audio.
  • Devices SHOULD support any additional audio configuration inherent to their device (eg. echo cancellation, extra mics, etc).
  • All devices MUST support any other audio output supported by their stock OS (eg. headphone jack, USB-C, BT).

RIL

  • All devices with RIL supported in their stock OS MUST support RIL for phone calls & data.
  • All devices with RIL supported in their stock OS MUST support emergency calling with a SIM inserted (112/911).
  • All devices with RIL supported in their stock OS SHOULD support emergency calling without a SIM inserted (112/911).
  • Data-only devices (defined as devices that have a RIL but do not support telephony stack due to hardware/firmware restrictions) are EXEMPTED from phone & emergency dialing requirements.

Encryption

  • All devices that supported hardware-backed encryption on their stock OS MUST support hardware-backed encryption.
  • All devices that shipped stock as forceencrypt SHOULD default to forceencrypt enabled.
  • All devices MUST support software encryption.

Wi-Fi

  • All devices with Wi-Fi supported in their stock OS MUST support Wi-Fi.
  • All devices with Wi-Fi MUST report same MAC address as on stock OS.
  • All devices with Wi-Fi hotspot capabilities MUST support Wi-Fi tethering.

USB

  • All devices with a USB port MUST support file access via MTP.
  • All devices with USB tethering supported on their stock OS MUST support USB tethering.
  • All devices with a USB port & Data SHOULD support USB tethering.

GPS

  • All devices with GPS supported in their stock OS MUST support GPS.

Bluetooth

  • All devices with Bluetooth supported in their stock OS MUST support Bluetooth.
  • All devices with Bluetooth MUST report same MAC address as on stock OS.
  • All devices with Bluetooth SHOULD support Bluetooth tethering.
  • All devices with support for Qualcomm® aptX™, aptX™ HD, or any future variant of aptX™, in stock (non-beta releases) OS SHOULD support those variant of aptX™.

Camera

  • All devices with Camera supported in their stock OS MUST support Camera, in both front facing and rear camera configurations.
  • All devices with Dual (or more) Rear Cameras SHOULD support all rear cameras.
  • All devices with Dual (or more) Front Facing Cameras SHOULD support all front cameras.
  • All Camera HAL versions accessible with the device's Camera HAL MUST comply with the Camera and Video Recording requirements.

Video Recording

  • All devices with Video Recording supported in their stock OS MUST support Video Recording, in both front facing and rear camera configurations.

Codecs

  • All devices with hardware encoding/decoding support in their stock OS MUST support hardware encoding/decoding for all non-proprietary codecs supported by their stock OS.

Display

  • All devices with a built-in Display MUST support the Display at the same resolution and density as the stock OS.
  • All devices that do not include a built-in Display MUST support Display output via the hardware’s supported outputs (eg. Android TV - HDMI).
  • All devices that support additional non-USB display interfaces SHOULD support those display output methods.
  • All devices that support a USB-out display in their stock OS SHOULD support this display output (eg. MHL/Miracast/OTG).
  • All devices that support HDR10 playback in their stock OS SHOULD support HDR10 playback.

NFC

  • All devices with NFC supported in their stock OS MUST support NFC.

Fingerprint Sensor

  • All devices with a Fingerprint Sensor MUST support the Fingerprint Sensor if the stock OS supports it with Marshmallow or higher Android versions.
  • All devices with a Fingerprint Sensor SHOULD support the Fingerprint Sensor if the stock OS supports it for all other Android versions.

IR

  • All devices with an IR blaster SHOULD support IR blaster.

Accelerometer

  • All devices with an accelerometer MUST support the accelerometer.

Gyroscope

  • All devices with a gyroscope MUST support the gyroscope.

Proximity

  • All devices with a proximity sensor MUST support the proximity sensor.

Light

  • All devices with a light sensor MUST support the light sensor.

Other Sensors

  • All other sensors supported by a device’s stock OS SHOULD be supported.

Accessories

  • All devices with proprietary accessories SHOULD support those accessories (eg. O-Click, Essential 360 Camera).

Hardware Deviations

Hardware deviations are defined as exemptions granted for hardware requirements above that worked in stock, but do not work in CarbonROM.

  • All hardware deviations from stock MUST be reported in Exceptions, with a user understandable justification.

Software support

Device tree structure

  • Device trees MUST contain a carbon-specific makefile with device declaration of carbon_[devicename].
  • Device trees MUST support a carbon.dependencies file for lunch command & roomservice to be functional.
  • This file SHOULD NOT include any dependencies outside of the "CarbonROM" organization.

Build type

  • All devices MUST be configured as user releases.

Kernel

  • All devices MUST NOT ship a prebuilt kernel.

  • All devices MUST NOT implement software based touchscreen wake features such as double tap to wake, swipe to wake or gestures if there is no hardware-backed support for them in the touchscreen firmware.

  • All devices MUST NOT implement forced fast charge over USB methods that violate the USB specifications.

  • All devices MUST NOT implement any form of clock manipulation (underclocking, overclocking, etc.) for any processor (CPU, GPU).

  • All devices MUST NOT implement any form of hardware voltage manipulation (undervolting, custom voltage tables, etc.).

  • All devices MUST NOT implement any form of hardware register manipulation (sound control, etc.).

  • All devices MUST NOT implement any form of custom KSM driver (UKSM, etc.).

  • All devices MUST NOT ship governors other than the ones specified in the following list:

    • conservative
    • interactive
    • ondemand
    • performance
    • powersave
    • sched
    • schedutil
    • userspace
  • All devices MUST NOT ship I/O schedulers other than the ones specified in the following list:

    • bfq
    • cfq
    • deadline
    • noop
    • row
  • All devices SHOULD only ship hotplugging drivers provided by the OEM or SoC vendor.

SELinux status

  • All devices MUST be configured for SELinux Enforcing.

Verity

  • All devices MUST disable verity on the system image for user and userdebug builds.
  • All devices SHOULD support verity on the vendor image.

Updater

  • All devices with a shipping build of CarbonROM MUST support upgrades via the native CarbonROM Updater application (CarbonDelta) & the recovery documented for that device.

FRP

  • All devices with stock support of Factory Reset Protection (FRP) SHOULD support FRP when Google Applications are installed by the user.

SafetyNet

  • All devices MUST NOT alter SafetyNet validation responses.

Binder

  • All devices MUST use the 64-bit Binder API.

Root (su)

  • All devices MUST NOT ship with su included.

Proprietary files extraction

  • Devices SHOULD have a working proprietary files extraction script in their device tree (or device tree dependencies) that reproduces an exact copy of the binaries required to build CarbonROM from an existing CarbonROM installation.
  • Devices SHOULD use the global extraction script (located in tools/extract-utils).
  • Devices SHOULD use proprietary files extracted from, in order of preference, the same device's publicly-released image or another device's publicly-released image.
  • All proprietary files lists SHOULD contain a short comment noting the source of any un-pinned (default) proprietary files.
  • Any proprietary files not sourced from the noted default MUST be pinned in the respective proprietary files list and have a short comment noting the source of those proprietary files.
  • Devices MUST NOT use non-PIE binaries. Position-independent executable linker support has long been removed.

CVE

  • Devices MUST support CVE patches for “high profile” exploits and vulnerabilities (if the media is reporting on it, then we must have it patched).
  • Devices SHOULD receive regular CVE patches to the device kernel and dependencies.

Firmware

  • All devices MUST assert on known to be working firmware versions if some firmware versions are known to be non-working.
  • A/B devices are exempted from the above rule, and instead must do one of the following:
    • If the device is capable of shipping firmware it MUST do so.
    • If the device is not capable of shipping firmware (eg. a device with multiple variants supported in one build) the device MUST ensure both slots are on a known good firmware.

exFAT Support

LineageOS operates under the assumption that OEM device licensing for exFAT is attached to the device, not software. CarbonROM will comply with all requests for removal of exFAT support from OEMs, Microsoft or their representatives upon contact to legal@carbonrom.org.

  • All devices with exFAT support on stock MAY support exFAT with (and only with) a kernel based implementation.

Additional Features

  • All devices SHOULD support in-kernel (MDSS, MDNIE or similar) LiveDisplay colour adjustment.
  • All devices with an OLED screen SHOULD support SmartPixels.
  • All devices without an OLED screen MUST NOT support SmartPixels.

Software Deviations

Software deviations are defined as exemptions granted for software requirements above that worked in stock, but do not work in CarbonROM.

  • All software deviations from other CarbonROM devices of the same type MUST be approved by Leads (eg. if one wants to remove Music app, get approval).
  • All software deviations from other CarbonROM devices of the same type MUST be reported in Exceptions, with a user understandable justification.
  • Device maintainers MUST ship Jelly or another CarbonROM sourced web browser.

Vendor Images

  • All non-A/B devices relying on an OEM provided vendor partition must assert vendor image versions at flash-time.
  • All A/B devices with a vendor partition MUST either:
    • Build a vendor image.
    • Detail (e.g. in the XDA thread): The required firmware version, the process of installing it, and a process that ensures all slots are on the same firmware.
  • All maintainers MUST NOT require a modified prebuilt vendor image either in their build tree, or the install instructions.
  • All Treble enabled devices SHOULD verify basic hardware functionality with an AOSP GSI.

Quality of life

Commit Authorship

  • All non-original commits MUST have proper authorship attribution from the source it was taken from or adapted from.

Copyrights

  • All original contributions MUST be copyrighted as “(C) [YEAR] CarbonROM”.
  • All CarbonROM copyrights MUST only be additive to the copyright header.
  • Do not remove copyrights from CyanogenMod, Cyanogen Inc, LineageOS or any other upstream.

Workflow

  • Force pushing branches SHOULD be avoided.
  • In the event of a force pushed branch, backup branches of the pre-forced HEAD MUST be made.

Licensing

  • All Kernel contributions MUST be GPLv2.
  • All Android contributions SHOULD be Apache 2.0 licensed.
  • Any contribution to an existing Apache 2.0 project MUST fall under Apache Compliance Category A.
  • Any contribution to an existing Apache 2.0 project MUST NOT be in Apache Compliance Category X.

Docs

  • All devices with a shipping build of CarbonROM MUST document Hardware Deviations from stock capabilities.
  • All devices with a shipping build of CarbonROM MUST document Software Deviations from other CarbonROM releases of the same device type.

Stability

  • Issues like the "screen of death" MUST NOT affect the device.
  • The device MUST NOT have abnormal battery drain.

Recovery

  • Maintainers MUST document a valid Recovery image by which to install CarbonROM zip files.
  • Devices that do not have traditional Recovery images MUST support & document another means of installation for CarbonROM zip files.
  • Maintainers wishing to ship CarbonROM 9.0+ for their device MUST verify official Carbon Recovery distributions work for CarbonROM installation.
  • Maintainers SHOULD list Carbon recovery as the default solution for their device, though may provide TWRP, or any valid recovery image so long as they have valid installation instructions.
  • Maintainers SHOULD verify that Teamwin Recovery Project (TWRP) official distributions work for CarbonROM installation.
  • Failures in official TWRP recoveries SHOULD be raised with the TWRP team or remedied by the maintainer.

Exceptions

All currently granted exceptions should be listed in the following table. To request an exception, please submit a change to this repository.

Date Device/OEM Section Exempted Reason

This document is licensed CC-BY-3.0, with portions adapted from Google’s CDD requirements.