mirror of
https://github.com/chararomandroid/android_device_samsung_a20
synced 2026-08-21 19:55:33 -04:00
universal7885: Inital port to A20/A20e
Addtitionally, Add device-specific trees as well Change-Id: Icbbc31c063b18bce3702d0b208a0aee78148a7c0 Signed-off-by: roynatech2544 <whiteshell2544@naver.com>
This commit is contained in:
parent
601b5ef5aa
commit
f8eb3e1258
169 changed files with 2440 additions and 62 deletions
2
universal7885-common/Android.bp
Normal file
2
universal7885-common/Android.bp
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
soong_namespace {
|
||||
}
|
||||
76
universal7885-common/Android.mk
Normal file
76
universal7885-common/Android.mk
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifneq ($(filter a20 a20e $(TARGET_DEVICE)),)
|
||||
|
||||
include $(call all-makefiles-under,$(LOCAL_PATH))
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LIBGLES_MALI_LIBRARY := /vendor/lib/egl/libGLES_mali.so
|
||||
LIBGLES_MALI64_LIBRARY := /vendor/lib64/egl/libGLES_mali.so
|
||||
|
||||
VULKAN_SYMLINK := $(TARGET_OUT_VENDOR)/lib/hw/vulkan.universal7884B.so
|
||||
$(VULKAN_SYMLINK): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Creating lib/hw/vulkan.universal7884B.so symlink: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) ln -sf $(LIBGLES_MALI_LIBRARY) $@
|
||||
|
||||
VULKAN64_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/hw/vulkan.universal7884B.so
|
||||
$(VULKAN64_SYMLINK): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Creating lib64/hw/vulkan.universal7884B.so symlink: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) ln -sf $(LIBGLES_MALI64_LIBRARY) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += \
|
||||
$(VULKAN_SYMLINK) \
|
||||
$(VULKAN64_SYMLINK)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LIBGLES_MALI_LIBRARY := /vendor/lib/egl/libGLES_mali.so
|
||||
LIBGLES_MALI64_LIBRARY := /vendor/lib64/egl/libGLES_mali.so
|
||||
|
||||
LIBOPENCL_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libOpenCL.so
|
||||
$(LIBOPENCL_SYMLINK): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Creating lib/libOpenCL.so symlink: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) ln -sf libOpenCL.so.1 $@
|
||||
|
||||
LIBOPENCL64_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/libOpenCL.so
|
||||
$(LIBOPENCL64_SYMLINK): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Creating lib64/libOpenCL.so symlink: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) ln -sf libOpenCL.so.1 $@
|
||||
|
||||
LIBOPENCL1_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libOpenCL.so.1
|
||||
$(LIBOPENCL1_SYMLINK): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Creating lib/libOpenCL.so.1 symlink: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) ln -sf libOpenCL.so.1.1 $@
|
||||
|
||||
LIBOPENCL641_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/libOpenCL.so.1
|
||||
$(LIBOPENCL641_SYMLINK): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Creating lib64/libOpenCL.so.1 symlink: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) ln -sf libOpenCL.so.1.1 $@
|
||||
|
||||
LIBOPENCL11_SYMLINK := $(TARGET_OUT_VENDOR)/lib/libOpenCL.so.1.1
|
||||
$(LIBOPENCL11_SYMLINK): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Creating lib/libOpenCL.so.1.1 symlink: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) ln -sf $(LIBGLES_MALI_LIBRARY) $@
|
||||
|
||||
LIBOPENCL6411_SYMLINK := $(TARGET_OUT_VENDOR)/lib64/libOpenCL.so.1.1
|
||||
$(LIBOPENCL6411_SYMLINK): $(LOCAL_INSTALLED_MODULE)
|
||||
@echo "Creating lib64/libOpenCL.so.1.1 symlink: $@"
|
||||
@mkdir -p $(dir $@)
|
||||
$(hide) ln -sf $(LIBGLES_MALI64_LIBRARY) $@
|
||||
|
||||
ALL_DEFAULT_INSTALLED_MODULES += \
|
||||
$(LIBOPENCL_SYMLINK) \
|
||||
$(LIBOPENCL64_SYMLINK) \
|
||||
$(LIBOPENCL1_SYMLINK) \
|
||||
$(LIBOPENCL641_SYMLINK) \
|
||||
$(LIBOPENCL11_SYMLINK) \
|
||||
$(LIBOPENCL6411_SYMLINK)
|
||||
endif
|
||||
109
universal7885-common/BoardConfigCommon.mk
Normal file
109
universal7885-common/BoardConfigCommon.mk
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
COMMON_PATH := device/samsung/universal7885-common
|
||||
|
||||
BOARD_VENDOR := samsung
|
||||
|
||||
# Platform
|
||||
TARGET_BOARD_PLATFORM := universal7885
|
||||
TARGET_SOC := exynos7884B
|
||||
TARGET_BOOTLOADER_BOARD_NAME := universal7885
|
||||
TARGET_NO_BOOTLOADER := true
|
||||
TARGET_NO_RADIOIMAGE := true
|
||||
|
||||
# Architecture
|
||||
TARGET_ARCH := arm64
|
||||
TARGET_ARCH_VARIANT := armv8-a
|
||||
TARGET_CPU_ABI := arm64-v8a
|
||||
TARGET_CPU_ABI2 :=
|
||||
TARGET_CPU_VARIANT := cortex-a53
|
||||
|
||||
TARGET_2ND_ARCH := arm
|
||||
TARGET_2ND_ARCH_VARIANT := armv8-a
|
||||
TARGET_2ND_CPU_ABI := armeabi-v7a
|
||||
TARGET_2ND_CPU_ABI2 := armeabi
|
||||
TARGET_2ND_CPU_VARIANT := cortex-a53
|
||||
|
||||
# Bluetooth
|
||||
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(COMMON_PATH)/bluetooth
|
||||
BOARD_HAVE_BLUETOOTH_SLSI := true
|
||||
|
||||
# Build system
|
||||
BUILD_BROKEN_DUP_RULES := true
|
||||
BUILD_BROKEN_VINTF_PRODUCT_COPY_FILES := true
|
||||
|
||||
# Camera
|
||||
TARGET_CAMERA_BOOTTIME_TIMESTAMP := true
|
||||
|
||||
# Display
|
||||
TARGET_SCREEN_DENSITY := 280
|
||||
|
||||
# Filesystem
|
||||
TARGET_USERIMAGES_USE_EXT4 := true
|
||||
TARGET_USERIMAGES_USE_F2FS := true
|
||||
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
|
||||
|
||||
# Include
|
||||
TARGET_SPECIFIC_HEADER_PATH := $(COMMON_PATH)/include
|
||||
|
||||
# Init
|
||||
TARGET_INIT_VENDOR_LIB := //$(COMMON_PATH):libinit_universal7884B
|
||||
|
||||
# Kernel
|
||||
BOARD_KERNEL_IMAGE_NAME := Image
|
||||
BOARD_KERNEL_BASE := 0x10000000
|
||||
BOARD_KERNEL_PAGESIZE := 2048
|
||||
BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --tags_offset 0x00000100
|
||||
TARGET_KERNEL_SOURCE := kernel/samsung/universal7884B
|
||||
TARGET_KERNEL_CLANG_COMPILE := true
|
||||
|
||||
# HIDL
|
||||
DEVICE_MANIFEST_FILE := $(COMMON_PATH)/manifest.xml
|
||||
DEVICE_MATRIX_FILE := $(COMMON_PATH)/compatibility_matrix.xml
|
||||
|
||||
ODM_MANIFEST_SKUS += NFC
|
||||
ODM_MANIFEST_NFC_FILES := $(COMMON_PATH)/manifest_nfc.xml
|
||||
|
||||
# LMKD stats logging
|
||||
TARGET_LMKD_STATS_LOG := true
|
||||
|
||||
# Partitions
|
||||
BOARD_BOOTIMAGE_PARTITION_SIZE := 33554432
|
||||
BOARD_CACHEIMAGE_PARTITION_SIZE := 157286400
|
||||
BOARD_VENDORIMAGE_PARTITION_SIZE := 452984832
|
||||
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
|
||||
BOARD_FLASH_BLOCK_SIZE := 131072
|
||||
|
||||
# Properties
|
||||
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
|
||||
TARGET_PRODUCT_PROP += $(COMMON_PATH)/product.prop
|
||||
TARGET_VENDOR_PROP += $(COMMON_PATH)/vendor.prop
|
||||
|
||||
# Recovery
|
||||
BOARD_HAS_DOWNLOAD_MODE := true
|
||||
|
||||
# Releasetools
|
||||
TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_universal7884B
|
||||
TARGET_RELEASETOOLS_EXTENSIONS := $(COMMON_PATH)
|
||||
|
||||
# RIL
|
||||
ENABLE_VENDOR_RIL_SERVICE := true
|
||||
|
||||
# Sepolicy
|
||||
include device/lineage/sepolicy/exynos/sepolicy.mk
|
||||
include device/samsung_slsi/sepolicy/sepolicy.mk
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += $(COMMON_PATH)/sepolicy/vendor
|
||||
|
||||
# Vendor
|
||||
TARGET_COPY_OUT_VENDOR := vendor
|
||||
|
||||
# VNDK
|
||||
BOARD_VNDK_VERSION := current
|
||||
|
||||
# Wifi
|
||||
BOARD_WLAN_DEVICE := slsi
|
||||
WPA_SUPPLICANT_VERSION := VER_0_8_X
|
||||
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
|
||||
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
||||
BOARD_HOSTAPD_DRIVER := NL80211
|
||||
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
||||
WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
|
||||
PRODUCT_CFI_INCLUDE_PATHS += hardware/samsung_slsi/scsc_wifibt/wpa_supplicant_lib
|
||||
17
universal7885-common/README.md
Normal file
17
universal7885-common/README.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
# Device Tree for Samsung Galaxy A20/A20e (SM-A205, SM-A202)
|
||||
## Specs
|
||||
|
||||
| Component | Specification |
|
||||
| :---------------------- | :-------------------------------- |
|
||||
| Chipset | Exynos 7884B |
|
||||
| Memory | 3 GB |
|
||||
| Storage | 32GB |
|
||||
| Battery | 2900 mAh (non-removable) |
|
||||
| Dimensions | 158.4 x 74.7 x 7.8 mm |
|
||||
| Display | 720 x 1560 pixels, 19.5:9, 268PPI |
|
||||
| Release Date | 2019 April |
|
||||
|
||||
## Device Picture
|
||||
|
||||

