g12: Initial Commit
authorNolen Johnson <johnsonnolen@gmail.com>
Thu, 17 Jun 2021 04:41:55 +0000 (00:41 -0400)
committerNolen Johnson <johnsonnolen@gmail.com>
Tue, 27 Jul 2021 21:18:14 +0000 (17:18 -0400)
Change-Id: I332674f5c2bb24c4a189690c0d7f60342eb22c2f

33 files changed:
Android.bp [new file with mode: 0644]
Android.mk [new file with mode: 0644]
BoardConfigCommon.mk [new file with mode: 0644]
audio/audio_effects.xml [new file with mode: 0644]
audio/audio_policy_configuration.xml [new file with mode: 0644]
audio/audio_policy_configuration_dolby_ms12.xml [new file with mode: 0644]
audio/mixer_paths.xml [new file with mode: 0644]
compatibility_matrix.xml [new file with mode: 0644]
extract-files.sh [new file with mode: 0755]
g12.mk [new file with mode: 0644]
init-files/fstab.amlogic [new file with mode: 0644]
init-files/init.amlogic.board.rc [new file with mode: 0644]
init-files/init.amlogic.media.rc [new file with mode: 0644]
init-files/init.amlogic.rc [new file with mode: 0644]
init-files/init.amlogic.usb.rc [new file with mode: 0644]
init-files/init.amlogic.wifi.rc [new file with mode: 0644]
init-files/init.amlogic.wifi_buildin.rc [new file with mode: 0644]
init-files/init.recovery.amlogic.rc [new file with mode: 0644]
init-files/ueventd.rc [new file with mode: 0644]
lineage.dependencies [new file with mode: 0644]
manifest.xml [new file with mode: 0644]
media/media_codecs.xml [new file with mode: 0644]
media/media_codecs_performance.xml [new file with mode: 0644]
media/media_codecs_profiles.xml [new file with mode: 0644]
media/media_codecs_profiles_V1_0.xml [new file with mode: 0644]
media/media_profiles.xml [new file with mode: 0644]
media/media_profiles_V1_0.xml [new file with mode: 0644]
overlay/frameworks/base/core/res/res/values/config.xml [new file with mode: 0644]
overlay/packages/apps/Bluetooth/res/values/config.xml [new file with mode: 0644]
product.prop [new file with mode: 0644]
proprietary-files.txt [new file with mode: 0644]
setup-makefiles.sh [new file with mode: 0755]
vendor.prop [new file with mode: 0644]

diff --git a/Android.bp b/Android.bp
new file mode 100644 (file)
index 0000000..0058594
--- /dev/null
@@ -0,0 +1,7 @@
+//
+// Copyright (C) 2021 The LineageOS Project
+//
+// SPDX-License-Identifier: Apache-2.0
+//
+
+soong_namespace {}
diff --git a/Android.mk b/Android.mk
new file mode 100644 (file)
index 0000000..af44c00
--- /dev/null
@@ -0,0 +1,12 @@
+#
+# Copyright (C) 2021 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+ifneq ($(filter g12a g12b sm1,$(TARGET_AMLOGIC_SOC)),)
+
+LOCAL_PATH := $(call my-dir)
+include $(call all-makefiles-under,$(LOCAL_PATH))
+
+endif
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
new file mode 100644 (file)
index 0000000..425dd37
--- /dev/null
@@ -0,0 +1,115 @@
+#
+# Copyright (C) 2021 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+include vendor/amlogic/g12-common/BoardConfigVendor.mk
+
+COMMON_PATH := device/amlogic/g12-common
+
+## Android Verified Boot
+BOARD_AVB_ALGORITHM := SHA256_RSA2048
+BOARD_AVB_ENABLE := true
+BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA2048
+BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
+BOARD_AVB_RECOVERY_ROLLBACK_INDEX := 0
+BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 2
+BOARD_AVB_ROLLBACK_INDEX := 0
+BOARD_AVB_MAKE_VBMETA_IMAGE_ARGS += --flags 3
+
+## Architecture
+TARGET_ARCH := arm
+TARGET_ARCH_VARIANT := armv8-a
+TARGET_CPU_ABI := armeabi-v7a
+TARGET_CPU_ABI2 := armeabi
+TARGET_CPU_VARIANT := cortex-a53.a57
+TARGET_KERNEL_ARCH := arm64
+
+## Audio
+BOARD_USES_ALSA_AUDIO := true
+USE_CUSTOM_AUDIO_POLICY := 1
+
+## Dex Pre-Opt
+WITH_DEXPREOPT_DEBUG_INFO := false
+
+## Display
+TARGET_SCREEN_DENSITY := 320
+
+## HIDL
+DEVICE_MANIFEST_FILE := $(COMMON_PATH)/manifest.xml
+DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml
+
+## Kernel
+BOARD_BOOTIMG_HEADER_VERSION := 2
+BOARD_KERNEL_BASE := 0x00000000
+BOARD_KERNEL_CMDLINE := androidboot.dynamic_partitions=true androidboot.dtbo_idx=0 androidboot.boot_devices=ffe07000.emmc otg_device=1
+BOARD_KERNEL_IMAGE_NAME := Image.gz
+BOARD_KERNEL_PAGESIZE := 2048
+BOARD_KERNEL_SEPARATED_DTBO := true
+TARGET_KERNEL_CLANG_COMPILE := true
+TARGET_KERNEL_CONFIG := g12a_defconfig
+TARGET_KERNEL_SOURCE := kernel/amlogic/linux-4.9
+TARGET_USES_64_BIT_BINDER := true
+
+## LMKD
+TARGET_LMKD_STATS_LOG := true
+
+## Metadata
+BOARD_USES_METADATA_PARTITION := true
+
+## Partitions
+# Dynamic
+BOARD_AMLOGIC_DYNAMIC_PARTITIONS_PARTITION_LIST := odm product system system_ext vendor
+BOARD_AMLOGIC_DYNAMIC_PARTITIONS_SIZE := 1673527296 # (BOARD_SUPER_PARTITION_SIZE - "Reasonable Overhead of 4 MiB" 4194304)
+BOARD_SUPER_PARTITION_GROUPS := amlogic_dynamic_partitions
+
+# Sizes
+BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216
+BOARD_CACHEIMAGE_PARTITION_SIZE := 838860800
+BOARD_DTBOIMG_PARTITION_SIZE := 2097152
+BOARD_FLASH_BLOCK_SIZE := 131072
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 4896849920
+BOARD_RECOVERYIMAGE_PARTITION_SIZE := 25165824
+BOARD_SUPER_PARTITION_SIZE := 1677721600
+
+# TARGET_COPY_OUT_$PARTITION
+TARGET_COPY_OUT_ODM := odm
+TARGET_COPY_OUT_PRODUCT := product
+TARGET_COPY_OUT_SYSTEM_EXT := system_ext
+TARGET_COPY_OUT_VENDOR := vendor
+
+# Types
+BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4
+BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_USERIMAGES_USE_EXT4 := true
+
+## Platform
+TARGET_BOARD_PLATFORM := amlogic
+
+## Properties
+TARGET_PRODUCT_PROP += $(COMMON_PATH)/product.prop
+TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop
+
+## Soong Namespace
+PRODUCT_SOONG_NAMESPACES += $(COMMON_PATH)
+
+## Treble
+BOARD_VNDK_VERSION := current
+PRODUCT_FULL_TREBLE_OVERRIDE := true
+
+## Recovery
+TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/init-files/fstab.amlogic
+TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888"
+
+## Vendor SPL
+VENDOR_SECURITY_PATCH := 2020-10-05
+
+## Wi-Fi
+BOARD_HOSTAPD_DRIVER := NL80211
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+WPA_SUPPLICANT_VERSION := VER_0_8_X
diff --git a/audio/audio_effects.xml b/audio/audio_effects.xml
new file mode 100644 (file)
index 0000000..8bb2603
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<audio_effects_conf version="2.0" xmlns="http://schemas.android.com/audio/audio_effects_conf/v2_0">
+    <libraries>
+        <library name="bundle" path="libbundlewrapper.so"/>
+        <library name="reverb" path="libreverbwrapper.so"/>
+        <library name="visualizer" path="libvisualizer.so"/>
+        <library name="downmix" path="libdownmix.so"/>
+        <library name="loudness_enhancer" path="libldnhncr.so"/>
+        <library name="proxy" path="libeffectproxy.so"/>
+        <library name="audio_pre_processing" path="libaudiopreprocessing.so"/>
+        <library name="dynamics_processing" path="libdynproc.so"/>
+        <library name="hpeq" path="libhpeqwrapper.so"/>
+        <library name="avl" path="libavl.so"/>
+        <library name="balance" path="libbalance.so"/>
+        <library name="srs" path="libsrswrapper.so"/>
+        <library name="treblebass" path="libtreblebasswrapper.so"/>
+        <library name="ms12dapwrapper" path="libms12dapwrapper.so"/>
+        <library name="virtualx" path="libvirtualx.so"/>
+        <library name="dbx" path="libdbx.so"/>
+    </libraries>
+    <effects>
+        <effect name="bassboost" library="bundle" uuid="8631f300-72e2-11df-b57e-0002a5d5c51b"/>
+        <effect name="virtualizer" library="bundle" uuid="1d4033c0-8557-11df-9f2d-0002a5d5c51b"/>
+        <effect name="equalizer" library="bundle" uuid="ce772f20-847d-11df-bb17-0002a5d5c51b"/>
+        <effect name="volume" library="bundle" uuid="119341a0-8469-11df-81f9-0002a5d5c51b"/>
+        <effect name="reverb_env_aux" library="reverb" uuid="4a387fc0-8ab3-11df-8bad-0002a5d5c51b"/>
+        <effect name="reverb_env_ins" library="reverb" uuid="c7a511a0-a3bb-11df-860e-0002a5d5c51b"/>
+        <effect name="reverb_pre_aux" library="reverb" uuid="f29a1400-a3bb-11df-8ddc-0002a5d5c51b"/>
+        <effect name="reverb_pre_ins" library="reverb" uuid="172cdf00-a3bc-11df-a72f-0002a5d5c51b"/>
+        <effect name="visualizer" library="visualizer" uuid="d069d9e0-8329-11df-9168-0002a5d5c51b"/>
+        <effect name="downmix" library="downmix" uuid="93f04452-e4fe-41cc-91f9-e475b6d1d69f"/>
+        <effect name="loudness_enhancer" library="loudness_enhancer" uuid="fa415329-2034-4bea-b5dc-5b381c8d1e2c"/>
+        <effect name="aec" library="audio_pre_processing" uuid="4b8b4260-3429-11e6-a6c7-0002a5d5c51b"/>
+        <effect name="ns" library="audio_pre_processing" uuid="5dbdc480-3429-11e6-a499-0002a5d5c51b"/>
+        <effect name="dynamics_processing" library="dynamics_processing" uuid="e0e6539b-1781-7261-676f-6d7573696340"/>
+        <effect name="hpeq" library="hpeq" uuid="049754aa-c4cf-439f-897e-37dd0c381120"/>
+        <effect name="avl" library="avl" uuid="08246a2a-b2d3-4621-b804-42c9b478eb9d"/>
+        <effect name="balance" library="balance" uuid="6f33b3a0-578e-11e5-892f-0002a5d5c51b"/>
+        <effect name="srs" library="srs" uuid="8a857720-0209-11e2-a9d8-0002a5d5c51b"/>
+        <effect name="treblebass" library="treblebass" uuid="76733af0-2889-11e2-81c1-0800200c9a66"/>
+        <effect name="virtualx" library="virtualx" uuid="61821587-ce3c-4aac-9122-86d874ea1fb1"/>
+        <effect name="dbx" library="dbx" uuid="07210842-7432-4624-8b97-35ac8782efa3"/>
+    </effects>
+    <!--preprocess>
+        <stream type="voice_communication">
+            <apply effect="aec"/>
+            <apply effect="ns"/>
+        </stream>
+    </preprocess-->
+</audio_effects_conf>
diff --git a/audio/audio_policy_configuration.xml b/audio/audio_policy_configuration.xml
new file mode 100644 (file)
index 0000000..a9f3240
--- /dev/null
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+    <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
+
+    <!-- Global configuration Decalaration -->
+    <globalConfiguration speaker_drc_enabled="false"/>
+
+
+    <!-- Modules section:
+        There is one section per audio HW module present on the platform.
+        Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
+        The module names are the same as in current .conf file:
+                “primary”, “A2DP”, “remote_submix”, “USB”
+        Each module will contain the following sections:
+        “devicePorts”: a list of device descriptors for all input and output devices accessible via this
+        module.
+        This contains both permanently attached devices and removable devices.
+        “mixPorts”: listing all output and input streams exposed by the audio HAL
+        “routes”: list of possible connections between input and output devices or between stream and
+        devices.
+            "route": is defined by an attribute:
+                -"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
+                -"sink": the sink involved in this route
+                -"sources": all the sources than can be connected to the sink via vis route
+        “attachedDevices”: permanently attached devices.
+        The attachedDevices section is a list of devices names. The names correspond to device names
+        defined in <devicePorts> section.
+        “defaultOutputDevice”: device to be used by default when no policy rule applies
+    -->
+    <modules>
+        <!-- Primary Audio HAL -->
+        <module name="primary" halVersion="3.0">
+            <attachedDevices>
+                <item>Speaker</item>
+                <item>Built-In Mic</item>
+                <item>Built-In Back Mic</item>
+            </attachedDevices>
+            <defaultOutputDevice>Speaker</defaultOutputDevice>
+            <mixPorts>
+                <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
+                <mixPort name="tunnel pcm" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="32000,44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
+                <mixPort name="multichannel output" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC">
+                    <profile name=""/>
+                </mixPort>
+                <mixPort name="multichannel direct" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT">
+                    <profile name=""/>
+                </mixPort>
+                <mixPort name="primary input" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+                             channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
+                </mixPort>
+                <mixPort name="a2dp direct" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT">
+                    <profile name=""/>
+                </mixPort>
+                <mixPort name="tunnel a2dp" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC">
+                    <profile name=""/>
+                </mixPort>
+            </mixPorts>
+            <devicePorts>
+                <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
+                <devicePort tagName="HDMI Out" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink" encodedFormats= "AUDIO_FORMAT_PCM_16_BIT">
+                </devicePort>
+                <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER">
+                    <gains>
+                        <gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT"
+                              minValueMB="-8400"
+                              maxValueMB="4000"
+                              defaultValueMB="0"
+                              stepValueMB="100"/>
+                    </gains>
+                </devicePort>
+                <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+                <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+                <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+                </devicePort>
+                <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+                </devicePort>
+                <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="44100"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+                <devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="44100"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+                <devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="44100"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+
+                <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+                             channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+                </devicePort>
+                <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+                             channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+                </devicePort>
+                <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+                             channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+                </devicePort>
+                <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </devicePort>
+            </devicePorts>
+            <!-- route declaration, i.e. list all available sources for a given sink -->
+            <routes>
+                <route type="mix" sink="HDMI Out"
+                       sources="primary output,tunnel pcm,multichannel output,multichannel direct"/>
+                <route type="mix" sink="Speaker"
+                       sources="primary output,BT SCO Headset Mic"/>
+                <route type="mix" sink="Wired Headset"
+                       sources="primary output,BT SCO Headset Mic"/>
+                <route type="mix" sink="Wired Headphones"
+                       sources="primary output,BT SCO Headset Mic"/>
+                <route type="mix" sink="primary input"
+                       sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/>
+                <route type="mix" sink="BT A2DP Out"
+                       sources="primary output,tunnel a2dp,a2dp direct"/>
+                <route type="mix" sink="BT A2DP Headphones"
+                       sources="primary output,tunnel a2dp,a2dp direct"/>
+                <route type="mix" sink="BT A2DP Speaker"
+                       sources="primary output,tunnel a2dp,a2dp direct"/>
+            </routes>
+
+        </module>
+
+        <!-- A2dp Audio HAL -->
+        <xi:include href="a2dp_audio_policy_configuration.xml"/>
+
+        <!-- Usb Audio HAL -->
+        <xi:include href="usb_audio_policy_configuration.xml"/>
+
+        <!-- Remote Submix Audio HAL -->
+        <xi:include href="r_submix_audio_policy_configuration.xml"/>
+
+        <!-- Hearing aid Audio HAL -->
+        <!-- <xi:include href="hearing_aid_audio_policy_configuration.xml"/> -->
+
+        <!-- MSD Audio HAL (optional) -->
+        <!-- <xi:include href="msd_audio_policy_configuration.xml"/> -->
+
+    </modules>
+    <!-- End of Modules section -->
+
+    <!-- Volume section -->
+
+    <xi:include href="audio_policy_volumes.xml"/>
+    <xi:include href="default_volume_tables.xml"/>
+
+    <!-- End of Volume section -->
+
+    <!-- Surround Sound configuration -->
+
+    <xi:include href="surround_sound_configuration_5_0.xml"/>
+
+    <!-- End of Surround Sound configuration -->
+
+</audioPolicyConfiguration>
diff --git a/audio/audio_policy_configuration_dolby_ms12.xml b/audio/audio_policy_configuration_dolby_ms12.xml
new file mode 100644 (file)
index 0000000..80f2b39
--- /dev/null
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!-- Copyright (C) 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
+    <!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
+
+    <!-- Global configuration Decalaration -->
+    <globalConfiguration speaker_drc_enabled="false"/>
+
+
+    <!-- Modules section:
+        There is one section per audio HW module present on the platform.
+        Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
+        The module names are the same as in current .conf file:
+                “primary”, “A2DP”, “remote_submix”, “USB”
+        Each module will contain the following sections:
+        “devicePorts”: a list of device descriptors for all input and output devices accessible via this
+        module.
+        This contains both permanently attached devices and removable devices.
+        “mixPorts”: listing all output and input streams exposed by the audio HAL
+        “routes”: list of possible connections between input and output devices or between stream and
+        devices.
+            "route": is defined by an attribute:
+                -"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
+                -"sink": the sink involved in this route
+                -"sources": all the sources than can be connected to the sink via vis route
+        “attachedDevices”: permanently attached devices.
+        The attachedDevices section is a list of devices names. The names correspond to device names
+        defined in <devicePorts> section.
+        “defaultOutputDevice”: device to be used by default when no policy rule applies
+    -->
+    <modules>
+        <!-- Primary Audio HAL -->
+        <module name="primary" halVersion="3.0">
+            <attachedDevices>
+                <item>Speaker</item>
+                <item>Built-In Mic</item>
+                <item>Built-In Back Mic</item>
+                <item>Tuner</item>
+            </attachedDevices>
+            <defaultOutputDevice>Speaker</defaultOutputDevice>
+            <mixPorts>
+                <mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
+                <mixPort name="multichannel output" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC">
+                    <profile name=""/>
+                </mixPort>
+                <mixPort name="primary input" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+                             channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
+                </mixPort>
+                <mixPort name="tunnel raw" role="source" flags="AUDIO_OUTPUT_FLAG_HW_AV_SYNC|AUDIO_OUTPUT_FLAG_DIRECT">
+                    <profile name="ac3 raw" format="AUDIO_FORMAT_AC3"
+                             samplingRates="8000,11025,16000,22050,24000,32000,44100,48000"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+                    <profile name="eac3 raw" format="AUDIO_FORMAT_E_AC3"
+                             samplingRates="8000,11025,16000,22050,24000,32000,44100,48000,128000,176400,192000"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+                    <profile name="iec raw" format="AUDIO_FORMAT_IEC61937"
+                             samplingRates="8000,11025,16000,22050,24000,32000,44100,48000,128000,176400,192000"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
+                </mixPort>
+                <mixPort name="tunnel pcm" role="source" flags="AUDIO_OUTPUT_FLAG_HW_AV_SYNC|AUDIO_OUTPUT_FLAG_DIRECT">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="32000,44100,48000"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </mixPort>
+                <mixPort name="tunnel a2dp" role="source" flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_HW_AV_SYNC">
+                    <profile name=""/>
+                </mixPort>
+            </mixPorts>
+            <devicePorts>
+                <!-- Output devices declaration, i.e. Sink DEVICE PORT -->
+                <devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER">
+                    <gains>
+                        <gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT"
+                              minValueMB="-10000"
+                              maxValueMB="0"
+                              defaultValueMB="-6000"
+                              stepValueMB="100"/>
+                    </gains>
+                </devicePort>
+                <devicePort tagName="HDMI Out" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink" encodedFormats="AUDIO_FORMAT_PCM_16_BIT">
+                </devicePort>
+                <devicePort tagName="Tuner" role="source" type="AUDIO_DEVICE_IN_TV_TUNER">
+                    <gains>
+                        <gain name="gain_1" mode="AUDIO_GAIN_MODE_JOINT"
+                              minValueMB="-10000"
+                              maxValueMB="0"
+                              defaultValueMB="-6000"
+                              stepValueMB="100"/>
+                    </gains>
+                </devicePort>
+                <devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+                <devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+                <devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+                </devicePort>
+                <devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
+                </devicePort>
+                <devicePort tagName="BT A2DP Out" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="44100"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+                <devicePort tagName="BT A2DP Headphones" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="44100"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+                <devicePort tagName="BT A2DP Speaker" type="AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER" role="sink">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="44100"
+                             channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
+                </devicePort>
+
+                <devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+                             channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+                </devicePort>
+                <devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+                             channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+                </devicePort>
+                <devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
+                             channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
+                </devicePort>
+                <devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
+                    <profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
+                             samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
+                </devicePort>
+            </devicePorts>
+            <!-- route declaration, i.e. list all available sources for a given sink -->
+            <routes>
+            <route type="mix" sink="HDMI Out"
+                       sources="primary output,tunnel raw,tunnel pcm,multichannel output,Tuner"/>
+                <route type="mix" sink="Speaker"
+                       sources="primary output,tunnel raw,tunnel pcm,BT SCO Headset Mic,Tuner"/>
+                <route type="mix" sink="BT SCO"
+                       sources="primary output,BT SCO Headset Mic"/>
+                <route type="mix" sink="BT SCO Headset"
+                       sources="primary output,BT SCO Headset Mic"/>
+                <route type="mix" sink="Wired Headset"
+                       sources="primary output,tunnel pcm,BT SCO Headset Mic,Tuner"/>
+                <route type="mix" sink="Wired Headphones"
+                       sources="primary output,tunnel pcm,BT SCO Headset Mic,Tuner"/>
+                <route type="mix" sink="primary input"
+                       sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic,Tuner"/>
+                <route type="mix" sink="BT A2DP Out"
+                       sources="primary output,tunnel a2dp"/>
+                <route type="mix" sink="BT A2DP Headphones"
+                       sources="primary output,tunnel a2dp"/>
+                <route type="mix" sink="BT A2DP Speaker"
+                       sources="primary output,tunnel a2dp"/>
+            </routes>
+
+        </module>
+
+        <!-- A2dp Audio HAL -->
+        <xi:include href="a2dp_audio_policy_configuration.xml"/>
+
+        <!-- Usb Audio HAL -->
+        <xi:include href="usb_audio_policy_configuration.xml"/>
+
+        <!-- Remote Submix Audio HAL -->
+        <xi:include href="r_submix_audio_policy_configuration.xml"/>
+
+        <!-- Hearing aid Audio HAL -->
+        <!-- <xi:include href="hearing_aid_audio_policy_configuration.xml"/> -->
+
+        <!-- MSD Audio HAL (optional) -->
+        <!-- <xi:include href="msd_audio_policy_configuration.xml"/> -->
+
+    </modules>
+    <!-- End of Modules section -->
+
+    <!-- Volume section -->
+
+    <xi:include href="audio_policy_volumes.xml"/>
+    <xi:include href="default_volume_tables.xml"/>
+
+    <!-- End of Volume section -->
+
+</audioPolicyConfiguration>
diff --git a/audio/mixer_paths.xml b/audio/mixer_paths.xml
new file mode 100644 (file)
index 0000000..ff22845
--- /dev/null
@@ -0,0 +1,14 @@
+<mixer>
+  <!-- dummy xml conf, do nothing here -->
+  <path name="speaker">
+  </path>
+
+  <path name="headphone">
+  </path>
+
+  <path name="main_mic">
+  </path>
+
+  <path name="headset-mic">
+  </path>
+</mixer>
diff --git a/compatibility_matrix.xml b/compatibility_matrix.xml
new file mode 100644 (file)
index 0000000..ca7f55a
--- /dev/null
@@ -0,0 +1,10 @@
+<compatibility-matrix version="2.0" type="device">
+    <hal format="hidl" optional="false">
+        <name>android.hidl.manager</name>
+        <version>1.0</version>
+        <interface>
+            <name>IServiceManager</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
+</compatibility-matrix>
diff --git a/extract-files.sh b/extract-files.sh
new file mode 100755 (executable)
index 0000000..d591b8e
--- /dev/null
@@ -0,0 +1,98 @@
+#!/bin/bash
+#
+# Copyright (C) 2016 The CyanogenMod Project
+# Copyright (C) 2017-2020 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+set -e
+
+# Load extract_utils and do some sanity checks
+MY_DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
+
+ANDROID_ROOT="${MY_DIR}/../../.."
+
+HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
+if [ ! -f "${HELPER}" ]; then
+    echo "Unable to find helper script at ${HELPER}"
+    exit 1
+fi
+source "${HELPER}"
+
+# Default to sanitizing the vendor folder before extraction
+CLEAN_VENDOR=true
+
+ONLY_COMMON=
+ONLY_TARGET=
+KANG=
+SECTION=
+
+while [ "${#}" -gt 0 ]; do
+    case "${1}" in
+        --only-common )
+                ONLY_COMMON=true
+                ;;
+        --only-target )
+                ONLY_TARGET=true
+                ;;
+        -n | --no-cleanup )
+                CLEAN_VENDOR=false
+                ;;
+        -k | --kang )
+                KANG="--kang"
+                ;;
+        -s | --section )
+                SECTION="${2}"; shift
+                CLEAN_VENDOR=false
+                ;;
+        * )
+                SRC="${1}"
+                ;;
+    esac
+    shift
+done
+
+if [ -z "${SRC}" ]; then
+    SRC="adb"
+fi
+
+function blob_fixup() {
+     case "${1}" in
+         vendor/lib/libmeson_display_adapter_remote.so)
+             "${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"
+             "${PATCHELF}" --remove-needed "libhwbinder.so" "${2}"
+             ;;
+         vendor/lib/libmeson_display_service.so)
+             "${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"
+             "${PATCHELF}" --remove-needed "libhwbinder.so" "${2}"
+             ;;
+        vendor/lib/hw/android.hardware.graphics.mapper@3.0-impl-arm.so)
+             "${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"
+             ;;
+        vendor/lib/hw/android.hardware.graphics.allocator@3.0-impl-arm.so)
+             "${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"
+             ;;
+        vendor/bin/hw/android.hardware.graphics.allocator@3.0-service)
+             "${PATCHELF}" --remove-needed "libhidltransport.so" "${2}"
+             ;;
+     esac
+ }
+
+if [ -z "${ONLY_TARGET}" ]; then
+    # Initialize the helper for common device
+    setup_vendor "${DEVICE_COMMON}" "${VENDOR_COMMON}" "${ANDROID_ROOT}" true "${CLEAN_VENDOR}"
+
+    extract "${MY_DIR}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
+fi
+
+if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../../${VENDOR_DEVICE}/${DEVICE}/proprietary-files.txt" ]; then
+    # Reinitialize the helper for device
+    source "${MY_DIR}/../../${VENDOR_DEVICE}/${DEVICE}/extract-files.sh"
+    setup_vendor "${DEVICE}" "${VENDOR_DEVICE}" "${ANDROID_ROOT}" false "${CLEAN_VENDOR}"
+
+    extract "${MY_DIR}/../../${VENDOR_DEVICE}/${DEVICE}/proprietary-files.txt" "${SRC}" "${KANG}" --section "${SECTION}"
+fi
+
+"${MY_DIR}/setup-makefiles.sh"
diff --git a/g12.mk b/g12.mk
new file mode 100644 (file)
index 0000000..252a267
--- /dev/null
+++ b/g12.mk
@@ -0,0 +1,190 @@
+#
+# Copyright (C) 2021 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+$(call inherit-product, vendor/amlogic/g12-common/g12-common-vendor.mk)
+
+COMMON_PATH := device/amlogic/g12-common
+
+## AAPT
+PRODUCT_AAPT_PREF_CONFIG := tvdpi
+
+## Audio
+PRODUCT_COPY_FILES += \
+    $(COMMON_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
+    $(COMMON_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
+    $(COMMON_PATH)/audio/audio_policy_configuration_dolby_ms12.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_dolby_ms12.xml \
+    $(COMMON_PATH)/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
+    frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
+    frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
+    frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
+    frameworks/av/services/audiopolicy/config/hearing_aid_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/hearing_aid_audio_policy_configuration.xml \
+    frameworks/av/services/audiopolicy/config/msd_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/msd_audio_policy_configuration.xml \
+    frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
+    frameworks/av/services/audiopolicy/config/surround_sound_configuration_5_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/surround_sound_configuration_5_0.xml \
+    frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
+
+PRODUCT_PACKAGES += \
+    android.hardware.audio@2.0-service \
+    android.hardware.audio@5.0-impl \
+    android.hardware.audio.effect@5.0-impl \
+    android.hardware.soundtrigger@2.2-impl \
+    audio.a2dp.default \
+    audio.bluetooth.default \
+    audio.hearing_aid.default \
+    audio.r_submix.default \
+    audio.usb.default
+
+## Bluetooth
+PRODUCT_PACKAGES += \
+    android.hardware.bluetooth@1.0-impl \
+    android.hardware.bluetooth@1.0-service \
+    android.hardware.bluetooth.audio@2.0-impl
+
+## Boot animation
+TARGET_SCREEN_HEIGHT := 1080
+TARGET_SCREEN_WIDTH := 1920
+
+## Camera
+PRODUCT_PACKAGES += \
+    android.hardware.camera.provider@2.4-legacy \
+    android.hardware.camera.provider@2.5-legacy \
+    camera.device@1.0-impl \
+    camera.device@3.2-impl \
+    camera.device@3.3-impl \
+    camera.device@3.4-impl \
+    camera.device@3.5-impl
+
+## Characteristics
+PRODUCT_CHARACTERISTICS := tv
+PRODUCT_IS_ATV := true
+
+## Codecs
+PRODUCT_COPY_FILES += \
+    $(COMMON_PATH)/media/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
+    $(COMMON_PATH)/media/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml \
+    $(COMMON_PATH)/media/media_codecs_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_profiles.xml \
+    $(COMMON_PATH)/media/media_codecs_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_profiles_V1_0.xml \
+    $(COMMON_PATH)/media/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \
+    $(COMMON_PATH)/media/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml
+
+## DRM
+PRODUCT_PACKAGES += \
+    android.hardware.drm@1.0-impl \
+    android.hardware.drm@1.0-service \
+    android.hardware.drm@1.3-service.clearkey
+
+## fastbootd
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.fastbootd.available=true
+PRODUCT_PACKAGES += fastbootd
+
+## File-system permissions
+PRODUCT_PACKAGES += \
+    fs_config_dirs \
+    fs_config_files
+
+## Gatekeeper
+PRODUCT_PACKAGES += \
+    android.hardware.gatekeeper@1.0-service.software
+
+## Hardware Compsoer
+PRODUCT_PACKAGES += \
+    libhwc2on1adapter \
+    libhwc2onfbadapter
+
+## HDMI CEC
+PRODUCT_PACKAGES += \
+    android.hardware.tv.cec@1.0-impl \
+    android.hardware.tv.cec@1.0-service
+
+## Health
+PRODUCT_PACKAGES += \
+    android.hardware.health@2.0-service
+
+# Init-Files
+PRODUCT_COPY_FILES += \
+    $(COMMON_PATH)/init-files/fstab.amlogic:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.amlogic \
+    $(COMMON_PATH)/init-files/init.amlogic.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.rc \
+    $(COMMON_PATH)/init-files/init.amlogic.board.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.board.rc \
+    $(COMMON_PATH)/init-files/init.amlogic.media.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.media.rc \
+    $(COMMON_PATH)/init-files/init.amlogic.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.usb.rc \
+    $(COMMON_PATH)/init-files/init.amlogic.wifi.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.wifi.rc \
+    $(COMMON_PATH)/init-files/init.amlogic.wifi_buildin.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.amlogic.wifi_buildin.rc \
+    $(COMMON_PATH)/init-files/init.recovery.amlogic.rc:recovery/root/init.recovery.amlogic.rc \
+    $(COMMON_PATH)/init-files/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc
+
+## Keymaster
+PRODUCT_PACKAGES += \
+    libkeymaster4.vendor \
+    libkeymaster4support.vendor \
+    libkeymaster_messages.vendor \
+    libkeymaster_portable.vendor \
+    libpuresoftkeymasterdevice.vendor \
+    libsoft_attestation_cert.vendor
+
+## Memtrack
+PRODUCT_PACKAGES += \
+    android.hardware.memtrack@1.0-impl \
+    android.hardware.memtrack@1.0-service
+
+## Overlays
+DEVICE_PACKAGE_OVERLAYS += \
+    $(COMMON_PATH)/overlay
+PRODUCT_ENFORCE_RRO_TARGETS := *
+
+## Partitions
+BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT  := true
+BUILDING_SUPER_EMPTY_IMAGE := true
+PRODUCT_BUILD_SUPER_PARTITION := true
+PRODUCT_USE_DYNAMIC_PARTITIONS := true
+
+## Permissions
+PRODUCT_COPY_FILES +=  \
+    frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
+    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
+    frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
+    frameworks/native/data/etc/android.hardware.gamepad.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.gamepad.xml \
+    frameworks/native/data/etc/android.hardware.hdmi.cec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.hdmi.cec.xml \
+    frameworks/native/data/etc/android.hardware.location.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.location.xml \
+    frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml \
+    frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
+    frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \
+    frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
+    frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
+    frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
+    frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
+    frameworks/native/data/etc/android.hardware.wifi.passpoint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.passpoint.xml \
+    frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
+    frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml \
+    frameworks/native/data/etc/android.software.cts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.cts.xml \
+    frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml \
+    frameworks/native/data/etc/android.software.ipsec_tunnels.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.ipsec_tunnels.xml \
+    frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml \
+    frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml \
+    frameworks/native/data/etc/android.software.vulkan.deqp.level-2019-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level-2019-03-01.xml.xml \
+    frameworks/native/data/etc/android.software.vulkan.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml
+
+## Platform
+TARGET_AMLOGIC_SOC ?= g12a
+
+## Power
+PRODUCT_PACKAGES += \
+    android.hardware.power@1.0-impl \
+    android.hardware.power@1.0-service
+
+## Shipping API
+PRODUCT_SHIPPING_API_LEVEL := 29
+
+## Trust HAL
+PRODUCT_PACKAGES += \
+    vendor.lineage.trust@1.0-service
+
+## Wi-Fi
+PRODUCT_PACKAGES += \
+    android.hardware.wifi@1.0-service \
+    hostapd \
+    libwpa_client \
+    wpa_supplicant \
+    wpa_supplicant.conf
diff --git a/init-files/fstab.amlogic b/init-files/fstab.amlogic
new file mode 100644 (file)
index 0000000..dc822dd
--- /dev/null
@@ -0,0 +1,17 @@
+# Android fstab file.
+#<src>                                                  <mnt_point>         <type>    <mnt_flags and options>                       <fs_mgr_flags>
+# The filesystem that contains the filesystem checker binary (typically /system) cannot
+# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
+
+/dev/block/misc       /misc               emmc      defaults      defaults
+/dev/block/data       /data               ext4      noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic    wait,check,fileencryption=aes-256-xts,quota,formattable,reservedsize=32M
+/dev/block/cache      /cache              ext4      noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic    wait,check,formattable
+/dev/block/metadata   /metadata              ext4      noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic    wait,check,formattable,first_stage_mount
+/devices/*.sd*/mmc_host/sd*  auto          auto       defaults     voldmanaged=sdcard1:auto,encryptable=userdata
+/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sd*  auto             auto      defaults                       voldmanaged=usb:auto,encryptable=userdata
+/devices/*dwc3/xhci-hcd.0.auto/usb?/*/host*/target*/block/sr*  auto             auto      defaults                       voldmanaged=sr0:auto,encryptable=userdata
+/dev/block/loop     auto                loop      defaults                                  voldmanaged=loop:auto
+/dev/block/param    /mnt/vendor/param                ext4      noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic    wait,check,quota,formattable
+# Add for zram. zramsize can be in numeric (byte) , in percent
+/dev/block/zram0     none             swap      defaults                             wait,zramsize=268435456
+/dev/block/tee       /mnt/vendor/tee                 ext4      noatime,nosuid,nodev,nodelalloc,nomblk_io_submit,errors=panic    wait,check,formattable
diff --git a/init-files/init.amlogic.board.rc b/init-files/init.amlogic.board.rc
new file mode 100644 (file)
index 0000000..abb3f74
--- /dev/null
@@ -0,0 +1,27 @@
+import /vendor/etc/init/hw/init.amlogic.usb.rc
+import /vendor/etc/init/hw/init.amlogic.tb_detect.rc
+
+on early-init
+    loglevel 3
+
+on init
+
+on post-fs-data
+    insmod /vendor/lib/modules/mali.ko
+    insmod /vendor/lib/modules/dovi.ko
+    insmod /vendor/lib/sl_hdr.ko
+    insmod /vendor/lib/modules/atbm8881_fe.ko
+    insmod /vendor/lib/modules/aml_hardware_dmx.ko
+
+on boot
+    write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive
+    write /proc/sys/net/core/rmem_max 12582912
+    write /proc/sys/net/core/wmem_max 12582912
+    write /proc/sys/net/core/rmem_default 2097152
+    write /proc/sys/net/core/wmem_default 2097152
+    write /sys/module/amvdec_mh264/parameters/reorder_dpb_size_margin 9
+    write /sys/module/amvdec_h265/parameters/dynamic_buf_num_margin 9
+    write /sys/module/amvdec_vp9/parameters/max_buf_num 12
+
+on property:ro.boot.oem.key1=*
+    setprop ro.oem.key1 ${ro.boot.oem.key1}
diff --git a/init-files/init.amlogic.media.rc b/init-files/init.amlogic.media.rc
new file mode 100644 (file)
index 0000000..cae9e76
--- /dev/null
@@ -0,0 +1,42 @@
+on boot
+    chmod 666 /sys/class/vdec/poweron_clock_level
+    chmod 666 /sys/class/codec_mm/tvp_enable
+    chown mediacodec mediadrm /sys/class/codec_mm/tvp_enable
+    chown mediacodec system /sys/class/codec_mm/config
+    chown mediacodec system /sys/class/codec_mm/fastplay_enable
+    chown media system /sys/module/amvdec_mpeg12/parameters/dec_control
+    chown media system /sys/module/amvideo/parameters/smooth_sync_enable
+
+    write /sys/module/stream_input/parameters/def_vstreambuf_sizeM 10
+    write /sys/module/stream_input/parameters/def_4k_vstreambuf_sizeM 15
+    write /sys/devices/platform/ffe40000.bifrost/dvfs_period 50
+
+on fs
+    insmod /vendor/lib/modules/media_clock.ko
+    write /sys/module/firmware_class/parameters/path "/vendor/lib/firmware/"
+    insmod /vendor/lib/modules/firmware.ko
+    insmod /vendor/lib/modules/video_framerate_adapter.ko
+    insmod /vendor/lib/modules/decoder_common.ko
+    insmod /vendor/lib/modules/stream_input.ko
+    insmod /vendor/lib/modules/amvdec_avs.ko
+    insmod /vendor/lib/modules/amvdec_h264.ko
+    insmod /vendor/lib/modules/amvdec_mh264.ko
+    insmod /vendor/lib/modules/amvdec_h264mvc.ko
+    insmod /vendor/lib/modules/amvdec_h265.ko
+    insmod /vendor/lib/modules/amvdec_mjpeg.ko
+    insmod /vendor/lib/modules/amvdec_mmjpeg.ko
+    insmod /vendor/lib/modules/amvdec_mpeg12.ko
+    insmod /vendor/lib/modules/amvdec_mmpeg12.ko
+    insmod /vendor/lib/modules/amvdec_mpeg4.ko
+    insmod /vendor/lib/modules/amvdec_mmpeg4.ko
+    insmod /vendor/lib/modules/amvdec_real.ko
+    insmod /vendor/lib/modules/amvdec_vc1.ko
+    insmod /vendor/lib/modules/amvdec_vp9.ko
+    insmod /vendor/lib/modules/amvdec_avs2.ko
+    insmod /vendor/lib/modules/encoder.ko
+    insmod /vendor/lib/modules/vpu.ko
+    insmod /vendor/lib/modules/amvdec_ports.ko
+    insmod /vendor/lib/modules/amlogic_fbc_lib.ko
+    insmod /vendor/lib/modules/amvdec_mavs.ko
+    insmod /vendor/lib/modules/amvdec_av1.ko
+
diff --git a/init-files/init.amlogic.rc b/init-files/init.amlogic.rc
new file mode 100644 (file)
index 0000000..af11b56
--- /dev/null
@@ -0,0 +1,120 @@
+import /vendor/etc/init/hw/init.amlogic.usb.rc
+import /vendor/etc/init/hw/init.amlogic.board.rc
+import /vendor/etc/init/hw/init.amlogic.wifi.rc
+import /vendor/etc/init/hw/init.amlogic.media.rc
+import /vendor/etc/init/hw/init.amlogic.wifi_buildin.rc
+import /vendor/etc/init/cppreopts_amlogic.rc
+
+on early-init
+    mount debugfs /sys/kernel/debug /sys/kernel/debug mode=755
+    mount proc proc /proc remount hidepid=2,gid=3009
+
+on init
+    # Support legacy paths
+    symlink /sdcard /mnt/sdcard
+    start console
+    #30 means reserve 3% memory using for high water mark, 1GB DDR x 3% = 30MB
+    write /proc/sys/vm/watermark_scale_factor 30
+    #12288KB
+    write /proc/sys/vm/min_free_kbytes 12288
+
+    #init the unifykeys
+    write /sys/class/unifykeys/attach 1
+    chmod 666 /dev/video_composer.0
+    chmod 666 /dev/video_composer.1
+on boot
+    chown system graphics /sys/module/fb/parameters/osd_logo_index
+    chmod 0660 /sys/module/fb/parameters/osd_logo_index
+
+    chmod 0666 /sys/class/tsync_pcr/tsync_vpts_adjust
+    chmod 0666 /sys/class/amstream/reset_audio_port
+
+    # HDMI/LCD switch
+    chown media system /sys/class/switch/hdmi/state
+    chmod 0660 /sys/class/switch/hdmi/state
+    chown media system /sys/devices/virtual/switch/hdmi/state
+    chmod 0660 /sys/devices/virtual/switch/hdmi/state
+    chmod 666 /dev/v4lvideo
+    # thermal
+    chown system system /sys/class/thermal/thermal_zone0/mode
+    chown system system /sys/class/thermal/thermal_zone1/mode
+    chmod 664 /sys/class/thermal/thermal_zone0/mode
+    chmod 664 /sys/class/thermal/thermal_zone1/mode
+
+    #power
+    chmod 664 /sys/power/early_suspend_trigger
+    chown root system /sys/power/early_suspend_trigger
+
+    #vfm map
+    chown media  system /sys/class/vfm/map
+    chmod 666 /sys/class/vfm/map
+    write /sys/class/vfm/map "rm default"
+    write /sys/class/vfm/map "add default decoder ppmgr deinterlace amvideo"
+
+    #0: normal user and root user can read
+    #1: only root user can read
+    write /proc/sys/kernel/dmesg_restrict 0
+
+
+service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/sdcard1 /storage/sdcard1
+    class late_start
+    disabled
+
+service fuse_udisk0 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/udisk0 /storage/udisk0
+    class late_start
+    disabled
+
+service fuse_udisk1 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/udisk1 /storage/udisk1
+    class late_start
+    disabled
+
+service fuse_sr0 /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/sr0 /storage/sr0
+    class late_start
+    disabled
+
+service fuse_loop /system/bin/sdcard -u 1023 -g 1023 /mnt/media_rw/loop /storage/loop
+    class late_start
+    disabled
+
+# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
+#service watchdogd /sbin/watchdogd 10 20
+#    class core
+#    disabled
+#    seclabel u:r:watchdogd:s0
+
+service remotecfg /vendor/bin/remotecfg /vendor/etc/remote.conf
+    class main
+    oneshot
+    seclabel u:r:remotecfg:s0
+
+service hdcp_tx22 /vendor/bin/hdcp_tx22 \
+    -f /odm/etc/firmware/firmware.le
+    class main
+    disabled
+    oneshot
+
+#service hdcp_rx22 /vendor/bin/hdcp_rx22 \
+#    -f /mnt/vendor/param/firmware.le
+#    class main
+#    disabled
+#    oneshot
+#    seclabel u:r:hdcp_rx22:s0
+
+service factoryreset /vendor/bin/factoryreset.sh
+    class main
+    user root
+    group root
+    disabled
+    oneshot
+    seclabel u:r:install_recovery:s0
+
+service bugreport /system/bin/dumpstate -d -p -B -z \
+    -o /data/user_de/0/com.android.shell/files/bugreports/bugreport
+    class main
+    disabled
+    oneshot
+
+on property:sys.boot_completed=1
+    # Enable ZRAM on boot_complete
+    swapon_all /vendor/etc/fstab.amlogic
+    start factoryreset
diff --git a/init-files/init.amlogic.usb.rc b/init-files/init.amlogic.usb.rc
new file mode 100644 (file)
index 0000000..7db1312
--- /dev/null
@@ -0,0 +1,47 @@
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+on early-boot
+    mount configfs none /config
+    mkdir /config/usb_gadget/g1 0770
+    mkdir /config/usb_gadget/g1/strings/0x409 0770
+    write /config/usb_gadget/g1/bcdUSB 0x0200
+    write /config/usb_gadget/g1/idVendor 0x18d1
+    write /config/usb_gadget/g1/bcdDevice 0x0440
+    write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+    write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer}
+    write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model}
+    mkdir /config/usb_gadget/g1/functions/mass_storage.0
+    mkdir /config/usb_gadget/g1/functions/accessory.gs2
+    mkdir /config/usb_gadget/g1/functions/audio_source.gs3
+    mkdir /config/usb_gadget/g1/functions/midi.gs5
+    mkdir /config/usb_gadget/g1/functions/ffs.adb
+    mkdir /config/usb_gadget/g1/functions/ffs.mtp
+    mkdir /config/usb_gadget/g1/functions/ffs.ptp
+    mkdir /config/usb_gadget/g1/functions/diag.diag
+    mkdir /config/usb_gadget/g1/functions/cser.dun.0
+    mkdir /config/usb_gadget/g1/functions/cser.nmea.1
+    mkdir /config/usb_gadget/g1/functions/gsi.rmnet
+    mkdir /config/usb_gadget/g1/functions/rndis.gsi
+    mkdir /config/usb_gadget/g1/functions/qdss.qdss
+    mkdir /config/usb_gadget/g1/configs/b.1 0770
+    mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770
+    write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1
+    write /config/usb_gadget/g1/os_desc/qw_sign "MSFT100"
+    mkdir /dev/usb-ffs 0775 shell shell
+    mkdir /dev/usb-ffs/adb 0770 shell shell
+    mount functionfs adb /dev/usb-ffs/adb rmode=0770,fmode=0660,uid=2000,gid=2000,no_disconnect=1
+    mkdir /dev/usb-ffs/mtp 0770 mtp mtp
+    mkdir /dev/usb-ffs/ptp 0770 mtp mtp
+    mount functionfs mtp /dev/usb-ffs/mtp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
+    mount functionfs ptp /dev/usb-ffs/ptp rmode=0770,fmode=0660,uid=1024,gid=1024,no_disconnect=1
+    setprop sys.usb.mtp.device_type 3
+    setprop sys.usb.controller ${vendor.usb.controller}
+    write /sys/module/libcomposite/parameters/disable_l1_for_hs "y"
+    symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+    write /config/usb_gadget/g1/functions/gsi.rndis/rndis_wceis 1
+
+on boot
+    setprop sys.usb.configfs 2
diff --git a/init-files/init.amlogic.wifi.rc b/init-files/init.amlogic.wifi.rc
new file mode 100644 (file)
index 0000000..2cff02e
--- /dev/null
@@ -0,0 +1,19 @@
+on fs
+service wpa_supplicant /vendor/bin/hw/wpa_supplicant \
+    -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 -dd \
+    -g@android:wpa_wlan0
+
+    interface android.hardware.wifi.supplicant@1.0::ISupplicant default
+    interface android.hardware.wifi.supplicant@1.1::ISupplicant default
+    interface android.hardware.wifi.supplicant@1.2::ISupplicant default
+    interface android.hardware.wifi.supplicant@1.3::ISupplicant default
+
+    class main
+    socket wpa_wlan0 dgram 660 wifi wifi
+    disabled
+    oneshot
+
+service bcmdl /vendor/xbin/bcmdl -n /vendor/etc/wifi/43569/nvram_ap6269a2.nvm /vendor/etc/wifi/43569/fw_bcm43569a2_ag.bin.trx
+    class main
+    oneshot
+    disabled
diff --git a/init-files/init.amlogic.wifi_buildin.rc b/init-files/init.amlogic.wifi_buildin.rc
new file mode 100644 (file)
index 0000000..7979822
--- /dev/null
@@ -0,0 +1,6 @@
+on boot
+    insmod /vendor/lib/modules/dhd.ko firmware_path=/vendor/etc/wifi/buildin/ nvram_path=/vendor/etc/wifi/buildin/
+    chown root wifi /sys/module/dhd/parameters/firmware_path
+    chown root wifi /sys/module/bcmdhd/parameters/firmware_path
+    chmod 664 /sys/module/bcmdhd/parameters/firmware_path
+    chmod 664 /sys/module/dhd/parameters/firmware_path
diff --git a/init-files/init.recovery.amlogic.rc b/init-files/init.recovery.amlogic.rc
new file mode 100644 (file)
index 0000000..14af9b1
--- /dev/null
@@ -0,0 +1,347 @@
+on early-init
+    insmod /boot/dwc3.ko
+
+on init
+    chmod 0777 /sbin/systemcontrol_static
+    chmod 0777 /sbin/remotecfg
+
+on fs
+
+on post-fs-data
+    chown system system /sys/class/android_usb/android0/f_mass_storage/lun/file
+    chmod 0660 /sys/class/android_usb/android0/f_mass_storage/lun/file
+    chown system system /sys/class/android_usb/android0/f_rndis/ethaddr
+    chmod 0660 /sys/class/android_usb/android0/f_rndis/ethaddr
+
+on boot
+    mkdir /udisk
+    mkdir /dev/usb-ffs 0770 system system
+    mkdir /dev/usb-ffs/adb 0770 system system
+    mkdir /dev/usb-ffs/fastboot 0770 system system
+    mount configfs none /config
+    mkdir /config/usb_gadget/g1 0770 system system
+    write /config/usb_gadget/g1/idVendor 0x18d1
+    write /config/usb_gadget/g1/bcdDevice 0x0223
+    write /config/usb_gadget/g1/bcdUSB 0x0200
+    mkdir /config/usb_gadget/g1/strings/0x409 0770
+    write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
+    write /config/usb_gadget/g1/strings/0x409/manufacturer droidlogic
+    write /config/usb_gadget/g1/strings/0x409/product deadpool
+    mkdir /config/usb_gadget/g1/functions/ffs.adb
+    mkdir /config/usb_gadget/g1/functions/ffs.fastboot
+    mkdir /config/usb_gadget/g1/functions/mtp.gs0
+    mkdir /config/usb_gadget/g1/configs/b.1 0770 system system
+    mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 system system
+    write /config/usb_gadget/g1/configs/b.1/MaxPower 500
+    symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1
+    mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
+    mount functionfs fastboot /dev/usb-ffs/fastboot rmode=0770,fmode=0660,uid=1000,gid=1000
+    setprop sys.usb.configfs 1
+    setprop sys.usb.controller ${sys.usb.controller}
+
+service console /system/bin/sh
+    seclabel u:r:shell:s0
+    console
+
+service remotecfg3 /sbin/remotecfg -c /sbin/remote.cfg -t /sbin/remote.tab3 -d
+    oneshot
+    seclabel u:r:recovery:s0
+
+service remotecfg1 /sbin/remotecfg -c /sbin/remote.cfg -t /sbin/remote.tab1 -d
+    oneshot
+    seclabel u:r:recovery:s0
+
+service remotecfg2 /sbin/remotecfg -c /sbin/remote.cfg -t /sbin/remote.tab2 -d
+    oneshot
+    seclabel u:r:recovery:s0
+
+service systemcontrol /sbin/systemcontrol_static /sbin/mesondisplay.cfg
+    oneshot
+    seclabel u:r:recovery:s0
+
+on property:sys.usb.config=none && property:sys.usb.configfs=1
+    setprop sys.usb.ffs.ready 0
+
+on property:init.svc.adbd=stopped
+    setprop sys.usb.ffs.ready 0
+
+on property:sys.usb.config=mtp && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4e41
+
+on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4e12
+
+on property:sys.usb.config=adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4e40
+
+on property:sys.usb.config=adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/idProduct 0x4ee0
+
+on property:sys.usb.config=adb && property:sys.usb.configfs=1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=none && property:sys.usb.configfs=1
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=none && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/UDC "none"
+    stop adbd
+    stop fastbootd
+    setprop sys.usb.ffs.ready 0
+    write /config/usb_gadget/g1/bDeviceClass 0
+    write /config/usb_gadget/g1/bDeviceSubClass 0
+    write /config/usb_gadget/g1/bDeviceProtocol 0
+    rm /config/usb_gadget/g1/configs/b.1/f1
+    rm /config/usb_gadget/g1/configs/b.1/f2
+    rm /config/usb_gadget/g1/configs/b.1/f3
+    rmdir /config/usb_gadget/g1/functions/rndis.gs4
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=adb && property:sys.usb.configfs=1
+    start adbd
+
+on property:sys.usb.config=fastboot && property:sys.usb.configfs=1
+    start fastbootd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb"
+    symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=fastboot && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "fastboot"
+    symlink /config/usb_gadget/g1/functions/ffs.fastboot /config/usb_gadget/g1/configs/b.1/f1
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp"
+    symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "mtp_adb"
+    symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
+    symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ptp && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp"
+    symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "ptp_adb"
+    symlink /config/usb_gadget/g1/functions/ptp.gs1 /config/usb_gadget/g1/configs/b.1/f1
+    symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=accessory && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory"
+    symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_adb"
+    symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
+    symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource"
+    symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f1
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "audiosource_adb"
+    symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f1
+    symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource"
+    symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
+    symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "accessory_audiosource_adb"
+    symlink /config/usb_gadget/g1/functions/accessory.gs2 /config/usb_gadget/g1/configs/b.1/f1
+    symlink /config/usb_gadget/g1/functions/audio_source.gs3 /config/usb_gadget/g1/configs/b.1/f2
+    symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f3
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=midi && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi"
+    symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=midi,adb && property:sys.usb.configfs=1
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "midi_adb"
+    symlink /config/usb_gadget/g1/functions/midi.gs5 /config/usb_gadget/g1/configs/b.1/f1
+    symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis && property:sys.usb.configfs=1
+    mkdir /config/usb_gadget/g1/functions/rndis.gs4
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis"
+    symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
+    start adbd
+
+on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,adb && property:sys.usb.configfs=1
+    mkdir /config/usb_gadget/g1/functions/rndis.gs4
+    write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "rndis_adb"
+    symlink /config/usb_gadget/g1/functions/rndis.gs4 /config/usb_gadget/g1/configs/b.1/f1
+    symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f2
+    write /config/usb_gadget/g1/UDC ${sys.usb.controller}
+    setprop sys.usb.state ${sys.usb.config}
+
+on property:ro.kernel.qemu=1
+    start adbd
+
+# Used to disable USB when switching states
+on property:sys.usb.config=none && property:sys.usb.configfs=0
+    stop adbd
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/bDeviceClass 0
+    setprop sys.usb.state ${sys.usb.config}
+
+# adb only USB configuration
+# This is the fallback configuration if the
+# USB manager fails to set a standard configuration
+on property:sys.usb.config=adb && property:sys.usb.configfs=0
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 18d1
+    write /sys/class/android_usb/android0/idProduct 4EE7
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    start adbd
+    setprop sys.usb.state ${sys.usb.config}
+
+# USB accessory configuration
+on property:sys.usb.config=accessory && property:sys.usb.configfs=0
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 18d1
+    write /sys/class/android_usb/android0/idProduct 2d00
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+# USB accessory configuration, with adb
+on property:sys.usb.config=accessory,adb && property:sys.usb.configfs=0
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 18d1
+    write /sys/class/android_usb/android0/idProduct 2d01
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    start adbd
+    setprop sys.usb.state ${sys.usb.config}
+
+# audio accessory configuration
+on property:sys.usb.config=audio_source && property:sys.usb.configfs=0
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 18d1
+    write /sys/class/android_usb/android0/idProduct 2d02
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+# audio accessory configuration, with adb
+on property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=0
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 18d1
+    write /sys/class/android_usb/android0/idProduct 2d03
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    start adbd
+    setprop sys.usb.state ${sys.usb.config}
+
+# USB and audio accessory configuration
+on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=0
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 18d1
+    write /sys/class/android_usb/android0/idProduct 2d04
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    setprop sys.usb.state ${sys.usb.config}
+
+# USB and audio accessory configuration, with adb
+on property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=0
+    write /sys/class/android_usb/android0/enable 0
+    write /sys/class/android_usb/android0/idVendor 18d1
+    write /sys/class/android_usb/android0/idProduct 2d05
+    write /sys/class/android_usb/android0/functions ${sys.usb.config}
+    write /sys/class/android_usb/android0/enable 1
+    start adbd
+    setprop sys.usb.state ${sys.usb.config}
+
+# Used to set USB configuration at boot and to switch the configuration
+# when changing the default configuration
+on boot && property:persist.sys.usb.config=*
+    setprop sys.usb.config ${persist.sys.usb.config}
+
+#
+# USB type C
+#
+
+# USB mode changes
+on property:sys.usb.typec.mode=dfp
+    write /sys/class/dual_role_usb/otg_default/mode ${sys.usb.typec.mode}
+    setprop sys.usb.typec.state ${sys.usb.typec.mode}
+
+on property:sys.usb.typec.mode=ufp
+    write /sys/class/dual_role_usb/otg_default/mode ${sys.usb.typec.mode}
+    setprop sys.usb.typec.state ${sys.usb.typec.mode}
+
+# USB data role changes
+on property:sys.usb.typec.data_role=device
+    write /sys/class/dual_role_usb/otg_default/data_role ${sys.usb.typec.data_role}
+    setprop sys.usb.typec.state ${sys.usb.typec.data_role}
+
+on property:sys.usb.typec.data_role=host
+    write /sys/class/dual_role_usb/otg_default/data_role ${sys.usb.typec.data_role}
+    setprop sys.usb.typec.state ${sys.usb.typec.data_role}
+
+# USB power role changes
+on property:sys.usb.typec.power_role=source
+    write /sys/class/dual_role_usb/otg_default/power_role ${sys.usb.typec.power_role}
+    setprop sys.usb.typec.state ${sys.usb.typec.power_role}
+
+on property:sys.usb.typec.power_role=sink
+    write /sys/class/dual_role_usb/otg_default/power_role ${sys.usb.typec.power_role}
+    setprop sys.usb.typec.state ${sys.usb.typec.power_role}
diff --git a/init-files/ueventd.rc b/init-files/ueventd.rc
new file mode 100644 (file)
index 0000000..44a96b7
--- /dev/null
@@ -0,0 +1,160 @@
+# /dev/ devices
+#
+
+# Amlogic AV streaming devices
+/dev/amvideo              0666   media        system
+/dev/ionvideo             0666   media        system
+/dev/video_composer.0     0660   media     system
+/dev/video_composer.1     0660   media     system
+/dev/ppmgr                0660   media        system
+/dev/amstream_*           0666   media        system
+/dev/audiodsp0            0660   media        system
+/dev/uio0                 0666   system       mediadrm
+/dev/video0               0660   system       camera
+/dev/video1               0660   system       camera
+/dev/video10              0660   system       mediadrm
+/dev/video11              0660   media        system
+/dev/video13              0660   system       mediadrm
+/dev/video14              0660   system       mediadrm
+/dev/video15              0660   system       mediadrm
+/dev/video16              0660   system       mediadrm
+/dev/video16              0660   system       mediadrm
+/dev/video17              0660   system       mediadrm
+/dev/video18              0660   system       mediadrm
+/dev/video19              0660   system       mediadrm
+/dev/video20              0660   system       mediadrm
+/dev/video21              0660   system       mediadrm
+/dev/video23              0660   system     mediadrm
+/dev/video26              0660   system     mediadrm
+/dev/video30              0660   system     mediadrm
+/dev/video31              0660   system     mediadrm
+/dev/video32              0660   system     mediadrm
+/dev/video33              0660   system     mediadrm
+/dev/video34              0660   system     mediadrm
+/dev/video35              0660   system     mediadrm
+/dev/video36              0660   system     mediadrm
+/dev/video37              0660   system     mediadrm
+/dev/video38              0660   system     mediadrm
+/dev/video50              0660   system     camera
+/dev/amaudio_utils        0660   media        system
+/dev/amaudio_ctl          0660   media        system
+/dev/amvenc_avc           0660   mediacodec   system
+/dev/HevcEnc              0660   mediacodec   system
+/dev/amsubtitle           0660   media        system
+/dev/jpegenc              0660   media        system
+/dev/videosync            0666   media     system
+/dev/ac_sbuf0             0660   system    camera
+/dev/ac_isp4uf            0660   system    camera
+
+
+#audio data
+/dev/audio_data_debug     0660   mediacodec   audio
+/dev/amjpegdec            0666   system       system
+/dev/ge2d                 0660   system       system
+/dev/vdin0                0660   system       system
+/dev/vdin1                0660   system     system
+/dev/virtmem              0666   system       system
+
+# Mali
+/dev/ump                  0666   system       graphics
+/dev/mali                 0666   system       graphics
+/dev/mali0                0666   system       graphics
+/dev/ion                  0666   system       graphics
+
+# uvm
+/dev/uvm                  0660   system       graphics
+
+# video tunnel
+/dev/videotunnel          0666   system       graphics
+
+# sw_sync
+/dev/sw_sync              0666   system       graphics
+
+#possible serial
+/dev/ttyS1                0660   bluetooth    bluetooth
+/dev/ttyS2                0660   bluetooth    bluetooth
+/dev/ttyS3                0666   system       system
+/dev/ttya0                0660   system       system
+/dev/ttya1                0660   system       system
+/dev/ptya0                0660   system       system
+/dev/ptya1                0660   system       system
+/dev/ttyHS2               0666   bluetooth    bluetooth
+/dev/ttyS20               0664   system       system
+
+/dev/mpu                  0666   system       system
+/dev/mpuirq               0666   system       system
+/dev/accelirq             0666   system       system
+/dev/timerirq             0666   system       system
+
+
+/dev/rtk_btusb            0660   bluetooth    bluetooth
+#mtkbt
+/dev/stpbt                0664   bluetooth    bluetooth
+/dev/rtkbt_dev            0660   bluetooth    bluetooth
+/dev/hidraw*              0660   system       audio
+/dev/btusb0               0660   bluetooth    bluetooth
+
+/dev/display              0660   root         graphics
+
+# For USB Joysticks
+/dev/input/js*            0664   system       system
+
+/dev/wifi_power           0660   system       wifi
+
+/dev/otz_client           0666   drm          drm
+
+/dev/cec                  0666   system       system
+/dev/v4l2_frontend        0666   system       system
+/dev/opteearmtz00         0666   system       system
+/dev/tee0                 0666   system       system
+
+/dev/block/by-name/frp    0660   system       system
+
+# /sys/ sysfs
+#
+
+#bluetooth
+/sys/devices/platform/bt-dev/rfkill/rfkill0   state   0666    bluetooth   bluetooth
+/sys/devices/platform/bt-dev/rfkill/rfkill0   type    0660    bluetooth   bluetooth
+/sys/devices/platform/aml_bt/rfkill/rfkill0   state   0666    bluetooth   bluetooth
+/sys/devices/platform/aml_bt/rfkill/rfkill0   type    0660    bluetooth   bluetooth
+/sys/devices/bt-dev.*/rfkill/rfkill0          state   0660    bluetooth   bluetooth
+/sys/devices/bt-dev.*/rfkill/rfkill0          type    0660    bluetooth   bluetooth
+
+#hdmi cec
+/sys/class/amhdmitx/amhdmitx0       hpd_state               0664      system      system
+/sys/class/amhdmitx/amhdmitx0       disp_mode               0664      system      system
+/sys/class/amhdmitx/amhdmitx0       config                  0664      system      system
+/sys/class/amhdmitx/amhdmitx0       avmute                  0664      system      system
+/sys/class/amhdmitx/amhdmitx0       aud_ch                  0664      system      mediadrm
+
+/sys/class/amhdmitx/amhdmitx0       allm_cap                0664      system      system
+/sys/class/amhdmitx/amhdmitx0       allm_mode               0664      system      system
+/sys/class/amhdmitx/amhdmitx0       contenttype_cap         0664      system      system
+/sys/class/amhdmitx/amhdmitx0       contenttype_mode        0664      system      system
+
+#graphic
+/sys/class/graphics/fb*             blank                   0664      media       system
+/sys/class/graphics/fb*             order                   0664      media       system
+/sys/class/graphics/fb*             scale                   0664      media       system
+/sys/class/graphics/fb*             scale_axis              0664      system      system
+/sys/class/graphics/fb*             free_scale              0664      system      system
+/sys/class/graphics/fb*             scale_width             0664      system      system
+/sys/class/graphics/fb*             scale_height            0664      system      system
+
+/sys/class/graphics/fb0             free_scale_switch       0664      system      graphics
+/sys/class/graphics/fb0             enable_key              0664      media       system
+/sys/class/graphics/fb0             enable_key_onhold       0664      media       system
+/sys/class/graphics/fb0             free_scale_axis         0664      system      system
+/sys/class/graphics/fb0             freescale_mode          0664      system      system
+/sys/class/graphics/fb0             free_scale_axis         0664      system      system
+/sys/class/graphics/fb0             window_axis             0664      system      system
+
+#cpu
+/sys/devices/system/cpu/cpu1        online                          0664      system      system
+/sys/devices/system/cpu/cpu0        cpufreq/scaling_governor        0664      system      system
+/sys/devices/system/cpu/cpu0        cpufreq/hmp_boost               0664      system      system
+
+#led
+/sys/devices/platform/gpioleds/leds/yellow_led    trigger   0666  root root
+/sys/devices/platform/gpioleds/leds/sys_led       brightness   0666  root root
diff --git a/lineage.dependencies b/lineage.dependencies
new file mode 100644 (file)
index 0000000..5be7d39
--- /dev/null
@@ -0,0 +1,18 @@
+[
+  {
+    "repository": "android_kernel_amlogic_linux-4.9",
+    "target_path": "device/amlogic/linux-4.9"
+  },
+  {
+    "repository": "android_hardware_amlogic_tools_dtbtool",
+    "target_path": "hardware/amlogic/tools/dtbtool"
+  },
+  {
+    "repository": "android_hardware_amlogic_tools_imagepacker",
+    "target_path": "hardware/amlogic/tools/imagepacker"
+  },
+  {
+    "repository": "android_hardware_amlogic_tools_respacker",
+    "target_path": "hardware/amlogic/tools/respacker"
+  }
+]
diff --git a/manifest.xml b/manifest.xml
new file mode 100644 (file)
index 0000000..3e1d318
--- /dev/null
@@ -0,0 +1,190 @@
+<manifest version="2.0" type="device" target-level="4">
+    <hal format="hidl">
+        <name>android.hardware.audio</name>
+        <transport>hwbinder</transport>
+        <version>5.0</version>
+        <interface>
+            <name>IDevicesFactory</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@5.0::IDevicesFactory/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.audio.effect</name>
+        <transport>hwbinder</transport>
+        <version>5.0</version>
+        <interface>
+            <name>IEffectsFactory</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@5.0::IEffectsFactory/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.bluetooth</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IBluetoothHci</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@1.0::IBluetoothHci/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.camera.provider</name>
+        <transport>hwbinder</transport>
+        <version>2.5</version>
+        <interface>
+            <name>ICameraProvider</name>
+            <instance>legacy/0</instance>
+        </interface>
+        <fqname>@2.5::ICameraProvider/legacy/0</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.bluetooth.audio</name>
+        <transport>hwbinder</transport>
+        <version>2.0</version>
+        <interface>
+            <name>IBluetoothAudioProvidersFactory</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@2.0::IBluetoothAudioProvidersFactory/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.configstore</name>
+        <transport>hwbinder</transport>
+        <version>1.1</version>
+        <interface>
+            <name>ISurfaceFlingerConfigs</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@1.1::ISurfaceFlingerConfigs/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.drm</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>ICryptoFactory</name>
+            <instance>default</instance>
+            <instance>widevine</instance>
+        </interface>
+        <interface>
+            <name>IDrmFactory</name>
+            <instance>default</instance>
+            <instance>widevine</instance>
+        </interface>
+        <fqname>@1.0::ICryptoFactory/default</fqname>
+        <fqname>@1.0::ICryptoFactory/widevine</fqname>
+        <fqname>@1.0::IDrmFactory/default</fqname>
+        <fqname>@1.0::IDrmFactory/widevine</fqname>
+        <fqname>@1.3::ICryptoFactory/clearkey</fqname>
+        <fqname>@1.3::ICryptoFactory/widevine</fqname>
+        <fqname>@1.3::IDrmFactory/clearkey</fqname>
+        <fqname>@1.3::IDrmFactory/widevine</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.graphics.allocator</name>
+        <transport>hwbinder</transport>
+        <version>3.0</version>
+        <interface>
+            <name>IAllocator</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@3.0::IAllocator/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.graphics.mapper</name>
+        <transport arch="32+64">passthrough</transport>
+        <version>3.0</version>
+        <interface>
+            <name>IMapper</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@3.0::IMapper/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.health</name>
+        <transport>hwbinder</transport>
+        <version>2.0</version>
+        <interface>
+            <name>IHealth</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@2.0::IHealth/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.keymaster</name>
+        <transport>hwbinder</transport>
+        <version>4.1</version>
+        <interface>
+            <name>IKeymasterDevice</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@4.1::IKeymasterDevice/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.media.omx</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IOmx</name>
+            <instance>default</instance>
+        </interface>
+        <interface>
+            <name>IOmxStore</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@1.0::IOmx/default</fqname>
+        <fqname>@1.0::IOmxStore/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.memtrack</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IMemtrack</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@1.0::IMemtrack/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.power</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IPower</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@1.0::IPower/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>android.hardware.tv.cec</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IHdmiCec</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@1.0::IHdmiCec/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>vendor.amlogic.hardware.hdmicec</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>IDroidHdmiCEC</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@1.0::IDroidHdmiCEC/default</fqname>
+    </hal>
+    <hal format="hidl">
+        <name>vendor.amlogic.hardware.systemcontrol</name>
+        <transport>hwbinder</transport>
+        <version>1.1</version>
+        <interface>
+            <name>ISystemControl</name>
+            <instance>default</instance>
+        </interface>
+        <fqname>@1.1::ISystemControl/default</fqname>
+    </hal>
+</manifest>
diff --git a/media/media_codecs.xml b/media/media_codecs.xml
new file mode 100644 (file)
index 0000000..a66a122
--- /dev/null
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright (C) 2012 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!--
+<!DOCTYPE MediaCodecs [
+<!ELEMENT MediaCodecs (Decoders,Encoders)>
+<!ELEMENT Decoders (MediaCodec*)>
+<!ELEMENT Encoders (MediaCodec*)>
+<!ELEMENT MediaCodec (Type*,Quirk*)>
+<!ATTLIST MediaCodec name CDATA #REQUIRED>
+<!ATTLIST MediaCodec type CDATA>
+<!ELEMENT Type EMPTY>
+<!ATTLIST Type name CDATA #REQUIRED>
+<!ELEMENT Quirk EMPTY>
+<!ATTLIST Quirk name CDATA #REQUIRED>
+]>
+
+There's a simple and a complex syntax to declare the availability of a
+media codec:
+
+A codec that properly follows the OpenMax spec and therefore doesn't have any
+quirks and that only supports a single content type can be declared like so:
+
+    <MediaCodec name="OMX.foo.bar" type="something/interesting" />
+
+If a codec has quirks OR supports multiple content types, the following syntax
+can be used:
+
+    <MediaCodec name="OMX.foo.bar" >
+        <Type name="something/interesting" />
+        <Type name="something/else" />
+        ...
+        <Quirk name="requires-allocate-on-input-ports" />
+        <Quirk name="requires-allocate-on-output-ports" />
+        <Quirk name="output-buffers-are-unreadable" />
+    </MediaCodec>
+
+Only the three quirks included above are recognized at this point:
+
+"requires-allocate-on-input-ports"
+    must be advertised if the component does not properly support specification
+    of input buffers using the OMX_UseBuffer(...) API but instead requires
+    OMX_AllocateBuffer to be used.
+
+"requires-allocate-on-output-ports"
+    must be advertised if the component does not properly support specification
+    of output buffers using the OMX_UseBuffer(...) API but instead requires
+    OMX_AllocateBuffer to be used.
+
+"output-buffers-are-unreadable"
+    must be advertised if the emitted output buffers of a decoder component
+    are not readable, i.e. use a custom format even though abusing one of
+    the official OMX colorspace constants.
+    Clients of such decoders will not be able to access the decoded data,
+    naturally making the component much less useful. The only use for
+    a component with this quirk is to render the output to the screen.
+    Audio decoders MUST NOT advertise this quirk.
+    Video decoders that advertise this quirk must be accompanied by a
+    corresponding color space converter for thumbnail extraction,
+    matching surfaceflinger support that can render the custom format to
+    a texture and possibly other code, so just DON'T USE THIS QUIRK.
+
+-->
+
+<MediaCodecs>
+    <Decoders>
+        <MediaCodec name="OMX.amlogic.hevc.decoder.awesome2" type="video/hevc" >
+            <Limit name="size" min="128x128" max="3840x2160" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="972000" />
+            <Limit name="bitrate" range="1-300000000" />
+            <Feature name="adaptive-playback" />
+            <Feature name="tunneled-playback" />
+            <Limit name="concurrent-instances" max="9" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.hevc.decoder.awesome2.secure" type="video/hevc" >
+            <Limit name="size" min="128x128" max="3840x2160" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="972000" />
+            <Limit name="bitrate" range="1-300000000" />
+            <Feature name="adaptive-playback" />
+            <Feature name="secure-playback" required="true" />
+            <Feature name="tunneled-playback" />
+           <Limit name="concurrent-instances" max="2" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.avc.decoder.awesome2" type="video/avc" >
+            <Limit name="size" min="64x64" max="3840x2160" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="972000" />
+            <Limit name="bitrate" range="1-300000000" />
+            <Feature name="adaptive-playback" />
+            <Limit name="concurrent-instances" max="9" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.avc.decoder.awesome2.secure" type="video/avc" >
+            <Limit name="size" min="64x64" max="3840x2160" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="972000" />
+            <Limit name="bitrate" range="1-300000000" />
+            <Feature name="adaptive-playback" />
+            <Feature name="secure-playback" required="true" />
+           <Limit name="concurrent-instances" max="2" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.mpeg4.decoder.awesome" type="video/mp4v-es" >
+            <Limit name="size" min="64x64" max="1920x1088" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="972000" />
+            <Limit name="bitrate" range="1-300000000" />
+            <Feature name="adaptive-playback" />
+            <Limit name="concurrent-instances" max="9" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.h263.decoder.awesome" type="video/3gpp" >
+            <Limit name="size" min="64x64" max="1920x1088" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="972000" />
+            <Limit name="bitrate" range="1-300000000" />
+            <Feature name="adaptive-playback" />
+            <Limit name="concurrent-instances" max="1" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.mpeg2.decoder.awesome" type="video/mpeg2" >
+            <Limit name="size" min="64x64" max="1920x1088" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="972000" />
+            <Limit name="bitrate" range="1-300000000" />
+            <Feature name="adaptive-playback" />
+            <Limit name="concurrent-instances" max="9" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.vp9.decoder.awesome2" type="video/x-vnd.on2.vp9" rank="100" >
+            <Limit name="size" min="64x64" max="3840x2160" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="972000" />
+            <Limit name="bitrate" range="1-300000000" />
+            <Feature name="adaptive-playback" />
+            <Feature name="tunneled-playback" />
+           <Limit name="concurrent-instances" max="9" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.vp9.decoder.awesome2.secure" type="video/x-vnd.on2.vp9" rank="100" >
+            <Limit name="size" min="64x64" max="3840x2160" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="972000" />
+            <Limit name="bitrate" range="1-300000000" />
+            <Feature name="adaptive-playback" />
+            <Feature name="secure-playback" required="true" />
+            <Feature name="tunneled-playback" />
+           <Limit name="concurrent-instances" max="2" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp" />
+        <MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb" />
+        <MediaCodec name="OMX.google.aac.decoder" type="audio/mp4a-latm" />
+        <MediaCodec name="OMX.google.g711.alaw.decoder" type="audio/g711-alaw" />
+        <MediaCodec name="OMX.google.g711.mlaw.decoder" type="audio/g711-mlaw" />
+        <MediaCodec name="OMX.google.adpcm.ima.decoder" type="audio/adpcm-ima" />
+        <MediaCodec name="OMX.google.adpcm.ms.decoder" type="audio/adpcm-ms" />
+        <MediaCodec name="OMX.google.vorbis.decoder" type="audio/vorbis" />
+        <MediaCodec name="OMX.google.alac.decoder" type="audio/alac" />
+        <MediaCodec name="OMX.google.ape.decoder" type="audio/ape" />
+        <MediaCodec name="OMX.google.raw.decoder" type="audio/raw" />
+        <!--
+        <MediaCodec name="OMX.amlogic.audio.decoder.ac3" type="audio/ac3" />
+        <MediaCodec name="OMX.amlogic.audio.decoder.eac3" type="audio/eac3" />
+        <MediaCodec name="OMX.amlogic.audio.decoder.dtshd" type="audio/dtshd" />
+        -->
+        <MediaCodec name="OMX.google.opus.decoder" type="audio/opus">
+            <Limit name="channel-count" max="8" />
+            <Limit name="sample-rate" ranges="48000" />
+            <Limit name="bitrate" range="6000-510000" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.flac.decoder" type="audio/flac" />
+
+        <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" />
+        <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" />
+        <MediaCodec name="OMX.google.h264.decoder" type="video/avc">
+           <!-- profiles and levels:  ProfileBaseline : Level51 -->
+            <Limit name="size" min="2x2" max="2048x2048" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-8160" />
+            <Limit name="blocks-per-second" range="1-489600" />
+            <Limit name="bitrate" range="1-40000000" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc">
+            <!-- profiles and levels:  ProfileMain : MainTierLevel51 -->
+            <Limit name="size" min="2x2" max="4096x4096" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="8x8" />
+            <Limit name="block-count" range="1-196608" /> <!-- max 4096x3072 -->
+            <Limit name="blocks-per-second" range="1-2000000" />
+            <Limit name="bitrate" range="1-10000000" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+       <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8">
+            <Limit name="size" min="2x2" max="2048x2048" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-8160" />
+            <Limit name="blocks-per-second" range="1-500000" />
+            <Limit name="bitrate" range="1-40000000" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9">
+            <Limit name="size" min="2x2" max="1280x1280" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="block-count" range="1-3600" />
+            <Limit name="blocks-per-second" range="1-108000" />
+            <Limit name="bitrate" range="1-5000000" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.mp3.decoder" >
+            <Type  name="audio/mpeg" />
+            <Quirk name="needs-flush-before-disable" />
+            <Quirk name="requires-flush-complete-emulation" />
+        </MediaCodec>
+        <!-- Disable android C2 avc decoder -->
+        <MediaCodec name="c2.android.avc.decoder" type="video/avc" enabled="false" update="true" />
+        <MediaCodec name="c2.android.av1.decoder" type="video/av01" update="true" >
+            <Limit name="size" min="96x96" max="1920x1080" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="24" max="2073600" />
+            <Limit name="bitrate" range="1-120000000" />
+            <Limit name="frame-rate" range="1-60" />
+            <Feature name="adaptive-playback" />
+        </MediaCodec>
+    </Decoders>
+
+    <Settings>
+        <Setting name="max-video-encoder-input-buffers" value="9" />
+        <Setting name="supports-multiple-secure-codecs" value="false" />
+        <Setting name="supports-secure-with-non-secure-codec" value="true" />
+        <Variant name="slow-cpu" enabled="true" />
+    </Settings>
+
+    <Encoders>
+        <MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp" />
+        <MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb" />
+        <MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm" />
+        <MediaCodec name="OMX.google.flac.encoder" type="audio/flac" />
+
+        <MediaCodec name="OMX.amlogic.video.encoder.hevc" type="video/hevc" >
+            <Limit name="size" min="176x144" max="1920x1088" />
+            <Limit name="alignment" value="16x16" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="244800" />
+            <Limit name="bitrate" range="1-10000000" />
+            <Limit name="concurrent-instances" max="1" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.video.encoder.avc" type="video/avc" >
+            <Limit name="size" min="64x64" max="1920x1088" />
+            <Limit name="alignment" value="16x16" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="244800" />
+            <Limit name="bitrate" range="1-20000000" />
+            <Limit name="concurrent-instances" max="3" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" >
+            <Limit name="size" min="176x144" max="640x480" />
+            <Limit name="alignment" value="16x16" />
+            <Limit name="block-size" value="16x16" />
+            <Limit name="blocks-per-second" min="1" max="1485" />
+            <Limit name="bitrate" range="192000-1440000" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" >
+            <Limit name="size" min="176x144" max="352x288" />
+            <Limit name="alignment" value="16x16" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8">
+            <!-- profiles and levels:  ProfileMain : Level_Version0-3 -->
+            <Limit name="size" min="2x2" max="896x896" />
+            <Limit name="alignment" value="2x2" />
+            <Limit name="bitrate" range="1-40000000" />
+            <Feature name="bitrate-modes" value="VBR,CBR" />
+        </MediaCodec>
+    </Encoders>
+</MediaCodecs>
diff --git a/media/media_codecs_performance.xml b/media/media_codecs_performance.xml
new file mode 100644 (file)
index 0000000..1cf6f8b
--- /dev/null
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2015 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<MediaCodecs>
+    <Encoders>
+        <MediaCodec name="OMX.amlogic.video.encoder.avc" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="500-500" />
+            <Limit name="measured-frame-rate-720x480" range="188-188" />
+            <Limit name="measured-frame-rate-1280x720" range="66-66" />
+            <Limit name="performance-point-1280x720" range="60-60" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.video.encoder.hevc" type="video/hevc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="500-500" />
+            <Limit name="measured-frame-rate-720x480" range="188-188" />
+            <Limit name="measured-frame-rate-1280x720" range="66-66" />
+            <Limit name="performance-point-1280x720" range="60-60" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
+            <Limit name="measured-frame-rate-176x144" range="267-267" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
+            <Limit name="measured-frame-rate-176x144" range="223-223" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+            <Limit name="measured-frame-rate-320x180" range="120-120" />
+            <Limit name="measured-frame-rate-640x360" range="37-37" />
+        </MediaCodec>
+        <MediaCodec name="c2.android.h263.encoder" type="video/3gpp" update="true">
+            <Limit name="measured-frame-rate-176x144" range="450-450" />
+        </MediaCodec>
+        <MediaCodec name="c2.android.mpeg4.encoder" type="video/mp4v-es" update="true">
+            <Limit name="measured-frame-rate-176x144" range="450-450" />
+        </MediaCodec>
+        <MediaCodec name="c2.android.avc.encoder" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="255-255" />
+            <Limit name="measured-frame-rate-720x480" range="98-98" />
+            <Limit name="measured-frame-rate-1280x720" range="60-60" />
+            <Limit name="measured-frame-rate-1920x1080" range="30-30" />
+        </MediaCodec>
+        <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
+            <Limit name="measured-frame-rate-320x180" range="76-76" />
+            <Limit name="measured-frame-rate-640x360" range="38-38" />
+            <Limit name="measured-frame-rate-1280x720" range="16-16" />
+            <Limit name="measured-frame-rate-1920x1080" range="6-6" />
+        </MediaCodec>
+    </Encoders>
+    <Decoders>
+        <MediaCodec name="OMX.amlogic.h263.decoder.awesome" type="video/3gpp" update="true">
+            <Limit name="measured-frame-rate-176x144" range="163-197" />
+            <Limit name="measured-frame-rate-352x288" range="158-195" />
+            <Limit name="performance-point-352x288" range="200-200" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.avc.decoder.awesome2" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="399-399" />
+            <Limit name="measured-frame-rate-720x480" range="370-580" />
+            <Limit name="measured-frame-rate-1280x720" range="239-290" />
+            <Limit name="measured-frame-rate-1920x1080" range="120-135" />
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.avc.decoder.awesome2.secure" type="video/avc" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.vp6a.decoder.sw" type="video/x-vnd.on2.vp6a" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.vp6f.decoder.sw" type="video/x-vnd.on2.vp6f" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.avs.decoder.awesome" type="video/avs" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.avs2.decoder.awesome" type="video/avs2" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.rm10.decoder.sw" type="video/rm10" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.rm20.decoder.sw" type="video/rm20" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.rm30.decoder.sw" type="video/rm30" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.rm40.decoder.sw" type="video/rm40" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.vc1.decoder.awesome" type="video/vc1" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.wmv1.decoder.sw" type="video/wmv1" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.wmv2.decoder.sw" type="video/wmv2" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.wmv3.decoder.awesome" type="video/wmv3" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.mswmv3.decoder.awesome" type="video/x-ms-wmv" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.wvc1.decoder.awesome" type="video/wvc1" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.vp9.decoder.awesome2" type="video/x-vnd.on2.vp9" update="true">
+            <Limit name="measured-frame-rate-320x180" range="1050-1194" />
+            <Limit name="measured-frame-rate-640x360" range="500-816" />
+            <Limit name="measured-frame-rate-1280x720" range="290-450" />
+            <Limit name="measured-frame-rate-1920x1080" range="150-298" />
+            <Limit name="measured-frame-rate-3840x2160" range="62-82" />
+            <Limit name="performance-point-3840x2160" range="60-60" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.vp9.decoder.awesome2.secure" type="video/x-vnd.on2.vp9" update="true">
+            <Limit name="performance-point-3840x2160" range="60-60" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.hevc.decoder.awesome2" type="video/hevc" update="true">
+            <Limit name="measured-frame-rate-352x288" range="1188-1304" />
+            <Limit name="measured-frame-rate-640x360" range="600-1000" />
+            <Limit name="measured-frame-rate-720x480" range="516-800" />
+            <Limit name="measured-frame-rate-1280x720" range="294-500" />
+            <Limit name="measured-frame-rate-1920x1080" range="296-316" />
+            <Limit name="measured-frame-rate-3840x2160" range="72-100" />
+            <Limit name="performance-point-3840x2160" range="60-60" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.hevc.decoder.awesome2.secure" type="video/hevc" update="true">
+            <Limit name="performance-point-3840x2160" range="60-60" />
+        </MediaCodec>
+
+        <MediaCodec name="OMX.amlogic.mpeg4.decoder.awesome" type="video/mp4v-es" update="true">
+            <Limit name="measured-frame-rate-176x144" range="1080-1428" />
+            <Limit name="measured-frame-rate-480x360" range="860-1152" />
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.amlogic.mpeg2.decoder.awesome" type="video/mpeg2" update="true">
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
+            <Limit name="measured-frame-rate-176x144" range="451-451" />
+            <Limit name="measured-frame-rate-352x288" range="795-795" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
+            <Limit name="measured-frame-rate-320x240" range="396-396" />
+            <Limit name="measured-frame-rate-720x480" range="115-115" />
+            <Limit name="measured-frame-rate-1280x720" range="43-43" />
+            <Limit name="measured-frame-rate-1920x1080" range="18-18" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
+            <Limit name="measured-frame-rate-352x288" range="604-604" />
+            <Limit name="measured-frame-rate-640x360" range="151-151" />
+            <Limit name="measured-frame-rate-720x480" range="137-137" />
+            <Limit name="measured-frame-rate-1280x720" range="62-62" />
+            <Limit name="measured-frame-rate-1920x1080" range="35-35" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.mpeg4.decoder" type="video/mp4v-es" update="true">
+            <Limit name="measured-frame-rate-176x144" range="594-594" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+            <Limit name="measured-frame-rate-320x180" range="676-676" />
+            <Limit name="measured-frame-rate-640x360" range="130-130" />
+            <Limit name="measured-frame-rate-1280x720" range="26-26" />
+            <Limit name="measured-frame-rate-1920x1080" range="11-11" />
+        </MediaCodec>
+        <MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+            <Limit name="measured-frame-rate-320x180" range="265-265" />
+            <Limit name="measured-frame-rate-640x360" range="115-115" />
+            <Limit name="measured-frame-rate-1280x720" range="49-49" />
+        </MediaCodec>
+        <MediaCodec name="c2.android.h263.decoder" type="video/3gpp" update="true">
+            <Limit name="measured-frame-rate-176x144" range="333-469" />
+            <Limit name="measured-frame-rate-352x288" range="306-326" />
+        </MediaCodec>
+        <MediaCodec name="c2.android.mpeg4.decoder" type="video/mp4v-es" update="true">
+            <Limit name="measured-frame-rate-176x144" range="368-564" />
+        </MediaCodec>
+        <MediaCodec name="c2.android.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
+            <Limit name="measured-frame-rate-320x180" range="266-266" />
+            <Limit name="measured-frame-rate-640x360" range="97-97" />
+            <Limit name="measured-frame-rate-1280x720" range="20-25" />
+            <Limit name="measured-frame-rate-1920x1080" range="9-9" />
+        </MediaCodec>
+        <MediaCodec name="c2.android.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
+            <Limit name="measured-frame-rate-320x180" range="209-209" />
+            <Limit name="measured-frame-rate-640x360" range="106-106" />
+            <Limit name="measured-frame-rate-1280x720" range="62-62" />
+            <Limit name="measured-frame-rate-1920x1080" range="38-38" />
+        </MediaCodec>
+        <MediaCodec name="c2.android.hevc.decoder" type="video/hevc" update="true">
+            <Limit name="measured-frame-rate-352x288" range="165-242" />
+            <Limit name="measured-frame-rate-640x360" range="96-126" />
+            <Limit name="measured-frame-rate-720x480" range="87-115" />
+            <Limit name="measured-frame-rate-1280x720" range="48-57" />
+            <Limit name="measured-frame-rate-1920x1080" range="30-30" />
+        </MediaCodec>
+       <MediaCodec name="OMX.amlogic.vp8.decoder.sw" type="video/x-vnd.on2.vp8" update="true">
+            <Limit name="measured-frame-rate-320x180" range="676-676" />
+            <Limit name="measured-frame-rate-640x360" range="130-130" />
+            <Limit name="measured-frame-rate-1280x720" range="93-93" />
+            <Limit name="measured-frame-rate-1920x1080" range="42-42" />
+            <Limit name="performance-point-1920x1080" range="120-120" />
+        </MediaCodec>
+    </Decoders>
+</MediaCodecs>
diff --git a/media/media_codecs_profiles.xml b/media/media_codecs_profiles.xml
new file mode 100644 (file)
index 0000000..16e8eb8
--- /dev/null
@@ -0,0 +1,229 @@
+<MediaSettings>
+
+    <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+    <CamcorderProfiles cameraId="0" startOffsetMs="50">
+
+        <EncoderProfile quality="720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapsecif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="70" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="90" />
+
+    </CamcorderProfiles>
+
+    <CamcorderProfiles cameraId="1" startOffsetMs="50">
+
+        <EncoderProfile quality="720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapsecif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="70" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="90" />
+
+    </CamcorderProfiles>
+
+    <EncoderOutputFileFormat name="3gp" />
+    <EncoderOutputFileFormat name="mp4" />
+
+    <VideoDecoderCap name="wmv" enabled="true" />
+    <AudioDecoderCap name="wma" enabled="true" />
+
+    <VideoEncoderCap name="h263" enabled="true"
+        minBitRate="192000" maxBitRate="420000"
+        minFrameWidth="176" maxFrameWidth="352"
+        minFrameHeight="144" maxFrameHeight="288"
+        minFrameRate="1" maxFrameRate="20" />
+
+    <VideoEncoderCap name="h264" enabled="true"
+        minBitRate="192000" maxBitRate="6000000"
+        minFrameWidth="176" maxFrameWidth="1280"
+        minFrameHeight="144" maxFrameHeight="720"
+        minFrameRate="5" maxFrameRate="30" />
+
+    <VideoEncoderCap name="m4v" enabled="true"
+        minBitRate="192000" maxBitRate="1440000"
+        minFrameWidth="176" maxFrameWidth="640"
+        minFrameHeight="144" maxFrameHeight="480"
+        minFrameRate="1" maxFrameRate="15" />
+
+    <AudioEncoderCap name="amrwb" enabled="true"
+        minBitRate="6600" maxBitRate="23050"
+        minSampleRate="16000" maxSampleRate="16000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="aac" enabled="true"
+        minBitRate="758" maxBitRate="288000"
+        minSampleRate="8000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="heaac" enabled="true"
+        minBitRate="8000" maxBitRate="64000"
+        minSampleRate="16000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="aaceld" enabled="true"
+        minBitRate="16000" maxBitRate="192000"
+        minSampleRate="16000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="amrwb" enabled="true"
+        minBitRate="6600" maxBitRate="23050"
+        minSampleRate="16000" maxSampleRate="16000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="amrnb" enabled="true"
+        minBitRate="4750" maxBitRate="12200"
+        minSampleRate="8000" maxSampleRate="8000"
+        minChannels="1" maxChannels="1" />
+</MediaSettings>
diff --git a/media/media_codecs_profiles_V1_0.xml b/media/media_codecs_profiles_V1_0.xml
new file mode 100644 (file)
index 0000000..0c501f0
--- /dev/null
@@ -0,0 +1,281 @@
+<MediaSettings>
+
+    <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+    <CamcorderProfiles cameraId="0">
+
+        <EncoderProfile quality="1080p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="8000000"
+            width="1920"
+            height="1080"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse1080p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="8000000"
+            width="1920"
+            height="1080"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapsecif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="70" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="90" />
+
+    </CamcorderProfiles>
+
+    <CamcorderProfiles cameraId="1">
+
+        <EncoderProfile quality="1080p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="8000000"
+            width="1920"
+            height="1080"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse1080p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="8000000"
+            width="1920"
+            height="1080"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapsecif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="70" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="90" />
+
+    </CamcorderProfiles>
+
+    <EncoderOutputFileFormat name="3gp" />
+    <EncoderOutputFileFormat name="mp4" />
+
+    <VideoEncoderCap name="h263" enabled="true"
+        minBitRate="192000" maxBitRate="420000"
+        minFrameWidth="176" maxFrameWidth="352"
+        minFrameHeight="144" maxFrameHeight="288"
+        minFrameRate="1" maxFrameRate="20" />
+
+    <VideoEncoderCap name="h264" enabled="true"
+        minBitRate="192000" maxBitRate="6000000"
+        minFrameWidth="176" maxFrameWidth="1920"
+        minFrameHeight="144" maxFrameHeight="1080"
+        minFrameRate="5" maxFrameRate="30" />
+
+    <VideoEncoderCap name="m4v" enabled="true"
+        minBitRate="192000" maxBitRate="1440000"
+        minFrameWidth="176" maxFrameWidth="640"
+        minFrameHeight="144" maxFrameHeight="480"
+        minFrameRate="1" maxFrameRate="15" />
+
+    <AudioEncoderCap name="amrwb" enabled="true"
+        minBitRate="6600" maxBitRate="23050"
+        minSampleRate="16000" maxSampleRate="16000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="aac" enabled="true"
+        minBitRate="758" maxBitRate="288000"
+        minSampleRate="8000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="heaac" enabled="true"
+        minBitRate="8000" maxBitRate="64000"
+        minSampleRate="16000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="aaceld" enabled="true"
+        minBitRate="16000" maxBitRate="192000"
+        minSampleRate="16000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="amrwb" enabled="true"
+        minBitRate="6600" maxBitRate="23050"
+        minSampleRate="16000" maxSampleRate="16000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="amrnb" enabled="true"
+        minBitRate="4750" maxBitRate="12200"
+        minSampleRate="8000" maxSampleRate="8000"
+        minChannels="1" maxChannels="1" />
+
+    <VideoDecoderCap name="wmv" enabled="true" />
+    <AudioDecoderCap name="wma" enabled="true" />
+</MediaSettings>
diff --git a/media/media_profiles.xml b/media/media_profiles.xml
new file mode 100644 (file)
index 0000000..16e8eb8
--- /dev/null
@@ -0,0 +1,229 @@
+<MediaSettings>
+
+    <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+    <CamcorderProfiles cameraId="0" startOffsetMs="50">
+
+        <EncoderProfile quality="720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapsecif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="70" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="90" />
+
+    </CamcorderProfiles>
+
+    <CamcorderProfiles cameraId="1" startOffsetMs="50">
+
+        <EncoderProfile quality="720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapsecif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="70" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="90" />
+
+    </CamcorderProfiles>
+
+    <EncoderOutputFileFormat name="3gp" />
+    <EncoderOutputFileFormat name="mp4" />
+
+    <VideoDecoderCap name="wmv" enabled="true" />
+    <AudioDecoderCap name="wma" enabled="true" />
+
+    <VideoEncoderCap name="h263" enabled="true"
+        minBitRate="192000" maxBitRate="420000"
+        minFrameWidth="176" maxFrameWidth="352"
+        minFrameHeight="144" maxFrameHeight="288"
+        minFrameRate="1" maxFrameRate="20" />
+
+    <VideoEncoderCap name="h264" enabled="true"
+        minBitRate="192000" maxBitRate="6000000"
+        minFrameWidth="176" maxFrameWidth="1280"
+        minFrameHeight="144" maxFrameHeight="720"
+        minFrameRate="5" maxFrameRate="30" />
+
+    <VideoEncoderCap name="m4v" enabled="true"
+        minBitRate="192000" maxBitRate="1440000"
+        minFrameWidth="176" maxFrameWidth="640"
+        minFrameHeight="144" maxFrameHeight="480"
+        minFrameRate="1" maxFrameRate="15" />
+
+    <AudioEncoderCap name="amrwb" enabled="true"
+        minBitRate="6600" maxBitRate="23050"
+        minSampleRate="16000" maxSampleRate="16000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="aac" enabled="true"
+        minBitRate="758" maxBitRate="288000"
+        minSampleRate="8000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="heaac" enabled="true"
+        minBitRate="8000" maxBitRate="64000"
+        minSampleRate="16000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="aaceld" enabled="true"
+        minBitRate="16000" maxBitRate="192000"
+        minSampleRate="16000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="amrwb" enabled="true"
+        minBitRate="6600" maxBitRate="23050"
+        minSampleRate="16000" maxSampleRate="16000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="amrnb" enabled="true"
+        minBitRate="4750" maxBitRate="12200"
+        minSampleRate="8000" maxSampleRate="8000"
+        minChannels="1" maxChannels="1" />
+</MediaSettings>
diff --git a/media/media_profiles_V1_0.xml b/media/media_profiles_V1_0.xml
new file mode 100644 (file)
index 0000000..0c501f0
--- /dev/null
@@ -0,0 +1,281 @@
+<MediaSettings>
+
+    <!-- Each camcorder profile defines a set of predefined configuration parameters -->
+    <CamcorderProfiles cameraId="0">
+
+        <EncoderProfile quality="1080p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="8000000"
+            width="1920"
+            height="1080"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse1080p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="8000000"
+            width="1920"
+            height="1080"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapsecif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="70" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="90" />
+
+    </CamcorderProfiles>
+
+    <CamcorderProfiles cameraId="1">
+
+        <EncoderProfile quality="1080p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="8000000"
+            width="1920"
+            height="1080"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse1080p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="8000000"
+            width="1920"
+            height="1080"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse720p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="1280"
+            height="720"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapse480p" fileFormat="3gp" duration="60">
+            <Video codec="h264"
+            bitRate="6000000"
+            width="640"
+            height="480"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="cif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <EncoderProfile quality="timelapsecif" fileFormat="3gp" duration="30">
+            <Video codec="h264"
+            bitRate="1440000"
+            width="352"
+            height="288"
+            frameRate="30" />
+
+            <Audio codec="amrwb"
+            bitRate="23050"
+            sampleRate="16000"
+            channels="1" />
+        </EncoderProfile>
+
+        <ImageEncoding quality="70" />
+        <ImageEncoding quality="80" />
+        <ImageEncoding quality="90" />
+
+    </CamcorderProfiles>
+
+    <EncoderOutputFileFormat name="3gp" />
+    <EncoderOutputFileFormat name="mp4" />
+
+    <VideoEncoderCap name="h263" enabled="true"
+        minBitRate="192000" maxBitRate="420000"
+        minFrameWidth="176" maxFrameWidth="352"
+        minFrameHeight="144" maxFrameHeight="288"
+        minFrameRate="1" maxFrameRate="20" />
+
+    <VideoEncoderCap name="h264" enabled="true"
+        minBitRate="192000" maxBitRate="6000000"
+        minFrameWidth="176" maxFrameWidth="1920"
+        minFrameHeight="144" maxFrameHeight="1080"
+        minFrameRate="5" maxFrameRate="30" />
+
+    <VideoEncoderCap name="m4v" enabled="true"
+        minBitRate="192000" maxBitRate="1440000"
+        minFrameWidth="176" maxFrameWidth="640"
+        minFrameHeight="144" maxFrameHeight="480"
+        minFrameRate="1" maxFrameRate="15" />
+
+    <AudioEncoderCap name="amrwb" enabled="true"
+        minBitRate="6600" maxBitRate="23050"
+        minSampleRate="16000" maxSampleRate="16000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="aac" enabled="true"
+        minBitRate="758" maxBitRate="288000"
+        minSampleRate="8000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="heaac" enabled="true"
+        minBitRate="8000" maxBitRate="64000"
+        minSampleRate="16000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="aaceld" enabled="true"
+        minBitRate="16000" maxBitRate="192000"
+        minSampleRate="16000" maxSampleRate="48000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="amrwb" enabled="true"
+        minBitRate="6600" maxBitRate="23050"
+        minSampleRate="16000" maxSampleRate="16000"
+        minChannels="1" maxChannels="1" />
+
+    <AudioEncoderCap name="amrnb" enabled="true"
+        minBitRate="4750" maxBitRate="12200"
+        minSampleRate="8000" maxSampleRate="8000"
+        minChannels="1" maxChannels="1" />
+
+    <VideoDecoderCap name="wmv" enabled="true" />
+    <AudioDecoderCap name="wma" enabled="true" />
+</MediaSettings>
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644 (file)
index 0000000..c0f10f2
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+**
+** Copyright (C) 2021 The LineageOS Project
+**
+** SPDX-License-Identifier: Apache-2.0
+**
+*/
+-->
+<resources>
+    <!-- XXXXX NOTE THE FOLLOWING RESOURCES USE THE WRONG NAMING CONVENTION.
+         Please don't copy them, copy anything else. -->
+
+    <!-- the 5th element "resore-time" indicates the number of milliseconds to delay
+        before automatically restore the default connection.  Set -1 if the connection
+         does not require auto-restore. -->
+    <!-- the 6th element indicates boot-time dependency-met value. -->
+    <string-array translatable="false" name="networkAttributes">
+        <item>"wifi,1,1,1,-1,true"</item>
+        <item>"ethernet,9,9,2,-1,true"</item>
+    </string-array>
+
+    <!-- This string array should be overridden by the device to present a list of radio
+         attributes.  This is used by the connectivity manager to decide which networks can coexist
+         based on the hardware -->
+    <!-- An Array of "[ConnectivityManager connectionType],
+                      [# simultaneous connection types]"  -->
+    <string-array translatable="false" name="radioAttributes">
+        <item>"1,1"</item>
+        <item>"9,1"</item>
+    </string-array>
+
+    <!-- Array of allowable ConnectivityManager network types for tethering -->
+    <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
+         [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
+    <integer-array translatable="false" name="config_tether_upstream_types">
+        <item>1</item>
+        <item>7</item>
+    </integer-array>
+
+    <!-- If supported and enabled, are dreams activated when asleep and charging? (by default) -->
+    <bool name="config_dreamsActivatedOnSleepByDefault">true</bool>
+
+    <!-- Whether UI for multi user should be shown -->
+    <bool name="config_enableMultiUserUI">true</bool>
+
+    <!-- True if the device supports split screen as a form of multi-window. -->
+    <bool name="config_supportsSplitScreenMultiWindow">false</bool>
+
+    <!--  Maximum number of supported users -->
+    <integer name="config_multiuserMaximumUsers">2</integer>
+</resources>
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
new file mode 100644 (file)
index 0000000..84206a0
--- /dev/null
@@ -0,0 +1,20 @@
+<resources>
+    <bool name="profile_supported_a2dp">false</bool>
+    <bool name="profile_supported_hs_hfp">false</bool>
+    <bool name="profile_supported_pbap">false</bool>
+    <bool name="profile_supported_map">false</bool>
+    <bool name="profile_supported_hdp">false</bool>
+    <bool name="profile_supported_opp">false</bool>
+    <bool name="enable_phone_policy">false</bool>
+
+    <bool name="profile_supported_hfpclient">false</bool>
+    <bool name="hfp_client_connection_service_enabled">false</bool>
+    <bool name="profile_supported_pbapclient">false</bool>
+    <bool name="profile_supported_pan">false</bool>
+    <bool name="profile_supported_mapmce">false</bool>
+
+    <bool name="profile_supported_hid_host">true</bool>
+    <bool name="profile_supported_avrcp_target">true</bool>
+    <bool name="profile_supported_avrcp_controller">true</bool>
+    <bool name="profile_supported_a2dp_sink">true</bool>
+</resources>
diff --git a/product.prop b/product.prop
new file mode 100644 (file)
index 0000000..562bfe2
--- /dev/null
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2021 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+## Audio
+ro.af.client_heap_size_kbyte=1536
+ro.config.media_vol_default=20
+ro.config.media_vol_steps=25
+ro.config.ringtone=Ring_Synth_04.ogg
+ro.config.notification_sound=pixiedust.ogg
+
+## Battery (Fake)
+ro.boot.fake_battery=42
+
+## Camera
+camera.disable_zsl_mode=1
+rw.camera.usb.faceback=true
+
+## Graphics
+debug.sf.disable_backpressure=1
+debug.sf.latch_unsignaled=1
+ro.sf.disable_triple_buffer=0
+
+## Identifiers
+ro.oem.key1=ATV00100020
diff --git a/proprietary-files.txt b/proprietary-files.txt
new file mode 100644 (file)
index 0000000..7709634
--- /dev/null
@@ -0,0 +1,254 @@
+### All blobs from this list, unless pinned and noted as otherwise,
+##  are from adt3-user 11 RTT1.200909.003.A2 6832896 release-keys.
+
+odm/etc/firmware/firmware.le
+odm/usr/idc/Vendor_000d_Product_3838.idc
+odm/usr/idc/Vendor_000d_Product_3839.idc
+odm/usr/keylayout/Vendor_000d_Product_3838.kl
+odm/usr/keylayout/Vendor_000d_Product_3839.kl
+odm/usr/keylayout/Vendor_7545_Product_0021.kl
+
+product/etc/permissions/privapp-permissions-atv-product.xml:product/etc/permissions/privapp-permissions-atv-product-lineage.xml
+product/etc/permissions/privapp-permissions-google-p.xml:product/etc/permissions/privapp-permissions-google-p-lineage.xml
+product/etc/permissions/split-permissions-google.xml:product/etc/permissions/split-permissions-google-lineage.xml
+product/etc/sysconfig/google-hiddenapi-package-whitelist.xml
+product/etc/sysconfig/google.xml:product/etc/sysconfig/google-lineage.xml
+product/etc/sysconfig/google_atv.xml
+product/lib/libsystemcontrolservice.so
+product/media/audio/alarms/Alarm_Beep_02.ogg
+product/media/audio/ui/Effect_Tick.ogg
+product/media/audio/ui/KeypressDelete.ogg
+product/media/audio/ui/KeypressInvalid.ogg
+product/media/audio/ui/KeypressReturn.ogg
+product/media/audio/ui/KeypressSpacebar.ogg
+product/media/audio/ui/KeypressStandard.ogg
+
+system/etc/audio_effects.conf
+system/etc/permissions/privapp-permissions-atv.xml:system/etc/permissions/privapp-permissions-atv-lineage.xml
+system/etc/permissions/privapp-permissions-google.xml:system/etc/permissions/privapp-permissions-google-lineage.xml
+system/lib/hw/screen_source.amlogic.so
+system/lib/libmediahal_resman.system.so
+system/lib/libmediahal_tsplayer.system.so
+system/lib/libmediahal_videodec.system.so
+
+system_ext/etc/permissions/privapp-permissions-deadpool.xml
+system_ext/etc/permissions/privapp-permissions-google-se.xml:system_ext/etc/permissions/privapp-permissions-google-se-lineage.xml
+system_ext/lib/vendor.amlogic.hardware.hdmicec@1.0.so
+system_ext/lib/vendor.amlogic.hardware.remotecontrol@1.0.so
+system_ext/lib/vendor.amlogic.hardware.systemcontrol@1.0.so
+system_ext/lib/vendor.amlogic.hardware.systemcontrol@1.1.so
+-system_ext/priv-app/DeadpoolServiceBtServices/DeadpoolServiceBtServices.apk
+
+vendor/bin/ddrtest.sh
+vendor/bin/esplayer
+vendor/bin/hdcp_tx22
+vendor/bin/hdmicecd
+vendor/bin/hw/android.hardware.drm@1.3-service.widevine
+vendor/bin/hw/android.hardware.dumpstate@1.0-service.droidlogic
+vendor/bin/hw/android.hardware.graphics.composer@2.4-service.droidlogic
+vendor/bin/hw/android.hardware.health@2.0-service.droidlogic
+vendor/bin/hw/android.hardware.keymaster@4.1-service.amlogic
+vendor/bin/hw/android.hardware.oemlock@1.0-service.droidlogic
+vendor/bin/hw/android.hardware.thermal@2.0-service.droidlogic
+vendor/bin/hw/android.hardware.usb.gadget@1.1-service.droidlogic
+vendor/bin/hw/android.hardware.wifi@1.0-service.droidlogic
+vendor/bin/oemcrypto_test_aml
+vendor/bin/remotecfg
+vendor/bin/systemcontrol
+vendor/bin/tee-supplicant
+vendor/bin/tee_preload_fw
+vendor/etc/audio_effects.conf
+vendor/etc/bluetooth/4343.hcd
+vendor/etc/bluetooth/BCM20702.hcd
+vendor/etc/bluetooth/BCM20703A2.hcd
+vendor/etc/bluetooth/BCM2076.hcd
+vendor/etc/bluetooth/BCM4330.hcd
+vendor/etc/bluetooth/BCM4345C0.hcd
+vendor/etc/bluetooth/BCM4345C5.hcd
+vendor/etc/bluetooth/BCM4350.hcd
+vendor/etc/bluetooth/BCM4354.hcd
+vendor/etc/bluetooth/BCM4359C0.hcd
+vendor/etc/bluetooth/BCM4362A1.hcd
+vendor/etc/bluetooth/auto_pairing.conf
+vendor/etc/bluetooth/bcm43241b4.hcd
+vendor/etc/bluetooth/bcm43341b0.hcd
+vendor/etc/bluetooth/bcm4335c0.hcd
+vendor/etc/bluetooth/bcm43569a2.hcd
+vendor/etc/bluetooth/blacklist.conf
+vendor/etc/drm/playready/bgroupcert.dat
+vendor/etc/drm/playready/zgpriv.dat
+vendor/etc/drm/playready/zgpriv_protected.dat
+vendor/etc/init/android.hardware.drm@1.3-service.widevine.rc
+vendor/etc/init/android.hardware.dumpstate@1.0-service.droidlogic.rc
+vendor/etc/init/android.hardware.graphics.allocator@3.0-service.rc
+vendor/etc/init/android.hardware.graphics.composer@2.4-service.droidlogic.rc
+vendor/etc/init/android.hardware.health@2.0-service.droidlogic.rc
+vendor/etc/init/android.hardware.keymaster@4.1-service.amlogic.rc
+vendor/etc/init/android.hardware.oemlock@1.0-service.droidlogic.rc
+vendor/etc/init/android.hardware.thermal@2.0-service.droidlogic.rc
+vendor/etc/init/android.hardware.usb.gadget@1.1-service.droidlogic.rc
+vendor/etc/init/android.hardware.wifi@1.0-service.droidlogic.rc
+vendor/etc/init/bluetooth.rc
+vendor/etc/init/dvb.rc
+vendor/etc/init/fs.rc
+vendor/etc/init/hdmicecd.rc
+vendor/etc/init/irblaster1.rc
+vendor/etc/init/sysfs_permissions.rc
+vendor/etc/init/systemcontrol.rc
+vendor/etc/init/tee-supplicant.rc
+vendor/etc/init/tee_preload_fw.rc
+vendor/etc/mesondisplay.cfg
+vendor/etc/permissions/android.software.cant_save_state.xml
+vendor/etc/permissions/droidlogic.software.core.xml
+vendor/etc/permissions/droidlogic.software.netflix.xml
+vendor/etc/permissions/privapp-permissions-amlogic.xml
+vendor/etc/remote.cfg
+vendor/etc/remote.tab1
+vendor/etc/remote.tab2
+vendor/etc/remote.tab3
+vendor/etc/seccomp_policy/mediacodec.policy
+vendor/etc/seccomp_policy/mediaextractor.policy
+vendor/etc/seccomp_policy/mediaswcodec.policy
+vendor/etc/thermal_info_config.json
+vendor/etc/tvconfig/pq/pq.db
+vendor/etc/tvconfig/pq/pq_default.ini
+-vendor/etc/vintf/manifest/android.hardware.dumpstate@1.0-service.droidlogic.xml
+-vendor/etc/vintf/manifest/android.hardware.graphics.composer@2.4-service.droidlogic.xml
+-vendor/etc/vintf/manifest/android.hardware.oemlock@1.0-service.droidlogic.xml
+-vendor/etc/vintf/manifest/android.hardware.thermal@2.0-service.droidlogic.xml
+-vendor/etc/vintf/manifest/android.hardware.usb.gadget@1.1-service.droidlogic.xml
+-vendor/etc/vintf/manifest/android.hardware.wifi@1.0-service.droidlogic.xml
+-vendor/etc/vintf/manifest/manifest_android.hardware.drm@1.3-service.widevine.xml
+vendor/etc/wifi/buildin/clm_bcm43751a1_ag.blob
+vendor/etc/wifi/buildin/config_bcm4339a0_ag.txt
+vendor/etc/wifi/buildin/config_bcm43436b0.txt
+vendor/etc/wifi/buildin/config_bcm43438a0.txt
+vendor/etc/wifi/buildin/config_bcm43438a1.txt
+vendor/etc/wifi/buildin/config_bcm43455c0_ag.txt
+vendor/etc/wifi/buildin/config_bcm43456c5_ag.txt
+vendor/etc/wifi/buildin/config_bcm4356a2_ag.txt
+vendor/etc/wifi/buildin/config_bcm4359c0_ag.txt
+vendor/etc/wifi/buildin/fw_bcm4339a0_ag.bin
+vendor/etc/wifi/buildin/fw_bcm43436b0.bin
+vendor/etc/wifi/buildin/fw_bcm43438a0.bin
+vendor/etc/wifi/buildin/fw_bcm43455c0_ag.bin
+vendor/etc/wifi/buildin/fw_bcm43456c5_ag.bin
+vendor/etc/wifi/buildin/fw_bcm4356a2_ag.bin
+vendor/etc/wifi/buildin/fw_bcm4356a2_ag_apsta.bin
+vendor/etc/wifi/buildin/fw_bcm4356a2_ag_p2p.bin
+vendor/etc/wifi/buildin/fw_bcm4358u_ag.bin
+vendor/etc/wifi/buildin/fw_bcm4359c0_ag.bin
+vendor/etc/wifi/buildin/fw_bcm43751a1_ag.bin
+vendor/etc/wifi/buildin/nvram_ap6212.txt
+vendor/etc/wifi/buildin/nvram_ap6236.txt
+vendor/etc/wifi/buildin/nvram_ap6255.txt
+vendor/etc/wifi/buildin/nvram_ap6256.txt
+vendor/etc/wifi/buildin/nvram_ap6271s.txt
+vendor/etc/wifi/buildin/nvram_ap62x8.txt
+vendor/etc/wifi/buildin/nvram_ap6335.txt
+vendor/etc/wifi/buildin/nvram_ap6356.txt
+vendor/etc/wifi/buildin/nvram_ap6398s.txt
+vendor/etc/wifi/p2p_supplicant_overlay.conf
+vendor/etc/wifi/wpa_supplicant.conf:vendor/etc/wifi/wpa_supplicant_overlay.conf
+-vendor/framework/droidlogic.jar
+vendor/lib/android.hardware.graphics.composer@2.1-resources-vendor.so
+vendor/lib/android.hardware.graphics.composer@2.2-resources-vendor.so
+vendor/lib/egl/libGLES_mali.so
+vendor/lib/firmware/video/h264_enc.bin
+vendor/lib/firmware/video/video_ucode.bin
+vendor/lib/hw/android.hardware.graphics.allocator@3.0-impl-arm.so
+vendor/bin/hw/android.hardware.graphics.allocator@3.0-service
+vendor/lib/hw/android.hardware.graphics.mapper@3.0-impl-arm.so
+vendor/lib/hw/audio.primary.amlogic.so
+vendor/lib/hw/camera.amlogic.so
+vendor/lib/hw/hdmi_cec.amlogic.so
+vendor/lib/hw/hwcomposer.amlogic.so
+vendor/lib/hw/memtrack.amlogic.so
+vendor/lib/hw/power.amlogic.so
+vendor/lib/hw/vulkan.amlogic.so
+vendor/lib/libHwAudio_dcvdec.so
+vendor/lib/libHwAudio_dtshd.so
+vendor/lib/libOmxAudio.so
+vendor/lib/libOmxBase.so
+vendor/lib/libOmxCore.so
+vendor/lib/libOmxVideo.so
+vendor/lib/libam_adp.so
+vendor/lib/libamadec.so
+vendor/lib/libamaudioutils.so
+vendor/lib/libamavutils.so
+vendor/lib/libamgralloc_ext.so
+vendor/lib/libamgralloc_ext_vendor@2.so
+vendor/lib/libamlaudiorc.so
+vendor/lib/libdatachunkqueue_alt.so
+vendor/lib/libdisplaysetting.so
+vendor/lib/libdroidaudiospdif.so
+vendor/lib/libfaad.so
+vendor/lib/libfbc.so
+vendor/lib/libfpscalculator_alt.so
+vendor/lib/libge2d.so
+vendor/lib/libhdmicec.so
+vendor/lib/libhdmicec_jni.so
+vendor/lib/libicuuc_vendor.so
+vendor/lib/libispaaa.so
+vendor/lib/libjniuevent.so
+vendor/lib/libmad.so
+vendor/lib/libmediahal_resman.so
+vendor/lib/libmediahal_tsplayer.so
+vendor/lib/libmediahal_videodec.so
+vendor/lib/libmeson_display_adapter_remote.so
+vendor/lib/libmeson_display_service.so
+vendor/lib/libms12api.so
+vendor/lib/libnano.so
+vendor/lib/liboemcrypto.so
+vendor/lib/libomx_av_core_alt.so
+vendor/lib/libomx_clock_utils_alt.so
+vendor/lib/libomx_framework_alt.so
+vendor/lib/libomx_timed_task_queue_alt.so
+vendor/lib/libomx_worker_peer_alt.so
+vendor/lib/libplayready.so
+vendor/lib/libpqcontrol.so
+vendor/lib/libremotecontrol_jni.so
+vendor/lib/libremotecontrolserver.so
+vendor/lib/libsecmem.so
+vendor/lib/libstagefrighthw.so
+vendor/lib/libsystemcontrolservice.so
+vendor/lib/libtee_load_video_fw.so
+vendor/lib/libteec.so
+vendor/lib/libthreadworker_alt.so
+vendor/lib/libtvbinder.so
+vendor/lib/libvideotunnel.so
+vendor/lib/libwifi-hal-aml.so
+vendor/lib/libwifi-hal-common-ext.so
+vendor/lib/libwvhidl.so
+vendor/lib/mediadrm/libplayreadymediadrmplugin.so
+vendor/lib/soundfx/libavl.so
+vendor/lib/soundfx/libbalance.so
+vendor/lib/soundfx/libhpeqwrapper.so
+vendor/lib/soundfx/libsrswrapper.so
+vendor/lib/soundfx/libtreblebasswrapper.so
+vendor/lib/teetz/2c1a33c0-44cc-11e5-bc3b0002a5d5c51b.ta
+vendor/lib/teetz/526fc4fc-7ee6-4a12-96e3-83da9565bce8.ta
+vendor/lib/teetz/8efb1e1c-37e5-4326-a5d68c33726c7d57.ta
+vendor/lib/teetz/9a04f079-9840-4286-ab92e65be0885f95.ta
+vendor/lib/teetz/e043cde0-61d0-11e5-9c260002a5d5c51b.ta
+vendor/lib/vendor.amlogic.display.meson_display_ipc@1.0.so
+vendor/lib/vendor.amlogic.hardware.droidvold@1.0.so
+vendor/lib/vendor.amlogic.hardware.hdmicec@1.0.so
+vendor/lib/vendor.amlogic.hardware.remotecontrol@1.0.so
+vendor/lib/vendor.amlogic.hardware.systemcontrol@1.0.so
+vendor/lib/vendor.amlogic.hardware.systemcontrol@1.1.so
+vendor/lib/vendor.amlogic.hardware.tvserver@1.0.so
+-vendor/priv-app/droidlogic-res/droidlogic-res.apk
+vendor/priv-app/droidlogic-res/lib/arm/libjniuevent.so
+vendor/priv-app/droidlogic-res/lib/arm/libremotecontrol_jni.so
+vendor/usr/keylayout/Vendor_0001_Product_0001.kl
+vendor/usr/keylayout/Vendor_000d_Product_3838.kl
+vendor/usr/keylayout/Vendor_000d_Product_3839.kl
+vendor/usr/keylayout/Vendor_005d_Product_0001.kl
+vendor/usr/keylayout/Vendor_0484_Product_5738.kl
+vendor/usr/keylayout/Vendor_0508_Product_0110.kl
+vendor/usr/keylayout/Vendor_0c45_Product_1109.kl
+vendor/usr/keylayout/Vendor_1915_Product_0001.kl
+vendor/usr/keylayout/Vendor_7045_Product_1820.kl
+vendor/usr/keylayout/Vendor_7545_Product_0021.kl
+vendor/usr/keylayout/Vendor_7545_Product_0180.kl
diff --git a/setup-makefiles.sh b/setup-makefiles.sh
new file mode 100755 (executable)
index 0000000..911a638
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/bash
+#
+# Copyright (C) 2016 The CyanogenMod Project
+# Copyright (C) 2017-2020 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+set -e
+
+# Load extract_utils and do some sanity checks
+MY_DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
+
+ANDROID_ROOT="${MY_DIR}/../../.."
+
+HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
+if [ ! -f "${HELPER}" ]; then
+    echo "Unable to find helper script at ${HELPER}"
+    exit 1
+fi
+source "${HELPER}"
+
+# Initialize the helper for common
+setup_vendor "${DEVICE_COMMON}" "${VENDOR_COMMON}" "${ANDROID_ROOT}" true
+
+# Warning headers and guards
+write_headers "g12a g12b sm1" "TARGET_AMLOGIC_SOC"
+
+# The standard common blobs
+write_makefiles "${MY_DIR}/proprietary-files.txt" true
+
+# Finish
+write_footers
+
+if [ -s "${MY_DIR}/../../${VENDOR_DEVICE}/${DEVICE}/proprietary-files.txt" ]; then
+    # Reinitialize the helper for device
+    setup_vendor "${DEVICE}" "${VENDOR_DEVICE}" "${ANDROID_ROOT}" false
+
+    # Warning headers and guards
+    write_headers
+
+    # The standard device blobs
+    write_makefiles "${MY_DIR}/../../${VENDOR_DEVICE}/${DEVICE}/proprietary-files.txt" true
+
+    # Finish
+    write_footers
+fi
diff --git a/vendor.prop b/vendor.prop
new file mode 100644 (file)
index 0000000..8358d57
--- /dev/null
@@ -0,0 +1,102 @@
+#
+# Copyright (C) 2021 The LineageOS Project
+#
+# SPDX-License-Identifier: Apache-2.0
+#
+
+## Audio
+ro.config.media_vol_default=20
+ro.config.media_vol_steps=25
+
+## Bluetooth
+atv.setup.bt_remote_pairing=true
+config.disable_bluetooth=false
+persist.bluetooth.bluetooth_audio_hal.disabled=false
+ro.vendor.autoconnectbt.btclass=50c
+ro.vendor.autoconnectbt.isneed=false
+ro.vendor.autoconnectbt.macprefix=00:CD:FF
+ro.vendor.autoconnectbt.nameprefix=Amlogic_RC
+ro.vendor.autoconnectbt.rssilimit=70
+
+## DRM
+drm.service.enabled=1
+vendor.drm.service.enable=true
+
+## FRP
+ro.frp.pst=/dev/block/by-name/frp
+
+## HDMI
+mbx.hdmiin.switchfull=false
+mbx.hdmiin.videolayer=false
+persist.sys.hdmi.keep_awake=false
+persist.vendor.sys.cec.power_assist_standby=false
+ro.hdmi.device_type=4
+ro.sys.hdmiin.enable=true
+ro.vendor.hdmi.auto_otp=false
+ro.vendor.platform.has.mbxuimode=true
+ro.vendor.platform.has.realoutputmode=true
+ro.vendor.platform.hdmi.device_type=4
+ro.vendor.platform.need.display.hdmicec=true
+
+## LMKD
+ro.lmk.kill_heaviest_task=true
+ro.lmk.kill_timeout_ms=100
+ro.lmk.use_minfree_levels=true
+
+# Graphics
+ro.hardware.vulkan=amlogic
+ro.opengles.version=196610
+ro.surface_flinger.max_graphics_height=1080
+ro.surface_flinger.max_graphics_width=1920
+
+## Dalvik
+dalvik.vm.heapgrowthlimit=256m
+dalvik.vm.heapmaxfree=8m
+dalvik.vm.heapminfree=512k
+dalvik.vm.heapsize=384m
+dalvik.vm.heapstartsize=8m
+dalvik.vm.heaptargetutilization=0.75
+
+## Media
+libplayer.livets.softdemux=1
+libplayer.netts.recalcpts=1
+persist.sys.media.avsync=true
+persist.vendor.media.bootvideo=0050
+ro.media.camera_preview.maxsize=1920x1080
+ro.media.camera_preview.limitedrate=1920x1080x30,1280x720x30,640x480x30,320x240x28
+ro.media.camera_preview.usemjpeg=1
+ro.media.maxmem=629145600
+ro.vendor.media.support.ffmpeg.adec=false
+ro.vendor.platform.disable.audiorawout=false
+ro.vendor.platform.support.dolby=true
+ro.vendor.platform.support.dolbyvision=false
+ro.vendor.platform.support.dts=true
+ro.vendor.sdr2hdr.enable=true
+vendor.afbcd.enable=1
+vendor.media.libplayer.curlenable=true
+vendor.media.libplayer.seek.fwdsearch=1
+vendor.media.libplayer.modules=vhls_mod,dash_mod,curl_mod,prhls_mod,vm_mod,bluray_mod
+vendor.media.support.dolbyvision=false
+
+## OMX
+ro.vendor.media.support.omx2=true
+vendor.media.omx2.in_buffer=5
+vendor.ionvideo.enable=1
+vendor.media.omx.use.360omx2=false
+vendor.media.omx.out_buffer2_osd=8
+vendor.media.omx.display_mode=3
+vendor.media.sf.omxvideo-optmize=1
+
+## OEM Lock
+ro.oem_unlock_supported=1
+
+## Platform
+ro.vendor.platform.is.tv=0
+
+## USB
+vendor.usb.controller=ff400000.dwc2_a
+
+## Wi-Fi
+ro.carrier=wifi-only
+wifi.direct.interface=p2p-dev-wlan0
+wifi.interface=wlan0