|
||||
|
||||
6
universal7885-common/bluetooth/bdroid_buildcfg.h
Normal file
6
universal7885-common/bluetooth/bdroid_buildcfg.h
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#ifndef _BDROID_BUILDCFG_H
|
||||
#define _BDROID_BUILDCFG_H
|
||||
|
||||
#define BTM_ESCO_TRANSPORT_UNIT_SIZE_PCM16
|
||||
|
||||
#endif
|
||||
87
universal7885-common/compatibility_matrix.xml
Normal file
87
universal7885-common/compatibility_matrix.xml
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
<!--
|
||||
Input:
|
||||
compatibility_matrix.xml
|
||||
device_compatibility_matrix.xml
|
||||
-->
|
||||
<compatibility-matrix version="1.0" type="device">
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.frameworks.displayservice</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IDisplayService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.frameworks.schedulerservice</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ISchedulingPolicyService</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.frameworks.sensorservice</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ISensorManager</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hardware.graphics.composer</name>
|
||||
<version>2.1</version>
|
||||
<interface>
|
||||
<name>IComposer</name>
|
||||
<instance>vr</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hidl.allocator</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IAllocator</name>
|
||||
<instance>ashmem</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hidl.manager</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IServiceManager</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hidl.memory</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IMapper</name>
|
||||
<instance>ashmem</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hidl.token</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ITokenManager</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.system.wifi.keystore</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IKeystore</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>vendor.samsung.frameworks.security.dsms</name>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ISehDsms</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</compatibility-matrix>
|
||||
25
universal7885-common/configs/audio_effects.xml
Normal file
25
universal7885-common/configs/audio_effects.xml
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?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="dynamics_processing" path="libdynproc.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="dynamics_processing" library="dynamics_processing" uuid="e0e6539b-1781-7261-676f-6d7573696340"/>
|
||||
</effects>
|
||||
</audio_effects_conf>
|
||||
147
universal7885-common/configs/audio_policy_configuration.xml
Normal file
147
universal7885-common/configs/audio_policy_configuration.xml
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
|
||||
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<globalConfiguration speaker_drc_enabled="true"/>
|
||||
|
||||
<modules>
|
||||
<module name="primary" halVersion="3.0">
|
||||
<attachedDevices>
|
||||
<item>Earpiece</item>
|
||||
<item>Speaker</item>
|
||||
<item>Built-In Mic</item>
|
||||
<item>Built-In Back Mic</item>
|
||||
<item>Voice Call Mic</item>
|
||||
</attachedDevices>
|
||||
|
||||
<defaultOutputDevice>Speaker</defaultOutputDevice>
|
||||
|
||||
<mixPorts>
|
||||
<mixPort name="primary-out" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY|AUDIO_OUTPUT_FLAG_DEEP_BUFFER">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="fast" role="source" flags="AUDIO_OUTPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="primary-in" 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,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
|
||||
</mixPort>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
|
||||
<devicePort tagName="Earpiece" role="sink" type="AUDIO_DEVICE_OUT_EARPIECE">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset" role="sink" type="AUDIO_DEVICE_OUT_WIRED_HEADSET">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headphone" role="sink" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Bt Sco" role="sink" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Bt Sco Headset" role="sink" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Bt Sco Car Kit" role="sink" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Aux Device Out" role="sink" type="AUDIO_DEVICE_OUT_AUX_DIGITAL">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000,64000,88200,96000,128000,176400,192000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_2POINT1,AUDIO_CHANNEL_OUT_QUAD,AUDIO_CHANNEL_OUT_PENTA,AUDIO_CHANNEL_OUT_5POINT1,AUDIO_CHANNEL_OUT_6POINT1,AUDIO_CHANNEL_OUT_7POINT1"/>
|
||||
</devicePort>
|
||||
<!-- Input devices declaration, i.e. source DEVICE PORT -->
|
||||
<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,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
|
||||
</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,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
|
||||
</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,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
|
||||
</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,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Aux Device In" type="AUDIO_DEVICE_IN_AUX_DIGITAL" 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,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Voice Call Mic" type="AUDIO_DEVICE_IN_VOICE_CALL" 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,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="FM Mic" type="AUDIO_DEVICE_IN_FM_TUNER" 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,AUDIO_CHANNEL_IN_VOICE_UPLINK,AUDIO_CHANNEL_IN_VOICE_DNLINK"/>
|
||||
</devicePort>
|
||||
</devicePorts>
|
||||
<!-- route declaration, i.e. list all available sources for a given sink -->
|
||||
<routes>
|
||||
<route type="mix" sink="Earpiece"
|
||||
sources="primary-out,fast"/>
|
||||
<route type="mix" sink="Speaker"
|
||||
sources="primary-out,fast"/>
|
||||
<route type="mix" sink="Wired Headset"
|
||||
sources="primary-out,fast"/>
|
||||
<route type="mix" sink="Wired Headphone"
|
||||
sources="primary-out,fast"/>
|
||||
<route type="mix" sink="Bt Sco"
|
||||
sources="primary-out,fast"/>
|
||||
<route type="mix" sink="Bt Sco Headset"
|
||||
sources="primary-out,fast"/>
|
||||
<route type="mix" sink="Bt Sco Car Kit"
|
||||
sources="primary-out,fast"/>
|
||||
<route type="mix" sink="primary-in"
|
||||
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,Bt Sco Headset Mic,Aux Device In,Voice Call Mic,FM Mic"/>
|
||||
</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"/>
|
||||
|
||||
</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>
|
||||
163
universal7885-common/configs/libnfc-nci.conf
Normal file
163
universal7885-common/configs/libnfc-nci.conf
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
###############################################################################
|
||||
# NFC Configuration for NON-HAL component S.LSI NFC Chip
|
||||
# Samsung Electronics, System LSI Division
|
||||
# Update Date : 2018/07/27
|
||||
# Configuration : UICC + eSE as CE mode & 106k P2P disabled
|
||||
# Region : EUR OPEN / CHINA
|
||||
# F/W Version dependency : NONE
|
||||
########################## Start of libnfc-nci.conf ###########################
|
||||
###############################################################################
|
||||
# Application options
|
||||
NFC_DEBUG_ENABLED=1
|
||||
###############################################################################
|
||||
# performance measurement
|
||||
# Change this setting to control how often USERIAL log the performance (throughput)
|
||||
# data on read/write/poll
|
||||
# defailt is to log performance dara for every 100 read or write
|
||||
#REPORT_PERFORMANCE_MEASURE=100
|
||||
###############################################################################
|
||||
# File used for NFA storage
|
||||
NFA_STORAGE="/data/vendor/nfc"
|
||||
###############################################################################
|
||||
# When screen is turned off, specify the desired power state of the controller.
|
||||
# 0: power-off-sleep state; DEFAULT
|
||||
# 1: full-power state
|
||||
# 2: screen-off card-emulation (CE4/CE3/CE1 modes are used)
|
||||
SCREEN_OFF_POWER_STATE=1
|
||||
###############################################################################
|
||||
# Force tag polling for the following technology(s).
|
||||
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
|
||||
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B |
|
||||
# NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 |
|
||||
# NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_KOVIO |
|
||||
# NFA_TECHNOLOGY_MASK_ACTIVE
|
||||
#
|
||||
# Notable bits:
|
||||
# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
|
||||
# NFA_TECHNOLOGY_MASK_B 0x02 /* NFC Technology B */
|
||||
# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
|
||||
# NFA_TECHNOLOGY_MASK_ISO15693 0x08 /* Proprietary Technology */
|
||||
# NFA_TECHNOLOGY_MASK_KOVIO 0x20 /* Proprietary Technology */
|
||||
# NFA_TECHNOLOGY_MASK_ACTIVE 0x40 /* NFC Technology Active */
|
||||
POLLING_TECH_MASK=0xEF
|
||||
###############################################################################
|
||||
# Force P2P to only listen for the following technology(s).
|
||||
# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
|
||||
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F |
|
||||
# NFA_TECHNOLOGY_MASK_ACTIVE
|
||||
#
|
||||
# Notable bits:
|
||||
# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
|
||||
# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
|
||||
# NFA_TECHNOLOGY_MASK_ACTIVE 0x40 /* NFC Technology Active */
|
||||
P2P_LISTEN_TECH_MASK=0xC4
|
||||
PRESERVE_STORAGE=1
|
||||
###############################################################################
|
||||
# Override the stack default for NFA_EE_MAX_EE_SUPPORTED set in nfc_target.h.
|
||||
# The value is set assumeing discovery of 0x00(Host), 0xC0(Ese) and 0x80(UICC).
|
||||
# If a platform will exclude and SE, this value can be reduced so that the stack
|
||||
# will not wait any longer than necessary.
|
||||
# Maximum EE supported number
|
||||
#NFA_MAX_EE_SUPPORTED=3
|
||||
###############################################################################
|
||||
# AID_MATCHING constants
|
||||
# AID_MATCHING_EXACT_ONLY 0x00
|
||||
# AID_MATCHING_EXACT_OR_PREFIX 0x01
|
||||
# AID_MATCHING_PREFIX_ONLY 0x02
|
||||
# AID_MATCHING_EXACT_OR_SUBSET_OR_PREFIX 0x03
|
||||
AID_MATCHING_MODE=0x01
|
||||
|
||||
###############################################################################
|
||||
# Partial AID setting : Only used for ATT / TMO / VZW
|
||||
# This configuration may be changed by MNO specific requirement.
|
||||
# Description
|
||||
# 1st byte : NCI Length
|
||||
# 2nd byte : Number of set
|
||||
# 3rd~ bytes : Partial matching order
|
||||
# Matching value : Full matching = 0x00, Subset Matching = 0x01, Superset Matching : 0x02, Pattern Matching : 0x03
|
||||
# ex) 2f 39 03 02 01 02 --> order : full matching - subset matching - superset matching PARTIAL_AID={03:02:01:02}
|
||||
PARTIAL_AID={02:01:05}
|
||||
|
||||
###############################################################################
|
||||
# UICC listen tech mask
|
||||
# Force UICC to only listen to the following technology(s).
|
||||
# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B.
|
||||
# If this option is blocked by # comment, default value will be applied
|
||||
###############################################################################
|
||||
# Description
|
||||
# Oring each tech mask
|
||||
# Type A : 0x01
|
||||
# Type B : 0x02
|
||||
# Type F : 0x04
|
||||
###############################################################################
|
||||
# Guide
|
||||
# HK : UICC_LISTEN_TECH_MASK=0x07 (Enable Type F card)
|
||||
# Other region : UICC_LISTEN_TECH_MASK=0x03 (Default value)
|
||||
UICC_LISTEN_TECH_MASK=0x07
|
||||
|
||||
###############################################################################
|
||||
# Default poll duration (in ms)
|
||||
# The defualt is 500ms if not set (see nfc_target.h)
|
||||
NFA_DM_DISC_DURATION_POLL=500
|
||||
|
||||
###############################################################################
|
||||
# eSE Chip Type Setting
|
||||
# Configure eSE Chip Type.
|
||||
# NFA_HCI_USE_FORCE_SETTING = 0x00 : Auto Setting
|
||||
# NFA_HCI_USE_FORCE_SETTING = 0x01 : Manual Setting
|
||||
# NFA_HCI_ESE_CHIP_TYPE=0x00 : Oberthur eSE
|
||||
# NFA_HCI_ESE_CHIP_TYPE=0x01 : Gemalto eSE
|
||||
# NFA_HCI_DEFAULT_STATIC_PIPE_TYPE = 0x00 : Supported dynamic pipe for wired C/E.
|
||||
# NFA_HCI_DEFAULT_STATIC_PIPE_TYPE = 0x01 : Supported static pipe for wired C/E.
|
||||
# NFA_HCI_APDU_GATE = 0xF0 : Gate ID for dynamic pipe.
|
||||
# You must set this value if you set 'NFA_HCI_DEFAULT_STATIC_PIPE_TYPE = 0x00'.
|
||||
NFA_HCI_USE_FORCE_SETTING=0x00
|
||||
NFA_HCI_ESE_CHIP_TYPE=0x01
|
||||
NFA_HCI_DEFAULT_STATIC_PIPE_TYPE=0x01
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# eSE Power Stable Time
|
||||
# Configure eSE Power Stable Time (ms)
|
||||
# Only for Gemalto COS
|
||||
|
||||
ESE_POWER_STABLE_TIME=50
|
||||
###############################################################################
|
||||
|
||||
###############################################################################
|
||||
# Application options
|
||||
APPL_TRACE_LEVEL=0xFF
|
||||
PROTOCOL_TRACE_LEVEL=0xFFFFFFFF
|
||||
###############################################################################
|
||||
|
||||
|
||||
###############################################################################
|
||||
# power control driver
|
||||
# Specify a kernel driver that support ioctl commands to control NFC_EN and
|
||||
# NFC_WAKE gpio signals.
|
||||
#
|
||||
# POWER_CONTRL_DRIVER=<driver>
|
||||
# i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal
|
||||
POWER_CONTROL_DRIVER="/dev/sec-nfc"
|
||||
|
||||
###############################################################################
|
||||
# transport driver
|
||||
#
|
||||
# TRANSPORT_DRIVER=<driver>
|
||||
#
|
||||
# where <driver> can be, for example:
|
||||
# "/dev/ttyS" (UART)
|
||||
# "/dev/bcmi2cnfc" (I2C)
|
||||
# "hwtun" (HW Tunnel)
|
||||
# "/dev/bcmspinfc" (SPI)
|
||||
# "/dev/btusb0" (BT USB)
|
||||
TRANSPORT_DRIVER="/dev/sec-nfc"
|
||||
|
||||
###############################################################################
|
||||
# ProtocolClt was removed from NFA_PROPRIETARY_CFG,
|
||||
# and a new NFA_PROPRIETARY_CFG_CLT variable was created.
|
||||
# protocolClt default value = 0x90
|
||||
NFA_PROPRIETARY_CFG_CLT=0x90
|
||||
ACTIVE_SE=0x02
|
||||
|
||||
############### end of config ##############################
|
||||
28
universal7885-common/configs/nfcee_access.xml
Normal file
28
universal7885-common/configs/nfcee_access.xml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Samsung nfcextras Signature -->
|
||||
<signer android:signature="30820411308202f9a003020102020900fd222d6fc87acde0300d06092a864886f70d010105050030819e310b3009060355040613024b523113301106035504080c0a536f7574684b6f7265613112301006035504070c095375776f6e43697479311b3019060355040a0c1253616d73756e67436f72706f726174696f6e310c300a060355040b0c03444d433114301206035504030c0b53616d73756e67436572743125302306092a864886f70d01090116166d2e73656375726974794073616d73756e672e636f6d3020170d3133303132343035323231305a180f32313132313233313035323231305a30819e310b3009060355040613024b523113301106035504080c0a536f7574684b6f7265613112301006035504070c095375776f6e43697479311b3019060355040a0c1253616d73756e67436f72706f726174696f6e310c300a060355040b0c03444d433114301206035504030c0b53616d73756e67436572743125302306092a864886f70d01090116166d2e73656375726974794073616d73756e672e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100a2c51f56a1c8bf64ada0af152ced2344ac070b447efc85f1b69ce90fbc2b7a71257240c215eedbf7445c474fe34d62bc3035d79ba110859118f1200ecc9ae48b56400e187591272d59734e456d9dfd5a1f3227a30b9448bda84c2901b501295445e204ddb6f9f9e36b2560998f1764e446176fe5d83987220f8ed15106dc7c8ecb6798de45f5fbae54efe2b35a379631f545f84c98243aa4d92ef339330f954ad32e4e97aff69cbf68928484b03a8fa8eafdc8ff2a9801f249302d467b05f99a1680e4fb5b11624d5e53d67f09e86b82dd7305e3e483b12e3720fcccc2bc8857f13b6e1d60512074004f67d86241940eaba34afda2af3904b04913fa50f499f7020103a350304e301d0603551d0e04160414eef0f8211dccf6e442f3388889c9a3ea3ce0236c301f0603551d23041830168014eef0f8211dccf6e442f3388889c9a3ea3ce0236c300c0603551d13040530030101ff300d06092a864886f70d01010505000382010100395c7e7900c471e03fa9850905c6ab1edc5a8b7d43a16689d9bb1ec1a06513c4ea8f7471c6e474244174261cc151ae8d1a61019e0ed81fffee8afa1d01d85a32de796f4b46d0d5ddfcca7d1f90d523b54751f505a4e3b059569f24ba2564d72fbc4081533840f618c2993d935134d3c987605e032f6a12889af3190af1714a90f2a3476b8e0016ab45564bf10e611899babd86af33149ca6838b0a885c752ffe879f37997f262e819c62cf59caa794cfaaf8e3c462f5092a34264f0634316b13a67a644e104dc4070e8b6628a46f41da7e3c741f6edc21152f9f947dde6fe14b58f34e4d9e7abd103cb1ca9e09eb4fa5b553baa413329bd3919caca2d52e6d4b" />
|
||||
|
||||
<!-- Samsung Platform signature -->
|
||||
<signer android:signature="308204d4308203bca003020102020900d20995a79c0daad6300d06092a864886f70d01010505003081a2310b3009060355040613024b52311430120603550408130b536f757468204b6f726561311330110603550407130a5375776f6e2043697479311c301a060355040a131353616d73756e6720436f72706f726174696f6e310c300a060355040b1303444d43311530130603550403130c53616d73756e6720436572743125302306092a864886f70d0109011616616e64726f69642e6f734073616d73756e672e636f6d301e170d3131303632323132323531325a170d3338313130373132323531325a3081a2310b3009060355040613024b52311430120603550408130b536f757468204b6f726561311330110603550407130a5375776f6e2043697479311c301a060355040a131353616d73756e6720436f72706f726174696f6e310c300a060355040b1303444d43311530130603550403130c53616d73756e6720436572743125302306092a864886f70d0109011616616e64726f69642e6f734073616d73756e672e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100c986384a3e1f2fb206670e78ef232215c0d26f45a22728db99a44da11c35ac33a71fe071c4a2d6825a9b4c88b333ed96f3c5e6c666d60f3ee94c490885abcf8dc660f707aabc77ead3e2d0d8aee8108c15cd260f2e85042c28d2f292daa3c6da0c7bf2391db7841aade8fdf0c9d0defcf77124e6d2de0a9e0d2da746c3670e4ffcdc85b701bb4744861b96ff7311da3603c5a10336e55ffa34b4353eedc85f51015e1518c67e309e39f87639ff178107f109cd18411a6077f26964b6e63f8a70b9619db04306a323c1a1d23af867e19f14f570ffe573d0e3a0c2b30632aaec3173380994be1e341e3a90bd2e4b615481f46db39ea83816448ec35feb1735c1f3020103a382010b30820107301d0603551d0e04160414932c3af70b627a0c7610b5a0e7427d6cfaea3f1e3081d70603551d230481cf3081cc8014932c3af70b627a0c7610b5a0e7427d6cfaea3f1ea181a8a481a53081a2310b3009060355040613024b52311430120603550408130b536f757468204b6f726561311330110603550407130a5375776f6e2043697479311c301a060355040a131353616d73756e6720436f72706f726174696f6e310c300a060355040b1303444d43311530130603550403130c53616d73756e6720436572743125302306092a864886f70d0109011616616e64726f69642e6f734073616d73756e672e636f6d820900d20995a79c0daad6300c0603551d13040530030101ff300d06092a864886f70d01010505000382010100329601fe40e036a4a86cc5d49dd8c1b5415998e72637538b0d430369ac51530f63aace8c019a1a66616a2f1bb2c5fabd6f313261f380e3471623f053d9e3c53f5fd6d1965d7b000e4dc244c1b27e2fe9a323ff077f52c4675e86247aa801187137e30c9bbf01c567a4299db4bf0b25b7d7107a7b81ee102f72ff47950164e26752e114c42f8b9d2a42e7308897ec640ea1924ed13abbe9d120912b62f4926493a86db94c0b46f44c6161d58c2f648164890c512dfb28d42c855bf470dbee2dab6960cad04e81f71525ded46cdd0f359f99c460db9f007d96ce83b4b218ac2d82c48f12608d469733f05a3375594669ccbf8a495544d6c5701e9369c08c810158">
|
||||
<package android:name="org.simalliance.openmobileapi.service" />
|
||||
<package android:name="com.android.se" />
|
||||
<package android:name="com.skms.android.agent" />
|
||||
<package android:name="com.samsung.android.spay" />
|
||||
<package android:name="com.samsung.android.spayfw" />
|
||||
<package android:name="com.sem.factoryapp" />
|
||||
</signer>
|
||||
|
||||
<!-- T-Mobile development Signature -->
|
||||
<signer android:signature="3082034830820230a00302010202044f62832f300d06092a864886f70d01010505003066310b3009060355040613025553310b3009060355040813024e593111300f060355040713084e657720596f726b310d300b060355040a130449736973310d300b060355040b13044973697331193017060355040313104a564c2056656e7475726573204c4c43301e170d3132303331363030303235355a170d3339303830323030303235355a3066310b3009060355040613025553310b3009060355040813024e593111300f060355040713084e657720596f726b310d300b060355040a130449736973310d300b060355040b13044973697331193017060355040313104a564c2056656e7475726573204c4c4330820122300d06092a864886f70d01010105000382010f003082010a02820101009aaf7f1047a6821ab0b4ffb7d58f8a0a66f09689dc59926e966b24896759b96304825ea149ebf30e6249877fedac185eec7aa7a44dc718ab578584888c673f46bc351b48dcd54f47bd27a0836032899b0510e0ce69863184bcd033b0654f09e801a24f06fadd7330f3665e12fbbf1c2b616ca14ac169d206607f229a7ad6d3579d330373be0de0d7148eabb80beed83602494247c0b7b735812a5ece89c1ce7f2229f757e29ebfae72350d2db27974cd5341ba5872a92f471a0768972e35246d0269d41d345cd8bda2df14009212d9640f3a33116460dce389c5a113b84e4a6b7f8b597cb601e53dace8777e380ffe4d9f0abfa14993a1f653c9a6bb5a245fd10203010001300d06092a864886f70d010105050003820101009089e52bb237b78c92dd95b4d07004751b3d68e12e83ab0baca39ea593b9b9f8f6395491f6616fe4d2e4c7a7e53c898a17f3ab2c9fac3b1c0886ee8e769ba96488aafd646a7aa425fb283cd6d9d600a083d18868d4d93de7ec73b258f61fc66d2a3f4b4c7b53df62fd3374a5e658bd8266ee24480923ea584f2e7adde360b459e4ad01bcb9f5582f95dab3964e546baf5b33f63acfbb64494902ebae5cc0930abb7dabf0e4727fcc755a6baa6e68be3b864ab1e6438fed6dd280f081ef1e3b3545a257b456b68787d8080653c31ed7f96f6b5a67186dc5a35e620b9bbb9d47a1871d58bf38e192906399c53cb2fab61c1392deae6209d6fb476897a471a23ab4" >
|
||||
<model sales="tmo" />
|
||||
</signer>
|
||||
|
||||
<!-- T-Mobile production Signature -->
|
||||
<signer android:signature="3082036A30820252A00302010202044F8867D3300D06092A864886F70D01010505003077310B3009060355040613025553310B30090603550408130257413111300F0603550407130842656C6C65767565311C301A060355040A131350726F64756374205265616C697A6174696F6E3111300F060355040B1308542D4D6F62696C65311730150603550403130E4E46432050726F64756374696F6E301E170D3132303431333137353231395A170D3339303833303137353231395A3077310B3009060355040613025553310B30090603550408130257413111300F0603550407130842656C6C65767565311C301A060355040A131350726F64756374205265616C697A6174696F6E3111300F060355040B1308542D4D6F62696C65311730150603550403130E4E46432050726F64756374696F6E30820122300D06092A864886F70D01010105000382010F003082010A0282010100D74AC622FDF8F341BE8661DC89F447A78AE25E9F2852AF47242C4FA0FFFAC6658513EFCB427DDA28DB8BEF94F11DFC0B95D1C41ED968E90976B75A66620521D3B2AFA19E8F1E7E93271E444D00020547E2E5307BBFB62D5933116D6D384B5C3B845D1D92B30FF4F689ECB25E7D94D1FCC2F85BAB17CE944CC7CFCA673C5CDBB71F092EACE5432EF45682AA712D1E806F7139CA6BED6BA82F4E67F39B28E49A9704C97C6AC021C3CA6B1143051BCFE67A98F2DEAE788C1DB703D4BB07FB0322998B493BA56CCE49E25691B11E0DD48AC1A8CB5F6CAA6629CB661652FA0EA6288712386DA83F5162150DB8D9353F7E291A54B9C877965C6721DE695C8143BB7CD70203010001300D06092A864886F70D010105050003820101005073792AF8C6DB0762C992A776119DA201A5D62192D4C08EFB827CE999581034B002AE9DD1ED524E860B7F32097918AD82267954336C523D46C5602EF8A2BBFD1BEA553A140706825BFCBD2C60CAA46862E07D7084F83A74CA5271FAB289623D5AF8804E38CCE2CAB9A5EE00A3E5E66E2D7019ED7BAEA337307C0C977CC584E66C4160E6BF700BE37E534691F8D52F8BE65A1781363353ADFB3E0A6746796A31F8A7D6576BCBAC4E670D98FA0D76589B1F1C41029D83AE9E094955D33DE24A264C8B0BDFAFBB418BF6302FC256442A2DD93B14F31CFFDEC8430BDC5EF04B74CA7B058EA0E4ACC12D3558744F9DE21BB8E5443D50C4B83998A012C003B8402E54" >
|
||||
<model sales="tmo" />
|
||||
</signer>
|
||||
|
||||
<!-- Mobeewave Signature -->
|
||||
<signer android:signature="3082038f30820277a003020102020463b007e8300d06092a864886f70d01010b05003078310b3009060355040613024341310f300d060355040813065175656265633111300f060355040713084d6f6e747265616c31123010060355040a13094d6f6265657761766531143012060355040b130b456e67696e656572696e67311b30190603550403131253656261737469656e20466f6e7461696e65301e170d3134303332313233343435325a170d3334303331363233343435325a3078310b3009060355040613024341310f300d060355040813065175656265633111300f060355040713084d6f6e747265616c31123010060355040a13094d6f6265657761766531143012060355040b130b456e67696e656572696e67311b30190603550403131253656261737469656e20466f6e7461696e6530820122300d06092a864886f70d01010105000382010f003082010a02820101009208c06950ece6d8d029f01bc01dda6be8e6708ab85556af202c3ebb2c7db1e1f4e3452c65f1d0d193d4d1b4b7ac29755db56598c7b86224fb89dccdbc8afd68d64032aa107698b3d31412177f35671ef15a9e47472fec6f421dd7f8e3c1682bc53e1a89097c54dfb55c8d7f0dede3fd18badb5e3f5fa59b166e1c89525757f6924d56b341788b4d771fc0f96936bc5d4adc88778ed5e448f805393b0edad43f9f65f36eb02fbfd542ecff9329b0164e1fc34c3137e4e3383ebc489d8974f6a83f3fb1312a4312d3bcc26dfa72fc640060a582206aad699364bbaddbef08d4bf75b79d76ee75bc6b6debf41b1a61431f41ed4bff6c9fe06e27df82a84faba6a50203010001a321301f301d0603551d0e04160414ff3321b8ce9eb5a0eea9343571b3158df307a4db300d06092a864886f70d01010b050003820101001461ace82b2f2744d5cdd00eebd8fa28c765f1e0ffab1396be46a90af15eb574aadaf4d08c20a71b1b0789965a0ecd26ea19a92543826a80425faaf7a5330cedadeae71a2ad1187604d1297c6abf50a08d6a3cd8df75441788429cee8058ab54290f40e021fa2cbf47e599699b66ebc0800cf059501887b2ab85cab5a0d6c12041bd8a97d5b621019377d826f5b1488181c6d5cc2d23a27dc043f75e271a1f4b3331b02c16daf1a164f5a6c4e1378dd63c5d912d07915416687e0cfe2c4d089cc3624874bf741c6ba92580e999d443c45e96c2003933cd885134b124955eee2d59ff3f793cec1cab7a23e431f739133e44589a93368f9abf9fe73ba62c10997d" />
|
||||
</resources>
|
||||
15
universal7885-common/configs/p2p_supplicant_overlay.conf
Normal file
15
universal7885-common/configs/p2p_supplicant_overlay.conf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
disable_scan_offload=1
|
||||
p2p_listen_reg_class=81
|
||||
p2p_listen_channel=1
|
||||
p2p_oper_reg_class=124
|
||||
p2p_oper_channel=149
|
||||
manufacturer=SAMSUNG_ELECTRONICS
|
||||
model_name=SAMSUNG_MOBILE
|
||||
model_number=2014
|
||||
serial_number=19691101
|
||||
update_config=1
|
||||
p2p_add_cli_chan=1
|
||||
ip_addr_go=192.168.49.1
|
||||
ip_addr_mask=255.255.255.0
|
||||
ip_addr_start=192.168.49.200
|
||||
ip_addr_end=192.168.49.254
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2008 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.
|
||||
-->
|
||||
|
||||
<!-- This file is used to define the mappings between lower-level system
|
||||
user and group IDs and the higher-level permission names managed
|
||||
by the platform.
|
||||
Be VERY careful when editing this file! Mistakes made here can open
|
||||
big security holes.
|
||||
-->
|
||||
<permissions>
|
||||
<assign-permission name="com.samsung.permission.HRM_EXT" uid="cameraserver" />
|
||||
<assign-permission name="com.samsung.permission.SSENSOR" uid="cameraserver" />
|
||||
</permissions>
|
||||
0
universal7885-common/configs/placeholder
Normal file
0
universal7885-common/configs/placeholder
Normal file
29
universal7885-common/configs/public.libraries.txt
Normal file
29
universal7885-common/configs/public.libraries.txt
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
libHpr_RecGAE_cvFeature_v1.0.camera.samsung.so
|
||||
libMcClient.so
|
||||
libOpenCL.so
|
||||
libOpenCv.camera.samsung.so
|
||||
libQjpeg.so
|
||||
libSEF.quram.so
|
||||
libapa_jni.so
|
||||
libexifa.so
|
||||
libjack.so
|
||||
libjpega.so
|
||||
libknox_remotedesktopclient.so
|
||||
libopensslsmime.so
|
||||
libquram.so
|
||||
libquramagifencoder.so
|
||||
libremotedesktop_client.so
|
||||
libsaiv.so
|
||||
libsaiv_HprFace_FD_jni.so
|
||||
libsaiv_HprFace_LD_jni.so
|
||||
libsaiv_HprFace_utils_jni.so
|
||||
libsaiv_vision.so
|
||||
libsecimaging.so
|
||||
libsecjpeginterface.so
|
||||
libsemcamera_jni.so
|
||||
libsmart_cropping.camera.samsung.so
|
||||
libsurfaceutil.so
|
||||
libswldc_capture_core.camera.samsung.so
|
||||
libxcv.camera.samsung.so
|
||||
libprotobuf-cpp-full.so
|
||||
libprotobuf-cpp-lite.so
|
||||
5
universal7885-common/configs/wpa_supplicant.conf
Normal file
5
universal7885-common/configs/wpa_supplicant.conf
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
update_config=1
|
||||
eapol_version=1
|
||||
ap_scan=1
|
||||
fast_reauth=1
|
||||
p2p_add_cli_chan=1
|
||||
3
universal7885-common/configs/wpa_supplicant_overlay.conf
Normal file
3
universal7885-common/configs/wpa_supplicant_overlay.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
p2p_disabled=1
|
||||
update_config=1
|
||||
driver_param=p2p_no_group_iface=1
|
||||
101
universal7885-common/extract-files.sh
Executable file
101
universal7885-common/extract-files.sh
Executable file
|
|
@ -0,0 +1,101 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# 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
|
||||
|
||||
LINEAGE_ROOT="${MY_DIR}"/../../..
|
||||
|
||||
HELPER="${LINEAGE_ROOT}/tools/extract-utils/extract_utils.sh"
|
||||
if [ ! -f "${HELPER}" ]; then
|
||||
echo "Unable to find helper script at ${HELPER}"
|
||||
exit 1
|
||||
fi
|
||||
source "${HELPER}"
|
||||
|
||||
function blob_fixup {
|
||||
case "$1" in
|
||||
vendor/lib*/libhifills.so)
|
||||
grep -q libunwindstack.so "$2" || "$PATCHELF" --add-needed "libunwindstack.so" "$2"
|
||||
;;
|
||||
vendor/lib*/hw/camera.exynos7884B.so)
|
||||
"$PATCHELF" --replace-needed "libcamera_client.so" "libcamera_metadata_helper.so" "$2"
|
||||
"$PATCHELF" --replace-needed "libgui.so" "libgui_vendor.so" "$2"
|
||||
;;
|
||||
vendor/lib*/libexynoscamera.so | vendor/lib*/libexynoscamera3.so)
|
||||
"$PATCHELF" --remove-needed "libcamera_client.so" "$2"
|
||||
"$PATCHELF" --remove-needed "libgui.so" "$2"
|
||||
;;
|
||||
vendor/lib*/libsensorlistener.so)
|
||||
grep -q libshim_sensorndkbridge.so "$2" || "$PATCHELF" --add-needed "libshim_sensorndkbridge.so" "$2"
|
||||
;;
|
||||
vendor/lib*/libwrappergps.so | vendor/lib/hw/audio.primary.exynos7884B.so)
|
||||
"$PATCHELF" --replace-needed "libvndsecril-client.so" "libsecril-client.so" "$2"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Default to sanitizing the vendor folder before extraction
|
||||
CLEAN_VENDOR=true
|
||||
|
||||
ONLY_COMMON=
|
||||
ONLY_TARGET=
|
||||
SECTION=
|
||||
KANG=
|
||||
|
||||
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
|
||||
|
||||
# Initialize the helper for common device
|
||||
if [ -z "${ONLY_TARGET}" ]; then
|
||||
# Initialize the helper for common device
|
||||
setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${LINEAGE_ROOT}" true "${CLEAN_VENDOR}"
|
||||
|
||||
extract "${MY_DIR}/proprietary-files.txt" "${SRC}" \
|
||||
"${KANG}" --section "${SECTION}"
|
||||
fi
|
||||
|
||||
if [ -z "${ONLY_COMMON}" ] && [ -s "${MY_DIR}/../${DEVICE}/proprietary-files.txt" ]; then
|
||||
# Reinitialize the helper for device
|
||||
source "${MY_DIR}/../${DEVICE}/extract-files.sh"
|
||||
setup_vendor "${DEVICE}" "${VENDOR}" "${LINEAGE_ROOT}" false "${CLEAN_VENDOR}"
|
||||
|
||||
extract "${MY_DIR}/../${DEVICE}/proprietary-files.txt" "${SRC}" \
|
||||
"${KANG}" --section "${SECTION}"
|
||||
fi
|
||||
|
||||
"${MY_DIR}/setup-makefiles.sh"
|
||||
37
universal7885-common/include/samsung_dtbh.h
Normal file
37
universal7885-common/include/samsung_dtbh.h
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
/* tools/mkbootimg/samsung_dtbh.h
|
||||
**
|
||||
** Copyright 2017, The LineageOS 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.
|
||||
*/
|
||||
|
||||
#ifndef _SAMSUNG_DTBH_H_
|
||||
#define _SAMSUNG_DTBH_H_
|
||||
|
||||
#define DTBH_MAGIC "DTBH"
|
||||
#define DTBH_VERSION 2
|
||||
#define DTBH_PLATFORM "android"
|
||||
#define DTBH_SUBTYPE "samsung"
|
||||
/* Hardcoded entry */
|
||||
#define DTBH_PLATFORM_CODE 0x000050a6
|
||||
#define DTBH_SUBTYPE_CODE 0x217584da
|
||||
|
||||
/* DTBH_MAGIC + DTBH_VERSION + DTB counts */
|
||||
#define DT_HEADER_PHYS_SIZE 12
|
||||
|
||||
/*
|
||||
* keep the eight uint32_t entries first in this struct so we can memcpy them to the file
|
||||
*/
|
||||
#define DT_ENTRY_PHYS_SIZE (sizeof(uint32_t) * 8)
|
||||
|
||||
#endif // _SAMSUNG_DTBH_H_
|
||||
24
universal7885-common/init/Android.bp
Normal file
24
universal7885-common/init/Android.bp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
// Copyright (C) 2021 The LineageOS 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.
|
||||
|
||||
cc_library_static {
|
||||
name: "libinit_universal7884B",
|
||||
recovery_available: true,
|
||||
shared_libs: ["libbase"],
|
||||
srcs: ["init_universal7884B.cpp"],
|
||||
include_dirs: [
|
||||
"system/core/base/include",
|
||||
"system/core/init"
|
||||
]
|
||||
}
|
||||
85
universal7885-common/init/init_universal7884B.cpp
Normal file
85
universal7885-common/init/init_universal7884B.cpp
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
Copyright (c) 2021, The LineageOS Project
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of The Linux Foundation nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
|
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
||||
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
||||
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
|
||||
#define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
|
||||
#include <sys/_system_properties.h>
|
||||
|
||||
#include <android-base/properties.h>
|
||||
#include <android-base/logging.h>
|
||||
|
||||
#include "property_service.h"
|
||||
#include "vendor_init.h"
|
||||
|
||||
using android::base::GetProperty;
|
||||
using std::string;
|
||||
|
||||
std::vector<std::string> ro_props_default_source_order = {
|
||||
"",
|
||||
"odm.",
|
||||
"product.",
|
||||
"system.",
|
||||
"system_ext.",
|
||||
"vendor.",
|
||||
};
|
||||
|
||||
void property_override(char const prop[], char const value[], bool add = true) {
|
||||
prop_info *pi;
|
||||
|
||||
pi = (prop_info*) __system_property_find(prop);
|
||||
if (pi)
|
||||
__system_property_update(pi, value, strlen(value));
|
||||
else if (add)
|
||||
__system_property_add(prop, strlen(prop), value, strlen(value));
|
||||
}
|
||||
|
||||
void set_ro_build_prop(const std::string &prop, const std::string &value, bool product = true) {
|
||||
string prop_name;
|
||||
|
||||
for (const auto &source : ro_props_default_source_order) {
|
||||
if (product)
|
||||
prop_name = "ro.product." + source + prop;
|
||||
else
|
||||
prop_name = "ro." + source + "build." + prop;
|
||||
|
||||
property_override(prop_name.c_str(), value.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void vendor_load_properties() {
|
||||
string model;
|
||||
|
||||
model = GetProperty("ro.boot.product.model", "");
|
||||
|
||||
if (model == "SM-M205FN" || model == "SM-A305FN" || model == "SM-A405FN" || model == "SM-A405FM") {
|
||||
property_override("ro.boot.product.hardware.sku", "NFC");
|
||||
}
|
||||
|
||||
set_ro_build_prop("model", model);
|
||||
set_ro_build_prop("product", model, false);
|
||||
}
|
||||
53
universal7885-common/libshims/ASensorManager.cpp
Normal file
53
universal7885-common/libshims/ASensorManager.cpp
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Copyright (C) 2020 LineageOS 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.
|
||||
*/
|
||||
|
||||
#include <ALooper.h>
|
||||
|
||||
#define LOG_TAG "libshim_sensorndkbridge"
|
||||
#include <android-base/logging.h>
|
||||
|
||||
using android::Mutex;
|
||||
|
||||
static Mutex gLock;
|
||||
|
||||
extern "C" ALooper *ALooper_forCamera() {
|
||||
LOG(VERBOSE) << "ALooper_forCamera";
|
||||
ALooper *sLooper = NULL;
|
||||
|
||||
Mutex::Autolock autoLock(gLock);
|
||||
sLooper = new ALooper;
|
||||
|
||||
return sLooper;
|
||||
}
|
||||
|
||||
extern "C" int ALooper_release_forCamera(ALooper *sLooper) {
|
||||
if (sLooper != nullptr) {
|
||||
Mutex::Autolock autoLock(gLock);
|
||||
delete sLooper;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern "C" int ALooper_pollOnce_camera(ALooper *sLooper,
|
||||
int timeoutMillis,
|
||||
int* outFd,
|
||||
int* outEvents,
|
||||
void** outData) {
|
||||
int res = sLooper->pollOnce(timeoutMillis, outFd, outEvents, outData);
|
||||
LOG(VERBOSE) << "ALooper_pollOnce_camera => " << res;
|
||||
return res;
|
||||
}
|
||||
41
universal7885-common/libshims/Android.bp
Normal file
41
universal7885-common/libshims/Android.bp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
cc_library_shared {
|
||||
name: "libshim_sensorndkbridge",
|
||||
|
||||
srcs: ["ASensorManager.cpp"],
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libsensorndkbridge",
|
||||
"libutils",
|
||||
],
|
||||
|
||||
vendor: true,
|
||||
|
||||
include_dirs: [
|
||||
"system/core/base/include",
|
||||
"system/core/libutils/include",
|
||||
"frameworks/hardware/interfaces/sensorservice/libsensorndkbridge",
|
||||
],
|
||||
|
||||
}
|
||||
|
||||
cc_library_shared {
|
||||
name: "libcamera_metadata_helper",
|
||||
proprietary: true,
|
||||
defaults: ["hidl_defaults"],
|
||||
srcs: [
|
||||
"CameraMetadata.cpp",
|
||||
"CameraParameters.cpp",
|
||||
],
|
||||
cflags: [
|
||||
"-Werror",
|
||||
"-Wextra",
|
||||
"-Wall",
|
||||
],
|
||||
shared_libs: [
|
||||
"liblog",
|
||||
"libutils",
|
||||
"libhardware",
|
||||
"libcamera_metadata",
|
||||
],
|
||||
include_dirs: ["system/media/private/camera/include"],
|
||||
}
|
||||
466
universal7885-common/libshims/CameraMetadata.cpp
Normal file
466
universal7885-common/libshims/CameraMetadata.cpp
Normal file
|
|
@ -0,0 +1,466 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// #define LOG_NDEBUG 0
|
||||
|
||||
#define LOG_TAG "Camera2-Metadata"
|
||||
#include <log/log.h>
|
||||
#include <utils/Errors.h>
|
||||
|
||||
#include "CameraMetadata.h"
|
||||
|
||||
namespace android {
|
||||
|
||||
#define ALIGN_TO(val, alignment) \
|
||||
(((uintptr_t)(val) + ((alignment) - 1)) & ~((alignment) - 1))
|
||||
|
||||
CameraMetadata::CameraMetadata() :
|
||||
mBuffer(NULL), mLocked(false) {
|
||||
}
|
||||
|
||||
CameraMetadata::CameraMetadata(size_t entryCapacity, size_t dataCapacity) :
|
||||
mLocked(false)
|
||||
{
|
||||
mBuffer = allocate_camera_metadata(entryCapacity, dataCapacity);
|
||||
}
|
||||
|
||||
CameraMetadata::CameraMetadata(const CameraMetadata &other) :
|
||||
mLocked(false) {
|
||||
mBuffer = clone_camera_metadata(other.mBuffer);
|
||||
}
|
||||
|
||||
CameraMetadata::CameraMetadata(camera_metadata_t *buffer) :
|
||||
mBuffer(NULL), mLocked(false) {
|
||||
acquire(buffer);
|
||||
}
|
||||
|
||||
CameraMetadata &CameraMetadata::operator=(const CameraMetadata &other) {
|
||||
return operator=(other.mBuffer);
|
||||
}
|
||||
|
||||
CameraMetadata &CameraMetadata::operator=(const camera_metadata_t *buffer) {
|
||||
if (mLocked) {
|
||||
ALOGE("%s: Assignment to a locked CameraMetadata!", __FUNCTION__);
|
||||
return *this;
|
||||
}
|
||||
|
||||
if (CC_LIKELY(buffer != mBuffer)) {
|
||||
camera_metadata_t *newBuffer = clone_camera_metadata(buffer);
|
||||
clear();
|
||||
mBuffer = newBuffer;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
CameraMetadata::~CameraMetadata() {
|
||||
mLocked = false;
|
||||
clear();
|
||||
}
|
||||
|
||||
const camera_metadata_t* CameraMetadata::getAndLock() const {
|
||||
mLocked = true;
|
||||
return mBuffer;
|
||||
}
|
||||
|
||||
status_t CameraMetadata::unlock(const camera_metadata_t *buffer) const {
|
||||
if (!mLocked) {
|
||||
ALOGE("%s: Can't unlock a non-locked CameraMetadata!", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
if (buffer != mBuffer) {
|
||||
ALOGE("%s: Can't unlock CameraMetadata with wrong pointer!",
|
||||
__FUNCTION__);
|
||||
return BAD_VALUE;
|
||||
}
|
||||
mLocked = false;
|
||||
return OK;
|
||||
}
|
||||
|
||||
camera_metadata_t* CameraMetadata::release() {
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return NULL;
|
||||
}
|
||||
camera_metadata_t *released = mBuffer;
|
||||
mBuffer = NULL;
|
||||
return released;
|
||||
}
|
||||
|
||||
void CameraMetadata::clear() {
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
if (mBuffer) {
|
||||
free_camera_metadata(mBuffer);
|
||||
mBuffer = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void CameraMetadata::acquire(camera_metadata_t *buffer) {
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
clear();
|
||||
mBuffer = buffer;
|
||||
|
||||
ALOGE_IF(validate_camera_metadata_structure(mBuffer, /*size*/NULL) != OK,
|
||||
"%s: Failed to validate metadata structure %p",
|
||||
__FUNCTION__, buffer);
|
||||
}
|
||||
|
||||
void CameraMetadata::acquire(CameraMetadata &other) {
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
acquire(other.release());
|
||||
}
|
||||
|
||||
status_t CameraMetadata::append(const CameraMetadata &other) {
|
||||
return append(other.mBuffer);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::append(const camera_metadata_t* other) {
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
size_t extraEntries = get_camera_metadata_entry_count(other);
|
||||
size_t extraData = get_camera_metadata_data_count(other);
|
||||
resizeIfNeeded(extraEntries, extraData);
|
||||
|
||||
return append_camera_metadata(mBuffer, other);
|
||||
}
|
||||
|
||||
size_t CameraMetadata::entryCount() const {
|
||||
return (mBuffer == NULL) ? 0 :
|
||||
get_camera_metadata_entry_count(mBuffer);
|
||||
}
|
||||
|
||||
bool CameraMetadata::isEmpty() const {
|
||||
return entryCount() == 0;
|
||||
}
|
||||
|
||||
status_t CameraMetadata::sort() {
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
return sort_camera_metadata(mBuffer);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::checkType(uint32_t tag, uint8_t expectedType) {
|
||||
int tagType = get_local_camera_metadata_tag_type(tag, mBuffer);
|
||||
if ( CC_UNLIKELY(tagType == -1)) {
|
||||
ALOGE("Update metadata entry: Unknown tag %d", tag);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
if ( CC_UNLIKELY(tagType != expectedType) ) {
|
||||
ALOGE("Mismatched tag type when updating entry %s (%d) of type %s; "
|
||||
"got type %s data instead ",
|
||||
get_local_camera_metadata_tag_name(tag, mBuffer), tag,
|
||||
camera_metadata_type_names[tagType],
|
||||
camera_metadata_type_names[expectedType]);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
status_t CameraMetadata::update(uint32_t tag,
|
||||
const int32_t *data, size_t data_count) {
|
||||
status_t res;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
if ( (res = checkType(tag, TYPE_INT32)) != OK) {
|
||||
return res;
|
||||
}
|
||||
return updateImpl(tag, (const void*)data, data_count);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::update(uint32_t tag,
|
||||
const uint8_t *data, size_t data_count) {
|
||||
status_t res;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
if ( (res = checkType(tag, TYPE_BYTE)) != OK) {
|
||||
return res;
|
||||
}
|
||||
return updateImpl(tag, (const void*)data, data_count);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::update(uint32_t tag,
|
||||
const float *data, size_t data_count) {
|
||||
status_t res;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
if ( (res = checkType(tag, TYPE_FLOAT)) != OK) {
|
||||
return res;
|
||||
}
|
||||
return updateImpl(tag, (const void*)data, data_count);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::update(uint32_t tag,
|
||||
const int64_t *data, size_t data_count) {
|
||||
status_t res;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
if ( (res = checkType(tag, TYPE_INT64)) != OK) {
|
||||
return res;
|
||||
}
|
||||
return updateImpl(tag, (const void*)data, data_count);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::update(uint32_t tag,
|
||||
const double *data, size_t data_count) {
|
||||
status_t res;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
if ( (res = checkType(tag, TYPE_DOUBLE)) != OK) {
|
||||
return res;
|
||||
}
|
||||
return updateImpl(tag, (const void*)data, data_count);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::update(uint32_t tag,
|
||||
const camera_metadata_rational_t *data, size_t data_count) {
|
||||
status_t res;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
if ( (res = checkType(tag, TYPE_RATIONAL)) != OK) {
|
||||
return res;
|
||||
}
|
||||
return updateImpl(tag, (const void*)data, data_count);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::update(uint32_t tag,
|
||||
const String8 &string) {
|
||||
status_t res;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
if ( (res = checkType(tag, TYPE_BYTE)) != OK) {
|
||||
return res;
|
||||
}
|
||||
// string.size() doesn't count the null termination character.
|
||||
return updateImpl(tag, (const void*)string.string(), string.size() + 1);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::update(const camera_metadata_ro_entry &entry) {
|
||||
status_t res;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
if ( (res = checkType(entry.tag, entry.type)) != OK) {
|
||||
return res;
|
||||
}
|
||||
return updateImpl(entry.tag, (const void*)entry.data.u8, entry.count);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::updateImpl(uint32_t tag, const void *data,
|
||||
size_t data_count) {
|
||||
status_t res;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
int type = get_local_camera_metadata_tag_type(tag, mBuffer);
|
||||
if (type == -1) {
|
||||
ALOGE("%s: Tag %d not found", __FUNCTION__, tag);
|
||||
return BAD_VALUE;
|
||||
}
|
||||
// Safety check - ensure that data isn't pointing to this metadata, since
|
||||
// that would get invalidated if a resize is needed
|
||||
size_t bufferSize = get_camera_metadata_size(mBuffer);
|
||||
uintptr_t bufAddr = reinterpret_cast<uintptr_t>(mBuffer);
|
||||
uintptr_t dataAddr = reinterpret_cast<uintptr_t>(data);
|
||||
if (dataAddr > bufAddr && dataAddr < (bufAddr + bufferSize)) {
|
||||
ALOGE("%s: Update attempted with data from the same metadata buffer!",
|
||||
__FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
|
||||
size_t data_size = calculate_camera_metadata_entry_data_size(type,
|
||||
data_count);
|
||||
|
||||
res = resizeIfNeeded(1, data_size);
|
||||
|
||||
if (res == OK) {
|
||||
camera_metadata_entry_t entry;
|
||||
res = find_camera_metadata_entry(mBuffer, tag, &entry);
|
||||
if (res == NAME_NOT_FOUND) {
|
||||
res = add_camera_metadata_entry(mBuffer,
|
||||
tag, data, data_count);
|
||||
} else if (res == OK) {
|
||||
res = update_camera_metadata_entry(mBuffer,
|
||||
entry.index, data, data_count, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (res != OK) {
|
||||
ALOGE("%s: Unable to update metadata entry %s.%s (%x): %s (%d)",
|
||||
__FUNCTION__, get_local_camera_metadata_section_name(tag, mBuffer),
|
||||
get_local_camera_metadata_tag_name(tag, mBuffer), tag,
|
||||
strerror(-res), res);
|
||||
}
|
||||
|
||||
IF_ALOGV() {
|
||||
ALOGE_IF(validate_camera_metadata_structure(mBuffer, /*size*/NULL) !=
|
||||
OK,
|
||||
|
||||
"%s: Failed to validate metadata structure after update %p",
|
||||
__FUNCTION__, mBuffer);
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
bool CameraMetadata::exists(uint32_t tag) const {
|
||||
camera_metadata_ro_entry entry;
|
||||
return find_camera_metadata_ro_entry(mBuffer, tag, &entry) == 0;
|
||||
}
|
||||
|
||||
camera_metadata_entry_t CameraMetadata::find(uint32_t tag) {
|
||||
status_t res;
|
||||
camera_metadata_entry entry;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
entry.count = 0;
|
||||
return entry;
|
||||
}
|
||||
res = find_camera_metadata_entry(mBuffer, tag, &entry);
|
||||
if (CC_UNLIKELY( res != OK )) {
|
||||
entry.count = 0;
|
||||
entry.data.u8 = NULL;
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
||||
camera_metadata_ro_entry_t CameraMetadata::find(uint32_t tag) const {
|
||||
status_t res;
|
||||
camera_metadata_ro_entry entry;
|
||||
res = find_camera_metadata_ro_entry(mBuffer, tag, &entry);
|
||||
if (CC_UNLIKELY( res != OK )) {
|
||||
entry.count = 0;
|
||||
entry.data.u8 = NULL;
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
||||
status_t CameraMetadata::erase(uint32_t tag) {
|
||||
camera_metadata_entry_t entry;
|
||||
status_t res;
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return INVALID_OPERATION;
|
||||
}
|
||||
res = find_camera_metadata_entry(mBuffer, tag, &entry);
|
||||
if (res == NAME_NOT_FOUND) {
|
||||
return OK;
|
||||
} else if (res != OK) {
|
||||
ALOGE("%s: Error looking for entry %s.%s (%x): %s %d",
|
||||
__FUNCTION__,
|
||||
get_local_camera_metadata_section_name(tag, mBuffer),
|
||||
get_local_camera_metadata_tag_name(tag, mBuffer),
|
||||
tag, strerror(-res), res);
|
||||
return res;
|
||||
}
|
||||
res = delete_camera_metadata_entry(mBuffer, entry.index);
|
||||
if (res != OK) {
|
||||
ALOGE("%s: Error deleting entry %s.%s (%x): %s %d",
|
||||
__FUNCTION__,
|
||||
get_local_camera_metadata_section_name(tag, mBuffer),
|
||||
get_local_camera_metadata_tag_name(tag, mBuffer),
|
||||
tag, strerror(-res), res);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
void CameraMetadata::dump(int fd, int verbosity, int indentation) const {
|
||||
dump_indented_camera_metadata(mBuffer, fd, verbosity, indentation);
|
||||
}
|
||||
|
||||
status_t CameraMetadata::resizeIfNeeded(size_t extraEntries, size_t extraData) {
|
||||
if (mBuffer == NULL) {
|
||||
mBuffer = allocate_camera_metadata(extraEntries * 2, extraData * 2);
|
||||
if (mBuffer == NULL) {
|
||||
ALOGE("%s: Can't allocate larger metadata buffer", __FUNCTION__);
|
||||
return NO_MEMORY;
|
||||
}
|
||||
} else {
|
||||
size_t currentEntryCount = get_camera_metadata_entry_count(mBuffer);
|
||||
size_t currentEntryCap = get_camera_metadata_entry_capacity(mBuffer);
|
||||
size_t newEntryCount = currentEntryCount +
|
||||
extraEntries;
|
||||
newEntryCount = (newEntryCount > currentEntryCap) ?
|
||||
newEntryCount * 2 : currentEntryCap;
|
||||
|
||||
size_t currentDataCount = get_camera_metadata_data_count(mBuffer);
|
||||
size_t currentDataCap = get_camera_metadata_data_capacity(mBuffer);
|
||||
size_t newDataCount = currentDataCount +
|
||||
extraData;
|
||||
newDataCount = (newDataCount > currentDataCap) ?
|
||||
newDataCount * 2 : currentDataCap;
|
||||
|
||||
if (newEntryCount > currentEntryCap ||
|
||||
newDataCount > currentDataCap) {
|
||||
camera_metadata_t *oldBuffer = mBuffer;
|
||||
mBuffer = allocate_camera_metadata(newEntryCount,
|
||||
newDataCount);
|
||||
if (mBuffer == NULL) {
|
||||
ALOGE("%s: Can't allocate larger metadata buffer", __FUNCTION__);
|
||||
return NO_MEMORY;
|
||||
}
|
||||
append_camera_metadata(mBuffer, oldBuffer);
|
||||
free_camera_metadata(oldBuffer);
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
void CameraMetadata::swap(CameraMetadata& other) {
|
||||
if (mLocked) {
|
||||
ALOGE("%s: CameraMetadata is locked", __FUNCTION__);
|
||||
return;
|
||||
} else if (other.mLocked) {
|
||||
ALOGE("%s: Other CameraMetadata is locked", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
camera_metadata* thisBuf = mBuffer;
|
||||
camera_metadata* otherBuf = other.mBuffer;
|
||||
|
||||
other.mBuffer = thisBuf;
|
||||
mBuffer = otherBuf;
|
||||
}
|
||||
|
||||
|
||||
}; // namespace android
|
||||
210
universal7885-common/libshims/CameraMetadata.h
Normal file
210
universal7885-common/libshims/CameraMetadata.h
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_CAMERA_METADATA_HELPER_H
|
||||
#define ANDROID_CAMERA_METADATA_HELPER_H
|
||||
|
||||
#include "system/camera_metadata.h"
|
||||
|
||||
#include <utils/String8.h>
|
||||
#include <utils/Vector.h>
|
||||
|
||||
namespace android {
|
||||
|
||||
/**
|
||||
* A convenience wrapper around the C-based camera_metadata_t library.
|
||||
*/
|
||||
class CameraMetadata {
|
||||
public:
|
||||
/** Creates an empty object; best used when expecting to acquire contents
|
||||
* from elsewhere */
|
||||
CameraMetadata();
|
||||
/** Creates an object with space for entryCapacity entries, with
|
||||
* dataCapacity extra storage */
|
||||
CameraMetadata(size_t entryCapacity, size_t dataCapacity = 10);
|
||||
|
||||
~CameraMetadata();
|
||||
|
||||
/** Takes ownership of passed-in buffer */
|
||||
CameraMetadata(camera_metadata_t *buffer);
|
||||
/** Clones the metadata */
|
||||
CameraMetadata(const CameraMetadata &other);
|
||||
|
||||
/**
|
||||
* Assignment clones metadata buffer.
|
||||
*/
|
||||
CameraMetadata &operator=(const CameraMetadata &other);
|
||||
CameraMetadata &operator=(const camera_metadata_t *buffer);
|
||||
|
||||
/**
|
||||
* Get reference to the underlying metadata buffer. Ownership remains with
|
||||
* the CameraMetadata object, but non-const CameraMetadata methods will not
|
||||
* work until unlock() is called. Note that the lock has nothing to do with
|
||||
* thread-safety, it simply prevents the camera_metadata_t pointer returned
|
||||
* here from being accidentally invalidated by CameraMetadata operations.
|
||||
*/
|
||||
const camera_metadata_t* getAndLock() const;
|
||||
|
||||
/**
|
||||
* Unlock the CameraMetadata for use again. After this unlock, the pointer
|
||||
* given from getAndLock() may no longer be used. The pointer passed out
|
||||
* from getAndLock must be provided to guarantee that the right object is
|
||||
* being unlocked.
|
||||
*/
|
||||
status_t unlock(const camera_metadata_t *buffer) const;
|
||||
|
||||
/**
|
||||
* Release a raw metadata buffer to the caller. After this call,
|
||||
* CameraMetadata no longer references the buffer, and the caller takes
|
||||
* responsibility for freeing the raw metadata buffer (using
|
||||
* free_camera_metadata()), or for handing it to another CameraMetadata
|
||||
* instance.
|
||||
*/
|
||||
camera_metadata_t* release();
|
||||
|
||||
/**
|
||||
* Clear the metadata buffer and free all storage used by it
|
||||
*/
|
||||
void clear();
|
||||
|
||||
/**
|
||||
* Acquire a raw metadata buffer from the caller. After this call,
|
||||
* the caller no longer owns the raw buffer, and must not free or manipulate it.
|
||||
* If CameraMetadata already contains metadata, it is freed.
|
||||
*/
|
||||
void acquire(camera_metadata_t* buffer);
|
||||
|
||||
/**
|
||||
* Acquires raw buffer from other CameraMetadata object. After the call, the argument
|
||||
* object no longer has any metadata.
|
||||
*/
|
||||
void acquire(CameraMetadata &other);
|
||||
|
||||
/**
|
||||
* Append metadata from another CameraMetadata object.
|
||||
*/
|
||||
status_t append(const CameraMetadata &other);
|
||||
|
||||
/**
|
||||
* Append metadata from a raw camera_metadata buffer
|
||||
*/
|
||||
status_t append(const camera_metadata* other);
|
||||
|
||||
/**
|
||||
* Number of metadata entries.
|
||||
*/
|
||||
size_t entryCount() const;
|
||||
|
||||
/**
|
||||
* Is the buffer empty (no entires)
|
||||
*/
|
||||
bool isEmpty() const;
|
||||
|
||||
/**
|
||||
* Sort metadata buffer for faster find
|
||||
*/
|
||||
status_t sort();
|
||||
|
||||
/**
|
||||
* Update metadata entry. Will create entry if it doesn't exist already, and
|
||||
* will reallocate the buffer if insufficient space exists. Overloaded for
|
||||
* the various types of valid data.
|
||||
*/
|
||||
status_t update(uint32_t tag,
|
||||
const uint8_t *data, size_t data_count);
|
||||
status_t update(uint32_t tag,
|
||||
const int32_t *data, size_t data_count);
|
||||
status_t update(uint32_t tag,
|
||||
const float *data, size_t data_count);
|
||||
status_t update(uint32_t tag,
|
||||
const int64_t *data, size_t data_count);
|
||||
status_t update(uint32_t tag,
|
||||
const double *data, size_t data_count);
|
||||
status_t update(uint32_t tag,
|
||||
const camera_metadata_rational_t *data, size_t data_count);
|
||||
status_t update(uint32_t tag,
|
||||
const String8 &string);
|
||||
status_t update(const camera_metadata_ro_entry &entry);
|
||||
|
||||
|
||||
template<typename T>
|
||||
status_t update(uint32_t tag, Vector<T> data) {
|
||||
return update(tag, data.array(), data.size());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a metadata entry exists for a given tag id
|
||||
*
|
||||
*/
|
||||
bool exists(uint32_t tag) const;
|
||||
|
||||
/**
|
||||
* Get metadata entry by tag id
|
||||
*/
|
||||
camera_metadata_entry find(uint32_t tag);
|
||||
|
||||
/**
|
||||
* Get metadata entry by tag id, with no editing
|
||||
*/
|
||||
camera_metadata_ro_entry find(uint32_t tag) const;
|
||||
|
||||
/**
|
||||
* Delete metadata entry by tag
|
||||
*/
|
||||
status_t erase(uint32_t tag);
|
||||
|
||||
/**
|
||||
* Swap the underlying camera metadata between this and the other
|
||||
* metadata object.
|
||||
*/
|
||||
void swap(CameraMetadata &other);
|
||||
|
||||
/**
|
||||
* Dump contents into FD for debugging. The verbosity levels are
|
||||
* 0: Tag entry information only, no data values
|
||||
* 1: Level 0 plus at most 16 data values per entry
|
||||
* 2: All information
|
||||
*
|
||||
* The indentation parameter sets the number of spaces to add to the start
|
||||
* each line of output.
|
||||
*/
|
||||
void dump(int fd, int verbosity = 1, int indentation = 0) const;
|
||||
|
||||
private:
|
||||
camera_metadata_t *mBuffer;
|
||||
volatile char mReserved[3] __attribute__ ((unused));
|
||||
mutable bool mLocked;
|
||||
|
||||
/**
|
||||
* Check if tag has a given type
|
||||
*/
|
||||
status_t checkType(uint32_t tag, uint8_t expectedType);
|
||||
|
||||
/**
|
||||
* Base update entry method
|
||||
*/
|
||||
status_t updateImpl(uint32_t tag, const void *data, size_t data_count);
|
||||
|
||||
/**
|
||||
* Resize metadata buffer if needed by reallocating it and copying it over.
|
||||
*/
|
||||
status_t resizeIfNeeded(size_t extraEntries, size_t extraData);
|
||||
|
||||
};
|
||||
|
||||
} // namespace android
|
||||
|
||||
#endif
|
||||
539
universal7885-common/libshims/CameraParameters.cpp
Normal file
539
universal7885-common/libshims/CameraParameters.cpp
Normal file
|
|
@ -0,0 +1,539 @@
|
|||
/*
|
||||
**
|
||||
** Copyright 2008, 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.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "CameraParams"
|
||||
#include <log/log.h>
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "CameraParameters.h"
|
||||
#include <system/graphics.h>
|
||||
|
||||
namespace android {
|
||||
|
||||
// Parameter keys to communicate between camera application and driver.
|
||||
const char CameraParameters::KEY_PREVIEW_SIZE[] = "preview-size";
|
||||
const char CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES[] = "preview-size-values";
|
||||
const char CameraParameters::KEY_PREVIEW_FORMAT[] = "preview-format";
|
||||
const char CameraParameters::KEY_SUPPORTED_PREVIEW_FORMATS[] = "preview-format-values";
|
||||
const char CameraParameters::KEY_PREVIEW_FRAME_RATE[] = "preview-frame-rate";
|
||||
const char CameraParameters::KEY_SUPPORTED_PREVIEW_FRAME_RATES[] = "preview-frame-rate-values";
|
||||
const char CameraParameters::KEY_PREVIEW_FPS_RANGE[] = "preview-fps-range";
|
||||
const char CameraParameters::KEY_SUPPORTED_PREVIEW_FPS_RANGE[] = "preview-fps-range-values";
|
||||
const char CameraParameters::KEY_PICTURE_SIZE[] = "picture-size";
|
||||
const char CameraParameters::KEY_SUPPORTED_PICTURE_SIZES[] = "picture-size-values";
|
||||
const char CameraParameters::KEY_PICTURE_FORMAT[] = "picture-format";
|
||||
const char CameraParameters::KEY_SUPPORTED_PICTURE_FORMATS[] = "picture-format-values";
|
||||
const char CameraParameters::KEY_JPEG_THUMBNAIL_WIDTH[] = "jpeg-thumbnail-width";
|
||||
const char CameraParameters::KEY_JPEG_THUMBNAIL_HEIGHT[] = "jpeg-thumbnail-height";
|
||||
const char CameraParameters::KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES[] = "jpeg-thumbnail-size-values";
|
||||
const char CameraParameters::KEY_JPEG_THUMBNAIL_QUALITY[] = "jpeg-thumbnail-quality";
|
||||
const char CameraParameters::KEY_JPEG_QUALITY[] = "jpeg-quality";
|
||||
const char CameraParameters::KEY_ROTATION[] = "rotation";
|
||||
const char CameraParameters::KEY_GPS_LATITUDE[] = "gps-latitude";
|
||||
const char CameraParameters::KEY_GPS_LONGITUDE[] = "gps-longitude";
|
||||
const char CameraParameters::KEY_GPS_ALTITUDE[] = "gps-altitude";
|
||||
const char CameraParameters::KEY_GPS_TIMESTAMP[] = "gps-timestamp";
|
||||
const char CameraParameters::KEY_GPS_PROCESSING_METHOD[] = "gps-processing-method";
|
||||
const char CameraParameters::KEY_WHITE_BALANCE[] = "whitebalance";
|
||||
const char CameraParameters::KEY_SUPPORTED_WHITE_BALANCE[] = "whitebalance-values";
|
||||
const char CameraParameters::KEY_EFFECT[] = "effect";
|
||||
const char CameraParameters::KEY_SUPPORTED_EFFECTS[] = "effect-values";
|
||||
const char CameraParameters::KEY_ANTIBANDING[] = "antibanding";
|
||||
const char CameraParameters::KEY_SUPPORTED_ANTIBANDING[] = "antibanding-values";
|
||||
const char CameraParameters::KEY_SCENE_MODE[] = "scene-mode";
|
||||
const char CameraParameters::KEY_SUPPORTED_SCENE_MODES[] = "scene-mode-values";
|
||||
const char CameraParameters::KEY_FLASH_MODE[] = "flash-mode";
|
||||
const char CameraParameters::KEY_SUPPORTED_FLASH_MODES[] = "flash-mode-values";
|
||||
const char CameraParameters::KEY_FOCUS_MODE[] = "focus-mode";
|
||||
const char CameraParameters::KEY_SUPPORTED_FOCUS_MODES[] = "focus-mode-values";
|
||||
const char CameraParameters::KEY_MAX_NUM_FOCUS_AREAS[] = "max-num-focus-areas";
|
||||
const char CameraParameters::KEY_FOCUS_AREAS[] = "focus-areas";
|
||||
const char CameraParameters::KEY_FOCAL_LENGTH[] = "focal-length";
|
||||
const char CameraParameters::KEY_HORIZONTAL_VIEW_ANGLE[] = "horizontal-view-angle";
|
||||
const char CameraParameters::KEY_VERTICAL_VIEW_ANGLE[] = "vertical-view-angle";
|
||||
const char CameraParameters::KEY_EXPOSURE_COMPENSATION[] = "exposure-compensation";
|
||||
const char CameraParameters::KEY_MAX_EXPOSURE_COMPENSATION[] = "max-exposure-compensation";
|
||||
const char CameraParameters::KEY_MIN_EXPOSURE_COMPENSATION[] = "min-exposure-compensation";
|
||||
const char CameraParameters::KEY_EXPOSURE_COMPENSATION_STEP[] = "exposure-compensation-step";
|
||||
const char CameraParameters::KEY_AUTO_EXPOSURE_LOCK[] = "auto-exposure-lock";
|
||||
const char CameraParameters::KEY_AUTO_EXPOSURE_LOCK_SUPPORTED[] = "auto-exposure-lock-supported";
|
||||
const char CameraParameters::KEY_AUTO_WHITEBALANCE_LOCK[] = "auto-whitebalance-lock";
|
||||
const char CameraParameters::KEY_AUTO_WHITEBALANCE_LOCK_SUPPORTED[] = "auto-whitebalance-lock-supported";
|
||||
const char CameraParameters::KEY_MAX_NUM_METERING_AREAS[] = "max-num-metering-areas";
|
||||
const char CameraParameters::KEY_METERING_AREAS[] = "metering-areas";
|
||||
const char CameraParameters::KEY_ZOOM[] = "zoom";
|
||||
const char CameraParameters::KEY_MAX_ZOOM[] = "max-zoom";
|
||||
const char CameraParameters::KEY_ZOOM_RATIOS[] = "zoom-ratios";
|
||||
const char CameraParameters::KEY_ZOOM_SUPPORTED[] = "zoom-supported";
|
||||
const char CameraParameters::KEY_SMOOTH_ZOOM_SUPPORTED[] = "smooth-zoom-supported";
|
||||
const char CameraParameters::KEY_FOCUS_DISTANCES[] = "focus-distances";
|
||||
const char CameraParameters::KEY_VIDEO_FRAME_FORMAT[] = "video-frame-format";
|
||||
const char CameraParameters::KEY_VIDEO_SIZE[] = "video-size";
|
||||
const char CameraParameters::KEY_SUPPORTED_VIDEO_SIZES[] = "video-size-values";
|
||||
const char CameraParameters::KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[] = "preferred-preview-size-for-video";
|
||||
const char CameraParameters::KEY_MAX_NUM_DETECTED_FACES_HW[] = "max-num-detected-faces-hw";
|
||||
const char CameraParameters::KEY_MAX_NUM_DETECTED_FACES_SW[] = "max-num-detected-faces-sw";
|
||||
const char CameraParameters::KEY_RECORDING_HINT[] = "recording-hint";
|
||||
const char CameraParameters::KEY_VIDEO_SNAPSHOT_SUPPORTED[] = "video-snapshot-supported";
|
||||
const char CameraParameters::KEY_VIDEO_STABILIZATION[] = "video-stabilization";
|
||||
const char CameraParameters::KEY_VIDEO_STABILIZATION_SUPPORTED[] = "video-stabilization-supported";
|
||||
const char CameraParameters::KEY_LIGHTFX[] = "light-fx";
|
||||
|
||||
const char CameraParameters::TRUE[] = "true";
|
||||
const char CameraParameters::FALSE[] = "false";
|
||||
const char CameraParameters::FOCUS_DISTANCE_INFINITY[] = "Infinity";
|
||||
|
||||
// Values for white balance settings.
|
||||
const char CameraParameters::WHITE_BALANCE_AUTO[] = "auto";
|
||||
const char CameraParameters::WHITE_BALANCE_INCANDESCENT[] = "incandescent";
|
||||
const char CameraParameters::WHITE_BALANCE_FLUORESCENT[] = "fluorescent";
|
||||
const char CameraParameters::WHITE_BALANCE_WARM_FLUORESCENT[] = "warm-fluorescent";
|
||||
const char CameraParameters::WHITE_BALANCE_DAYLIGHT[] = "daylight";
|
||||
const char CameraParameters::WHITE_BALANCE_CLOUDY_DAYLIGHT[] = "cloudy-daylight";
|
||||
const char CameraParameters::WHITE_BALANCE_TWILIGHT[] = "twilight";
|
||||
const char CameraParameters::WHITE_BALANCE_SHADE[] = "shade";
|
||||
|
||||
// Values for effect settings.
|
||||
const char CameraParameters::EFFECT_NONE[] = "none";
|
||||
const char CameraParameters::EFFECT_MONO[] = "mono";
|
||||
const char CameraParameters::EFFECT_NEGATIVE[] = "negative";
|
||||
const char CameraParameters::EFFECT_SOLARIZE[] = "solarize";
|
||||
const char CameraParameters::EFFECT_SEPIA[] = "sepia";
|
||||
const char CameraParameters::EFFECT_POSTERIZE[] = "posterize";
|
||||
const char CameraParameters::EFFECT_WHITEBOARD[] = "whiteboard";
|
||||
const char CameraParameters::EFFECT_BLACKBOARD[] = "blackboard";
|
||||
const char CameraParameters::EFFECT_AQUA[] = "aqua";
|
||||
|
||||
// Values for antibanding settings.
|
||||
const char CameraParameters::ANTIBANDING_AUTO[] = "auto";
|
||||
const char CameraParameters::ANTIBANDING_50HZ[] = "50hz";
|
||||
const char CameraParameters::ANTIBANDING_60HZ[] = "60hz";
|
||||
const char CameraParameters::ANTIBANDING_OFF[] = "off";
|
||||
|
||||
// Values for flash mode settings.
|
||||
const char CameraParameters::FLASH_MODE_OFF[] = "off";
|
||||
const char CameraParameters::FLASH_MODE_AUTO[] = "auto";
|
||||
const char CameraParameters::FLASH_MODE_ON[] = "on";
|
||||
const char CameraParameters::FLASH_MODE_RED_EYE[] = "red-eye";
|
||||
const char CameraParameters::FLASH_MODE_TORCH[] = "torch";
|
||||
|
||||
// Values for scene mode settings.
|
||||
const char CameraParameters::SCENE_MODE_AUTO[] = "auto";
|
||||
const char CameraParameters::SCENE_MODE_ACTION[] = "action";
|
||||
const char CameraParameters::SCENE_MODE_PORTRAIT[] = "portrait";
|
||||
const char CameraParameters::SCENE_MODE_LANDSCAPE[] = "landscape";
|
||||
const char CameraParameters::SCENE_MODE_NIGHT[] = "night";
|
||||
const char CameraParameters::SCENE_MODE_NIGHT_PORTRAIT[] = "night-portrait";
|
||||
const char CameraParameters::SCENE_MODE_THEATRE[] = "theatre";
|
||||
const char CameraParameters::SCENE_MODE_BEACH[] = "beach";
|
||||
const char CameraParameters::SCENE_MODE_SNOW[] = "snow";
|
||||
const char CameraParameters::SCENE_MODE_SUNSET[] = "sunset";
|
||||
const char CameraParameters::SCENE_MODE_STEADYPHOTO[] = "steadyphoto";
|
||||
const char CameraParameters::SCENE_MODE_FIREWORKS[] = "fireworks";
|
||||
const char CameraParameters::SCENE_MODE_SPORTS[] = "sports";
|
||||
const char CameraParameters::SCENE_MODE_PARTY[] = "party";
|
||||
const char CameraParameters::SCENE_MODE_CANDLELIGHT[] = "candlelight";
|
||||
const char CameraParameters::SCENE_MODE_BARCODE[] = "barcode";
|
||||
const char CameraParameters::SCENE_MODE_HDR[] = "hdr";
|
||||
|
||||
const char CameraParameters::PIXEL_FORMAT_YUV422SP[] = "yuv422sp";
|
||||
const char CameraParameters::PIXEL_FORMAT_YUV420SP[] = "yuv420sp";
|
||||
const char CameraParameters::PIXEL_FORMAT_YUV422I[] = "yuv422i-yuyv";
|
||||
const char CameraParameters::PIXEL_FORMAT_YUV420P[] = "yuv420p";
|
||||
const char CameraParameters::PIXEL_FORMAT_RGB565[] = "rgb565";
|
||||
const char CameraParameters::PIXEL_FORMAT_RGBA8888[] = "rgba8888";
|
||||
const char CameraParameters::PIXEL_FORMAT_JPEG[] = "jpeg";
|
||||
const char CameraParameters::PIXEL_FORMAT_BAYER_RGGB[] = "bayer-rggb";
|
||||
const char CameraParameters::PIXEL_FORMAT_ANDROID_OPAQUE[] = "android-opaque";
|
||||
|
||||
// Values for focus mode settings.
|
||||
const char CameraParameters::FOCUS_MODE_AUTO[] = "auto";
|
||||
const char CameraParameters::FOCUS_MODE_INFINITY[] = "infinity";
|
||||
const char CameraParameters::FOCUS_MODE_MACRO[] = "macro";
|
||||
const char CameraParameters::FOCUS_MODE_FIXED[] = "fixed";
|
||||
const char CameraParameters::FOCUS_MODE_EDOF[] = "edof";
|
||||
const char CameraParameters::FOCUS_MODE_CONTINUOUS_VIDEO[] = "continuous-video";
|
||||
const char CameraParameters::FOCUS_MODE_CONTINUOUS_PICTURE[] = "continuous-picture";
|
||||
|
||||
// Values for light fx settings
|
||||
const char CameraParameters::LIGHTFX_LOWLIGHT[] = "low-light";
|
||||
const char CameraParameters::LIGHTFX_HDR[] = "high-dynamic-range";
|
||||
|
||||
CameraParameters::CameraParameters()
|
||||
: mMap()
|
||||
{
|
||||
}
|
||||
|
||||
CameraParameters::~CameraParameters()
|
||||
{
|
||||
}
|
||||
|
||||
String8 CameraParameters::flatten() const
|
||||
{
|
||||
String8 flattened("");
|
||||
size_t size = mMap.size();
|
||||
|
||||
for (size_t i = 0; i < size; i++) {
|
||||
String8 k, v;
|
||||
k = mMap.keyAt(i);
|
||||
v = mMap.valueAt(i);
|
||||
|
||||
flattened += k;
|
||||
flattened += "=";
|
||||
flattened += v;
|
||||
if (i != size-1)
|
||||
flattened += ";";
|
||||
}
|
||||
|
||||
return flattened;
|
||||
}
|
||||
|
||||
void CameraParameters::unflatten(const String8 ¶ms)
|
||||
{
|
||||
const char *a = params.string();
|
||||
const char *b;
|
||||
|
||||
mMap.clear();
|
||||
|
||||
for (;;) {
|
||||
// Find the bounds of the key name.
|
||||
b = strchr(a, '=');
|
||||
if (b == 0)
|
||||
break;
|
||||
|
||||
// Create the key string.
|
||||
String8 k(a, (size_t)(b-a));
|
||||
|
||||
// Find the value.
|
||||
a = b+1;
|
||||
b = strchr(a, ';');
|
||||
if (b == 0) {
|
||||
// If there's no semicolon, this is the last item.
|
||||
String8 v(a);
|
||||
mMap.add(k, v);
|
||||
break;
|
||||
}
|
||||
|
||||
String8 v(a, (size_t)(b-a));
|
||||
mMap.add(k, v);
|
||||
a = b+1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void CameraParameters::set(const char *key, const char *value)
|
||||
{
|
||||
// i think i can do this with strspn()
|
||||
if (strchr(key, '=') || strchr(key, ';')) {
|
||||
// ALOGE("Key \"%s\"contains invalid character (= or ;)", key);
|
||||
return;
|
||||
}
|
||||
|
||||
if (strchr(value, '=') || strchr(value, ';')) {
|
||||
// ALOGE("Value \"%s\"contains invalid character (= or ;)", value);
|
||||
return;
|
||||
}
|
||||
|
||||
mMap.replaceValueFor(String8(key), String8(value));
|
||||
}
|
||||
|
||||
void CameraParameters::set(const char *key, int value)
|
||||
{
|
||||
char str[16];
|
||||
sprintf(str, "%d", value);
|
||||
set(key, str);
|
||||
}
|
||||
|
||||
void CameraParameters::setFloat(const char *key, float value)
|
||||
{
|
||||
char str[16]; // 14 should be enough. We overestimate to be safe.
|
||||
snprintf(str, sizeof(str), "%g", value);
|
||||
set(key, str);
|
||||
}
|
||||
|
||||
const char *CameraParameters::get(const char *key) const
|
||||
{
|
||||
String8 v = mMap.valueFor(String8(key));
|
||||
if (v.length() == 0)
|
||||
return 0;
|
||||
return v.string();
|
||||
}
|
||||
|
||||
int CameraParameters::getInt(const char *key) const
|
||||
{
|
||||
const char *v = get(key);
|
||||
if (v == 0)
|
||||
return -1;
|
||||
return strtol(v, 0, 0);
|
||||
}
|
||||
|
||||
float CameraParameters::getFloat(const char *key) const
|
||||
{
|
||||
const char *v = get(key);
|
||||
if (v == 0) return -1;
|
||||
return strtof(v, 0);
|
||||
}
|
||||
|
||||
void CameraParameters::remove(const char *key)
|
||||
{
|
||||
mMap.removeItem(String8(key));
|
||||
}
|
||||
|
||||
// Parse string like "640x480" or "10000,20000"
|
||||
static int parse_pair(const char *str, int *first, int *second, char delim,
|
||||
char **endptr = NULL)
|
||||
{
|
||||
// Find the first integer.
|
||||
char *end;
|
||||
int w = (int)strtol(str, &end, 10);
|
||||
// If a delimeter does not immediately follow, give up.
|
||||
if (*end != delim) {
|
||||
ALOGE("Cannot find delimeter (%c) in str=%s", delim, str);
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Find the second integer, immediately after the delimeter.
|
||||
int h = (int)strtol(end+1, &end, 10);
|
||||
|
||||
*first = w;
|
||||
*second = h;
|
||||
|
||||
if (endptr) {
|
||||
*endptr = end;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void parseSizesList(const char *sizesStr, Vector<Size> &sizes)
|
||||
{
|
||||
if (sizesStr == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
char *sizeStartPtr = (char *)sizesStr;
|
||||
|
||||
while (true) {
|
||||
int width, height;
|
||||
int success = parse_pair(sizeStartPtr, &width, &height, 'x',
|
||||
&sizeStartPtr);
|
||||
if (success == -1 || (*sizeStartPtr != ',' && *sizeStartPtr != '\0')) {
|
||||
ALOGE("Picture sizes string \"%s\" contains invalid character.", sizesStr);
|
||||
return;
|
||||
}
|
||||
sizes.push(Size(width, height));
|
||||
|
||||
if (*sizeStartPtr == '\0') {
|
||||
return;
|
||||
}
|
||||
sizeStartPtr++;
|
||||
}
|
||||
}
|
||||
|
||||
void CameraParameters::setPreviewSize(int width, int height)
|
||||
{
|
||||
char str[32];
|
||||
sprintf(str, "%dx%d", width, height);
|
||||
set(KEY_PREVIEW_SIZE, str);
|
||||
}
|
||||
|
||||
void CameraParameters::getPreviewSize(int *width, int *height) const
|
||||
{
|
||||
*width = *height = -1;
|
||||
// Get the current string, if it doesn't exist, leave the -1x-1
|
||||
const char *p = get(KEY_PREVIEW_SIZE);
|
||||
if (p == 0) return;
|
||||
parse_pair(p, width, height, 'x');
|
||||
}
|
||||
|
||||
void CameraParameters::getPreferredPreviewSizeForVideo(int *width, int *height) const
|
||||
{
|
||||
*width = *height = -1;
|
||||
const char *p = get(KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO);
|
||||
if (p == 0) return;
|
||||
parse_pair(p, width, height, 'x');
|
||||
}
|
||||
|
||||
void CameraParameters::getSupportedPreviewSizes(Vector<Size> &sizes) const
|
||||
{
|
||||
const char *previewSizesStr = get(KEY_SUPPORTED_PREVIEW_SIZES);
|
||||
parseSizesList(previewSizesStr, sizes);
|
||||
}
|
||||
|
||||
void CameraParameters::setVideoSize(int width, int height)
|
||||
{
|
||||
char str[32];
|
||||
sprintf(str, "%dx%d", width, height);
|
||||
set(KEY_VIDEO_SIZE, str);
|
||||
}
|
||||
|
||||
void CameraParameters::getVideoSize(int *width, int *height) const
|
||||
{
|
||||
*width = *height = -1;
|
||||
const char *p = get(KEY_VIDEO_SIZE);
|
||||
if (p == 0) return;
|
||||
parse_pair(p, width, height, 'x');
|
||||
}
|
||||
|
||||
void CameraParameters::getSupportedVideoSizes(Vector<Size> &sizes) const
|
||||
{
|
||||
const char *videoSizesStr = get(KEY_SUPPORTED_VIDEO_SIZES);
|
||||
parseSizesList(videoSizesStr, sizes);
|
||||
}
|
||||
|
||||
void CameraParameters::setPreviewFrameRate(int fps)
|
||||
{
|
||||
set(KEY_PREVIEW_FRAME_RATE, fps);
|
||||
}
|
||||
|
||||
int CameraParameters::getPreviewFrameRate() const
|
||||
{
|
||||
return getInt(KEY_PREVIEW_FRAME_RATE);
|
||||
}
|
||||
|
||||
void CameraParameters::getPreviewFpsRange(int *min_fps, int *max_fps) const
|
||||
{
|
||||
*min_fps = *max_fps = -1;
|
||||
const char *p = get(KEY_PREVIEW_FPS_RANGE);
|
||||
if (p == 0) return;
|
||||
parse_pair(p, min_fps, max_fps, ',');
|
||||
}
|
||||
|
||||
void CameraParameters::setPreviewFormat(const char *format)
|
||||
{
|
||||
set(KEY_PREVIEW_FORMAT, format);
|
||||
}
|
||||
|
||||
const char *CameraParameters::getPreviewFormat() const
|
||||
{
|
||||
return get(KEY_PREVIEW_FORMAT);
|
||||
}
|
||||
|
||||
void CameraParameters::setPictureSize(int width, int height)
|
||||
{
|
||||
char str[32];
|
||||
sprintf(str, "%dx%d", width, height);
|
||||
set(KEY_PICTURE_SIZE, str);
|
||||
}
|
||||
|
||||
void CameraParameters::getPictureSize(int *width, int *height) const
|
||||
{
|
||||
*width = *height = -1;
|
||||
// Get the current string, if it doesn't exist, leave the -1x-1
|
||||
const char *p = get(KEY_PICTURE_SIZE);
|
||||
if (p == 0) return;
|
||||
parse_pair(p, width, height, 'x');
|
||||
}
|
||||
|
||||
void CameraParameters::getSupportedPictureSizes(Vector<Size> &sizes) const
|
||||
{
|
||||
const char *pictureSizesStr = get(KEY_SUPPORTED_PICTURE_SIZES);
|
||||
parseSizesList(pictureSizesStr, sizes);
|
||||
}
|
||||
|
||||
void CameraParameters::setPictureFormat(const char *format)
|
||||
{
|
||||
set(KEY_PICTURE_FORMAT, format);
|
||||
}
|
||||
|
||||
const char *CameraParameters::getPictureFormat() const
|
||||
{
|
||||
return get(KEY_PICTURE_FORMAT);
|
||||
}
|
||||
|
||||
void CameraParameters::dump() const
|
||||
{
|
||||
ALOGD("dump: mMap.size = %zu", mMap.size());
|
||||
for (size_t i = 0; i < mMap.size(); i++) {
|
||||
String8 k, v;
|
||||
k = mMap.keyAt(i);
|
||||
v = mMap.valueAt(i);
|
||||
ALOGD("%s: %s\n", k.string(), v.string());
|
||||
}
|
||||
}
|
||||
|
||||
status_t CameraParameters::dump(int fd, const Vector<String16>& /*args*/) const
|
||||
{
|
||||
const size_t SIZE = 256;
|
||||
char buffer[SIZE];
|
||||
String8 result;
|
||||
snprintf(buffer, 255, "CameraParameters::dump: mMap.size = %zu\n", mMap.size());
|
||||
result.append(buffer);
|
||||
for (size_t i = 0; i < mMap.size(); i++) {
|
||||
String8 k, v;
|
||||
k = mMap.keyAt(i);
|
||||
v = mMap.valueAt(i);
|
||||
snprintf(buffer, 255, "\t%s: %s\n", k.string(), v.string());
|
||||
result.append(buffer);
|
||||
}
|
||||
write(fd, result.string(), result.size());
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
void CameraParameters::getSupportedPreviewFormats(Vector<int>& formats) const {
|
||||
const char* supportedPreviewFormats =
|
||||
get(CameraParameters::KEY_SUPPORTED_PREVIEW_FORMATS);
|
||||
|
||||
if (supportedPreviewFormats == NULL) {
|
||||
ALOGW("%s: No supported preview formats.", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
String8 fmtStr(supportedPreviewFormats);
|
||||
char* prevFmts = fmtStr.lockBuffer(fmtStr.size());
|
||||
|
||||
char* savePtr;
|
||||
char* fmt = strtok_r(prevFmts, ",", &savePtr);
|
||||
while (fmt) {
|
||||
int actual = previewFormatToEnum(fmt);
|
||||
if (actual != -1) {
|
||||
formats.add(actual);
|
||||
}
|
||||
fmt = strtok_r(NULL, ",", &savePtr);
|
||||
}
|
||||
fmtStr.unlockBuffer(fmtStr.size());
|
||||
}
|
||||
|
||||
|
||||
int CameraParameters::previewFormatToEnum(const char* format) {
|
||||
return
|
||||
!format ?
|
||||
HAL_PIXEL_FORMAT_YCrCb_420_SP :
|
||||
!strcmp(format, PIXEL_FORMAT_YUV422SP) ?
|
||||
HAL_PIXEL_FORMAT_YCbCr_422_SP : // NV16
|
||||
!strcmp(format, PIXEL_FORMAT_YUV420SP) ?
|
||||
HAL_PIXEL_FORMAT_YCrCb_420_SP : // NV21
|
||||
!strcmp(format, PIXEL_FORMAT_YUV422I) ?
|
||||
HAL_PIXEL_FORMAT_YCbCr_422_I : // YUY2
|
||||
!strcmp(format, PIXEL_FORMAT_YUV420P) ?
|
||||
HAL_PIXEL_FORMAT_YV12 : // YV12
|
||||
!strcmp(format, PIXEL_FORMAT_RGB565) ?
|
||||
HAL_PIXEL_FORMAT_RGB_565 : // RGB565
|
||||
!strcmp(format, PIXEL_FORMAT_RGBA8888) ?
|
||||
HAL_PIXEL_FORMAT_RGBA_8888 : // RGB8888
|
||||
!strcmp(format, PIXEL_FORMAT_BAYER_RGGB) ?
|
||||
HAL_PIXEL_FORMAT_RAW16 : // Raw sensor data
|
||||
-1;
|
||||
}
|
||||
|
||||
bool CameraParameters::isEmpty() const {
|
||||
return mMap.isEmpty();
|
||||
}
|
||||
|
||||
}; // namespace android
|
||||
699
universal7885-common/libshims/CameraParameters.h
Normal file
699
universal7885-common/libshims/CameraParameters.h
Normal file
|
|
@ -0,0 +1,699 @@
|
|||
/*
|
||||
* Copyright (C) 2008 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.
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_HARDWARE_CAMERA_PARAMETERS_H
|
||||
#define ANDROID_HARDWARE_CAMERA_PARAMETERS_H
|
||||
|
||||
#include <utils/KeyedVector.h>
|
||||
#include <utils/String8.h>
|
||||
|
||||
namespace android {
|
||||
|
||||
struct Size {
|
||||
int width;
|
||||
int height;
|
||||
|
||||
Size() {
|
||||
width = 0;
|
||||
height = 0;
|
||||
}
|
||||
|
||||
Size(int w, int h) {
|
||||
width = w;
|
||||
height = h;
|
||||
}
|
||||
};
|
||||
|
||||
class CameraParameters
|
||||
{
|
||||
public:
|
||||
CameraParameters();
|
||||
CameraParameters(const String8 ¶ms) { unflatten(params); }
|
||||
~CameraParameters();
|
||||
|
||||
String8 flatten() const;
|
||||
void unflatten(const String8 ¶ms);
|
||||
|
||||
void set(const char *key, const char *value);
|
||||
void set(const char *key, int value);
|
||||
void setFloat(const char *key, float value);
|
||||
const char *get(const char *key) const;
|
||||
int getInt(const char *key) const;
|
||||
float getFloat(const char *key) const;
|
||||
|
||||
void remove(const char *key);
|
||||
|
||||
void setPreviewSize(int width, int height);
|
||||
void getPreviewSize(int *width, int *height) const;
|
||||
void getSupportedPreviewSizes(Vector<Size> &sizes) const;
|
||||
|
||||
// Set the dimensions in pixels to the given width and height
|
||||
// for video frames. The given width and height must be one
|
||||
// of the supported dimensions returned from
|
||||
// getSupportedVideoSizes(). Must not be called if
|
||||
// getSupportedVideoSizes() returns an empty Vector of Size.
|
||||
void setVideoSize(int width, int height);
|
||||
// Retrieve the current dimensions (width and height)
|
||||
// in pixels for video frames, which must be one of the
|
||||
// supported dimensions returned from getSupportedVideoSizes().
|
||||
// Must not be called if getSupportedVideoSizes() returns an
|
||||
// empty Vector of Size.
|
||||
void getVideoSize(int *width, int *height) const;
|
||||
// Retrieve a Vector of supported dimensions (width and height)
|
||||
// in pixels for video frames. If sizes returned from the method
|
||||
// is empty, the camera does not support calls to setVideoSize()
|
||||
// or getVideoSize(). In adddition, it also indicates that
|
||||
// the camera only has a single output, and does not have
|
||||
// separate output for video frames and preview frame.
|
||||
void getSupportedVideoSizes(Vector<Size> &sizes) const;
|
||||
// Retrieve the preferred preview size (width and height) in pixels
|
||||
// for video recording. The given width and height must be one of
|
||||
// supported preview sizes returned from getSupportedPreviewSizes().
|
||||
// Must not be called if getSupportedVideoSizes() returns an empty
|
||||
// Vector of Size. If getSupportedVideoSizes() returns an empty
|
||||
// Vector of Size, the width and height returned from this method
|
||||
// is invalid, and is "-1x-1".
|
||||
void getPreferredPreviewSizeForVideo(int *width, int *height) const;
|
||||
|
||||
void setPreviewFrameRate(int fps);
|
||||
int getPreviewFrameRate() const;
|
||||
void getPreviewFpsRange(int *min_fps, int *max_fps) const;
|
||||
void setPreviewFormat(const char *format);
|
||||
const char *getPreviewFormat() const;
|
||||
void setPictureSize(int width, int height);
|
||||
void getPictureSize(int *width, int *height) const;
|
||||
void getSupportedPictureSizes(Vector<Size> &sizes) const;
|
||||
void setPictureFormat(const char *format);
|
||||
const char *getPictureFormat() const;
|
||||
|
||||
void dump() const;
|
||||
status_t dump(int fd, const Vector<String16>& args) const;
|
||||
|
||||
/**
|
||||
* Returns a Vector containing the supported preview formats
|
||||
* as enums given in graphics.h.
|
||||
*/
|
||||
void getSupportedPreviewFormats(Vector<int>& formats) const;
|
||||
|
||||
// Returns true if no keys are present
|
||||
bool isEmpty() const;
|
||||
|
||||
// Parameter keys to communicate between camera application and driver.
|
||||
// The access (read/write, read only, or write only) is viewed from the
|
||||
// perspective of applications, not driver.
|
||||
|
||||
// Preview frame size in pixels (width x height).
|
||||
// Example value: "480x320". Read/Write.
|
||||
static const char KEY_PREVIEW_SIZE[];
|
||||
// Supported preview frame sizes in pixels.
|
||||
// Example value: "800x600,480x320". Read only.
|
||||
static const char KEY_SUPPORTED_PREVIEW_SIZES[];
|
||||
// The current minimum and maximum preview fps. This controls the rate of
|
||||
// preview frames received (CAMERA_MSG_PREVIEW_FRAME). The minimum and
|
||||
// maximum fps must be one of the elements from
|
||||
// KEY_SUPPORTED_PREVIEW_FPS_RANGE parameter.
|
||||
// Example value: "10500,26623"
|
||||
static const char KEY_PREVIEW_FPS_RANGE[];
|
||||
// The supported preview fps (frame-per-second) ranges. Each range contains
|
||||
// a minimum fps and maximum fps. If minimum fps equals to maximum fps, the
|
||||
// camera outputs frames in fixed frame rate. If not, the camera outputs
|
||||
// frames in auto frame rate. The actual frame rate fluctuates between the
|
||||
// minimum and the maximum. The list has at least one element. The list is
|
||||
// sorted from small to large (first by maximum fps and then minimum fps).
|
||||
// Example value: "(10500,26623),(15000,26623),(30000,30000)"
|
||||
static const char KEY_SUPPORTED_PREVIEW_FPS_RANGE[];
|
||||
// The image format for preview frames. See CAMERA_MSG_PREVIEW_FRAME in
|
||||
// frameworks/av/include/camera/Camera.h. The default is
|
||||
// PIXEL_FORMAT_YUV420SP. Example value: "yuv420sp" or PIXEL_FORMAT_XXX
|
||||
// constants. Read/write.
|
||||
static const char KEY_PREVIEW_FORMAT[];
|
||||
// Supported image formats for preview frames.
|
||||
// Example value: "yuv420sp,yuv422i-yuyv". Read only.
|
||||
static const char KEY_SUPPORTED_PREVIEW_FORMATS[];
|
||||
// Number of preview frames per second. This is the target frame rate. The
|
||||
// actual frame rate depends on the driver.
|
||||
// Example value: "15". Read/write.
|
||||
static const char KEY_PREVIEW_FRAME_RATE[];
|
||||
// Supported number of preview frames per second.
|
||||
// Example value: "24,15,10". Read.
|
||||
static const char KEY_SUPPORTED_PREVIEW_FRAME_RATES[];
|
||||
// The dimensions for captured pictures in pixels (width x height).
|
||||
// Example value: "1024x768". Read/write.
|
||||
static const char KEY_PICTURE_SIZE[];
|
||||
// Supported dimensions for captured pictures in pixels.
|
||||
// Example value: "2048x1536,1024x768". Read only.
|
||||
static const char KEY_SUPPORTED_PICTURE_SIZES[];
|
||||
// The image format for captured pictures. See CAMERA_MSG_COMPRESSED_IMAGE
|
||||
// in frameworks/base/include/camera/Camera.h.
|
||||
// Example value: "jpeg" or PIXEL_FORMAT_XXX constants. Read/write.
|
||||
static const char KEY_PICTURE_FORMAT[];
|
||||
// Supported image formats for captured pictures.
|
||||
// Example value: "jpeg,rgb565". Read only.
|
||||
static const char KEY_SUPPORTED_PICTURE_FORMATS[];
|
||||
// The width (in pixels) of EXIF thumbnail in Jpeg picture.
|
||||
// Example value: "512". Read/write.
|
||||
static const char KEY_JPEG_THUMBNAIL_WIDTH[];
|
||||
// The height (in pixels) of EXIF thumbnail in Jpeg picture.
|
||||
// Example value: "384". Read/write.
|
||||
static const char KEY_JPEG_THUMBNAIL_HEIGHT[];
|
||||
// Supported EXIF thumbnail sizes (width x height). 0x0 means not thumbnail
|
||||
// in EXIF.
|
||||
// Example value: "512x384,320x240,0x0". Read only.
|
||||
static const char KEY_SUPPORTED_JPEG_THUMBNAIL_SIZES[];
|
||||
// The quality of the EXIF thumbnail in Jpeg picture. The range is 1 to 100,
|
||||
// with 100 being the best.
|
||||
// Example value: "90". Read/write.
|
||||
static const char KEY_JPEG_THUMBNAIL_QUALITY[];
|
||||
// Jpeg quality of captured picture. The range is 1 to 100, with 100 being
|
||||
// the best.
|
||||
// Example value: "90". Read/write.
|
||||
static const char KEY_JPEG_QUALITY[];
|
||||
// The rotation angle in degrees relative to the orientation of the camera.
|
||||
// This affects the pictures returned from CAMERA_MSG_COMPRESSED_IMAGE. The
|
||||
// camera driver may set orientation in the EXIF header without rotating the
|
||||
// picture. Or the driver may rotate the picture and the EXIF thumbnail. If
|
||||
// the Jpeg picture is rotated, the orientation in the EXIF header will be
|
||||
// missing or 1 (row #0 is top and column #0 is left side).
|
||||
//
|
||||
// Note that the JPEG pictures of front-facing cameras are not mirrored
|
||||
// as in preview display.
|
||||
//
|
||||
// For example, suppose the natural orientation of the device is portrait.
|
||||
// The device is rotated 270 degrees clockwise, so the device orientation is
|
||||
// 270. Suppose a back-facing camera sensor is mounted in landscape and the
|
||||
// top side of the camera sensor is aligned with the right edge of the
|
||||
// display in natural orientation. So the camera orientation is 90. The
|
||||
// rotation should be set to 0 (270 + 90).
|
||||
//
|
||||
// Example value: "0" or "90" or "180" or "270". Write only.
|
||||
static const char KEY_ROTATION[];
|
||||
// GPS latitude coordinate. GPSLatitude and GPSLatitudeRef will be stored in
|
||||
// JPEG EXIF header.
|
||||
// Example value: "25.032146" or "-33.462809". Write only.
|
||||
static const char KEY_GPS_LATITUDE[];
|
||||
// GPS longitude coordinate. GPSLongitude and GPSLongitudeRef will be stored
|
||||
// in JPEG EXIF header.
|
||||
// Example value: "121.564448" or "-70.660286". Write only.
|
||||
static const char KEY_GPS_LONGITUDE[];
|
||||
// GPS altitude. GPSAltitude and GPSAltitudeRef will be stored in JPEG EXIF
|
||||
// header.
|
||||
// Example value: "21.0" or "-5". Write only.
|
||||
static const char KEY_GPS_ALTITUDE[];
|
||||
// GPS timestamp (UTC in seconds since January 1, 1970). This should be
|
||||
// stored in JPEG EXIF header.
|
||||
// Example value: "1251192757". Write only.
|
||||
static const char KEY_GPS_TIMESTAMP[];
|
||||
// GPS Processing Method
|
||||
// Example value: "GPS" or "NETWORK". Write only.
|
||||
static const char KEY_GPS_PROCESSING_METHOD[];
|
||||
// Current white balance setting.
|
||||
// Example value: "auto" or WHITE_BALANCE_XXX constants. Read/write.
|
||||
static const char KEY_WHITE_BALANCE[];
|
||||
// Supported white balance settings.
|
||||
// Example value: "auto,incandescent,daylight". Read only.
|
||||
static const char KEY_SUPPORTED_WHITE_BALANCE[];
|
||||
// Current color effect setting.
|
||||
// Example value: "none" or EFFECT_XXX constants. Read/write.
|
||||
static const char KEY_EFFECT[];
|
||||
// Supported color effect settings.
|
||||
// Example value: "none,mono,sepia". Read only.
|
||||
static const char KEY_SUPPORTED_EFFECTS[];
|
||||
// Current antibanding setting.
|
||||
// Example value: "auto" or ANTIBANDING_XXX constants. Read/write.
|
||||
static const char KEY_ANTIBANDING[];
|
||||
// Supported antibanding settings.
|
||||
// Example value: "auto,50hz,60hz,off". Read only.
|
||||
static const char KEY_SUPPORTED_ANTIBANDING[];
|
||||
// Current scene mode.
|
||||
// Example value: "auto" or SCENE_MODE_XXX constants. Read/write.
|
||||
static const char KEY_SCENE_MODE[];
|
||||
// Supported scene mode settings.
|
||||
// Example value: "auto,night,fireworks". Read only.
|
||||
static const char KEY_SUPPORTED_SCENE_MODES[];
|
||||
// Current flash mode.
|
||||
// Example value: "auto" or FLASH_MODE_XXX constants. Read/write.
|
||||
static const char KEY_FLASH_MODE[];
|
||||
// Supported flash modes.
|
||||
// Example value: "auto,on,off". Read only.
|
||||
static const char KEY_SUPPORTED_FLASH_MODES[];
|
||||
// Current focus mode. This will not be empty. Applications should call
|
||||
// CameraHardwareInterface.autoFocus to start the focus if focus mode is
|
||||
// FOCUS_MODE_AUTO or FOCUS_MODE_MACRO.
|
||||
// Example value: "auto" or FOCUS_MODE_XXX constants. Read/write.
|
||||
static const char KEY_FOCUS_MODE[];
|
||||
// Supported focus modes.
|
||||
// Example value: "auto,macro,fixed". Read only.
|
||||
static const char KEY_SUPPORTED_FOCUS_MODES[];
|
||||
// The maximum number of focus areas supported. This is the maximum length
|
||||
// of KEY_FOCUS_AREAS.
|
||||
// Example value: "0" or "2". Read only.
|
||||
static const char KEY_MAX_NUM_FOCUS_AREAS[];
|
||||
// Current focus areas.
|
||||
//
|
||||
// Before accessing this parameter, apps should check
|
||||
// KEY_MAX_NUM_FOCUS_AREAS first to know the maximum number of focus areas
|
||||
// first. If the value is 0, focus area is not supported.
|
||||
//
|
||||
// Each focus area is a five-element int array. The first four elements are
|
||||
// the rectangle of the area (left, top, right, bottom). The direction is
|
||||
// relative to the sensor orientation, that is, what the sensor sees. The
|
||||
// direction is not affected by the rotation or mirroring of
|
||||
// CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates range from -1000 to 1000.
|
||||
// (-1000,-1000) is the upper left point. (1000, 1000) is the lower right
|
||||
// point. The width and height of focus areas cannot be 0 or negative.
|
||||
//
|
||||
// The fifth element is the weight. Values for weight must range from 1 to
|
||||
// 1000. The weight should be interpreted as a per-pixel weight - all
|
||||
// pixels in the area have the specified weight. This means a small area
|
||||
// with the same weight as a larger area will have less influence on the
|
||||
// focusing than the larger area. Focus areas can partially overlap and the
|
||||
// driver will add the weights in the overlap region.
|
||||
//
|
||||
// A special case of single focus area (0,0,0,0,0) means driver to decide
|
||||
// the focus area. For example, the driver may use more signals to decide
|
||||
// focus areas and change them dynamically. Apps can set (0,0,0,0,0) if they
|
||||
// want the driver to decide focus areas.
|
||||
//
|
||||
// Focus areas are relative to the current field of view (KEY_ZOOM). No
|
||||
// matter what the zoom level is, (-1000,-1000) represents the top of the
|
||||
// currently visible camera frame. The focus area cannot be set to be
|
||||
// outside the current field of view, even when using zoom.
|
||||
//
|
||||
// Focus area only has effect if the current focus mode is FOCUS_MODE_AUTO,
|
||||
// FOCUS_MODE_MACRO, FOCUS_MODE_CONTINUOUS_VIDEO, or
|
||||
// FOCUS_MODE_CONTINUOUS_PICTURE.
|
||||
// Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write.
|
||||
static const char KEY_FOCUS_AREAS[];
|
||||
// Focal length in millimeter.
|
||||
// Example value: "4.31". Read only.
|
||||
static const char KEY_FOCAL_LENGTH[];
|
||||
// Horizontal angle of view in degrees.
|
||||
// Example value: "54.8". Read only.
|
||||
static const char KEY_HORIZONTAL_VIEW_ANGLE[];
|
||||
// Vertical angle of view in degrees.
|
||||
// Example value: "42.5". Read only.
|
||||
static const char KEY_VERTICAL_VIEW_ANGLE[];
|
||||
// Exposure compensation index. 0 means exposure is not adjusted.
|
||||
// Example value: "-5" or "5". Read/write.
|
||||
static const char KEY_EXPOSURE_COMPENSATION[];
|
||||
// The maximum exposure compensation index (>=0).
|
||||
// Example value: "6". Read only.
|
||||
static const char KEY_MAX_EXPOSURE_COMPENSATION[];
|
||||
// The minimum exposure compensation index (<=0).
|
||||
// Example value: "-6". Read only.
|
||||
static const char KEY_MIN_EXPOSURE_COMPENSATION[];
|
||||
// The exposure compensation step. Exposure compensation index multiply by
|
||||
// step eqals to EV. Ex: if exposure compensation index is -6 and step is
|
||||
// 0.3333, EV is -2.
|
||||
// Example value: "0.333333333" or "0.5". Read only.
|
||||
static const char KEY_EXPOSURE_COMPENSATION_STEP[];
|
||||
// The state of the auto-exposure lock. "true" means that
|
||||
// auto-exposure is locked to its current value and will not
|
||||
// change. "false" means the auto-exposure routine is free to
|
||||
// change exposure values. If auto-exposure is already locked,
|
||||
// setting this to true again has no effect (the driver will not
|
||||
// recalculate exposure values). Changing exposure compensation
|
||||
// settings will still affect the exposure settings while
|
||||
// auto-exposure is locked. Stopping preview or taking a still
|
||||
// image will not change the lock. In conjunction with
|
||||
// exposure compensation, this allows for capturing multi-exposure
|
||||
// brackets with known relative exposure values. Locking
|
||||
// auto-exposure after open but before the first call to
|
||||
// startPreview may result in severely over- or under-exposed
|
||||
// images. The driver will not change the AE lock after
|
||||
// auto-focus completes.
|
||||
static const char KEY_AUTO_EXPOSURE_LOCK[];
|
||||
// Whether locking the auto-exposure is supported. "true" means it is, and
|
||||
// "false" or this key not existing means it is not supported.
|
||||
static const char KEY_AUTO_EXPOSURE_LOCK_SUPPORTED[];
|
||||
// The state of the auto-white balance lock. "true" means that
|
||||
// auto-white balance is locked to its current value and will not
|
||||
// change. "false" means the auto-white balance routine is free to
|
||||
// change white balance values. If auto-white balance is already
|
||||
// locked, setting this to true again has no effect (the driver
|
||||
// will not recalculate white balance values). Stopping preview or
|
||||
// taking a still image will not change the lock. In conjunction
|
||||
// with exposure compensation, this allows for capturing
|
||||
// multi-exposure brackets with fixed white balance. Locking
|
||||
// auto-white balance after open but before the first call to
|
||||
// startPreview may result in severely incorrect color. The
|
||||
// driver will not change the AWB lock after auto-focus
|
||||
// completes.
|
||||
static const char KEY_AUTO_WHITEBALANCE_LOCK[];
|
||||
// Whether locking the auto-white balance is supported. "true"
|
||||
// means it is, and "false" or this key not existing means it is
|
||||
// not supported.
|
||||
static const char KEY_AUTO_WHITEBALANCE_LOCK_SUPPORTED[];
|
||||
|
||||
// The maximum number of metering areas supported. This is the maximum
|
||||
// length of KEY_METERING_AREAS.
|
||||
// Example value: "0" or "2". Read only.
|
||||
static const char KEY_MAX_NUM_METERING_AREAS[];
|
||||
// Current metering areas. Camera driver uses these areas to decide
|
||||
// exposure.
|
||||
//
|
||||
// Before accessing this parameter, apps should check
|
||||
// KEY_MAX_NUM_METERING_AREAS first to know the maximum number of metering
|
||||
// areas first. If the value is 0, metering area is not supported.
|
||||
//
|
||||
// Each metering area is a rectangle with specified weight. The direction is
|
||||
// relative to the sensor orientation, that is, what the sensor sees. The
|
||||
// direction is not affected by the rotation or mirroring of
|
||||
// CAMERA_CMD_SET_DISPLAY_ORIENTATION. Coordinates of the rectangle range
|
||||
// from -1000 to 1000. (-1000, -1000) is the upper left point. (1000, 1000)
|
||||
// is the lower right point. The width and height of metering areas cannot
|
||||
// be 0 or negative.
|
||||
//
|
||||
// The fifth element is the weight. Values for weight must range from 1 to
|
||||
// 1000. The weight should be interpreted as a per-pixel weight - all
|
||||
// pixels in the area have the specified weight. This means a small area
|
||||
// with the same weight as a larger area will have less influence on the
|
||||
// metering than the larger area. Metering areas can partially overlap and
|
||||
// the driver will add the weights in the overlap region.
|
||||
//
|
||||
// A special case of all-zero single metering area means driver to decide
|
||||
// the metering area. For example, the driver may use more signals to decide
|
||||
// metering areas and change them dynamically. Apps can set all-zero if they
|
||||
// want the driver to decide metering areas.
|
||||
//
|
||||
// Metering areas are relative to the current field of view (KEY_ZOOM).
|
||||
// No matter what the zoom level is, (-1000,-1000) represents the top of the
|
||||
// currently visible camera frame. The metering area cannot be set to be
|
||||
// outside the current field of view, even when using zoom.
|
||||
//
|
||||
// No matter what metering areas are, the final exposure are compensated
|
||||
// by KEY_EXPOSURE_COMPENSATION.
|
||||
// Example value: "(-10,-10,0,0,300),(0,0,10,10,700)". Read/write.
|
||||
static const char KEY_METERING_AREAS[];
|
||||
// Current zoom value.
|
||||
// Example value: "0" or "6". Read/write.
|
||||
static const char KEY_ZOOM[];
|
||||
// Maximum zoom value.
|
||||
// Example value: "6". Read only.
|
||||
static const char KEY_MAX_ZOOM[];
|
||||
// The zoom ratios of all zoom values. The zoom ratio is in 1/100
|
||||
// increments. Ex: a zoom of 3.2x is returned as 320. The number of list
|
||||
// elements is KEY_MAX_ZOOM + 1. The first element is always 100. The last
|
||||
// element is the zoom ratio of zoom value KEY_MAX_ZOOM.
|
||||
// Example value: "100,150,200,250,300,350,400". Read only.
|
||||
static const char KEY_ZOOM_RATIOS[];
|
||||
// Whether zoom is supported. Zoom is supported if the value is "true". Zoom
|
||||
// is not supported if the value is not "true" or the key does not exist.
|
||||
// Example value: "true". Read only.
|
||||
static const char KEY_ZOOM_SUPPORTED[];
|
||||
// Whether if smooth zoom is supported. Smooth zoom is supported if the
|
||||
// value is "true". It is not supported if the value is not "true" or the
|
||||
// key does not exist.
|
||||
// See CAMERA_CMD_START_SMOOTH_ZOOM, CAMERA_CMD_STOP_SMOOTH_ZOOM, and
|
||||
// CAMERA_MSG_ZOOM in frameworks/base/include/camera/Camera.h.
|
||||
// Example value: "true". Read only.
|
||||
static const char KEY_SMOOTH_ZOOM_SUPPORTED[];
|
||||
|
||||
// The distances (in meters) from the camera to where an object appears to
|
||||
// be in focus. The object is sharpest at the optimal focus distance. The
|
||||
// depth of field is the far focus distance minus near focus distance.
|
||||
//
|
||||
// Focus distances may change after starting auto focus, canceling auto
|
||||
// focus, or starting the preview. Applications can read this anytime to get
|
||||
// the latest focus distances. If the focus mode is FOCUS_MODE_CONTINUOUS,
|
||||
// focus distances may change from time to time.
|
||||
//
|
||||
// This is intended to estimate the distance between the camera and the
|
||||
// subject. After autofocus, the subject distance may be within near and far
|
||||
// focus distance. However, the precision depends on the camera hardware,
|
||||
// autofocus algorithm, the focus area, and the scene. The error can be
|
||||
// large and it should be only used as a reference.
|
||||
//
|
||||
// Far focus distance > optimal focus distance > near focus distance. If
|
||||
// the far focus distance is infinity, the value should be "Infinity" (case
|
||||
// sensitive). The format is three float values separated by commas. The
|
||||
// first is near focus distance. The second is optimal focus distance. The
|
||||
// third is far focus distance.
|
||||
// Example value: "0.95,1.9,Infinity" or "0.049,0.05,0.051". Read only.
|
||||
static const char KEY_FOCUS_DISTANCES[];
|
||||
|
||||
// The current dimensions in pixels (width x height) for video frames.
|
||||
// The width and height must be one of the supported sizes retrieved
|
||||
// via KEY_SUPPORTED_VIDEO_SIZES.
|
||||
// Example value: "1280x720". Read/write.
|
||||
static const char KEY_VIDEO_SIZE[];
|
||||
// A list of the supported dimensions in pixels (width x height)
|
||||
// for video frames. See CAMERA_MSG_VIDEO_FRAME for details in
|
||||
// frameworks/base/include/camera/Camera.h.
|
||||
// Example: "176x144,1280x720". Read only.
|
||||
static const char KEY_SUPPORTED_VIDEO_SIZES[];
|
||||
|
||||
// The maximum number of detected faces supported by hardware face
|
||||
// detection. If the value is 0, hardware face detection is not supported.
|
||||
// Example: "5". Read only
|
||||
static const char KEY_MAX_NUM_DETECTED_FACES_HW[];
|
||||
|
||||
// The maximum number of detected faces supported by software face
|
||||
// detection. If the value is 0, software face detection is not supported.
|
||||
// Example: "5". Read only
|
||||
static const char KEY_MAX_NUM_DETECTED_FACES_SW[];
|
||||
|
||||
// Preferred preview frame size in pixels for video recording.
|
||||
// The width and height must be one of the supported sizes retrieved
|
||||
// via KEY_SUPPORTED_PREVIEW_SIZES. This key can be used only when
|
||||
// getSupportedVideoSizes() does not return an empty Vector of Size.
|
||||
// Camcorder applications are recommended to set the preview size
|
||||
// to a value that is not larger than the preferred preview size.
|
||||
// In other words, the product of the width and height of the
|
||||
// preview size should not be larger than that of the preferred
|
||||
// preview size. In addition, we recommend to choos a preview size
|
||||
// that has the same aspect ratio as the resolution of video to be
|
||||
// recorded.
|
||||
// Example value: "800x600". Read only.
|
||||
static const char KEY_PREFERRED_PREVIEW_SIZE_FOR_VIDEO[];
|
||||
|
||||
// The image format for video frames. See CAMERA_MSG_VIDEO_FRAME in
|
||||
// frameworks/base/include/camera/Camera.h.
|
||||
// Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only.
|
||||
static const char KEY_VIDEO_FRAME_FORMAT[];
|
||||
|
||||
// Sets the hint of the recording mode. If this is true, MediaRecorder.start
|
||||
// may be faster or has less glitches. This should be called before starting
|
||||
// the preview for the best result. But it is allowed to change the hint
|
||||
// while the preview is active. The default value is false.
|
||||
//
|
||||
// The apps can still call Camera.takePicture when the hint is true. The
|
||||
// apps can call MediaRecorder.start when the hint is false. But the
|
||||
// performance may be worse.
|
||||
// Example value: "true" or "false". Read/write.
|
||||
static const char KEY_RECORDING_HINT[];
|
||||
|
||||
// Returns true if video snapshot is supported. That is, applications
|
||||
// can call Camera.takePicture during recording. Applications do not need to
|
||||
// call Camera.startPreview after taking a picture. The preview will be
|
||||
// still active. Other than that, taking a picture during recording is
|
||||
// identical to taking a picture normally. All settings and methods related
|
||||
// to takePicture work identically. Ex: KEY_PICTURE_SIZE,
|
||||
// KEY_SUPPORTED_PICTURE_SIZES, KEY_JPEG_QUALITY, KEY_ROTATION, and etc.
|
||||
// The picture will have an EXIF header. FLASH_MODE_AUTO and FLASH_MODE_ON
|
||||
// also still work, but the video will record the flash.
|
||||
//
|
||||
// Applications can set shutter callback as null to avoid the shutter
|
||||
// sound. It is also recommended to set raw picture and post view callbacks
|
||||
// to null to avoid the interrupt of preview display.
|
||||
//
|
||||
// Field-of-view of the recorded video may be different from that of the
|
||||
// captured pictures.
|
||||
// Example value: "true" or "false". Read only.
|
||||
static const char KEY_VIDEO_SNAPSHOT_SUPPORTED[];
|
||||
|
||||
// The state of the video stabilization. If set to true, both the
|
||||
// preview stream and the recorded video stream are stabilized by
|
||||
// the camera. Only valid to set if KEY_VIDEO_STABILIZATION_SUPPORTED is
|
||||
// set to true.
|
||||
//
|
||||
// The value of this key can be changed any time the camera is
|
||||
// open. If preview or recording is active, it is acceptable for
|
||||
// there to be a slight video glitch when video stabilization is
|
||||
// toggled on and off.
|
||||
//
|
||||
// This only stabilizes video streams (between-frames stabilization), and
|
||||
// has no effect on still image capture.
|
||||
static const char KEY_VIDEO_STABILIZATION[];
|
||||
|
||||
// Returns true if video stabilization is supported. That is, applications
|
||||
// can set KEY_VIDEO_STABILIZATION to true and have a stabilized preview
|
||||
// stream and record stabilized videos.
|
||||
static const char KEY_VIDEO_STABILIZATION_SUPPORTED[];
|
||||
|
||||
// Supported modes for special effects with light.
|
||||
// Example values: "lowlight,hdr".
|
||||
static const char KEY_LIGHTFX[];
|
||||
|
||||
// Value for KEY_ZOOM_SUPPORTED or KEY_SMOOTH_ZOOM_SUPPORTED.
|
||||
static const char TRUE[];
|
||||
static const char FALSE[];
|
||||
|
||||
// Value for KEY_FOCUS_DISTANCES.
|
||||
static const char FOCUS_DISTANCE_INFINITY[];
|
||||
|
||||
// Values for white balance settings.
|
||||
static const char WHITE_BALANCE_AUTO[];
|
||||
static const char WHITE_BALANCE_INCANDESCENT[];
|
||||
static const char WHITE_BALANCE_FLUORESCENT[];
|
||||
static const char WHITE_BALANCE_WARM_FLUORESCENT[];
|
||||
static const char WHITE_BALANCE_DAYLIGHT[];
|
||||
static const char WHITE_BALANCE_CLOUDY_DAYLIGHT[];
|
||||
static const char WHITE_BALANCE_TWILIGHT[];
|
||||
static const char WHITE_BALANCE_SHADE[];
|
||||
|
||||
// Values for effect settings.
|
||||
static const char EFFECT_NONE[];
|
||||
static const char EFFECT_MONO[];
|
||||
static const char EFFECT_NEGATIVE[];
|
||||
static const char EFFECT_SOLARIZE[];
|
||||
static const char EFFECT_SEPIA[];
|
||||
static const char EFFECT_POSTERIZE[];
|
||||
static const char EFFECT_WHITEBOARD[];
|
||||
static const char EFFECT_BLACKBOARD[];
|
||||
static const char EFFECT_AQUA[];
|
||||
|
||||
// Values for antibanding settings.
|
||||
static const char ANTIBANDING_AUTO[];
|
||||
static const char ANTIBANDING_50HZ[];
|
||||
static const char ANTIBANDING_60HZ[];
|
||||
static const char ANTIBANDING_OFF[];
|
||||
|
||||
// Values for flash mode settings.
|
||||
// Flash will not be fired.
|
||||
static const char FLASH_MODE_OFF[];
|
||||
// Flash will be fired automatically when required. The flash may be fired
|
||||
// during preview, auto-focus, or snapshot depending on the driver.
|
||||
static const char FLASH_MODE_AUTO[];
|
||||
// Flash will always be fired during snapshot. The flash may also be
|
||||
// fired during preview or auto-focus depending on the driver.
|
||||
static const char FLASH_MODE_ON[];
|
||||
// Flash will be fired in red-eye reduction mode.
|
||||
static const char FLASH_MODE_RED_EYE[];
|
||||
// Constant emission of light during preview, auto-focus and snapshot.
|
||||
// This can also be used for video recording.
|
||||
static const char FLASH_MODE_TORCH[];
|
||||
|
||||
// Values for scene mode settings.
|
||||
static const char SCENE_MODE_AUTO[];
|
||||
static const char SCENE_MODE_ACTION[];
|
||||
static const char SCENE_MODE_PORTRAIT[];
|
||||
static const char SCENE_MODE_LANDSCAPE[];
|
||||
static const char SCENE_MODE_NIGHT[];
|
||||
static const char SCENE_MODE_NIGHT_PORTRAIT[];
|
||||
static const char SCENE_MODE_THEATRE[];
|
||||
static const char SCENE_MODE_BEACH[];
|
||||
static const char SCENE_MODE_SNOW[];
|
||||
static const char SCENE_MODE_SUNSET[];
|
||||
static const char SCENE_MODE_STEADYPHOTO[];
|
||||
static const char SCENE_MODE_FIREWORKS[];
|
||||
static const char SCENE_MODE_SPORTS[];
|
||||
static const char SCENE_MODE_PARTY[];
|
||||
static const char SCENE_MODE_CANDLELIGHT[];
|
||||
// Applications are looking for a barcode. Camera driver will be optimized
|
||||
// for barcode reading.
|
||||
static const char SCENE_MODE_BARCODE[];
|
||||
// A high-dynamic range mode. In this mode, the HAL module will use a
|
||||
// capture strategy that extends the dynamic range of the captured
|
||||
// image in some fashion. Only the final image is returned.
|
||||
static const char SCENE_MODE_HDR[];
|
||||
|
||||
// Pixel color formats for KEY_PREVIEW_FORMAT, KEY_PICTURE_FORMAT,
|
||||
// and KEY_VIDEO_FRAME_FORMAT
|
||||
static const char PIXEL_FORMAT_YUV422SP[];
|
||||
static const char PIXEL_FORMAT_YUV420SP[]; // NV21
|
||||
static const char PIXEL_FORMAT_YUV422I[]; // YUY2
|
||||
static const char PIXEL_FORMAT_YUV420P[]; // YV12
|
||||
static const char PIXEL_FORMAT_RGB565[];
|
||||
static const char PIXEL_FORMAT_RGBA8888[];
|
||||
static const char PIXEL_FORMAT_JPEG[];
|
||||
// Raw bayer format used for images, which is 10 bit precision samples
|
||||
// stored in 16 bit words. The filter pattern is RGGB.
|
||||
static const char PIXEL_FORMAT_BAYER_RGGB[];
|
||||
// Pixel format is not known to the framework
|
||||
static const char PIXEL_FORMAT_ANDROID_OPAQUE[];
|
||||
|
||||
// Values for focus mode settings.
|
||||
// Auto-focus mode. Applications should call
|
||||
// CameraHardwareInterface.autoFocus to start the focus in this mode.
|
||||
static const char FOCUS_MODE_AUTO[];
|
||||
// Focus is set at infinity. Applications should not call
|
||||
// CameraHardwareInterface.autoFocus in this mode.
|
||||
static const char FOCUS_MODE_INFINITY[];
|
||||
// Macro (close-up) focus mode. Applications should call
|
||||
// CameraHardwareInterface.autoFocus to start the focus in this mode.
|
||||
static const char FOCUS_MODE_MACRO[];
|
||||
// Focus is fixed. The camera is always in this mode if the focus is not
|
||||
// adjustable. If the camera has auto-focus, this mode can fix the
|
||||
// focus, which is usually at hyperfocal distance. Applications should
|
||||
// not call CameraHardwareInterface.autoFocus in this mode.
|
||||
static const char FOCUS_MODE_FIXED[];
|
||||
// Extended depth of field (EDOF). Focusing is done digitally and
|
||||
// continuously. Applications should not call
|
||||
// CameraHardwareInterface.autoFocus in this mode.
|
||||
static const char FOCUS_MODE_EDOF[];
|
||||
// Continuous auto focus mode intended for video recording. The camera
|
||||
// continuously tries to focus. This is the best choice for video
|
||||
// recording because the focus changes smoothly . Applications still can
|
||||
// call CameraHardwareInterface.takePicture in this mode but the subject may
|
||||
// not be in focus. Auto focus starts when the parameter is set.
|
||||
//
|
||||
// Applications can call CameraHardwareInterface.autoFocus in this mode. The
|
||||
// focus callback will immediately return with a boolean that indicates
|
||||
// whether the focus is sharp or not. The focus position is locked after
|
||||
// autoFocus call. If applications want to resume the continuous focus,
|
||||
// cancelAutoFocus must be called. Restarting the preview will not resume
|
||||
// the continuous autofocus. To stop continuous focus, applications should
|
||||
// change the focus mode to other modes.
|
||||
static const char FOCUS_MODE_CONTINUOUS_VIDEO[];
|
||||
// Continuous auto focus mode intended for taking pictures. The camera
|
||||
// continuously tries to focus. The speed of focus change is more aggressive
|
||||
// than FOCUS_MODE_CONTINUOUS_VIDEO. Auto focus starts when the parameter is
|
||||
// set.
|
||||
//
|
||||
// Applications can call CameraHardwareInterface.autoFocus in this mode. If
|
||||
// the autofocus is in the middle of scanning, the focus callback will
|
||||
// return when it completes. If the autofocus is not scanning, focus
|
||||
// callback will immediately return with a boolean that indicates whether
|
||||
// the focus is sharp or not. The apps can then decide if they want to take
|
||||
// a picture immediately or to change the focus mode to auto, and run a full
|
||||
// autofocus cycle. The focus position is locked after autoFocus call. If
|
||||
// applications want to resume the continuous focus, cancelAutoFocus must be
|
||||
// called. Restarting the preview will not resume the continuous autofocus.
|
||||
// To stop continuous focus, applications should change the focus mode to
|
||||
// other modes.
|
||||
static const char FOCUS_MODE_CONTINUOUS_PICTURE[];
|
||||
|
||||
// Values for light special effects
|
||||
// Low-light enhancement mode
|
||||
static const char LIGHTFX_LOWLIGHT[];
|
||||
// High-dynamic range mode
|
||||
static const char LIGHTFX_HDR[];
|
||||
|
||||
/**
|
||||
* Returns the the supported preview formats as an enum given in graphics.h
|
||||
* corrsponding to the format given in the input string or -1 if no such
|
||||
* conversion exists.
|
||||
*/
|
||||
static int previewFormatToEnum(const char* format);
|
||||
|
||||
private:
|
||||
DefaultKeyedVector<String8,String8> mMap;
|
||||
};
|
||||
|
||||
}; // namespace
|
||||
|
||||
#endif
|
||||
30
universal7885-common/lineage.dependencies
Normal file
30
universal7885-common/lineage.dependencies
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
[
|
||||
{
|
||||
"repository": "android_device_samsung_slsi_sepolicy",
|
||||
"target_path": "device/samsung_slsi/sepolicy"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_samsung",
|
||||
"target_path": "hardware/samsung"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_samsung_nfc",
|
||||
"target_path": "hardware/samsung/nfc"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_samsung_slsi_libbt",
|
||||
"target_path": "hardware/samsung_slsi/libbt"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_samsung_slsi_scsc_wifibt_wifi_hal",
|
||||
"target_path": "hardware/samsung_slsi/scsc_wifibt/wifi_hal"
|
||||
},
|
||||
{
|
||||
"repository": "android_hardware_samsung_slsi_scsc_wifibt_wpa_supplicant_lib",
|
||||
"target_path": "hardware/samsung_slsi/scsc_wifibt/wpa_supplicant_lib"
|
||||
},
|
||||
{
|
||||
"repository": "android_kernel_samsung_universal7884B",
|
||||
"target_path": "kernel/samsung/universal7884B"
|
||||
}
|
||||
]
|
||||
349
universal7885-common/manifest.xml
Normal file
349
universal7885-common/manifest.xml
Normal file
|
|
@ -0,0 +1,349 @@
|
|||
<manifest version="1.0" type="device" target-level="2">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.audio</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>6.0</version>
|
||||
<interface>
|
||||
<name>IDevicesFactory</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@6.0::IDevicesFactory/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.audio.effect</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>6.0</version>
|
||||
<interface>
|
||||
<name>IEffectsFactory</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@6.0::IEffectsFactory/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.biometrics.fingerprint</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.1</version>
|
||||
<interface>
|
||||
<name>IBiometricsFingerprint</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@2.1::IBiometricsFingerprint/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.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>
|
||||
</interface>
|
||||
<interface>
|
||||
<name>IDrmFactory</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@1.2::ICryptoFactory/widevine</fqname>
|
||||
<fqname>@1.2::IDrmFactory/widevine</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.gatekeeper</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IGatekeeper</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@1.0::IGatekeeper/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.gnss</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>IGnss</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@1.1::IGnss/default</fqname>
|
||||
<fqname>@2.0::IGnss/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.graphics.allocator</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>IAllocator</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@2.0::IAllocator/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.graphics.composer</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.1</version>
|
||||
<interface>
|
||||
<name>IComposer</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@2.1::IComposer/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.graphics.mapper</name>
|
||||
<transport arch="32+64">passthrough</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>IMapper</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@2.0::IMapper/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.light</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>ILight</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@2.0::ILight/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" override="true">
|
||||
<name>android.hardware.radio</name>
|
||||
<transport>hwbinder</transport>
|
||||
</hal>
|
||||
<hal format="hidl" override="true">
|
||||
<name>android.hardware.radio</name>
|
||||
<transport>hwbinder</transport>
|
||||
<fqname>@1.2::ISap/slot1</fqname>
|
||||
<fqname>@1.2::ISap/slot2</fqname>
|
||||
<fqname>@1.4::IRadio/slot1</fqname>
|
||||
<fqname>@1.4::IRadio/slot2</fqname>
|
||||
</hal>
|
||||
<hal format="hidl" override="true">
|
||||
<name>android.hardware.radio.config</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>IRadioConfig</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@1.1::IRadioConfig/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl" override="true">
|
||||
<name>android.hardware.radio.deprecated</name>
|
||||
<transport>hwbinder</transport>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.renderscript</name>
|
||||
<transport arch="32+64">passthrough</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IDevice</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@1.0::IDevice/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.sensors</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ISensors</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@1.0::ISensors/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.soundtrigger</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>ISoundTriggerHw</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@2.0::ISoundTriggerHw/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.thermal</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IThermal</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@1.0::IThermal/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.usb</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.1</version>
|
||||
<interface>
|
||||
<name>IUsb</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@1.1::IUsb/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.samsung.hardware.gnss</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>ISehGnss</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@2.0::ISehGnss/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl" override="true">
|
||||
<name>vendor.samsung.hardware.radio</name>
|
||||
<transport>hwbinder</transport>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.samsung.hardware.radio</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.1</version>
|
||||
<interface>
|
||||
<name>ISehRadio</name>
|
||||
<instance>slot1</instance>
|
||||
<instance>slot2</instance>
|
||||
</interface>
|
||||
<fqname>@2.1::ISehRadio/slot1</fqname>
|
||||
<fqname>@2.1::ISehRadio/slot2</fqname>
|
||||
</hal>
|
||||
<hal format="hidl" override="true">
|
||||
<name>vendor.samsung.hardware.radio.bridge</name>
|
||||
<transport>hwbinder</transport>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.samsung.hardware.radio.bridge</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>ISehBridge</name>
|
||||
<instance>slot1</instance>
|
||||
<instance>slot2</instance>
|
||||
</interface>
|
||||
<fqname>@2.0::ISehBridge/slot1</fqname>
|
||||
<fqname>@2.0::ISehBridge/slot2</fqname>
|
||||
</hal>
|
||||
<hal format="hidl" override="true">
|
||||
<name>vendor.samsung.hardware.radio.channel</name>
|
||||
<transport>hwbinder</transport>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.samsung.hardware.radio.channel</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.0</version>
|
||||
<interface>
|
||||
<name>ISehChannel</name>
|
||||
<instance>epdgd</instance>
|
||||
<instance>epdgd2</instance>
|
||||
<instance>imsd</instance>
|
||||
<instance>imsd2</instance>
|
||||
</interface>
|
||||
<fqname>@2.0::ISehChannel/epdgd</fqname>
|
||||
<fqname>@2.0::ISehChannel/epdgd2</fqname>
|
||||
<fqname>@2.0::ISehChannel/imsd</fqname>
|
||||
<fqname>@2.0::ISehChannel/imsd2</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.trustonic.tee</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ITee</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@1.0::ITee/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.trustonic.teeregistry</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ITeeRegistry</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
<fqname>@1.0::ITeeRegistry/default</fqname>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.lineage.power</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>ILineagePower</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
<hal format="hidl">
|
||||
<name>vendor.lineage.touch</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>IGloveMode</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
||||
11
universal7885-common/manifest_nfc.xml
Normal file
11
universal7885-common/manifest_nfc.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl" override="true">
|
||||
<name>android.hardware.nfc</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>1.2</version>
|
||||
<interface>
|
||||
<name>INfc</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2018 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<bool name="config_haveHigherAspectRatioScreen">true</bool>
|
||||
|
||||
<!-- Defines the actions shown in advanced reboot submenu -->
|
||||
<string-array name="config_restartActionsList">
|
||||
<item>restart</item>
|
||||
<item>restart_recovery</item>
|
||||
<item>restart_download</item>
|
||||
<item>restart_fastboot</item>
|
||||
</string-array>
|
||||
|
||||
<!-- Whether device has a notch -->
|
||||
<bool name="config_haveNotch">true</bool>
|
||||
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Copyright (C) 2016 The CyanogenMod 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.
|
||||
-->
|
||||
<resources>
|
||||
<bool name="call_recording_enabled">true</bool>
|
||||
<integer name="call_recording_audio_source">4</integer>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<integer name="config_screenBrightnessSettingMinimum">1</integer>
|
||||
<integer name="config_screenBrightnessSettingDefault">128</integer>
|
||||
<integer name="config_screenBrightnessDim">10</integer>
|
||||
<string-array name="config_mobile_tcp_buffers">
|
||||
<item>lte:1048576,3145728,4194304,524288,1572864,2097152</item>
|
||||
</string-array>
|
||||
<string name="config_dozeComponent">com.android.systemui/com.android.systemui.doze.DozeService</string>
|
||||
<bool name="config_enableAutoPowerModes">true</bool>
|
||||
<bool name="config_powerDecoupleAutoSuspendModeFromDisplay">true</bool>
|
||||
<bool name="config_powerDecoupleInteractiveModeFromDisplay">true</bool>
|
||||
<integer name="config_screenBrightnessDoze">1</integer>
|
||||
<string-array translatable="false" name="config_defaultPinnerServiceFiles">
|
||||
<item>"/system/framework/arm64/boot-framework.oat"</item>
|
||||
<item>"/system/framework/framework.jar"</item>
|
||||
<item>"/system/framework/oat/arm64/services.odex"</item>
|
||||
<item>"/system/framework/services.jar"</item>
|
||||
<item>"/apex/com.android.art/javalib/core-oj.jar"</item>
|
||||
<item>"/apex/com.android.art/javalib/core-libart.jar"</item>
|
||||
<item>"/apex/com.android.media/javalib/updatable-media.jar"</item>
|
||||
<item>"/system_ext/priv-app/SystemUI/SystemUI.apk"</item>
|
||||
<item>"/system_ext/priv-app/SystemUI/oat/arm64/SystemUI.odex"</item>
|
||||
<item>"/system/lib64/libsurfaceflinger.so"</item>
|
||||
</string-array>
|
||||
<string-array translatable="false" name="config_jitzygoteBootImagePinnerServiceFiles">
|
||||
<item>"/system/framework/framework.jar"</item>
|
||||
<item>"/system/framework/services.jar"</item>
|
||||
<item>"/apex/com.android.art/javalib/core-oj.jar"</item>
|
||||
<item>"/apex/com.android.art/javalib/core-libart.jar"</item>
|
||||
<item>"/apex/com.android.media/javalib/updatable-media.jar"</item>
|
||||
<item>"/system_ext/priv-app/SystemUI/SystemUI.apk"</item>
|
||||
<item>"/system/lib64/libsurfaceflinger.so"</item>
|
||||
</string-array>
|
||||
<bool name="config_pinnerCameraApp">true</bool>
|
||||
<string name="config_radio_access_family">GSM|CDMA|EVDO|WCDMA|LTE</string>
|
||||
<integer name="config_fingerprintMaxTemplatesPerUser">4</integer>
|
||||
<integer-array name="config_longPressVibePattern">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>20</item>
|
||||
<item>21</item>
|
||||
</integer-array>
|
||||
<integer-array name="config_virtualKeyVibePattern">
|
||||
<item>0</item>
|
||||
<item>10</item>
|
||||
<item>20</item>
|
||||
<item>30</item>
|
||||
</integer-array>
|
||||
<integer-array name="config_keyboardTapVibePattern">
|
||||
<item>40</item>
|
||||
</integer-array>
|
||||
<bool name="config_setColorTransformAccelerated">true</bool>
|
||||
<fraction name="config_screenAutoBrightnessDozeScaleFactor">100.0%</fraction>
|
||||
<string name="db_default_journal_mode" translatable="false">MEMORY</string>
|
||||
<string name="db_default_sync_mode" translatable="false">OFF</string>
|
||||
<string name="db_wal_sync_mode" translatable="false">OFF</string>
|
||||
<bool name="config_suspendWhenScreenOffDueToProximity">true</bool>
|
||||
<bool name="config_showNavigationBar">true</bool>
|
||||
<string-array name="config_biometric_sensors" translatable="false" >
|
||||
<item>0:2:15</item> <!-- ID0:Fingerprint:Strong -->
|
||||
</string-array>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (C) 2018 The LineageOS Project
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
<resources>
|
||||
<integer name="config_chargingFastThreshold">10800000</integer>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
** Copyright 2009, 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.
|
||||
*/
|
||||
-->
|
||||
|
||||
<!-- These resources are around just to allow their values to be customized
|
||||
for different hardware and product builds. -->
|
||||
<resources>
|
||||
<bool name="doze_display_state_supported">true</bool>
|
||||
<bool name="doze_suspend_display_state_supported">true</bool>
|
||||
</resources>
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
* Copyright (c) 2006, 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.
|
||||
*/
|
||||
-->
|
||||
<resources>
|
||||
<dimen name="rounded_corner_content_padding">48px</dimen>
|
||||
</resources>
|
||||
43
universal7885-common/power/Android.bp
Normal file
43
universal7885-common/power/Android.bp
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// Copyright (C) 2020 The LineageOS 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.
|
||||
//
|
||||
|
||||
cc_binary {
|
||||
name: "android.hardware.power@1.0-service.universal7884B",
|
||||
|
||||
srcs: [
|
||||
"Power.cpp",
|
||||
"service.cpp",
|
||||
],
|
||||
|
||||
include_dirs: ["hardware/samsung/hidl/light/include"],
|
||||
local_include_dirs: ["include"],
|
||||
|
||||
shared_libs: [
|
||||
"libbase",
|
||||
"libbinder",
|
||||
"libhidlbase",
|
||||
"libutils",
|
||||
"android.hardware.power@1.0",
|
||||
"vendor.lineage.power@1.0",
|
||||
],
|
||||
|
||||
static_libs: ["libc++fs"],
|
||||
vendor: true,
|
||||
|
||||
init_rc: ["android.hardware.power@1.0-service.universal7884B.rc"],
|
||||
relative_install_path: "hw",
|
||||
|
||||
}
|
||||
245
universal7885-common/power/Power.cpp
Normal file
245
universal7885-common/power/Power.cpp
Normal file
|
|
@ -0,0 +1,245 @@
|
|||
/*
|
||||
* Copyright (C) 2020 The LineageOS 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.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "android.hardware.power@1.0-service.exynos"
|
||||
|
||||
#include "Power.h"
|
||||
#include <android-base/logging.h>
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include "samsung_lights.h"
|
||||
#include "samsung_power.h"
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace power {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
|
||||
/*
|
||||
* Write value to path and close file.
|
||||
*/
|
||||
template <typename T>
|
||||
static void set(const std::string& path, const T& value) {
|
||||
std::ofstream file(path);
|
||||
file << value << std::endl;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static T get(const std::string& path, const T& def) {
|
||||
std::ifstream file(path);
|
||||
T result;
|
||||
|
||||
file >> result;
|
||||
return file.fail() ? def : result;
|
||||
}
|
||||
|
||||
Return<void> Power::setInteractive(bool interactive) {
|
||||
if (!initialized) {
|
||||
initialize();
|
||||
}
|
||||
|
||||
if (!interactive) {
|
||||
int32_t panel_brightness = get(PANEL_BRIGHTNESS_NODE, -1);
|
||||
|
||||
if (panel_brightness > 0) {
|
||||
LOG(VERBOSE) << "Moving to non-interactive state, but screen is still on,"
|
||||
<< "not disabling input devices";
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (!sec_touchscreen.empty()) {
|
||||
set(sec_touchscreen, interactive ? "1" : "0");
|
||||
}
|
||||
|
||||
if (!sec_touchkey.empty()) {
|
||||
if (!interactive) {
|
||||
int button_state = get(sec_touchkey, -1);
|
||||
|
||||
if (button_state < 0) {
|
||||
LOG(ERROR) << "Failed to read touchkey state";
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
* If button_state is 0, the keys have been disabled by another component
|
||||
* (for example lineagehw), which means we don't want them to be enabled when resuming
|
||||
* from suspend.
|
||||
*/
|
||||
if (button_state == 0) {
|
||||
touchkeys_blocked = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!touchkeys_blocked) {
|
||||
set(sec_touchkey, interactive ? "1" : "0");
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
for (const std::string& interactivePath : cpuInteractivePaths) {
|
||||
set(interactivePath + "/io_is_busy", interactive ? "1" : "0");
|
||||
}
|
||||
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> Power::powerHint(PowerHint hint, int32_t data) {
|
||||
if (!initialized) {
|
||||
initialize();
|
||||
}
|
||||
|
||||
/* Bail out if low-power mode is active */
|
||||
if (current_profile == PowerProfile::POWER_SAVE && hint != PowerHint::LOW_POWER &&
|
||||
hint != static_cast<PowerHint>(LineagePowerHint::SET_PROFILE)) {
|
||||
LOG(VERBOSE) << "PROFILE_POWER_SAVE active, ignoring hint " << static_cast<int32_t>(hint);
|
||||
return Void();
|
||||
}
|
||||
|
||||
switch (hint) {
|
||||
case PowerHint::INTERACTION:
|
||||
case PowerHint::LAUNCH:
|
||||
sendBoostpulse();
|
||||
break;
|
||||
case PowerHint::LOW_POWER:
|
||||
setProfile(data ? PowerProfile::POWER_SAVE : PowerProfile::BALANCED);
|
||||
break;
|
||||
default:
|
||||
if (hint == static_cast<PowerHint>(LineagePowerHint::SET_PROFILE)) {
|
||||
setProfile(static_cast<PowerProfile>(data));
|
||||
} else if (hint == static_cast<PowerHint>(LineagePowerHint::CPU_BOOST)) {
|
||||
sendBoost(data);
|
||||
} else {
|
||||
LOG(INFO) << "Unknown power hint: " << static_cast<int32_t>(hint);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> Power::setFeature(Feature feature __unused, bool activate __unused) {
|
||||
if (!initialized) {
|
||||
initialize();
|
||||
}
|
||||
|
||||
if (feature == Feature::POWER_FEATURE_DOUBLE_TAP_TO_WAKE) {
|
||||
set("/sys/class/sec/tsp/cmd", activate ? "aot_enable,1" : "aot_enable,0");
|
||||
}
|
||||
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> Power::getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_cb) {
|
||||
_hidl_cb({}, Status::SUCCESS);
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<int32_t> Power::getFeature(LineageFeature feature) {
|
||||
switch (feature) {
|
||||
case LineageFeature::SUPPORTED_PROFILES:
|
||||
return static_cast<int32_t>(PowerProfile::MAX);
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
void Power::initialize() {
|
||||
findInputNodes();
|
||||
|
||||
current_profile = PowerProfile::BALANCED;
|
||||
|
||||
for (const std::string& interactivePath : cpuInteractivePaths) {
|
||||
hispeed_freqs.emplace_back(get<std::string>(interactivePath + "/hispeed_freq", ""));
|
||||
}
|
||||
|
||||
for (const std::string& sysfsPath : cpuSysfsPaths) {
|
||||
max_freqs.emplace_back(get<std::string>(sysfsPath + "/cpufreq/scaling_max_freq", ""));
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
}
|
||||
|
||||
void Power::findInputNodes() {
|
||||
std::error_code ec;
|
||||
for (auto& de : std::filesystem::directory_iterator("/sys/class/input/", ec)) {
|
||||
/* we are only interested in the input devices that we can access */
|
||||
if (ec || de.path().string().find("/sys/class/input/input") == std::string::npos) {
|
||||
continue;
|
||||
}
|
||||
|
||||
for (auto& de2 : std::filesystem::directory_iterator(de.path(), ec)) {
|
||||
if (!ec && de2.path().string().find("/name") != std::string::npos) {
|
||||
std::string content = get<std::string>(de2.path(), "");
|
||||
if (content == "sec_touchkey") {
|
||||
sec_touchkey = de.path().string().append("/enabled");
|
||||
LOG(INFO) << "found sec_touchkey: " << sec_touchkey;
|
||||
} else if (content == "sec_touchscreen") {
|
||||
sec_touchscreen = de.path().string().append("/enabled");
|
||||
LOG(INFO) << "found sec_touchscreen: " << sec_touchscreen;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Power::setProfile(PowerProfile profile) {
|
||||
if (current_profile == profile) {
|
||||
return;
|
||||
}
|
||||
|
||||
switch (profile) {
|
||||
case PowerProfile::POWER_SAVE:
|
||||
// Limit to hispeed freq
|
||||
for (int i = 0; i < cpuSysfsPaths.size(); i++) {
|
||||
if (hispeed_freqs.size() > i && !hispeed_freqs.at(i).empty()) {
|
||||
set(cpuSysfsPaths.at(i) + "/cpufreq/scaling_max_freq", hispeed_freqs.at(i));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case PowerProfile::BALANCED:
|
||||
case PowerProfile::HIGH_PERFORMANCE:
|
||||
// Restore normal max freq
|
||||
for (int i = 0; i < cpuSysfsPaths.size(); i++) {
|
||||
if (max_freqs.size() > i && !max_freqs.at(i).empty()) {
|
||||
set(cpuSysfsPaths.at(i) + "/cpufreq/scaling_max_freq", max_freqs.at(i));
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Power::sendBoostpulse() {
|
||||
// the boostpulse node is only valid for the LITTLE cluster
|
||||
set(cpuInteractivePaths.front() + "/boostpulse", "1");
|
||||
}
|
||||
|
||||
void Power::sendBoost(int duration_us) {
|
||||
set(cpuInteractivePaths.front() + "/boost", "1");
|
||||
|
||||
usleep(duration_us);
|
||||
|
||||
set(cpuInteractivePaths.front() + "/boost", "0");
|
||||
}
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace power
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
82
universal7885-common/power/Power.h
Normal file
82
universal7885-common/power/Power.h
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* Copyright (C) 2020 The LineageOS 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.
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_HARDWARE_POWER_V1_0_POWER_H
|
||||
#define ANDROID_HARDWARE_POWER_V1_0_POWER_H
|
||||
|
||||
#include <android/hardware/power/1.0/IPower.h>
|
||||
#include <hidl/MQDescriptor.h>
|
||||
#include <hidl/Status.h>
|
||||
#include <vendor/lineage/power/1.0/ILineagePower.h>
|
||||
|
||||
namespace android {
|
||||
namespace hardware {
|
||||
namespace power {
|
||||
namespace V1_0 {
|
||||
namespace implementation {
|
||||
|
||||
using ::android::sp;
|
||||
using ::android::hardware::hidl_array;
|
||||
using ::android::hardware::hidl_memory;
|
||||
using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
|
||||
using ::vendor::lineage::power::V1_0::ILineagePower;
|
||||
using ::vendor::lineage::power::V1_0::LineageFeature;
|
||||
using ::vendor::lineage::power::V1_0::LineagePowerHint;
|
||||
|
||||
// clang-format off
|
||||
enum PowerProfile {
|
||||
POWER_SAVE = 0,
|
||||
BALANCED,
|
||||
HIGH_PERFORMANCE,
|
||||
MAX
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
struct Power : public IPower, public ILineagePower {
|
||||
Return<void> setInteractive(bool interactive) override;
|
||||
Return<void> powerHint(PowerHint hint, int32_t data) override;
|
||||
Return<void> setFeature(Feature feature, bool activate) override;
|
||||
Return<void> getPlatformLowPowerStats(getPlatformLowPowerStats_cb _hidl_cb) override;
|
||||
|
||||
Return<int32_t> getFeature(LineageFeature feature) override;
|
||||
|
||||
private:
|
||||
void initialize();
|
||||
void findInputNodes();
|
||||
void setProfile(PowerProfile profile);
|
||||
void sendBoostpulse();
|
||||
void sendBoost(int duration_us);
|
||||
|
||||
bool initialized;
|
||||
bool touchkeys_blocked;
|
||||
std::string sec_touchkey;
|
||||
std::string sec_touchscreen;
|
||||
PowerProfile current_profile;
|
||||
std::vector<std::string> hispeed_freqs;
|
||||
std::vector<std::string> max_freqs;
|
||||
};
|
||||
|
||||
} // namespace implementation
|
||||
} // namespace V1_0
|
||||
} // namespace power
|
||||
} // namespace hardware
|
||||
} // namespace android
|
||||
|
||||
#endif // ANDROID_HARDWARE_POWER_V1_0_POWER_H
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
service vendor.power-hal-1-0 /vendor/bin/hw/android.hardware.power@1.0-service.universal7884B
|
||||
class hal
|
||||
user system
|
||||
group system
|
||||
39
universal7885-common/power/include/samsung_power.h
Normal file
39
universal7885-common/power/include/samsung_power.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2020 The LineageOS 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.
|
||||
*/
|
||||
|
||||
#ifndef SAMSUNG_POWER_H
|
||||
#define SAMSUNG_POWER_H
|
||||
|
||||
/*
|
||||
* Board specific nodes
|
||||
*
|
||||
* If your kernel exposes these controls in another place, you can either
|
||||
* symlink to the locations given here, or override this header in your
|
||||
* device tree.
|
||||
*/
|
||||
|
||||
static const std::vector<std::string> cpuSysfsPaths = {
|
||||
"/sys/devices/system/cpu/cpu0",
|
||||
"/sys/devices/system/cpu/cpu6"
|
||||
};
|
||||
|
||||
static const std::vector<std::string> cpuInteractivePaths = {
|
||||
"/sys/devices/system/cpu/cpu0/cpufreq/interactive",
|
||||
"/sys/devices/system/cpu/cpu6/cpufreq/interactive"
|
||||
};
|
||||
|
||||
#endif // SAMSUNG_POWER_H
|
||||
60
universal7885-common/power/service.cpp
Normal file
60
universal7885-common/power/service.cpp
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright (C) 2020 The LineageOS 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.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "android.hardware.power@1.0-service.exynos"
|
||||
|
||||
#include <android-base/logging.h>
|
||||
#include <hidl/HidlTransportSupport.h>
|
||||
#include <utils/Errors.h>
|
||||
|
||||
#include "Power.h"
|
||||
|
||||
using android::hardware::configureRpcThreadpool;
|
||||
using android::hardware::joinRpcThreadpool;
|
||||
|
||||
using android::hardware::power::V1_0::IPower;
|
||||
using android::hardware::power::V1_0::implementation::Power;
|
||||
|
||||
using android::OK;
|
||||
using android::sp;
|
||||
using android::status_t;
|
||||
|
||||
int main() {
|
||||
sp<Power> power = new Power();
|
||||
status_t status = 0;
|
||||
|
||||
configureRpcThreadpool(1, true);
|
||||
|
||||
status = power->IPower::registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR) << "Could not register service (IPower) for Power HAL";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
status = power->ILineagePower::registerAsService();
|
||||
if (status != OK) {
|
||||
LOG(ERROR) << "Could not register service (ILineagePower) for Power HAL";
|
||||
goto shutdown;
|
||||
}
|
||||
|
||||
LOG(INFO) << "Power HAL service is Ready.";
|
||||
joinRpcThreadpool();
|
||||
|
||||
shutdown:
|
||||
// In normal operation, we don't expect the thread pool to shutdown
|
||||
LOG(ERROR) << "Power HAL failed to join thread pool.";
|
||||
return 1;
|
||||
}
|
||||
11
universal7885-common/product.prop
Normal file
11
universal7885-common/product.prop
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# Blurs
|
||||
ro.surface_flinger.supports_background_blur=1
|
||||
persist.sys.sf.disable_blurs=1
|
||||
|
||||
# LMKD
|
||||
ro.lmk.critical_upgrade=true
|
||||
ro.lmk.downgrade_pressure=60
|
||||
ro.lmk.kill_heaviest_task=false
|
||||
ro.lmk.log_stats=true
|
||||
ro.lmk.upgrade_pressure=40
|
||||
ro.lmk.use_psi=false
|
||||
236
universal7885-common/proprietary-files.txt
Normal file
236
universal7885-common/proprietary-files.txt
Normal file
|
|
@ -0,0 +1,236 @@
|
|||
# All blobs below are extracted from a30ser-user-10-QP1A.190711.020-A305FNPUS6BUD3-release-keys
|
||||
|
||||
# Audio
|
||||
vendor/bin/main_abox
|
||||
vendor/etc/audio_board_info.xml
|
||||
vendor/etc/audio_policy_volumes.xml
|
||||
vendor/etc/default_volume_tables.xml
|
||||
vendor/etc/floating_feature.xml
|
||||
vendor/etc/mixer_gains.xml
|
||||
vendor/etc/mixer_paths.xml
|
||||
vendor/firmware/APBargeIn_AUDIO_SLSI.bin
|
||||
vendor/firmware/AP_AUDIO_SLSI.bin
|
||||
vendor/firmware/Tfa9896.cnt
|
||||
vendor/firmware/calliope_dram.bin
|
||||
vendor/firmware/calliope_sram.bin
|
||||
vendor/lib/hw/audio.primary.exynos7884B.so
|
||||
vendor/lib/libSamsungPostProcessConvertor.so
|
||||
vendor/lib/lib_SamsungRec_07001.so
|
||||
vendor/lib/lib_SoundAlive_SRC384_ver320.so
|
||||
vendor/lib/lib_soundaliveresampler.so
|
||||
vendor/lib/libaudio_soundtrigger.so
|
||||
vendor/lib/libfloatingfeature.so
|
||||
vendor/lib/librecordalive.so
|
||||
vendor/lib/libsamsungDiamondVoice.so
|
||||
vendor/lib/libsecaudioinfo.so
|
||||
vendor/lib/soundfx/libaudioeffectoffload.so
|
||||
vendor/lib/vndk/libaudioroute.so
|
||||
vendor/lib/vndk/libtinyalsa.so
|
||||
vendor/lib64/libfloatingfeature.so
|
||||
vendor/lib64/libsecaudioinfo.so
|
||||
vendor/lib64/soundfx/libaudioeffectoffload.so
|
||||
|
||||
# DRM
|
||||
vendor/bin/hw/android.hardware.drm@1.2-service.widevine
|
||||
vendor/etc/init/android.hardware.drm@1.2-service.widevine.rc
|
||||
vendor/lib/liboemcrypto.so
|
||||
vendor/lib/libwvhidl.so
|
||||
vendor/lib/mediadrm/libwvdrmengine.so
|
||||
|
||||
# Fingerprint
|
||||
vendor/lib/libegis_fp_normal_sensor_test.so
|
||||
vendor/lib/libgf_in_system_lib.so
|
||||
vendor/lib/libqfp_sensortest.so
|
||||
vendor/lib/libsynaFpSensorTestNwd.so
|
||||
vendor/lib64/libegis_fp_normal_sensor_test.so
|
||||
vendor/lib64/libgf_in_system_lib.so
|
||||
vendor/lib64/libqfp_sensortest.so
|
||||
vendor/lib64/libsynaFpSensorTestNwd.so
|
||||
|
||||
# GPS
|
||||
vendor/bin/hw/gpsd
|
||||
vendor/bin/hw/vendor.samsung.hardware.gnss@2.0-service
|
||||
vendor/etc/gnss/ca.pem
|
||||
vendor/etc/gnss/gps.cfg
|
||||
vendor/etc/init/init.gps.rc
|
||||
vendor/etc/init/vendor.samsung.hardware.gnss@2.0-service.rc
|
||||
vendor/lib/libwrappergps.so
|
||||
vendor/lib64/hw/android.hardware.gnss@2.0-impl.so
|
||||
vendor/lib64/hw/vendor.samsung.hardware.gnss@2.0-impl.so
|
||||
vendor/lib64/libwrappergps.so
|
||||
vendor/lib64/vendor.samsung.hardware.gnss@2.0.so
|
||||
|
||||
# Graphics - from a40ser-user-11-RP1A.200720.012-A405FMPUU3CUC2-release-keys
|
||||
vendor/lib/egl/libGLES_mali.so|e896a3569f8bea7b9a90ce1f1e950a1b867ba231
|
||||
vendor/lib/hw/gralloc.exynos7884B.so|97b13d67846e02cde1ae30a2038fbec98af7b2ae
|
||||
vendor/lib/hw/hwcomposer.exynos7884B.so|9b640bcd9c0979b1ec789b529c2a95c0a279227b
|
||||
vendor/lib/libExynosHWCService.so|50a1b9595633329e4c0624e397e1b216d0456559
|
||||
vendor/lib/libGrallocWrapper.so|4eff4bbab8c50d0279d8d9145c6973857a16ce0e
|
||||
vendor/lib/libacryl.so|4a8f4231e8410d8b8c2832e4979c7f48043ceb21
|
||||
vendor/lib/libexynosgraphicbuffer.so|7bcd71bf6e2c59bbde4c19e8a78324332c61b2a1
|
||||
vendor/lib/libexynosdisplay.so|494230ba1ad1a38eb847cc2de317a0c6ff3606a4
|
||||
vendor/lib/libexynosgscaler.so|4c58aa4bc570a6618807e107f31a2a12dbe90fa1
|
||||
vendor/lib/libexynosscaler.so|63e5b08a9274a0a5df8ad7b5e9eefcc99b91292f
|
||||
vendor/lib/libexynosutils.so|a90530792e1770ece7fa44f93e93718b793e684e
|
||||
vendor/lib/libexynosv4l2.so|57d0db2e3507a38afab238cfee0e44ec003426ef
|
||||
vendor/lib/libion_exynos.so|f28943bc24020fb65dd495e21f733630fff57c38
|
||||
vendor/lib64/egl/libGLES_mali.so|53f913b5e7246e52a578fe98aa813cb49ac81d83
|
||||
vendor/lib64/hw/gralloc.exynos7884B.so|19e91edba29f573deb26806c9b441386f9784fdd
|
||||
vendor/lib64/hw/hwcomposer.exynos7884B.so|3e7f45dc2f672d00b245e396a3072414aabfc61b
|
||||
vendor/lib64/libExynosHWCService.so|415ef33aa77b5cb9ad15b424ab3e0a4b3f300b83
|
||||
vendor/lib64/libGrallocWrapper.so|4a8a89ac339f23f14fcb22e0188f22299cb9c618
|
||||
vendor/lib64/libexynosgraphicbuffer.so|2580755e3d276c158c1f08deeeae2eec7467a58c
|
||||
vendor/lib64/libacryl.so|e0d248104e5a5a3f6836c2c457f525afd52edf2c
|
||||
vendor/lib64/libexynosdisplay.so|7e36f1f73e5a5bcc596f5c91140b5eb3081b2f28
|
||||
vendor/lib64/libexynosgscaler.so|dd93cddf7102a75ad7e0fcb935d6a6bc32bdac2b
|
||||
vendor/lib64/libexynosscaler.so|9d45ea397e6ecd453d4cb40a5a260f6421f9e566
|
||||
vendor/lib64/libexynosutils.so|cb42b6ded8fb488c74a6b40c428de36778e96d63
|
||||
vendor/lib64/libexynosv4l2.so|fb66b93ad867a47d48da44a804d6c4514cbb5713
|
||||
vendor/lib64/libion_exynos.so|bff127f0d989e6c756dd8cff40847ee5b7560447
|
||||
|
||||
# Lights
|
||||
vendor/lib/hw/lights.universal7884B.so
|
||||
vendor/lib64/hw/lights.universal7884B.so
|
||||
|
||||
# Media
|
||||
vendor/etc/media_codecs.xml
|
||||
vendor/etc/media_codecs_performance.xml
|
||||
vendor/etc/media_profiles_V1_0.xml
|
||||
|
||||
# Memtrack - from a40ser-user-11-RP1A.200720.012-A405FMPUU3CUC2-release-keys
|
||||
vendor/lib/hw/memtrack.exynos7884B.so|bbd3a762209fd02e159bd501e6b7dd3e1dedd0a4
|
||||
vendor/lib64/hw/memtrack.exynos7884B.so|417811e22c3f40e13d0b8b15510a25b997f6eba6
|
||||
|
||||
# OMX
|
||||
vendor/lib/libExynosOMX_Core.so
|
||||
vendor/lib/libExynosOMX_Resourcemanager.so
|
||||
vendor/lib/libstagefright_omx_vendor.so
|
||||
vendor/lib/libstagefright_soft_ac4dec.so
|
||||
vendor/lib/libstagefright_soft_ddpdec.so
|
||||
vendor/lib/libstagefrighthw.so
|
||||
vendor/lib/omx/libOMX.Exynos.AVC.Decoder.so
|
||||
vendor/lib/omx/libOMX.Exynos.AVC.Encoder.so
|
||||
vendor/lib/omx/libOMX.Exynos.HEVC.Decoder.so
|
||||
vendor/lib/omx/libOMX.Exynos.HEVC.Encoder.so
|
||||
vendor/lib/omx/libOMX.Exynos.MPEG4.Decoder.so
|
||||
vendor/lib/omx/libOMX.Exynos.MPEG4.Encoder.so
|
||||
vendor/lib/omx/libOMX.Exynos.VP8.Decoder.so
|
||||
vendor/lib/omx/libOMX.Exynos.VP8.Encoder.so
|
||||
vendor/lib/omx/libOMX.Exynos.VP9.Decoder.so
|
||||
vendor/lib/omx/libOMX.Exynos.WMV.Decoder.so
|
||||
vendor/lib64/libExynosOMX_Core.so
|
||||
vendor/lib64/libExynosOMX_Resourcemanager.so
|
||||
vendor/lib64/libstagefrighthw.so
|
||||
vendor/lib64/omx/libOMX.Exynos.AVC.Decoder.so
|
||||
vendor/lib64/omx/libOMX.Exynos.AVC.Encoder.so
|
||||
vendor/lib64/omx/libOMX.Exynos.HEVC.Decoder.so
|
||||
vendor/lib64/omx/libOMX.Exynos.HEVC.Encoder.so
|
||||
vendor/lib64/omx/libOMX.Exynos.MPEG4.Decoder.so
|
||||
vendor/lib64/omx/libOMX.Exynos.MPEG4.Encoder.so
|
||||
vendor/lib64/omx/libOMX.Exynos.VP8.Decoder.so
|
||||
vendor/lib64/omx/libOMX.Exynos.VP8.Encoder.so
|
||||
vendor/lib64/omx/libOMX.Exynos.VP9.Decoder.so
|
||||
vendor/lib64/omx/libOMX.Exynos.WMV.Decoder.so
|
||||
|
||||
# RIL - from a40ser-user-11-RP1A.200720.012-A405FMPUU3CUC2-release-keys
|
||||
vendor/bin/cbd|3501bc4a474ad9cf970fba283591dc7a10e60413
|
||||
vendor/bin/hw/rild|2982c9628c9f8f82ff579cdb1273baed47112dfc
|
||||
vendor/bin/secril_config_svc|645539748afd362867ebdcce702b73b1ee7480c6
|
||||
vendor/etc/init/init.vendor.onebinary.rc|b3fab964774039b1f2f6eabf821556919b26369f
|
||||
vendor/etc/init/init.vendor.rilchip.rc|83d57882dfaefaaa21c5dd636bafd655dfaf0b10
|
||||
vendor/etc/init/init.vendor.rilcommon.rc|5a669667301c678eb825abb41531ae1e19897886
|
||||
vendor/etc/plmn_delta.bin|6a826cb6a8a1d460403ab2ebccf4f0d7be546ce6
|
||||
vendor/etc/plmn_delta_attaio.bin|751a1c7105f1c03fc196689c2a71e2c69aa14e1f
|
||||
vendor/etc/plmn_delta_hktw.bin|4602b2e5c84d6cd4d6836a94784987a76e7830ce
|
||||
vendor/etc/plmn_delta_usagsm.bin|9a25ec9e9da16ed2f8a9db07f037fe08283b24e5
|
||||
vendor/etc/plmn_se13.bin|21c3b2be869b92c24d3d58710a9fde6826b4677e
|
||||
vendor/lib/libaudio-ril.so|2fee16ec35bcaccac0092b27b5ea434617877c3f
|
||||
vendor/lib/libreference-ril.so|46374a18b4a2cff2bbcd7eb4706421ac404dd924
|
||||
vendor/lib/libril.so|d60c374b2fae7302d5e2ea469d01ff100bb7dd0a
|
||||
vendor/lib/librilutils.so|6af19cf1ab9ec150213d61552870277a6f49096b
|
||||
vendor/lib/libsecnativefeature.so|268dfdbb80196ac0d16abcce9109f87518753361
|
||||
vendor/lib/libsemnativecarrierfeature.so|ac27187c27eba2b96eaa4812b8e9b60193ca18d6
|
||||
vendor/lib/libsecril-client.so|af77c32b35ab1a2b7ee5f38e529e7eb8dee0a195
|
||||
vendor/lib/vendor.samsung.hardware.radio.bridge@2.0.so|c130cf05828ee1e415cf5823f2a67e023508f710
|
||||
vendor/lib/vendor.samsung.hardware.radio@2.0.so|1c976df4082e7829578a9cb48c040706e1753a6d
|
||||
vendor/lib/vendor.samsung.hardware.radio@2.1.so|6ce633e09b82f54aabd789ca23a5f1833a232f68
|
||||
vendor/lib64/libengmode_client.so|f1fd7b5eccc02374794dad37052595ca67e1402a
|
||||
vendor/lib64/libreference-ril.so|88d198da07ea1a67245beb1da4c48da9d627ef32
|
||||
vendor/lib64/libril.so|ae21d2979f849435331f7e5c224dd1ce61615eba
|
||||
vendor/lib64/librilutils.so|c929ab09b9335b404cb6aab859d5cc20a986d2ca
|
||||
vendor/lib64/libsecnativefeature.so|beba21a227a43849d565982c7c3850bdc52552b9
|
||||
vendor/lib64/libsemnativecarrierfeature.so|ca44453cf7cca968606b56936be7de0d214d74be
|
||||
vendor/lib64/libsecril-client.so|3f9bed28e5370e59ec481628290034295b9d401f
|
||||
vendor/lib64/libvkmanager_vendor.so|d145e14dbf59f85ce8c35b410c14d2749cc2f2e7
|
||||
vendor/lib64/vendor.samsung.hardware.radio.bridge@2.0.so|be8b1643c70fcb9c31e062bfc7ac771097770b05
|
||||
vendor/lib64/vendor.samsung.hardware.radio.channel@2.0.so|8cc8d203c16e7239820eecc53de23bcf69da8cdd
|
||||
vendor/lib64/vendor.samsung.hardware.radio@2.0.so|feab767661ded387449bd8c08d0d76e43d40c6f9
|
||||
vendor/lib64/vendor.samsung.hardware.radio@2.1.so|809c63ba36b1223e2f976b5a52adaf03f31ca948
|
||||
# patchelf --replace-needed libcutils.so libcutils-v29.so vendor/lib*/libsec-ril*.so
|
||||
vendor/lib64/libsec-ril-dsds.so|8c8387002f24d291eabca8a552d55c407024ab13
|
||||
vendor/lib64/libsec-ril.so|d4782fdcaba4261db4dd7f4aa8f8039ee6499c51
|
||||
|
||||
# Sensors
|
||||
vendor/etc/yas_set.cfg
|
||||
vendor/lib/libyasalgo.so
|
||||
vendor/lib64/libyasalgo.so
|
||||
|
||||
# Thermal
|
||||
vendor/lib/hw/thermal.universal7884B.so
|
||||
vendor/lib64/hw/thermal.universal7884B.so
|
||||
|
||||
# Wifi
|
||||
vendor/bin/hw/macloader
|
||||
vendor/bin/wlbtd
|
||||
vendor/etc/init/wifi_slsi.rc
|
||||
vendor/etc/wifi/hydra_config.sdb
|
||||
vendor/etc/wifi/indoorchannel.info
|
||||
vendor/etc/wifi/mx
|
||||
vendor/etc/wifi/mx140.bin
|
||||
vendor/etc/wifi/mx140/debug/common/log-strings.bin
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/bt_registers.xml
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/cortexM4.xml
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/cortexR4.xml
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/mailbox16.xml
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/mailbox4.xml
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/mailbox8.xml
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/moredump.bin
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/moredump.xml
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/pl192vic.xml
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/rf_chip_registers.xml
|
||||
vendor/etc/wifi/mx140/debug/hardware/moredump/wlan_sys_registers.xml
|
||||
vendor/etc/wifi/mx140/debug/wlan/hip_signals.xml
|
||||
vendor/etc/wifi/mx140/debug/wlan/id.txt
|
||||
vendor/etc/wifi/mx140/debug/wlan/mib_out.xml
|
||||
vendor/etc/wifi/mx140/debug/wlan/symbols.dbg
|
||||
vendor/etc/wifi/mx140/debug/wlan/unicli.dbg
|
||||
vendor/etc/wifi/mx140/debug/wlan/unitab.dbg
|
||||
vendor/etc/wifi/mx140/debug/wlan/univif.dbg
|
||||
vendor/etc/wifi/mx140/debug/wlan/xide_mib.dbg
|
||||
vendor/etc/wifi/mx140_bt.hcf
|
||||
vendor/etc/wifi/mx140_t.bin
|
||||
vendor/etc/wifi/mx140_t/debug/common/log-strings.bin
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/bt_registers.xml
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/cortexM4.xml
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/cortexR4.xml
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/mailbox16.xml
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/mailbox4.xml
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/mailbox8.xml
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/moredump.bin
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/moredump.xml
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/pl192vic.xml
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/rf_chip_registers.xml
|
||||
vendor/etc/wifi/mx140_t/debug/hardware/moredump/wlan_sys_registers.xml
|
||||
vendor/etc/wifi/mx140_t/debug/wlan/hip_signals.xml
|
||||
vendor/etc/wifi/mx140_t/debug/wlan/id.txt
|
||||
vendor/etc/wifi/mx140_t/debug/wlan/mib_out.xml
|
||||
vendor/etc/wifi/mx140_t/debug/wlan/symbols.dbg
|
||||
vendor/etc/wifi/mx140_t/debug/wlan/unicli.dbg
|
||||
vendor/etc/wifi/mx140_t/debug/wlan/unitab.dbg
|
||||
vendor/etc/wifi/mx140_t/debug/wlan/univif.dbg
|
||||
vendor/etc/wifi/mx140_t/debug/wlan/xide_mib.dbg
|
||||
vendor/etc/wifi/mx140_t_wlan.hcf
|
||||
vendor/etc/wifi/mx140_t_wlan_t.hcf
|
||||
vendor/etc/wifi/mx140_wlan.hcf
|
||||
vendor/etc/wifi/mx140_wlan_t.hcf
|
||||
vendor/etc/wifi/platform.txt
|
||||
28
universal7885-common/recovery/Android.bp
Normal file
28
universal7885-common/recovery/Android.bp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// Copyright (C) 2021 The LineageOS 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.
|
||||
//
|
||||
|
||||
cc_library_static {
|
||||
name: "librecovery_updater_universal7884B",
|
||||
srcs: [
|
||||
"recovery_updater.cpp",
|
||||
],
|
||||
include_dirs: [
|
||||
"system/core/base/include",
|
||||
"bootable/recovery",
|
||||
"bootable/recovery/edify/include",
|
||||
"bootable/recovery/otautil/include"
|
||||
],
|
||||
}
|
||||
9
universal7885-common/recovery/Android.mk
Normal file
9
universal7885-common/recovery/Android.mk
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.recovery.exynos7884B.rc
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := init.recovery.exynos7884B.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
11
universal7885-common/recovery/init.recovery.exynos7884B.rc
Normal file
11
universal7885-common/recovery/init.recovery.exynos7884B.rc
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
on init
|
||||
setprop sys.usb.configfs 1
|
||||
|
||||
on fs
|
||||
wait /dev/block/platform/13500000.dwmmc0
|
||||
symlink /dev/block/platform/13500000.dwmmc0 /dev/block/bootdevice
|
||||
|
||||
symlink /dev/block/bootdevice/by-name/BOOT /dev/block/bootdevice/by-name/boot
|
||||
symlink /dev/block/bootdevice/by-name/SYSTEM /dev/block/bootdevice/by-name/system
|
||||
symlink /dev/block/bootdevice/by-name/VENDOR /dev/block/bootdevice/by-name/vendor
|
||||
symlink /dev/block/bootdevice/by-name/CACHE /dev/block/bootdevice/by-name/cache
|
||||
51
universal7885-common/recovery/recovery_updater.cpp
Normal file
51
universal7885-common/recovery/recovery_updater.cpp
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Copyright (C) 2021, The LineageOS 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.
|
||||
*/
|
||||
|
||||
#include <android-base/properties.h>
|
||||
|
||||
#include "edify/expr.h"
|
||||
#include "otautil/error_code.h"
|
||||
|
||||
Value *VerifyBootloader(const char *name, State *state,
|
||||
const std::vector<std::unique_ptr<Expr>> &argv) {
|
||||
int ret = 0;
|
||||
std::string bootloader = android::base::GetProperty("ro.boot.bootloader", "");
|
||||
if (bootloader.empty()) {
|
||||
return ErrorAbort(state, kFileGetPropFailure,
|
||||
"%s() failed to read current bootloader version", name);
|
||||
}
|
||||
|
||||
std::string min_supported_bootloader_arg;
|
||||
if (argv.empty() || !Evaluate(state, argv[0], &min_supported_bootloader_arg)) {
|
||||
return ErrorAbort(state, kArgsParsingFailure,
|
||||
"%s() error parsing arguments", name);
|
||||
}
|
||||
int min_supported_bootloader = int(min_supported_bootloader_arg[0]);
|
||||
|
||||
int version = 0;
|
||||
if (bootloader.length() >= 4)
|
||||
version = int(bootloader[bootloader.length() - 4]);
|
||||
|
||||
if (version >= min_supported_bootloader) {
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
return StringValue(std::to_string(ret));
|
||||
}
|
||||
|
||||
void Register_librecovery_updater_universal7884B() {
|
||||
RegisterFunction("universal7884B.verify_bootloader_min", VerifyBootloader);
|
||||
}
|
||||
26
universal7885-common/releasetools.py
Normal file
26
universal7885-common/releasetools.py
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
#!/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2021 The LineageOS 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.
|
||||
|
||||
import common
|
||||
import re
|
||||
|
||||
def FullOTA_Assertions(info):
|
||||
android_info = info.input_zip.read("OTA/android-info.txt")
|
||||
m = re.search(r'require\s+version-bootloader-min\s*=\s*(\S+)', android_info)
|
||||
if m:
|
||||
bootloader_version = m.group(1)
|
||||
cmd = ('assert(universal7884B.verify_bootloader_min("{}") == "1" || abort("ERROR: This package requires Android 10 or 11 based firmware. Please upgrade firmware and retry!"););').format(bootloader_version)
|
||||
info.script.AppendExtra(cmd)
|
||||
42
universal7885-common/rootdir/Android.mk
Normal file
42
universal7885-common/rootdir/Android.mk
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := fstab.enableswap
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/$(LOCAL_MODULE)
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.exynos7884B.rc
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/$(LOCAL_MODULE)
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.exynos7884B.usb.rc
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/$(LOCAL_MODULE)
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := ueventd.exynos7884B.rc
|
||||
LOCAL_MODULE_STEM := ueventd.rc
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/$(LOCAL_MODULE_STEM)
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := wifi_sec.rc
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/$(LOCAL_MODULE)
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init
|
||||
include $(BUILD_PREBUILT)
|
||||
1
universal7885-common/rootdir/etc/fstab.enableswap
Normal file
1
universal7885-common/rootdir/etc/fstab.enableswap
Normal file
|
|
@ -0,0 +1 @@
|
|||
/dev/block/zram0 none swap defaults zramsize=50%,max_comp_streams=8
|
||||
632
universal7885-common/rootdir/etc/init.exynos7884B.rc
Normal file
632
universal7885-common/rootdir/etc/init.exynos7884B.rc
Normal file
|
|
@ -0,0 +1,632 @@
|
|||
on early-init
|
||||
mkdir /efs 0771 radio system
|
||||
mkdir /mnt/vendor/efs 0771 radio system
|
||||
mkdir /mnt/vendor/cpefs 0771 radio system
|
||||
mkdir /mnt/vendor/persist 0771 system system
|
||||
mount debugfs /sys/kernel/debug /sys/kernel/debug
|
||||
|
||||
on init
|
||||
start watchdogd
|
||||
|
||||
# Fastcharge
|
||||
chown system radio /sys/class/sec/switch/afc_disable
|
||||
|
||||
# ZRAM parameters
|
||||
write /proc/sys/vm/page-cluster 0
|
||||
write /proc/sys/vm/swappiness 100
|
||||
|
||||
## SCSC WLAN
|
||||
# SD-755: Increase default socket rx buffer limit
|
||||
write /proc/sys/net/core/rmem_default 327680
|
||||
write /proc/sys/net/core/rmem_max 327680
|
||||
|
||||
|
||||
## SCSC BT
|
||||
chown bluetooth bluetooth /sys/module/scsc_bt/parameters/bluetooth_address
|
||||
|
||||
on late-fs
|
||||
# Start services for Boot Animation
|
||||
start servicemanager
|
||||
start surfaceflinger
|
||||
start bootanim
|
||||
# Make sure HW service manager started and start required HAL services
|
||||
start vendor.configstore-hal
|
||||
start vendor.gralloc-2-0
|
||||
|
||||
# Mount RW partitions which need run fsck
|
||||
mount_all /vendor/etc/fstab.${ro.hardware} --late
|
||||
|
||||
# start mobicore
|
||||
|
||||
on post-fs
|
||||
# Allow writing to the kernel trace log.
|
||||
chmod 0222 /sys/kernel/debug/tracing/trace_marker
|
||||
|
||||
# set RLIMIT_MEMLOCK to 64MB
|
||||
setrlimit 8 67108864 67108864
|
||||
|
||||
on post-fs-data
|
||||
# NFC
|
||||
mkdir /data/vendor/nfc 0770 nfc nfc
|
||||
|
||||
# NFC: create /efs/sec_efs/nfc and /efs/nfc for nv storage
|
||||
mkdir /efs/sec_efs/nfc 0700 nfc nfc
|
||||
mkdir /efs/nfc 0700 nfc nfc
|
||||
|
||||
# TEEGRIS service
|
||||
mkdir /data/vendor/tee 0700 system system
|
||||
|
||||
# Log data folder
|
||||
mkdir /data/vendor 0771 root system
|
||||
mkdir /data/vendor/log 0771 root system
|
||||
mkdir /data/log/abox 0771 audioserver system
|
||||
|
||||
#dump Abox permission
|
||||
chmod 777 data/vendor/log/abox
|
||||
|
||||
setprop vold.post_fs_data_done 1
|
||||
|
||||
# Gatekeeper data
|
||||
mkdir /data/vendor/gk 0771 system system
|
||||
|
||||
## SCSC WLAN
|
||||
# Setup Wi-Fi permissions
|
||||
mkdir /data/misc/wifi 0770 wifi system
|
||||
mkdir /data/misc/wifi/sockets 0770 wifi wifi
|
||||
mkdir /vendor/etc/wifi 0770 system system
|
||||
mkdir /data/hostapd 0770 system wifi
|
||||
|
||||
# Permissions for audio
|
||||
chown system radio /sys/class/audio/earjack/select_jack
|
||||
chown system radio /sys/class/audio/earjack/key_state
|
||||
chown system radio /sys/class/audio/earjack/state
|
||||
chown system radio /sys/class/audio/earjack/mic_adc
|
||||
|
||||
chown system audio /sys/class/nxp/tfa_cal/status
|
||||
chown system audio /sys/class/nxp/tfa_cal/rdc
|
||||
chown system audio /sys/class/nxp/tfa_cal/temp
|
||||
|
||||
mkdir /mnt/vendor/efs/nxp 0770 system audio
|
||||
chown system audio /mnt/vendor/efs/nxp/rdc_cal
|
||||
chown system audio /mnt/vendor/efs/nxp/temp_cal
|
||||
chmod 0660 /mnt/vendor/efs/nxp/rdc_cal
|
||||
chmod 0660 /mnt/vendor/efs/nxp/temp_cal
|
||||
|
||||
mkdir /efs/nxp 0770 system audio
|
||||
chown system audio /efs/nxp/rdc_cal
|
||||
chown system audio /efs/nxp/temp_cal
|
||||
chmod 0660 /efs/nxp/rdc_cal
|
||||
chmod 0660 /efs/nxp/temp_cal
|
||||
|
||||
chown system audio /sys/class/nxp/tfa_log/data_maxx
|
||||
chown system audio /sys/class/nxp/tfa_log/count_overxmax
|
||||
chown system audio /sys/class/nxp/tfa_log/data_maxt
|
||||
chown system audio /sys/class/nxp/tfa_log/count_overtmax
|
||||
chmod 0440 /sys/class/nxp/tfa_log/data_maxx
|
||||
chmod 0440 /sys/class/nxp/tfa_log/count_overxmax
|
||||
chmod 0440 /sys/class/nxp/tfa_log/data_maxt
|
||||
chmod 0440 /sys/class/nxp/tfa_log/count_overtmax
|
||||
|
||||
# Change permission for A-Box firmware logs file & GPR dump
|
||||
chown audioserver system /sys/kernel/debug/abox/log-00
|
||||
chown audioserver system /sys/devices/platform/14a50000.abox/14a50000.abox:abox_debug@0/gpr
|
||||
chown audioserver system /sys/devices/platform/14a50000.abox/14a50000.abox:abox_debug@0/calliope_sram
|
||||
chown audioserver system /sys/devices/platform/14a50000.abox/14a50000.abox:abox_debug@0/calliope_dram
|
||||
chown audioserver system /sys/devices/platform/14a50000.abox/14a50000.abox:abox_debug@0/calliope_iva
|
||||
|
||||
# FM Radio
|
||||
chown system audio /dev/radio0
|
||||
chmod 0660 /dev/radio0
|
||||
|
||||
# Permissions for backlight
|
||||
chown system system /sys/class/backlight/panel/brightness
|
||||
|
||||
# Permissions for LCD
|
||||
chown system radio /sys/class/lcd/panel/lcd_type
|
||||
chown system system /sys/class/lcd/panel/lux
|
||||
|
||||
# Permissions Camera
|
||||
mkdir /data/vendor/camera 0770 cameraserver system
|
||||
mkdir /data/misc/camera 0770 cameraserver cameraserver
|
||||
chown system radio /sys/class/camera/rear/rear_camfw
|
||||
chown system radio /sys/class/camera/rear/rear_camfw_full
|
||||
chown system radio /sys/class/camera/rear/rear_checkfw_user
|
||||
chown system radio /sys/class/camera/rear/rear_checkfw_factory
|
||||
chown system radio /sys/class/camera/rear/rear_sensor_standby
|
||||
chown system radio /sys/class/camera/rear/rear_camtype
|
||||
chown system radio /sys/class/camera/rear/rear_calcheck
|
||||
chown system radio /sys/class/camera/rear/rear_afcal
|
||||
chown system system /sys/class/camera/rear/rear_hwparam
|
||||
chown cameraserver cameraserver /sys/class/camera/rear/rear_awb_master
|
||||
chown cameraserver cameraserver /sys/class/camera/rear/rear_awb_module
|
||||
chown cameraserver cameraserver /sys/class/camera/rear/rear_sensorid_exif
|
||||
chown cameraserver cameraserver /sys/class/camera/rear/rear_sensorid
|
||||
chown cameraserver cameraserver /sys/class/camera/rear/ssrm_camera_info
|
||||
chown system radio /sys/class/camera/rear/isp_core
|
||||
chown system radio /sys/class/camera/rear/fw_update
|
||||
chown system radio /sys/class/camera/rear/rear_moduleid
|
||||
chown system radio /sys/class/camera/flash/rear_flash
|
||||
chown cameraserver system /sys/class/camera/flash/rear_torch_flash
|
||||
chown system radio /sys/class/camera/flash/front_flash
|
||||
chown cameraserver system /sys/class/camera/flash/front_torch_flash
|
||||
chown system radio /sys/class/camera/front/front_camfw
|
||||
chown system radio /sys/class/camera/front/front_camfw_full
|
||||
chown system radio /sys/class/camera/front/front_checkfw_factory
|
||||
chown system radio /sys/class/camera/front/front_camtype
|
||||
chown system radio /sys/class/camera/front/front_moduleid
|
||||
chown system system /sys/class/camera/front/front_hwparam
|
||||
chown cameraserver cameraserver /sys/class/camera/front/front_sensorid_exif
|
||||
chown cameraserver cameraserver /sys/class/camera/front/front_sensorid
|
||||
chown system radio /sys/class/camera/front/front2_camfw
|
||||
chown system radio /sys/class/camera/front/front2_camfw_full
|
||||
chown system radio /sys/class/camera/front/front2_checkfw_user
|
||||
chown system radio /sys/class/camera/front/front2_checkfw_factory
|
||||
chown system radio /sys/class/camera/front/front2_tilt
|
||||
chown system system /sys/class/camera/front/front2_hwparam
|
||||
chown system system /sys/class/camera/front/front2_camtype
|
||||
chown system radio /sys/class/camera/front/front_dualcal
|
||||
chown system radio /sys/class/camera/front/front_dualcal_size
|
||||
chown system radio /sys/class/camera/front/front2_shift_x
|
||||
chown system radio /sys/class/camera/front/front2_shift_y
|
||||
chown cameraserver cameraserver /sys/class/camera/front/front_xtalkcal
|
||||
chown system radio /sys/class/camera/rear/supported_cameraIds
|
||||
|
||||
## Rear2 camera permission
|
||||
chown system radio /sys/class/camera/rear/rear2_camfw
|
||||
chown system radio /sys/class/camera/rear/rear2_camfw_full
|
||||
chown system radio /sys/class/camera/rear/rear2_checkfw_user
|
||||
chown system radio /sys/class/camera/rear/rear2_checkfw_factory
|
||||
chown system system /sys/class/camera/rear/rear2_hwparam
|
||||
chown cameraserver cameraserver /sys/class/camera/rear/rear2_sensorid_exif
|
||||
chown cameraserver cameraserver /sys/class/camera/rear/rear2_sensorid
|
||||
chown system radio /sys/class/camera/rear/rear2_moduleid
|
||||
chown system radio /sys/class/camera/rear/rear2_tilt
|
||||
|
||||
## Rear3 camera permission
|
||||
chown system radio /sys/class/camera/rear/rear3_camfw
|
||||
chown system radio /sys/class/camera/rear/rear3_camfw_full
|
||||
chown system radio /sys/class/camera/rear/rear3_checkfw_user
|
||||
chown system radio /sys/class/camera/rear/rear3_checkfw_factory
|
||||
chown system system /sys/class/camera/rear/rear3_hwparam
|
||||
chown cameraserver cameraserver /sys/class/camera/rear/rear3_sensorid_exif
|
||||
chown cameraserver cameraserver /sys/class/camera/rear/rear3_sensorid
|
||||
chown system radio /sys/class/camera/rear/rear3_moduleid
|
||||
|
||||
# Permissions for SVC
|
||||
chown system system /sys/devices/svc/Camera/SVC_rear_module
|
||||
chown system system /sys/devices/svc/Camera/SVC_front_module
|
||||
|
||||
chmod 0755 /sys/kernel/debug/tracing
|
||||
restorecon /sys/kernel/debug/tracing/trace_marker
|
||||
|
||||
# Permission for flashlight control for HAL3.3
|
||||
# The Istor espresso board does not have the flash led h/w, So the below permission line are blocked.
|
||||
# If you want to test the flashlight in board which have the flash led h/w, Enable the below blocked lines.
|
||||
chmod 0660 /sys/class/camera/flash/rear_flash
|
||||
chown system camera /sys/class/camera/flash/rear_flash
|
||||
|
||||
# permissions for bluetooth.
|
||||
setprop ro.bt.bdaddr_path "/mnt/vendor/efs/bluetooth/bt_addr"
|
||||
chown bluetooth bluetooth ro.bt.bdaddr_path
|
||||
|
||||
# for BT MAC address
|
||||
mkdir /mnt/vendor/efs/bluetooth 0770 system bluetooth
|
||||
# if already exist
|
||||
chown system bluetooth /mnt/vendor/efs/bluetooth
|
||||
chown system bluetooth /mnt/vendor/efs/bluetooth/bt_addr
|
||||
chmod 0770 /mnt/vendor/efs/bluetooth
|
||||
chmod 0660 /mnt/vendor/efs/bluetooth/bt_addr
|
||||
|
||||
# Magnetic sensor YAS537 lib
|
||||
mkdir /data/vendor/yas_lib 0770 system system
|
||||
|
||||
# for WIFI MAC address
|
||||
mkdir /mnt/vendor/efs/wifi 0775 wifi root
|
||||
chown wifi root /mnt/vendor/efs/wifi/.mac.info
|
||||
chmod 0664 /mnt/vendor/efs/wifi/.mac.info
|
||||
chown wifi root /mnt/vendor/efs/wifi/.mac.cob
|
||||
chmod 0664 /mnt/vendor/efs/wifi/.mac.cob
|
||||
|
||||
write /sys/module/scsc_mx/parameters/disable_recovery_handling 0
|
||||
|
||||
# MST/NFC Switch
|
||||
chown system /dev/mst_ctrl
|
||||
chmod 0660 /dev/mst_ctrl
|
||||
|
||||
# setup cgroup freezer for freecess
|
||||
mkdir /dev/freezer
|
||||
mount cgroup none /dev/freezer freezer
|
||||
mkdir /dev/freezer/frozen
|
||||
mkdir /dev/freezer/thaw
|
||||
write /dev/freezer/frozen/freezer.state FROZEN
|
||||
write /dev/freezer/thaw/freezer.state THAWED
|
||||
|
||||
# MARs for freecess
|
||||
chown system system /dev/freezer
|
||||
chown system system /dev/freezer/frozen
|
||||
chown system system /dev/freezer/frozen/tasks
|
||||
chown system system /dev/freezer/frozen/cgroup.procs
|
||||
chown system system /dev/freezer/thaw
|
||||
chown system system /dev/freezer/thaw/tasks
|
||||
chown system system /dev/freezer/thaw/cgroup.procs
|
||||
|
||||
# MARs for freecess
|
||||
chmod 0644 /dev/freezer/frozen/tasks
|
||||
chmod 0644 /dev/freezer/frozen/cgroup.procs
|
||||
chmod 0644 /dev/freezer/thaw/tasks
|
||||
chmod 0644 /dev/freezer/thaw/cgroup.procs
|
||||
|
||||
# OLAF setup
|
||||
mkdir /dev/freezer/olaf
|
||||
write /dev/freezer/olaf/freezer.state THAWED
|
||||
chown system system /dev/freezer/olaf
|
||||
chown system system /dev/freezer/olaf/tasks
|
||||
chown system system /dev/freezer/olaf/cgroup.procs
|
||||
chown system system /dev/freezer/olaf/freezer.state
|
||||
chmod 0644 /dev/freezer/olaf/tasks
|
||||
chmod 0644 /dev/freezer/olaf/cgroup.procs
|
||||
chmod 0644 /dev/freezer/olaf/freezer.state
|
||||
|
||||
on boot
|
||||
|
||||
setprop wifi.interface wlan0
|
||||
|
||||
# Allow to access debugfs for system:system
|
||||
chmod 0755 /sys/kernel/debug
|
||||
chown system system /sys/kernel/debug
|
||||
|
||||
# Set permissions for ttysac2
|
||||
chown system system /dev/ttySAC2
|
||||
chmod 0660 /dev/ttySAC2
|
||||
|
||||
# Set up kernel tracing, but disable it by default
|
||||
chmod 0222 /sys/kernel/debug/tracing/trace_marker
|
||||
write /sys/kernel/debug/tracing/tracing_on 0
|
||||
|
||||
# DVFS & Hotplug
|
||||
chown system system /sys/power/cpuhotplug/enabled
|
||||
chown system system /sys/power/cpuhotplug/min_online_cpu
|
||||
chown system system /sys/power/cpuhotplug/max_online_cpu
|
||||
chmod 0664 /sys/power/cpuhotplug/enabled
|
||||
chmod 0664 /sys/power/cpuhotplug/min_online_cpu
|
||||
chmod 0664 /sys/power/cpuhotplug/max_online_cpu
|
||||
|
||||
# CPU C-state node
|
||||
chown radio system /sys/module/cpuidle/parameters/off
|
||||
chmod 0664 /sys/module/cpuidle/parameters/off
|
||||
|
||||
# Permissions for input_booster
|
||||
chown system radio /sys/class/input_booster/level
|
||||
chown system radio /sys/class/input_booster/head
|
||||
chown system radio /sys/class/input_booster/tail
|
||||
chmod 0664 /sys/class/input_booster/level
|
||||
chmod 0664 /sys/class/input_booster/head
|
||||
chmod 0664 /sys/class/input_booster/tail
|
||||
|
||||
# Permissions for family_boost
|
||||
chown system radio /sys/kernel/hmp/family_boost
|
||||
chmod 0664 /sys/kernel/hmp/family_boost
|
||||
|
||||
chown system radio /sys/kernel/hmp/down_threshold
|
||||
chmod 0664 /sys/kernel/hmp/down_threshold
|
||||
|
||||
chown system radio /sys/devices/system/sec_os_ctrl/migrate_os
|
||||
chmod 0664 /sys/devices/system/sec_os_ctrl/migrate_os
|
||||
|
||||
# mif dvfs node
|
||||
chown system system sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/available_frequencies
|
||||
chmod 0444 sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/available_frequencies
|
||||
chown system system sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/min_freq
|
||||
chmod 0664 sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/min_freq
|
||||
|
||||
# GPU dvfs node
|
||||
chown radio system /sys/devices/platform/11500000.mali/dvfs_table
|
||||
chmod 0664 /sys/devices/platform/11500000.mali/dvfs_table
|
||||
chown radio system /sys/devices/platform/11500000.mali/dvfs_min_lock
|
||||
chmod 0664 /sys/devices/platform/11500000.mali/dvfs_min_lock
|
||||
chown radio system /sys/devices/platform/11500000.mali/dvfs_max_lock
|
||||
chmod 0664 /sys/devices/platform/11500000.mali/dvfs_max_lock
|
||||
|
||||
# Change permission for interactive governor
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/input_boost
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/input_boost
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration
|
||||
chown system system /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
|
||||
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
|
||||
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/timer_rate
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/timer_rate
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/timer_slack
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/timer_slack
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/min_sample_time
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/min_sample_time
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/hispeed_freq
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/hispeed_freq
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/target_loads
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/target_loads
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/go_hispeed_load
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/go_hispeed_load
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/above_hispeed_delay
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/above_hispeed_delay
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/boost
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/boost
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/boostpulse
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/input_boost
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/input_boost
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/boostpulse_duration
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/boostpulse_duration
|
||||
chown system system /sys/devices/system/cpu/cpu6/cpufreq/interactive/io_is_busy
|
||||
chmod 0660 /sys/devices/system/cpu/cpu6/cpufreq/interactive/io_is_busy
|
||||
|
||||
# Mount cpuset group for cameraserver
|
||||
mkdir /dev/cpuset/cameraserver
|
||||
copy /dev/cpuset/cpus /dev/cpuset/cameraserver/cpus
|
||||
copy /dev/cpuset/mems /dev/cpuset/cameraserver/mems
|
||||
chown system system /dev/cpuset/cameraserver
|
||||
chown system system /dev/cpuset/cameraserver/tasks
|
||||
chown system system /dev/cpuset/cameraserver/cpus
|
||||
chmod 0664 /dev/cpuset/cameraserver/tasks
|
||||
chmod 0664 /dev/cpuset/cameraserver/cpus
|
||||
|
||||
# For CPUSET(7885) 0-3, 4-5, 6-7
|
||||
chown system system /dev/cpuset/top-app/cpus
|
||||
chown system system /dev/cpuset/foreground/cpus
|
||||
chown system system /dev/cpuset/background/cpus
|
||||
chown system system /dev/cpuset/system-background/cpus
|
||||
chmod 664 /dev/cpuset/top-app/cpus
|
||||
chmod 664 /dev/cpuset/foreground/cpus
|
||||
chmod 664 /dev/cpuset/background/cpus
|
||||
chmod 664 /dev/cpuset/system-background/cpus
|
||||
write /dev/cpuset/top-app/cpus 0-7
|
||||
write /dev/cpuset/foreground/cpus 0-7
|
||||
write /dev/cpuset/background/cpus 0-7
|
||||
write /dev/cpuset/system-background/cpus 0-7
|
||||
|
||||
# For Selective boost
|
||||
write /dev/cpuset/top-app/selective_boost 1
|
||||
write /dev/cpuset/foreground/selective_boost 1
|
||||
write /dev/cpuset/cameraserver/selective_boost 1
|
||||
|
||||
# Permission for UART SWITCH
|
||||
chmod 0660 /sys/class/sec/switch/uart_sel
|
||||
chown system system /sys/class/sec/switch/uart_sel
|
||||
|
||||
# Prevents permission denied error for telephony
|
||||
chmod 0644 /proc/cmdline
|
||||
|
||||
on fs
|
||||
mount_all /vendor/etc/fstab.${ro.hardware} --early
|
||||
# We need to seperate mounting SEC_EFS partition from fstab file due to GSI image loading case
|
||||
wait /dev/block/platform/13500000.dwmmc0/by-name/sec_efs
|
||||
mount ext4 /dev/block/platform/13500000.dwmmc0/by-name/sec_efs /efs nosuid nodev noatime noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic
|
||||
|
||||
mount none /mnt/vendor/cpefs /cpefs bind
|
||||
restorecon_recursive /mnt/vendor/efs
|
||||
restorecon_recursive /mnt/vendor/cpefs
|
||||
restorecon_recursive /mnt/vendor/persist
|
||||
|
||||
mkdir /mnt/vendor/persist/data/sfs 0700 system system
|
||||
mkdir /mnt/vendor/persist/data/tz 0700 system system
|
||||
|
||||
# Start HW service manager early
|
||||
start hwservicemanager
|
||||
|
||||
chown radio system /mnt/vendor/efs
|
||||
chmod 0771 /mnt/vendor/efs
|
||||
chown radio system /mnt/vendor/cpefs
|
||||
chmod 0771 /mnt/vendor/cpefs
|
||||
chown system system /mnt/vendor/persist
|
||||
|
||||
# Enable rmnet data and aggregation
|
||||
setprop persist.rmnet.mux enabled
|
||||
setprop persist.rmnet.data.enable true
|
||||
setprop persist.data.wda.enable true
|
||||
setprop persist.data.df.agg.dl_pkt 10
|
||||
setprop persist.data.df.agg.dl_size 4096
|
||||
|
||||
# Permissions for ION
|
||||
chmod 0660 /sys/class/ion_cma/ion_video_ext/isolated
|
||||
chown system system /sys/class/ion_cma/ion_video_ext/isolated
|
||||
|
||||
# Sensors permissions
|
||||
# Flush
|
||||
chown system radio /sys/class/sensors/sensor_dev/flush
|
||||
# Accelerometer_sensor
|
||||
chown system radio /sys/class/sensors/accelerometer_sensor/raw_data
|
||||
chown system radio /sys/class/sensors/accelerometer_sensor/calibration
|
||||
chown system radio /sys/class/sensors/accelerometer_sensor/reactive_alert
|
||||
chown system radio /sys/class/sensors/accelerometer_sensor/vendor
|
||||
chown system radio /sys/class/sensors/accelerometer_sensor/name
|
||||
chown system radio /sys/class/sensors/accelerometer_sensor/selftest
|
||||
chown system radio /sys/class/sensors/accelerometer_sensor/lowpassfilter
|
||||
# Proximity_sensor
|
||||
chown system radio /sys/class/sensors/proximity_sensor/state
|
||||
chown system radio /sys/class/sensors/proximity_sensor/raw_data
|
||||
chown system radio /sys/class/sensors/proximity_sensor/prox_avg
|
||||
chown system radio /sys/class/sensors/proximity_sensor/prox_cal
|
||||
chown system radio /sys/class/sensors/proximity_sensor/vendor
|
||||
chown system radio /sys/class/sensors/proximity_sensor/name
|
||||
chown system radio /sys/class/sensors/proximity_sensor/thresh_high
|
||||
chown system radio /sys/class/sensors/proximity_sensor/thresh_low
|
||||
chown system radio /sys/class/sensors/proximity_sensor/thresh_detect_high
|
||||
chown system radio /sys/class/sensors/proximity_sensor/thresh_detect_low
|
||||
chown system radio /sys/class/sensors/proximity_sensor/barcode_emul_en
|
||||
chown system radio /sys/class/sensors/proximity_sensor/prox_offset_pass
|
||||
chown system radio /sys/class/sensors/proximity_sensor/prox_trim
|
||||
chown system radio /sys/class/sensors/proximity_sensor/prox_probe
|
||||
chown system radio /sys/class/sensors/proximity_sensor/check_far_state
|
||||
chown system radio /sys/class/sensors/proximity_sensor/pocket_prox
|
||||
# Light_sensor
|
||||
chown system radio /sys/class/sensors/light_sensor/lux
|
||||
chown system radio /sys/class/sensors/light_sensor/raw_data
|
||||
chown system radio /sys/class/sensors/light_sensor/vendor
|
||||
chown system radio /sys/class/sensors/light_sensor/name
|
||||
chown system radio /sys/class/sensors/light_sensor/adata0
|
||||
chown system radio /sys/class/sensors/light_sensor/adata1
|
||||
chown system radio /sys/class/sensors/light_sensor/adata2
|
||||
chown system radio /sys/class/sensors/light_sensor/adata3
|
||||
chown system radio /sys/class/sensors/light_sensor/adata4
|
||||
chown system radio /sys/class/sensors/light_sensor/adata5
|
||||
chown system radio /sys/class/sensors/light_sensor/astep
|
||||
chown system radio /sys/class/sensors/light_sensor/again
|
||||
chown system radio /sys/class/sensors/light_sensor/wtime
|
||||
chown system radio /sys/class/sensors/light_sensor/als_ch_cfg
|
||||
chown system radio /sys/class/sensors/light_sensor/fifo_level
|
||||
chown system radio /sys/class/sensors/light_sensor/fifo_overflowx
|
||||
chown system radio /sys/class/sensors/light_sensor/fifo_reset
|
||||
# Gyro_sensor
|
||||
chown system radio /sys/class/sensors/gyro_sensor/power_on
|
||||
chown system radio /sys/class/sensors/gyro_sensor/power_off
|
||||
chown system radio /sys/class/sensors/gyro_sensor/temperature
|
||||
chown system radio /sys/class/sensors/gyro_sensor/selftest
|
||||
chown system radio /sys/class/sensors/gyro_sensor/selftest_dps
|
||||
chown system radio /sys/class/sensors/gyro_sensor/vendor
|
||||
chown system radio /sys/class/sensors/gyro_sensor/name
|
||||
# Magnetic_sensor
|
||||
chown system radio /sys/class/sensors/magnetic_sensor/raw_data
|
||||
chown system radio /sys/class/sensors/magnetic_sensor/vendor
|
||||
chown system radio /sys/class/sensors/magnetic_sensor/name
|
||||
chown system radio /sys/class/sensors/magnetic_sensor/selftest
|
||||
|
||||
# Grip_sensor
|
||||
chown system radio /sys/class/sensors/grip_sensor/name
|
||||
chown system radio /sys/class/sensors/grip_sensor/vendor
|
||||
chown system radio /sys/class/sensors/grip_sensor/raw_data
|
||||
chown system radio /sys/class/sensors/grip_sensor/threshold
|
||||
chown system radio /sys/class/sensors/grip_sensor/calibration
|
||||
chown system radio /sys/class/sensors/grip_sensor/onoff
|
||||
chown system radio /sys/class/sensors/grip_sensor/reset
|
||||
chown system radio /sys/class/sensors/grip_sensor/mode
|
||||
chown system radio /sys/class/sensors/grip_sensor/gain
|
||||
chown system radio /sys/class/sensors/grip_sensor/start
|
||||
chown system radio /sys/class/sensors/grip_sensor/normal_threshold
|
||||
chown system radio /sys/class/sensors/grip_sensor/gain_ch2
|
||||
chown system radio /sys/class/sensors/grip_sensor/raw_data_ch2
|
||||
chown system radio /sys/class/sensors/grip_sensor/diff_avg_ch2
|
||||
chown system radio /sys/class/sensors/grip_sensor/normal_threshold_ch2
|
||||
chown system radio /sys/class/sensors/grip_sensor/ch_state
|
||||
chown system radio /sys/class/sensors/grip_sensor/body_threshold
|
||||
|
||||
# Grip_sensor
|
||||
chown system radio /sys/class/sensors/grip_sensor/name
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_firm_update_status
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_firm_update
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_firm_version_phone
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_firm_version_panel
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_sar_enable
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_sar_only_mode
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_sar_press_threshold
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_sar_release_threshold
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_earjack
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_gain
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_raw
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_raw_d
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_sw_reset
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_threshold
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_total_cap
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_check
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_diff_d
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_baseline
|
||||
chown system radio /sys/class/sensors/grip_sensor/grip_irq_count
|
||||
|
||||
# Permissions for Fingerprint sensor
|
||||
chmod 0660 /dev/goodix_fp
|
||||
chmod 0660 /dev/esfp0
|
||||
chown system system /dev/goodix_fp
|
||||
chown system system /dev/esfp0
|
||||
chown system radio /sys/class/fingerprint/fingerprint/type_check
|
||||
chown system radio /sys/class/fingerprint/fingerprint/name
|
||||
chown system radio /sys/class/fingerprint/fingerprint/vendor
|
||||
chown system radio /sys/class/fingerprint/fingerprint/adm
|
||||
chown system radio /sys/class/fingerprint/fingerprint/bfs_values
|
||||
|
||||
# Permissions for System LSI NFC
|
||||
# NFC : Permissions for NFC
|
||||
chmod 0660 /dev/sec-nfc
|
||||
chown nfc nfc /dev/sec-nfc
|
||||
# Permissions for S.LSI ESE
|
||||
chmod 0660 /dev/p3
|
||||
chown system system /dev/p3
|
||||
|
||||
on property:sys.boot_completed=1
|
||||
swapon_all /vendor/etc/fstab.enableswap
|
||||
|
||||
# Permission for flashlight control for HAL3.3
|
||||
# The Istor espresso board does not have the flash led h/w, So the below permission line are blocked.
|
||||
# If you want to test the flashlight in board which have the flash led h/w, Enable the below blocked lines.
|
||||
chmod 0660 /sys/class/camera/flash/rear_flash
|
||||
chown system camera /sys/class/camera/flash/rear_flash
|
||||
chmod 0660 /sys/class/camera/flash/front_flash
|
||||
chown system camera /sys/class/camera/flash/front_flash
|
||||
|
||||
#load ecd firmware
|
||||
write /proc/ecd/load_firmware 1
|
||||
|
||||
# Abox FailSafe
|
||||
service abox /vendor/bin/main_abox 14a50000.abox /data/log/abox
|
||||
class late_start
|
||||
user audioserver
|
||||
group system
|
||||
|
||||
# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
|
||||
service watchdogd /system/bin/watchdogd 10 20
|
||||
class core
|
||||
seclabel u:r:watchdogd:s0
|
||||
|
||||
# TEEGRIS daemon
|
||||
service tz_service /vendor/bin/tzdaemon
|
||||
class core
|
||||
user system
|
||||
group system readproc
|
||||
disabled
|
||||
|
||||
# Handle core_dump/profiling requests from SWd.
|
||||
# used only for DEBUG builds.
|
||||
service tz_msg_recv /vendor/bin/tz_message_receiver
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
disabled
|
||||
|
||||
service tzts_service /vendor/bin/tzts_daemon
|
||||
class core
|
||||
user system
|
||||
group system
|
||||
disabled
|
||||
|
||||
service charger /system/bin/charger
|
||||
class charger
|
||||
user system
|
||||
group system graphics input
|
||||
capabilities SYS_BOOT
|
||||
seclabel u:r:charger:s0
|
||||
|
||||
# Start NFC on supported variants
|
||||
service nfc_hal_service /vendor/bin/hw/android.hardware.nfc@1.2-service.samsung
|
||||
override
|
||||
class hal
|
||||
user nfc
|
||||
group nfc
|
||||
disabled
|
||||
|
||||
on property:ro.boot.product.hardware.sku=NFC
|
||||
start nfc_hal_service
|
||||
492
universal7885-common/rootdir/etc/init.exynos7884B.usb.rc
Normal file
492
universal7885-common/rootdir/etc/init.exynos7884B.usb.rc
Normal file
|
|
@ -0,0 +1,492 @@
|
|||
on early-fs
|
||||
setprop sys.usb.controller 13600000.dwc3
|
||||
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
|
||||
# USB accessory configuration
|
||||
on property:sys.usb.config=accessory && property:sys.usb.configfs=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d00
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
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=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,adb && property:sys.usb.configfs=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d01
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# audio accessory configuration
|
||||
on property:sys.usb.config=audio_source && property:sys.usb.configfs=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d02
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
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=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=audio_source,adb && property:sys.usb.configfs=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d03
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB and audio accessory configuration
|
||||
on property:sys.usb.config=accessory,audio_source && property:sys.usb.configfs=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d04
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
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=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=accessory,audio_source,adb && property:sys.usb.configfs=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x2d05
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x18d1
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=midi && property:sys.usb.configfs=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x686C
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
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 /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x686C
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ncm && property:sys.usb.configfs=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685d
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 2
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=ncm,adb && property:sys.usb.configfs=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685d
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 2
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC ${sys.usb.controller}
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on init
|
||||
mount configfs none /sys/kernel/config
|
||||
mkdir /sys/kernel/config/usb_gadget/g1
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/strings/0x409
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/configs/b.1
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/mtp.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/ptp.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/acm.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/uts.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/dm.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/rndis.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/conn_gadget.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/midi.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/accessory.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/audio_source.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/ncm.0
|
||||
mkdir /sys/kernel/config/usb_gadget/g1/functions/ffs.adb 0770 shell shell
|
||||
mkdir /dev/usb-ffs 0770 shell shell
|
||||
mkdir /dev/usb-ffs/adb 0770 shell shell
|
||||
mount functionfs adb /dev/usb-ffs/adb uid=2000,gid=2000
|
||||
|
||||
on boot
|
||||
write /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno}
|
||||
write /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer "SAMSUNG"
|
||||
write /sys/kernel/config/usb_gadget/g1/strings/0x409/product "SAMSUNG_Android"
|
||||
write /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Conf 1"
|
||||
write /sys/kernel/config/usb_gadget/g1/configs/b.1/MaxPower 0x1f4
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/mtp.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/mtp.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/ptp.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/ptp.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/acm.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/acm.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/uts.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/uts.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/rndis.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/rndis.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/dm.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/dm.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/conn_gadget.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/conn_gadget.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/midi.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/midi.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/accessory.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/accessory.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/audio_source.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/audio_source.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/ncm.0 /sys/kernel/config/usb_gadget/g1/configs/b.1/ncm.0
|
||||
symlink /sys/kernel/config/usb_gadget/g1/functions/ffs.adb /sys/kernel/config/usb_gadget/g1/configs/b.1/ffs.adb
|
||||
setprop sys.usb.configfs 1
|
||||
|
||||
on property:sys.usb.config=mtp
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions mtp,acm
|
||||
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
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
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions mtp,acm,adb
|
||||
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,acm,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,acm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6863
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
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
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6864
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ptp
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6865
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
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
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6866
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,dm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,acm,dm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,acm,dm,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,acm,dm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,acm,dm,uts
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,acm,dm,uts,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=rndis,acm,dm,uts,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=acm,dm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=acm,dm,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=acm,dm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=acm,dm,uts
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=acm,dm,uts,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=acm,dm,uts,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=dm,acm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=dm,acm,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=dm,acm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=dm,acm,uts
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=dm,acm,uts,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=dm,acm,uts,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685D
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685B
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mass_storage,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685e
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mass_storage,acm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685e
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# rndis,acm,diag and diag,acm,adb used for Hidden Menu
|
||||
|
||||
on property:sys.usb.config=rndis,diag
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6862
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag_mdm
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685d
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag_mdm
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
|
||||
on property:sys.usb.config=rndis,acm,diag
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6864
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag_mdm
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=sec_charging
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
|
||||
write /sys/class/android_usb/android0/functions mtp
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=sec_charging,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=sec_charging,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
|
||||
write /sys/class/android_usb/android0/functions mtp,adb
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=vzw_charging
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
|
||||
write /sys/class/android_usb/android0/functions mtp
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=vzw_charging,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=vzw_charging,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04E8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
|
||||
write /sys/class/android_usb/android0/functions mtp,adb
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,conn_gadget
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,conn_gadget,adb && property:sys.usb.configfs=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=mtp,conn_gadget,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x6860
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
write /sys/kernel/config/usb_gadget/g1/bDeviceClass 0
|
||||
write /sys/kernel/config/usb_gadget/g1/UDC "13600000.dwc3"
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# adb only USB configuration For VTS Test
|
||||
# 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=1
|
||||
start adbd
|
||||
on property:sys.usb.ffs.ready=1 && property:sys.usb.config=adb && property:sys.usb.configfs=1
|
||||
write /sys/kernel/config/usb_gadget/g1/idProduct 0x685d
|
||||
write /sys/kernel/config/usb_gadget/g1/idVendor 0x04e8
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
231
universal7885-common/rootdir/etc/ueventd.rc
Normal file
231
universal7885-common/rootdir/etc/ueventd.rc
Normal file
|
|
@ -0,0 +1,231 @@
|
|||
/dev/mali0 0666 system system
|
||||
/dev/ion 0666 system system
|
||||
/dev/ump 0666 system graphics
|
||||
/dev/exynos-mem 0660 system graphics
|
||||
/dev/video0 0660 system camera
|
||||
/dev/video1 0660 system camera
|
||||
/dev/video2 0660 system camera
|
||||
/dev/video3 0660 system camera
|
||||
/dev/video20 0660 system system
|
||||
# media0 is used for GSC, DECON, etc
|
||||
/dev/media0 0660 system camera
|
||||
# media1 is used for DECON Ext WB
|
||||
/dev/media1 0660 system graphics
|
||||
# Various devices use the v4l-subdev interface
|
||||
# We declare all such nodes simultaneously here
|
||||
/dev/v4l-subdev0 0660 system camera
|
||||
/dev/v4l-subdev1 0660 system camera
|
||||
/dev/v4l-subdev2 0660 system camera
|
||||
/dev/v4l-subdev3 0660 system camera
|
||||
/dev/v4l-subdev4 0660 system camera
|
||||
/dev/v4l-subdev5 0660 system camera
|
||||
/dev/v4l-subdev6 0660 system camera
|
||||
/dev/v4l-subdev7 0660 system camera
|
||||
/dev/v4l-subdev8 0660 system camera
|
||||
/dev/v4l-subdev9 0660 system camera
|
||||
/dev/v4l-subdev10 0660 system camera
|
||||
/dev/v4l-subdev11 0660 system camera
|
||||
/dev/v4l-subdev12 0660 system camera
|
||||
/dev/v4l-subdev13 0660 system camera
|
||||
/dev/v4l-subdev14 0660 system camera
|
||||
/dev/v4l-subdev15 0660 system camera
|
||||
/dev/v4l-subdev16 0660 system camera
|
||||
/dev/v4l-subdev17 0660 system camera
|
||||
/dev/v4l-subdev18 0660 system camera
|
||||
/dev/v4l-subdev19 0660 system camera
|
||||
# v4l-subdev20 is used for DECON Ext WB
|
||||
/dev/v4l-subdev20 0660 system graphics
|
||||
/dev/v4l-subdev21 0660 system graphics
|
||||
/dev/v4l-subdev32 0660 system graphics
|
||||
|
||||
# gscalers
|
||||
/dev/video23 0660 media graphics
|
||||
/dev/video26 0660 media graphics
|
||||
/dev/video24 0660 media graphics
|
||||
/dev/video27 0660 media graphics
|
||||
/dev/video29 0660 media graphics
|
||||
/dev/video30 0660 media graphics
|
||||
# video31 is used for DECON Ext WB
|
||||
/dev/video31 0660 media graphics
|
||||
|
||||
# mscalers
|
||||
/dev/video50 0660 mediacodec drmrpc
|
||||
/dev/m2m1shot_scaler0 0660 mediacodec drmrpc
|
||||
|
||||
/dev/video55 0666 system graphics
|
||||
/dev/g2d 0660 system graphics
|
||||
/dev/fimg2d 0666 system graphics
|
||||
/dev/i2c-2 0660 system system
|
||||
/dev/HPD 0660 system system
|
||||
|
||||
# mfc
|
||||
/dev/video6 0660 mediacodec mediadrm
|
||||
/dev/video7 0660 mediacodec mediadrm
|
||||
/dev/video8 0660 mediacodec mediadrm
|
||||
/dev/video9 0660 mediacodec mediadrm
|
||||
/dev/video10 0660 mediacodec mediadrm
|
||||
/dev/video11 0660 mediacodec mediadrm
|
||||
|
||||
# camera
|
||||
/dev/video101 0660 cameraserver camera
|
||||
/dev/video102 0660 cameraserver camera
|
||||
/dev/video103 0660 cameraserver camera
|
||||
/dev/video104 0660 cameraserver camera
|
||||
/dev/video107 0660 cameraserver camera
|
||||
/dev/video109 0660 cameraserver camera
|
||||
/dev/video110 0660 cameraserver camera
|
||||
/dev/video111 0660 cameraserver camera
|
||||
/dev/video112 0660 cameraserver camera
|
||||
/dev/video120 0660 cameraserver camera
|
||||
/dev/video121 0660 cameraserver camera
|
||||
/dev/video122 0660 cameraserver camera
|
||||
/dev/video130 0660 cameraserver camera
|
||||
/dev/video131 0660 cameraserver camera
|
||||
/dev/video132 0660 cameraserver camera
|
||||
/dev/video140 0660 cameraserver camera
|
||||
/dev/video141 0660 cameraserver camera
|
||||
/dev/video142 0660 cameraserver camera
|
||||
/dev/video150 0660 cameraserver camera
|
||||
/dev/video151 0660 cameraserver camera
|
||||
/dev/video152 0660 cameraserver camera
|
||||
/dev/video153 0660 cameraserver camera
|
||||
/dev/video154 0660 cameraserver camera
|
||||
/dev/video155 0660 cameraserver camera
|
||||
/dev/video160 0660 cameraserver camera
|
||||
/dev/video161 0660 cameraserver camera
|
||||
/dev/video170 0660 cameraserver camera
|
||||
/dev/video171 0660 cameraserver camera
|
||||
/dev/video172 0660 cameraserver camera
|
||||
/dev/video173 0660 cameraserver camera
|
||||
/dev/video174 0660 cameraserver camera
|
||||
/dev/video175 0660 cameraserver camera
|
||||
/dev/video180 0660 cameraserver camera
|
||||
/dev/video190 0660 cameraserver camera
|
||||
/dev/video191 0660 cameraserver camera
|
||||
/dev/video192 0660 cameraserver camera
|
||||
/dev/video193 0660 cameraserver camera
|
||||
/dev/video210 0660 cameraserver camera
|
||||
/dev/video211 0660 cameraserver camera
|
||||
/dev/video212 0660 cameraserver camera
|
||||
/dev/video213 0660 cameraserver camera
|
||||
/dev/video214 0660 cameraserver camera
|
||||
/dev/video215 0660 cameraserver camera
|
||||
/dev/video216 0660 cameraserver camera
|
||||
/dev/video217 0660 cameraserver camera
|
||||
/dev/video218 0660 cameraserver camera
|
||||
/dev/video219 0660 cameraserver camera
|
||||
/dev/video220 0660 cameraserver camera
|
||||
/dev/video221 0660 cameraserver camera
|
||||
/dev/video222 0660 cameraserver camera
|
||||
/dev/video223 0660 cameraserver camera
|
||||
/dev/video224 0660 cameraserver camera
|
||||
/dev/video225 0660 cameraserver camera
|
||||
/dev/media2 0660 media media
|
||||
/dev/hdcp2 0660 media media
|
||||
|
||||
# jpeg
|
||||
/dev/m2m1shot_jpeg 0660 media media
|
||||
/dev/video12 0660 cameraserver media
|
||||
|
||||
# audio
|
||||
/dev/seiren 0660 system audio
|
||||
|
||||
#Mobicore
|
||||
/dev/mobicore 0700 system system
|
||||
/dev/mobicore-user 0666 radio system
|
||||
|
||||
# Secure MEM driver
|
||||
/dev/s5p-smem 0660 system system
|
||||
|
||||
#cbd
|
||||
/dev/block/mmcblk0p5 0400 radio radio
|
||||
/dev/umts_ramdump0 0660 radio radio
|
||||
|
||||
# DM tools
|
||||
/dev/umts_dm0 0660 radio radio
|
||||
/dev/umts_router 0660 radio radio
|
||||
/dev/ttyGS0 0660 system system
|
||||
/dev/ttyGS1 0660 system system
|
||||
|
||||
# Modem Interface
|
||||
/dev/block/platform/13500000.dwmmc0/by-name/RADIO 0660 system radio
|
||||
/dev/block/platform/13500000.dwmmc0/by-name/radio 0660 system radio
|
||||
/dev/block/platform/13500000.dwmmc0/by-name/CP_DEBUG 0660 radio system
|
||||
/dev/block/platform/13500000.dwmmc0/by-name/cp_debug 0660 radio system
|
||||
/sys/devices/platform/10000.mif_pdata sim/ds_detect 0660 radio system
|
||||
/dev/umts* 0660 system radio
|
||||
/dev/umts_csd 0660 system loop_radio
|
||||
/dev/smd4 0660 system radio
|
||||
/dev/ramdump_memshare 0660 system radio
|
||||
/dev/umts_ciq* 0660 system bridge_rw
|
||||
|
||||
# interactive governor parameters
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/timer_rate 0660 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/timer_slack 0660 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/min_sample_time 0660 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/hispeed_freq 0660 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/target_loads 0660 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/go_hispeed_load 0660 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/above_hispeed_delay 0660 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/boost 0660 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/boostpulse 0200 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/input_boost 0660 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/boostpulse_duration 0660 system system
|
||||
/sys/devices/system/cpu/cpu* cpufreq/interactive/io_is_busy 0660 system system
|
||||
|
||||
# Vision (VPU, SCORE)
|
||||
/dev/vertex0 0660 media media
|
||||
/dev/vertex1 0660 media media
|
||||
|
||||
#SCSC Bluetooth
|
||||
/dev/scsc_h4_0 0660 bluetooth bluetooth
|
||||
|
||||
#SCSC ANT
|
||||
/dev/scsc_ant_0 0660 system system
|
||||
|
||||
#SCSC WLAN
|
||||
/dev/mx_0_r4_gdb 0660 wifi wifi
|
||||
/dev/mx_0_m4_gdb 0660 wifi wifi
|
||||
/dev/mx_0_mmap 0660 wifi wifi
|
||||
/dev/mx_client_test_0 0660 wifi wifi
|
||||
/dev/mx_0_debug_sampler 0660 wifi wifi
|
||||
/dev/mx140_usb_clk_test_0 0660 wifi wifi
|
||||
/dev/scsc_log_collector_0 0660 wifi wifi
|
||||
|
||||
# Google FRP solution
|
||||
/dev/block/platform/13500000.dwmmc0/by-name/PERSISTENT 0660 system system
|
||||
|
||||
# Reactivation Lock solution
|
||||
/dev/block/platform/13500000.dwmmc0/by-name/STEADY 0660 system system
|
||||
|
||||
# Google FRP solution
|
||||
/dev/block/platform/13500000.dwmmc0/by-name/persistent 0660 system system
|
||||
|
||||
# Reactivation Lock solution
|
||||
/dev/block/platform/13500000.dwmmc0/by-name/steady 0660 system system
|
||||
|
||||
# sensorhub
|
||||
/dev/ssp_sensorhub 0660 system system
|
||||
/dev/ssp_data_injection 0660 system system
|
||||
|
||||
# Sensorhub IIO
|
||||
/dev/ssp_sensorhub 0660 system system
|
||||
/dev/iio:device* 0660 system system
|
||||
/sys/devices/platform/13980000.spi/spi_master/spi4/spi4.0/iio:device* buffer/enable 0660 system system
|
||||
/sys/devices/platform/13980000.spi/spi_master/spi4/spi4.0/iio:device* buffer/length 0660 system system
|
||||
/sys/bus/iio/devices/iio:device* 0664 system radio
|
||||
|
||||
# TEEGRIS
|
||||
/dev/tzdev 0666 system system
|
||||
/dev/tziwsock 0666 system system
|
||||
/dev/ionfd2phys 0660 system system
|
||||
/dev/tuihw 0660 system system
|
||||
/dev/tzirs 0660 system system
|
||||
/dev/nwfsdev 0660 system system
|
||||
/dev/tz_shmem_validator 0666 system system
|
||||
/dev/tz_wormhole 0666 system system
|
||||
|
||||
# Sensor
|
||||
/dev/input/event* 0660 system input
|
||||
/sys/devices/virtual/input/input* enable 0660 system input
|
||||
/sys/devices/virtual/input/input* poll_delay 0660 system input
|
||||
48
universal7885-common/rootdir/etc/wifi_sec.rc
Normal file
48
universal7885-common/rootdir/etc/wifi_sec.rc
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# Wi-Fi init file
|
||||
on post-fs-data
|
||||
mkdir /data/vendor/conn 0771 wifi wifi
|
||||
mkdir /data/vendor/wifi 0771 wifi wifi
|
||||
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
|
||||
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
|
||||
mkdir /data/vendor/log/wifi 0770 wifi system
|
||||
|
||||
# for WIFI TRP/TIS
|
||||
chown wifi wifi /data/vendor/conn/.psm.info
|
||||
chmod 0640 /data/vendor/conn/.psm.info
|
||||
|
||||
# for WIFI Antenna Selection
|
||||
chown wifi wifi /data/vendor/conn/.ant.info
|
||||
chmod 0640 /data/vendor/conn/.ant.info
|
||||
|
||||
# for WIFI Version
|
||||
chown wifi wifi /data/vendor/conn/.wifiver.info
|
||||
chmod 0644 /data/vendor/conn/.wifiver.info
|
||||
|
||||
# for WIFI MEMDUMP
|
||||
# The default value of below memdump file is set in SecProductFeature
|
||||
#write /data/vendor/conn/.memdump.info 2
|
||||
chown wifi wifi /data/vendor/conn/.memdump.info
|
||||
chmod 0640 /data/vendor/conn/.memdump.info
|
||||
|
||||
# for WIFI hotspot
|
||||
chown wifi wifi /data/vendor/conn/.softap.info
|
||||
chmod 0644 /data/vendor/conn/.softap.info
|
||||
chown system wifi /vendor/etc/wifi/indoorchannel.info
|
||||
chmod 0664 /vendor/etc/wifi/indoorchannel.info
|
||||
|
||||
# for WIFI MAC
|
||||
chown wifi wifi /sys/wifi/mac_addr
|
||||
chmod 0640 /sys/wifi/mac_addr
|
||||
|
||||
on boot
|
||||
setprop wifi.interface wlan0
|
||||
|
||||
# start for WiFi MFG (TestMode)
|
||||
service macloader /system/vendor/bin/hw/macloader
|
||||
class main
|
||||
user wifi
|
||||
group wifi inet net_raw net_admin
|
||||
capabilities NET_ADMIN NET_RAW SYS_MODULE
|
||||
oneshot
|
||||
|
||||
# end of WiFi MFG (TestMode)
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
//
|
||||
// Copyright (C) 2020 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.
|
||||
//
|
||||
|
||||
runtime_resource_overlay {
|
||||
name: "TetheringConfigOverlay",
|
||||
resource_dirs: ["res"],
|
||||
sdk_version: "current",
|
||||
vendor: true
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.networkstack.tethering.samsung_universal7884B"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<application android:hasCode="false" />
|
||||
<overlay
|
||||
android:targetPackage="com.android.networkstack.tethering"
|
||||
android:targetName="TetheringConfig"
|
||||
android:isStatic="true"
|
||||
android:priority="0"/>
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<bool translatable="false" name="config_tether_enable_bpf_offload">false</bool>
|
||||
</resources>
|
||||
6
universal7885-common/rro_overlays/WifiOverlay/Android.bp
Normal file
6
universal7885-common/rro_overlays/WifiOverlay/Android.bp
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
runtime_resource_overlay {
|
||||
name: "WifiOverlay",
|
||||
theme: "WifiOverlay",
|
||||
sdk_version: "current",
|
||||
vendor: true
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2019 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.
|
||||
-->
|
||||
<!-- Pixel specific wifi overlays -->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.android.wifi.resources.samsung_universal7884B"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<application android:hasCode="false" />
|
||||
<overlay
|
||||
android:targetPackage="com.android.wifi.resources"
|
||||
android:targetName="WifiCustomization"
|
||||
android:isStatic="true"
|
||||
android:priority="0"/>
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
/*
|
||||
* Copyright (C) 2019 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.
|
||||
*/
|
||||
-->
|
||||
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
|
||||
<!-- boolean indicating whether the WiFi chipset has 5GHz band support.
|
||||
Note: This config is replacing the config_wifi_dual_band_support
|
||||
since more bands may now be supported (such as 6GHz), the naming dual_band
|
||||
is no longer indicative, and a separate config now exists for each band -->
|
||||
<bool translatable="false" name="config_wifi5ghzSupport">true</bool>
|
||||
|
||||
<!-- Configure wifi tcp buffersizes in the form:
|
||||
rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max -->
|
||||
<string name="config_wifi_tcp_buffers">524288,1048576,2097152,262144,524288,1048576</string>
|
||||
|
||||
<!-- Boolean indicating whether the wifi chipset has background scan support -->
|
||||
<bool translatable="false" name="config_wifi_background_scan_support">true</bool>
|
||||
|
||||
<!-- Indicates that AP mode MAC randomization is supported on this device -->
|
||||
<bool translatable="false" name="config_wifi_ap_mac_randomization_supported">false</bool>
|
||||
</resources>
|
||||
7
universal7885-common/sepolicy/vendor/abox.te
vendored
Normal file
7
universal7885-common/sepolicy/vendor/abox.te
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
type abox, domain, mlstrustedsubject;
|
||||
type abox_exec, exec_type, file_type, vendor_file_type;
|
||||
init_daemon_domain(abox)
|
||||
|
||||
allow abox sysfs_abox_writable:file rw_file_perms;
|
||||
|
||||
allow abox self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
|
||||
1
universal7885-common/sepolicy/vendor/adbd.te
vendored
Normal file
1
universal7885-common/sepolicy/vendor/adbd.te
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
allow adbd proc_last_kmsg:file r_file_perms;
|
||||
1
universal7885-common/sepolicy/vendor/apexd.te
vendored
Normal file
1
universal7885-common/sepolicy/vendor/apexd.te
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
allow apexd sysfs_virtual:file rw_file_perms;
|
||||
1
universal7885-common/sepolicy/vendor/app.te
vendored
Normal file
1
universal7885-common/sepolicy/vendor/app.te
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
get_prop(appdomain, exported_camera_prop);
|
||||
1
universal7885-common/sepolicy/vendor/bootanim.te
vendored
Normal file
1
universal7885-common/sepolicy/vendor/bootanim.te
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
get_prop(bootanim, userspace_reboot_exported_prop)
|
||||
2
universal7885-common/sepolicy/vendor/cbd.te
vendored
Normal file
2
universal7885-common/sepolicy/vendor/cbd.te
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
allow cbd factoryprop_efs_file:file r_file_perms;
|
||||
allow cbd sysfs_info:file r_file_perms;
|
||||
4
universal7885-common/sepolicy/vendor/crash_dump.te
vendored
Normal file
4
universal7885-common/sepolicy/vendor/crash_dump.te
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
get_prop(crash_dump, hwservicemanager_prop)
|
||||
get_prop(crash_dump, exported_camera_prop)
|
||||
|
||||
allow crash_dump app_data_file:file read;
|
||||
8
universal7885-common/sepolicy/vendor/device.te
vendored
Normal file
8
universal7885-common/sepolicy/vendor/device.te
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# /dev/m2m1shot_scaler0
|
||||
type m2m1shot_device, dev_type;
|
||||
|
||||
# gps
|
||||
type gps_device, dev_type;
|
||||
|
||||
# /dev/goodix_fp
|
||||
type goodix_device, dev_type;
|
||||
16
universal7885-common/sepolicy/vendor/domain.te
vendored
Normal file
16
universal7885-common/sepolicy/vendor/domain.te
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# domain.te
|
||||
|
||||
# /sys/kernel/debug/mali
|
||||
allow domain debugfs_mali:dir search;
|
||||
|
||||
# /sys/kernel/debug/mali/mem
|
||||
allow domain debugfs_mali_mem:dir search;
|
||||
|
||||
# /sys/kernel/debug/dma_buf
|
||||
allow domain debugfs_ion_dma:dir search;
|
||||
|
||||
# /sys/kernel/debug/ion
|
||||
allow domain debugfs_ion:dir search;
|
||||
|
||||
# /sys/kernel/debug/tracing/trace_marker
|
||||
allow domain debugfs_trace_marker:file getattr;
|
||||
52
universal7885-common/sepolicy/vendor/file.te
vendored
Normal file
52
universal7885-common/sepolicy/vendor/file.te
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
### efs types
|
||||
type radio_factoryapp_efs_file, file_type;
|
||||
type factoryprop_efs_file, file_type;
|
||||
type sensor_factoryapp_efs_file, file_type;
|
||||
type factorymode_factoryapp_efs_file, file_type;
|
||||
type baro_delta_factoryapp_efs_file, file_type;
|
||||
|
||||
# gps
|
||||
type gps_socket, file_type;
|
||||
|
||||
# debugfs types
|
||||
type debugfs_mali, fs_type, debugfs_type;
|
||||
type debugfs_mali_mem, fs_type, debugfs_type;
|
||||
type debugfs_ion, fs_type, debugfs_type;
|
||||
type debugfs_ion_dma, fs_type, debugfs_type;
|
||||
|
||||
# proc
|
||||
type proc_extra, fs_type, proc_type;
|
||||
type proc_reset_reason, fs_type, proc_type;
|
||||
type proc_swapiness, fs_type, proc_type;
|
||||
|
||||
# data types
|
||||
type display_vendor_data_file, file_type, data_file_type;
|
||||
type fingerprintd_vendor_data_file, data_file_type, file_type;
|
||||
type mediadrm_data_file, file_type, data_file_type;
|
||||
type nfc_vendor_data_file, file_type, data_file_type;
|
||||
|
||||
# sysfs types
|
||||
type sysfs_abox_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_batteryinfo_charger_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_camera_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_decon, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_gpu, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_socinfo, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_v4l, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_v4l_mfc, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_v4l_smfc, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_v4l_fimc, sysfs_type, r_fs_type, fs_type;
|
||||
type sysfs_graphics, fs_type, sysfs_type;
|
||||
type sysfs_multipdp, fs_type, sysfs_type, mlstrustedobject;
|
||||
type sysfs_sec, fs_type, sysfs_type, mlstrustedobject;
|
||||
type sysfs_gps, fs_type, sysfs_type, mlstrustedobject;
|
||||
type sysfs_brightness, fs_type, sysfs_type, mlstrustedobject;
|
||||
type sysfs_virtual, fs_type, sysfs_type, mlstrustedobject;
|
||||
type sysfs_charger, fs_type, sysfs_type, mlstrustedobject;
|
||||
type sysfs_modem, fs_type, sysfs_type, mlstrustedobject;
|
||||
type sysfs_camera, fs_type, sysfs_type, mlstrustedobject;
|
||||
type sysfs_mmc_host_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_ss_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_usb_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_gpu_writable, sysfs_type, rw_fs_type, fs_type;
|
||||
type sysfs_info, sysfs_type, r_fs_type, fs_type;
|
||||
117
universal7885-common/sepolicy/vendor/file_contexts
vendored
Normal file
117
universal7885-common/sepolicy/vendor/file_contexts
vendored
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
####################################
|
||||
# Devices
|
||||
/dev/mali[0-9]* u:object_r:gpu_device:s0
|
||||
/dev/umts_ipc0 u:object_r:radio_device:s0
|
||||
/dev/fimg2d u:object_r:video_device:s0
|
||||
/dev/sec-nfc u:object_r:nfc_device:s0
|
||||
/dev/goodix_fp u:object_r:goodix_device:s0
|
||||
|
||||
/dev/cpuset(/.*)? u:object_r:cgroup:s0
|
||||
|
||||
# camera
|
||||
/dev/m2m1shot_scaler0 u:object_r:m2m1shot_device:s0
|
||||
|
||||
# usb
|
||||
/dev/android_ssusbcon(/.*)? u:object_r:usb_device:s0
|
||||
/dev/mtp_usb* u:object_r:mtp_device:s0
|
||||
/dev/usb(/.*)? u:object_r:usb_device:s0
|
||||
|
||||
# adbroot and storaged
|
||||
/dev/stune(/.*)? u:object_r:cgroup:s0
|
||||
|
||||
# blocks
|
||||
/dev/block/zram0 u:object_r:swap_block_device:s0
|
||||
|
||||
/dev/block/platform/.+/by-name/(omr|OMR)? u:object_r:omr_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(misc|MISC)? u:object_r:misc_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(cpefs|CPEFS)? u:object_r:efs_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(efs|EFS)? u:object_r:efs_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(radio|RADIO)? u:object_r:radio_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(cache|CACHE)? u:object_r:cache_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(system|SYSTEM)? u:object_r:system_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(userdata|USERDATA)? u:object_r:userdata_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(keyrefuge|KEYREFUGE)? u:object_r:keyrefuge_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(persistent|PERSISTENT)? u:object_r:frp_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(boot|BOOT)? u:object_r:boot_block_device:s0
|
||||
/dev/block/platform/.+/by-name/(recovery|RECOVERY)? u:object_r:recovery_block_device:s0
|
||||
|
||||
####################################
|
||||
# efs
|
||||
/mnt/vendor/cpefs(/.*)? u:object_r:efs_file:s0
|
||||
|
||||
####################################
|
||||
# data files
|
||||
/data/vendor/nfc(/.*)? u:object_r:nfc_vendor_data_file:s0
|
||||
|
||||
/data/misc/radio(/.*)? u:object_r:radio_data_file:s0
|
||||
|
||||
# drm
|
||||
/data/vendor/mediadrm(/.*)? u:object_r:mediadrm_data_file:s0
|
||||
|
||||
# camera
|
||||
/data/camera(/.*)? u:object_r:camera_data_file:s0
|
||||
|
||||
####################################
|
||||
# sysfs files
|
||||
|
||||
# charger
|
||||
/sys/devices/battery/power_supply(/.*) u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13840000\.i2c/i2c-10/10-003d/s2mu004-charger/power_supply/s2mu004-charger(/.*) u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13840000\.i2c/i2c-10/10-003d/s2mu004-charger/power_supply/otg(/.*)? u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13840000\.i2c/i2c-10/10-003d/s2mu004-charger/power_supply/s2mu004-charger(/.*)? u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13830000\.i2c/i2c-9/9-003b/power_supply/s2mu004-fuelgauge(/.*)? u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13840000\.i2c/i2c-10/10-003d/s2mu004-muic/power_supply/muic-manager(/.*)? u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13830000\.i2c/i2c-8/8-003b/power_supply/s2mu106-fuelgauge(/.*)? u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13830000\.i2c/i2c-8/8-003c/power_supply/s2mu106-usbpd(/.*)? u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13840000\.i2c/i2c-9/9-003d/s2mu106-powermeter/power_supply/s2mu106_pmeter(/.*)? u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13840000\.i2c/i2c-9/9-003d/s2mu106-muic/power_supply/muic-manager(/.*)? u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13840000\.i2c/i2c-9/9-003d/s2mu106-charger/power_supply/otg(/.*)? u:object_r:sysfs_charger:s0
|
||||
/sys/devices/platform/13840000\.i2c/i2c-9/9-003d/s2mu106-charger/power_supply/s2mu106-charger(/.*)? u:object_r:sysfs_charger:s0
|
||||
|
||||
# virtual
|
||||
/sys/devices/virtual(/.*)? u:object_r:sysfs_virtual:s0
|
||||
|
||||
# iio
|
||||
/sys/bus/iio/devices(/.*)? u:object_r:sysfs_iio:s0
|
||||
|
||||
# Backlight/Notification LED control
|
||||
/sys/class/backlight/panel/brightness u:object_r:sysfs_graphics:s0
|
||||
/sys/class/backlight/panel/max_brightness u:object_r:sysfs_graphics:s0
|
||||
|
||||
# rild
|
||||
/sys/devices/virtual/misc/multipdp(/.*) u:object_r:sysfs_multipdp:s0
|
||||
|
||||
# input
|
||||
/sys/devices/platform/gpio_keys/input/input12(/.*)? u:object_r:sysfs_input:s0
|
||||
|
||||
# modem
|
||||
/sys/module/modem_ctrl_ss310ap/parameters/ds_detect u:object_r:sysfs_modem:s0
|
||||
|
||||
# gps
|
||||
/sys/devices/soc0/machine u:object_r:sysfs_sec_gps:s0
|
||||
/sys/devices/soc0/revision u:object_r:sysfs_sec_gps:s0
|
||||
/dev/gnss_ipc u:object_r:gps_device:s0
|
||||
|
||||
# bt
|
||||
/dev/scsc_h4_0 u:object_r:bt_device:s0
|
||||
|
||||
# ZRAM
|
||||
/sys/devices/virtual/block/zram0/mm_stat u:object_r:sysfs_zram:s0
|
||||
|
||||
### VENDOR
|
||||
/(vendor|system/vendor)/lib(64)?/hw/gralloc\.[a-z0-9]*\.so u:object_r:same_process_hal_file:s0
|
||||
/(vendor|system/vendor)/lib(64)?/libion_exynos\.so u:object_r:same_process_hal_file:s0
|
||||
|
||||
/(vendor|system/vendor)/bin/main_abox u:object_r:abox_exec:s0
|
||||
/(vendor|system/vendor)/bin/wlbtd u:object_r:wlbtd_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/gpsd u:object_r:gpsd_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/macloader u:object_r:macloader_exec:s0
|
||||
/(vendor|system/vendor)/bin/mcDriverDaemon u:object_r:tee_exec:s0
|
||||
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.power@[0-9]\.[0-9]-service\.universal7884B u:object_r:hal_power_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator@[0-9]\.[0-9]-service\.samsung u:object_r:hal_vibrator_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.drm@[0-9]\.[0-9]-service\.clearkey u:object_r:hal_drm_clearkey_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.drm@[0-9]\.[0-9]-service\.widevine u:object_r:hal_drm_widevine_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.keymaster@[0-9]\.[0-9]-service\.samsung u:object_r:hal_keymaster_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/android\.hardware\.nfc@[0-9]\.[0-9]-service\.samsung u:object_r:hal_nfc_default_exec:s0
|
||||
/(vendor|system/vendor)/bin/hw/vendor\.samsung\.hardware\.gnss@[0-9]\.[0-9]-service u:object_r:hal_gnss_default_exec:s0
|
||||
4
universal7885-common/sepolicy/vendor/fsck.te
vendored
Normal file
4
universal7885-common/sepolicy/vendor/fsck.te
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
allow fsck cache_file:dir getattr;
|
||||
allow fsck sysfs_battery:dir search;
|
||||
allow fsck tmpfs:blk_file getattr;
|
||||
allow fsck efs_block_device:blk_file rw_file_perms;
|
||||
58
universal7885-common/sepolicy/vendor/genfs_contexts
vendored
Normal file
58
universal7885-common/sepolicy/vendor/genfs_contexts
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# DEBUGFS
|
||||
genfscon debugfs /mali/ u:object_r:debugfs_mali:s0
|
||||
genfscon debugfs /mali/mem/ u:object_r:debugfs_mali_mem:s0
|
||||
|
||||
# ion debugfs
|
||||
genfscon debugfs /ion/ u:object_r:debugfs_ion:s0
|
||||
genfscon debugfs /dma_buf u:object_r:debugfs_ion_dma:s0
|
||||
|
||||
# PROC
|
||||
genfscon proc /extra u:object_r:proc_extra:s0
|
||||
genfscon proc /reset_reason u:object_r:proc_reset_reason:s0
|
||||
genfscon proc /sys/vm/swappiness u:object_r:proc_swapiness:s0
|
||||
|
||||
# SYSFS
|
||||
|
||||
# class
|
||||
genfscon sysfs /class/video4linux u:object_r:sysfs_v4l:s0
|
||||
genfscon sysfs /class/input/input1 u:object_r:sysfs_input:s0
|
||||
|
||||
# devices
|
||||
genfscon sysfs /devices/platform/10000.mif_pdata/sim/ds_detect u:object_r:sysfs_sim_writable:s0
|
||||
genfscon sysfs /module/scsc_bt/parameters/bluetooth_address u:object_r:sysfs_bt_writable:s0
|
||||
genfscon sysfs /devices/platform/11ce0000.speedy/i2c-7/7-0000/s2mpu08-rtc/rtc u:object_r:sysfs_rtc:s0
|
||||
genfscon sysfs /devices/platform/11ce0000.speedy/i2c-6/6-0000/s2mpu08-rtc/rtc u:object_r:sysfs_rtc:s0
|
||||
genfscon sysfs /devices/platform/11ce0000.speedy/i2c-7/7-0003/input/input11 u:object_r:sysfs_touchscreen_writable:s0
|
||||
genfscon sysfs /devices/platform/13930000.hsi2c/i2c-5/5-0048/input/ u:object_r:sysfs_touchscreen_writable:s0
|
||||
genfscon sysfs /devices/platform/14870000.dsim/backlight/panel u:object_r:sysfs_graphics:s0
|
||||
genfscon sysfs /devices/platform/14a50000.abox/service u:object_r:sysfs_abox_writable:s0
|
||||
genfscon sysfs /devices/platform/14860000.decon_f u:object_r:sysfs_decon:s0
|
||||
genfscon sysfs /devices/platform/14410000.fimc_is_sensor/video4linux u:object_r:sysfs_v4l_fimc:s0
|
||||
genfscon sysfs /devices/platform/14430000.fimc_is_sensor/video4linux u:object_r:sysfs_v4l_fimc:s0
|
||||
genfscon sysfs /devices/platform/14400000.fimc_is_sensor/video4linux u:object_r:sysfs_v4l_fimc:s0
|
||||
genfscon sysfs /devices/platform/14440000.fimc_is/video4linux u:object_r:sysfs_v4l_fimc:s0
|
||||
genfscon sysfs /devices/platform/12c30000.mfc0/video4linux u:object_r:sysfs_v4l_mfc:s0
|
||||
genfscon sysfs /devices/platform/12c00000.smfc/video4linux u:object_r:sysfs_v4l_smfc:s0
|
||||
genfscon sysfs /devices/platform/battery/power_supply/battery u:object_r:sysfs_battery_writable:s0
|
||||
genfscon sysfs /devices/platform/battery/power_supply/battery/batt_capacity_max u:object_r:sysfs_battery_writable:s0
|
||||
genfscon sysfs /devices/platform/battery/power_supply/battery/status u:object_r:sysfs_battery_writable:s0
|
||||
genfscon sysfs /devices/platform/battery/power_supply/battery/type u:object_r:sysfs_battery_writable:s0
|
||||
genfscon sysfs /devices/platform/battery/power_supply/ac/type u:object_r:sysfs_battery_writable:s0
|
||||
genfscon sysfs /devices/platform/battery/power_supply/wireless/type u:object_r:sysfs_battery_writable:s0
|
||||
genfscon sysfs /devices/platform/battery/power_supply/ps/type u:object_r:sysfs_battery_writable:s0
|
||||
genfscon sysfs /devices/platform/battery/power_supply/ps/status u:object_r:sysfs_battery_writable:s0
|
||||
|
||||
genfscon sysfs /devices/soc0/soc_id u:object_r:sysfs_socinfo:s0
|
||||
genfscon sysfs /devices/system/chip-id/revision u:object_r:sysfs_ss_writable:s0
|
||||
|
||||
genfscon sysfs /devices/virtual/android_usb/android0 u:object_r:sysfs_android_usb:s0
|
||||
genfscon sysfs /devices/virtual/camera u:object_r:sysfs_camera:s0
|
||||
genfscon sysfs /devices/virtual/camera/rear/fw_update u:object_r:sysfs_camera_writable:s0
|
||||
genfscon sysfs /devices/virtual/camera/rear/ssrm_camera_info u:object_r:sysfs_camera_writable:s0
|
||||
genfscon sysfs /devices/virtual/camera/flash/rear_flash u:object_r:sysfs_camera_writable:s0
|
||||
|
||||
genfscon sysfs /firmware/devicetree/base/model_info-system_rev u:object_r:sysfs_info:s0
|
||||
|
||||
genfscon sysfs /kernel/gpu/ u:object_r:sysfs_gpu:s0
|
||||
genfscon sysfs /kernel/gpu/gpu_max_clock u:object_r:sysfs_gpu_writable:s0
|
||||
genfscon sysfs /kernel/gpu/gpu_min_clock u:object_r:sysfs_gpu_writable:s0
|
||||
12
universal7885-common/sepolicy/vendor/gpsd.te
vendored
Normal file
12
universal7885-common/sepolicy/vendor/gpsd.te
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
r_dir_file(gpsd, sysfs_sec_gps);
|
||||
|
||||
allow gpsd sysfs_gps_writable:file rw_file_perms;
|
||||
allow gpsd sysfs_wake_lock:file rw_file_perms;
|
||||
|
||||
allow gpsd self:capability net_raw;
|
||||
allow gpsd self:capability2 block_suspend;
|
||||
|
||||
allow gpsd bt_device:chr_file rw_file_perms;
|
||||
allow gpsd gps_device:chr_file rw_file_perms;
|
||||
|
||||
allow gpsd gpsd_exec:file execute_no_trans;
|
||||
1
universal7885-common/sepolicy/vendor/gpuservice.te
vendored
Normal file
1
universal7885-common/sepolicy/vendor/gpuservice.te
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
get_prop(gpuservice, graphics_config_prop)
|
||||
14
universal7885-common/sepolicy/vendor/hal_audio_default.te
vendored
Normal file
14
universal7885-common/sepolicy/vendor/hal_audio_default.te
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
allow hal_audio_default property_socket:sock_file write;
|
||||
allow hal_audio_default rild:unix_stream_socket connectto;
|
||||
allow hal_audio_default system_suspend_hwservice:hwservice_manager find;
|
||||
|
||||
# /efs/maxim/rdc_cal
|
||||
allow hal_audio_default efs_file:file r_file_perms;
|
||||
allow hal_audio_default efs_file:dir search;
|
||||
|
||||
allow hal_audio_default imei_efs_file:dir search;
|
||||
allow hal_audio_default imei_efs_file:file r_file_perms;
|
||||
|
||||
get_prop(hal_audio_default, vendor_radio_prop)
|
||||
|
||||
allow hal_audio_default init:unix_stream_socket connectto;
|
||||
1
universal7885-common/sepolicy/vendor/hal_bluetooth_default.te
vendored
Normal file
1
universal7885-common/sepolicy/vendor/hal_bluetooth_default.te
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
allow hal_bluetooth_default vendor_firmware_file:dir r_dir_perms;
|
||||
14
universal7885-common/sepolicy/vendor/hal_camera_default.te
vendored
Normal file
14
universal7885-common/sepolicy/vendor/hal_camera_default.te
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
vndbinder_use(hal_camera_default)
|
||||
|
||||
allow hal_camera_default vndbinder_device:chr_file r_file_perms;
|
||||
allow hal_camera_default hal_graphics_mapper_hwservice:hwservice_manager find;
|
||||
allow hal_camera_default hal_graphics_composer_default:fd use;
|
||||
allow hal_camera_default sysfs_virtual:dir search;
|
||||
allow hal_camera_default sysfs_virtual:file rw_file_perms;
|
||||
allow hal_camera_default sysfs_camera:dir search;
|
||||
allow hal_camera_default sysfs_camera:file rw_file_perms;
|
||||
|
||||
get_prop(hal_camera_default, exported_camera_prop)
|
||||
|
||||
binder_call(hal_camera_default, system_server)
|
||||
binder_call(system_server, hal_camera_default)
|
||||
14
universal7885-common/sepolicy/vendor/hal_drm_clearkey.te
vendored
Normal file
14
universal7885-common/sepolicy/vendor/hal_drm_clearkey.te
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# policy for /vendor/bin/hw/android.hardware.drm clearkey service
|
||||
type hal_drm_clearkey, domain;
|
||||
type hal_drm_clearkey_exec, exec_type, vendor_file_type, file_type;
|
||||
|
||||
init_daemon_domain(hal_drm_clearkey)
|
||||
|
||||
hal_server_domain(hal_drm_clearkey, hal_drm)
|
||||
|
||||
vndbinder_use(hal_drm_clearkey)
|
||||
|
||||
allow hal_drm_clearkey { appdomain -isolated_app }:fd use;
|
||||
|
||||
allow hal_drm_clearkey mediadrm_data_file:dir create_dir_perms;
|
||||
allow hal_drm_clearkey mediadrm_data_file:file create_file_perms;
|
||||
21
universal7885-common/sepolicy/vendor/hal_drm_widevine.te
vendored
Normal file
21
universal7885-common/sepolicy/vendor/hal_drm_widevine.te
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
type hal_drm_widevine, domain;
|
||||
type hal_drm_widevine_exec, exec_type, vendor_file_type, file_type;
|
||||
|
||||
init_daemon_domain(hal_drm_widevine)
|
||||
|
||||
hal_server_domain(hal_drm_widevine, hal_drm)
|
||||
|
||||
vndbinder_use(hal_drm_widevine)
|
||||
|
||||
allow hal_drm_widevine mediacodec:fd use;
|
||||
allow hal_drm_widevine { appdomain -isolated_app }:fd use;
|
||||
|
||||
allow hal_drm_widevine hal_allocator_server:fd use;
|
||||
|
||||
allow hal_drm_widevine mediadrm_data_file:dir create_dir_perms;
|
||||
allow hal_drm_widevine mediadrm_data_file:file create_file_perms;
|
||||
allow hal_drm_widevine vendor_data_file:dir create_dir_perms;
|
||||
allow hal_drm_widevine vendor_data_file:file create_file_perms;
|
||||
|
||||
allow hal_drm_widevine cpk_efs_file:file r_file_perms;
|
||||
allow hal_drm_widevine efs_file:dir search;
|
||||
7
universal7885-common/sepolicy/vendor/hal_fingerprint_default.te
vendored
Normal file
7
universal7885-common/sepolicy/vendor/hal_fingerprint_default.te
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
typeattribute hal_fingerprint_default data_between_core_and_vendor_violators;
|
||||
|
||||
allow hal_fingerprint_default fingerprintd_data_file:dir write;
|
||||
allow hal_fingerprint_default sysfs_virtual:dir search;
|
||||
allow hal_fingerprint_default sysfs_virtual:file r_file_perms;
|
||||
|
||||
allow hal_fingerprint_default goodix_device:chr_file rw_file_perms;
|
||||
3
universal7885-common/sepolicy/vendor/hal_gatekeeper_default.te
vendored
Normal file
3
universal7885-common/sepolicy/vendor/hal_gatekeeper_default.te
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
allow hal_gatekeeper_default efs_file:dir search;
|
||||
allow hal_gatekeeper_default efs_file:file rw_file_perms;
|
||||
allow hal_gatekeeper_default mnt_vendor_file:dir search;
|
||||
19
universal7885-common/sepolicy/vendor/hal_gnss_default.te
vendored
Normal file
19
universal7885-common/sepolicy/vendor/hal_gnss_default.te
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# cgroups tasks
|
||||
allow hal_gnss_default cgroup:file getattr;
|
||||
|
||||
# /data/vendor/gps
|
||||
allow hal_gnss_default gps_vendor_data_file:dir rw_dir_perms;
|
||||
allow hal_gnss_default gps_vendor_data_file:file create_file_perms;
|
||||
allow hal_gnss_default gps_vendor_data_file:fifo_file create_file_perms;
|
||||
|
||||
# /mnt/vendor
|
||||
allow hal_gnss_default mnt_vendor_file:dir search;
|
||||
|
||||
# vndbinder
|
||||
allow hal_gnss_default vndbinder_device:chr_file rw_file_perms;
|
||||
|
||||
# Connect to socket
|
||||
allow hal_gnss_default gpsd:unix_stream_socket connectto;
|
||||
|
||||
add_hwservice(hal_gnss_default, hal_gnss_hwservice)
|
||||
allow hal_gnss_default fwk_sensor_hwservice:hwservice_manager find;
|
||||
7
universal7885-common/sepolicy/vendor/hal_graphics_allocator_default.te
vendored
Normal file
7
universal7885-common/sepolicy/vendor/hal_graphics_allocator_default.te
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
allow hal_graphics_allocator_default cgroup:file rw_file_perms;
|
||||
|
||||
vndbinder_use(hal_graphics_allocator_default)
|
||||
|
||||
# /sys/kernel/debug/dma_buf/footprint/[0-9]+
|
||||
allow hal_graphics_allocator_default debugfs_ion_dma:dir r_dir_perms;
|
||||
allow hal_graphics_allocator_default debugfs_ion_dma:file r_file_perms;
|
||||
40
universal7885-common/sepolicy/vendor/hal_graphics_composer_default.te
vendored
Normal file
40
universal7885-common/sepolicy/vendor/hal_graphics_composer_default.te
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
hal_client_domain(hal_graphics_composer_default, hal_graphics_allocator);
|
||||
|
||||
vndbinder_use(hal_graphics_composer_default)
|
||||
|
||||
allow hal_graphics_composer_default self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
|
||||
|
||||
allow hal_graphics_composer_default vendor_surfaceflinger_vndservice:service_manager { add find };
|
||||
|
||||
# cgroup tasks
|
||||
allow hal_graphics_composer_default cgroup:file getattr;
|
||||
|
||||
# /data/vendor/log/hwc
|
||||
allow hal_graphics_composer_default log_vendor_data_file:dir rw_dir_perms;
|
||||
allow hal_graphics_composer_default log_vendor_data_file:file create_file_perms;
|
||||
|
||||
# /dev/g2d
|
||||
allow hal_graphics_composer_default graphics_device:chr_file rw_file_perms;
|
||||
|
||||
# /dev/video50
|
||||
allow hal_graphics_composer_default video_device:chr_file rw_file_perms;
|
||||
|
||||
# /sys/devices/soc0/revision
|
||||
allow hal_graphics_composer_default sysfs_socinfo:dir r_dir_perms;
|
||||
allow hal_graphics_composer_default sysfs_socinfo:file r_file_perms;
|
||||
|
||||
|
||||
# /sys/kernel/debug/dma_buf/footprint/[0-9]+
|
||||
allow hal_graphics_composer_default debugfs_ion_dma:dir r_dir_perms;
|
||||
allow hal_graphics_composer_default debugfs_ion_dma:file r_file_perms;
|
||||
|
||||
allow hal_graphics_composer_default sysfs_decon:dir r_dir_perms;
|
||||
allow hal_graphics_composer_default sysfs_decon:file r_file_perms;
|
||||
|
||||
allow hal_graphics_composer_default sysfs_ss_writable:dir r_dir_perms;
|
||||
allow hal_graphics_composer_default sysfs_ss_writable:file r_file_perms;
|
||||
|
||||
get_prop(hal_graphics_composer_default, vendor_hwc_prop)
|
||||
|
||||
# /dev/ion/
|
||||
allow hal_graphics_composer_default ion_device:chr_file rw_file_perms;
|
||||
7
universal7885-common/sepolicy/vendor/hal_health_default.te
vendored
Normal file
7
universal7885-common/sepolicy/vendor/hal_health_default.te
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
r_dir_file(hal_health_default, sysfs_charger)
|
||||
|
||||
allow hal_health_default sysfs_charger:file rw_file_perms;
|
||||
allow hal_health_default sysfs_battery:dir r_dir_perms;
|
||||
allow hal_health_default sysfs_battery:file r_file_perms;
|
||||
allow hal_health_default sysfs_battery_writable:dir search;
|
||||
allow hal_health_default sysfs_battery_writable:file r_file_perms;
|
||||
4
universal7885-common/sepolicy/vendor/hal_light_default.te
vendored
Normal file
4
universal7885-common/sepolicy/vendor/hal_light_default.te
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
allow hal_light_default sysfs_graphics:dir search;
|
||||
allow hal_light_default sysfs_graphics:file rw_file_perms;
|
||||
allow hal_light_default sysfs_virtual:dir search;
|
||||
allow hal_light_default sysfs_virtual:file rw_file_perms;
|
||||
2
universal7885-common/sepolicy/vendor/hal_lineage_fastcharge_default.te
vendored
Normal file
2
universal7885-common/sepolicy/vendor/hal_lineage_fastcharge_default.te
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
allow hal_lineage_fastcharge_default sysfs_virtual:dir search;
|
||||
allow hal_lineage_fastcharge_default sysfs_virtual:file rw_file_perms;
|
||||
2
universal7885-common/sepolicy/vendor/hal_lineage_touch_default.te
vendored
Normal file
2
universal7885-common/sepolicy/vendor/hal_lineage_touch_default.te
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
allow hal_lineage_touch_default sysfs_virtual:dir search;
|
||||
allow hal_lineage_touch_default sysfs_virtual:file rw_file_perms;
|
||||
5
universal7885-common/sepolicy/vendor/hal_memtrack_default.te
vendored
Normal file
5
universal7885-common/sepolicy/vendor/hal_memtrack_default.te
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
r_dir_file(hal_memtrack_default, debugfs_mali)
|
||||
r_dir_file(hal_memtrack_default, debugfs_mali_mem)
|
||||
r_dir_file(hal_memtrack_default, debugfs_ion)
|
||||
r_dir_file(hal_memtrack_default, debugfs_ion_dma)
|
||||
r_dir_file(hal_memtrack_default, sysfs_gpu)
|
||||
4
universal7885-common/sepolicy/vendor/hal_nfc_default.te
vendored
Normal file
4
universal7885-common/sepolicy/vendor/hal_nfc_default.te
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
allow hal_nfc_default nfc_vendor_data_file:dir w_dir_perms;
|
||||
allow hal_nfc_default nfc_vendor_data_file:file create_file_perms;
|
||||
|
||||
set_prop(hal_nfc_default, vendor_nfc_prop)
|
||||
6
universal7885-common/sepolicy/vendor/hal_power_default.te
vendored
Normal file
6
universal7885-common/sepolicy/vendor/hal_power_default.te
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
allow hal_power_default sysfs_graphics:dir search;
|
||||
allow hal_power_default sysfs_graphics:file r_file_perms;
|
||||
allow hal_power_default sysfs_input:file r_file_perms;
|
||||
allow hal_power_default sysfs_virtual:dir r_dir_perms;
|
||||
allow hal_power_default sysfs_virtual:file r_file_perms;
|
||||
allow hal_power_default sysfs_touchscreen_writable:dir r_dir_perms;
|
||||
12
universal7885-common/sepolicy/vendor/hal_sensors_default.te
vendored
Normal file
12
universal7885-common/sepolicy/vendor/hal_sensors_default.te
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
allow hal_sensors_default sysfs_iio:file r_file_perms;
|
||||
allow hal_sensors_default sysfs_iio:lnk_file read;
|
||||
allow hal_sensors_default sysfs_virtual:dir r_dir_perms;
|
||||
allow hal_sensors_default sysfs_virtual:file rw_file_perms;
|
||||
allow hal_sensors_default sysfs_virtual:lnk_file read;
|
||||
allow hal_sensors_default baro_delta_factoryapp_efs_file:file r_file_perms;
|
||||
allow hal_sensors_default sysfs_input:file read;
|
||||
allow hal_sensors_default sysfs_spi_writeable:file rw_file_perms;
|
||||
|
||||
# yas_lib
|
||||
allow hal_sensors_default vendor_data_file:file create_file_perms;
|
||||
allow hal_sensors_default vendor_data_file:dir create_dir_perms;
|
||||
1
universal7885-common/sepolicy/vendor/hal_thermal_default.te
vendored
Normal file
1
universal7885-common/sepolicy/vendor/hal_thermal_default.te
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
r_dir_file(hal_thermal_default, sysfs_virtual)
|
||||
2
universal7885-common/sepolicy/vendor/hal_vibrator_default.te
vendored
Normal file
2
universal7885-common/sepolicy/vendor/hal_vibrator_default.te
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
allow hal_vibrator_default sysfs_virtual:dir search;
|
||||
allow hal_vibrator_default sysfs_virtual:file rw_file_perms;
|
||||
7
universal7885-common/sepolicy/vendor/hal_wifi_default.te
vendored
Normal file
7
universal7885-common/sepolicy/vendor/hal_wifi_default.te
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
set_prop(hal_wifi_default, vendor_wlan_prop);
|
||||
get_prop(hal_wifi_default, vendor_wifi_prop)
|
||||
|
||||
allow hal_wifi_default conn_vendor_data_file:dir search;
|
||||
allow hal_wifi_default conn_vendor_data_file:file rw_file_perms;
|
||||
allow hal_wifi_default wifi_vendor_data_file:dir search;
|
||||
|
||||
2
universal7885-common/sepolicy/vendor/hal_wifi_hostapd_default.te
vendored
Normal file
2
universal7885-common/sepolicy/vendor/hal_wifi_hostapd_default.te
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
allow hal_wifi_hostapd_default sysfs_virtual:dir search;
|
||||
allow hal_wifi_hostapd_default sysfs_virtual:lnk_file r_file_perms;
|
||||
3
universal7885-common/sepolicy/vendor/hwservice.te
vendored
Normal file
3
universal7885-common/sepolicy/vendor/hwservice.te
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
type hal_sec_radio_hwservice, hwservice_manager_type;
|
||||
type hal_sec_radio_bridge_hwservice, hwservice_manager_type;
|
||||
type hal_sec_radio_channel_hwservice, hwservice_manager_type;
|
||||
4
universal7885-common/sepolicy/vendor/hwservice_contexts
vendored
Normal file
4
universal7885-common/sepolicy/vendor/hwservice_contexts
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
vendor.samsung.hardware.gnss::ISehGnss u:object_r:hal_gnss_hwservice:s0
|
||||
vendor.samsung.hardware.radio::ISehRadio u:object_r:hal_sec_radio_hwservice:s0
|
||||
vendor.samsung.hardware.radio.bridge::ISehBridge u:object_r:hal_sec_radio_bridge_hwservice:s0
|
||||
vendor.samsung.hardware.radio.channel::ISehChannel u:object_r:hal_sec_radio_channel_hwservice:s0
|
||||
48
universal7885-common/sepolicy/vendor/init.te
vendored
Normal file
48
universal7885-common/sepolicy/vendor/init.te
vendored
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
allow init rild:unix_stream_socket connectto;
|
||||
allow init self:netlink_kobject_uevent_socket create_socket_perms_no_ioctl;
|
||||
allow init socket_device:sock_file create_file_perms;
|
||||
allow init sysfs_devices_system_cpu:file write;
|
||||
allow init vendor_data_file:fifo_file write;
|
||||
allow init vendor_data_file:file append;
|
||||
allow init dnsproxyd_socket:sock_file write;
|
||||
allow init fwk_sensor_hwservice:hwservice_manager find;
|
||||
allow init hwservicemanager:binder call;
|
||||
allow init netd:unix_stream_socket connectto;
|
||||
allow init fwmarkd_socket:sock_file write;
|
||||
allow init nfc:binder call;
|
||||
allow init nfc_device:chr_file ioctl;
|
||||
allow init efs_file:dir mounton;
|
||||
allow init efs_block_device:lnk_file relabelto;
|
||||
allow init tmpfs:lnk_file create;
|
||||
|
||||
allow init sysfs_virtual:file create_file_perms;
|
||||
allow init sysfs_virtual:lnk_file { read };
|
||||
allow init sysfs:file setattr;
|
||||
allow init sysfs_multipdp:file setattr;
|
||||
allow init sysfs_camera:file setattr;
|
||||
allow init sysfs_charger:file setattr;
|
||||
allow init sysfs_input:file setattr;
|
||||
allow init sysfs_modem:file w_file_perms;
|
||||
allow init sysfs_battery_writable:file setattr;
|
||||
allow init sysfs_power_writable:file setattr;
|
||||
allow init sysfs_graphics:file create_file_perms;
|
||||
|
||||
allow init system_server:binder { transfer call };
|
||||
allow init device:chr_file ioctl;
|
||||
allow init self:tcp_socket create_socket_perms;
|
||||
allow init node:tcp_socket node_bind;
|
||||
allow init port:tcp_socket { name_bind name_connect };
|
||||
allow init gps_vendor_data_file:fifo_file write;
|
||||
allow init gps_vendor_data_file:file lock;
|
||||
allow init socket_device:sock_file create_file_perms;
|
||||
allow init kernel:system module_request;
|
||||
|
||||
allow init proc:file setattr;
|
||||
allow init proc_swapiness:file write;
|
||||
allow init proc_extra:file setattr;
|
||||
allow init proc_reset_reason:file setattr;
|
||||
allow init proc_swapiness:file open;
|
||||
allow init self:netlink_generic_socket { bind create getattr read setopt write };
|
||||
allow init mnt_vendor_file:dir mounton;
|
||||
|
||||
unix_socket_connect(init, property, rild)
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue