[SQUASH]: s3ve3g-common: initial bringup of s3ve3g-common repo from klte-common base
* Rename klte-common -> s3ve3g-common * Drop fingerprint related blobs * Drop camera shim, we do not need it * Drop CameraWrapper to msm8226-common, as all msm8226 devices uses it * Drop broadcom NFC * Add buildable libpn547_fw.c, libpn547_fw_pku.c, libpn547_fw_platform.c dumped from stock S III Neo sources * Update audio configs with stock S III Neo ones * Update power_ext for S III Neo * Drop broadcom WIFI for Qualcomm WIFI as we got a Qualcomm WIFI chip * Drop broadcom bluetooth as we goot a Qualcomm bluetooth chip * Update partitions for S III Neo * Update rootdir for S III Neo * Update overlay for S III Neo * Update liblights path for S III Neo * Update deviceperms for S III Neo * Drop consumerir as we do not got an IR blaster * Update TWRP files for S III Neo
This commit is contained in:
parent
91c93931d9
commit
7d50f4fbfa
91 changed files with 8225 additions and 11511 deletions
|
@ -16,6 +16,6 @@
|
|||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
ifneq ($(filter klte klteactivexx kltechn kltechnduo klteduos kltedv kltekdi kltekor kltespr kltesprsports klteusc kltevzw,$(TARGET_DEVICE)),)
|
||||
ifneq ($(filter s3ve3g s3ve3gxx s3ve3gjv s3ve3gds,$(TARGET_DEVICE)),)
|
||||
include $(call all-subdir-makefiles,$(LOCAL_PATH))
|
||||
endif
|
||||
|
|
|
@ -13,25 +13,29 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# inherit from common msm8974
|
||||
-include device/samsung/msm8974-common/BoardConfigCommon.mk
|
||||
# inherit from common msm8226
|
||||
-include device/samsung/msm8226-common/BoardConfigCommon.mk
|
||||
|
||||
COMMON_PATH := device/samsung/klte-common
|
||||
COMMON_PATH := device/samsung/s3ve3g-common
|
||||
|
||||
TARGET_SPECIFIC_HEADER_PATH := $(COMMON_PATH)/include
|
||||
|
||||
# Assert
|
||||
TARGET_OTA_ASSERT_DEVICE := s3ve3g,s3ve3gds,s3ve3gjv
|
||||
|
||||
# Audio
|
||||
BOARD_HAVE_NEW_QCOM_CSDCLIENT := true
|
||||
USE_CUSTOM_AUDIO_POLICY := 1
|
||||
|
||||
# Bluetooth
|
||||
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(COMMON_PATH)/bluetooth
|
||||
BOARD_CUSTOM_BT_CONFIG := $(COMMON_PATH)/bluetooth/vnd_klte.txt
|
||||
BOARD_HAVE_BLUETOOTH_BCM := true
|
||||
BOARD_HAVE_SAMSUNG_BLUETOOTH := true
|
||||
BOARD_HAVE_BLUETOOTH_QCOM := true
|
||||
BLUETOOTH_HCI_USE_MCT := true
|
||||
|
||||
# Bootloader
|
||||
TARGET_BOOTLOADER_BOARD_NAME := MSM8974
|
||||
TARGET_BOOTLOADER_BOARD_NAME := MSM8226
|
||||
|
||||
# Build
|
||||
BLOCK_BASED_OTA := true
|
||||
|
||||
# Camera
|
||||
USE_DEVICE_SPECIFIC_CAMERA := true
|
||||
|
@ -42,33 +46,34 @@ TARGET_EXFAT_DRIVER := sdfat
|
|||
# HIDL
|
||||
DEVICE_MANIFEST_FILE += $(COMMON_PATH)/manifest.xml
|
||||
|
||||
# FM
|
||||
BOARD_HAVE_QCOM_FM := true
|
||||
TARGET_QCOM_NO_FM_FIRMWARE := true
|
||||
|
||||
# Kernel
|
||||
BOARD_KERNEL_BASE := 0x00000000
|
||||
BOARD_KERNEL_CMDLINE := console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3 zcache.enabled=1 zcache.compressor=lz4 maxcpus=1
|
||||
BOARD_KERNEL_CMDLINE := console=null androidboot.console=null androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 zcache.enabled=1 zcache.compressor=lz4 maxcpus=1
|
||||
BOARD_KERNEL_IMAGE_NAME := zImage
|
||||
BOARD_KERNEL_PAGESIZE := 2048
|
||||
BOARD_KERNEL_SEPARATED_DT := true
|
||||
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000 --tags_offset 0x01e00000
|
||||
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000 --tags_offset 0x1e00000
|
||||
BOARD_CUSTOM_BOOTIMG := true
|
||||
BOARD_CUSTOM_BOOTIMG_MK := hardware/samsung/mkbootimg.mk
|
||||
LZMA_RAMDISK_TARGETS := recovery
|
||||
TARGET_KERNEL_SOURCE := kernel/samsung/msm8974
|
||||
TARGET_KERNEL_SOURCE := kernel/samsung/msm8226
|
||||
|
||||
# Legacy BLOB Support
|
||||
TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS := true
|
||||
TARGET_LD_SHIM_LIBS += \
|
||||
/system/vendor/lib/hw/camera.vendor.msm8974.so|libshim_camera.so
|
||||
|
||||
# Partitions
|
||||
BOARD_BOOTIMAGE_PARTITION_SIZE := 13631488
|
||||
BOARD_CACHEIMAGE_PARTITION_SIZE := 157286400
|
||||
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 15728640
|
||||
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2411724800
|
||||
BOARD_USERDATAIMAGE_PARTITION_SIZE := 2411724800
|
||||
BOARD_FLASH_BLOCK_SIZE := 131072
|
||||
BOARD_BOOTIMAGE_PARTITION_SIZE := 10485760
|
||||
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 10485760
|
||||
BOARD_CACHEIMAGE_PARTITION_SIZE := 721420288
|
||||
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2097152000
|
||||
BOARD_USERDATAIMAGE_PARTITION_SIZE := 12562627584
|
||||
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
|
||||
BOARD_FLASH_BLOCK_SIZE := 131072
|
||||
TARGET_USERIMAGES_USE_EXT4 := true
|
||||
TARGET_USERIMAGES_USE_F2FS := true
|
||||
|
||||
# Power HAL
|
||||
TARGET_POWERHAL_SET_INTERACTIVE_EXT := $(COMMON_PATH)/power/power_ext.c
|
||||
|
@ -105,20 +110,5 @@ endif
|
|||
# Use Snapdragon LLVM if available on build server
|
||||
TARGET_USE_SDCLANG := true
|
||||
|
||||
# Wifi
|
||||
BOARD_HAVE_SAMSUNG_WIFI := true
|
||||
BOARD_WLAN_DEVICE := bcmdhd
|
||||
BOARD_HOSTAPD_DRIVER := NL80211
|
||||
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
||||
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
|
||||
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
|
||||
WPA_SUPPLICANT_VERSION := VER_0_8_X
|
||||
WIFI_BAND := 802_11_ABG
|
||||
WIFI_DRIVER_MODULE_ARG := "firmware_path=/vendor/etc/wifi/bcmdhd_sta.bin nvram_path=/vendor/etc/wifi/nvram_net.txt"
|
||||
WIFI_DRIVER_MODULE_AP_ARG := "firmware_path=/vendor/etc/wifi/bcmdhd_apsta.bin nvram_path=/vendor/etc/wifi/nvram_net.txt"
|
||||
WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/dhd/parameters/firmware_path"
|
||||
WIFI_DRIVER_FW_PATH_STA := "/vendor/etc/wifi/bcmdhd_sta.bin"
|
||||
WIFI_DRIVER_FW_PATH_AP := "/vendor/etc/wifi/bcmdhd_apsta.bin"
|
||||
|
||||
# inherit from the proprietary version
|
||||
-include vendor/samsung/klte-common/BoardConfigVendor.mk
|
||||
-include vendor/samsung/s3ve3g-common/BoardConfigVendor.mk
|
||||
|
|
2
README
2
README
|
@ -1,5 +1,5 @@
|
|||
Copyright 2014 - The CyanogenMod Project
|
||||
|
||||
Common device configuration for Samsung Galaxy S5.
|
||||
Common device configuration for Samsung Galaxy S III Neo.
|
||||
|
||||
WORK IN PROGRESS. WILL EAT YOUR CAT.
|
||||
|
|
|
@ -275,3 +275,4 @@ effects {
|
|||
#
|
||||
# TODO: add default audio pre processor configurations after debug and tuning phase
|
||||
#
|
||||
|
||||
|
|
|
@ -29,24 +29,19 @@
|
|||
<!-- Output devices -->
|
||||
<device name="SND_DEVICE_OUT_SPEAKER" acdb_id="15" />
|
||||
<device name="SND_DEVICE_OUT_SPEAKER_REVERSE" acdb_id="15" />
|
||||
<device name="SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES" acdb_id="19" />
|
||||
<device name="SND_DEVICE_OUT_VOICE_SPEAKER" acdb_id="15" />
|
||||
<device name="SND_DEVICE_OUT_BT_SCO" acdb_id="48" />
|
||||
<device name="SND_DEVICE_OUT_BT_SCO_WB" acdb_id="50" />
|
||||
<device name="SND_DEVICE_OUT_VOICE_TTY_FULL_HEADPHONES" acdb_id="17" />
|
||||
<device name="SND_DEVICE_OUT_VOICE_TTY_VCO_HEADPHONES" acdb_id="17" />
|
||||
<device name="SND_DEVICE_OUT_VOICE_TTY_HCO_HANDSET" acdb_id="7" />
|
||||
<device name="SND_DEVICE_OUT_USB_HEADSET" acdb_id="98" />
|
||||
|
||||
<!-- Input devices -->
|
||||
<device name="SND_DEVICE_IN_HANDSET_DMIC" acdb_id="4" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_DMIC" acdb_id="11" />
|
||||
<device name="SND_DEVICE_IN_BT_SCO_MIC" acdb_id="49" />
|
||||
<device name="SND_DEVICE_IN_BT_SCO_MIC_WB" acdb_id="51" />
|
||||
<device name="SND_DEVICE_IN_CAMCORDER_MIC" acdb_id="56" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_MIC" acdb_id="4" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_DMIC" acdb_id="4" />
|
||||
<device name="SND_DEVICE_IN_VOICE_DMIC" acdb_id="4" />
|
||||
<device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC" acdb_id="11" />
|
||||
<device name="SND_DEVICE_IN_VOICE_REC_MIC" acdb_id="53" />
|
||||
<device name="SND_DEVICE_IN_VOICE_SPEAKER_MIC" acdb_id="4" />
|
||||
<device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC" acdb_id="4" />
|
||||
<device name="SND_DEVICE_IN_VOIP_HANDSET_MIC" acdb_id="57" />
|
||||
<device name="SND_DEVICE_IN_VOIP_SPEAKER_MIC" acdb_id="64" />
|
||||
</acdb_ids>
|
||||
|
||||
<backend_names>
|
||||
|
@ -73,26 +68,28 @@
|
|||
<device name="SND_DEVICE_IN_HANDSET_DMIC_NS" alias="voice-call-NS-mic-handset" />
|
||||
<device name="SND_DEVICE_IN_HANDSET_DMIC_AEC" alias="voice-call-main-mic" />
|
||||
<device name="SND_DEVICE_IN_HANDSET_DMIC_AEC_NS" alias="voice-call-main-mic" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_MIC" alias="rec-sub-mic" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_DMIC" alias="voice-call-sub-mic" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_MIC" alias="rec-main-mic" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_DMIC" alias="voice-call-main-mic" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_DMIC_NS" alias="voice-call-NS-mic-speaker" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC" alias="voice-call-sub-mic" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS" alias="voice-call-sub-mic" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC" alias="voice-call-main-mic" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_DMIC_AEC_NS" alias="voice-call-main-mic" />
|
||||
<device name="SND_DEVICE_IN_HEADSET_MIC" alias="rec-headset-mic" />
|
||||
<device name="SND_DEVICE_IN_HEADSET_MIC_FLUENCE" alias="rec-main-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_SPEAKER_MIC" alias="voice-call-sub-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_SPEAKER_MIC" alias="voice-call-main-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_HEADSET_MIC" alias="voice-call-headset-mic" />
|
||||
<device name="SND_DEVICE_IN_CAMCORDER_MIC" alias="rec-stereo-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_DMIC" alias="voice-call-main-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC" alias="voice-call-sub-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_SPEAKER_DMIC" alias="voice-call-main-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_TTY_FULL_HEADSET_MIC" alias="TTY-full-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_TTY_VCO_HANDSET_MIC" alias="TTY-vco-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_TTY_HCO_HEADSET_MIC" alias="TTY-headset-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_REC_MIC" alias="vr-main-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_REC_HEADSET_MIC" alias="vr-headset-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_REC_MIC_NS" alias="svoice-NS-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_REC_DMIC_STEREO" alias="vr-sub-mic" />
|
||||
<device name="SND_DEVICE_IN_VOICE_REC_DMIC_STEREO" alias="vr-main-mic" />
|
||||
<device name="SND_DEVICE_IN_HANDSET_STEREO_DMIC" alias="rec-stereo-mic" />
|
||||
<device name="SND_DEVICE_IN_SPEAKER_STEREO_DMIC" alias="rec-stereo-mic" />
|
||||
<device name="SND_DEVICE_IN_VOIP_SPEAKER_MIC" alias="voip-main-mic-others" />
|
||||
</device_names>
|
||||
|
||||
</audio_platform_info>
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
# Devices are designated by a string that corresponds to the enum in audio.h
|
||||
|
||||
global_configuration {
|
||||
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER
|
||||
attached_output_devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_TELEPHONY_TX
|
||||
default_output_device AUDIO_DEVICE_OUT_SPEAKER
|
||||
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_VOICE_CALL
|
||||
attached_input_devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_VOICE_CALL|AUDIO_DEVICE_IN_REMOTE_SUBMIX|AUDIO_DEVICE_IN_FM_TUNER|AUDIO_DEVICE_IN_TELEPHONY_RX
|
||||
}
|
||||
|
||||
# audio hardware module section: contains descriptors for all audio hw modules present on the
|
||||
|
@ -26,7 +26,7 @@ audio_hw_modules {
|
|||
sampling_rates 44100|48000
|
||||
channel_masks AUDIO_CHANNEL_OUT_STEREO
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET
|
||||
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_BLUETOOTH_SCO|AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
|
||||
flags AUDIO_OUTPUT_FLAG_PRIMARY
|
||||
}
|
||||
deep_buffer {
|
||||
|
@ -35,9 +35,16 @@ audio_hw_modules {
|
|||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
|
||||
flags AUDIO_OUTPUT_FLAG_DEEP_BUFFER
|
||||
}
|
||||
low_latency {
|
||||
sampling_rates 44100|48000
|
||||
channel_masks AUDIO_CHANNEL_OUT_STEREO
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_BLUETOOTH_SCO|AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
|
||||
flags AUDIO_OUTPUT_FLAG_FAST
|
||||
}
|
||||
multichannel {
|
||||
sampling_rates 44100|48000
|
||||
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000|96000
|
||||
channel_masks dynamic
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
|
||||
|
@ -46,31 +53,43 @@ audio_hw_modules {
|
|||
compress_offload {
|
||||
sampling_rates 8000|11025|16000|22050|32000|44100|48000
|
||||
channel_masks 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
|
||||
formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC|AUDIO_FORMAT_AC3|AUDIO_FORMAT_EAC3
|
||||
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET
|
||||
formats AUDIO_FORMAT_MP3|AUDIO_FORMAT_AAC_LC|AUDIO_FORMAT_AAC_HE_V1|AUDIO_FORMAT_AAC_HE_V2|AUDIO_FORMAT_AC3|AUDIO_FORMAT_E_AC3
|
||||
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_BLUETOOTH_SCO|AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY
|
||||
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING
|
||||
}
|
||||
incall_music {
|
||||
sampling_rates 8000|16000|48000
|
||||
channel_masks AUDIO_CHANNEL_OUT_MONO
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_FM_TUNER|AUDIO_DEVICE_IN_VOICE_CALL
|
||||
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_INCALL_MUSIC
|
||||
}
|
||||
voice_tx {
|
||||
sampling_rates 8000|16000|48000
|
||||
channel_masks AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_OUT_TELEPHONY_TX
|
||||
}
|
||||
voip_rx {
|
||||
sampling_rates 8000|16000
|
||||
channel_masks AUDIO_CHANNEL_OUT_MONO
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET|AUDIO_DEVICE_OUT_ALL_SCO
|
||||
devices AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_BLUETOOTH_SCO|AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_ALL_SCO
|
||||
flags AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX
|
||||
}
|
||||
low_latency {
|
||||
sampling_rates 44100|48000
|
||||
channel_masks AUDIO_CHANNEL_OUT_STEREO
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_OUT_EARPIECE|AUDIO_DEVICE_OUT_SPEAKER|AUDIO_DEVICE_OUT_WIRED_HEADSET|AUDIO_DEVICE_OUT_WIRED_HEADPHONE|AUDIO_DEVICE_OUT_ALL_SCO|AUDIO_DEVICE_OUT_AUX_DIGITAL|AUDIO_DEVICE_OUT_PROXY|AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET|AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET
|
||||
flags AUDIO_OUTPUT_FLAG_FAST
|
||||
}
|
||||
}
|
||||
inputs {
|
||||
primary {
|
||||
sampling_rates 8000|11025|12000|16000|22050|24000|32000|44100|48000
|
||||
channel_masks AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK|AUDIO_CHANNEL_IN_5POINT1
|
||||
channel_masks AUDIO_CHANNEL_IN_5POINT1|AUDIO_CHANNEL_IN_MONO|AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_FRONT_BACK
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET|AUDIO_DEVICE_IN_VOICE_CALL
|
||||
devices AUDIO_DEVICE_IN_BUILTIN_MIC|AUDIO_DEVICE_IN_WIRED_HEADSET|AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET|AUDIO_DEVICE_IN_BACK_MIC|AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET|AUDIO_DEVICE_IN_FM_TUNER|AUDIO_DEVICE_IN_VOICE_CALL
|
||||
}
|
||||
voice_rx {
|
||||
sampling_rates 8000|16000|48000
|
||||
channel_masks AUDIO_CHANNEL_IN_STEREO|AUDIO_CHANNEL_IN_MONO
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_IN_TELEPHONY_RX
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,12 +112,20 @@ audio_hw_modules {
|
|||
devices AUDIO_DEVICE_OUT_USB_ACCESSORY
|
||||
}
|
||||
usb_device {
|
||||
sampling_rates 44100
|
||||
channel_masks AUDIO_CHANNEL_OUT_STEREO
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
sampling_rates dynamic
|
||||
channel_masks dynamic
|
||||
formats dynamic
|
||||
devices AUDIO_DEVICE_OUT_USB_DEVICE|AUDIO_DEVICE_OUT_USB_HEADSET
|
||||
}
|
||||
}
|
||||
inputs {
|
||||
usb_device {
|
||||
sampling_rates dynamic
|
||||
channel_masks AUDIO_CHANNEL_IN_STEREO
|
||||
formats AUDIO_FORMAT_PCM_16_BIT
|
||||
devices AUDIO_DEVICE_IN_USB_DEVICE
|
||||
}
|
||||
}
|
||||
}
|
||||
r_submix {
|
||||
outputs {
|
||||
|
|
218
audio/audio_policy_configuration.xml
Normal file
218
audio/audio_policy_configuration.xml
Normal file
|
@ -0,0 +1,218 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<!-- Copyright (C) 2015 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<audioPolicyConfiguration version="1.0" xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<!-- version section contains a “version” tag in the form “major.minor” e.g version=”1.0” -->
|
||||
|
||||
<!-- Global configuration Decalaration -->
|
||||
<globalConfiguration speaker_drc_enabled="true"/>
|
||||
|
||||
|
||||
<!-- Modules section:
|
||||
There is one section per audio HW module present on the platform.
|
||||
Each module section will contains two mandatory tags for audio HAL “halVersion” and “name”.
|
||||
The module names are the same as in current .conf file:
|
||||
“primary”, “A2DP”, “remote_submix”, “USB”
|
||||
Each module will contain the following sections:
|
||||
“devicePorts”: a list of device descriptors for all input and output devices accessible via this
|
||||
module.
|
||||
This contains both permanently attached devices and removable devices.
|
||||
“mixPorts”: listing all output and input streams exposed by the audio HAL
|
||||
“routes”: list of possible connections between input and output devices or between stream and
|
||||
devices.
|
||||
"route": is defined by an attribute:
|
||||
-"type": <mux|mix> means all sources are mutual exclusive (mux) or can be mixed (mix)
|
||||
-"sink": the sink involved in this route
|
||||
-"sources": all the sources than can be connected to the sink via vis route
|
||||
“attachedDevices”: permanently attached devices.
|
||||
The attachedDevices section is a list of devices names. The names correspond to device names
|
||||
defined in <devicePorts> section.
|
||||
“defaultOutputDevice”: device to be used by default when no policy rule applies
|
||||
-->
|
||||
<modules>
|
||||
<!-- Primary Audio HAL -->
|
||||
<module name="primary" halVersion="2.0">
|
||||
<attachedDevices>
|
||||
<item>Earpiece</item>
|
||||
<item>Speaker</item>
|
||||
<item>Built-In Mic</item>
|
||||
<item>Built-In Back Mic</item>
|
||||
<item>FM Tuner</item>
|
||||
<item>Telephony Rx</item>
|
||||
<item>Telephony Tx</item>
|
||||
</attachedDevices>
|
||||
<defaultOutputDevice>Speaker</defaultOutputDevice>
|
||||
<mixPorts>
|
||||
<mixPort name="primary output" role="source" flags="AUDIO_OUTPUT_FLAG_PRIMARY">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="low_latency" role="source" flags="AUDIO_OUTPUT_FLAG_FAST">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="44100,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="compressed_offload" role="source"
|
||||
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD|AUDIO_OUTPUT_FLAG_NON_BLOCKING">
|
||||
<profile name="" format="AUDIO_FORMAT_MP3"
|
||||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC"
|
||||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
|
||||
<profile name="" format="AUDIO_FORMAT_AAC_LC"
|
||||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_OUT_STEREO,AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voice_tx" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO,AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</mixPort>
|
||||
<mixPort name="voip_rx" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"
|
||||
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_VOIP_RX" />
|
||||
</mixPort>
|
||||
<mixPort name="incall_music" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"
|
||||
flags="AUDIO_OUTPUT_FLAG_DIRECT|AUDIO_OUTPUT_FLAG_INCALL_MUSIC" />
|
||||
</mixPort>
|
||||
<mixPort name="primary input" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK,AUDIO_CHANNEL_IN_5POINT1"/>
|
||||
</mixPort>
|
||||
<mixPort name="voice_rx" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</mixPort>
|
||||
</mixPorts>
|
||||
<devicePorts>
|
||||
<!-- Output devices declaration, i.e. Sink DEVICE PORT -->
|
||||
<devicePort tagName="Earpiece" type="AUDIO_DEVICE_OUT_EARPIECE" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Speaker" role="sink" type="AUDIO_DEVICE_OUT_SPEAKER" address="">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset" type="AUDIO_DEVICE_OUT_WIRED_HEADSET" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headphones" type="AUDIO_DEVICE_OUT_WIRED_HEADPHONE" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="16000,48000" channelMasks="AUDIO_CHANNEL_OUT_STEREO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Headset" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Car Kit" type="AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Telephony Tx" type="AUDIO_DEVICE_OUT_TELEPHONY_TX" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000,48000" channelMasks="AUDIO_CHANNEL_OUT_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="HDMI" type="AUDIO_DEVICE_OUT_AUX_DIGITAL" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Proxy" type="AUDIO_DEVICE_OUT_PROXY" role="sink">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,11025,16000,22050,32000,44100,48000,64000,88200,96000,128000,176400,192000" channelMasks="dynamic"/>
|
||||
</devicePort>
|
||||
|
||||
<devicePort tagName="Built-In Mic" type="AUDIO_DEVICE_IN_BUILTIN_MIC" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Built-In Back Mic" type="AUDIO_DEVICE_IN_BACK_MIC" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Wired Headset Mic" type="AUDIO_DEVICE_IN_WIRED_HEADSET" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,11025,12000,16000,22050,24000,32000,44100,48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO,AUDIO_CHANNEL_IN_FRONT_BACK"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="BT SCO Headset Mic" type="AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="Telephony Rx" type="AUDIO_DEVICE_IN_TELEPHONY_RX" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="8000,16000" channelMasks="AUDIO_CHANNEL_IN_MONO"/>
|
||||
</devicePort>
|
||||
<devicePort tagName="FM Tuner" type="AUDIO_DEVICE_IN_FM_TUNER" role="source">
|
||||
<profile name="" format="AUDIO_FORMAT_PCM_16_BIT"
|
||||
samplingRates="48000"
|
||||
channelMasks="AUDIO_CHANNEL_IN_MONO,AUDIO_CHANNEL_IN_STEREO"/>
|
||||
</devicePort>
|
||||
</devicePorts>
|
||||
<!-- route declaration, i.e. list all available sources for a given sink -->
|
||||
<routes>
|
||||
<route type="mix" sink="Earpiece"
|
||||
sources="primary output,low_latency,compressed_offload,BT SCO Headset Mic,voip_rx"/>
|
||||
<route type="mix" sink="Speaker"
|
||||
sources="primary output,low_latency,compressed_offload,BT SCO Headset Mic,Telephony Rx,voip_rx"/>
|
||||
<route type="mix" sink="Wired Headset"
|
||||
sources="primary output,low_latency,compressed_offload,BT SCO Headset Mic,Telephony Rx,incall_music,voip_rx"/>
|
||||
<route type="mix" sink="Wired Headphones"
|
||||
sources="primary output,low_latency,compressed_offload,BT SCO Headset Mic,Telephony Rx,incall_music,voip_rx"/>
|
||||
<route type="mix" sink="Telephony Tx"
|
||||
sources="voice_tx"/>
|
||||
<route type="mix" sink="primary input"
|
||||
sources="Built-In Mic,Built-In Back Mic,Wired Headset Mic,BT SCO Headset Mic"/>
|
||||
<route type="mix" sink="voice_rx"
|
||||
sources="Telephony Rx"/>
|
||||
<route type="mix" sink="HDMI"
|
||||
sources="primary output,low_latency,compressed_offload"/>
|
||||
<route type="mix" sink="Proxy"
|
||||
sources="primary output,low_latency,compressed_offload"/>
|
||||
</routes>
|
||||
|
||||
</module>
|
||||
|
||||
<!-- A2dp Audio HAL -->
|
||||
<xi:include href="/vendor/etc/a2dp_audio_policy_configuration.xml"/>
|
||||
|
||||
<!-- Usb Audio HAL -->
|
||||
<xi:include href="/vendor/etc/usb_audio_policy_configuration.xml"/>
|
||||
|
||||
<!-- Remote Submix Audio HAL -->
|
||||
<xi:include href="/vendor/etc/r_submix_audio_policy_configuration.xml"/>
|
||||
|
||||
</modules>
|
||||
<!-- End of Modules section -->
|
||||
|
||||
<!-- Volume section -->
|
||||
|
||||
<xi:include href="/vendor/etc/audio_policy_volumes.xml"/>
|
||||
<xi:include href="/vendor/etc/default_volume_tables.xml"/>
|
||||
|
||||
<!-- End of Volume section -->
|
||||
|
||||
</audioPolicyConfiguration>
|
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,4 @@
|
|||
|
||||
/*
|
||||
* Copyright (C) 2012 The Android Open Source Project
|
||||
* Copyright (C) 2012 The CyanogenMod Project <http://www.cyanogenmod.org>
|
||||
|
@ -18,11 +19,10 @@
|
|||
#ifndef _BDROID_BUILDCFG_H
|
||||
#define _BDROID_BUILDCFG_H
|
||||
|
||||
#define BTM_DEF_LOCAL_NAME "Samsung Galaxy S5"
|
||||
|
||||
#define BTM_DEF_LOCAL_NAME "Samsung Galaxy S III Neo"
|
||||
#define BTA_DISABLE_DELAY 1000 /* in milliseconds */
|
||||
|
||||
#define BTM_WBS_INCLUDED TRUE /* Enable WBS */
|
||||
#define BTIF_HF_WBS_PREFERRED TRUE /* Use WBS */
|
||||
#define BTIF_HF_WBS_PREFERRED TRUE /* Use WBS */
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyHS0"
|
||||
BTHW_DBG = TRUE
|
||||
BT_WAKE_VIA_PROC = TRUE
|
||||
BT_WAKE_VIA_PROC_NOTIFY_DEASSERT=TRUE
|
||||
FW_PATCHFILE_LOCATION = "/vendor/firmware"
|
||||
FW_PATCH_SETTLEMENT_DELAY_MS = 100
|
||||
LPM_COMBINE_SLEEP_MODE_AND_LPM = 0
|
||||
LPM_IDLE_TIMEOUT_MULTIPLE = 5
|
||||
PROC_BTWRITE_TIMER_TIMEOUT_MS = 0
|
||||
SCO_WBS_SAMPLE_RATE = 0
|
||||
UART_FORCE_TWO_STOPBITS = TRUE
|
||||
UART_TARGET_BAUD_RATE = 3000000
|
||||
USE_AXI_BRIDGE_LOCK = TRUE
|
|
@ -1,23 +0,0 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_C_INCLUDES := \
|
||||
system/media/camera/include
|
||||
|
||||
LOCAL_SRC_FILES := \
|
||||
CameraWrapper.cpp
|
||||
|
||||
LOCAL_STATIC_LIBRARIES := libbase libarect
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
libhardware liblog libcamera_client libutils libcutils libdl \
|
||||
android.hidl.token@1.0-utils \
|
||||
android.hardware.graphics.bufferqueue@1.0
|
||||
|
||||
LOCAL_HEADER_LIBRARIES := libnativebase_headers
|
||||
|
||||
LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
|
@ -1,728 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2012-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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file CameraWrapper.cpp
|
||||
*
|
||||
* This file wraps a vendor camera module.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "CameraWrapper"
|
||||
|
||||
#include <camera/CameraParameters.h>
|
||||
#include <camera/Camera.h>
|
||||
#include <cutils/log.h>
|
||||
#include <hardware/camera.h>
|
||||
#include <hardware/hardware.h>
|
||||
#include <utils/String8.h>
|
||||
#include <utils/threads.h>
|
||||
|
||||
static const char KEY_DIS[] = "dis";
|
||||
static const char DIS_DISABLE[] = "disable";
|
||||
static const char KEY_ZSL[] = "zsl";
|
||||
static const char ON[] = "on";
|
||||
static const char OFF[] = "off";
|
||||
static const char KEY_PHASE_AF[] = "phase-af";
|
||||
static const char KEY_DYNAMIC_RANGE_CONTROL[] = "dynamic-range-control";
|
||||
static const char KEY_QC_RT_HDR[] = "rt-hdr";
|
||||
static const char KEY_QC_VIDEO_HDR[] = "video-hdr";
|
||||
static const char KEY_QC_VIDEO_HDR_VALUES[] = "video-hdr-values";
|
||||
|
||||
#define BACK_CAMERA_ID 0
|
||||
#define FRONT_CAMERA_ID 1
|
||||
|
||||
using namespace android;
|
||||
|
||||
static Mutex gCameraWrapperLock;
|
||||
static camera_module_t *gVendorModule = 0;
|
||||
|
||||
static camera_notify_callback gUserNotifyCb = NULL;
|
||||
static camera_data_callback gUserDataCb = NULL;
|
||||
static camera_data_timestamp_callback gUserDataCbTimestamp = NULL;
|
||||
static camera_request_memory gUserGetMemory = NULL;
|
||||
static void *gUserCameraDevice = NULL;
|
||||
|
||||
static char **fixed_set_params = NULL;
|
||||
|
||||
static int camera_device_open(const hw_module_t *module, const char *name,
|
||||
hw_device_t **device);
|
||||
static int camera_get_number_of_cameras(void);
|
||||
static int camera_get_camera_info(int camera_id, struct camera_info *info);
|
||||
|
||||
static struct hw_module_methods_t camera_module_methods = {
|
||||
.open = camera_device_open,
|
||||
};
|
||||
|
||||
camera_module_t HAL_MODULE_INFO_SYM = {
|
||||
.common = {
|
||||
.tag = HARDWARE_MODULE_TAG,
|
||||
.module_api_version = CAMERA_MODULE_API_VERSION_1_0,
|
||||
.hal_api_version = HARDWARE_HAL_API_VERSION,
|
||||
.id = CAMERA_HARDWARE_MODULE_ID,
|
||||
.name = "MSM8974 Camera Wrapper",
|
||||
.author = "The CyanogenMod Project",
|
||||
.methods = &camera_module_methods,
|
||||
.dso = NULL,
|
||||
.reserved = {0},
|
||||
},
|
||||
.get_number_of_cameras = camera_get_number_of_cameras,
|
||||
.get_camera_info = camera_get_camera_info,
|
||||
.set_callbacks = NULL,
|
||||
.get_vendor_tag_ops = NULL,
|
||||
.open_legacy = NULL,
|
||||
.set_torch_mode = NULL,
|
||||
.init = NULL,
|
||||
.reserved = {0},
|
||||
};
|
||||
|
||||
typedef struct wrapper_camera_device {
|
||||
camera_device_t base;
|
||||
int id;
|
||||
camera_device_t *vendor;
|
||||
} wrapper_camera_device_t;
|
||||
|
||||
#define VENDOR_CALL(device, func, ...) ({ \
|
||||
wrapper_camera_device_t *__wrapper_dev = (wrapper_camera_device_t*) device; \
|
||||
__wrapper_dev->vendor->ops->func(__wrapper_dev->vendor, ##__VA_ARGS__); \
|
||||
})
|
||||
|
||||
#define CAMERA_ID(device) (((wrapper_camera_device_t *)device)->id)
|
||||
|
||||
static int check_vendor_module()
|
||||
{
|
||||
int rv;
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if (gVendorModule)
|
||||
return 0;
|
||||
|
||||
rv = hw_get_module_by_class("camera", "vendor",
|
||||
(const hw_module_t**)&gVendorModule);
|
||||
if (rv)
|
||||
ALOGE("Failed to open vendor camera module %d", rv);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
#define KEY_VIDEO_HFR_VALUES "video-hfr-values"
|
||||
|
||||
// nv12-venus is needed for blobs, but
|
||||
// framework has no idea what it is
|
||||
#define PIXEL_FORMAT_NV12_VENUS "nv12-venus"
|
||||
|
||||
static bool is_4k_video(CameraParameters ¶ms) {
|
||||
int video_width, video_height;
|
||||
params.getVideoSize(&video_width, &video_height);
|
||||
ALOGV("%s : VideoSize is %x", __FUNCTION__, video_width * video_height);
|
||||
return video_width * video_height == 3840 * 2160;
|
||||
}
|
||||
|
||||
static char *camera_fixup_getparams(int __attribute__((unused)) id,
|
||||
const char *settings)
|
||||
{
|
||||
CameraParameters params;
|
||||
params.unflatten(String8(settings));
|
||||
|
||||
ALOGV("%s: original parameters:", __FUNCTION__);
|
||||
params.dump();
|
||||
|
||||
const char *recordHint = params.get(CameraParameters::KEY_RECORDING_HINT);
|
||||
bool videoMode = recordHint ? !strcmp(recordHint, "true") : false;
|
||||
|
||||
//Hide nv12-venus from Android.
|
||||
if (strcmp (params.getPreviewFormat(), PIXEL_FORMAT_NV12_VENUS) == 0)
|
||||
params.setPreviewFormat(params.PIXEL_FORMAT_YUV420SP);
|
||||
|
||||
const char *videoSizeValues = params.get(
|
||||
CameraParameters::KEY_SUPPORTED_VIDEO_SIZES);
|
||||
if (videoSizeValues) {
|
||||
char videoSizes[strlen(videoSizeValues) + 10 + 1];
|
||||
sprintf(videoSizes, "3840x2160,%s", videoSizeValues);
|
||||
params.set(CameraParameters::KEY_SUPPORTED_VIDEO_SIZES,
|
||||
videoSizes);
|
||||
}
|
||||
|
||||
/* If the vendor has HFR values but doesn't also expose that
|
||||
* this can be turned off, fixup the params to tell the Camera
|
||||
* that it really is okay to turn it off.
|
||||
*/
|
||||
const char *hfrModeValues = params.get(KEY_VIDEO_HFR_VALUES);
|
||||
if (hfrModeValues && !strstr(hfrModeValues, "off")) {
|
||||
char hfrModes[strlen(hfrModeValues) + 4 + 1];
|
||||
sprintf(hfrModes, "%s,off", hfrModeValues);
|
||||
params.set(KEY_VIDEO_HFR_VALUES, hfrModes);
|
||||
}
|
||||
|
||||
/* Enforce video-snapshot-supported to true */
|
||||
if (videoMode) {
|
||||
params.set(CameraParameters::KEY_VIDEO_SNAPSHOT_SUPPORTED, "true");
|
||||
}
|
||||
|
||||
/* advertise video HDR mode support */
|
||||
if (id == BACK_CAMERA_ID)
|
||||
params.set(KEY_QC_VIDEO_HDR_VALUES, "on,off");
|
||||
|
||||
ALOGV("%s: Fixed parameters:", __FUNCTION__);
|
||||
params.dump();
|
||||
|
||||
String8 strParams = params.flatten();
|
||||
char *ret = strdup(strParams.string());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static char *camera_fixup_setparams(int id, const char *settings)
|
||||
{
|
||||
CameraParameters params;
|
||||
params.unflatten(String8(settings));
|
||||
|
||||
ALOGV("%s: original parameters:", __FUNCTION__);
|
||||
params.dump();
|
||||
|
||||
bool wasTorch = false;
|
||||
if (fixed_set_params[id]) {
|
||||
/* When torch mode is switched off, it is important not to set ZSL, to
|
||||
avoid a segmentation violation in libcameraservice.so. Hence, check
|
||||
if the last call to setparams enabled torch mode */
|
||||
CameraParameters old_params;
|
||||
old_params.unflatten(String8(fixed_set_params[id]));
|
||||
|
||||
const char *old_flashMode = old_params.get(CameraParameters::KEY_FLASH_MODE);
|
||||
wasTorch = old_flashMode && !strcmp(old_flashMode, CameraParameters::FLASH_MODE_TORCH);
|
||||
}
|
||||
|
||||
const char *recordingHint = params.get(CameraParameters::KEY_RECORDING_HINT);
|
||||
bool isVideo = recordingHint && !strcmp(recordingHint, "true");
|
||||
const char *flashMode = params.get(CameraParameters::KEY_FLASH_MODE);
|
||||
bool isTorch = flashMode && !strcmp(flashMode, CameraParameters::FLASH_MODE_TORCH);
|
||||
|
||||
if (!isTorch && !wasTorch) {
|
||||
if (isVideo) {
|
||||
params.set(KEY_DIS, DIS_DISABLE);
|
||||
params.set(KEY_ZSL, OFF);
|
||||
} else {
|
||||
params.set(KEY_ZSL, ON);
|
||||
}
|
||||
}
|
||||
|
||||
if (id == BACK_CAMERA_ID) {
|
||||
params.set(KEY_PHASE_AF, ON);
|
||||
params.set(KEY_DYNAMIC_RANGE_CONTROL, ON);
|
||||
if (isVideo) {
|
||||
/* need to translate video-hdr to rt-hdr */
|
||||
const char *vhdr = params.get(KEY_QC_VIDEO_HDR);
|
||||
params.set(KEY_QC_RT_HDR, vhdr && !strcmp(vhdr, "on") ? ON : OFF);
|
||||
}
|
||||
}
|
||||
|
||||
ALOGV("%s: Fixed parameters:", __FUNCTION__);
|
||||
params.dump();
|
||||
|
||||
String8 strParams = params.flatten();
|
||||
if (fixed_set_params[id])
|
||||
free(fixed_set_params[id]);
|
||||
fixed_set_params[id] = strdup(strParams.string());
|
||||
char *ret = fixed_set_params[id];
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* Implementation of camera_device_ops functions
|
||||
*******************************************************************/
|
||||
static char *camera_get_parameters(struct camera_device *device);
|
||||
static int camera_set_parameters(struct camera_device *device, const char *params);
|
||||
|
||||
static int camera_set_preview_window(struct camera_device *device,
|
||||
struct preview_stream_ops *window)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, set_preview_window, window);
|
||||
}
|
||||
|
||||
void camera_notify_cb(int32_t msg_type, int32_t ext1, int32_t ext2, void *user) {
|
||||
gUserNotifyCb(msg_type, ext1, ext2, gUserCameraDevice);
|
||||
}
|
||||
|
||||
void camera_data_cb(int32_t msg_type, const camera_memory_t *data, unsigned int index,
|
||||
camera_frame_metadata_t *metadata, void *user) {
|
||||
gUserDataCb(msg_type, data, index, metadata, gUserCameraDevice);
|
||||
}
|
||||
|
||||
void camera_data_cb_timestamp(nsecs_t timestamp, int32_t msg_type,
|
||||
const camera_memory_t *data, unsigned index, void *user) {
|
||||
gUserDataCbTimestamp(timestamp, msg_type, data, index, gUserCameraDevice);
|
||||
}
|
||||
|
||||
camera_memory_t* camera_get_memory(int fd, size_t buf_size,
|
||||
uint_t num_bufs, void *user) {
|
||||
return gUserGetMemory(fd, buf_size, num_bufs, gUserCameraDevice);
|
||||
}
|
||||
|
||||
static void camera_set_callbacks(struct camera_device *device,
|
||||
camera_notify_callback notify_cb,
|
||||
camera_data_callback data_cb,
|
||||
camera_data_timestamp_callback data_cb_timestamp,
|
||||
camera_request_memory get_memory,
|
||||
void *user)
|
||||
{
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
gUserNotifyCb = notify_cb;
|
||||
gUserDataCb = data_cb;
|
||||
gUserDataCbTimestamp = data_cb_timestamp;
|
||||
gUserGetMemory = get_memory;
|
||||
gUserCameraDevice = user;
|
||||
|
||||
VENDOR_CALL(device, set_callbacks, camera_notify_cb, camera_data_cb,
|
||||
camera_data_cb_timestamp, camera_get_memory, user);
|
||||
}
|
||||
|
||||
static void camera_enable_msg_type(struct camera_device *device,
|
||||
int32_t msg_type)
|
||||
{
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, enable_msg_type, msg_type);
|
||||
}
|
||||
|
||||
static void camera_disable_msg_type(struct camera_device *device,
|
||||
int32_t msg_type)
|
||||
{
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, disable_msg_type, msg_type);
|
||||
}
|
||||
|
||||
static int camera_msg_type_enabled(struct camera_device *device,
|
||||
int32_t msg_type)
|
||||
{
|
||||
if (!device)
|
||||
return 0;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, msg_type_enabled, msg_type);
|
||||
}
|
||||
|
||||
static int camera_start_preview(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, start_preview);
|
||||
}
|
||||
|
||||
static void camera_stop_preview(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, stop_preview);
|
||||
}
|
||||
|
||||
static int camera_preview_enabled(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, preview_enabled);
|
||||
}
|
||||
|
||||
static int camera_store_meta_data_in_buffers(struct camera_device *device,
|
||||
int enable)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, store_meta_data_in_buffers, enable);
|
||||
}
|
||||
|
||||
static int camera_start_recording(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
CameraParameters parameters;
|
||||
parameters.unflatten(String8(camera_get_parameters(device)));
|
||||
|
||||
if (is_4k_video(parameters)) {
|
||||
ALOGV("%s : UHD detected, switching preview-format to nv12-venus", __FUNCTION__);
|
||||
parameters.setPreviewFormat(PIXEL_FORMAT_NV12_VENUS);
|
||||
camera_set_parameters(device, strdup(parameters.flatten().string()));
|
||||
}
|
||||
|
||||
return VENDOR_CALL(device, start_recording);
|
||||
}
|
||||
|
||||
static void camera_stop_recording(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, stop_recording);
|
||||
}
|
||||
|
||||
static int camera_recording_enabled(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, recording_enabled);
|
||||
}
|
||||
|
||||
static void camera_release_recording_frame(struct camera_device *device,
|
||||
const void *opaque)
|
||||
{
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, release_recording_frame, opaque);
|
||||
}
|
||||
|
||||
static int camera_auto_focus(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, auto_focus);
|
||||
}
|
||||
|
||||
static int camera_cancel_auto_focus(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, cancel_auto_focus);
|
||||
}
|
||||
|
||||
static int camera_take_picture(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, take_picture);
|
||||
}
|
||||
|
||||
static int camera_cancel_picture(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, cancel_picture);
|
||||
}
|
||||
|
||||
static int camera_set_parameters(struct camera_device *device,
|
||||
const char *params)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
char *tmp = camera_fixup_setparams(CAMERA_ID(device), params);
|
||||
|
||||
return VENDOR_CALL(device, set_parameters, tmp);
|
||||
}
|
||||
|
||||
static char *camera_get_parameters(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return NULL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
char *params = VENDOR_CALL(device, get_parameters);
|
||||
|
||||
char *tmp = camera_fixup_getparams(CAMERA_ID(device), params);
|
||||
|
||||
VENDOR_CALL(device, put_parameters, params);
|
||||
params = tmp;
|
||||
|
||||
return params;
|
||||
}
|
||||
|
||||
static void camera_put_parameters(__unused struct camera_device *device,
|
||||
char *params)
|
||||
{
|
||||
if (params)
|
||||
free(params);
|
||||
}
|
||||
|
||||
static int camera_send_command(struct camera_device *device,
|
||||
int32_t cmd, int32_t arg1, int32_t arg2)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, send_command, cmd, arg1, arg2);
|
||||
}
|
||||
|
||||
static void camera_release(struct camera_device *device)
|
||||
{
|
||||
if (!device)
|
||||
return;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
VENDOR_CALL(device, release);
|
||||
}
|
||||
|
||||
static int camera_dump(struct camera_device *device, int fd)
|
||||
{
|
||||
if (!device)
|
||||
return -EINVAL;
|
||||
|
||||
ALOGV("%s->%08X->%08X", __FUNCTION__, (uintptr_t)device,
|
||||
(uintptr_t)(((wrapper_camera_device_t*)device)->vendor));
|
||||
|
||||
return VENDOR_CALL(device, dump, fd);
|
||||
}
|
||||
|
||||
extern "C" void heaptracker_free_leaked_memory(void);
|
||||
|
||||
static int camera_device_close(hw_device_t *device)
|
||||
{
|
||||
int ret = 0;
|
||||
wrapper_camera_device_t *wrapper_dev = NULL;
|
||||
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
Mutex::Autolock lock(gCameraWrapperLock);
|
||||
|
||||
if (!device) {
|
||||
ret = -EINVAL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
for (int i = 0; i < camera_get_number_of_cameras(); i++) {
|
||||
if (fixed_set_params[i])
|
||||
free(fixed_set_params[i]);
|
||||
}
|
||||
|
||||
wrapper_dev = (wrapper_camera_device_t*) device;
|
||||
|
||||
wrapper_dev->vendor->common.close((hw_device_t*)wrapper_dev->vendor);
|
||||
if (wrapper_dev->base.ops)
|
||||
free(wrapper_dev->base.ops);
|
||||
free(wrapper_dev);
|
||||
|
||||
done:
|
||||
#ifdef HEAPTRACKER
|
||||
heaptracker_free_leaked_memory();
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*******************************************************************
|
||||
* Implementation of camera_module functions
|
||||
*******************************************************************/
|
||||
|
||||
/*
|
||||
* Open device handle to one of the cameras
|
||||
*
|
||||
* Assume camera service will keep singleton of each camera
|
||||
* so this function will always only be called once per camera instance
|
||||
*/
|
||||
|
||||
static int camera_device_open(const hw_module_t *module, const char *name,
|
||||
hw_device_t **device)
|
||||
{
|
||||
int rv = 0;
|
||||
int num_cameras = 0;
|
||||
int camera_id;
|
||||
wrapper_camera_device_t *camera_device = NULL;
|
||||
camera_device_ops_t *camera_ops = NULL;
|
||||
|
||||
Mutex::Autolock lock(gCameraWrapperLock);
|
||||
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
|
||||
if (name != NULL) {
|
||||
if (check_vendor_module())
|
||||
return -EINVAL;
|
||||
|
||||
camera_id = atoi(name);
|
||||
num_cameras = gVendorModule->get_number_of_cameras();
|
||||
|
||||
fixed_set_params = (char **) malloc(sizeof(char *) *num_cameras);
|
||||
if (!fixed_set_params) {
|
||||
ALOGE("Parameter memory allocation fail");
|
||||
rv = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
memset(fixed_set_params, 0, sizeof(char *) * num_cameras);
|
||||
|
||||
if (camera_id > num_cameras) {
|
||||
ALOGE("Camera service provided camera_id out of bounds, "
|
||||
"camera_id = %d, num supported = %d",
|
||||
camera_id, num_cameras);
|
||||
rv = -EINVAL;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
camera_device = (wrapper_camera_device_t*)
|
||||
malloc(sizeof(*camera_device));
|
||||
if (!camera_device) {
|
||||
ALOGE("camera_device allocation fail");
|
||||
rv = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
memset(camera_device, 0, sizeof(*camera_device));
|
||||
camera_device->id = camera_id;
|
||||
|
||||
rv = gVendorModule->common.methods->open(
|
||||
(const hw_module_t*)gVendorModule, name,
|
||||
(hw_device_t**)&(camera_device->vendor));
|
||||
if (rv) {
|
||||
ALOGE("Vendor camera open fail");
|
||||
goto fail;
|
||||
}
|
||||
ALOGV("%s: Got vendor camera device 0x%08X",
|
||||
__FUNCTION__, (uintptr_t)(camera_device->vendor));
|
||||
|
||||
camera_ops = (camera_device_ops_t*)malloc(sizeof(*camera_ops));
|
||||
if (!camera_ops) {
|
||||
ALOGE("camera_ops allocation fail");
|
||||
rv = -ENOMEM;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
memset(camera_ops, 0, sizeof(*camera_ops));
|
||||
|
||||
camera_device->base.common.tag = HARDWARE_DEVICE_TAG;
|
||||
camera_device->base.common.version = CAMERA_DEVICE_API_VERSION_1_0;
|
||||
camera_device->base.common.module = (hw_module_t *)(module);
|
||||
camera_device->base.common.close = camera_device_close;
|
||||
camera_device->base.ops = camera_ops;
|
||||
|
||||
camera_ops->set_preview_window = camera_set_preview_window;
|
||||
camera_ops->set_callbacks = camera_set_callbacks;
|
||||
camera_ops->enable_msg_type = camera_enable_msg_type;
|
||||
camera_ops->disable_msg_type = camera_disable_msg_type;
|
||||
camera_ops->msg_type_enabled = camera_msg_type_enabled;
|
||||
camera_ops->start_preview = camera_start_preview;
|
||||
camera_ops->stop_preview = camera_stop_preview;
|
||||
camera_ops->preview_enabled = camera_preview_enabled;
|
||||
camera_ops->store_meta_data_in_buffers = camera_store_meta_data_in_buffers;
|
||||
camera_ops->start_recording = camera_start_recording;
|
||||
camera_ops->stop_recording = camera_stop_recording;
|
||||
camera_ops->recording_enabled = camera_recording_enabled;
|
||||
camera_ops->release_recording_frame = camera_release_recording_frame;
|
||||
camera_ops->auto_focus = camera_auto_focus;
|
||||
camera_ops->cancel_auto_focus = camera_cancel_auto_focus;
|
||||
camera_ops->take_picture = camera_take_picture;
|
||||
camera_ops->cancel_picture = camera_cancel_picture;
|
||||
camera_ops->set_parameters = camera_set_parameters;
|
||||
camera_ops->get_parameters = camera_get_parameters;
|
||||
camera_ops->put_parameters = camera_put_parameters;
|
||||
camera_ops->send_command = camera_send_command;
|
||||
camera_ops->release = camera_release;
|
||||
camera_ops->dump = camera_dump;
|
||||
|
||||
*device = &camera_device->base.common;
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
||||
fail:
|
||||
if (camera_device) {
|
||||
free(camera_device);
|
||||
camera_device = NULL;
|
||||
}
|
||||
if (camera_ops) {
|
||||
free(camera_ops);
|
||||
camera_ops = NULL;
|
||||
}
|
||||
*device = NULL;
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int camera_get_number_of_cameras(void)
|
||||
{
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
if (check_vendor_module())
|
||||
return 0;
|
||||
return gVendorModule->get_number_of_cameras();
|
||||
}
|
||||
|
||||
static int camera_get_camera_info(int camera_id, struct camera_info *info)
|
||||
{
|
||||
ALOGV("%s", __FUNCTION__);
|
||||
if (check_vendor_module())
|
||||
return 0;
|
||||
return gVendorModule->get_camera_info(camera_id, info);
|
||||
}
|
|
@ -1,246 +1,89 @@
|
|||
# Samsung Package Version: G900FXXU1CRH1_G900FOXA1CRH1_BTU, unless pinned
|
||||
# Samsung Package Version: I9301IXCUARA1_I9301IXXUAPG1, unless pinned
|
||||
|
||||
# Activity recognition
|
||||
vendor/lib/libsensor1.so
|
||||
|
||||
# Audio
|
||||
# Audio - Libs pinned to Samsung Galaxy S5 G900FXXU1CRH1_G900FOXA1CRH1_BTU
|
||||
vendor/lib/libacdbloader.so|27ceba70917afc0e9b26877354c8404dae5af09c
|
||||
vendor/lib/libacdbrtac.so
|
||||
vendor/lib/libadiertac.so
|
||||
vendor/lib/libaudcal.so
|
||||
etc/firmware/audience-es705-fw.bin:vendor/firmware/audience-es705-fw.bin
|
||||
etc/firmware/audience-es705-vs.bin:vendor/firmware/audience-es705-vs.bin
|
||||
etc/Bluetooth_cal.acdb:vendor/etc/acdbdata/Bluetooth_cal.acdb
|
||||
etc/General_cal.acdb:vendor/etc/acdbdata/General_cal.acdb
|
||||
etc/Global_cal.acdb:vendor/etc/acdbdata/Global_cal.acdb
|
||||
etc/Handset_cal.acdb:vendor/etc/acdbdata/Handset_cal.acdb
|
||||
etc/Hdmi_cal.acdb:vendor/etc/acdbdata/Hdmi_cal.acdb
|
||||
etc/Headset_cal.acdb:vendor/etc/acdbdata/Headset_cal.acdb
|
||||
etc/Speaker_cal.acdb:vendor/etc/acdbdata/Speaker_cal.acdb
|
||||
vendor/lib/soundfx/libqcbassboost.so
|
||||
vendor/lib/soundfx/libqcvirt.so
|
||||
vendor/lib/soundfx/libqcreverb.so
|
||||
vendor/lib/libacdbrtac.so|f1a150ccd4bf0b5a2957532ec2690b52124d006d
|
||||
vendor/lib/libadiertac.so|e29a874dc3e6622fda4fc76032a7ea5dc44eb228
|
||||
vendor/lib/libaudcal.so|fa2bbd6df7818c787e472791d69fd6c4db184f7b
|
||||
etc/acdbdata/Bluetooth_cal.acdb::vendor/etc/acdbdata/Bluetooth_cal.acdb
|
||||
etc/acdbdata/General_cal.acdb:vendor/etc/acdbdata/General_cal.acdb
|
||||
etc/acdbdata/Global_cal.acdb:vendor/etc/acdbdata/Global_cal.acdb
|
||||
etc/acdbdata/Handset_cal.acdb:vendor/etc/acdbdata/Handset_cal.acdb
|
||||
etc/acdbdata/Hdmi_cal.acdb:vendor/etc/acdbdata/Hdmi_cal.acdb
|
||||
etc/acdbdata/Headset_cal.acdb:vendor/etc/acdbdata/Headset_cal.acdb
|
||||
etc/acdbdata/Speaker_cal.acdb:vendor/etc/acdbdata/Speaker_cal.acdb
|
||||
vendor/lib/soundfx/libqcbassboost.so|0d47c9255f0fb0865ed7b14d83cddd79ad3bde0c
|
||||
vendor/lib/soundfx/libqcvirt.so|9643ef67b86700b78ea26f54e29808ea814bde40
|
||||
vendor/lib/soundfx/libqcreverb.so|1819566d8c69bb8f562cf4b0422db67f9c8393af
|
||||
|
||||
# ADSP
|
||||
bin/adsprpcd:vendor/bin/adsprpcd
|
||||
vendor/lib/libadsprpc.so
|
||||
vendor/lib/libfastcvadsp_stub.so
|
||||
vendor/lib/libfastcvopt.so
|
||||
vendor/lib/rfsa/adsp/libadsp_fd_skel.so
|
||||
# ADSP - Pinned to Samsung Galaxy S5 Mini G800HXXU1CQC1_G800HXEO1CQB1
|
||||
bin/adsprpcd:vendor/bin/adsprpcd|794cbef158698b05016cd911055d2e35b8156616
|
||||
vendor/lib/libadsprpc.so|cf424f4aa995b892583527e9acc4d1264c0d955e
|
||||
vendor/lib/libfastcvadsp_stub.so|95d7d1121e52bd576c301cba01e79af67d7b79f1
|
||||
vendor/lib/libfastcvopt.so|17398d7d04b12680d81aeae3f93bb899b71ee1aa
|
||||
vendor/lib/libscve.so|2ece882804e158db562bb5c1532e1a83848849b7
|
||||
vendor/lib/libscve_stub.so|a96edc3e7b1854d1bf678c8a64df02eb318b6dbc
|
||||
vendor/lib/rfsa/adsp/libadsp_denoise_skel.so|67952d7ef062bfd1de626573a443c210af125db1
|
||||
vendor/lib/rfsa/adsp/libapps_mem_heap.so|67952d7ef062bfd1de626573a443c210af125db1
|
||||
vendor/lib/rfsa/adsp/libdspCV_skel.so|095fe6656baebbfc12046f322aeb94c210b018e8
|
||||
vendor/lib/rfsa/adsp/libfastcvadsp.so|a1fad41c2f283b49ae85986c013ee1179ad80e91
|
||||
vendor/lib/rfsa/adsp/libfastcvadsp_skel.so|9eb9499087e8cbd87aef57b25eb306a3ea481524
|
||||
vendor/lib/rfsa/adsp/libscveT2T_skel.so|9eb9499087e8cbd87aef57b25eb306a3ea481524
|
||||
|
||||
# Bluetooth firmware - Pinned to G900VVRU2DQH2_G900VVZW2DQH2_VZW
|
||||
vendor/firmware/bcm4350_V0395.0797.hcd|ff51604a8fc4cd1179d1ac869f517a413baad27f
|
||||
vendor/firmware/bcm4350_V0395.0797_murata.hcd|ff51604a8fc4cd1179d1ac869f517a413baad27f
|
||||
vendor/firmware/bcm4350_V0395.0797_semco.hcd|ff51604a8fc4cd1179d1ac869f517a413baad27f
|
||||
vendor/firmware/bcm4350_V0395.0797_semco3rd.hcd|ff51604a8fc4cd1179d1ac869f517a413baad27f
|
||||
vendor/firmware/bcm4350_V0395.0797_semcosh.hcd|ff51604a8fc4cd1179d1ac869f517a413baad27f
|
||||
vendor/firmware/bcm4350_V0395.0798_wisol.hcd|c4a2f642b274de774014aafacf3ed4253b000aa9
|
||||
|
||||
# Camera
|
||||
bin/mm-qcamera-daemon:vendor/bin/mm-qcamera-daemon
|
||||
lib/hw/camera.msm8974.so:vendor/lib/hw/camera.vendor.msm8974.so
|
||||
lib/libarcsoft_nighthawk.so:vendor/lib/libarcsoft_nighthawk.so
|
||||
lib/libliveframework.so:vendor/lib/libliveframework.so
|
||||
lib/libmmcamera2_stats_algorithm.so:vendor/lib/libmmcamera2_stats_algorithm.so
|
||||
lib/libmmcamera_cac3_lib.so:vendor/lib/libmmcamera_cac3_lib.so
|
||||
lib/libmmcamera_fidelix_eeprom.so:vendor/lib/libmmcamera_fidelix_eeprom.so
|
||||
lib/libmmcamera_interface.so:vendor/lib/libmmcamera_interface.so
|
||||
lib/libmmipl.so:vendor/lib/libmmipl.so
|
||||
lib/libmmjpeg_interface.so:vendor/lib/libmmjpeg_interface.so
|
||||
lib/libmmjpeg.so:vendor/lib/libmmjpeg.so
|
||||
lib/libmmqjpeg_codec.so:vendor/lib/libmmqjpeg_codec.so
|
||||
lib/libqomx_core.so:vendor/lib/libqomx_core.so
|
||||
lib/libqomx_jpegenc.so:vendor/lib/libqomx_jpegenc.so
|
||||
lib/libvdis.so:vendor/lib/libvdis.so
|
||||
vendor/lib/libactuator_ak7345_camcorder.so
|
||||
vendor/lib/libactuator_ak7345_camera.so
|
||||
vendor/lib/libactuator_dw9714_camcorder.so
|
||||
vendor/lib/libactuator_dw9714_camera.so
|
||||
vendor/lib/libactuator_dw9716_camcorder.so
|
||||
vendor/lib/libactuator_dw9716_camera.so
|
||||
vendor/lib/libactuator_wv560_camcorder.so
|
||||
vendor/lib/libactuator_wv560_camera.so
|
||||
vendor/lib/libmmcamera2_c2d_module.so
|
||||
vendor/lib/libmmcamera2_companion_s5k2p2xx.so
|
||||
vendor/lib/libmmcamera2_companion_imx240.so
|
||||
vendor/lib/libmmcamera2_cpp_module.so
|
||||
vendor/lib/libmmcamera2_iface_modules.so
|
||||
vendor/lib/libmmcamera2_imglib_modules.so
|
||||
vendor/lib/libmmcamera2_isp_modules.so
|
||||
vendor/lib/libmmcamera2_pproc_modules.so
|
||||
vendor/lib/libmmcamera2_sensor_modules.so
|
||||
vendor/lib/libmmcamera2_stats_modules.so
|
||||
vendor/lib/libmmcamera2_vpe_module.so
|
||||
vendor/lib/libmmcamera2_wnr_module.so
|
||||
vendor/lib/libmmcamera_faceproc.so
|
||||
vendor/lib/libmmcamera_image_stab.so
|
||||
vendor/lib/libmmcamera_imglib_faceproc_adspstub.so
|
||||
vendor/lib/libmmcamera_imglib.so
|
||||
vendor/lib/libmmcamera_imx240.so
|
||||
vendor/lib/libmmcamera_s5k2p2xx.so
|
||||
vendor/lib/libmmcamera_s5k8b1yx.so
|
||||
vendor/lib/liboemcamera.so
|
||||
|
||||
# Camera chromatix
|
||||
lib/C16QL_libchromatix_s5k2p2xx_default_video.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_default_video.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_golfshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_golfshot.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_hdr_liveshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hdr_liveshot.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_hdr_preview.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hdr_preview.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_hdr_uhd_video.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hdr_uhd_video.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_hdr_video.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hdr_video.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_hdr_zslshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hdr_zslshot.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_hfr_120.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hfr_120.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_hfr_1080p_b.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hfr_1080p_b.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_hfr_1080p_s.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hfr_1080p_s.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_liveshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_liveshot.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_pip.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_pip.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_preview.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_preview.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_shotmode_preview.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_shotmode_preview.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_shotmode_zslshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_shotmode_zslshot.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_snapshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_snapshot.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_uhd_video.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_uhd_video.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_vt.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_vt.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_vt_hd.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_vt_hd.so
|
||||
lib/C16QL_libchromatix_s5k2p2xx_zslshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_zslshot.so
|
||||
lib/C16QL_libTsAe.so:vendor/lib/C16QL_libTsAe.so
|
||||
lib/C16QL_libTsAf.so:vendor/lib/C16QL_libTsAf.so
|
||||
lib/C16QL_libTs_J_Accm.so:vendor/lib/C16QL_libTs_J_Accm.so
|
||||
lib/C16QL_libTs_J_Awb.so:vendor/lib/C16QL_libTs_J_Awb.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_default_video.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_default_video.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_golfshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_golfshot.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_hdr_liveshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hdr_liveshot.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_hdr_preview.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hdr_preview.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_hdr_uhd_video.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hdr_uhd_video.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_hdr_video.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hdr_video.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_hdr_zslshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hdr_zslshot.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_hfr_120.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hfr_120.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_hfr_1080p_b.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hfr_1080p_b.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_hfr_1080p_s.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hfr_1080p_s.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_liveshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_liveshot.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_lowres_zslshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_lowres_zslshot.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_pip.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_pip.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_preview.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_preview.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_shotmode_preview.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_shotmode_preview.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_shotmode_zslshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_shotmode_zslshot.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_snapshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_snapshot.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_uhd_video.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_uhd_video.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_vt.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_vt.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_vt_hd.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_vt_hd.so
|
||||
lib/F16QL_libchromatix_s5k2p2xx_zslshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_zslshot.so
|
||||
lib/F16QL_libTsAe.so:vendor/lib/F16QL_libTsAe.so
|
||||
lib/F16QL_libTsAf.so:vendor/lib/F16QL_libTsAf.so
|
||||
lib/F16QL_libTs_J_Accm.so:vendor/lib/F16QL_libTs_J_Accm.so
|
||||
lib/F16QL_libTs_J_Awb.so:vendor/lib/F16QL_libTs_J_Awb.so
|
||||
lib/F16QS_libchromatix_imx240_default_video.so:vendor/lib/F16QS_libchromatix_imx240_default_video.so
|
||||
lib/F16QS_libchromatix_imx240_golfshot.so:vendor/lib/F16QS_libchromatix_imx240_golfshot.so
|
||||
lib/F16QS_libchromatix_imx240_hdr_liveshot.so:vendor/lib/F16QS_libchromatix_imx240_hdr_liveshot.so
|
||||
lib/F16QS_libchromatix_imx240_hdr_preview.so:vendor/lib/F16QS_libchromatix_imx240_hdr_preview.so
|
||||
lib/F16QS_libchromatix_imx240_hdr_uhd_video.so:vendor/lib/F16QS_libchromatix_imx240_hdr_uhd_video.so
|
||||
lib/F16QS_libchromatix_imx240_hdr_video.so:vendor/lib/F16QS_libchromatix_imx240_hdr_video.so
|
||||
lib/F16QS_libchromatix_imx240_hdr_zslshot.so:vendor/lib/F16QS_libchromatix_imx240_hdr_zslshot.so
|
||||
lib/F16QS_libchromatix_imx240_hfr_120.so:vendor/lib/F16QS_libchromatix_imx240_hfr_120.so
|
||||
lib/F16QS_libchromatix_imx240_hfr_1080p_b.so:vendor/lib/F16QS_libchromatix_imx240_hfr_1080p_b.so
|
||||
lib/F16QS_libchromatix_imx240_hfr_1080p_s.so:vendor/lib/F16QS_libchromatix_imx240_hfr_1080p_s.so
|
||||
lib/F16QS_libchromatix_imx240_liveshot.so:vendor/lib/F16QS_libchromatix_imx240_liveshot.so
|
||||
lib/F16QS_libchromatix_imx240_lowres_zslshot.so:vendor/lib/F16QS_libchromatix_imx240_lowres_zslshot.so
|
||||
lib/F16QS_libchromatix_imx240_pip.so:vendor/lib/F16QS_libchromatix_imx240_pip.so
|
||||
lib/F16QS_libchromatix_imx240_preview.so:vendor/lib/F16QS_libchromatix_imx240_preview.so
|
||||
lib/F16QS_libchromatix_imx240_shotmode_preview.so:vendor/lib/F16QS_libchromatix_imx240_shotmode_preview.so
|
||||
lib/F16QS_libchromatix_imx240_shotmode_zslshot.so:vendor/lib/F16QS_libchromatix_imx240_shotmode_zslshot.so
|
||||
lib/F16QS_libchromatix_imx240_snapshot.so:vendor/lib/F16QS_libchromatix_imx240_snapshot.so
|
||||
lib/F16QS_libchromatix_imx240_uhd_video.so:vendor/lib/F16QS_libchromatix_imx240_uhd_video.so
|
||||
lib/F16QS_libchromatix_imx240_vt.so:vendor/lib/F16QS_libchromatix_imx240_vt.so
|
||||
lib/F16QS_libchromatix_imx240_vt_hd.so:vendor/lib/F16QS_libchromatix_imx240_vt_hd.so
|
||||
lib/F16QS_libchromatix_imx240_zslshot.so:vendor/lib/F16QS_libchromatix_imx240_zslshot.so
|
||||
lib/F16QS_libTsAe.so:vendor/lib/F16QS_libTsAe.so
|
||||
lib/F16QS_libTsAf.so:vendor/lib/F16QS_libTsAf.so
|
||||
lib/F16QS_libTs_J_Accm.so:vendor/lib/F16QS_libTs_J_Accm.so
|
||||
lib/F16QS_libTs_J_Awb.so:vendor/lib/F16QS_libTs_J_Awb.so
|
||||
lib/libTsAe.so:vendor/lib/libTsAe.so
|
||||
lib/libTsAf.so:vendor/lib/libTsAf.so
|
||||
lib/libTs_J_Accm.so:vendor/lib/libTs_J_Accm.so
|
||||
lib/libTs_J_Awb.so:vendor/lib/libTs_J_Awb.so
|
||||
vendor/lib/C16QL_libchromatix_s5k2p2xx_common.so
|
||||
vendor/lib/C16QL_libchromatix_s5k2p2xx_common_res0.so
|
||||
vendor/lib/C16QL_libchromatix_s5k2p2xx_common_res1.so
|
||||
vendor/lib/C16QL_libchromatix_s5k2p2xx_common_res2.so
|
||||
vendor/lib/C16QL_libchromatix_s5k2p2xx_common_res3.so
|
||||
vendor/lib/F16QL_libchromatix_s5k2p2xx_common.so
|
||||
vendor/lib/F16QL_libchromatix_s5k2p2xx_common_res0.so
|
||||
vendor/lib/F16QL_libchromatix_s5k2p2xx_common_res1.so
|
||||
vendor/lib/F16QL_libchromatix_s5k2p2xx_common_res2.so
|
||||
vendor/lib/F16QL_libchromatix_s5k2p2xx_common_res3.so
|
||||
vendor/lib/F16QS_libchromatix_imx240_common.so
|
||||
vendor/lib/F16QS_libchromatix_imx240_common_res0.so
|
||||
vendor/lib/F16QS_libchromatix_imx240_common_res1.so
|
||||
vendor/lib/F16QS_libchromatix_imx240_common_res2.so
|
||||
vendor/lib/F16QS_libchromatix_imx240_common_res3.so
|
||||
vendor/lib/libchromatix_s5k8b1yx_common.so
|
||||
vendor/lib/libchromatix_s5k8b1yx_pip.so
|
||||
vendor/lib/libchromatix_s5k8b1yx_preview.so
|
||||
vendor/lib/libchromatix_s5k8b1yx_smart_stay.so
|
||||
vendor/lib/libchromatix_s5k8b1yx_snapshot.so
|
||||
vendor/lib/libchromatix_s5k8b1yx_video.so
|
||||
vendor/lib/libchromatix_s5k8b1yx_vt_beauty.so
|
||||
vendor/lib/libchromatix_s5k8b1yx_vt_hd.so
|
||||
vendor/lib/libchromatix_s5k8b1yx_vt.so
|
||||
vendor/lib/libchromatix_s5k8b1yx_zslshot.so
|
||||
# Bluetooth - Pinned to Samsung Galaxy S5 Mini G800HXXU1CQC1_G800HXEO1CQB1
|
||||
bin/btnvtool:vendor/bin/btnvtool|3b518f5626d211930c0d63e4b2680797c6c7a4d5
|
||||
bin/hci_qcomm_init:vendor/bin/hci_qcomm_init|e78812bdcf2ea3ac4352d3e5ffaae8a9223fdf0f
|
||||
vendor/lib/libbtnv.so|2061b485bc848df502cf6d009e6d59781ef49768
|
||||
|
||||
# Camera firmware
|
||||
cameradata/C16QL_Isp0_s5k2p2xx.bin:vendor/cameradata/C16QL_Isp0_s5k2p2xx.bin
|
||||
cameradata/C16QL_Isp1_s5k2p2xx.bin:vendor/cameradata/C16QL_Isp1_s5k2p2xx.bin
|
||||
cameradata/F16QL_Isp0_s5k2p2xx.bin:vendor/cameradata/F16QL_Isp0_s5k2p2xx.bin
|
||||
cameradata/F16QL_Isp1_s5k2p2xx.bin:vendor/cameradata/F16QL_Isp1_s5k2p2xx.bin
|
||||
cameradata/F16QS_Isp0_imx240.bin:vendor/cameradata/F16QS_Isp0_imx240.bin
|
||||
cameradata/F16QS_Isp1_imx240.bin:vendor/cameradata/F16QS_Isp1_imx240.bin
|
||||
cameradata/Master0.bin:vendor/cameradata/Master0.bin
|
||||
cameradata/Master1.bin:vendor/cameradata/Master1.bin
|
||||
cameradata/cal_data_LSCmaster.bin:vendor/cameradata/cal_data_LSCmaster.bin
|
||||
cameradata/datapattern_420sp.yuv:vendor/cameradata/datapattern_420sp.yuv
|
||||
cameradata/datapattern_front_420sp.yuv:vendor/cameradata/datapattern_front_420sp.yuv
|
||||
etc/C16QL_s5k2p2xx_module_info.xml:vendor/etc/C16QL_s5k2p2xx_module_info.xml
|
||||
etc/F16QL_s5k2p2xx_module_info.xml:vendor/etc/F16QL_s5k2p2xx_module_info.xml
|
||||
etc/F16QS_imx240_module_info.xml:vendor/etc/F16QS_imx240_module_info.xml
|
||||
etc/firmware/cpp_firmware_v1_1_1.fw:vendor/firmware/cpp_firmware_v1_1_1.fw
|
||||
etc/firmware/cpp_firmware_v1_1_6.fw:vendor/firmware/cpp_firmware_v1_1_6.fw
|
||||
etc/firmware/cpp_firmware_v1_2_0.fw:vendor/firmware/cpp_firmware_v1_2_0.fw
|
||||
etc/B08QT_imx175_module_info.xml
|
||||
etc/E08QL_s5k4h5yb_module_info.xml
|
||||
etc/firmware/cpp_firmware_v1_1_1.fw
|
||||
etc/firmware/cpp_firmware_v1_1_6.fw
|
||||
etc/firmware/cpp_firmware_v1_2_0.fw
|
||||
cameradata/datapattern_420sp.yuv
|
||||
cameradata/datapattern_front_420sp.yuv
|
||||
|
||||
# CPU
|
||||
bin/mpdecision:vendor/bin/mpdecision
|
||||
vendor/bin/thermal-engine
|
||||
vendor/lib/libthermalclient.so
|
||||
vendor/lib/libthermalioctl.so
|
||||
# CPU - Pinned to Samsung Galaxy S5 G900FXXU1CRH1_G900FOXA1CRH1_BTU
|
||||
bin/mpdecision:vendor/bin/mpdecision|f2f62bee58d83a16f649ad63d0520de30bca0d7f
|
||||
vendor/bin/thermal-engine|fb82c53fa2f9c7618a6540de61b4477ac54523a3
|
||||
vendor/lib/libthermalclient.so|e1f2136608a7104016f7f7261dddcfbb0c6aa870
|
||||
vendor/lib/libthermalioctl.so|9c7993e03f68bb17dd744c0369b9bfaff23a1e66
|
||||
|
||||
# DRM
|
||||
bin/qseecomd:vendor/bin/qseecomd
|
||||
vendor/lib/libdrmdiag.so
|
||||
vendor/lib/libdrmfs.so
|
||||
vendor/lib/libdrmtime.so
|
||||
vendor/lib/libQSEEComAPI.so
|
||||
vendor/lib/librpmb.so
|
||||
vendor/lib/libssd.so
|
||||
# DRM - Pinned to Samsung Galaxy S5 G900FXXU1CRH1_G900FOXA1CRH1_BTU
|
||||
bin/qseecomd:vendor/bin/qseecomd|4a69e9799a988d5527e8802470a0a036cb0b120f
|
||||
vendor/lib/libdrmdiag.so|498085e4fc40eacee17bb9c78eaf2da060ecc58e
|
||||
vendor/lib/libdrmfs.so|6f50f22ae12695c2bb29f5c6c2c00029e78b0c12
|
||||
vendor/lib/libdrmtime.so|f50a8cbddeddf591aa94856ffc38801bda1b7a8a
|
||||
vendor/lib/libQSEEComAPI.so|73a760768f621ea48a8e3bb83e0cbbce5937cdf5
|
||||
vendor/lib/librpmb.so|32b75d07607193bcc81fe871d98ceb720fd210e4
|
||||
vendor/lib/libssd.so|f7216c09cd17a94fb946179503cd286262be9de8
|
||||
|
||||
# IPC router security
|
||||
bin/irsc_util:vendor/bin/irsc_util
|
||||
etc/sec_config:vendor/etc/sec_config
|
||||
# IPC router security - Pinned to Samsung Galaxy S5 G900FXXU1CRH1_G900FOXA1CRH1_BTU
|
||||
bin/irsc_util:vendor/bin/irsc_util|286b8129b6b82fb19badcbb5f796013a5e9376a1
|
||||
etc/sec_config
|
||||
|
||||
# IPv6 Tethering
|
||||
bin/radish:vendor/bin/radish
|
||||
# IPv6 Tethering - Pinned to Samsung Galaxy S5 G900FXXU1CRH1_G900FOXA1CRH1_BTU
|
||||
bin/radish:vendor/bin/radish|5c54cb3d5c3472b6bb8f535817eeb55852b34ef0
|
||||
|
||||
# Media
|
||||
vendor/lib/libOmxAacDec.so
|
||||
vendor/lib/libOmxAmrwbplusDec.so
|
||||
vendor/lib/libOmxEvrcDec.so
|
||||
vendor/lib/libOmxQcelp13Dec.so
|
||||
vendor/lib/libOmxWmaDec.so
|
||||
# Media - Pinned to Samsung Galaxy S5 Mini G800HXXU1CQC1_G800HXEO1CQB1
|
||||
vendor/lib/libOmxAacDec.so|9d3a2a498fa740be2a32c336a2dc1a911decd50b
|
||||
vendor/lib/libOmxAmrwbplusDec.so|54ebb32cf1f71ca1fe8824176c8c4154a9ee120f
|
||||
vendor/lib/libOmxEvrcDec.so|3c31f3d7b420db0076dfb35eb4cbc3efa5160ab0
|
||||
vendor/lib/libOmxQcelp13Dec.so|05392036cf8981a260b91991c306407b02afdcb1
|
||||
vendor/lib/libOmxWmaDec.so|1b96f549a54660218c1459cf7133d2a5632ca657
|
||||
|
||||
# Perf
|
||||
vendor/lib/libqti-perfd-client.so
|
||||
# Perf - Pinned to Samsung Galaxy S5 Mini G800HXXU1CQC1_G800HXEO1CQB1
|
||||
vendor/lib/libqc-opt.so|86b2577d54bafa497601ff6b6c4159b210e55fae
|
||||
vendor/lib/libqti-perfd-client.so|909e0a3d1b7a86030f58b165d5f761fc50183ff0
|
||||
|
||||
# Qualcomm
|
||||
vendor/lib/libxml.so
|
||||
# Qualcomm - Pinned to Samsung Galaxy S5 G900FXXS1BPCL_G900FOXA1BOJ1_BTU
|
||||
vendor/lib/libxml.so|251560fdf50b82c15f481bfc6cf12235c42e19c9
|
||||
|
||||
# Qualcomm Framework - Pinned to G900FXXS1BPCL_G900FOXA1BOJ1_BTU
|
||||
# Qualcomm Framework - Pinned to Samsung Galaxy S5 G900FXXS1BPCL_G900FOXA1BOJ1_BTU
|
||||
lib/libmdmdetect.so:vendor/lib/libmdmdetect.so|9c19d5aacc094597c166529386f83ac721ac1979
|
||||
lib/libperipheral_client.so:vendor/lib/libperipheral_client.so|7107a8e656fabc5ff6b7a33740be80a1add6abbd
|
||||
vendor/lib/libconfigdb.so|a7eedfbb0ffa070c9239f0d293262e268342da1d
|
||||
|
@ -259,35 +102,18 @@ vendor/lib/libqmi_csi.so|dee249a1f0fff082b5e5547cfab103ac10ab55e2
|
|||
vendor/lib/libqmi_encdec.so|82e39ae7e4bb8651d06fdae99fc38e3fb390b62d
|
||||
vendor/lib/libqmiservices.so|0b90d67d7ec0b0bc3de2b5ccc3afcda13bd5ffd8
|
||||
|
||||
# Radio - Pinned to G900FXXS1BPCL_G900FOXA1BOJ1_BTU
|
||||
bin/efsks:vendor/bin/efsks|2c366ac7ab878068c77e5598c411a48cf47b056a
|
||||
bin/ks:vendor/bin/ks|949406ae5d1b74034b3828af1905a181e4b69961
|
||||
bin/qcks:vendor/bin/qcks|9026c84f32e1ee5121024c72b878c09dfde95e5b
|
||||
# Radio - Pinned to Samsung Galaxy S5 G900FXXS1BPCL_G900FOXA1BOJ1_BTU
|
||||
bin/qmuxd:vendor/bin/qmuxd|e257d63996812e2eb23810bda59913f558ee03d2
|
||||
bin/rfs_access:vendor/bin/rfs_access|49a8516ed01b609a9e5079d8135b75db5b024236
|
||||
bin/rmt_storage:vendor/bin/rmt_storage|000ddcabfc9416e9a27ba6d04860cc14b6803cdd
|
||||
vendor/lib/libril-qcril-hook-oem.so|6a73ed46f4fbcb283eea5fb44b24a7d14522bfe5
|
||||
|
||||
# Sensors
|
||||
lib/hw/sensors.msm8974.so:vendor/lib/hw/sensors.vendor.msm8974.so|48c6112bc4097e9176fcd53bf3f7ba0d643b27aa
|
||||
lib/libhr.so:vendor/lib/libhr.so
|
||||
lib/hw/sensors.vendor.msm8226.so:vendor/lib/sensors.vendor.msm8226.so
|
||||
lib/libyasalgo.so:vendor/lib/libyasalgo.so
|
||||
|
||||
# Time services
|
||||
# Time services - Pinned to Samsung Galaxy S5 G900FXXU1CRH1_G900FOXA1CRH1_BTU
|
||||
-app/TimeService/TimeService.apk
|
||||
bin/time_daemon:vendor/bin/time_daemon
|
||||
vendor/lib/libTimeService.so
|
||||
-vendor/lib/libtime_genoff.so
|
||||
|
||||
# Wi-Fi
|
||||
etc/wifi/bcmdhd_apsta.bin:vendor/etc/wifi/bcmdhd_apsta.bin
|
||||
etc/wifi/bcmdhd_ibss.bin:vendor/etc/wifi/bcmdhd_ibss.bin
|
||||
etc/wifi/bcmdhd_mfg.bin:vendor/etc/wifi/bcmdhd_mfg.bin
|
||||
etc/wifi/bcmdhd_sta.bin:vendor/etc/wifi/bcmdhd_sta.bin
|
||||
etc/wifi/nvram_mfg.txt:vendor/etc/wifi/nvram_mfg.txt
|
||||
etc/wifi/nvram_mfg.txt_a0:vendor/etc/wifi/nvram_mfg.txt_a0
|
||||
etc/wifi/nvram_mfg.txt_muratafem1:vendor/etc/wifi/nvram_mfg.txt_murata
|
||||
etc/wifi/nvram_mfg.txt_semco3rd:vendor/etc/wifi/nvram_mfg.txt_semco3rd
|
||||
etc/wifi/nvram_net.txt:vendor/etc/wifi/nvram_net.txt
|
||||
etc/wifi/nvram_net.txt_a0:vendor/etc/wifi/nvram_net.txt_a0
|
||||
etc/wifi/nvram_net.txt_muratafem1:vendor/etc/wifi/nvram_net.txt_murata
|
||||
etc/wifi/nvram_net.txt_semco3rd:vendor/etc/wifi/nvram_net.txt_semco3rd
|
||||
bin/time_daemon:vendor/bin/time_daemon|b35d3b8364ec2ded9ee551ee41eb80b84067d6a9
|
||||
vendor/lib/libTimeService.so|dde4ddd81b4f56dde68fedf9ec2e0d2c3512d4f2
|
||||
-vendor/lib/libtime_genoff.so|13eccbbd1fdbd8474247ed6552e3b31507636531
|
||||
|
|
|
@ -21,121 +21,86 @@
|
|||
<MediaCodecs>
|
||||
<Encoders>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.avc" type="video/avc" update="true">
|
||||
<Limit name="measured-frame-rate-320x240" range="561-561" />
|
||||
<Limit name="measured-frame-rate-720x480" range="281-281" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="123-123" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="78-78" />
|
||||
<Limit name="measured-frame-rate-320x240" range="339-339" />
|
||||
<Limit name="measured-frame-rate-720x480" range="95-95" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="41-41" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="16-16" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.h263" type="video/3gpp" update="true">
|
||||
<Limit name="measured-frame-rate-176x144" range="462-462" />
|
||||
<Limit name="measured-frame-rate-352x288" range="291-291" />
|
||||
<Limit name="measured-frame-rate-176x144" range="277-444" />
|
||||
<Limit name="measured-frame-rate-352x288" range="254-277" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.mpeg4" type="video/mp4v-es" update="true">
|
||||
<Limit name="measured-frame-rate-176x144" range="502-502" />
|
||||
<Limit name="measured-frame-rate-352x288" range="312-312" />
|
||||
<Limit name="measured-frame-rate-640x480" range="174-174" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.encoder.vp8" type="video/x-vnd.on2.vp8" update="true">
|
||||
<Limit name="measured-frame-rate-320x180" range="93-93" />
|
||||
<Limit name="measured-frame-rate-640x360" range="90-90" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="79-79" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="42-42" />
|
||||
<Limit name="measured-frame-rate-176x144" range="324-324" />
|
||||
<Limit name="measured-frame-rate-352x288" range="238-238" />
|
||||
<Limit name="measured-frame-rate-640x480" range="105-105" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.h264.encoder" type="video/avc" update="true">
|
||||
<Limit name="measured-frame-rate-320x240" range="387-387" />
|
||||
<Limit name="measured-frame-rate-720x480" range="237-237" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="108-108" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="45-45" />
|
||||
<Limit name="measured-frame-rate-320x240" range="285-285" />
|
||||
<Limit name="measured-frame-rate-720x480" range="84-84" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="33-33" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="15-15" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.h263.encoder" type="video/3gpp" update="true">
|
||||
<Limit name="measured-frame-rate-176x144" range="900-900" />
|
||||
<Limit name="measured-frame-rate-176x144" range="515-515" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.mpeg4.encoder" type="video/mp4v-es" update="true">
|
||||
<Limit name="measured-frame-rate-176x144" range="1145-1145" />
|
||||
<Limit name="measured-frame-rate-176x144" range="588-588" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.vp8.encoder" type="video/x-vnd.on2.vp8" update="true">
|
||||
<Limit name="measured-frame-rate-320x180" range="461-461" />
|
||||
<Limit name="measured-frame-rate-640x360" range="214-214" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="99-99" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="39-39" />
|
||||
<Limit name="measured-frame-rate-320x180" range="312-312" />
|
||||
<Limit name="measured-frame-rate-640x360" range="117-117" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="31-31" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="13-13" />
|
||||
</MediaCodec>
|
||||
</Encoders>
|
||||
<Decoders>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.avc" type="video/avc" update="true">
|
||||
<Limit name="measured-frame-rate-320x240" range="453-453" />
|
||||
<Limit name="measured-frame-rate-720x480" range="249-249" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="103-103" />
|
||||
<Limit name="measured-frame-rate-1920x1088" range="46-46" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.SEC.avc.sw.dec" type="video/avc" update="true" >
|
||||
<Limit name="measured-frame-rate-320x240" range="700-900" />
|
||||
<Limit name="measured-frame-rate-720x480" range="200-250" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="75-100" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="15-25" />
|
||||
<Limit name="measured-frame-rate-320x240" range="368-368" />
|
||||
<Limit name="measured-frame-rate-720x480" range="197-197" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="97-97" />
|
||||
<Limit name="measured-frame-rate-1920x1088" range="43-43" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.h263" type="video/3gpp" update="true">
|
||||
<Limit name="measured-frame-rate-176x144" range="1089-1089" />
|
||||
<Limit name="measured-frame-rate-352x288" range="842-842" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.SEC.h263.sw.dec" type="video/3gpp" update="true" >
|
||||
<Limit name="measured-frame-rate-176x144" range="300-430" />
|
||||
<Limit name="measured-frame-rate-352x288" range="240-336" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.SEC.hevc.sw.dec" type="video/hevc" update="true" >
|
||||
<Limit name="measured-frame-rate-320x240" range="400-480" />
|
||||
<Limit name="measured-frame-rate-720x480" range="200-240" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="100-120" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="50-60" />
|
||||
<Limit name="measured-frame-rate-176x144" range="608-608" />
|
||||
<Limit name="measured-frame-rate-352x288" range="578-578" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.mpeg4" type="video/mp4v-es" update="true">
|
||||
<Limit name="measured-frame-rate-480x360" range="798-798" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.SEC.mpeg4.sw.dec" type="video/mp4v-es" update="true" >
|
||||
<Limit name="measured-frame-rate-320x240" range="1000-1200" />
|
||||
<Limit name="measured-frame-rate-720x480" range="200-400" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="100-200" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="50-100" />
|
||||
<Limit name="measured-frame-rate-480x360" range="411-411" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.qcom.video.decoder.vp8" type="video/x-vnd.on2.vp8" update="true">
|
||||
<Limit name="measured-frame-rate-320x240" range="210-210" />
|
||||
<Limit name="measured-frame-rate-640x360" range="191-191" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="537-537" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="325-325" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.SEC.vp8.dec" type="video/x-vnd.on2.vp8" update="true" >
|
||||
<Limit name="measured-frame-rate-320x240" range="400-480" />
|
||||
<Limit name="measured-frame-rate-720x480" range="200-240" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="100-120" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="50-60" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
|
||||
<Limit name="measured-frame-rate-320x240" range="396-396" />
|
||||
<Limit name="measured-frame-rate-720x480" range="279-279" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="138-138" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="41-41" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
|
||||
<Limit name="measured-frame-rate-176x144" range="1200-1200" />
|
||||
<Limit name="measured-frame-rate-352x288" range="923-923" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
|
||||
<Limit name="measured-frame-rate-352x288" range="1883-1883" />
|
||||
<Limit name="measured-frame-rate-720x480" range="516-516" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="234-234" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="106-106" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
|
||||
<Limit name="measured-frame-rate-320x240" range="1644-1644" />
|
||||
<Limit name="measured-frame-rate-640x360" range="513-513" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="106-106" />
|
||||
<Limit name="measured-frame-rate-320x240" range="303-303" />
|
||||
<Limit name="measured-frame-rate-640x360" range="464-464" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="193-193" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="93-93" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.h264.decoder" type="video/avc" update="true">
|
||||
<Limit name="measured-frame-rate-320x240" range="601-601" />
|
||||
<Limit name="measured-frame-rate-720x480" range="197-197" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="60-60" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="20-20" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.h263.decoder" type="video/3gpp" update="true">
|
||||
<Limit name="measured-frame-rate-176x144" range="1346-1346" />
|
||||
<Limit name="measured-frame-rate-352x288" range="736-736" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.hevc.decoder" type="video/hevc" update="true">
|
||||
<Limit name="measured-frame-rate-352x288" range="503-503" />
|
||||
<Limit name="measured-frame-rate-720x480" range="336-336" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="118-118" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="54-54" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.vp8.decoder" type="video/x-vnd.on2.vp8" update="true">
|
||||
<Limit name="measured-frame-rate-320x240" range="578-578" />
|
||||
<Limit name="measured-frame-rate-640x360" range="212-212" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="40-40" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="31-31" />
|
||||
</MediaCodec>
|
||||
<MediaCodec name="OMX.google.vp9.decoder" type="video/x-vnd.on2.vp9" update="true">
|
||||
<Limit name="measured-frame-rate-320x240" range="535-535" />
|
||||
<Limit name="measured-frame-rate-640x360" range="480-480" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="144-144" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="95-95" />
|
||||
<Limit name="measured-frame-rate-320x240" range="287-287" />
|
||||
<Limit name="measured-frame-rate-640x360" range="251-251" />
|
||||
<Limit name="measured-frame-rate-1280x720" range="68-68" />
|
||||
<Limit name="measured-frame-rate-1920x1080" range="53-53" />
|
||||
</MediaCodec>
|
||||
</Decoders>
|
||||
</MediaCodecs>
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2010 The Android Open Source Project
|
||||
Copyright (C) 2014 The Linux Foundation. All rights reserved.
|
||||
Not a contribution.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -15,6 +13,11 @@
|
|||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!--
|
||||
Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
Not a Contribution, Apache license notifications and license are retained
|
||||
for attribution purposes only.
|
||||
-->
|
||||
<!DOCTYPE MediaSettings [
|
||||
<!ELEMENT MediaSettings (CamcorderProfiles,
|
||||
EncoderOutputFileFormat+,
|
||||
|
@ -38,7 +41,7 @@
|
|||
<!ATTLIST Audio codec (amrnb|amrwb|aac) #REQUIRED>
|
||||
<!ATTLIST Audio bitRate CDATA #REQUIRED>
|
||||
<!ATTLIST Audio sampleRate CDATA #REQUIRED>
|
||||
<!ATTLIST Audio channels (1|2) #REQUIRED>
|
||||
<!ATTLIST Audio channels (1|2|6) #REQUIRED>
|
||||
<!ELEMENT ImageEncoding EMPTY>
|
||||
<!ATTLIST ImageEncoding quality (90|80|70|60|50|40) #REQUIRED>
|
||||
<!ELEMENT ImageDecoding EMPTY>
|
||||
|
@ -64,8 +67,8 @@
|
|||
<!ATTLIST AudioEncoderCap maxBitRate CDATA #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap minSampleRate CDATA #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap maxSampleRate CDATA #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap minChannels (1|2) #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap maxChannels (1|2) #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap minChannels (1|2|6) #REQUIRED>
|
||||
<!ATTLIST AudioEncoderCap maxChannels (1|2|6) #REQUIRED>
|
||||
<!ELEMENT VideoDecoderCap EMPTY>
|
||||
<!ATTLIST VideoDecoderCap name (wmv) #REQUIRED>
|
||||
<!ATTLIST VideoDecoderCap enabled (true|false) #REQUIRED>
|
||||
|
@ -79,298 +82,412 @@
|
|||
-->
|
||||
<MediaSettings>
|
||||
<!-- Each camcorder profile defines a set of predefined configuration parameters -->
|
||||
<CamcorderProfiles cameraId="0">
|
||||
<!-- Back Camera -->
|
||||
<CamcorderProfiles cameraId="0" startOffsetMs="700">
|
||||
|
||||
<EncoderProfile quality="qvga" fileFormat="3gp" duration="60">
|
||||
<Video codec="m4v"
|
||||
bitRate="128000"
|
||||
width="320"
|
||||
height="240"
|
||||
frameRate="15" />
|
||||
<Audio codec="amrnb"
|
||||
bitRate="12200"
|
||||
sampleRate="8000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="cif" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="1200000"
|
||||
width="352"
|
||||
height="288"
|
||||
frameRate="30" />
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="6000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="17000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="2160p" fileFormat="mp4" duration="30">
|
||||
<EncoderProfile quality="low" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="65000000"
|
||||
width="3840"
|
||||
height="2160"
|
||||
bitRate="384000"
|
||||
width="176"
|
||||
height="144"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="320000"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="2" />
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="192000"
|
||||
width="176"
|
||||
height="144"
|
||||
frameRate="30" />
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="amrnb"
|
||||
bitRate="12200"
|
||||
sampleRate="8000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="1200000"
|
||||
width="352"
|
||||
height="288"
|
||||
frameRate="30" />
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="6000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="17000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse2160p" fileFormat="mp4" duration="30">
|
||||
<EncoderProfile quality="high" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="65000000"
|
||||
width="3840"
|
||||
height="2160"
|
||||
bitRate="17000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="320000"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="2" />
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<ImageEncoding quality="95" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
<EncoderProfile quality="qcif" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="384000"
|
||||
width="176"
|
||||
height="144"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="qvga" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="767000"
|
||||
width="320"
|
||||
height="240"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="3449000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="17000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="384000"
|
||||
width="176"
|
||||
height="144"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="17000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="384000"
|
||||
width="176"
|
||||
height="144"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="767000"
|
||||
width="320"
|
||||
height="240"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="3449000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="17000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<ImageEncoding quality="95" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
|
||||
</CamcorderProfiles>
|
||||
|
||||
<CamcorderProfiles cameraId="1">
|
||||
<!-- Front Camera -->
|
||||
<CamcorderProfiles cameraId="1" startOffsetMs="700">
|
||||
|
||||
<EncoderProfile quality="qvga" fileFormat="3gp" duration="60">
|
||||
<Video codec="m4v"
|
||||
bitRate="128000"
|
||||
width="320"
|
||||
height="240"
|
||||
frameRate="15" />
|
||||
<Audio codec="amrnb"
|
||||
bitRate="12200"
|
||||
sampleRate="8000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
<EncoderProfile quality="low" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="384000"
|
||||
width="176"
|
||||
height="144"
|
||||
frameRate="30" />
|
||||
|
||||
<EncoderProfile quality="cif" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="1200000"
|
||||
width="352"
|
||||
height="288"
|
||||
frameRate="30" />
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="high" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="qcif" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="384000"
|
||||
width="176"
|
||||
height="144"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="qvga" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="767000"
|
||||
width="320"
|
||||
height="240"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="3449000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
<EncoderProfile quality="timelapselow" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="384000"
|
||||
width="176"
|
||||
height="144"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapsehigh" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="384000"
|
||||
width="176"
|
||||
height="144"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapseqvga" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="767000"
|
||||
width="320"
|
||||
height="240"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="3449000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="480p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="6000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
|
||||
<EncoderProfile quality="720p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
<!--
|
||||
The Audio part of the profile will not be used since time lapse mode
|
||||
does not capture audio
|
||||
-->
|
||||
<Audio codec="aac"
|
||||
bitRate="128000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="1080p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="17000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapseqcif" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="192000"
|
||||
width="176"
|
||||
height="144"
|
||||
frameRate="30" />
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="amrnb"
|
||||
bitRate="12200"
|
||||
sampleRate="8000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapsecif" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="1200000"
|
||||
width="352"
|
||||
height="288"
|
||||
frameRate="30" />
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse480p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="6000000"
|
||||
width="720"
|
||||
height="480"
|
||||
frameRate="30" />
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse720p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="12000000"
|
||||
width="1280"
|
||||
height="720"
|
||||
frameRate="30" />
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<EncoderProfile quality="timelapse1080p" fileFormat="mp4" duration="30">
|
||||
<Video codec="h264"
|
||||
bitRate="17000000"
|
||||
width="1920"
|
||||
height="1080"
|
||||
frameRate="30" />
|
||||
<!-- audio setting is ignored -->
|
||||
<Audio codec="aac"
|
||||
bitRate="96000"
|
||||
sampleRate="48000"
|
||||
channels="1" />
|
||||
</EncoderProfile>
|
||||
|
||||
<ImageEncoding quality="95" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
<ImageEncoding quality="95" />
|
||||
<ImageEncoding quality="80" />
|
||||
<ImageEncoding quality="70" />
|
||||
<ImageDecoding memCap="20000000" />
|
||||
|
||||
</CamcorderProfiles>
|
||||
|
||||
|
@ -383,27 +500,27 @@
|
|||
or query the capabilities of the codec at all if it is disabled
|
||||
-->
|
||||
<VideoEncoderCap name="h264" enabled="true"
|
||||
minBitRate="64000" maxBitRate="50000000"
|
||||
minFrameWidth="176" maxFrameWidth="3840"
|
||||
minFrameHeight="144" maxFrameHeight="2160"
|
||||
minFrameRate="15" maxFrameRate="30" />
|
||||
|
||||
<VideoEncoderCap name="h263" enabled="true"
|
||||
minBitRate="64000" maxBitRate="2000000"
|
||||
minFrameWidth="176" maxFrameWidth="800"
|
||||
minFrameHeight="144" maxFrameHeight="480"
|
||||
minFrameRate="15" maxFrameRate="30" />
|
||||
|
||||
<VideoEncoderCap name="m4v" enabled="true"
|
||||
minBitRate="64000" maxBitRate="40000000"
|
||||
minBitRate="64000" maxBitRate="20000000"
|
||||
minFrameWidth="176" maxFrameWidth="1920"
|
||||
minFrameHeight="144" maxFrameHeight="1080"
|
||||
minFrameRate="15" maxFrameRate="30" />
|
||||
minFrameRate="1" maxFrameRate="30" />
|
||||
|
||||
<VideoEncoderCap name="h263" enabled="true"
|
||||
minBitRate="64000" maxBitRate="1000000"
|
||||
minFrameWidth="176" maxFrameWidth="720"
|
||||
minFrameHeight="144" maxFrameHeight="480"
|
||||
minFrameRate="1" maxFrameRate="30" />
|
||||
|
||||
<VideoEncoderCap name="m4v" enabled="true"
|
||||
minBitRate="64000" maxBitRate="20000000"
|
||||
minFrameWidth="176" maxFrameWidth="1920"
|
||||
minFrameHeight="144" maxFrameHeight="1080"
|
||||
minFrameRate="1" maxFrameRate="30" />
|
||||
|
||||
<AudioEncoderCap name="aac" enabled="true"
|
||||
minBitRate="758" maxBitRate="288000"
|
||||
minBitRate="8192" maxBitRate="256000"
|
||||
minSampleRate="8000" maxSampleRate="48000"
|
||||
minChannels="1" maxChannels="1" />
|
||||
minChannels="1" maxChannels="2" />
|
||||
|
||||
<AudioEncoderCap name="heaac" enabled="true"
|
||||
minBitRate="8000" maxBitRate="64000"
|
||||
|
@ -416,7 +533,7 @@
|
|||
minChannels="1" maxChannels="1" />
|
||||
|
||||
<AudioEncoderCap name="amrwb" enabled="true"
|
||||
minBitRate="6600" maxBitRate="23050"
|
||||
minBitRate="6600" maxBitRate="23850"
|
||||
minSampleRate="16000" maxSampleRate="16000"
|
||||
minChannels="1" maxChannels="1" />
|
||||
|
||||
|
@ -432,6 +549,6 @@
|
|||
for TEST applications. For other applications, we do
|
||||
not perform any checks at all.
|
||||
-->
|
||||
<VideoDecoderCap name="wmv" enabled="false"/>
|
||||
<AudioDecoderCap name="wma" enabled="false"/>
|
||||
<VideoDecoderCap name="wmv" enabled="true"/>
|
||||
<AudioDecoderCap name="wma" enabled="true"/>
|
||||
</MediaSettings>
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
disable_scan_offload=1
|
||||
p2p_search_delay=100
|
|
@ -1 +1 @@
|
|||
/vendor/lib/hw/sensors.vendor.msm8974.so
|
||||
/vendor/lib/hw/sensors.vendor.msm8226.so
|
||||
|
|
44
configs/thermal-engine-8226.conf
Normal file
44
configs/thermal-engine-8226.conf
Normal file
|
@ -0,0 +1,44 @@
|
|||
sampling 5000
|
||||
|
||||
[CPU0-1_MONITOR]
|
||||
algo_type monitor
|
||||
sensor cpu0-1
|
||||
sampling 1000
|
||||
thresholds 120000
|
||||
thresholds_clr 115000
|
||||
actions shutdown
|
||||
action_info 5000
|
||||
|
||||
[CPU2-3_MONITOR]
|
||||
algo_type monitor
|
||||
sensor cpu2-3
|
||||
sampling 1000
|
||||
thresholds 120000
|
||||
thresholds_clr 115000
|
||||
actions shutdown
|
||||
action_info 5000
|
||||
|
||||
[CPU0-1_SS]
|
||||
algo_type ss
|
||||
sensor cpu0-1
|
||||
device cpu
|
||||
sampling 65
|
||||
set_point 85000
|
||||
set_point_clr 65000
|
||||
|
||||
[CPU2-3_SS]
|
||||
algo_type ss
|
||||
sensor cpu2-3
|
||||
device cpu
|
||||
sampling 65
|
||||
set_point 85000
|
||||
set_point_clr 65000
|
||||
|
||||
[SS-POPMEM]
|
||||
algo_type ss
|
||||
sampling 1000
|
||||
sensor pop_mem
|
||||
device cpu
|
||||
set_point 80000
|
||||
set_point_clr 55000
|
||||
time_constant 2
|
|
@ -1,102 +0,0 @@
|
|||
sampling 5000
|
||||
|
||||
[SS-CPU0]
|
||||
#algo_type ss
|
||||
sampling 100
|
||||
sensor cpu0
|
||||
device cpu
|
||||
set_point 75000
|
||||
set_point_clr 60000
|
||||
override 15000
|
||||
|
||||
[SS-CPU1]
|
||||
#algo_type ss
|
||||
sampling 100
|
||||
sensor cpu1
|
||||
device cpu
|
||||
set_point 75000
|
||||
set_point_clr 60000
|
||||
override 15000
|
||||
|
||||
[SS-CPU2]
|
||||
#algo_type ss
|
||||
sampling 100
|
||||
sensor cpu2
|
||||
device cpu
|
||||
set_point 75000
|
||||
set_point_clr 60000
|
||||
override 15000
|
||||
|
||||
[SS-CPU3]
|
||||
#algo_type ss
|
||||
sampling 100
|
||||
sensor cpu3
|
||||
device cpu
|
||||
set_point 75000
|
||||
set_point_clr 60000
|
||||
override 15000
|
||||
|
||||
[SS-GPU]
|
||||
#algo_type ss
|
||||
sampling 250
|
||||
sensor tsens_tz_sensor10
|
||||
device gpu
|
||||
set_point 85000
|
||||
set_point_clr 55000
|
||||
override 15000
|
||||
|
||||
[SS-POPMEM]
|
||||
#algo_type ss
|
||||
sampling 10
|
||||
sensor pop_mem
|
||||
device cpu
|
||||
set_point 80000
|
||||
set_point_clr 55000
|
||||
override 15000
|
||||
time_constant 16
|
||||
|
||||
[GPU_MONITOR]
|
||||
algo_type monitor
|
||||
sensor tsens_tz_sensor10
|
||||
sampling 1000
|
||||
thresholds 75000
|
||||
thresholds_clr 55000
|
||||
actions battery
|
||||
action_info 1
|
||||
|
||||
[CPU0_MONITOR]
|
||||
algo_type monitor
|
||||
sensor cpu0
|
||||
sampling 65
|
||||
thresholds 115000
|
||||
thresholds_clr 110000
|
||||
actions shutdown
|
||||
action_info 0
|
||||
|
||||
[CPU1_MONITOR]
|
||||
algo_type monitor
|
||||
sensor cpu1
|
||||
sampling 65
|
||||
thresholds 115000
|
||||
thresholds_clr 110000
|
||||
actions shutdown
|
||||
action_info 0
|
||||
|
||||
[CPU2_MONITOR]
|
||||
algo_type monitor
|
||||
sensor cpu2
|
||||
sampling 65
|
||||
thresholds 115000
|
||||
thresholds_clr 110000
|
||||
actions shutdown
|
||||
action_info 0
|
||||
|
||||
[CPU3_MONITOR]
|
||||
algo_type monitor
|
||||
sensor cpu3
|
||||
sampling 65
|
||||
thresholds 115000
|
||||
thresholds_clr 110000
|
||||
actions shutdown
|
||||
action_info 0
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
disable_scan_offload=1
|
||||
p2p_disabled=1
|
||||
tdls_external_control=1
|
|
@ -69,6 +69,6 @@ for BLOB_LIST in "$MY_DIR"/../$DEVICE/device-proprietary-files*.txt; do
|
|||
extract $BLOB_LIST "$SRC"
|
||||
done
|
||||
|
||||
./../msm8974-common/extract-files.sh $@
|
||||
./../msm8226-common/extract-files.sh $@
|
||||
|
||||
"$MY_DIR"/setup-makefiles.sh
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2016 The Mokee Project
|
||||
# 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.
|
||||
#
|
||||
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := fingerprint.msm8974
|
||||
LOCAL_MODULE_RELATIVE_PATH := hw
|
||||
LOCAL_SRC_FILES := \
|
||||
fingerprint.c \
|
||||
fingerprint_tz.c \
|
||||
QSEEComAPI.c \
|
||||
hash.c
|
||||
|
||||
LOCAL_C_INCLUDES += \
|
||||
external/sqlite/dist
|
||||
|
||||
LOCAL_SHARED_LIBRARIES := \
|
||||
liblog \
|
||||
libsqlite
|
||||
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
|
@ -1,164 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2016 The Mokee 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 "Custom_QSEE"
|
||||
#define LOG_NDEBUG 0
|
||||
|
||||
#include <cutils/log.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "QSEEComAPI.h"
|
||||
|
||||
struct qcom_keymaster_handle {
|
||||
void *libhandle;
|
||||
int (*QSEECom_start_app)(struct QSEECom_handle ** handle, const char* path,
|
||||
const char* appname, uint32_t size);
|
||||
int (*QSEECom_shutdown_app)(struct QSEECom_handle **handle);
|
||||
int (*QSEECom_send_cmd)(struct QSEECom_handle* handle, void *cbuf,
|
||||
uint32_t clen, void *rbuf, uint32_t rlen);
|
||||
int (*QSEECom_send_modified_cmd)(struct QSEECom_handle* handle, void *cbuf,
|
||||
uint32_t clen, void *rbuf, uint32_t rlen,
|
||||
struct QSEECom_ion_fd_info *ihandle);
|
||||
int (*QSEECom_set_bandwidth)(struct QSEECom_handle* handle, bool high);
|
||||
};
|
||||
typedef struct qcom_keymaster_handle qcom_keymaster_handle_t;
|
||||
|
||||
bool init = false;
|
||||
qcom_keymaster_handle_t* km_handle;
|
||||
int file_num = 0;
|
||||
|
||||
static int qcom_km_get_lib_sym(qcom_keymaster_handle_t* km_handle)
|
||||
{
|
||||
km_handle->libhandle = dlopen("libQSEEComAPI.so", RTLD_NOW);
|
||||
if ( km_handle->libhandle ) {
|
||||
*(void **)(&km_handle->QSEECom_start_app) =
|
||||
dlsym(km_handle->libhandle,"QSEECom_start_app");
|
||||
if (km_handle->QSEECom_start_app == NULL) {
|
||||
ALOGE("dlsym: Error Loading QSEECom_start_app");
|
||||
dlclose(km_handle->libhandle );
|
||||
km_handle->libhandle = NULL;
|
||||
return -1;
|
||||
}
|
||||
*(void **)(&km_handle->QSEECom_shutdown_app) =
|
||||
dlsym(km_handle->libhandle,"QSEECom_shutdown_app");
|
||||
if (km_handle->QSEECom_shutdown_app == NULL) {
|
||||
ALOGE("dlsym: Error Loading QSEECom_shutdown_app");
|
||||
dlclose(km_handle->libhandle );
|
||||
km_handle->libhandle = NULL;
|
||||
return -1;
|
||||
}
|
||||
*(void **)(&km_handle->QSEECom_send_cmd) =
|
||||
dlsym(km_handle->libhandle,"QSEECom_send_cmd");
|
||||
if (km_handle->QSEECom_send_cmd == NULL) {
|
||||
ALOGE("dlsym: Error Loading QSEECom_send_cmd");
|
||||
dlclose(km_handle->libhandle );
|
||||
km_handle->libhandle = NULL;
|
||||
return -1;
|
||||
}
|
||||
*(void **)(&km_handle->QSEECom_send_modified_cmd) =
|
||||
dlsym(km_handle->libhandle,"QSEECom_send_modified_cmd");
|
||||
if (km_handle->QSEECom_send_modified_cmd == NULL) {
|
||||
ALOGE("dlsym: Error Loading QSEECom_send_modified_cmd");
|
||||
dlclose(km_handle->libhandle );
|
||||
km_handle->libhandle = NULL;
|
||||
return -1;
|
||||
}
|
||||
*(void **)(&km_handle->QSEECom_set_bandwidth) =
|
||||
dlsym(km_handle->libhandle,"QSEECom_set_bandwidth");
|
||||
if (km_handle->QSEECom_set_bandwidth == NULL) {
|
||||
ALOGE("dlsym: Error Loading QSEECom_set_bandwidth");
|
||||
dlclose(km_handle->libhandle );
|
||||
km_handle->libhandle = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
} else {
|
||||
ALOGE("failed to load qseecom library");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int init_qsee()
|
||||
{
|
||||
if (init) {
|
||||
return 0;
|
||||
}
|
||||
int ret = 0;
|
||||
km_handle = (qcom_keymaster_handle_t *)malloc(sizeof(qcom_keymaster_handle_t));
|
||||
if (km_handle == NULL) {
|
||||
ALOGE("Memalloc for keymaster handle failed");
|
||||
return -1;
|
||||
}
|
||||
km_handle->libhandle = NULL;
|
||||
ret = qcom_km_get_lib_sym(km_handle);
|
||||
if (ret) {
|
||||
free(km_handle);
|
||||
return -1;
|
||||
}
|
||||
init = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int QSEECom_start_app(struct QSEECom_handle **clnt_handle, const char *path,
|
||||
const char *fname, uint32_t sb_size)
|
||||
{
|
||||
init_qsee();
|
||||
int ret = 0;
|
||||
ret = (*km_handle->QSEECom_start_app)(clnt_handle,path,fname,sb_size);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int QSEECom_shutdown_app(struct QSEECom_handle **handle)
|
||||
{
|
||||
init_qsee();
|
||||
int ret = 0;
|
||||
ret = (*km_handle->QSEECom_shutdown_app)(handle);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int QSEECom_send_cmd(struct QSEECom_handle *handle, void *send_buf,
|
||||
uint32_t sbuf_len, void *rcv_buf, uint32_t rbuf_len)
|
||||
{
|
||||
init_qsee();
|
||||
int ret = 0;
|
||||
ret = (*km_handle->QSEECom_send_cmd)(handle,send_buf,sbuf_len,rcv_buf,rbuf_len);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int QSEECom_send_modified_cmd(struct QSEECom_handle *handle, void *send_buf,
|
||||
uint32_t sbuf_len, void *resp_buf, uint32_t rbuf_len,
|
||||
struct QSEECom_ion_fd_info *ifd_data)
|
||||
{
|
||||
init_qsee();
|
||||
int ret = 0;
|
||||
ret = (*km_handle->QSEECom_send_modified_cmd)(handle,send_buf,sbuf_len,resp_buf,rbuf_len,ifd_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int QSEECom_set_bandwidth(struct QSEECom_handle *handle, bool high)
|
||||
{
|
||||
init_qsee();
|
||||
int ret = 0;
|
||||
ret = (*km_handle->QSEECom_set_bandwidth)(handle,high);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1,299 +0,0 @@
|
|||
/*
|
||||
* 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 __QSEECOMAPI_H_
|
||||
#define __QSEECOMAPI_H_
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Include Files
|
||||
* -------------------------------------------------------------------------*/
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#define QSEECOM_ALIGN_SIZE 0x40
|
||||
#define QSEECOM_ALIGN_MASK (QSEECOM_ALIGN_SIZE - 1)
|
||||
#define QSEECOM_ALIGN(x) \
|
||||
((x + QSEECOM_ALIGN_SIZE) & (~QSEECOM_ALIGN_MASK))
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Preprocessor Definitions and Constants
|
||||
* -------------------------------------------------------------------------*/
|
||||
/** The memory is locked and non-pageable */
|
||||
#define MEM_LOCKED 0x00000001
|
||||
/** The memory is marked non-cacheable */
|
||||
#define MEM_NON_CACHED 0x00000002
|
||||
|
||||
#define QSEECOM_APP_QUERY_FAILED -6
|
||||
#define QSEECOM_APP_NOT_LOADED -5
|
||||
#define QSEECOM_APP_ALREADY_LOADED -4
|
||||
#define QSEECOM_LISTENER_UNREGISTERED -3
|
||||
#define QSEECOM_LISTENER_ALREADY_REGISTERED -2
|
||||
#define QSEECOM_LISTENER_REGISTER_FAIL -1
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Type Declarations
|
||||
* -------------------------------------------------------------------------*/
|
||||
struct QSEECom_handle {
|
||||
unsigned char *ion_sbuffer;
|
||||
};
|
||||
|
||||
struct QSEECom_ion_fd_data {
|
||||
int32_t fd;
|
||||
uint32_t cmd_buf_offset;
|
||||
};
|
||||
|
||||
struct QSEECom_ion_fd_info {
|
||||
struct QSEECom_ion_fd_data data[4];
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
* Function Declarations and Documentation
|
||||
* -------------------------------------------------------------------------*/
|
||||
/**
|
||||
* @brief Open a handle to the QSEECom device.
|
||||
*
|
||||
* - Load a secure application. The application will be verified that it is
|
||||
* secure by digital signature verification.
|
||||
* Allocate memory for sending requests to the QSAPP
|
||||
*
|
||||
* Note/Comments:
|
||||
* There is a one-to-one relation for a HLOS client and a QSAPP;
|
||||
* meaning that only one app can communicate to a QSAPP at a time.
|
||||
*
|
||||
* Please note that there is difference between an application and a listener
|
||||
* service. A QSAPP must be loaded at the request of the HLOS,
|
||||
* and all requests are orginated by the HLOS client.
|
||||
* A listener service on the otherhand is started during start-up by a
|
||||
* daemon, qseecomd.
|
||||
*
|
||||
* A HLOS application may create mutiple handles to the QSAPP
|
||||
*
|
||||
* @param[in/out] handle The device handle
|
||||
* @param[in] fname The directory and filename to load.
|
||||
* @param[in] sb_size Size of the shared buffer memory for sending requests.
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*/
|
||||
int QSEECom_start_app(struct QSEECom_handle **clnt_handle, const char *path,
|
||||
const char *fname, uint32_t sb_size);
|
||||
|
||||
/**
|
||||
* @brief Close the application associated with the handle.
|
||||
*
|
||||
* - Unload a secure application. The driver will verify if there exists
|
||||
* any other applications that are communicating with the QSAPP to which
|
||||
* the "handle" is tied.
|
||||
* - De-allocate memory for sending requests to QSAPP.
|
||||
*
|
||||
* @param[in] handle The device handle
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*/
|
||||
int QSEECom_shutdown_app(struct QSEECom_handle **handle);
|
||||
|
||||
/**
|
||||
* @brief Open a handle to the QSEECom device.
|
||||
*
|
||||
* - Load an external elf. The elf will be verified that it is
|
||||
* secure by digital signature verification.
|
||||
*
|
||||
* A HLOS application may create mutiple opens (only one is permitted for the
|
||||
* app, but each listener service can open a unique device in the same HLOS app
|
||||
* /executable.
|
||||
* @param[in/out] handle The device handle
|
||||
* @param[in] fname The directory and filename to load.
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*/
|
||||
int QSEECom_load_external_elf(struct QSEECom_handle **clnt_handle, const char *path,
|
||||
const char *fname);
|
||||
|
||||
/**
|
||||
* @brief Close the external elf
|
||||
*
|
||||
* - Unload an external elf.
|
||||
*
|
||||
* @param[in] handle The device handle
|
||||
*
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*/
|
||||
int QSEECom_unload_external_elf(struct QSEECom_handle **handle);
|
||||
|
||||
/**
|
||||
* @brief Register an HLOS listener service. This allows messages from QSAPP
|
||||
* to be received.
|
||||
*
|
||||
* @param[in] handle The device handle
|
||||
* @param[in] lstnr_id The listener service identifier. This ID must be uniquely
|
||||
* assigned to avoid any collisions.
|
||||
* @param[in] sb_length Shared memory buffer between OS and QSE.
|
||||
* @param[in] flags Provide the shared memory flags attributes.
|
||||
*
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*
|
||||
*/
|
||||
int QSEECom_register_listener(struct QSEECom_handle **handle,
|
||||
uint32_t lstnr_id, uint32_t sb_length, uint32_t flags);
|
||||
|
||||
/**
|
||||
* @brief Unregister a listener service.
|
||||
*
|
||||
* @param[in] handle The device handle
|
||||
*
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*/
|
||||
int QSEECom_unregister_listener(struct QSEECom_handle *handle);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Send QSAPP a "user" defined buffer (may contain some message/
|
||||
* command request) and receives a response from QSAPP in receive buffer.
|
||||
* The HLOS client writes to the send_buf, where QSAPP writes to the rcv_buf.
|
||||
* This is a blocking call.
|
||||
*
|
||||
* @param[in] handle The device handle
|
||||
* @param[in] send_buf The buffer to be sent.
|
||||
* If using ion_sbuffer, ensure this
|
||||
* QSEECOM_BUFFER_ALIGN'ed.
|
||||
* @param[in] sbuf_len The send buffer length
|
||||
* If using ion_sbuffer, ensure length is
|
||||
* multiple of QSEECOM_BUFFER_ALIGN.
|
||||
* @param[in] rcv_buf The QSEOS returned buffer.
|
||||
* If using ion_sbuffer, ensure this is
|
||||
* QSEECOM_BUFFER_ALIGN'ed.
|
||||
* @param[in] rbuf_len The returned buffer length.
|
||||
* If using ion_sbuffer, ensure length is
|
||||
* multiple of QSEECOM_BUFFER_ALIGN.
|
||||
* @param[in] rbuf_len The returned buffer length.
|
||||
*
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*/
|
||||
int QSEECom_send_cmd(struct QSEECom_handle *handle, void *send_buf,
|
||||
uint32_t sbuf_len, void *rcv_buf, uint32_t rbuf_len);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Send QSAPP a "user" defined buffer (may contain some message/
|
||||
* command request) and receives a response from QSAPP in receive buffer.
|
||||
* This API is same as send_cmd except it takes in addition parameter,
|
||||
* "ifd_data". This "ifd_data" holds information (ion fd handle and
|
||||
* cmd_buf_offset) used for modifying data in the message in send_buf
|
||||
* at an offset. Essentailly, it has the ion fd handle information to
|
||||
* retrieve physical address and modify the message in send_buf at the
|
||||
* mentioned offset.
|
||||
*
|
||||
* The HLOS client writes to the send_buf, where QSAPP writes to the rcv_buf.
|
||||
* This is a blocking call.
|
||||
*
|
||||
* @param[in] handle The device handle
|
||||
* @param[in] send_buf The buffer to be sent.
|
||||
* If using ion_sbuffer, ensure this
|
||||
* QSEECOM_BUFFER_ALIGN'ed.
|
||||
* @param[in] sbuf_len The send buffer length
|
||||
* If using ion_sbuffer, ensure length is
|
||||
* multiple of QSEECOM_BUFFER_ALIGN.
|
||||
* @param[in] rcv_buf The QSEOS returned buffer.
|
||||
* If using ion_sbuffer, ensure this is
|
||||
* QSEECOM_BUFFER_ALIGN'ed.
|
||||
* @param[in] rbuf_len The returned buffer length.
|
||||
* If using ion_sbuffer, ensure length is
|
||||
* multiple of QSEECOM_BUFFER_ALIGN.
|
||||
* @param[in] QSEECom_ion_fd_info data related to memory allocated by ion.
|
||||
*
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*/
|
||||
int QSEECom_send_modified_cmd(struct QSEECom_handle *handle, void *send_buf,
|
||||
uint32_t sbuf_len, void *resp_buf, uint32_t rbuf_len,
|
||||
struct QSEECom_ion_fd_info *ifd_data);
|
||||
|
||||
/**
|
||||
* @brief Receive a service defined buffer.
|
||||
*
|
||||
* @param[in] handle The device handle
|
||||
* @param[out] buf The buffer that is received
|
||||
* @param[in] len The receive buffer length
|
||||
*
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*/
|
||||
int QSEECom_receive_req(struct QSEECom_handle *handle,
|
||||
void *buf, uint32_t len);
|
||||
|
||||
/**
|
||||
* @brief Send a response based on the previous QSEECom_receive_req.
|
||||
*
|
||||
* This allows a listener service to receive a command (e.g. read file abc).
|
||||
* The service can then handle the request from QSEECom_receive_req, and provide
|
||||
* that information back to QSAPP.
|
||||
*
|
||||
* This allows the HLOS to act as the server and QSAPP to behave as the client.
|
||||
*
|
||||
* @param[in] handle The device handle
|
||||
* @param[out] send_buf The buffer to be returned back to QSAPP
|
||||
* @param[in] len The send buffer length
|
||||
*
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*/
|
||||
int QSEECom_send_resp(struct QSEECom_handle *handle,
|
||||
void *send_buf, uint32_t len);
|
||||
|
||||
/**
|
||||
* @brief Set the bandwidth for QSEE.
|
||||
*
|
||||
* This API resulst in improving the performance on the Crypto hardware
|
||||
* in QSEE. It should be called before issuing send_cmd/send_modified_cmd
|
||||
* for commands that requires using the crypto hardware on the QSEE.
|
||||
* Typically this API should be called before issuing the send request to
|
||||
* enable high performance mode and after completion of the send_cmd to
|
||||
* resume to low performance and hence to low power mode.
|
||||
*
|
||||
* This allows the clients of QSEECom to set the QSEE cyptpo HW bus
|
||||
* bandwidth to high/low.
|
||||
*
|
||||
* @param[in] high Set to 1 to enable bandwidth.
|
||||
*
|
||||
* @return Zero on success, negative on failure. errno will be set on
|
||||
* error.
|
||||
*/
|
||||
int QSEECom_set_bandwidth(struct QSEECom_handle *handle, bool high);
|
||||
|
||||
/**
|
||||
* @brief Query QSEE to check if app is loaded.
|
||||
*
|
||||
* This API queries QSEE to see if the app is loaded or not.
|
||||
*
|
||||
* @param[in] app_name Name of the app.
|
||||
*
|
||||
* @return QSEECOM_APP_QUERY_FAILED/QSEECOM_APP_NOT_LOADED/QSEECOM_APP_LOADED.
|
||||
*/
|
||||
int QSEECom_app_load_query(struct QSEECom_handle *handle, char *app_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,2 +0,0 @@
|
|||
# Fingerprint
|
||||
DEVICE_MANIFEST_FILE += $(COMMON_PATH)/fingerprint/manifest.xml
|
|
@ -1,747 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
* Copyright (C) 2016 The Mokee Project
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#define LOG_TAG "FingerprintHal_msm8974"
|
||||
#define LOG_NDEBUG 1
|
||||
|
||||
#include <errno.h>
|
||||
#include <endian.h>
|
||||
#include <fcntl.h>
|
||||
#include <inttypes.h>
|
||||
#include <malloc.h>
|
||||
#include <signal.h>
|
||||
#include <sqlite3.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cutils/log.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include <hardware/hardware.h>
|
||||
#include <hardware/fingerprint.h>
|
||||
|
||||
#include "fp_klte.h"
|
||||
#include "fingerprint_tz.h"
|
||||
#include "hash.h"
|
||||
|
||||
typedef struct vcs_fingerprint_device_t {
|
||||
fingerprint_device_t device; // "inheritance"
|
||||
uint64_t op_id;
|
||||
uint64_t challenge;
|
||||
uint64_t user_id;
|
||||
uint64_t group_id;
|
||||
uint64_t secure_user_id;
|
||||
uint64_t authenticator_id;
|
||||
uint32_t active_gid;
|
||||
sqlite3 *db;
|
||||
pthread_mutex_t lock;
|
||||
} vcs_fingerprint_device_t;
|
||||
|
||||
extern trust_zone_t tz;
|
||||
vcs_sensor_t sensor;
|
||||
|
||||
/***************************************Sensor***************************************/
|
||||
int sensor_uninit() {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
int ret = 0;
|
||||
if (!sensor.init)
|
||||
return ret;
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_RESET_SPI_CONFIGURATION);
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_DISABLE_SPI_CLOCK);
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_DEVICE_SUSPEND);
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_POWER_OFF);
|
||||
sensor.init = false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int sensor_init() {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
int ret = 0;
|
||||
int clock = 0;
|
||||
if (sensor.init)
|
||||
return ret;
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_POWER_ON);
|
||||
clock = 65535;
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_SET_CLK, &clock);
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_DEVICE_RESET);
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_SET_SPI_CONFIGURATION);
|
||||
clock = 4800;
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_SET_CLK, &clock);
|
||||
sensor.init = true;
|
||||
return ret;
|
||||
}
|
||||
|
||||
void sensor_process_signal(int signum) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
ALOGV("%s: signal %d received", __FUNCTION__, signum);
|
||||
int flag = 0;
|
||||
if (tz.timeout.timeout_thread) {
|
||||
pthread_mutex_lock(&tz.timeout.lock);
|
||||
pthread_cond_signal(&tz.timeout.cond);
|
||||
pthread_mutex_unlock(&tz.timeout.lock);
|
||||
//pthread_join(tz.timeout.timeout_thread, NULL);
|
||||
tz.timeout.timeout_thread = 0;
|
||||
}
|
||||
pthread_mutex_lock(&sensor.lock);
|
||||
if (get_tz_state() != STATE_IDLE && get_tz_state() != STATE_CANCEL)
|
||||
sensor.signal = true;
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_SET_DRDY_INT, &flag);
|
||||
pthread_cond_signal(&sensor.cond);
|
||||
pthread_mutex_unlock(&sensor.lock);
|
||||
}
|
||||
|
||||
int sensor_register() {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
struct vfsspi_iocRegSignal usrSignal;
|
||||
int ret = 0;
|
||||
struct sigaction sa_usr;
|
||||
sa_usr.sa_flags = 0;
|
||||
sa_usr.sa_handler = sensor_process_signal;
|
||||
sigaction(SIGUSR2, &sa_usr, NULL);
|
||||
usrSignal.userPID = getpid();
|
||||
usrSignal.signalID = SIGUSR2;
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_REGISTER_DRDY_SIGNAL, &usrSignal);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int sensor_capture_start() {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
int ret = 0;
|
||||
int flag = 1;
|
||||
ret = ioctl(sensor.fd, VFSSPI_IOCTL_SET_DRDY_INT, &flag);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***************************************Database***************************************/
|
||||
int db_check_and_create_table(void* device) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
char* errmsg;
|
||||
int ret = 0;
|
||||
char cmd[MAX_DATABASE_CMD];
|
||||
sprintf(cmd, "create table gid_%d(id integer, data blob, payload blob)", vdev->active_gid);
|
||||
ret = sqlite3_exec(vdev->db, cmd, NULL, NULL, &errmsg);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int db_convert_old_db(vcs_fingerprint_device_t* vdev) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
int ret = 0;
|
||||
sqlite3 *db;
|
||||
sqlite3_stmt *stat;
|
||||
char cmd[MAX_DATABASE_CMD];
|
||||
int idx = 0;
|
||||
|
||||
memset(tz.finger, 0, MAX_NUM_FINGERS * sizeof(finger_t));
|
||||
ret = sqlite3_open(SAMSUNG_FP_DB_PATH, &db);
|
||||
if (ret != SQLITE_OK) {
|
||||
ALOGE("Open samsung finger database failed!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
sprintf(cmd, "select * from enrollments");
|
||||
sqlite3_prepare(db, cmd, -1, &stat, 0);
|
||||
while(1) {
|
||||
int ret = sqlite3_step(stat);
|
||||
if (ret != SQLITE_ROW) {
|
||||
break;
|
||||
}
|
||||
int id = sqlite3_column_int(stat, 1);
|
||||
const void *data = sqlite3_column_blob(stat, 2);
|
||||
int len = sqlite3_column_bytes(stat, 2);
|
||||
memcpy(tz.finger[id].data, data, len);
|
||||
ALOGV("read fingerprint data from samsung fp database: id=%d", id);
|
||||
tz.finger[id].exist = true;
|
||||
}
|
||||
sqlite3_finalize(stat);
|
||||
|
||||
memset(cmd, 0, MAX_DATABASE_CMD);
|
||||
sprintf(cmd, "select * from properties");
|
||||
sqlite3_prepare(db, cmd, -1, &stat, 0);
|
||||
sqlite3_step(stat);
|
||||
const void *payload = sqlite3_column_blob(stat, 2);
|
||||
int len = sqlite3_column_bytes(stat, 2);
|
||||
for (idx = 1; idx <= MAX_NUM_FINGERS; idx++) {
|
||||
if (tz.finger[idx].exist) {
|
||||
memcpy(tz.finger[idx].payload, payload, len);
|
||||
db_write_to_db(vdev, false, idx);
|
||||
}
|
||||
}
|
||||
sqlite3_finalize(stat);
|
||||
|
||||
ret = sqlite3_close(db);
|
||||
if (ret != SQLITE_OK) {
|
||||
ALOGE("Close samsung finger database failed!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = remove(SAMSUNG_FP_DB_PATH);
|
||||
if (ret) {
|
||||
ALOGE("Cannot remove Samsung fingerprint database");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int db_read_to_tz(void* device) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
char* errmsg;
|
||||
int ret = 0;
|
||||
char cmd[MAX_DATABASE_CMD];
|
||||
sqlite3_stmt *stat;
|
||||
|
||||
db_check_and_create_table(vdev);
|
||||
|
||||
if (!access(SAMSUNG_FP_DB_PATH, 0)) {
|
||||
ALOGI("Samsung fingerprint database exist! Convert it");
|
||||
return db_convert_old_db(vdev);
|
||||
}
|
||||
|
||||
memset(tz.finger, 0, MAX_NUM_FINGERS * sizeof(finger_t));
|
||||
sprintf(cmd, "select * from gid_%d", vdev->active_gid);
|
||||
sqlite3_prepare(vdev->db, cmd, -1, &stat, 0);
|
||||
while(1) {
|
||||
int ret = sqlite3_step(stat);
|
||||
if (ret != SQLITE_ROW) {
|
||||
break;
|
||||
}
|
||||
int id = sqlite3_column_int(stat, 0);
|
||||
const void *data = sqlite3_column_blob(stat, 1);
|
||||
memcpy(tz.finger[id].data, data, FINGER_DATA_MAX_LENGTH);
|
||||
const void *payload = sqlite3_column_blob(stat, 2);
|
||||
memcpy(tz.finger[id].payload, payload, PAYLOAD_MAX_LENGTH);
|
||||
ALOGV("read fingerprint data from database: id=%d", id);
|
||||
tz.finger[id].exist = true;
|
||||
}
|
||||
sqlite3_finalize(stat);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int db_write_to_db(void* device, bool remove, int fid) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
char* errmsg;
|
||||
int ret = 0;
|
||||
char cmd[MAX_DATABASE_CMD];
|
||||
sqlite3_stmt *stat;
|
||||
if (remove) {
|
||||
sprintf(cmd, "delete from gid_%d where id=%d", vdev->active_gid, fid);
|
||||
ret = sqlite3_exec(vdev->db, cmd, NULL, NULL, &errmsg);
|
||||
if (ret != SQLITE_OK) {
|
||||
ALOGE("Remove finger from database failed!");
|
||||
}
|
||||
memset(&tz.finger[fid], 0, sizeof(finger_t));
|
||||
} else {
|
||||
sprintf(cmd, "insert into gid_%d(id, data, payload) values( %d, ?, ?)", vdev->active_gid, fid);
|
||||
sqlite3_prepare(vdev->db, cmd, -1, &stat, 0);
|
||||
sqlite3_bind_blob(stat, 1, tz.finger[fid].data, (int)FINGER_DATA_MAX_LENGTH, NULL);
|
||||
sqlite3_bind_blob(stat, 2, tz.finger[fid].payload, (int)PAYLOAD_MAX_LENGTH, NULL);
|
||||
ret = sqlite3_step(stat);
|
||||
sqlite3_finalize(stat);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int db_init(void* device) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
int ret = 0;
|
||||
ret = sqlite3_open(FINGER_DATABASE_FILENAME, &vdev->db);
|
||||
if (ret != SQLITE_OK) {
|
||||
ALOGE("Open finger database failed!");
|
||||
return -1;
|
||||
}
|
||||
return db_read_to_tz(vdev);
|
||||
}
|
||||
|
||||
int db_uninit(void* device) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
int ret = 0;
|
||||
ret = sqlite3_close(vdev->db);
|
||||
if (ret != SQLITE_OK) {
|
||||
ALOGE("Close finger database failed!");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***************************************notice***************************************/
|
||||
fingerprint_acquired_info_t convert_ret_to_acquired_info(int acquired_ret) { //TODO
|
||||
ALOGV("----------------> %s ----------------->acquired_ret=%d", __FUNCTION__, acquired_ret);
|
||||
fingerprint_acquired_info_t ret = FINGERPRINT_ACQUIRED_GOOD;
|
||||
switch (acquired_ret) {
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
ret = FINGERPRINT_ACQUIRED_INSUFFICIENT;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
void send_error_notice(void* device, int error_info_int) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
fingerprint_error_t error_info = (fingerprint_error_t)error_info_int;
|
||||
|
||||
fingerprint_msg_t msg;
|
||||
msg.type = FINGERPRINT_ERROR;
|
||||
msg.data.error = error_info;
|
||||
ALOGV("recevied error notice! error_info=%d", (int)error_info);
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
vdev->device.notify(&msg);
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void send_acquired_notice(void* device, int acquired_ret) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
fingerprint_acquired_info_t acquired_info = convert_ret_to_acquired_info(acquired_ret);
|
||||
|
||||
fingerprint_msg_t acqu_msg;
|
||||
acqu_msg.type = FINGERPRINT_ACQUIRED;
|
||||
acqu_msg.data.acquired.acquired_info = acquired_info;
|
||||
ALOGI("acqu_info=%d", (int)acquired_info);
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
vdev->device.notify(&acqu_msg);
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void send_enroll_notice(void* device, int fid, int remaining) {
|
||||
ALOGV("----------------> %s -----------------> fid %d", __FUNCTION__, fid);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
|
||||
if (fid == 0) {
|
||||
ALOGE("Fingerprint ID is zero (invalid)");
|
||||
return;
|
||||
}
|
||||
if (vdev->secure_user_id == 0) {
|
||||
ALOGE("Secure user ID is zero (invalid)");
|
||||
return;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
|
||||
fingerprint_msg_t msg;
|
||||
msg.type = FINGERPRINT_TEMPLATE_ENROLLING;
|
||||
msg.data.enroll.finger.fid = fid;
|
||||
msg.data.enroll.samples_remaining = remaining;
|
||||
vdev->device.notify(&msg);
|
||||
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void send_authenticated_notice(void* device, int fid) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
|
||||
send_acquired_notice(vdev, FINGERPRINT_ACQUIRED_GOOD);
|
||||
|
||||
fingerprint_msg_t auth_msg;
|
||||
auth_msg.type = FINGERPRINT_AUTHENTICATED;
|
||||
auth_msg.data.authenticated.finger.fid = fid;
|
||||
auth_msg.data.authenticated.finger.gid = 0; // unused
|
||||
auth_msg.data.authenticated.hat.version = HW_AUTH_TOKEN_VERSION;
|
||||
auth_msg.data.authenticated.hat.authenticator_type =
|
||||
htobe32(HW_AUTH_FINGERPRINT);
|
||||
auth_msg.data.authenticated.hat.challenge = vdev->op_id;
|
||||
auth_msg.data.authenticated.hat.authenticator_id = vdev->authenticator_id;
|
||||
auth_msg.data.authenticated.hat.user_id = vdev->secure_user_id;
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
auth_msg.data.authenticated.hat.timestamp =
|
||||
htobe64((uint64_t)ts.tv_sec * 1000 + ts.tv_nsec / 1000000);
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
vdev->device.notify(&auth_msg);
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void send_remove_notice(void* device, int fid) {
|
||||
ALOGV("----------------> %s ----------------->fid=%d", __FUNCTION__, fid);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
|
||||
fingerprint_msg_t msg;
|
||||
msg.type = FINGERPRINT_TEMPLATE_REMOVED;
|
||||
msg.data.removed.finger.fid = fid;
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
vdev->device.notify(&msg);
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/***************************************HAL function***************************************/
|
||||
|
||||
static uint64_t fingerprint_get_auth_id(struct fingerprint_device* device) {
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
uint64_t authenticator_id = 0;
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
vdev->authenticator_id = hash_file(FINGER_DATABASE_FILENAME);
|
||||
authenticator_id = vdev->authenticator_id;
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return authenticator_id;
|
||||
}
|
||||
|
||||
static int fingerprint_set_active_group(struct fingerprint_device *device, uint32_t gid,
|
||||
const char __unused *path) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
vdev->active_gid = gid;
|
||||
db_read_to_tz(vdev);
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fingerprint_authenticate(struct fingerprint_device *device,
|
||||
uint64_t operation_id, __unused uint32_t gid)
|
||||
{
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
int ret = 0;
|
||||
ALOGI("auth: op_id=%llu ",operation_id);
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
|
||||
vdev->op_id = operation_id;
|
||||
ret = vcs_start_authenticate(vdev);
|
||||
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int fingerprint_enroll(struct fingerprint_device *device,
|
||||
const hw_auth_token_t *hat,
|
||||
uint32_t __unused gid,
|
||||
uint32_t timeout_sec) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
int ret = -EINVAL;
|
||||
int idx = 1;
|
||||
|
||||
if (!hat) {
|
||||
ALOGW("%s: null auth token", __func__);
|
||||
return -EPROTONOSUPPORT;
|
||||
}
|
||||
if (hat->challenge == vdev->challenge) {
|
||||
vdev->secure_user_id = hat->user_id;
|
||||
} else {
|
||||
ALOGW("%s: invalid auth token", __func__);
|
||||
}
|
||||
|
||||
if (hat->version != HW_AUTH_TOKEN_VERSION) {
|
||||
return -EPROTONOSUPPORT;
|
||||
}
|
||||
if (hat->challenge != vdev->challenge && !(hat->authenticator_type & HW_AUTH_FINGERPRINT)) {
|
||||
return -EPERM;
|
||||
}
|
||||
|
||||
vdev->user_id = hat->user_id;
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
|
||||
for (idx = 1; idx <= MAX_NUM_FINGERS; idx++) {
|
||||
if (!tz.finger[idx].exist) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (idx > MAX_NUM_FINGERS) {
|
||||
send_error_notice(vdev, FINGERPRINT_ERROR_NO_SPACE);
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
return -1;
|
||||
}
|
||||
ret = vcs_start_enroll(vdev, timeout_sec);
|
||||
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
ALOGV("enroll ret=%d",ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static uint64_t fingerprint_pre_enroll(struct fingerprint_device *device) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
uint64_t challenge = 0;
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
|
||||
challenge = hash_string(tz.auth_token);
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
vdev->challenge = challenge;
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return challenge;
|
||||
}
|
||||
|
||||
static int fingerprint_post_enroll(struct fingerprint_device* device) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
vdev->challenge = 0;
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fingerprint_cancel(struct fingerprint_device *device) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
int ret = 0;
|
||||
int flag = 0;
|
||||
|
||||
if (tz.timeout.timeout_thread) {
|
||||
pthread_mutex_lock(&tz.timeout.lock);
|
||||
pthread_cond_signal(&tz.timeout.cond);
|
||||
pthread_mutex_unlock(&tz.timeout.lock);
|
||||
pthread_join(tz.timeout.timeout_thread, NULL);
|
||||
tz.timeout.timeout_thread = 0;
|
||||
}
|
||||
if (get_tz_state() != STATE_IDLE && get_tz_state() != STATE_CANCEL) {
|
||||
set_tz_state(STATE_CANCEL);
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_SET_DRDY_INT, &flag);
|
||||
pthread_mutex_lock(&sensor.lock);
|
||||
pthread_cond_signal(&sensor.cond);
|
||||
pthread_mutex_unlock(&sensor.lock);
|
||||
while (1) {
|
||||
usleep(100000);
|
||||
if (tz.state == STATE_IDLE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int fingerprint_enumerate(struct fingerprint_device *device) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
if (device == NULL) {
|
||||
ALOGE("Cannot enumerate saved fingerprints with uninitialized params");
|
||||
return -1;
|
||||
}
|
||||
|
||||
int num = 0;
|
||||
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
num = vcs_get_enrolled_finger_num();
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return num;
|
||||
}
|
||||
|
||||
static int fingerprint_remove(struct fingerprint_device *device,
|
||||
uint32_t __unused gid, uint32_t fid) {
|
||||
int ret = 0;
|
||||
ALOGV("----------------> %s -----------------> fid %d", __FUNCTION__, fid);
|
||||
if (device == NULL) {
|
||||
ALOGE("Can't remove fingerprint (gid=%d, fid=%d); "
|
||||
"device not initialized properly",
|
||||
gid, fid);
|
||||
return -1;
|
||||
}
|
||||
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
|
||||
if (fid == 0) {
|
||||
// Delete all fingerprints
|
||||
int idx = 1;
|
||||
for (idx = 1; idx <= MAX_NUM_FINGERS; idx++)
|
||||
if (tz.finger[idx].exist) {
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
ret = db_write_to_db(vdev, true, idx);
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
if (ret == 0) {
|
||||
send_remove_notice(vdev, idx);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Delete one fingerprint
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
ret = db_write_to_db(vdev, true, fid);
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
if (ret == 0) {
|
||||
send_remove_notice(vdev, fid);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
ALOGE("Can't remove finger %d", fid);
|
||||
send_error_notice(vdev, FINGERPRINT_ERROR_UNABLE_TO_REMOVE);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int set_notify_callback(struct fingerprint_device *device,
|
||||
fingerprint_notify_t notify) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
if (device == NULL || notify == NULL) {
|
||||
ALOGE("Failed to set notify callback @ %p for fingerprint device %p",
|
||||
device, notify);
|
||||
return -1;
|
||||
}
|
||||
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
device->notify = notify;
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
ALOGD("fingerprint callback notification set");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fingerprint_close(hw_device_t* device) {
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
if (device == NULL) {
|
||||
ALOGE("fingerprint hw device is NULL");
|
||||
return -1;
|
||||
}
|
||||
|
||||
vcs_fingerprint_device_t* vdev = (vcs_fingerprint_device_t*)device;
|
||||
|
||||
fingerprint_cancel(&vdev->device);
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
db_uninit(vdev);
|
||||
sensor_init();
|
||||
vcs_init();
|
||||
vcs_stop_auth_session();
|
||||
vcs_uninit();
|
||||
sensor_uninit();
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
pthread_mutex_destroy(&vdev->lock);
|
||||
pthread_mutex_destroy(&sensor.lock);
|
||||
pthread_mutex_destroy(&tz.lock);
|
||||
pthread_mutex_destroy(&tz.timeout.lock);
|
||||
free(vdev);
|
||||
vdev = NULL;
|
||||
|
||||
if (close(sensor.fd) < 0) {
|
||||
ALOGE("Close sensor error!");
|
||||
}
|
||||
sensor.fd = -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fingerprint_open(const hw_module_t* module, const char __unused *id,
|
||||
hw_device_t** device)
|
||||
{
|
||||
|
||||
ALOGV("----------------> %s ----------------->", __FUNCTION__);
|
||||
if (device == NULL) {
|
||||
ALOGE("NULL device on open");
|
||||
return -EINVAL;
|
||||
}
|
||||
vcs_fingerprint_device_t *vdev = (vcs_fingerprint_device_t*)calloc(
|
||||
1, sizeof(vcs_fingerprint_device_t));
|
||||
|
||||
if (vdev == NULL) {
|
||||
ALOGE("Insufficient memory for fingerprint device");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
vdev->device.common.tag = HARDWARE_DEVICE_TAG;
|
||||
vdev->device.common.version = FINGERPRINT_MODULE_API_VERSION_2_1;
|
||||
vdev->device.common.module = (struct hw_module_t*)module;
|
||||
vdev->device.common.close = fingerprint_close;
|
||||
|
||||
vdev->device.pre_enroll = fingerprint_pre_enroll;
|
||||
vdev->device.enroll = fingerprint_enroll;
|
||||
vdev->device.post_enroll = fingerprint_post_enroll;
|
||||
vdev->device.get_authenticator_id = fingerprint_get_auth_id;
|
||||
vdev->device.set_active_group = fingerprint_set_active_group;
|
||||
vdev->device.authenticate = fingerprint_authenticate;
|
||||
vdev->device.cancel = fingerprint_cancel;
|
||||
vdev->device.enumerate = fingerprint_enumerate;
|
||||
vdev->device.remove = fingerprint_remove;
|
||||
vdev->device.set_notify = set_notify_callback;
|
||||
vdev->device.notify = NULL;
|
||||
|
||||
vdev->active_gid = 0;
|
||||
memset(&tz, 0, sizeof(trust_zone_t));
|
||||
|
||||
pthread_mutex_init(&vdev->lock, NULL);
|
||||
pthread_mutex_init(&sensor.lock, NULL);
|
||||
pthread_mutex_init(&tz.lock, NULL);
|
||||
pthread_mutex_init(&tz.timeout.lock, NULL);
|
||||
pthread_cond_init(&tz.timeout.cond, NULL);
|
||||
pthread_cond_init(&sensor.cond, NULL);
|
||||
sensor.signal = false;
|
||||
tz.timeout.timeout_thread = 0;
|
||||
|
||||
*device = &vdev->device.common;
|
||||
|
||||
memset(&sensor, 0, sizeof(vcs_sensor_t));
|
||||
sensor.fd = open(SENSOR_FILE_NAME, O_RDWR);
|
||||
if (sensor.fd < 0) {
|
||||
ALOGE("Open sensor error!");
|
||||
return -1;
|
||||
}
|
||||
sensor_init();
|
||||
sensor_register();
|
||||
sensor_uninit();
|
||||
|
||||
pthread_mutex_lock(&vdev->lock);
|
||||
sensor_init();
|
||||
db_init(vdev);
|
||||
vcs_init();
|
||||
vcs_uninit();
|
||||
vcs_init();
|
||||
vcs_start_auth_session();
|
||||
vcs_uninit();
|
||||
sensor_uninit();
|
||||
pthread_mutex_unlock(&vdev->lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct hw_module_methods_t fingerprint_module_methods = {
|
||||
.open = fingerprint_open,
|
||||
};
|
||||
|
||||
fingerprint_module_t HAL_MODULE_INFO_SYM = {
|
||||
.common = {
|
||||
.tag = HARDWARE_MODULE_TAG,
|
||||
.module_api_version = FINGERPRINT_MODULE_API_VERSION_2_1,
|
||||
.hal_api_version = HARDWARE_HAL_API_VERSION,
|
||||
.id = FINGERPRINT_HARDWARE_MODULE_ID,
|
||||
.name = "KLTE Fingerprint HAL",
|
||||
.author = "ljzyal(ljzyal@gmail.com)",
|
||||
.methods = &fingerprint_module_methods,
|
||||
},
|
||||
};
|
|
@ -1,77 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2016 The Mokee 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 __FINGERPRINT_COMMON_H_
|
||||
#define __FINGERPRINT_COMMON_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#define SB_LENGTH (0x100000)
|
||||
#define BUFFER_LENGTH (0x19000)
|
||||
#define AUTH_TOKEN_LENGTH (0x70)
|
||||
#define AUTH_SESSION_TOKEN_LENGTH (0x20)
|
||||
#define CALIBRATE_DATA_MAX_LENGTH (0x500c)
|
||||
#define FINGER_DATA_MAX_LENGTH (0x2900)
|
||||
#define PAYLOAD_MAX_LENGTH (0x24)
|
||||
#define MAX_NUM_FINGERS (5)
|
||||
|
||||
typedef enum worker_state_t {
|
||||
STATE_IDLE = 0,
|
||||
STATE_ENROLL,
|
||||
STATE_SCAN,
|
||||
STATE_CANCEL
|
||||
} worker_state_t;
|
||||
|
||||
typedef struct vcs_sensor_t {
|
||||
int fd;
|
||||
bool init;
|
||||
bool signal;
|
||||
pthread_cond_t cond;
|
||||
pthread_mutex_t lock;
|
||||
}vcs_sensor_t;
|
||||
|
||||
typedef struct finger_t {
|
||||
bool exist;
|
||||
char data[FINGER_DATA_MAX_LENGTH];
|
||||
char payload[PAYLOAD_MAX_LENGTH];
|
||||
}finger_t;
|
||||
|
||||
typedef struct timeout_t {
|
||||
uint32_t timeout;
|
||||
pthread_t timeout_thread;
|
||||
pthread_cond_t cond;
|
||||
pthread_mutex_t lock;
|
||||
}timeout_t;
|
||||
|
||||
typedef struct trust_zone_t {
|
||||
bool init;
|
||||
worker_state_t state;
|
||||
struct QSEECom_handle *qhandle;
|
||||
bool auth_session_opend;
|
||||
char auth_token[AUTH_TOKEN_LENGTH];
|
||||
char auth_session_token[AUTH_SESSION_TOKEN_LENGTH];
|
||||
int calibrate_len;
|
||||
char calibrate_data[CALIBRATE_DATA_MAX_LENGTH];
|
||||
finger_t finger[MAX_NUM_FINGERS + 1]; // Start from finger[1]
|
||||
timeout_t timeout;
|
||||
pthread_t auth_thread;
|
||||
pthread_t enroll_thread;
|
||||
pthread_mutex_t lock;
|
||||
}trust_zone_t;
|
||||
|
||||
#endif //__FINGERPRINT_COMMON_H_
|
|
@ -1,735 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2016 The Mokee 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 "Fingerprint_tz"
|
||||
#define LOG_NDEBUG 1
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <cutils/log.h>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dlfcn.h>
|
||||
|
||||
#include "fingerprint_tz.h"
|
||||
#include "fp_klte.h"
|
||||
|
||||
extern vcs_sensor_t sensor;
|
||||
trust_zone_t tz;
|
||||
|
||||
worker_state_t get_tz_state() {
|
||||
worker_state_t state;
|
||||
|
||||
pthread_mutex_lock(&tz.lock);
|
||||
state = tz.state;
|
||||
pthread_mutex_unlock(&tz.lock);
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
void set_tz_state(worker_state_t state) {
|
||||
pthread_mutex_lock(&tz.lock);
|
||||
tz.state = state;
|
||||
pthread_mutex_unlock(&tz.lock);
|
||||
}
|
||||
|
||||
/*
|
||||
* cmd: vendorUpdateCalData
|
||||
*/
|
||||
int vcs_update_cal_data() {
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
trust_zone_vendor_cmd_t *send_vendor_cmd = NULL;
|
||||
trust_zone_normal_result_t *resp = NULL;
|
||||
int ret = 0;
|
||||
send_vendor_cmd = (trust_zone_vendor_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_vendor_cmd_t)));
|
||||
|
||||
memset(send_vendor_cmd, 0, QSEECOM_ALIGN(sizeof(*send_vendor_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_vendor_cmd->cmd = vfmVendorDefinedOperation;
|
||||
send_vendor_cmd->vendor_cmd = vendorUpdateCalData;
|
||||
resp->data[0] = CALIBRATE_DATA_MAX_LENGTH;
|
||||
ret = QSEECom_send_cmd(handle, send_vendor_cmd, QSEECOM_ALIGN(sizeof(*send_vendor_cmd)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("Update Cal Data error");
|
||||
return ret;
|
||||
}
|
||||
tz.calibrate_len = resp->data[3] + 0xf;
|
||||
memcpy(&tz.calibrate_data, &resp->data[2], tz.calibrate_len);
|
||||
ALOGV("Sended vendorUpdateCalData");
|
||||
return ret;
|
||||
}
|
||||
|
||||
int vcs_check_state() {
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
trust_zone_base_cmd_t *send_cmd = NULL;
|
||||
trust_zone_normal_result_t *resp = NULL;
|
||||
int ret = 0;
|
||||
send_cmd = (trust_zone_base_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(int)));
|
||||
|
||||
if (get_tz_state() == STATE_IDLE)
|
||||
return 1;
|
||||
if (get_tz_state() == STATE_CANCEL) {
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(int)) + QSEECOM_ALIGN(sizeof(int)));
|
||||
send_cmd->cmd = vfmCaptureAbort;
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(int)), resp, QSEECOM_ALIGN(sizeof(int)));
|
||||
set_tz_state(STATE_IDLE);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* cmd: 1.vfmCaptureStart
|
||||
* 2.vfmCaptureReadData * N
|
||||
* 3.vfmCaptureProcessData
|
||||
*/
|
||||
int vcs_start_capture(void *vdev, time_t t) {
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
trust_zone_base_cmd_t *send_cmd = NULL;
|
||||
trust_zone_normal_result_t *resp = NULL;
|
||||
int ret = 0;
|
||||
send_cmd = (trust_zone_base_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_base_cmd_t)));
|
||||
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(*send_cmd)) + QSEECOM_ALIGN(sizeof(int)));
|
||||
send_cmd->cmd = vfmCaptureStart;
|
||||
send_cmd->len = 0x1c;
|
||||
send_cmd->data[16] = 0x1;
|
||||
if (t) {
|
||||
*(time_t*)(&send_cmd->data[20]) = t;
|
||||
}
|
||||
send_cmd->data[24] = 0xc0;
|
||||
send_cmd->data[25] = 0x12;
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(*send_cmd)), resp, QSEECOM_ALIGN(sizeof(int)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("Send vfmCaptureStart error");
|
||||
return ret;
|
||||
}
|
||||
vcs_update_cal_data();
|
||||
pthread_mutex_lock(&sensor.lock);
|
||||
sensor_capture_start();
|
||||
pthread_mutex_unlock(&sensor.lock);
|
||||
|
||||
pthread_mutex_lock(&sensor.lock);
|
||||
while ((!vcs_check_state()) && !sensor.signal) {
|
||||
pthread_cond_wait(&sensor.cond, &sensor.lock);
|
||||
}
|
||||
pthread_mutex_unlock(&sensor.lock);
|
||||
if (vcs_check_state()) {
|
||||
return -1;
|
||||
}
|
||||
pthread_mutex_lock(&sensor.lock);
|
||||
if (sensor.signal == true) {
|
||||
sensor.signal = false;
|
||||
}
|
||||
pthread_mutex_unlock(&sensor.lock);
|
||||
|
||||
while(1) {
|
||||
if (vcs_check_state()) {
|
||||
return -1;
|
||||
}
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(int)));
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(int)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_cmd->cmd = vfmCaptureReadData;
|
||||
send_cmd->len = 0x8000;
|
||||
resp->data[0] = 0xc;
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(int)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("Send vfmCaptureReadData error");
|
||||
continue;
|
||||
}
|
||||
if (resp->data[2] == 2) {
|
||||
ALOGV("User's finger removed from sensor");
|
||||
break;
|
||||
}
|
||||
//usleep(200000);
|
||||
}
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_base_cmd_t)));
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(*send_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_cmd->cmd = vfmCaptureProcessData;
|
||||
send_cmd->len = 0x1c;
|
||||
send_cmd->data[16] = 0x1;
|
||||
*(time_t*)(&send_cmd->data[20]) = time(NULL);
|
||||
send_cmd->data[24] = 0xc0;
|
||||
send_cmd->data[25] = 0x12;
|
||||
resp->data[0] = 0xc;
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(int)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
if (ret) {
|
||||
ALOGE("Send vfmCaptureProcessData error");
|
||||
return -1;
|
||||
}
|
||||
if (resp->result != 0) {
|
||||
ALOGE("resp->result=%d",resp->result);
|
||||
send_acquired_notice(vdev, resp->result);
|
||||
return vcs_start_capture(vdev, time(NULL));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* cmd: 1.vendorUnknown0
|
||||
* 2.vcs_start_capture
|
||||
* 3.vfmMatchImageToTemplates
|
||||
* 4.vfmPayloadRelease
|
||||
*/
|
||||
|
||||
void* vcs_authenticate(void* vdev) {
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
trust_zone_vendor_cmd_t *send_vendor_cmd = NULL;
|
||||
trust_zone_normal_result_t *resp = NULL;
|
||||
int ret = 0;
|
||||
send_vendor_cmd = (trust_zone_vendor_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_vendor_cmd_t)));
|
||||
int fingerindex = 0;
|
||||
int len = 0;
|
||||
int fake_fid = 0;
|
||||
|
||||
memset(send_vendor_cmd, 0, QSEECOM_ALIGN(sizeof(*send_vendor_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_vendor_cmd->cmd = vfmVendorDefinedOperation;
|
||||
send_vendor_cmd->vendor_cmd = vendorUnknown0;
|
||||
resp->data[0] = 0x4;
|
||||
ret = QSEECom_send_cmd(handle, send_vendor_cmd, QSEECOM_ALIGN(sizeof(*send_vendor_cmd)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
if (resp->result) {
|
||||
ALOGE("%s:Send vendor unknown 0 cmd error", __FUNCTION__);
|
||||
}
|
||||
while (get_tz_state() == STATE_SCAN) {
|
||||
ret = vcs_start_capture(vdev, 0);
|
||||
if (ret == -1)
|
||||
goto out;
|
||||
trust_zone_5x_cmd_t *send_5x_cmd = NULL;
|
||||
trust_zone_2x_result_t *resp_2x = NULL;
|
||||
int idx = 1;
|
||||
send_5x_cmd = (trust_zone_5x_cmd_t *)handle->ion_sbuffer;
|
||||
resp_2x = (trust_zone_2x_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_5x_cmd_t)));
|
||||
|
||||
memset(send_5x_cmd, 0, QSEECOM_ALIGN(sizeof(*send_5x_cmd)) + QSEECOM_ALIGN(sizeof(*resp_2x)));
|
||||
send_5x_cmd->cmd = vfmMatchImageToTemplates;
|
||||
send_5x_cmd->len = 0x14;
|
||||
send_5x_cmd->unknown[0] = 1;
|
||||
send_5x_cmd->unknown[1] = 100000;
|
||||
send_5x_cmd->time_now = time(NULL);
|
||||
send_5x_cmd->data[0] = 0x1;
|
||||
send_5x_cmd->data[102388] = vcs_get_enrolled_finger_num();
|
||||
len = 0;
|
||||
for (idx = 1; idx <= MAX_NUM_FINGERS; idx++)
|
||||
if (tz.finger[idx].exist) {
|
||||
len++;
|
||||
int address = 102392 + (len - 1) * 15364;
|
||||
send_5x_cmd->data[address] = 0x45;
|
||||
send_5x_cmd->data[address + 1] = 0x28;
|
||||
memcpy(&send_5x_cmd->data[address + 4], &tz.finger[idx].data, FINGER_DATA_MAX_LENGTH);
|
||||
}
|
||||
resp_2x->data[0] = 0x5c;
|
||||
resp_2x->data[25602] = 0x3000;
|
||||
ret = QSEECom_send_cmd(handle, send_5x_cmd, QSEECOM_ALIGN(sizeof(*send_5x_cmd)), resp_2x, QSEECOM_ALIGN(sizeof(*resp_2x)));
|
||||
if (ret) {
|
||||
ALOGE("%s:send vfmMatchImageToTemplates error", __FUNCTION__);
|
||||
send_error_notice(vdev, FINGERPRINT_ERROR_UNABLE_TO_PROCESS);
|
||||
goto out;
|
||||
}
|
||||
if (resp_2x->result != 0) {
|
||||
send_acquired_notice(vdev, resp_2x->result);
|
||||
continue;
|
||||
}
|
||||
fake_fid = (int)resp_2x->data[22] + 1;
|
||||
len = 0;
|
||||
for (idx = 1; idx <= MAX_NUM_FINGERS; idx++) {
|
||||
if (tz.finger[idx].exist) {
|
||||
len++;
|
||||
if (len == fake_fid) {
|
||||
fingerindex = idx;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ALOGV("Auth fingerindex=%d", fingerindex);
|
||||
//memcpy(&tz.finger[fingerindex].data, &resp_2x->data[102419], FINGER_DATA_MAX_LENGTH);
|
||||
//db_write_to_db(vdev, false, fingerindex);
|
||||
|
||||
trust_zone_2x_cmd_t *send_2x_cmd = NULL;
|
||||
send_2x_cmd = (trust_zone_2x_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_2x_cmd_t)));
|
||||
memset(send_2x_cmd, 0, QSEECOM_ALIGN(sizeof(*send_2x_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_2x_cmd->cmd = vfmPayloadRelease;
|
||||
send_2x_cmd->len = PAYLOAD_MAX_LENGTH;
|
||||
memcpy(&send_2x_cmd->data, &tz.finger[fingerindex].payload, PAYLOAD_MAX_LENGTH);
|
||||
resp->data[0] = 0x24;
|
||||
ret = QSEECom_send_cmd(handle, send_2x_cmd, QSEECOM_ALIGN(sizeof(*send_2x_cmd)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
break;
|
||||
}
|
||||
out:
|
||||
sensor_uninit();
|
||||
vcs_uninit();
|
||||
set_tz_state(STATE_IDLE);
|
||||
if (fingerindex) {
|
||||
send_authenticated_notice(vdev, fingerindex);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* cmd: 1.vfmEnrollBegin
|
||||
* 2.vendorUnknownA
|
||||
* 3.vcs_start_capture * 8
|
||||
* 4.vfmEnrollAddImage
|
||||
* 5.vfmEnrollFinish
|
||||
* 6.vfmPayloadBind
|
||||
* 7.vfmEnrollmentPasswordSet
|
||||
*/
|
||||
|
||||
void* vcs_enroll(void* vdev) {
|
||||
int count = 8;
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
trust_zone_base_cmd_t *send_cmd = NULL;
|
||||
trust_zone_vendor_cmd_t *send_vendor_cmd = NULL;
|
||||
trust_zone_normal_result_t *resp = NULL;
|
||||
int ret = 0;
|
||||
int i = 0;
|
||||
send_cmd = (trust_zone_base_cmd_t *)handle->ion_sbuffer;
|
||||
send_vendor_cmd = (trust_zone_vendor_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_base_cmd_t)));
|
||||
|
||||
int idx = 1;
|
||||
for (idx = 1; idx <= MAX_NUM_FINGERS; idx++) {
|
||||
if (!tz.finger[idx].exist) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(*send_cmd)) + QSEECOM_ALIGN(sizeof(int)));
|
||||
send_cmd->cmd = vfmEnrollBegin;
|
||||
send_cmd->data[102400] = idx;
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(*send_cmd)), resp, QSEECOM_ALIGN(sizeof(int)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("send EnrollBegin error");
|
||||
set_tz_state(STATE_IDLE);
|
||||
send_error_notice(vdev, FINGERPRINT_ERROR_UNABLE_TO_PROCESS);
|
||||
return NULL;
|
||||
}
|
||||
memset(send_vendor_cmd, 0, QSEECOM_ALIGN(sizeof(*send_vendor_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_vendor_cmd->cmd = vfmVendorDefinedOperation;
|
||||
send_vendor_cmd->vendor_cmd = vendorUnknownA;
|
||||
resp->data[0] = 0x4;
|
||||
ret = QSEECom_send_cmd(handle, send_vendor_cmd, QSEECOM_ALIGN(sizeof(*send_vendor_cmd)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("send vendorUnknownA error");
|
||||
set_tz_state(STATE_IDLE);
|
||||
send_error_notice(vdev, FINGERPRINT_ERROR_UNABLE_TO_PROCESS);
|
||||
return NULL;
|
||||
}
|
||||
while (get_tz_state() == STATE_ENROLL) {
|
||||
ret = vcs_start_capture(vdev, 0);
|
||||
if (ret == -1)
|
||||
goto out;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(int)));
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(int)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_cmd->cmd = vfmEnrollAddImage;
|
||||
resp->data[0] = 0x8;
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(int)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
if (ret) {
|
||||
ALOGE("%s:send vfmEnrollAddImage error", __FUNCTION__);
|
||||
set_tz_state(STATE_IDLE);
|
||||
send_error_notice(vdev, FINGERPRINT_ERROR_UNABLE_TO_PROCESS);
|
||||
return NULL;
|
||||
}
|
||||
if (resp->result != 0) {
|
||||
send_acquired_notice(vdev, resp->result);
|
||||
continue;
|
||||
}
|
||||
count--;
|
||||
if (resp->data[2] == 0x1)
|
||||
count = 0;
|
||||
if (resp->data[2] != 0x1 && count == 0)
|
||||
count = 1;
|
||||
send_enroll_notice(vdev, idx, count);
|
||||
if (count == 0)
|
||||
break;
|
||||
}
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_base_cmd_t)));
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(*send_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_cmd->cmd = vfmEnrollFinish;
|
||||
send_cmd->len = AUTH_SESSION_TOKEN_LENGTH;
|
||||
resp->data[0] = 0x2845;
|
||||
memcpy(&send_cmd->data, &tz.auth_session_token, AUTH_SESSION_TOKEN_LENGTH);
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(*send_cmd)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("Send vfmEnrollFinish error");
|
||||
}
|
||||
memcpy(&tz.finger[idx].data, &resp->data[2], FINGER_DATA_MAX_LENGTH);
|
||||
for (i = 0; i < 2; i++) {
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(*send_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_cmd->cmd = vfmPayloadBind;
|
||||
send_cmd->len = 0x1;
|
||||
send_cmd->zero = 0x7;
|
||||
sprintf(&send_cmd->data[4], "User_0");
|
||||
if (i == 1) {
|
||||
resp->data[0] = 0x50;
|
||||
}
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(*send_cmd)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
}
|
||||
if (ret || resp->result) {
|
||||
ALOGE("Send vfmPayloadBind error");
|
||||
}
|
||||
memcpy(&tz.finger[idx].payload, &resp->data[2], PAYLOAD_MAX_LENGTH);
|
||||
tz.finger[idx].exist = true;
|
||||
db_write_to_db(vdev, false, idx);
|
||||
|
||||
// We may not need to send vfmEnrollmentPasswordSet.
|
||||
for (i = 0; i < 2; i++) {
|
||||
trust_zone_3x_cmd_t *send_3x_cmd = NULL;
|
||||
send_3x_cmd = (trust_zone_3x_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_3x_cmd_t)));
|
||||
memset(send_3x_cmd, 0, QSEECOM_ALIGN(sizeof(*send_3x_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_3x_cmd->cmd = vfmEnrollmentPasswordSet;
|
||||
send_3x_cmd->len = AUTH_SESSION_TOKEN_LENGTH;
|
||||
memcpy(&send_3x_cmd->data, &tz.auth_session_token, AUTH_SESSION_TOKEN_LENGTH);
|
||||
if (i == 0) {
|
||||
resp->data[0] = 0x90;
|
||||
} else {
|
||||
resp->data[0] = 0x80;
|
||||
}
|
||||
ret = QSEECom_send_cmd(handle, send_3x_cmd, QSEECOM_ALIGN(sizeof(*send_3x_cmd)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
}
|
||||
if (ret || resp->result) {
|
||||
ALOGE("Send vfmEnrollmentPasswordSet error");
|
||||
}
|
||||
out:
|
||||
set_tz_state(STATE_IDLE);
|
||||
sensor_uninit();
|
||||
vcs_uninit();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void* vcs_timeout(void* vdev) {
|
||||
struct timeval now;
|
||||
struct timespec outtime;
|
||||
int ret = 0;
|
||||
|
||||
pthread_mutex_lock(&tz.timeout.lock);
|
||||
gettimeofday(&now, NULL);
|
||||
outtime.tv_sec = now.tv_sec + tz.timeout.timeout;
|
||||
outtime.tv_nsec = now.tv_usec * 1000;
|
||||
ret = pthread_cond_timedwait(&tz.timeout.cond, &tz.timeout.lock, &outtime);
|
||||
pthread_mutex_unlock(&tz.timeout.lock);
|
||||
|
||||
if (ret == ETIMEDOUT) {
|
||||
ALOGI("Enroll timeout! Exit!");
|
||||
int flag = 0;
|
||||
if (get_tz_state() != STATE_IDLE && get_tz_state() != STATE_CANCEL) {
|
||||
set_tz_state(STATE_CANCEL);
|
||||
ioctl(sensor.fd, VFSSPI_IOCTL_SET_DRDY_INT, &flag);
|
||||
while (1) {
|
||||
usleep(100000);
|
||||
if (get_tz_state() == STATE_IDLE)
|
||||
break;
|
||||
}
|
||||
}
|
||||
send_error_notice(vdev, FINGERPRINT_ERROR_TIMEOUT);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int vcs_start_authenticate(void *vdev) {
|
||||
int times = 0;
|
||||
for (times = 0; times < 5; times++)
|
||||
if (get_tz_state() != STATE_IDLE) {
|
||||
ALOGE("%s:Sensor is busy!", __FUNCTION__);
|
||||
if (times < 4) {
|
||||
usleep(100000);
|
||||
continue;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
set_tz_state(STATE_SCAN);
|
||||
int ret = 0;
|
||||
|
||||
sensor_init();
|
||||
|
||||
ret = vcs_init();
|
||||
if (ret) return ret;
|
||||
ret = pthread_create(&tz.auth_thread, NULL, vcs_authenticate, vdev);
|
||||
if (ret) {
|
||||
ALOGE("Can't create authenticate thread!!");
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int vcs_start_enroll(void *vdev, uint32_t timeout) {
|
||||
if (get_tz_state() != STATE_IDLE) {
|
||||
ALOGE("%s:Sensor is busy!", __FUNCTION__);
|
||||
return -1;
|
||||
}
|
||||
set_tz_state(STATE_ENROLL);
|
||||
int ret = 0;
|
||||
|
||||
sensor_init();
|
||||
|
||||
ret = vcs_init();
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
ret = pthread_create(&tz.enroll_thread, NULL, vcs_enroll, vdev);
|
||||
if (ret) {
|
||||
ALOGE("Can't create enroll thread!!");
|
||||
return ret;
|
||||
}
|
||||
if (timeout) {
|
||||
tz.timeout.timeout = timeout;
|
||||
ret = pthread_create(&tz.timeout.timeout_thread, NULL, vcs_timeout, vdev);
|
||||
if (ret) {
|
||||
ALOGE("Can't create timeout thread!!");
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int vcs_get_enrolled_finger_num() {
|
||||
int num = 0;
|
||||
int idx = 1;
|
||||
for (idx = 1; idx <= MAX_NUM_FINGERS; idx++)
|
||||
if (tz.finger[idx].exist)
|
||||
num++;
|
||||
ALOGV("%s: num=%d", __FUNCTION__, num);
|
||||
return num;
|
||||
}
|
||||
|
||||
/*
|
||||
* cmd: vendorGetAuthToken
|
||||
*/
|
||||
int vcs_update_auth_token() {
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
trust_zone_vendor_cmd_t *send_vendor_cmd = NULL;
|
||||
trust_zone_normal_result_t *resp = NULL;
|
||||
int ret = 0;
|
||||
send_vendor_cmd = (trust_zone_vendor_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_vendor_cmd_t)));
|
||||
int i = 0;
|
||||
|
||||
for (i = 0;i < 2; i++) {
|
||||
memset(send_vendor_cmd, 0, QSEECOM_ALIGN(sizeof(*send_vendor_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_vendor_cmd->cmd = vfmVendorDefinedOperation;
|
||||
send_vendor_cmd->vendor_cmd = vendorGetAuthToken;
|
||||
if (i == 1) {
|
||||
resp->data[0] = 0x80;
|
||||
}
|
||||
ret = QSEECom_send_cmd(handle, send_vendor_cmd, QSEECOM_ALIGN(sizeof(*send_vendor_cmd)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
}
|
||||
if (resp->result) {
|
||||
ALOGE("send vendorGetAuthToken failed, qsapp result=%d", resp->result);
|
||||
return resp->result;
|
||||
}
|
||||
memcpy(&tz.auth_token, &resp->data[2], AUTH_TOKEN_LENGTH);
|
||||
ALOGV("Sended vendorGetAuthToken");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* cmd: vfmAuthSessionBegin
|
||||
*/
|
||||
|
||||
int vcs_start_auth_session() {
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
trust_zone_base_cmd_t *send_cmd = NULL;
|
||||
trust_zone_vendor_cmd_t *send_vendor_cmd = NULL;
|
||||
trust_zone_normal_result_t *resp = NULL;
|
||||
int ret = 0;
|
||||
send_cmd = (trust_zone_base_cmd_t *)handle->ion_sbuffer;
|
||||
send_vendor_cmd = (trust_zone_vendor_cmd_t *)handle->ion_sbuffer;
|
||||
int i = 0;
|
||||
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(int)));
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(int)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_cmd->cmd = vfmAuthSessionBegin;
|
||||
resp->data[0] = AUTH_SESSION_TOKEN_LENGTH;
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(int)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("send vfmAuthSessionBegin failed, qsapp result=%d", resp->result);
|
||||
return ret;
|
||||
}
|
||||
memcpy(&tz.auth_session_token, &resp->data[2], AUTH_SESSION_TOKEN_LENGTH);
|
||||
tz.auth_session_opend = true;
|
||||
ALOGV("Sended vfmAuthSessionBegin");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* cmd: vfmAuthSessionEnd
|
||||
*/
|
||||
|
||||
int vcs_stop_auth_session() {
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
trust_zone_base_cmd_t *send_cmd = NULL;
|
||||
trust_zone_normal_result_t *resp = NULL;
|
||||
int ret = 0;
|
||||
send_cmd = (trust_zone_base_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(int)));
|
||||
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(int)) + QSEECOM_ALIGN(sizeof(int)));
|
||||
send_cmd->cmd = vfmAuthSessionEnd;
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(int)), resp, QSEECOM_ALIGN(sizeof(int)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("send vfmAuthSessionEnd failed, qsapp result=%d", resp->result);
|
||||
}
|
||||
memset(tz.auth_session_token, 0, AUTH_SESSION_TOKEN_LENGTH);
|
||||
tz.auth_session_opend = false;
|
||||
ALOGV("Sended vfmAuthSessionEnd");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* cmd: 1.vfmInitialize
|
||||
* 2.vendorEnterAuthSession
|
||||
* 3.vfmDeviceInitialize
|
||||
* 4.vfmDeviceCalibrate
|
||||
*/
|
||||
|
||||
int vcs_resume() {
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
trust_zone_base_cmd_t *send_cmd = NULL;
|
||||
trust_zone_normal_result_t *resp = NULL;
|
||||
int ret = 0;
|
||||
send_cmd = (trust_zone_base_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_base_cmd_t)));
|
||||
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(*send_cmd)) + QSEECOM_ALIGN(sizeof(int)));
|
||||
send_cmd->cmd = vfmInitialize;
|
||||
send_cmd->len = 4;
|
||||
send_cmd->data[0] = 2;
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(*send_cmd)), resp, QSEECOM_ALIGN(sizeof(int)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("send vfmInitialize failed, qsapp result=%d", resp->result);
|
||||
return ret;
|
||||
}
|
||||
ALOGV("Sended vfmInitialize");
|
||||
|
||||
if (tz.auth_session_opend) {
|
||||
trust_zone_vendor_cmd_t *send_vendor_cmd = NULL;
|
||||
send_vendor_cmd = (trust_zone_vendor_cmd_t *)handle->ion_sbuffer;
|
||||
memset(send_vendor_cmd, 0, QSEECOM_ALIGN(sizeof(*send_vendor_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_vendor_cmd->cmd = vfmVendorDefinedOperation;
|
||||
send_vendor_cmd->vendor_cmd = vendorEnterAuthSession;
|
||||
send_vendor_cmd->len = 0x70;
|
||||
memcpy(&send_vendor_cmd->data, &tz.auth_token, 0x70);
|
||||
ret = QSEECom_send_cmd(handle, send_vendor_cmd, QSEECOM_ALIGN(sizeof(*send_vendor_cmd)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("send EnterAuthSession failed, qsapp result=%d", resp->result);
|
||||
return resp->result;
|
||||
}
|
||||
}
|
||||
ALOGV("Sended EnterAuthSession");
|
||||
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(*send_cmd)) + QSEECOM_ALIGN(sizeof(int)));
|
||||
send_cmd->cmd = vfmDeviceInitialize;
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(*send_cmd)), resp, QSEECOM_ALIGN(sizeof(int)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("send vfmDeviceInitialize failed, qsapp result=%d", resp->result);
|
||||
return ret;
|
||||
}
|
||||
ALOGV("Sended vfmDeviceInitialize");
|
||||
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(*send_cmd)) + QSEECOM_ALIGN(sizeof(*resp)));
|
||||
send_cmd->cmd = vfmDeviceCalibrate;
|
||||
send_cmd->data[0] = 0xc0;
|
||||
send_cmd->data[1] = 0x12;
|
||||
resp->data[0] = CALIBRATE_DATA_MAX_LENGTH;
|
||||
if (tz.calibrate_len) {
|
||||
send_cmd->len = tz.calibrate_len;
|
||||
memcpy(&send_cmd->data[4], &tz.calibrate_data, tz.calibrate_len);
|
||||
} else {
|
||||
send_cmd->len = 0x10;
|
||||
}
|
||||
ret = QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(*send_cmd)), resp, QSEECOM_ALIGN(sizeof(*resp)));
|
||||
if (ret || resp->result) {
|
||||
ALOGE("send vfmDeviceCalibrate failed, qsapp result=%d", resp->result);
|
||||
return ret;
|
||||
}
|
||||
if (tz.calibrate_len == 0) {
|
||||
tz.calibrate_len = resp->data[3] + 0xf;
|
||||
memcpy(&tz.calibrate_data, &resp->data[2], tz.calibrate_len);
|
||||
}
|
||||
ALOGV("Sended vfmDeviceCalibrate");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* cmd: vfmUninitialize
|
||||
* set bandwidth to low and shutdown app
|
||||
*/
|
||||
|
||||
int vcs_uninit() {
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
trust_zone_base_cmd_t *send_cmd = NULL;
|
||||
trust_zone_normal_result_t *resp = NULL;
|
||||
send_cmd = (trust_zone_base_cmd_t *)handle->ion_sbuffer;
|
||||
resp = (trust_zone_normal_result_t *)(handle->ion_sbuffer + QSEECOM_ALIGN(sizeof(trust_zone_base_cmd_t)));
|
||||
|
||||
if (tz.auth_session_opend) {
|
||||
vcs_update_auth_token();
|
||||
}
|
||||
|
||||
memset(send_cmd, 0, QSEECOM_ALIGN(sizeof(int)) + QSEECOM_ALIGN(sizeof(int)));
|
||||
send_cmd->cmd = vfmUninitialize;
|
||||
QSEECom_send_cmd(handle, send_cmd, QSEECOM_ALIGN(sizeof(int)), resp, QSEECOM_ALIGN(sizeof(int)));
|
||||
QSEECom_set_bandwidth(handle, false);
|
||||
QSEECom_shutdown_app((struct QSEECom_handle **)&tz.qhandle);
|
||||
tz.init = false;
|
||||
set_tz_state(STATE_IDLE);
|
||||
ALOGV("Closed securefp qsapp");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* start app and set bandwidth to high
|
||||
* Call vcs_resume
|
||||
*/
|
||||
|
||||
int vcs_init() {
|
||||
int ret = 0;
|
||||
if (tz.init) {
|
||||
ALOGI("securefp qsapp is already running!");
|
||||
return ret;
|
||||
}
|
||||
ret = QSEECom_start_app((struct QSEECom_handle **)&tz.qhandle,
|
||||
"/firmware/image", "securefp", SB_LENGTH);
|
||||
if (ret) {
|
||||
ALOGE("Loading securefp app failed");
|
||||
return -1;
|
||||
}
|
||||
struct QSEECom_handle *handle = (struct QSEECom_handle *)(tz.qhandle);
|
||||
ret = QSEECom_set_bandwidth(handle, true);
|
||||
if (ret) {
|
||||
ALOGE("Set bandwidth failed");
|
||||
return -1;
|
||||
}
|
||||
tz.init = true;
|
||||
ALOGV("securefp qsapp init success!");
|
||||
ret = vcs_resume();
|
||||
return ret;
|
||||
}
|
|
@ -1,136 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2016 The Mokee 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 __FINGERPRINT_TZ_H_
|
||||
#define __FINGERPRINT_TZ_H_
|
||||
|
||||
#include "fingerprint_common.h"
|
||||
#include "QSEEComAPI.h"
|
||||
|
||||
/* QSEE cmd */
|
||||
typedef enum trust_zone_cmd_id_t {
|
||||
vfmProvision = 0x1,
|
||||
vfmInitialize = 0x2,
|
||||
vfmUninitialize = 0x3,
|
||||
vfmDeviceInitialize = 0x4,
|
||||
vfmDeviceCalibrate = 0x5,
|
||||
vfmAuthSessionBegin = 0x6,
|
||||
vfmAuthSessionEnd = 0x7,
|
||||
vfmCaptureStart = 0x8,
|
||||
vfmCaptureReadData = 0x9,
|
||||
vfmCaptureProcessData = 0xa,
|
||||
vfmCaptureAbort = 0xb,
|
||||
vfmCaptureGetStatus = 0xc,
|
||||
/* QSEE cmd id 0xd is unused. */
|
||||
vfmCaptureFlushImage = 0xe,
|
||||
vfmEnrollBegin = 0xf,
|
||||
vfmEnrollAddImage = 0x10,
|
||||
vfmEnrollFinish = 0x11,
|
||||
vfmEnrollmentPasswordSet = 0x12,
|
||||
vfmEnrollmentPasswordVerify = 0x13,
|
||||
vfmMatchImageToTemplates = 0x14,
|
||||
vfmPayloadBind = 0x15,
|
||||
vfmPayloadRelease = 0x16,
|
||||
vfmVendorDefinedOperation = 0x17
|
||||
}trust_zone_cmd_id_t;
|
||||
|
||||
typedef enum trust_zone_vendor_cmd_id_t {
|
||||
vendorUnknown0 = 0x0,
|
||||
vendorGetVersion = 0x1,//0x10
|
||||
vendorUnknownA = 0xa,
|
||||
vendorGetAuthToken = 0x14,
|
||||
vendorEnterAuthSession = 0x15,
|
||||
vendorUpdateCalData = 0x17
|
||||
}trust_zone_vendor_cmd_id_t;
|
||||
|
||||
typedef struct trust_zone_normal_cmd_t {
|
||||
trust_zone_cmd_id_t cmd;
|
||||
int len;
|
||||
int zero;
|
||||
char data[BUFFER_LENGTH - 12];
|
||||
}trust_zone_base_cmd_t;
|
||||
|
||||
typedef struct trust_zone_vendor_cmd_t {
|
||||
trust_zone_cmd_id_t cmd;
|
||||
trust_zone_vendor_cmd_id_t vendor_cmd;
|
||||
int len;
|
||||
int zero;
|
||||
char data[BUFFER_LENGTH - 16];
|
||||
}trust_zone_vendor_cmd_t;
|
||||
|
||||
typedef struct trust_zone_2x_cmd_t {
|
||||
trust_zone_cmd_id_t cmd;
|
||||
int len;
|
||||
int zero;
|
||||
char data[BUFFER_LENGTH * 2 - 12];
|
||||
}trust_zone_2x_cmd_t;
|
||||
|
||||
typedef struct trust_zone_3x_cmd_t {
|
||||
trust_zone_cmd_id_t cmd;
|
||||
int len;
|
||||
int zero;
|
||||
char data[BUFFER_LENGTH * 3 - 12];
|
||||
}trust_zone_3x_cmd_t;
|
||||
|
||||
typedef struct trust_zone_5x_cmd_t { //only use on vfmMatchImageToTemplates
|
||||
trust_zone_cmd_id_t cmd;
|
||||
int len;
|
||||
int zero;
|
||||
int unknown[2];
|
||||
time_t time_now;
|
||||
char data[563304];
|
||||
}trust_zone_5x_cmd_t;
|
||||
|
||||
typedef struct trust_zone_normal_result_t {
|
||||
int zero;
|
||||
int result;
|
||||
int data[BUFFER_LENGTH/4 - 2];
|
||||
}trust_zone_normal_result_t;
|
||||
|
||||
typedef struct trust_zone_2x_result_t {
|
||||
int zero;
|
||||
int result;
|
||||
int data[(BUFFER_LENGTH * 2)/4 - 2];
|
||||
}trust_zone_2x_result_t;
|
||||
|
||||
#define FINGERPRINT_ERROR_HW_UNAVAILABLE (1)
|
||||
#define FINGERPRINT_ERROR_UNABLE_TO_PROCESS (2)
|
||||
#define FINGERPRINT_ERROR_TIMEOUT (3)
|
||||
#define FINGERPRINT_ERROR_NO_SPACE (4)
|
||||
#define FINGERPRINT_ERROR_CANCELED (5)
|
||||
#define FINGERPRINT_ERROR_UNABLE_TO_REMOVE (6)
|
||||
#define FINGERPRINT_ERROR_VENDOR_BASE (1000)
|
||||
|
||||
worker_state_t get_tz_state();
|
||||
void set_tz_state(worker_state_t state);
|
||||
|
||||
int vcs_update_cal_data();
|
||||
int vcs_check_state();
|
||||
int vcs_start_capture();
|
||||
void* vcs_authenticate(void* vdev);
|
||||
void* vcs_enroll(void* vdev);
|
||||
int vcs_start_authenticate(void *vdev);
|
||||
int vcs_start_enroll(void *vdev, uint32_t timeout);
|
||||
int vcs_get_enrolled_finger_num();
|
||||
int vcs_update_auth_token();
|
||||
int vcs_start_auth_session();
|
||||
int vcs_stop_auth_session();
|
||||
int vcs_resume();
|
||||
int vcs_uninit();
|
||||
int vcs_init();
|
||||
|
||||
#endif /* __FINGERPRINT_TZ_H_ */
|
|
@ -1,45 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2016 The Mokee 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 "fingerprint_common.h"
|
||||
#include "vfs61xx_ioctl.h"
|
||||
|
||||
#define FINGER_DATABASE_FILENAME "/data/validity/finger.db"
|
||||
#define SAMSUNG_FP_DB_PATH "/data/validity/template.db"
|
||||
#define SENSOR_FILE_NAME "/dev/vfsspi"
|
||||
#define MAX_DATABASE_CMD 255
|
||||
|
||||
int sensor_uninit();
|
||||
int sensor_init();
|
||||
void sensor_process_signal(int signum);
|
||||
int sensor_register();
|
||||
int sensor_capture_start();
|
||||
|
||||
int db_check_and_create_table(void* device);
|
||||
int db_read_to_tz(void *device);
|
||||
int db_write_to_db(void *device, bool remove, int fid);
|
||||
int db_init(void *device);
|
||||
int db_uninit(void *device);
|
||||
|
||||
void send_error_notice(void* device, int error_info_int);
|
||||
void send_acquired_notice(void* device, int acquired_ret);
|
||||
void send_enroll_notice(void *device, int fid, int remaining);
|
||||
void send_authenticated_notice(void *device, int fid);
|
||||
void send_remove_notice(void *device, int fid);
|
||||
|
||||
|
|
@ -1,206 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2016 The Mokee 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 <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "hash.h"
|
||||
|
||||
SHA1Context sha;
|
||||
|
||||
/*
|
||||
* HASH method: SHA1
|
||||
*/
|
||||
|
||||
uint64_t convert_hash_to_number() {
|
||||
uint64_t num = 0;
|
||||
num = ((uint64_t)sha.Message_Digest[0] << 32) + sha.Message_Digest[1];
|
||||
return num;
|
||||
}
|
||||
|
||||
uint64_t hash_file(const char *file_path) {
|
||||
FILE * file;
|
||||
char str[MAX_FILE_LENGTH];
|
||||
int len = 0;
|
||||
file = fopen(file_path, "rb");
|
||||
if (!file)
|
||||
return 1;
|
||||
len = fread(str, sizeof(char), MAX_FILE_LENGTH, file);
|
||||
fclose(file);
|
||||
sha1_hash(str, len);
|
||||
return convert_hash_to_number();
|
||||
}
|
||||
|
||||
uint64_t hash_string(const char *str) {
|
||||
sha1_hash(str, strlen(str));
|
||||
return convert_hash_to_number();
|
||||
}
|
||||
|
||||
void SHA1Reset(SHA1Context *context){
|
||||
context->Length_Low = 0;
|
||||
context->Length_High = 0;
|
||||
context->Message_Block_Index = 0;
|
||||
|
||||
context->Message_Digest[0] = 0x67452301;
|
||||
context->Message_Digest[1] = 0xEFCDAB89;
|
||||
context->Message_Digest[2] = 0x98BADCFE;
|
||||
context->Message_Digest[3] = 0x10325476;
|
||||
context->Message_Digest[4] = 0xC3D2E1F0;
|
||||
|
||||
context->Computed = 0;
|
||||
context->Corrupted = 0;
|
||||
}
|
||||
|
||||
|
||||
int SHA1Result(SHA1Context *context){
|
||||
if (context->Corrupted) {
|
||||
return 0;
|
||||
}
|
||||
if (!context->Computed) {
|
||||
SHA1PadMessage(context);
|
||||
context->Computed = 1;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
void SHA1Input(SHA1Context *context,const char *message_array,unsigned length){
|
||||
if (!length) return;
|
||||
|
||||
if (context->Computed || context->Corrupted){
|
||||
context->Corrupted = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
while(length-- && !context->Corrupted){
|
||||
context->Message_Block[context->Message_Block_Index++] = (*message_array & 0xFF);
|
||||
|
||||
context->Length_Low += 8;
|
||||
|
||||
context->Length_Low &= 0xFFFFFFFF;
|
||||
if (context->Length_Low == 0){
|
||||
context->Length_High++;
|
||||
context->Length_High &= 0xFFFFFFFF;
|
||||
if (context->Length_High == 0) context->Corrupted = 1;
|
||||
}
|
||||
|
||||
if (context->Message_Block_Index == 64){
|
||||
SHA1ProcessMessageBlock(context);
|
||||
}
|
||||
message_array++;
|
||||
}
|
||||
}
|
||||
|
||||
void SHA1ProcessMessageBlock(SHA1Context *context){
|
||||
const unsigned K[] = {0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 };
|
||||
int t;
|
||||
unsigned temp;
|
||||
unsigned W[80];
|
||||
unsigned A, B, C, D, E;
|
||||
|
||||
for(t = 0; t < 16; t++) {
|
||||
W[t] = ((unsigned) context->Message_Block[t * 4]) << 24;
|
||||
W[t] |= ((unsigned) context->Message_Block[t * 4 + 1]) << 16;
|
||||
W[t] |= ((unsigned) context->Message_Block[t * 4 + 2]) << 8;
|
||||
W[t] |= ((unsigned) context->Message_Block[t * 4 + 3]);
|
||||
}
|
||||
|
||||
for(t = 16; t < 80; t++) W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);
|
||||
|
||||
A = context->Message_Digest[0];
|
||||
B = context->Message_Digest[1];
|
||||
C = context->Message_Digest[2];
|
||||
D = context->Message_Digest[3];
|
||||
E = context->Message_Digest[4];
|
||||
|
||||
for(t = 0; t < 20; t++) {
|
||||
temp = SHA1CircularShift(5,A) + ((B & C) | ((~B) & D)) + E + W[t] + K[0];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
for(t = 20; t < 40; t++) {
|
||||
temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
for(t = 40; t < 60; t++) {
|
||||
temp = SHA1CircularShift(5,A) + ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
for(t = 60; t < 80; t++) {
|
||||
temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3];
|
||||
temp &= 0xFFFFFFFF;
|
||||
E = D;
|
||||
D = C;
|
||||
C = SHA1CircularShift(30,B);
|
||||
B = A;
|
||||
A = temp;
|
||||
}
|
||||
context->Message_Digest[0] = (context->Message_Digest[0] + A) & 0xFFFFFFFF;
|
||||
context->Message_Digest[1] = (context->Message_Digest[1] + B) & 0xFFFFFFFF;
|
||||
context->Message_Digest[2] = (context->Message_Digest[2] + C) & 0xFFFFFFFF;
|
||||
context->Message_Digest[3] = (context->Message_Digest[3] + D) & 0xFFFFFFFF;
|
||||
context->Message_Digest[4] = (context->Message_Digest[4] + E) & 0xFFFFFFFF;
|
||||
context->Message_Block_Index = 0;
|
||||
}
|
||||
|
||||
void SHA1PadMessage(SHA1Context *context){
|
||||
if (context->Message_Block_Index > 55) {
|
||||
context->Message_Block[context->Message_Block_Index++] = 0x80;
|
||||
while(context->Message_Block_Index < 64) context->Message_Block[context->Message_Block_Index++] = 0;
|
||||
SHA1ProcessMessageBlock(context);
|
||||
while(context->Message_Block_Index < 56) context->Message_Block[context->Message_Block_Index++] = 0;
|
||||
} else {
|
||||
context->Message_Block[context->Message_Block_Index++] = 0x80;
|
||||
while(context->Message_Block_Index < 56) context->Message_Block[context->Message_Block_Index++] = 0;
|
||||
}
|
||||
context->Message_Block[56] = (context->Length_High >> 24 ) & 0xFF;
|
||||
context->Message_Block[57] = (context->Length_High >> 16 ) & 0xFF;
|
||||
context->Message_Block[58] = (context->Length_High >> 8 ) & 0xFF;
|
||||
context->Message_Block[59] = (context->Length_High) & 0xFF;
|
||||
context->Message_Block[60] = (context->Length_Low >> 24 ) & 0xFF;
|
||||
context->Message_Block[61] = (context->Length_Low >> 16 ) & 0xFF;
|
||||
context->Message_Block[62] = (context->Length_Low >> 8 ) & 0xFF;
|
||||
context->Message_Block[63] = (context->Length_Low) & 0xFF;
|
||||
|
||||
SHA1ProcessMessageBlock(context);
|
||||
}
|
||||
|
||||
int sha1_hash(const char *source, int len){
|
||||
SHA1Reset(&sha);
|
||||
SHA1Input(&sha, source, len);
|
||||
|
||||
if (!SHA1Result(&sha)){
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2016 The Mokee 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 __HASH_H_
|
||||
#define __HASH_H_
|
||||
|
||||
|
||||
#define SHA1CircularShift(bits,word) ((((word) << (bits)) & 0xFFFFFFFF) | ((word) >> (32-(bits))))
|
||||
#define MAX_FILE_LENGTH (300000)
|
||||
|
||||
typedef struct SHA1Context{
|
||||
unsigned Message_Digest[5];
|
||||
unsigned Length_Low;
|
||||
unsigned Length_High;
|
||||
unsigned char Message_Block[64];
|
||||
int Message_Block_Index;
|
||||
int Computed;
|
||||
int Corrupted;
|
||||
} SHA1Context;
|
||||
|
||||
void SHA1Reset(SHA1Context *);
|
||||
int SHA1Result(SHA1Context *);
|
||||
void SHA1Input( SHA1Context *,const char *,unsigned);
|
||||
|
||||
void SHA1ProcessMessageBlock(SHA1Context *);
|
||||
void SHA1PadMessage(SHA1Context *);
|
||||
int sha1_hash(const char *source, int len);
|
||||
|
||||
uint64_t hash_file(const char *file_path);
|
||||
uint64_t hash_string(const char *str);
|
||||
|
||||
#endif //__HASH_H_
|
|
@ -1,11 +0,0 @@
|
|||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.biometrics.fingerprint</name>
|
||||
<transport>hwbinder</transport>
|
||||
<version>2.1</version>
|
||||
<interface>
|
||||
<name>IBiometricsFingerprint</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
|
@ -1,7 +0,0 @@
|
|||
# Fingerprint
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.biometrics.fingerprint@2.1-service \
|
||||
fingerprint.msm8974
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
|
|
@ -1,115 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
* Copyright (C) 2016 The Mokee Project
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
*
|
||||
* Copied from kernel - drivers/fingerprint/vfs61xx.h
|
||||
*
|
||||
* 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 VFS61XX_IOCTL_H_
|
||||
#define VFS61XX_IOCTL_H_
|
||||
|
||||
/* See kernel/include/linux/fprint_secure.h */
|
||||
#ifndef ENABLE_SENSORS_FPRINT_SECURE
|
||||
#define ENABLE_SENSORS_FPRINT_SECURE
|
||||
#endif
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
/* Pass to VFSSPI_IOCTL_REGISTER_DRDY_SIGNAL command */
|
||||
struct vfsspi_iocRegSignal {
|
||||
/* Process ID to which SPI driver sends signal
|
||||
* indicating that DRDY is asserted */
|
||||
int userPID;
|
||||
int signalID; /* Signal number */
|
||||
};
|
||||
|
||||
/* Magic number of IOCTL command */
|
||||
#define VFSSPI_IOCTL_MAGIC 'k'
|
||||
|
||||
/*
|
||||
* IOCTL commands definitions
|
||||
*/
|
||||
|
||||
#ifndef ENABLE_SENSORS_FPRINT_SECURE
|
||||
/* Transmit data to the device
|
||||
and retrieve data from it simultaneously */
|
||||
#define VFSSPI_IOCTL_RW_SPI_MESSAGE \
|
||||
_IOWR(VFSSPI_IOCTL_MAGIC, 1, unsigned int)
|
||||
#endif
|
||||
/* Hard reset the device */
|
||||
#define VFSSPI_IOCTL_DEVICE_RESET \
|
||||
_IO(VFSSPI_IOCTL_MAGIC, 2)
|
||||
/* Set the baud rate of SPI master clock */
|
||||
#define VFSSPI_IOCTL_SET_CLK \
|
||||
_IOW(VFSSPI_IOCTL_MAGIC, 3, unsigned int)
|
||||
#ifndef ENABLE_SENSORS_FPRINT_SECURE
|
||||
/* Get level state of DRDY GPIO */
|
||||
#define VFSSPI_IOCTL_CHECK_DRDY \
|
||||
_IO(VFSSPI_IOCTL_MAGIC, 4)
|
||||
#endif
|
||||
/* Register DRDY signal. It is used by SPI driver
|
||||
* for indicating host that DRDY signal is asserted. */
|
||||
#define VFSSPI_IOCTL_REGISTER_DRDY_SIGNAL \
|
||||
_IOW(VFSSPI_IOCTL_MAGIC, 5, unsigned int)
|
||||
/* Store the user data into the SPI driver. Currently user data is a
|
||||
* device info data, which is obtained from announce packet. */
|
||||
#ifndef ENABLE_SENSORS_FPRINT_SECURE
|
||||
#define VFSSPI_IOCTL_SET_USER_DATA \
|
||||
_IOW(VFSSPI_IOCTL_MAGIC, 6, unsigned int)
|
||||
#endif
|
||||
#ifndef ENABLE_SENSORS_FPRINT_SECURE
|
||||
/* Retrieve user data from the SPI driver*/
|
||||
#define VFSSPI_IOCTL_GET_USER_DATA \
|
||||
_IOWR(VFSSPI_IOCTL_MAGIC, 7, unsigned int)
|
||||
#endif
|
||||
/* Enable/disable DRDY interrupt handling in the SPI driver */
|
||||
#define VFSSPI_IOCTL_SET_DRDY_INT \
|
||||
_IOW(VFSSPI_IOCTL_MAGIC, 8, unsigned int)
|
||||
/* Put device in Low power mode */
|
||||
#define VFSSPI_IOCTL_DEVICE_SUSPEND \
|
||||
_IO(VFSSPI_IOCTL_MAGIC, 9)
|
||||
#ifndef ENABLE_SENSORS_FPRINT_SECURE
|
||||
/* Indicate the fingerprint buffer size for read */
|
||||
#define VFSSPI_IOCTL_STREAM_READ_START \
|
||||
_IOW(VFSSPI_IOCTL_MAGIC, 10, unsigned int)
|
||||
/* Indicate that fingerprint acquisition is completed */
|
||||
#define VFSSPI_IOCTL_STREAM_READ_STOP \
|
||||
_IO(VFSSPI_IOCTL_MAGIC, 11)
|
||||
/* Retrieve supported SPI baud rate table */
|
||||
#define VFSSPI_IOCTL_GET_FREQ_TABLE \
|
||||
_IOWR(VFSSPI_IOCTL_MAGIC, 12, unsigned int)
|
||||
#endif
|
||||
/* Turn on the power to the sensor */
|
||||
#define VFSSPI_IOCTL_POWER_ON \
|
||||
_IO(VFSSPI_IOCTL_MAGIC, 13)
|
||||
/* Turn off the power to the sensor */
|
||||
#define VFSSPI_IOCTL_POWER_OFF \
|
||||
_IO(VFSSPI_IOCTL_MAGIC, 14)
|
||||
#ifdef ENABLE_SENSORS_FPRINT_SECURE
|
||||
/* To disable spi core clock */
|
||||
#define VFSSPI_IOCTL_DISABLE_SPI_CLOCK \
|
||||
_IO(VFSSPI_IOCTL_MAGIC, 15)
|
||||
/* To set SPI configurations like gpio, clks */
|
||||
#define VFSSPI_IOCTL_SET_SPI_CONFIGURATION \
|
||||
_IO(VFSSPI_IOCTL_MAGIC, 16)
|
||||
/* To reset SPI configurations */
|
||||
#define VFSSPI_IOCTL_RESET_SPI_CONFIGURATION \
|
||||
_IO(VFSSPI_IOCTL_MAGIC, 17)
|
||||
#endif
|
||||
/* get sensor orienation from the SPI driver*/
|
||||
#define VFSSPI_IOCTL_GET_SENSOR_ORIENT \
|
||||
_IOR(VFSSPI_IOCTL_MAGIC, 18, unsigned int)
|
||||
#endif /* VFS61XX_IOCTL_H_ */
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (C) 2012 The CyanogenMod Project
|
||||
* Copyright (C) 2014 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.
|
||||
|
@ -19,6 +19,5 @@
|
|||
|
||||
#define PROPERTY_PERMS_APPEND \
|
||||
{ "persist.audio.", AID_SYSTEM, 0 }, \
|
||||
{ "persist.sys.camera.", AID_MEDIA, 0 }, \
|
||||
{ "wlan.hdcp2.", AID_MEDIA, 0 },
|
||||
{ "persist.sys.camera.", AID_MEDIA, 0 },
|
||||
#endif /* DEVICE_PERMS_H */
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef SAMSUNG_CONSUMERIR_H
|
||||
#define SAMSUNG_CONSUMERIR_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.
|
||||
*/
|
||||
#define IR_PATH "/sys/class/sec/sec_ir/ir_send"
|
||||
|
||||
/*
|
||||
* Board specific configs
|
||||
*
|
||||
* If your device needs a different configuration, you
|
||||
* can override this header in your device tree
|
||||
*/
|
||||
// Some devices need MS_IR_SIGNAL to avoid ms to pulses conversionn
|
||||
#define MS_IR_SIGNAL
|
||||
|
||||
static const consumerir_freq_range_t consumerir_freqs[] = {
|
||||
{.min = 30000, .max = 30000},
|
||||
{.min = 33000, .max = 33000},
|
||||
{.min = 36000, .max = 36000},
|
||||
{.min = 38000, .max = 38000},
|
||||
{.min = 40000, .max = 40000},
|
||||
{.min = 56000, .max = 56000},
|
||||
};
|
||||
|
||||
#endif // SAMSUNG_CONSUMERIR_H
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
/*
|
||||
* Copyright (C) 2016 The CyanogenMod Project
|
||||
* Copyright (C) 2017 The LineageOS Project
|
||||
|
@ -27,7 +28,7 @@
|
|||
*/
|
||||
#define PANEL_BRIGHTNESS_NODE "/sys/class/leds/lcd-backlight/brightness"
|
||||
#define PANEL_MAX_BRIGHTNESS_NODE "/sys/class/leds/lcd-backlight/max_brightness"
|
||||
#define BUTTON_BRIGHTNESS_NODE "/sys/class/sec/sec_touchkey/brightness"
|
||||
#define BUTTON_BRIGHTNESS_NODE "/sys/class/leds/button-backlight/brightness"
|
||||
#define LED_BLINK_NODE "/sys/class/sec/led/led_blink"
|
||||
|
||||
/*
|
||||
|
@ -51,4 +52,4 @@
|
|||
#define LED_BRIGHTNESS_NOTIFICATION 255
|
||||
#define LED_BRIGHTNESS_ATTENTION 255
|
||||
|
||||
#endif // SAMSUNG_LIGHTS_H
|
||||
#endif // SAMSUNG_LIGHTS_H
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 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_MACLOADER_H
|
||||
#define SAMSUNG_MACLOADER_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.
|
||||
*/
|
||||
|
||||
/* NVRAM calibration, NULL if calibration unneeded */
|
||||
#define WIFI_DRIVER_NVRAM_PATH "/vendor/etc/wifi/nvram_net.txt"
|
||||
|
||||
/* NVRAM calibration parameters */
|
||||
#define WIFI_DRIVER_NVRAM_PATH_PARAM "/sys/module/dhd/parameters/nvram_path"
|
||||
|
||||
/* Physical address (MAC) */
|
||||
#define MACADDR_PATH "/efs/wifi/.mac.info"
|
||||
|
||||
/* Consumer identification number (CID) */
|
||||
#define CID_PATH "/data/.cid.info"
|
||||
|
||||
#endif // SAMSUNG_MACLOADER_H
|
|
@ -1,2 +1,5 @@
|
|||
key 254 APP_SWITCH VIRTUAL
|
||||
key 158 BACK VIRTUAL
|
||||
key 139 MENU VIRTUAL
|
||||
key 158 BACK VIRTUAL
|
||||
key 102 HOME
|
||||
key 217 SEARCH
|
||||
key 254 APP_SWITCH VIRTUAL
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_SRC_FILES := camera_shim.c
|
||||
LOCAL_MODULE := libshim_camera
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_CLASS := SHARED_LIBRARIES
|
||||
LOCAL_PROPRIETARY_MODULE := true
|
||||
include $(BUILD_SHARED_LIBRARY)
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 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.
|
||||
*/
|
||||
|
||||
// rt hdr
|
||||
const char _ZN7android16CameraParameters10KEY_RT_HDRE[] = "rt-hdr";
|
||||
const char _ZN7android16CameraParameters20KEY_SUPPORTED_RT_HDRE[] = "rt-hdr-values";
|
||||
const char _ZN7android16CameraParameters9RTHDR_OFFE[] = "off";
|
||||
const char _ZN7android16CameraParameters8RTHDR_ONE[] = "on";
|
||||
|
||||
// phase af
|
||||
const char _ZN7android16CameraParameters12KEY_PHASE_AFE[] = "phase-af";
|
||||
const char _ZN7android16CameraParameters22KEY_SUPPORTED_PHASE_AFE[] = "phase-af-values";
|
||||
const char _ZN7android16CameraParameters7PAF_OFFE[] = "off";
|
||||
const char _ZN7android16CameraParameters6PAF_ONE[] = "on";
|
||||
|
||||
// dynamic range control
|
||||
const char _ZN7android16CameraParameters25KEY_DYNAMIC_RANGE_CONTROLE[] = "dynamic-range-control";
|
||||
const char _ZN7android16CameraParameters35KEY_SUPPORTED_DYNAMIC_RANGE_CONTROLE[] = "dynamic-range-control-values";
|
||||
const char _ZN7android16CameraParameters7DRC_OFFE[] = "off";
|
||||
const char _ZN7android16CameraParameters6DRC_ONE[] = "on";
|
|
@ -1,11 +1,11 @@
|
|||
[
|
||||
{
|
||||
"repository": "android_device_samsung_msm8974-common",
|
||||
"target_path": "device/samsung/msm8974-common"
|
||||
"repository": "android_device_samsung_msm8226-common",
|
||||
"target_path": "device/samsung/msm8226-common"
|
||||
},
|
||||
{
|
||||
"repository": "android_kernel_samsung_msm8974",
|
||||
"target_path": "kernel/samsung/msm8974"
|
||||
"repository": "android_kernel_samsung_msm8226",
|
||||
"target_path": "kernel/samsung/msm8226"
|
||||
},
|
||||
{
|
||||
"repository": "android_packages_apps_FlipFlap",
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2018 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.
|
||||
#
|
||||
|
||||
# NFC
|
||||
include $(COMMON_PATH)/nfc/board.mk
|
|
@ -1,84 +0,0 @@
|
|||
###############################################################################
|
||||
# Firmware patch file
|
||||
# If the value is not set then patch download is disabled.
|
||||
FW_PATCH="/vendor/firmware/bcm2079xB4_firmware.ncd"
|
||||
FW_PATCH_20793="/vendor/firmware/bcm2079xB4_firmware_20793.ncd"
|
||||
|
||||
###############################################################################
|
||||
# Firmware pre-patch file (sent before the above patch file)
|
||||
# If the value is not set then pre-patch is not used.
|
||||
FW_PRE_PATCH="/vendor/firmware/bcm2079xB4_pre_firmware.ncd"
|
||||
FW_PRE_PATCH_20793="/vendor/firmware/bcm2079xB4_pre_firmware_20793.ncd"
|
||||
|
||||
###############################################################################
|
||||
# LPTD mode configuration
|
||||
# byte[0] is the length of the remaining bytes in this value
|
||||
# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
|
||||
# byte[1] is the param id it should be set to B9.
|
||||
# byte[2] is the length of the LPTD parameters
|
||||
# byte[3] indicates if LPTD is enabled
|
||||
# if set to 0, LPTD will be disabled (parameters will still be sent).
|
||||
# byte[4-n] are the LPTD parameters.
|
||||
# By default, LPTD is enabled and default settings are used.
|
||||
#
|
||||
# These settings are tuned for B4 evaluation boards.
|
||||
# LPTD DISABLED ---
|
||||
#LPTD_CFG={29:B9:27:00:00:FF:FF:08:A0:0F:40:00:80:12:02:10:00:00:00:31:0B:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00}
|
||||
|
||||
# Eval Board ---
|
||||
#LPTD_CFG={29:B9:27:01:00:FF:FF:08:A0:0F:40:00:80:12:02:10:00:00:00:31:0B:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00}
|
||||
|
||||
# HLTE EUR NFC LPTD ENABLED
|
||||
LPTD_CFG={29:B9:27:01:00:FF:FF:0A:A0:0F:40:00:80:12:02:10:00:00:00:31:0F:30:00:00:01:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00}
|
||||
|
||||
###############################################################################
|
||||
# Startup Configuration (100 bytes maximum)
|
||||
#
|
||||
# For the 0xC2 parameter, set byte[0] to 60 to disable UICC Idle Timeout.
|
||||
# set to 61 to enable (The least significant bit of this byte enables
|
||||
# the power off when Idle mode).
|
||||
# 20 A1 07 00 == > These 4 bytes form a 4 byte value which decides the idle timeout(in us)
|
||||
# value to trigger the uicc deactivation.
|
||||
# NFC forum conformance
|
||||
#NFA_DM_START_UP_CFG={27:B2:04:E8:03:00:00:CF:02:02:08:CB:01:01:A5:01:01:CA:0A:00:00:00:00:06:F0:55:00:00:0F:80:01:01:B5:03:01:03:09:5B:01:02}
|
||||
# GCF combined + clfCfgTagPicc
|
||||
NFA_DM_START_UP_CFG={50:CB:01:09:A5:01:01:CA:14:00:00:00:00:06:0C:D4:01:00:15:C0:E1:E4:00:C0:C6:2D:00:14:00:B5:03:01:03:FF:C2:08:61:00:82:04:80:C3:C9:01:80:01:01:C9:03:03:0F:AB:5B:01:02:B2:04:E8:03:00:00:CF:02:02:08:B1:06:00:20:00:00:00:12:B5:03:01:02:FF:28:01:01}
|
||||
|
||||
###############################################################################
|
||||
# Pre-Discovery Startup Configuration (256 bytes maximum)
|
||||
#
|
||||
# This is applied before starting Discovery the first time.
|
||||
#NFA_DM_PRE_DISCOVERY_CFG={0A:C2:08:01:08:00:04:80:C3:C9:01}
|
||||
|
||||
###############################################################################
|
||||
# Antenna Configuration - This data is used when setting 0xC8 config item
|
||||
# at startup (before discovery is started). If not used, no value is sent.
|
||||
#
|
||||
# The settings for this value are documented here:
|
||||
# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
|
||||
# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
|
||||
# This document is maintained by Paul Forshaw.
|
||||
#
|
||||
# The values marked as ?? should be tweaked per antenna or customer/app:
|
||||
# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
|
||||
# array[0] = 0x20 is length of the payload from array[1] to the end
|
||||
# array[1] = 0xC8 is PREINIT_DSP_CFG
|
||||
PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:4E:01:00:00:40:04}
|
||||
|
||||
###############################################################################
|
||||
# Snooze Mode Settings
|
||||
#
|
||||
# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
|
||||
# to disable.
|
||||
#
|
||||
# If SNOOZE_MODE_CFG is not provided, the default settings are used:
|
||||
# They are as follows:
|
||||
# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
|
||||
# 0 Idle Threshold Host
|
||||
# 0 Idle Threshold HC
|
||||
# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
|
||||
# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
|
||||
#
|
||||
#SNOOZE_MODE_CFG={08:00:00:00:01}
|
||||
|
||||
BRCM_CTS_WAR=0x03
|
|
@ -1,70 +0,0 @@
|
|||
###############################################################################
|
||||
# Firmware patch file
|
||||
# If the value is not set then patch download is disabled.
|
||||
FW_PATCH="/vendor/firmware/bcm2079xB5_firmware.ncd"
|
||||
#FW_PATCH_20793="/vendor/firmware/bcm2079xB5_firmware_20793.ncd"
|
||||
|
||||
###############################################################################
|
||||
# Firmware pre-patch file (sent before the above patch file)
|
||||
# If the value is not set then pre-patch is not used.
|
||||
FW_PRE_PATCH="/vendor/firmware/bcm2079xB5_pre_firmware.ncd"
|
||||
#FW_PRE_PATCH_20793="/vendor/firmware/bcm2079xB5_pre_firmware_20793.ncd"
|
||||
|
||||
###############################################################################
|
||||
# LPTD mode configuration
|
||||
# byte[0] is the length of the remaining bytes in this value
|
||||
# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
|
||||
# byte[1] is the param id it should be set to B9.
|
||||
# byte[2] is the length of the LPTD parameters
|
||||
# byte[3] indicates if LPTD is enabled
|
||||
# if set to 0, LPTD will be disabled (parameters will still be sent).
|
||||
# byte[4-n] are the LPTD parameters.
|
||||
# By default, LPTD is enabled and default settings are used.
|
||||
# See nfc_hal_dm_cfg.c for defaults
|
||||
LPTD_CFG={38:B9:36:01:00:FF:FF:09:00:00:00:A0:0F:40:00:00:12:02:10:00:00:00:2D:0B:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00:03:00:D0:07:00:00:08:07:00:00:C8:00:00:00:00:00:00:00}
|
||||
|
||||
###############################################################################
|
||||
# Startup Configuration (256 bytes maximum)
|
||||
#
|
||||
# This is applied at stack startup.
|
||||
#
|
||||
NFA_DM_START_UP_CFG={50:CB:01:01:A5:01:01:CA:1C:00:00:00:00:0E:C0:D4:01:00:0F:00:00:00:00:60:AE:0A:00:14:01:14:0A:10:B8:0B:03:00:02:B5:03:01:02:FF:80:01:01:C9:03:03:0F:AB:5B:01:00:B2:04:E8:03:00:00:CF:02:02:08:B1:06:00:20:00:00:40:12:B0:05:03:03:03:03:FF:28:01:01}
|
||||
|
||||
###############################################################################
|
||||
# Pre-Discovery Startup Configuration (256 bytes maximum)
|
||||
#
|
||||
# This is applied before starting Discovery the first time.
|
||||
NFA_DM_PRE_DISCOVERY_CFG={0A:C2:08:01:08:00:04:80:C3:C9:01}
|
||||
|
||||
###############################################################################
|
||||
# Antenna Configuration - This data is used when setting 0xC8 config item
|
||||
# at startup (before discovery is started). If not used, no value is sent.
|
||||
#
|
||||
# The settings for this value are documented here:
|
||||
# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
|
||||
# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
|
||||
#
|
||||
# The values marked as ?? should be tweaked per antenna or customer/app:
|
||||
# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
|
||||
# array[0] = 0x20 is length of the payload from array[1] to the end
|
||||
# array[1] = 0xC8 is PREINIT_DSP_CFG
|
||||
PREINIT_DSP_CFG={20:C8:1E:06:3F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:4B:01:00:00:40:04}
|
||||
|
||||
###############################################################################
|
||||
# Snooze Mode Settings
|
||||
#
|
||||
# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
|
||||
# to disable.
|
||||
#
|
||||
# If SNOOZE_MODE_CFG is not provided, the default settings are used:
|
||||
# They are as follows:
|
||||
# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
|
||||
# 0 Idle Threshold Host
|
||||
# 0 Idle Threshold HC
|
||||
# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
|
||||
# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
|
||||
#
|
||||
#SNOOZE_MODE_CFG={08:00:00:00:01}
|
||||
|
||||
BRCM_CTS_WAR=0x02
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
#
|
||||
# Copyright (C) 2018 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.
|
||||
#
|
||||
|
||||
# NFC
|
||||
$(call inherit-product, device/samsung/klte-common/nfc/product.mk)
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.nfc@1.0-impl-bcm \
|
||||
android.hardware.nfc@1.0-service \
|
||||
nfc_nci.bcm2079x.default
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/samsung/klte-common/nfc/bcm2079x/libnfc-brcm.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-brcm.conf \
|
||||
device/samsung/klte-common/nfc/bcm2079x/libnfc-brcm-20791b04.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-brcm-20791b04.conf \
|
||||
device/samsung/klte-common/nfc/bcm2079x/libnfc-brcm-20791b05.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-brcm-20791b05.conf
|
|
@ -1,5 +1,6 @@
|
|||
#
|
||||
# Copyright (C) 2018 The LineageOS Project
|
||||
# Copyright 2016 The CyanogenMod Project
|
||||
# Copyright 2017-2018 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.
|
||||
|
|
|
@ -15,8 +15,4 @@
|
|||
#
|
||||
|
||||
# NFC
|
||||
include $(COMMON_PATH)/nfc/board.mk
|
||||
|
||||
# PN547 specific flags
|
||||
BOARD_NFC_CHIPSET := pn547
|
||||
BOARD_NFC_HAL_SUFFIX := msm8974
|
||||
DEVICE_MANIFEST_FILE += device/samsung/s3ve3g/nfc/manifest.xml
|
||||
|
|
|
@ -1,349 +0,0 @@
|
|||
## this file is used by Broadcom's Hardware Abstraction Layer at external/libnfc-nci/halimpl/
|
||||
|
||||
###############################################################################
|
||||
# Application options
|
||||
APPL_TRACE_LEVEL=0xFF
|
||||
PROTOCOL_TRACE_LEVEL=0xFFFFFFFF
|
||||
|
||||
###############################################################################
|
||||
# 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/nfc"
|
||||
|
||||
###############################################################################
|
||||
# Snooze Mode Settings
|
||||
#
|
||||
# By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
|
||||
# to disable.
|
||||
#
|
||||
# If SNOOZE_MODE_CFG is not provided, the default settings are used:
|
||||
# They are as follows:
|
||||
# 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
|
||||
# 0 Idle Threshold Host
|
||||
# 0 Idle Threshold HC
|
||||
# 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
|
||||
# 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
|
||||
#
|
||||
#SNOOZE_MODE_CFG={08:00:00:00:01}
|
||||
|
||||
###############################################################################
|
||||
# Insert a delay in milliseconds after NFC_WAKE and before write to NFCC
|
||||
NFC_WAKE_DELAY=20
|
||||
|
||||
###############################################################################
|
||||
# Various Delay settings (in ms) used in USERIAL
|
||||
# POWER_ON_DELAY
|
||||
# Delay after turning on chip, before writing to transport (default 300)
|
||||
# PRE_POWER_OFF_DELAY
|
||||
# Delay after deasserting NFC-Wake before turn off chip (default 0)
|
||||
# POST_POWER_OFF_DELAY
|
||||
# Delay after turning off chip, before USERIAL_close returns (default 0)
|
||||
#
|
||||
#POWER_ON_DELAY=300
|
||||
#PRE_POWER_OFF_DELAY=0
|
||||
#POST_POWER_OFF_DELAY=0
|
||||
|
||||
###############################################################################
|
||||
# LPTD mode configuration
|
||||
# byte[0] is the length of the remaining bytes in this value
|
||||
# if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
|
||||
# byte[1] is the param id it should be set to B9.
|
||||
# byte[2] is the length of the LPTD parameters
|
||||
# byte[3] indicates if LPTD is enabled
|
||||
# if set to 0, LPTD will be disabled (parameters will still be sent).
|
||||
# byte[4-n] are the LPTD parameters.
|
||||
# By default, LPTD is enabled and default settings are used.
|
||||
# See nfc_hal_dm_cfg.c for defaults
|
||||
LPTD_CFG={23:B9:21:01:02:FF:FF:04:A0:0F:40:00:80:02:02:10:00:00:00:31:0C:30:00:00:00:00:00:00:00:00:00:00:00:00:00:00}
|
||||
|
||||
###############################################################################
|
||||
# Startup Configuration (100 bytes maximum)
|
||||
#
|
||||
# For the 0xCA parameter, byte[9] (marked by 'AA') is for UICC0, and byte[10] (marked by BB) is
|
||||
# for UICC1. The values are defined as:
|
||||
# 0 : UICCx only supports ISO_DEP in low power mode.
|
||||
# 2 : UICCx only supports Mifare in low power mode.
|
||||
# 3 : UICCx supports both ISO_DEP and Mifare in low power mode.
|
||||
#
|
||||
# AA BB
|
||||
NFA_DM_START_UP_CFG={1F:CB:01:01:A5:01:01:CA:14:00:00:00:00:06:E8:03:00:00:00:00:00:00:00:00:00:00:00:00:00:80:01:01}
|
||||
|
||||
###############################################################################
|
||||
# Startup Vendor Specific Configuration (100 bytes maximum);
|
||||
# byte[0] TLV total len = 0x5
|
||||
# byte[1] NCI_MTS_CMD|NCI_GID_PROP = 0x2f
|
||||
# byte[2] NCI_MSG_FRAME_LOG = 0x9
|
||||
# byte[3] 2
|
||||
# byte[4] 0=turn off RF frame logging; 1=turn on
|
||||
# byte[5] 0=turn off SWP frame logging; 1=turn on
|
||||
# NFA_DM_START_UP_VSC_CFG={05:2F:09:02:01:01}
|
||||
|
||||
###############################################################################
|
||||
# Antenna Configuration - This data is used when setting 0xC8 config item
|
||||
# at startup (before discovery is started). If not used, no value is sent.
|
||||
#
|
||||
# The settings for this value are documented here:
|
||||
# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
|
||||
# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
|
||||
# This document is maintained by Paul Forshaw.
|
||||
#
|
||||
# The values marked as ?? should be tweaked per antenna or customer/app:
|
||||
# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
|
||||
# array[0] = 0x20 is length of the payload from array[1] to the end
|
||||
# array[1] = 0xC8 is PREINIT_DSP_CFG
|
||||
#PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0F:03:3C:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:48:01:00:00:40:04}
|
||||
|
||||
###############################################################################
|
||||
# Configure crystal frequency when internal LPO can't detect the frequency.
|
||||
#XTAL_FREQUENCY=0
|
||||
###############################################################################
|
||||
# Configure the default Destination Gate used by HCI (the default is 4, which
|
||||
# is the ETSI loopback gate.
|
||||
NFA_HCI_DEFAULT_DEST_GATE=0xF0
|
||||
|
||||
###############################################################################
|
||||
# Configure the single default SE to use. The default is to use the first
|
||||
# SE that is detected by the stack. This value might be used when the phone
|
||||
# supports multiple SE (e.g. 0xF3 and 0xF4) but you want to force it to use
|
||||
# one of them (e.g. 0xF4).
|
||||
#ACTIVE_SE=0xF3
|
||||
|
||||
###############################################################################
|
||||
# Configure the NFC Extras to open and use a static pipe. If the value is
|
||||
# not set or set to 0, then the default is use a dynamic pipe based on a
|
||||
# destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value
|
||||
# for each UICC (where F3="UICC0" and F4="UICC1")
|
||||
#NFA_HCI_STATIC_PIPE_ID_F3=0x70
|
||||
#NFA_HCI_STATIC_PIPE_ID_01=0x19
|
||||
NFA_HCI_STATIC_PIPE_ID_C0=0x19
|
||||
###############################################################################
|
||||
# When disconnecting from Oberthur secure element, perform a warm-reset of
|
||||
# the secure element to deselect the applet.
|
||||
# The default hex value of the command is 0x3. If this variable is undefined,
|
||||
# then this feature is not used.
|
||||
OBERTHUR_WARM_RESET_COMMAND=0x03
|
||||
|
||||
###############################################################################
|
||||
# Force UICC to only listen to 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
|
||||
UICC_LISTEN_TECH_MASK=0xC7
|
||||
|
||||
###############################################################################
|
||||
# Allow UICC to be powered off if there is no traffic.
|
||||
# Timeout is in ms. If set to 0, then UICC will not be powered off.
|
||||
#UICC_IDLE_TIMEOUT=30000
|
||||
UICC_IDLE_TIMEOUT=0
|
||||
|
||||
###############################################################################
|
||||
# AID for Empty Select command
|
||||
# If specified, this AID will be substituted when an Empty SELECT command is
|
||||
# detected. The first byte is the length of the AID. Maximum length is 16.
|
||||
AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00}
|
||||
###############################################################################
|
||||
# Maximum Number of Credits to be allowed by the NFCC
|
||||
# This value overrides what the NFCC specifices allowing the host to have
|
||||
# the control to work-around transport limitations. If this value does
|
||||
# not exist or is set to 0, the NFCC will provide the number of credits.
|
||||
MAX_RF_DATA_CREDITS=1
|
||||
|
||||
###############################################################################
|
||||
# This setting allows you to disable registering the T4t Virtual SE that causes
|
||||
# the NFCC to send PPSE requests to the DH.
|
||||
# The default setting is enabled (i.e. T4t Virtual SE is registered).
|
||||
#REGISTER_VIRTUAL_SE=1
|
||||
|
||||
###############################################################################
|
||||
# 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
|
||||
|
||||
###############################################################################
|
||||
# Firmware patch file
|
||||
# If the value is not set then patch download is disabled.
|
||||
FW_PATCH="/vendor/firmware/bcm2079x_firmware.ncd"
|
||||
|
||||
###############################################################################
|
||||
# Firmware pre-patch file (sent before the above patch file)
|
||||
# If the value is not set then pre-patch is not used.
|
||||
FW_PRE_PATCH="/vendor/firmware/bcm2079x_pre_firmware.ncd"
|
||||
|
||||
###############################################################################
|
||||
# Firmware patch format
|
||||
# 1 = HCD
|
||||
# 2 = NCD (default)
|
||||
#NFA_CONFIG_FORMAT=2
|
||||
|
||||
###############################################################################
|
||||
# SPD Debug mode
|
||||
# If set to 1, any failure of downloading a patch will trigger a hard-stop
|
||||
#SPD_DEBUG=0
|
||||
|
||||
###############################################################################
|
||||
# SPD Max Retry Count
|
||||
# The number of attempts to download a patch before giving up (defualt is 3).
|
||||
# Note, this resets after a power-cycle.
|
||||
#SPD_MAX_RETRY_COUNT=3
|
||||
|
||||
###############################################################################
|
||||
# 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/bcm2079x"
|
||||
|
||||
###############################################################################
|
||||
# power control driver
|
||||
# Specify a kernel driver that support ioctl commands to control NFC_EN and
|
||||
# NFC_WAKE gpio signals.
|
||||
#
|
||||
# POWER_CONTRL_DRIVER=<driver>
|
||||
# where <driver> can be, for example:
|
||||
# "/dev/nfcpower"
|
||||
# "/dev/bcmi2cnfc" (I2C)
|
||||
# "/dev/bcmspinfc" (SPI)
|
||||
# i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal
|
||||
POWER_CONTROL_DRIVER="/dev/bcm2079x"
|
||||
|
||||
###############################################################################
|
||||
# I2C transport driver options
|
||||
#
|
||||
BCMI2CNFC_ADDRESS=0
|
||||
|
||||
###############################################################################
|
||||
# I2C transport driver try to read multiple packets in read() if data is available
|
||||
# remove the comment below to enable this feature
|
||||
#READ_MULTIPLE_PACKETS=1
|
||||
|
||||
###############################################################################
|
||||
# SPI transport driver options
|
||||
#SPI_NEGOTIATION={0A:F0:00:01:00:00:00:FF:FF:00:00}
|
||||
|
||||
###############################################################################
|
||||
# UART transport driver options
|
||||
#
|
||||
# PORT=1,2,3,...
|
||||
# BAUD=115200, 19200, 9600, 4800,
|
||||
# DATABITS=8, 7, 6, 5
|
||||
# PARITY="even" | "odd" | "none"
|
||||
# STOPBITS="0" | "1" | "1.5" | "2"
|
||||
|
||||
#UART_PORT=2
|
||||
#UART_BAUD=115200
|
||||
#UART_DATABITS=8
|
||||
#UART_PARITY="none"
|
||||
#UART_STOPBITS="1"
|
||||
|
||||
###############################################################################
|
||||
# Insert a delay in microseconds per byte after a write to NFCC.
|
||||
# after writing a block of data to the NFCC, delay this an amopunt of time before
|
||||
# writing next block of data. the delay is calculated as below
|
||||
# NFC_WRITE_DELAY * (number of byte written) / 1000 milliseconds
|
||||
# e.g. after 259 bytes is written, delay (259 * 20 / 1000) 5 ms before next write
|
||||
NFC_WRITE_DELAY=20
|
||||
|
||||
###############################################################################
|
||||
# Maximum Number of Credits to be allowed by the NFCC
|
||||
# This value overrides what the NFCC specifices allowing the host to have
|
||||
# the control to work-around transport limitations. If this value does
|
||||
# not exist or is set to 0, the NFCC will provide the number of credits.
|
||||
MAX_RF_DATA_CREDITS=1
|
||||
|
||||
###############################################################################
|
||||
# Antenna Configuration - This data is used when setting 0xC8 config item
|
||||
# at startup (before discovery is started). If not used, no value is sent.
|
||||
#
|
||||
# The settings for this value are documented here:
|
||||
# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
|
||||
# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
|
||||
# This document is maintained by Paul Forshaw.
|
||||
#
|
||||
# The values marked as ?? should be tweaked per antenna or customer/app:
|
||||
# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
|
||||
# array[0] = 0x20 is length of the payload from array[1] to the end
|
||||
# array[1] = 0xC8 is PREINIT_DSP_CFG
|
||||
#PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0F:03:3C:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:48:01:00:00:40:04}
|
||||
|
||||
|
||||
###############################################################################
|
||||
# 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_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_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_A_ACTIVE 0x40 /* NFC Technology A active mode */
|
||||
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */
|
||||
POLLING_TECH_MASK=0x6F
|
||||
|
||||
###############################################################################
|
||||
# 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_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE
|
||||
#
|
||||
# Notable bits:
|
||||
# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
|
||||
# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
|
||||
# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */
|
||||
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */
|
||||
P2P_LISTEN_TECH_MASK=0xC4
|
||||
|
||||
PRESERVE_STORAGE=0x01
|
||||
|
||||
###############################################################################
|
||||
# Maximum EE supported number
|
||||
# NXP PN547C2 0x02
|
||||
# NXP PN65T 0x03
|
||||
NFA_MAX_EE_SUPPORTED=0x02
|
||||
|
||||
###############################################################################
|
||||
# NCI Hal Module name
|
||||
NCI_HAL_MODULE="nfc_nci"
|
||||
|
||||
###############################################################################
|
||||
# Vendor Specific Proprietary Protocol & Discovery Configuration
|
||||
# Set to 0xFF if unsupported
|
||||
# byte[0] NCI_PROTOCOL_18092_ACTIVE
|
||||
# byte[1] NCI_PROTOCOL_B_PRIME
|
||||
# byte[2] NCI_PROTOCOL_DUAL
|
||||
# byte[3] NCI_PROTOCOL_15693
|
||||
# byte[4] NCI_PROTOCOL_KOVIO
|
||||
# byte[5] NCI_PROTOCOL_MIFARE
|
||||
# byte[6] NCI_DISCOVERY_TYPE_POLL_KOVIO
|
||||
# byte[7] NCI_DISCOVERY_TYPE_POLL_B_PRIME
|
||||
# byte[8] NCI_DISCOVERY_TYPE_LISTEN_B_PRIME
|
||||
NFA_PROPRIETARY_CFG={05:FF:FF:06:81:80:77:FF:FF}
|
||||
|
||||
###############################################################################
|
||||
# Enable/Disable NFC-F HCE
|
||||
# Disable 0x00
|
||||
# Enable non-zero value
|
||||
ENABLE_NFCF_HCE=0x00
|
||||
|
||||
###############################################################################
|
||||
# Set max transceive length for IsoDep frames
|
||||
# Standard 0x105 (261)
|
||||
# Extended 0xFEFF (65279)
|
||||
ISO_DEP_MAX_TRANSCEIVE=0xFEFF
|
11
nfc/pn547/manifest.xml
Normal file
11
nfc/pn547/manifest.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<manifest version="1.0" type="device">
|
||||
<hal format="hidl">
|
||||
<name>android.hardware.nfc</name>
|
||||
<transport arch="32">passthrough</transport>
|
||||
<version>1.0</version>
|
||||
<interface>
|
||||
<name>INfc</name>
|
||||
<instance>default</instance>
|
||||
</interface>
|
||||
</hal>
|
||||
</manifest>
|
11
nfc/pn547/nfcee_access.xml
Normal file
11
nfc/pn547/nfcee_access.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Applications granted NFCEE access on user builds
|
||||
|
||||
See packages/apps/Nfc/etc/sample_nfcee_access.xml for full documentation.
|
||||
-->
|
||||
|
||||
<!-- Google wallet release signature -->
|
||||
<signer android:signature="3082044c30820334a003020102020900a8cd17c93da5d990300d06092a864886f70d01010505003077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643301e170d3131303332343031303635335a170d3338303830393031303635335a3077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e464330820120300d06092a864886f70d01010105000382010d00308201080282010100c30f88add9b492096a2c586a5a9a80356bfa026958f8ff0c5dfaf59f49268ad870dee821a53e1f5b170fc96245a3c982a7cb4527053be35e34f396d24b2291ec0c528d6e26927465e06875ea621f7ff98c40e3345b204907cc9354743acdaace65565f48ba74cd4121cdc876df3522badb095c20d934c56a3e5c393ee5f0e02f8fe0621f918d1f35a82489252c6fa6b63392a7686b3e48612d06a9cf6f49bff11d5d96289c9dfe14ac5762439697dd29eafdb9810de3263513a905ac8e8eaf20907e46750a5ab7bf9a77262f47b03f5a3c6e6d7b51343f69c7f725f70bcc1b4ad592250b705a86e6e83ee2ae37fe5701bcbdb26feefdfff60f6a5bdfb5b64793020103a381dc3081d9301d0603551d0e041604141ccece0eea4dc1121fc7515f0d0a0c72e08cc96d3081a90603551d230481a130819e80141ccece0eea4dc1121fc7515f0d0a0c72e08cc96da17ba4793077310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e205669657731143012060355040a130b476f6f676c6520496e632e3110300e060355040b1307416e64726f6964311330110603550403130a476f6f676c65204e4643820900a8cd17c93da5d990300c0603551d13040530030101ff300d06092a864886f70d01010505000382010100a470c728e1d31b06d9af6ae768b565046c57806b9843724931d75d4ca10c321520d33ccfed2aa65462234c9ef9b6f910cc676b99cb7f9895d6c06763574fbb78331275dc5cf38fbaa918d7938c051ffba2ade8f303cde8d9e68a048d1fdb9e7c9f2a49b222c68fff422bf15569b85eeeedb04aa30873dbe64b9c9e74f8f2c2f6c40124aaa8d1780d18512b540add28b3e9581971a4170dd868cf5f31e44712b2c23bb51037d7ef9f87a6e5bdb35e2ceb6bb022636c17a56a96bc7a50258c0bd2ed7b31555a18452e17321a0d52838c82f63f742d74ff79586a5cbb7faf7198a84bcf744310e9e927597f00a23dd00660800c2238d90b2fb372dfdbba75bd852e" />
|
||||
|
||||
</resources>
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# Copyright (C) 2017 The LineageOS Project
|
||||
# Copyright (C) 2018 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.
|
|
@ -15,4 +15,8 @@
|
|||
#
|
||||
|
||||
# NFC
|
||||
include $(COMMON_PATH)/nfc/board.mk
|
||||
include device/samsung/s3ve3g/nfc/board.mk
|
||||
|
||||
# PN547 specific flags
|
||||
BOARD_NFC_CHIPSET := pn547
|
||||
BOARD_NFC_DEVICE := "/dev/pn547"
|
|
@ -1,7 +1,9 @@
|
|||
## this file is used by Broadcom's Hardware Abstraction Layer at external/libnfc-nci/halimpl/
|
||||
|
||||
###############################################################################
|
||||
# Application options
|
||||
# Log levels for libnfc-nci. Suggested value for debugging is 0xFF.
|
||||
APPL_TRACE_LEVEL=0xFF
|
||||
PROTOCOL_TRACE_LEVEL=0xFFFFFFFF
|
||||
PROTOCOL_TRACE_LEVEL=0xFF
|
||||
|
||||
###############################################################################
|
||||
# Logging
|
||||
|
@ -25,7 +27,7 @@ PRESERVE_STORAGE=1
|
|||
|
||||
###############################################################################
|
||||
# File used for NFA storage
|
||||
NFA_STORAGE="/data/bcmnfc"
|
||||
NFA_STORAGE="/data/nfc"
|
||||
|
||||
###############################################################################
|
||||
# Low Power Mode Settings
|
||||
|
@ -50,6 +52,17 @@ NFA_DM_LP_CFG={01:01:00:08}
|
|||
# Insert a delay in milliseconds after NFC_WAKE and before write to NFCC
|
||||
NFC_WAKE_DELAY=20
|
||||
|
||||
###############################################################################
|
||||
# Startup Configuration (100 bytes maximum)
|
||||
#
|
||||
# For the 0xCA parameter, byte[9] (marked by 'AA') is for UICC0, and byte[10] (marked by BB) is
|
||||
# for UICC1. The values are defined as:
|
||||
# 0 : UICCx only supports ISO_DEP in low power mode.
|
||||
# 2 : UICCx only supports Mifare in low power mode.
|
||||
# 3 : UICCx supports both ISO_DEP and Mifare in low power mode.
|
||||
#
|
||||
NFA_DM_START_UP_CFG={17:80:01:00:08:01:01:11:01:01:AF:02:00:07:AF:02:01:07:C0:01:01:BF:01:02}
|
||||
|
||||
###############################################################################
|
||||
# Various Delay settings (in ms) used in USERIAL
|
||||
# POWER_ON_DELAY
|
||||
|
@ -67,7 +80,6 @@ PRE_POWER_OFF_DELAY=1500
|
|||
#POST_POWER_OFF_DELAY=0
|
||||
#CE3_PRE_POWER_OFF_DELAY=1000
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Device Manager Config
|
||||
#
|
||||
|
@ -137,7 +149,7 @@ OBERTHUR_WARM_RESET_COMMAND=0x03
|
|||
# Force UICC to only listen to 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.
|
||||
#UICC_LISTEN_TECH_MASK=0x03
|
||||
UICC_LISTEN_TECH_MASK=0x07
|
||||
|
||||
###############################################################################
|
||||
# AID for Empty Select command
|
||||
|
@ -145,23 +157,52 @@ OBERTHUR_WARM_RESET_COMMAND=0x03
|
|||
# detected. The first byte is the length of the AID. Maximum length is 16.
|
||||
AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00}
|
||||
|
||||
###############################################################################
|
||||
# Forcing HOST to listen for a selected protocol
|
||||
# 0x00 : Disable Host Listen
|
||||
# 0x01 : Enable Host to Listen (A) for ISO-DEP tech A
|
||||
# 0x02 : Enable Host to Listen (B) for ISO-DEP tech B
|
||||
# 0x04 : Enable Host to Listen (F) for T3T Tag Type Protocol tech F
|
||||
# 0x07 : Enable Host to Listen (ABF)for ISO-DEP tech AB & T3T Tag Type Protocol tech F
|
||||
HOST_LISTEN_TECH_MASK=0x07
|
||||
|
||||
###############################################################################
|
||||
# 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
|
||||
|
||||
###############################################################################
|
||||
# Choose the presence-check algorithm for type-4 tag. If not defined, the default value is 1.
|
||||
# 0 NFA_RW_PRES_CHK_DEFAULT; Let stack selects an algorithm
|
||||
# 1 NFA_RW_PRES_CHK_I_BLOCK; ISO-DEP protocol's empty I-block
|
||||
# 2 NFA_RW_PRES_CHK_RESET; Deactivate to Sleep, then re-activate
|
||||
# 3 NFA_RW_PRES_CHK_RB_CH0; Type-4 tag protocol's ReadBinary command on channel 0
|
||||
# 4 NFA_RW_PRES_CHK_RB_CH3; Type-4 tag protocol's ReadBinary command on channel 3
|
||||
PRESENCE_CHECK_ALGORITHM=1
|
||||
|
||||
###############################################################################
|
||||
# NCI Hal Module name
|
||||
NCI_HAL_MODULE="nfc_nci.pn54x"
|
||||
|
||||
###############################################################################
|
||||
# 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_A_ACTIVE |
|
||||
# NFA_TECHNOLOGY_MASK_F_ACTIVE.
|
||||
# NFA_TECHNOLOGY_MASK_KOVIO | NFA_TECHNOLOGY_MASK_A_ACTIVE |
|
||||
# NFA_TECHNOLOGY_MASK_F_ACTIVE
|
||||
#
|
||||
# Notable bits:
|
||||
# NFA_TECHNOLOGY_MASK_A 0x01
|
||||
# NFA_TECHNOLOGY_MASK_B 0x02
|
||||
# NFA_TECHNOLOGY_MASK_F 0x04
|
||||
# NFA_TECHNOLOGY_MASK_ISO15693 0x08
|
||||
# NFA_TECHNOLOGY_MASK_B_PRIME 0x10
|
||||
# NFA_TECHNOLOGY_MASK_KOVIO 0x20
|
||||
# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40
|
||||
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80
|
||||
# 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_A_ACTIVE 0x40 /* NFC Technology A active mode */
|
||||
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */
|
||||
# This flag when set to zero will disable Reader mode.
|
||||
POLLING_TECH_MASK=0xEF
|
||||
|
||||
###############################################################################
|
||||
|
@ -169,48 +210,25 @@ POLLING_TECH_MASK=0xEF
|
|||
# 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_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE
|
||||
P2P_LISTEN_TECH_MASK=0xC4
|
||||
|
||||
###############################################################################
|
||||
# Maximum Number of Credits to be allowed by the NFCC
|
||||
# This value overrides what the NFCC specifices allowing the host to have
|
||||
# the control to work-around transport limitations. If this value does
|
||||
# not exist or is set to 0, the NFCC will provide the number of credits.
|
||||
MAX_RF_DATA_CREDITS=1
|
||||
|
||||
###############################################################################
|
||||
# This setting allows you to disable registering the T4t Virtual SE that causes
|
||||
# the NFCC to send PPSE requests to the DH.
|
||||
# The default setting is enabled (i.e. T4t Virtual SE is registered).
|
||||
#REGISTER_VIRTUAL_SE=1
|
||||
REGISTER_VIRTUAL_SE=0
|
||||
|
||||
###############################################################################
|
||||
# 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)
|
||||
# 3: FPM CE in snooze mode, Switch Off, Battery Off still available.
|
||||
SCREEN_OFF_POWER_STATE=3
|
||||
|
||||
###############################################################################
|
||||
# SPD Debug mode
|
||||
# If set to 1, any failure of downloading a patch will trigger a hard-stop
|
||||
#SPD_DEBUG=0
|
||||
|
||||
###############################################################################
|
||||
# SPD Max Retry Count
|
||||
# The number of attempts to download a patch before giving up (defualt is 3).
|
||||
# Note, this resets after a power-cycle.
|
||||
#SPD_MAX_RETRY_COUNT=3
|
||||
|
||||
###############################################################################
|
||||
# Patch RAM Version Checking
|
||||
# By default the stack will reject any attempt to download a patch where major
|
||||
# version is < the one that is in NVM. If this config item is set to 1 then
|
||||
# this version check is skipped.
|
||||
#
|
||||
#SPD_IGNORE_VERSION=0
|
||||
# Notable bits:
|
||||
# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */
|
||||
# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */
|
||||
# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */
|
||||
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */
|
||||
# This flag when set to zero will disable P2P Listen mode.
|
||||
P2P_LISTEN_TECH_MASK=0x05
|
||||
|
||||
###############################################################################
|
||||
# Firmware patch file
|
||||
# If the value is not set then patch download is disabled.
|
||||
#FW_PATCH="/system/etc/firmware/Signedrompatch.bin"
|
||||
|
||||
###############################################################################
|
||||
# Firmware patch file
|
||||
#FW_PRE_PATCH="/system/etc/firmware/Signedromprepatch.bin"
|
||||
#NVM_FILE_PATH="/system/etc/firmware/nfc_test.bin"
|
||||
#FUSED_NVM_FILE_PATH="/system/etc/firmware/fused_nvm.bin"
|
||||
|
||||
###############################################################################
|
||||
# transport driver
|
||||
|
@ -222,8 +240,8 @@ SCREEN_OFF_POWER_STATE=3
|
|||
# "/dev/bcmi2cnfc" (I2C)
|
||||
# "hwtun" (HW Tunnel)
|
||||
# "/dev/bcmspinfc" (SPI)
|
||||
# "/dev/btusb0" (BT USB)
|
||||
TRANSPORT_DRIVER="/dev/bcm2079x"
|
||||
# "/dev/btusb0" (BT USB)
|
||||
TRANSPORT_DRIVER="/dev/nfc-nci"
|
||||
|
||||
###############################################################################
|
||||
# power control driver
|
||||
|
@ -235,13 +253,9 @@ TRANSPORT_DRIVER="/dev/bcm2079x"
|
|||
# "/dev/nfcpower"
|
||||
# "/dev/bcmi2cnfc" (I2C)
|
||||
# "/dev/bcmspinfc" (SPI)
|
||||
# i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal
|
||||
POWER_CONTROL_DRIVER="/dev/bcm2079x"
|
||||
|
||||
###############################################################################
|
||||
# I2C transport driver options
|
||||
#
|
||||
BCMI2CNFC_ADDRESS=0
|
||||
# i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal
|
||||
# power control driver
|
||||
POWER_CONTROL_DRIVER="/dev/nfc-nci"
|
||||
|
||||
###############################################################################
|
||||
# I2C transport driver try to read multiple packets in read() if data is available
|
||||
|
@ -284,8 +298,71 @@ DEFAULT_ISODEP_ROUTE=0xF3
|
|||
# Configure the default "off-host" AID route. The default is 0xF4
|
||||
DEFAULT_OFFHOST_ROUTE=0xF4
|
||||
|
||||
POWER_SAVER_WORKAROUND_1=0xF3
|
||||
###############################################################################
|
||||
# Maximum Number of Credits to be allowed by the NFCC
|
||||
MAX_RF_DATA_CREDITS=1
|
||||
|
||||
PRESENCE_CHECK_ALGORITHM=1
|
||||
AID_MATCHING_MODE=2
|
||||
AUTO_ADJUST_ISO_BITRATE=1
|
||||
###############################################################################
|
||||
# This setting allows you to disable registering the T4t Virtual SE that causes
|
||||
# the NFCC to send PPSE requests to the DH.
|
||||
# The default setting is enabled (i.e. T4t Virtual SE is registered).
|
||||
#REGISTER_VIRTUAL_SE=1
|
||||
REGISTER_VIRTUAL_SE=0
|
||||
|
||||
###############################################################################
|
||||
# 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)
|
||||
# 3: FPM CE in snooze mode, Switch Off, Battery Off still available.
|
||||
SCREEN_OFF_POWER_STATE=1
|
||||
|
||||
###############################################################################
|
||||
# SPD Debug mode
|
||||
# If set to 1, any failure of downloading a patch will trigger a hard-stop
|
||||
#SPD_DEBUG=0
|
||||
|
||||
###############################################################################
|
||||
# SPD Max Retry Count
|
||||
# The number of attempts to download a patch before giving up (defualt is 3).
|
||||
# Note, this resets after a power-cycle.
|
||||
#SPD_MAX_RETRY_COUNT=3
|
||||
|
||||
###############################################################################
|
||||
# Patch RAM Version Checking
|
||||
# By default the stack will reject any attempt to download a patch where major
|
||||
# version is < the one that is in NVM. If this config item is set to 1 then
|
||||
# this version check is skipped.
|
||||
#
|
||||
#SPD_IGNORE_VERSION=0
|
||||
|
||||
###############################################################################
|
||||
#Patch and nvm update flags
|
||||
# These flags needs to be set to enable the patch update and nvm update mechanism
|
||||
# of middleware
|
||||
###############################################################################
|
||||
PATCH_UPDATE_ENABLE_FLAG=0x01
|
||||
NVM_UPDATE_ENABLE_FLAG=0x00
|
||||
FUSED_NVM_UPDATE_ENABLE_FLAG=0x00
|
||||
PM_ENABLE_FLAG=0x01
|
||||
|
||||
###############################################################################
|
||||
# Time out value for closing the connection opened for patch download
|
||||
###############################################################################
|
||||
PATCH_DNLD_NFC_HAL_CMD_TOUT=10000
|
||||
PATCH_VERSION=21
|
||||
|
||||
###############################################################################
|
||||
#Default listen mode routing table
|
||||
# This is the default listen mode routing configuration for NFCC.
|
||||
# Default is for ISO DEP and NFC DEP
|
||||
DEFAULT_LISTEN_MODE_ROUTING={00:02:0A:01:03:01:01:04:01:03:00:01:05}
|
||||
|
||||
###############################################################################
|
||||
# Override the stack default for NFA_EE_MAX_EE_SUPPORTED set in nfc_target.h.
|
||||
# The value is set to 3 by default as it assumes we will discover 0xF2,
|
||||
# 0xF3, and 0xF4. If a platform will exclude and SE, this value can be reduced
|
||||
# so that the stack will not wait any longer than necessary.
|
||||
#
|
||||
# For NXP PN7150 value must be fixed to 0x01
|
||||
#NFA_MAX_EE_SUPPORTED=0x01
|
|
@ -2,14 +2,13 @@
|
|||
## and NFC Service Java Native Interface Extensions (packages/apps/Nfc/nci/jni/extns/pn547)
|
||||
|
||||
###############################################################################
|
||||
# Application options
|
||||
# Logging Levels
|
||||
# NXPLOG_DEFAULT_LOGLEVEL 0x01
|
||||
# ANDROID_LOG_DEBUG 0x03
|
||||
# ANDROID_LOG_WARN 0x02
|
||||
# ANDROID_LOG_ERROR 0x01
|
||||
# ANDROID_LOG_SILENT 0x00
|
||||
#
|
||||
# Logging Levels. Suggested value for debugging is 0x03.
|
||||
# NXPLOG_EXTNS_LOGLEVEL - Configuration for extns logging level
|
||||
# NXPLOG_NCIX_LOGLEVEL - Configuration for enabling logging of NCI TX packets
|
||||
# NXPLOG_NCIR_LOGLEVEL - Configuration for enabling logging of NCI RX packets
|
||||
# NXPLOG_FWDNLD_LOGLEVEL - Configuration for enabling logging of FW download functionality
|
||||
# NXPLOG_TML_LOGLEVEL - Configuration for enabling logging of TML
|
||||
# NXPLOG_NCIHAL_LOGLEVEL - Configuration for enabling logging of HAL
|
||||
NXPLOG_EXTNS_LOGLEVEL=0x02
|
||||
NXPLOG_NCIHAL_LOGLEVEL=0x02
|
||||
NXPLOG_NCIX_LOGLEVEL=0x02
|
||||
|
@ -37,42 +36,44 @@ NXP_FW_NAME="libpn547_fw.so"
|
|||
|
||||
###############################################################################
|
||||
# System clock source selection configuration
|
||||
# CLK_SRC_XTAL - 0x01
|
||||
# CLK_SRC_PLL - 0x02
|
||||
#define CLK_SRC_XTAL 0x01
|
||||
#define CLK_SRC_PLL 0x02
|
||||
NXP_SYS_CLK_SRC_SEL=0x02
|
||||
|
||||
###############################################################################
|
||||
# System clock frequency selection configuration for PLL
|
||||
# CLK_FREQ_13MHZ - 0x01
|
||||
# CLK_FREQ_19_2MHZ - 0x02
|
||||
# CLK_FREQ_24MHZ - 0x03
|
||||
# CLK_FREQ_26MHZ - 0x04
|
||||
# CLK_FREQ_38_4MHZ - 0x05
|
||||
# CLK_FREQ_52MHZ - 0x06
|
||||
NXP_SYS_CLK_FREQ_SEL=0x02
|
||||
# System clock frequency selection configuration.
|
||||
# Only valid in case of PLL clock source.
|
||||
#define CLK_FREQ_13MHZ 1
|
||||
#define CLK_FREQ_19_2MHZ 2
|
||||
#define CLK_FREQ_24MHZ 3
|
||||
#define CLK_FREQ_26MHZ 4
|
||||
#define CLK_FREQ_38_4MHZ 5
|
||||
#define CLK_FREQ_52MHZ 6
|
||||
NXP_SYS_CLK_FREQ_SEL=0x02
|
||||
|
||||
###############################################################################
|
||||
# The timeout value to be used for clock request acknowledgment
|
||||
# min value = 0x01 to max = 0x0A
|
||||
###############################################################################
|
||||
# The timeout value to be used for clock request acknowledgment
|
||||
# min value = 0x01 to max = 0x1A
|
||||
# Only valid in case of PLL clock source.
|
||||
NXP_SYS_CLOCK_TO_CFG=0x0A
|
||||
|
||||
###############################################################################
|
||||
# NXP proprietary settings
|
||||
# NXP proprietary settings to enable NXP Proprietary features
|
||||
#
|
||||
# For NXP NFC Controller value must be fixed to {2F, 02, 00}
|
||||
NXP_ACT_PROP_EXTN={2F, 02, 00}
|
||||
|
||||
###############################################################################
|
||||
# NFC forum profile settings
|
||||
# NFC forum profile settings.
|
||||
# For more details refer to the POLL_PROFILE_SEL_ CFG parameter definition from NFC Controller User Manual
|
||||
NXP_NFC_PROFILE_EXTN={20, 02, 05, 01, A0, 44, 01, 00}
|
||||
|
||||
###############################################################################
|
||||
# Standby enable settings
|
||||
# 0x00 - Disabled
|
||||
# 0x01 - Enabled
|
||||
# Standby enable settings. (disable=2F 00 01 00, enable=2F 00 01 01)
|
||||
NXP_CORE_STANDBY={2F, 00, 01, 01}
|
||||
|
||||
|
||||
###############################################################################
|
||||
# NXP RF ALM (NO BOOSTER) configuration settings for FW VERSION = 08.01.1F
|
||||
# NXP RF ALM (NO BOOSTER) configuration settings for FW VERSION = 08.01.15
|
||||
###############################################################################
|
||||
# A0, 0D, 03, 00, 40, 02 RF_CLIF_BOOT CLIF_ANA_NFCLD_REG
|
||||
# A0, 0D, 03, 04, 43, 20 RF_CLIF_CFG_INITIATOR CLIF_ANA_PBF_CONTROL_REG
|
||||
|
@ -102,9 +103,8 @@ NXP_CORE_STANDBY={2F, 00, 01, 01}
|
|||
# A0, 0D, 03, 32, 15, 01 RF_CLIF_CFG_BR_106_I_TXA CLIF_TX_OVERSHOOT_CONFIG_REG
|
||||
# A0, 0D, 03, 32, 0D, 22 RF_CLIF_CFG_BR_106_I_TXA CLIF_TX_DATA_MOD_REG
|
||||
# A0, 0D, 03, 32, 14, 22 RF_CLIF_CFG_BR_106_I_TXA CLIF_TX_SYMBOL23_MOD_REG
|
||||
# A0, 0D, 06, 32, 4A, 30, 07, 01, 1F RF_CLIF_CFG_BR_106_I_TXA CLIF_ANA_TX_SHAPE_CONTROL_REG
|
||||
# A0, 0D, 06, 32, 4A, 30, 0F, 01, 1F RF_CLIF_CFG_BR_106_I_TXA CLIF_ANA_TX_SHAPE_CONTROL_REG
|
||||
# A0, 0D, 06, 34, 2D, 24, 77, 0C, 00 RF_CLIF_CFG_BR_106_I_RXA_P CLIF_SIGPRO_RM_CONFIG1_REG
|
||||
# A0, 0D, 06, 34, 34, 00, 00, E4, 03 RF_CLIF_CFG_BR_106_I_RXA_P CLIF_AGC_CONFIG1_REG
|
||||
# A0, 0D, 06, 34, 44, 21, 00, 02, 00 RF_CLIF_CFG_BR_106_I_RXA_P CLIF_ANA_RX_REG
|
||||
# A0, 0D, 06, 35, 44, 21, 00, 02, 00 RF_CLIF_CFG_BR_106_I_RXA_P CLIF_ANA_RX_REG
|
||||
# A0, 0D, 06, 38, 4A, 53, 07, 01, 1B RF_CLIF_CFG_BR_212_I_TXA CLIF_ANA_TX_SHAPE_CONTROL_REG
|
||||
|
@ -205,7 +205,7 @@ NXP_CORE_STANDBY={2F, 00, 01, 01}
|
|||
# A0, 0D, 03, 0A, 48, 10 RF_CLIF_CFG_I_ACTIVE CLIF_ANA_CLK_MAN_REG
|
||||
# A0, 0D, 06, 0A, 44, A3, 90, 03, 00 RF_CLIF_CFG_I_ACTIVE CLIF_ANA_RX_REG
|
||||
|
||||
# *** ALM(NO BOOSTER) FW VERSION = 08.01.1F ***
|
||||
# *** ALM(NO BOOSTER) FW VERSION = 08.01.15 ***
|
||||
NXP_RF_CONF_BLK_1={
|
||||
20, 02, F3, 20,
|
||||
A0, 0D, 03, 00, 40, 03,
|
||||
|
@ -236,15 +236,14 @@ NXP_RF_CONF_BLK_1={
|
|||
A0, 0D, 03, 32, 15, 01,
|
||||
A0, 0D, 03, 32, 0D, 22,
|
||||
A0, 0D, 03, 32, 14, 22,
|
||||
A0, 0D, 06, 32, 4A, 30, 07, 01, 1F,
|
||||
A0, 0D, 06, 32, 4A, 30, 0F, 01, 1F,
|
||||
A0, 0D, 06, 34, 2D, 24, 77, 0C, 00,
|
||||
A0, 0D, 06, 34, 34, 00, 00, E4, 03,
|
||||
A0, 0D, 06, 34, 44, 21, 00, 02, 00
|
||||
A0, 0D, 06, 34, 44, 21, 00, 02, 00,
|
||||
A0, 0D, 06, 35, 44, 21, 00, 02, 00
|
||||
}
|
||||
# *** ALM(NO BOOSTER) FW VERSION = 08.01.1F ***
|
||||
# *** ALM(NO BOOSTER) FW VERSION = 08.01.15 ***
|
||||
NXP_RF_CONF_BLK_2={
|
||||
20, 02, F4, 1F,
|
||||
A0, 0D, 06, 35, 44, 21, 00, 02, 00,
|
||||
A0, 0D, 06, 38, 4A, 53, 07, 01, 1B,
|
||||
A0, 0D, 06, 38, 42, 68, 10, FF, FF,
|
||||
A0, 0D, 03, 38, 16, 00,
|
||||
|
@ -274,12 +273,12 @@ NXP_RF_CONF_BLK_2={
|
|||
A0, 0D, 06, 48, 42, 88, 10, FF, FF,
|
||||
A0, 0D, 03, 48, 16, 00,
|
||||
A0, 0D, 03, 48, 15, 00,
|
||||
A0, 0D, 06, 4E, 44, 22, 00, 02, 00
|
||||
A0, 0D, 06, 4E, 44, 22, 00, 02, 00,
|
||||
A0, 0D, 06, 4E, 2D, 05, 37, 0C, 00
|
||||
}
|
||||
# *** ALM(NO BOOSTER) FW VERSION = 08.01.1F ***
|
||||
# *** ALM(NO BOOSTER) FW VERSION = 08.01.15 ***
|
||||
NXP_RF_CONF_BLK_3={
|
||||
20, 02, F7, 1E,
|
||||
A0, 0D, 06, 4E, 2D, 05, 37, 0C, 00,
|
||||
A0, 0D, 06, 4C, 4A, 33, 07, 01, 07,
|
||||
A0, 0D, 06, 4C, 42, 88, 10, FF, FF,
|
||||
A0, 0D, 03, 4C, 16, 00,
|
||||
|
@ -308,12 +307,12 @@ NXP_RF_CONF_BLK_3={
|
|||
A0, 0D, 06, 6C, 44, A3, 90, 03, 00,
|
||||
A0, 0D, 06, 6C, 30, CF, 00, 08, 00,
|
||||
A0, 0D, 06, 6C, 2F, 8F, 05, 80, 0C,
|
||||
A0, 0D, 06, 70, 2F, 8F, 05, 80, 12
|
||||
A0, 0D, 06, 70, 2F, 8F, 05, 80, 12,
|
||||
A0, 0D, 06, 70, 30, CF, 00, 08, 00
|
||||
}
|
||||
# *** ALM(NO BOOSTER) FW VERSION = 08.01.1F ***
|
||||
# *** ALM(NO BOOSTER) FW VERSION = 08.01.15 ***
|
||||
NXP_RF_CONF_BLK_4={
|
||||
20, 02, F7, 1E,
|
||||
A0, 0D, 06, 70, 30, CF, 00, 08, 00,
|
||||
A0, 0D, 06, 74, 2F, 8F, 05, 80, 12,
|
||||
A0, 0D, 06, 74, 30, DF, 00, 07, 00,
|
||||
A0, 0D, 06, 78, 2F, 1F, 06, 80, 01,
|
||||
|
@ -342,21 +341,8 @@ NXP_RF_CONF_BLK_4={
|
|||
A0, 0D, 06, 8C, 4A, 33, 07, 01, 07,
|
||||
A0, 0D, 03, 8C, 16, 00,
|
||||
A0, 0D, 03, 8C, 15, 00,
|
||||
A0, 0D, 06, 92, 42, 90, 10, FF, FF
|
||||
}
|
||||
# *** ALM(NO BOOSTER) FW VERSION = 08.01.1F ***
|
||||
NXP_RF_CONF_BLK_5={
|
||||
20, 02, 37, 07,
|
||||
A0, 0D, 06, 92, 4A, 31, 07, 01, 07,
|
||||
A0, 0D, 03, 92, 16, 00,
|
||||
A0, 0D, 03, 92, 15, 00,
|
||||
A0, 0D, 06, 0A, 30, CF, 00, 08, 00,
|
||||
A0, 0D, 06, 0A, 2F, 8F, 05, 80, 0C,
|
||||
A0, 0D, 03, 0A, 48, 10,
|
||||
A0, 0D, 06, 0A, 44, A3, 90, 03, 00
|
||||
}
|
||||
# *** ALM(NO BOOSTER) FW VERSION = 08.01.1F ***
|
||||
NXP_RF_CONF_BLK_6={
|
||||
A0, 0D, 06, 92, 42, 90, 10, FF, FF,
|
||||
A0, 0D, 06, 92, 4A, 31, 07, 01, 07
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
|
@ -431,7 +417,7 @@ NXP_CORE_CONF_EXTN={20, 02, 40, 0F,
|
|||
# 80 - Other Param.: RF_FIELD_INFO
|
||||
# 81 - Other Param.: RF_NFCEE_ACTION
|
||||
# 82 - Other Param.: NFCDEP_OP
|
||||
NXP_CORE_CONF={ 20, 02, 2E, 0E,
|
||||
NXP_CORE_CONF={ 20, 02, 2B, 0D,
|
||||
18, 01, 01,
|
||||
21, 01, 00,
|
||||
28, 01, 01,
|
||||
|
@ -440,14 +426,37 @@ NXP_CORE_CONF={ 20, 02, 2E, 0E,
|
|||
33, 04, 01, 02, 03, 04,
|
||||
50, 01, 02,
|
||||
54, 01, 06,
|
||||
5B, 01, 00,
|
||||
5B, 01, 02,
|
||||
60, 01, 0E,
|
||||
80, 01, 01,
|
||||
81, 01, 01,
|
||||
82, 01, 0E,
|
||||
3C, 01, 04
|
||||
82, 01, 0E
|
||||
}
|
||||
|
||||
###############################################################################
|
||||
# TVDD configurations settings
|
||||
# Allow NFCC to configure External TVDD
|
||||
# There are two possible configurations (0x01 or 0x02):
|
||||
# CFG1: Vbat is used to generate the VDD(TX) through TXLDO
|
||||
# CFG2: external 5V is used to generate the VDD(TX) through TXLDO
|
||||
NXP_EXT_TVDD_CFG=0x02
|
||||
|
||||
# CFG1: 3.3V for both Reader and Card modes
|
||||
NXP_EXT_TVDD_CFG_1={20, 02, 07, 01, A0, 0E, 03, 02, 09, 00}
|
||||
|
||||
# CFG2: VBAT2 to 5V and 4.7V for both Reader and Card modes
|
||||
NXP_EXT_TVDD_CFG_2={20, 02, 07, 01, A0, 0E, 03, 06, 64, 00}
|
||||
|
||||
###############################################################################
|
||||
## Set configuration optimization decision setting
|
||||
## Enable = 0x01
|
||||
## Disable = 0x00
|
||||
NXP_SET_CONFIG_ALWAYS=0x00
|
||||
|
||||
###############################################################################
|
||||
# To enable i2c fragmentation set i2c fragmentation enable 0x01 to disable set to 0x00
|
||||
NXP_I2C_FRAGMENTATION_ENABLED=0x00
|
||||
|
||||
###############################################################################
|
||||
# Mifare Classic Key settings
|
||||
#NXP_CORE_MFCKEY_SETTING={20, 02, 25,04, A0, 51, 06, A0, A1, A2, A3, A4, A5,
|
|
@ -15,11 +15,19 @@
|
|||
#
|
||||
|
||||
# NFC
|
||||
$(call inherit-product, device/samsung/klte-common/nfc/product.mk)
|
||||
$(call inherit-product, device/samsung/s3ve3g/nfc/product.mk)
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.nfc@1.0-impl
|
||||
android.hardware.nfc@1.0-impl \
|
||||
libpn547_fw \
|
||||
libpn547_fw_pku \
|
||||
libpn547_fw_platform \
|
||||
nfc_nci.pn54x
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/samsung/klte-common/nfc/s3fwrn5/libnfc-sec.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-brcm.conf \
|
||||
device/samsung/klte-common/nfc/s3fwrn5/libnfc-sec-hal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sec-nfc.conf
|
||||
device/samsung/s3ve3g/nfc/pn547/libnfc-brcm.conf:system/etc/libnfc-brcm.conf \
|
||||
device/samsung/s3ve3g/nfc/pn547/libnfc-nxp.conf:system/etc/libnfc-nxp.conf
|
||||
|
||||
PRODUCT_PROPERTY_OVERRIDES += \
|
||||
ro.hardware.nfc_nci=pn54x \
|
||||
ro.nfc.port=I2C
|
|
@ -27,3 +27,25 @@ LOCAL_MODULE_TAGS := optional
|
|||
LOCAL_PACK_MODULE_RELOCATIONS := false
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := libpn547_fw_pku.c
|
||||
LOCAL_MODULE := libpn547_fw_pku
|
||||
LOCAL_MODULE_OWNER := nxp
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_PACK_MODULE_RELOCATIONS := false
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_SRC_FILES := libpn547_fw_platform.c
|
||||
LOCAL_MODULE := libpn547_fw_platform
|
||||
LOCAL_MODULE_OWNER := nxp
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_PACK_MODULE_RELOCATIONS := false
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
2923
nfc/pn547/pn547/src/libpn547_fw.c
Normal file
2923
nfc/pn547/pn547/src/libpn547_fw.c
Normal file
File diff suppressed because it is too large
Load diff
2923
nfc/pn547/pn547/src/libpn547_fw_pku.c
Normal file
2923
nfc/pn547/pn547/src/libpn547_fw_pku.c
Normal file
File diff suppressed because it is too large
Load diff
33
nfc/pn547/pn547/src/libpn547_fw_platform.c
Normal file
33
nfc/pn547/pn547/src/libpn547_fw_platform.c
Normal file
|
@ -0,0 +1,33 @@
|
|||
const unsigned char gphDnldNfc_DlSequence[] = {
|
||||
0x00, 0xe4, 0xc0, 0x00, 0xfb, 0x03, 0x91, 0x9f, 0x0e, 0xc7, 0xd7, 0x1a,
|
||||
0x16, 0x81, 0x7e, 0x97, 0x9f, 0x69, 0x9a, 0x96, 0x06, 0x03, 0x7d, 0xa2,
|
||||
0x0f, 0x97, 0x36, 0xcc, 0xdc, 0x36, 0xe1, 0xbc, 0xa2, 0x9f, 0xb5, 0xb2,
|
||||
0x81, 0xcf, 0xb6, 0x59, 0x4b, 0xf3, 0x3e, 0xdc, 0x4e, 0xb5, 0x28, 0xdb,
|
||||
0xcc, 0x5e, 0x8a, 0xf8, 0xfd, 0xce, 0x14, 0xa4, 0xbe, 0xde, 0x5a, 0x59,
|
||||
0xeb, 0x54, 0x8c, 0x61, 0x91, 0x9f, 0xa1, 0x38, 0xd7, 0xff, 0x69, 0x20,
|
||||
0x29, 0x9a, 0x19, 0x31, 0x12, 0xdf, 0x49, 0xbf, 0x12, 0x71, 0x23, 0x0f,
|
||||
0x9d, 0x4b, 0xa3, 0x46, 0x54, 0x20, 0xd6, 0x4d, 0xf9, 0x27, 0x94, 0x6a,
|
||||
0x0d, 0x36, 0x15, 0x07, 0x43, 0x46, 0x14, 0x8c, 0x48, 0xd3, 0x68, 0xed,
|
||||
0x46, 0xf7, 0x2c, 0x17, 0x57, 0xf7, 0x3a, 0xb7, 0xfb, 0x19, 0x8d, 0x81,
|
||||
0xbf, 0xe8, 0x28, 0x76, 0x81, 0x55, 0xd5, 0xfc, 0x62, 0x39, 0x27, 0x9f,
|
||||
0x02, 0x3e, 0x74, 0x1e, 0xee, 0x91, 0x5f, 0x09, 0x36, 0x92, 0xf1, 0x47,
|
||||
0x69, 0x4d, 0x88, 0xe6, 0xb7, 0x21, 0x18, 0xf8, 0xc7, 0xe3, 0x4a, 0x3e,
|
||||
0x81, 0x30, 0x36, 0x7a, 0x34, 0xfc, 0x33, 0x1c, 0x84, 0x92, 0x97, 0x32,
|
||||
0x61, 0x22, 0x47, 0x9a, 0xcd, 0x75, 0x16, 0x31, 0x2b, 0x06, 0xf3, 0x01,
|
||||
0xbc, 0xb3, 0x43, 0x5a, 0x74, 0xc7, 0x7d, 0x85, 0x4c, 0x2e, 0x74, 0xa4,
|
||||
0xae, 0x9a, 0x8b, 0xb4, 0xfb, 0xd2, 0xb7, 0x26, 0x79, 0x58, 0xa0, 0x78,
|
||||
0x98, 0x48, 0xe7, 0xa2, 0x90, 0xd7, 0xf5, 0xb9, 0x74, 0x15, 0xde, 0x56,
|
||||
0xfa, 0x77, 0x37, 0x8d, 0x3b, 0xbf, 0xbe, 0xab, 0xbd, 0xdb, 0xb7, 0x5e,
|
||||
0x58, 0x55, 0x00, 0x42, 0xc0, 0x84, 0x11, 0x20, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xe8, 0xb1, 0xa2, 0x02, 0x90, 0x11,
|
||||
0xe1, 0x02, 0x90, 0xb1, 0xe3, 0x02, 0xe0, 0x21, 0xe1, 0x02, 0x38, 0x51,
|
||||
0xd3, 0x02, 0x58, 0xe1, 0xe0, 0x02, 0x08, 0xd1, 0xa1, 0x01, 0x08, 0x21,
|
||||
0xa1, 0x01, 0x90, 0xb1, 0xe3, 0x82, 0xe0, 0x21, 0xe1, 0x02, 0x08, 0xd1,
|
||||
0xa1, 0x81, 0x08, 0x21, 0xa1, 0x01, 0xcd, 0x67, 0x22, 0x01
|
||||
};
|
||||
|
||||
const unsigned char* gphDnldNfc_DlSeq = gphDnldNfc_DlSequence;
|
||||
|
||||
const unsigned char gphDnldNfc_DlSeqSz[] = {
|
||||
0x2a, 0x01,
|
||||
};
|
|
@ -15,13 +15,16 @@
|
|||
#
|
||||
|
||||
# NFC
|
||||
$(call inherit-product, device/samsung/klte-common/nfc/product.mk)
|
||||
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.nfc@1.0-impl \
|
||||
libpn547_fw \
|
||||
nfc_nci.msm8974
|
||||
com.android.nfc_extras \
|
||||
NfcNci \
|
||||
Tag
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/samsung/klte-common/nfc/pn547/libnfc-brcm.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-brcm.conf \
|
||||
device/samsung/klte-common/nfc/pn547/libnfc-nxp.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-nxp.conf
|
||||
device/samsung/s3ve3g/nfc/nfcee_access.xml:system/etc/nfcee_access.xml
|
||||
|
||||
# NFC Permissions
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
|
||||
frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
|
||||
frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.android.nfc_extras.xml
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -21,7 +21,7 @@ PRODUCT_PACKAGES += \
|
|||
Tag
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
device/samsung/klte-common/nfc/nfcee_access.xml:system/etc/nfcee_access.xml
|
||||
device/samsung/s3ve3g-common/nfc/nfcee_access.xml:system/etc/nfcee_access.xml
|
||||
|
||||
# NFC Permissions
|
||||
PRODUCT_COPY_FILES += \
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
############################
|
||||
## NFC device is going to sleep mode after SLEEP_TIMEOUT(ms) and the device needs
|
||||
## wakeup delay(ms) when it is going to wake up from sleep mode.
|
||||
SLEEP_TIMEOUT=1000
|
||||
WAKEUP_DELAY=80
|
||||
|
||||
############################
|
||||
## Pathes
|
||||
## F/W image
|
||||
FW_IMAGE="/vendor/firmware/sec_s3fwrn5_firmware.bin"
|
||||
#FW_IMAGE="/vendor/firmware/sec_s3frrn3_firmware.bin"
|
||||
## Reg file
|
||||
RFREG_FILE="/vendor/firmware/sec_s3fwrn5_rfreg.bin"
|
||||
## Power driver
|
||||
POWER_DRIVER="/dev/sec-nfc"
|
||||
## Transport driver
|
||||
TRANS_DRIVER="/dev/sec-nfc"
|
||||
#TRANS_DRIVER="/dev/ttySAC0"
|
||||
|
||||
############################
|
||||
## TRACE_LEVEL (0: only err, 1: and debug, 2: trace also)
|
||||
## DATA TRACE level (0: not display, 1: simply, 2: all of data trace)
|
||||
TRACE_LEVEL=2
|
||||
DATA_TRACE=2
|
||||
|
||||
############################
|
||||
## force F/W download
|
||||
FW_UPDATE_MODE=0
|
||||
|
||||
FW_CFG_CLK_TYPE=0x10
|
||||
FW_CFG_CLK_SPEED=0x01
|
||||
FW_CFG_CLK_REQ=0x01
|
||||
|
||||
############################
|
||||
## RF register
|
||||
## RF register ID1 Card mode
|
||||
# RF_REG1=0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x22 0xB8 0x30 0x72 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x21 0x38 0x30 0x72 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x21 0x38 0x30 0x6A 0xD8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x20 0x78 0x30 0x6A 0xD8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x22 0xB8 0x30 0x50 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x21 0x38 0x30 0x50 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x21 0x38 0x30 0x38 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x21 0x38 0x30 0xCA 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x21 0x38 0x24 0x38 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x21 0x38 0x24 0x0A 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x22 0xB8 0x30 0x50 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x20 0x22 0xB8 0x30 0x50 0xC8
|
||||
### RF register ID2 Reader mode
|
||||
#RF_REG2=0xD0 0xD0 0xBB 0x00 0x26 0x5E 0xD8 0x00 0xFE 0xCB 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xC0 0xC0 0xB0 0x03 0xE8 0x59 0x00 0x00 0xFE 0xCF 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xC0 0xC0 0xB0 0x03 0xE8 0x59 0x00 0x00 0xFE 0xCF 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xC0 0xC0 0xB0 0x03 0xE8 0x59 0x00 0x00 0xFE 0xCF 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xD8 0xD8 0xBB 0xE0 0x06 0x5E 0xD8 0x00 0xFE 0xCF 0x00 0x1D 0x30 0x00 0x27 \
|
||||
# 0xC0 0xC0 0xB0 0x03 0xE8 0x59 0x00 0xAE 0x51 0x4B 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xC0 0xC0 0xB0 0x03 0xE8 0x59 0x00 0xAE 0x51 0x4F 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xC0 0xC0 0xB0 0x03 0xE8 0x59 0x00 0xAE 0x51 0x4F 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xC0 0xC0 0xB0 0x03 0xE8 0x59 0x00 0xAE 0x51 0x4F 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xC0 0xC0 0xB0 0xE3 0xC4 0xDF 0x00 0xAE 0x51 0x4B 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xC0 0xC0 0xB0 0x03 0xE8 0x59 0x00 0xAE 0x51 0x4B 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xD8 0xD8 0xBB 0x00 0x24 0x88 0xD8 0x00 0xFE 0xCB 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0xE8 0xE8 0xBB 0x00 0x24 0x28 0xD8 0x00 0xFE 0xCB 0x00 0x1D 0xF0 0x00 0x27 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xFE 0xCB 0x21 0x38 0x30 0x72 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xAE 0x51 0x4B 0x21 0x38 0x38 0xB4 0xC8 \
|
||||
# 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xAE 0x51 0x4B 0x21 0x38 0x38 0xB4 0xC8
|
|
@ -1,281 +0,0 @@
|
|||
###############################################################################
|
||||
# Application options
|
||||
APPL_TRACE_LEVEL=0xFF
|
||||
PROTOCOL_TRACE_LEVEL=0xFFFFFFFF
|
||||
|
||||
PRESERVE_STORAGE=1
|
||||
|
||||
###############################################################################
|
||||
# RF register
|
||||
RF_REG_DATA1={00:00:00:00:00:00:00:00:00:00:21:38:30:30:C8:00:00:00:00:00:00:00:00:00:20:21:38:30:30:C8:00:00:00:00:00:00:00:00:00:20:21:38:30:6A:D8:00:00:00:00:00:00:00:00:00:20:20:78:30:6A:D8:00:00:00:00:00:00:00:00:00:00:21:38:30:30:C8:00:00:00:00:00:00:00:00:00:20:21:38:30:30:C8:00:00:00:00:00:00:00:00:00:20:21:78:30:CA:D8:00:00:00:00:00:00:00:00:00:20:21:38:30:CA:D8:00:00:00:00:00:00:00:00:00:20:21:38:30:30:C8:00:00:00:00:00:00:00:00:00:20:21:38:30:30:C8:00:00:00:00:00:00:00:00:00:00:21:38:30:38:C8:00:00:00:00:00:00:00:00:00:00:21:38:30:30:C8}
|
||||
RF_REG_DATA2={D0:D0:B3:E0:06:68:D8:00:FE:CB:00:1D:20:00:27:D8:D8:B3:E0:26:2E:D8:00:FE:CB:00:1D:20:00:27:D8:D8:B3:E0:26:2E:D8:00:FE:CB:00:1D:20:00:27:D8:D8:B3:E0:26:2E:D8:00:FE:CB:00:1D:20:00:27:D8:D8:B3:E0:26:5E:D8:00:FE:CF:00:1D:20:00:27:D0:D0:B0:E3:E8:69:00:AE:51:4B:00:1D:20:00:27:C0:C0:B0:E3:E8:59:00:AE:51:4F:00:1D:20:00:27:C0:C0:B0:E3:E8:59:00:AE:51:4F:00:1D:20:00:27:C0:C0:B0:E3:E8:59:00:AE:51:4F:00:1D:20:00:27:C0:C0:B0:E3:E8:DF:00:AE:51:4B:00:1D:20:00:27:C0:C0:B0:E3:E8:59:00:AE:51:4B:00:1D:20:00:27:D0:D0:B3:E0:06:68:D8:00:FE:CB:00:1D:20:00:27:D8:D8:B3:E0:06:68:D8:00:FE:CB:00:1D:20:00:27:00:00:00:00:00:00:00:00:FE:CB:21:38:70:30:C8:00:00:00:00:00:00:00:AE:51:4B:21:38:70:30:C8:00:00:00:00:00:00:00:AE:51:4B:21:38:70:30:C8}
|
||||
|
||||
###############################################################################
|
||||
# File used for NFA storage
|
||||
NFA_STORAGE="/data/nfc"
|
||||
|
||||
###############################################################################
|
||||
# Insert a delay in milliseconds after NFC_WAKE and before write to NFCC
|
||||
NFC_WAKE_DELAY=20
|
||||
|
||||
###############################################################################
|
||||
# Various Delay settings (in ms) used in USERIAL
|
||||
# POWER_ON_DELAY
|
||||
# Delay after turning on chip, before writing to transport (default 300)
|
||||
# PRE_POWER_OFF_DELAY
|
||||
# Delay after deasserting NFC-Wake before turn off chip (default 0)
|
||||
# POST_POWER_OFF_DELAY
|
||||
# Delay after turning off chip, before USERIAL_close returns (default 0)
|
||||
# CE3_PRE_POWER_OFF_DELAY
|
||||
# Delay after deasserting NFC-Wake before turn off chip (default 1000)
|
||||
# when going to CE3 Switch Off mode
|
||||
#
|
||||
#POWER_ON_DELAY=300
|
||||
PRE_POWER_OFF_DELAY=1500
|
||||
#POST_POWER_OFF_DELAY=0
|
||||
#CE3_PRE_POWER_OFF_DELAY=1000
|
||||
|
||||
|
||||
###############################################################################
|
||||
# Device Manager Config
|
||||
#
|
||||
# If NFA_DM_CFG is not provided, stack default settings are
|
||||
# used (see nfa_dm_cfg.c). They are as follows:
|
||||
# 0 (FALSE) Automatic NDEF detection when background polling
|
||||
# 0 (FALSE) Automatic NDEF read when background polling
|
||||
#
|
||||
#NFA_DM_CFG={00:00}
|
||||
|
||||
###############################################################################
|
||||
# Default poll duration (in ms)
|
||||
# The defualt is 500ms if not set (see nfc_target.h) same as M project
|
||||
NFA_DM_DISC_DURATION_POLL=500
|
||||
|
||||
###############################################################################
|
||||
# Startup Configuration (100 bytes maximum)
|
||||
#
|
||||
# For the 0xC2 parameter, set byte[0] to 60 to disable UICC Idle Timeout.
|
||||
# set to 61 to enable (The least significant bit of this byte enables
|
||||
# the power off when Idle mode).
|
||||
# 20 A1 07 00 == > These 4 bytes form a 4 byte value which decides the idle timeout(in us)
|
||||
# value to trigger the uicc deactivation.
|
||||
# NFC forum conformance
|
||||
#NFA_DM_START_UP_CFG={27:B2:04:E8:03:00:00:CF:02:02:08:CB:01:01:A5:01:01:CA:0A:00:00:00:00:06:F0:55:00:00:0F:80:01:01:B5:03:01:03:09:5B:01:02}
|
||||
# GCF combined + clfCfgTagPicc
|
||||
NFA_DM_START_UP_CFG={48:CB:01:09:A5:01:01:CA:14:00:00:00:00:06:0C:D4:01:00:15:C0:E1:E4:00:C0:C6:2D:00:14:00:B5:03:01:03:FF:C2:08:61:00:82:04:80:C3:C9:01:80:01:01:C9:03:03:0F:AB:5B:01:02:B2:04:E8:03:00:00:CF:02:02:08:B1:06:00:20:00:00:00:12}
|
||||
|
||||
###############################################################################
|
||||
# Startup Vendor Specific Configuration (100 bytes maximum);
|
||||
# byte[0] TLV total len = 0x5
|
||||
# byte[1] NCI_MTS_CMD|NCI_GID_PROP = 0x2f
|
||||
# byte[2] NCI_MSG_FRAME_LOG = 0x9
|
||||
# byte[3] 2
|
||||
# byte[4] 0=turn off RF frame logging; 1=turn on
|
||||
# byte[5] 0=turn off SWP frame logging; 1=turn on
|
||||
# NFA_DM_START_UP_VSC_CFG={05:2F:09:02:01:01}
|
||||
|
||||
#HW FSM
|
||||
#NFA_DM_START_UP_VSC_CFG={04:2F:06:01:00}
|
||||
|
||||
###############################################################################
|
||||
# Antenna Configuration - This data is used when setting 0xC8 config item
|
||||
# at startup (before discovery is started). If not used, no value is sent.
|
||||
#
|
||||
# The settings for this value are documented here:
|
||||
# http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
|
||||
# Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
|
||||
# This document is maintained by Paul Forshaw.
|
||||
#
|
||||
# The values marked as ?? should be tweaked per antenna or customer/app:
|
||||
# {20:C8:1E:06:??:00:??:??:??:00:??:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:??:01:00:00:40:04}
|
||||
# array[0] = 0x20 is length of the payload from array[1] to the end
|
||||
# array[1] = 0xC8 is PREINIT_DSP_CFG
|
||||
PREINIT_DSP_CFG={20:C8:1E:06:1F:00:0A:03:30:00:04:24:00:1C:00:75:00:77:00:76:00:1C:00:03:00:0A:00:4E:01:00:00:40:04}
|
||||
|
||||
###############################################################################
|
||||
# Configure crystal frequency when internal LPO can't detect the frequency.
|
||||
#XTAL_FREQUENCY=0
|
||||
|
||||
###############################################################################
|
||||
# Use Nexus S NXP RC work to allow our stack/firmware to work with a retail
|
||||
# Nexus S that causes IOP issues. Note, this will not pass conformance and
|
||||
# should be removed for production.
|
||||
#USE_NXP_P2P_RC_WORKAROUND=1
|
||||
|
||||
###############################################################################
|
||||
# Configure the default Destination Gate used by HCI (the default is 4, which
|
||||
# is the ETSI loopback gate.
|
||||
#NFA_HCI_DEFAULT_DEST_GATE=0x04
|
||||
|
||||
###############################################################################
|
||||
# Configure the single default SE to use. The default is to use the first
|
||||
# SE that is detected by the stack. This value might be used when the phone
|
||||
# supports multiple SE (e.g. 0xF3 and 0xF4) but you want to force it to use
|
||||
# one of them (e.g. 0xF4).
|
||||
ACTIVE_SE=0x02
|
||||
|
||||
###############################################################################
|
||||
# Configure the NFC Extras to open and use a static pipe. If the value is
|
||||
# not set or set to 0, then the default is use a dynamic pipe based on a
|
||||
# destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value
|
||||
# for each UICC (where F3="UICC0" and F4="UICC1")
|
||||
NFA_HCI_STATIC_PIPE_ID_F3=0x71
|
||||
NFA_HCI_STATIC_PIPE_ID_F4=0x71
|
||||
|
||||
###############################################################################
|
||||
# When disconnecting from Oberthur secure element, perform a warm-reset of
|
||||
# the secure element to deselect the applet.
|
||||
# The default hex value of the command is 0x3. If this variable is undefined,
|
||||
# then this feature is not used.
|
||||
OBERTHUR_WARM_RESET_COMMAND=0x03
|
||||
|
||||
###############################################################################
|
||||
# Force UICC to only listen to 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.
|
||||
#UICC_LISTEN_TECH_MASK=0x03
|
||||
|
||||
###############################################################################
|
||||
# AID for Empty Select command
|
||||
# If specified, this AID will be substituted when an Empty SELECT command is
|
||||
# detected. The first byte is the length of the AID. Maximum length is 16.
|
||||
AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00}
|
||||
|
||||
###############################################################################
|
||||
# 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_A_ACTIVE |
|
||||
# NFA_TECHNOLOGY_MASK_F_ACTIVE.
|
||||
#
|
||||
# Notable bits:
|
||||
# NFA_TECHNOLOGY_MASK_A 0x01
|
||||
# NFA_TECHNOLOGY_MASK_B 0x02
|
||||
# NFA_TECHNOLOGY_MASK_F 0x04
|
||||
# NFA_TECHNOLOGY_MASK_ISO15693 0x08
|
||||
# NFA_TECHNOLOGY_MASK_B_PRIME 0x10
|
||||
# NFA_TECHNOLOGY_MASK_KOVIO 0x20
|
||||
# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40
|
||||
# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80
|
||||
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_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE
|
||||
P2P_LISTEN_TECH_MASK=0xC4
|
||||
|
||||
###############################################################################
|
||||
# Maximum Number of Credits to be allowed by the NFCC
|
||||
# This value overrides what the NFCC specifices allowing the host to have
|
||||
# the control to work-around transport limitations. If this value does
|
||||
# not exist or is set to 0, the NFCC will provide the number of credits.
|
||||
MAX_RF_DATA_CREDITS=1
|
||||
|
||||
###############################################################################
|
||||
# This setting allows you to disable registering the T4t Virtual SE that causes
|
||||
# the NFCC to send PPSE requests to the DH.
|
||||
# The default setting is enabled (i.e. T4t Virtual SE is registered).
|
||||
#REGISTER_VIRTUAL_SE=1
|
||||
REGISTER_VIRTUAL_SE=0
|
||||
|
||||
###############################################################################
|
||||
# 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)
|
||||
# 3: FPM CE in snooze mode, Switch Off, Battery Off still available.
|
||||
SCREEN_OFF_POWER_STATE=3
|
||||
|
||||
###############################################################################
|
||||
# Firmware patch file
|
||||
# If the value is not set then patch download is disabled.
|
||||
FW_PATCH="/vendor/firmware/sec_s3fnrn3_firmware.bin"
|
||||
|
||||
###############################################################################
|
||||
# SPD Debug mode
|
||||
# If set to 1, any failure of downloading a patch will trigger a hard-stop
|
||||
#SPD_DEBUG=0
|
||||
|
||||
###############################################################################
|
||||
# SPD Max Retry Count
|
||||
# The number of attempts to download a patch before giving up (defualt is 3).
|
||||
# Note, this resets after a power-cycle.
|
||||
#SPD_MAX_RETRY_COUNT=3
|
||||
|
||||
###############################################################################
|
||||
# Patch RAM Version Checking
|
||||
# By default the stack will reject any attempt to download a patch where major
|
||||
# version is < the one that is in NVM. If this config item is set to 1 then
|
||||
# this version check is skipped.
|
||||
#
|
||||
#SPD_IGNORE_VERSION=0
|
||||
|
||||
###############################################################################
|
||||
# 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"
|
||||
|
||||
###############################################################################
|
||||
# power control driver
|
||||
# Specify a kernel driver that support ioctl commands to control NFC_EN and
|
||||
# NFC_WAKE gpio signals.
|
||||
#
|
||||
# POWER_CONTRL_DRIVER=<driver>
|
||||
# where <driver> can be, for example:
|
||||
# "/dev/nfcpower"
|
||||
# "/dev/bcmi2cnfc" (I2C)
|
||||
# "/dev/bcmspinfc" (SPI)
|
||||
# i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal
|
||||
POWER_CONTROL_DRIVER="/dev/sec-nfc"
|
||||
|
||||
###############################################################################
|
||||
# I2C transport driver try to read multiple packets in read() if data is available
|
||||
# remove the comment below to enable this feature
|
||||
#READ_MULTIPLE_PACKETS=1
|
||||
|
||||
###############################################################################
|
||||
# SPI transport driver options
|
||||
#SPI_NEGOTIATION={0A:F0:00:01:00:00:00:FF:FF:00:00}
|
||||
|
||||
###############################################################################
|
||||
# UART transport driver options
|
||||
#
|
||||
# PORT=1,2,3,...
|
||||
# BAUD=115200, 19200, 9600, 4800,
|
||||
# DATABITS=8, 7, 6, 5
|
||||
# PARITY="even" | "odd" | "none"
|
||||
# STOPBITS="0" | "1" | "1.5" | "2"
|
||||
|
||||
#UART_PORT=2
|
||||
#UART_BAUD=115200
|
||||
#UART_DATABITS=8
|
||||
#UART_PARITY="none"
|
||||
#UART_STOPBITS="1"
|
||||
|
||||
###############################################################################
|
||||
# Insert a delay in microseconds per byte after a write to NFCC.
|
||||
# after writing a block of data to the NFCC, delay this an amopunt of time before
|
||||
# writing next block of data. the delay is calculated as below
|
||||
# NFC_WRITE_DELAY * (number of byte written) / 1000 milliseconds
|
||||
# e.g. after 259 bytes is written, delay (259 * 20 / 1000) 5 ms before next write
|
||||
NFC_WRITE_DELAY=20
|
||||
|
||||
###############################################################################
|
||||
# Configure the default NfcA/IsoDep techology and protocol route. Can be
|
||||
# either a secure element (e.g. 0xF4) or the host (0x00)
|
||||
DEFAULT_ISODEP_ROUTE=0x02
|
||||
|
||||
###############################################################################
|
||||
# NCI Hal Module name
|
||||
NCI_HAL_MODULE="nfc_nci"
|
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2011, The Android Open Source Project
|
||||
Copyright 2017-2018, 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.
|
||||
-->
|
||||
|
||||
<!-- These resources are around just to allow their values to be customized
|
||||
for different hardware and product builds. -->
|
||||
<resources>
|
||||
|
||||
<!-- Certain sensor firmwares break with having a batch
|
||||
size set. By setting this to false, devices can opt
|
||||
out of setting a batch size, which fixes rotation. -->
|
||||
<bool name="config_useDefaultBatchingForAccel">false</bool>
|
||||
|
||||
</resources>
|
|
@ -46,7 +46,7 @@
|
|||
64 - Volume rocker
|
||||
For example, a device with Home, Back and Menu keys would set this
|
||||
config to 7. -->
|
||||
<integer name="config_deviceHardwareKeys">83</integer>
|
||||
<integer name="config_deviceHardwareKeys">71</integer>
|
||||
|
||||
<!-- Hardware keys present on the device with the ability to wake, stored as a bit field.
|
||||
This integer should equal the sum of the corresponding value for each
|
||||
|
|
|
@ -228,7 +228,7 @@
|
|||
</integer-array>
|
||||
|
||||
<!-- Indicate whether the SD card is accessible without removing the battery. -->
|
||||
<bool name="config_batterySdCardAccessibility">true</bool>
|
||||
<bool name="config_batterySdCardAccessibility">false</bool>
|
||||
|
||||
<!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
|
||||
<bool name="config_intrusiveNotificationLed">true</bool>
|
||||
|
@ -243,7 +243,7 @@
|
|||
This needs to match the constants in
|
||||
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
||||
-->
|
||||
<integer name="config_longPressOnHomeBehavior">3</integer>
|
||||
<integer name="config_longPressOnHomeBehavior">2</integer>
|
||||
|
||||
<bool name="config_enableWifiDisplay">true</bool>
|
||||
|
||||
|
@ -271,6 +271,6 @@
|
|||
0 - No change. Use the default autodetection behavior.
|
||||
1 - The device DOES have a permanent menu key; ignore autodetection.
|
||||
2 - The device DOES NOT have a permanent menu key; ignore autodetection. -->
|
||||
<integer name="config_overrideHasPermanentMenuKey">2</integer>
|
||||
<integer name="config_overrideHasPermanentMenuKey">1</integer>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -1,58 +1,38 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<device name="Android">
|
||||
<item name="none">0</item>
|
||||
<item name="screen.on">65</item>
|
||||
<item name="screen.full">202</item>
|
||||
<item name="bluetooth.active">87</item>
|
||||
<item name="bluetooth.on">1</item>
|
||||
<item name="wifi.on">3</item>
|
||||
<item name="wifi.active">240</item>
|
||||
<item name="wifi.scan">129</item>
|
||||
<item name="dsp.audio">29</item>
|
||||
<item name="dsp.video">215</item>
|
||||
<item name="radio.active">125</item>
|
||||
<item name="radio.scanning">25</item>
|
||||
<item name="screen.on">71</item>
|
||||
<item name="screen.full">380</item>
|
||||
<item name="bluetooth.active">17</item>
|
||||
<item name="bluetooth.on">0.3</item>
|
||||
<item name="wifi.on">0.3</item>
|
||||
<item name="wifi.active">96</item>
|
||||
<item name="wifi.scan">70</item>
|
||||
<item name="dsp.audio">44</item>
|
||||
<item name="dsp.video">280</item>
|
||||
<item name="radio.active">250</item>
|
||||
<item name="radio.scanning">82</item>
|
||||
<item name="gps.on">1</item>
|
||||
<array name="radio.on">
|
||||
<value>4.5</value>
|
||||
<value>4.5</value>
|
||||
<value>3.4</value>
|
||||
<value>3.4</value>
|
||||
</array>
|
||||
<array name="cpu.speeds">
|
||||
<value>2457600</value>
|
||||
<value>2265600</value>
|
||||
<value>1958400</value>
|
||||
<value>1728000</value>
|
||||
<value>1574400</value>
|
||||
<value>1497600</value>
|
||||
<value>1267200</value>
|
||||
<value>1190400</value>
|
||||
<value>1036800</value>
|
||||
<value>960000</value>
|
||||
<value>883200</value>
|
||||
<value>729600</value>
|
||||
<value>652800</value>
|
||||
<value>422400</value>
|
||||
<value>300000</value>
|
||||
<value>12000000</value>
|
||||
<value>10000000</value>
|
||||
<value>800000</value>
|
||||
<value>500000</value>
|
||||
<value>200000</value>
|
||||
</array>
|
||||
<item name="cpu.idle">3.1</item>
|
||||
<item name="cpu.idle">4</item>
|
||||
<array name="cpu.active">
|
||||
<value>348</value>
|
||||
<value>313</value>
|
||||
<value>265</value>
|
||||
<value>232</value>
|
||||
<value>213</value>
|
||||
<value>203</value>
|
||||
<value>176</value>
|
||||
<value>132</value>
|
||||
<value>122</value>
|
||||
<value>114</value>
|
||||
<value>97</value>
|
||||
<value>92</value>
|
||||
<value>84</value>
|
||||
<value>74</value>
|
||||
<value>56</value>
|
||||
<value>577</value>
|
||||
<value>408</value>
|
||||
<value>249</value>
|
||||
<value>148</value>
|
||||
<value>55</value>
|
||||
</array>
|
||||
<item name="battery.capacity">2800</item>
|
||||
<item name="battery.capacity">2100</item>
|
||||
<array name="wifi.batchedscan">
|
||||
<value>.0002</value>
|
||||
<value>.002</value>
|
||||
|
@ -60,4 +40,4 @@
|
|||
<value>.2</value>
|
||||
<value>2</value>
|
||||
</array>
|
||||
</device>
|
||||
</device>
|
||||
|
|
|
@ -21,12 +21,4 @@
|
|||
|
||||
<!-- Volume Rocker Wake -->
|
||||
<bool name="config_show_volumeRockerWake">true</bool>
|
||||
|
||||
<!-- Defines the location of the fingerprint sensor on the device
|
||||
0 = back
|
||||
1 = front
|
||||
2 = left side
|
||||
3 = right side
|
||||
-->
|
||||
<integer name="config_fingerprintSensorLocation">1</integer>
|
||||
</resources>
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2016 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>
|
||||
<!-- Fingerprint sensor location -->
|
||||
<dimen name="fingerprint_dot_radius">5dp</dimen>
|
||||
<item name="fingerprint_sensor_location_fraction_y" type="fraction">94.68%</item>
|
||||
</resources>
|
|
@ -15,12 +15,11 @@
|
|||
<!-- Camera app resources that may need to be customized
|
||||
for different hardware or product builds. -->
|
||||
<resources>
|
||||
|
||||
<!-- Restart preview for back camera onPictureTaken -->
|
||||
<bool name="back_camera_restart_preview_onPictureTaken">true</bool>
|
||||
|
||||
<!-- QC-denoise -->
|
||||
<string name="pref_camera_denoise_default" translatable="false">denoise-on</string>
|
||||
<!-- Restart preview for front camera onPictureTaken -->
|
||||
<bool name="front_camera_restart_preview_onPictureTaken">true</bool>
|
||||
|
||||
<!-- ISO values use numbers. Example: 50 instead of ISO50 -->
|
||||
<bool name="iso_values_use_numbers">true</bool>
|
||||
</resources>
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (c) 2018 The LineageOS Project
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
-->
|
||||
<resources>
|
||||
|
||||
<!-- ISO entry values. Do not translate. -->
|
||||
<string name="pref_camera_iso_value_auto" translatable="false">auto</string>
|
||||
<string name="pref_camera_iso_value_isodeblur" translatable="false">ISO_HJR</string>
|
||||
<string name="pref_camera_iso_value_iso100" translatable="false">100</string>
|
||||
<string name="pref_camera_iso_value_iso200" translatable="false">200</string>
|
||||
<string name="pref_camera_iso_value_iso400" translatable="false">400</string>
|
||||
<string name="pref_camera_iso_value_iso800" translatable="false">800</string>
|
||||
<string name="pref_camera_iso_value_iso1600" translatable="false">1600</string>
|
||||
|
||||
</resources>
|
|
@ -21,5 +21,5 @@
|
|||
<bool name="has_in_call_noise_suppression">true</bool>
|
||||
|
||||
<!-- Show enabled lte option for lte device -->
|
||||
<bool name="config_enabled_lte" translatable="false">true</bool>
|
||||
<bool name="config_enabled_lte" translatable="false">false</bool>
|
||||
</resources>
|
||||
|
|
|
@ -55,4 +55,4 @@ void power_set_interactive_ext(int on) {
|
|||
|
||||
void cm_power_set_interactive_ext(int on) {
|
||||
power_set_interactive_ext(on);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
LOCAL_PATH:= $(call my-dir)
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# Init
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := fstab.qcom
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
|
@ -10,25 +11,9 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
|||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.rc
|
||||
LOCAL_MODULE := init.target.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := init.qcom.usb.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/init.qcom.usb.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := ueventd.qcom.rc
|
||||
LOCAL_MODULE_TAGS := optional eng
|
||||
LOCAL_MODULE_CLASS := ETC
|
||||
LOCAL_SRC_FILES := etc/ueventd.qcom.rc
|
||||
LOCAL_SRC_FILES := etc/init.target.rc
|
||||
LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
|
|
@ -1,26 +1,23 @@
|
|||
# Android fstab file.
|
||||
# The filesystem that contains the filesystem e2fsck binary (typically /system) cannot
|
||||
# specify 'check', and must come before any filesystems that do specify 'check'
|
||||
#
|
||||
# NOTE: /system partition is now early-mounted and the fstab entry is explicitly
|
||||
# specified for recovery-mount only:
|
||||
#
|
||||
# The filesystem that contains the filesystem checker binary (typically /system) cannot
|
||||
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
|
||||
|
||||
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
|
||||
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,errors=panic wait,recoveryonly
|
||||
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1,errors=panic wait
|
||||
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs nosuid,nodev,noatime,rw,inline_xattr wait,check,formattable,encryptable=footer,length=-16384
|
||||
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 nosuid,nodev,noatime,noauto_da_alloc,errors=continue,commit=20 wait,check,formattable,encryptable=footer,length=-16384
|
||||
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 nosuid,nodev,noatime,noauto_da_alloc,errors=continue,commit=20 wait,check,formattable,encryptable=footer,length=-16384
|
||||
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs nosuid,nodev,noatime,rw,inline_xattr wait,check,formattable
|
||||
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,errors=continue,commit=20 wait,check,formattable
|
||||
/dev/block/platform/msm_sdcc.1/by-name/apnhlos /firmware sdfat ro,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
|
||||
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware-modem sdfat ro,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
|
||||
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,errors=continue,commit=20 wait,check,formattable
|
||||
/dev/block/platform/msm_sdcc.1/by-name/apnhlos /firmware sdfat ro,shortname=lower,uid=1000,gid=1026,dmask=222,fmask=333,context=u:object_r:firmware_file:s0 wait
|
||||
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware-modem sdfat ro,shortname=lower,uid=1000,gid=1026,dmask=227,fmask=337,context=u:object_r:firmware_file:s0 wait
|
||||
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 nosuid,nodev,noatime,noauto_da_alloc,journal_async_commit,errors=panic wait,check
|
||||
/dev/block/platform/msm_sdcc.1/by-name/efs /efs ext4 nosuid,nodev,noatime,noauto_da_alloc,journal_async_commit,errors=panic wait,check
|
||||
/dev/block/platform/msm_sdcc.1/by-name/fota /misc emmc defaults defaults
|
||||
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults defaults
|
||||
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults defaults
|
||||
|
||||
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
|
||||
/dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults recoveryonly
|
||||
|
||||
/devices/msm_sdcc.3/mmc_host/mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
|
||||
# Vold managed volumes
|
||||
/devices/msm_sdcc.2/mmc_host/mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
|
||||
/devices/platform/msm_hsusb_host/usb* auto auto defaults voldmanaged=usb:auto
|
||||
|
||||
# Zram
|
||||
/dev/block/zram0 none swap defaults zramsize=25%,max_comp_streams=4,swapprio=10,notrim
|
||||
|
||||
/devices/platform/xhci-hcd* auto auto defaults voldmanaged=usb:auto
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,906 +0,0 @@
|
|||
# Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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.
|
||||
#
|
||||
|
||||
on init
|
||||
write /sys/class/android_usb/android0/iSerial ${ro.serialno}
|
||||
write /sys/class/android_usb/android0/f_rndis/wceis 1
|
||||
chown system system /sys/class/android_usb/android0/usb30en
|
||||
chmod 0660 /sys/class/android_usb/android0/usb30en
|
||||
chown system system /sys/class/android_usb/android0/terminal_version
|
||||
chmod 0660 /sys/class/android_usb/android0/terminal_version
|
||||
|
||||
on charger
|
||||
setprop sys.usb.config mass_storage
|
||||
|
||||
on fs
|
||||
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
|
||||
write /sys/class/android_usb/android0/f_ffs/aliases adb
|
||||
|
||||
# Following are the parameters required for usb functionality. They provide configurable options like
|
||||
# product_id/vendor id and allows specifying required functions:
|
||||
#
|
||||
# Required parameters:
|
||||
#
|
||||
# /sys/class/android_usb/android0/enable: Enables/disables usb composition
|
||||
# Value: 0 (disable), 1 (enable)
|
||||
#
|
||||
# /sys/class/android_usb/android0/idVendor: Stores Vendor ID
|
||||
# Value: 05c6 (Vendor id for Qualcomm Inc)
|
||||
#
|
||||
# /sys/class/android_usb/android0/idProduct: Stores Product id corresponding to usb composition
|
||||
# Value: 0x9xxx for composite interface, 0xFxxx for single interface
|
||||
#
|
||||
# /sys/class/android_usb/android0/f_diag/clients: Stores name of clients representing a diag interface.
|
||||
# Value: Passed one per interface. e.g. diag[,diag_mdm, diag_qsc, diag_mdm2]
|
||||
#
|
||||
# /sys/class/android_usb/android0/functions: Stores name of the function drivers used in usb composition.
|
||||
# Value: Passed one per function driver. e.g. diag[,adb]
|
||||
#
|
||||
#Optional parameters:
|
||||
#
|
||||
# /sys/class/android_usb/android0/f_serial/transports: Stores type of underlying transports used to
|
||||
# communicate to serial interface.
|
||||
# Value: Passed one per interface. One value represents control and data transport together.
|
||||
# e.g. smd[,sdio,tty,hsic]
|
||||
# Only required if serial interface is present.
|
||||
#
|
||||
# /sys/class/android_usb/android0/f_serial/transport_names: Stores name of the underlying transports
|
||||
# used to communicate to serial interface. This is used to distinguish between more than one interface
|
||||
# using same transport type.
|
||||
# Value: Passed one per interface. One value represents control and data transport together.
|
||||
# e.g. serial_hsic[,serial_hsusb]
|
||||
# Only required for transport type hsic, optional for other transport types.
|
||||
#
|
||||
# /sys/class/android_usb/android0/f_rmnet/transports: Stores type of underlying transports used to
|
||||
# communicate to rmnet interface.
|
||||
# Value: Passed two per interface as control, data transport type pair.
|
||||
# e.g. smd,bam[,hsuart,hsuart]
|
||||
# Only required if rmnet interface is present.
|
||||
#
|
||||
# /sys/class/android_usb/android0/f_rmnet/transport_names: Stores name of the underlying transports
|
||||
# used to communicate to rmnet interface. This is used to distinguish between more than one interface
|
||||
# using same transport type.
|
||||
# Value: Passed one per interface. One value represents control and data transport together.
|
||||
# e.g. rmnet_hsic[,rmnet_hsusb]
|
||||
# Only required for transport type hsic, optional for other transport types.
|
||||
|
||||
|
||||
# USB Composite for Samsung USB Driver
|
||||
|
||||
on property:sys.usb.config=mtp,conn_gadget
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mtp,acm,conn_gadget
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,conn_gadget,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mtp,acm,conn_gadget,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mtp,acm
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=mtp,adb
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 04E8
|
||||
# write /sys/class/android_usb/android0/idProduct 6860
|
||||
# write /sys/class/android_usb/android0/functions mtp,adb
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# start adbd
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mtp,acm,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
|
||||
on property:sys.usb.config=ptp
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6865
|
||||
write /sys/class/android_usb/android0/functions ptp
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ptp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6866
|
||||
write /sys/class/android_usb/android0/functions ptp,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6863
|
||||
write /sys/class/android_usb/android0/functions rndis
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6864
|
||||
write /sys/class/android_usb/android0/functions rndis,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# rndis,acm,diag and rmnet,acm,diag are used for IOT Hidden Menu
|
||||
on property:sys.usb.config=rndis,acm,diag
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6864
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions rndis,acm,diag
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rmnet,acm,diag
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 685D
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,acm,rmnet
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 685D
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions diag,acm,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# For CDFS composite
|
||||
on property:sys.usb.config=mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 685B
|
||||
write /sys/class/android_usb/android0/functions mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 685E
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mass_storage,mtp
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/functions mtp,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mass_storage,mtp,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/functions mtp,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# As request from the CHINA GOVERNMENT SECURITY POLICY
|
||||
on property:sys.usb.config=askon
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=askon,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/functions ${sys.usb.config}
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# USB compositions
|
||||
#on property:sys.usb.config=diag,adb
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct 901D
|
||||
# write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
# write /sys/class/android_usb/android0/functions diag,adb
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# start adbd
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9025
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903D
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_bam,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9026
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_bam,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903E
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9037
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports sdio,smd
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903B
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd
|
||||
write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_smd,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9038
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports sdio,smd
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_smd,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903C
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports sdio,smd
|
||||
write /sys/class/android_usb/android0/functions diag,acm,rmnet_smd_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9031
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports sdio,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903B
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_sdio,serial_tty,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9032
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports sdio,tty
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,acm_sdio,acm_tty,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903C
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports sdio,tty
|
||||
write /sys/class/android_usb/android0/functions diag,acm,rmnet_sdio,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9025
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports tty,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
start port-bridge
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903D
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
start port-bridge
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_tty,serial_tty,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9026
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports tty,tty
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start port-bridge
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_tty,acm_tty,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903E
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports tty,tty
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9025
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903D
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
|
||||
write /sys/class/android_usb/android0/functions diag,adb,acm,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
start port-bridge
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,serial_smd,serial_tty,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9026
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,acm_smd,acm_tty,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903E
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_acm/acm_transports smd,tty
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet_smd,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 composition
|
||||
on property:sys.usb.config=diag,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9025
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,tty
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 composition with diag_mdm and adb
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9031
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,tty
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 composition with diag_mdm
|
||||
on property:sys.usb.config=diag,diag_mdm,serial_hsic,serial_tty,rmnet_hsic,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9032
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,tty
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 DSDA composition with adb
|
||||
on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9065
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 DSDA composition without adb
|
||||
on property:sys.usb.config=diag,diag_mdm,diag_qsc,serial_hsic,serial_hsuart,rmnet_hsic,rmnet_hsuart,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9066
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,hsuart
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsuart,hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsuart
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 DSDA2 composition with adb
|
||||
on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9065
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 3 DSDA2 composition without adb
|
||||
on property:sys.usb.config=diag,diag_mdm,diag_mdm2,serial_hsic,serial_hsusb,rmnet_hsic,rmnet_hsusb,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9066
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_mdm2
|
||||
write /sys/class/android_usb/android0/f_serial/transports hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_serial/transport_names serial_hsic,serial_hsusb
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports hsic,hsic,hsic,hsic
|
||||
write /sys/class/android_usb/android0/f_rmnet/transport_names rmnet_hsic,rmnet_hsusb
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 2.2 composition with diag_qsc and adb
|
||||
on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9053
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart
|
||||
write /sys/class/android_usb/android0/functions diag,adb,serial,rmnet,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
# Fusion 2.2 composition with diag_qsc
|
||||
on property:sys.usb.config=diag,diag_qsc,serial_smd,serial_tty,serial_hsuart,rmnet_hsuart,mass_storage
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9054
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_qsc
|
||||
write /sys/class/android_usb/android0/f_serial/transports smd,tty,hsuart
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam,hsuart,hsuart
|
||||
write /sys/class/android_usb/android0/functions diag,serial,rmnet,mass_storage
|
||||
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/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct F00E
|
||||
# write /sys/class/android_usb/android0/functions rndis
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=rndis,adb
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct 9024
|
||||
# write /sys/class/android_usb/android0/functions rndis,adb
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# start adbd
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=rndis,diag
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct 902C
|
||||
# write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
# write /sys/class/android_usb/android0/functions rndis,diag
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=rndis,diag,adb
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct 902D
|
||||
# write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
# write /sys/class/android_usb/android0/functions rndis,diag,adb
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# start adbd
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9041
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions rndis,diag
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,diag_mdm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9042
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9086
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/functions rndis,diag
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,diag_mdm,diag_qsc,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9087
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=ptp
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct 904D
|
||||
# write /sys/class/android_usb/android0/functions ptp
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=ptp,adb
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct 904E
|
||||
# write /sys/class/android_usb/android0/functions ptp,adb
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# start adbd
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=mtp
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct F003
|
||||
# write /sys/class/android_usb/android0/functions mtp
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=mtp,adb
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct 9039
|
||||
# write /sys/class/android_usb/android0/functions mtp,adb
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# start adbd
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=mtp,diag
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct 901B
|
||||
# write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
# write /sys/class/android_usb/android0/functions mtp,diag
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=mtp,diag,adb
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct 903A
|
||||
# write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
# write /sys/class/android_usb/android0/functions mtp,diag,adb
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# start adbd
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9040
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions mtp,diag
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,diag,diag_mdm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 903F
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions mtp,diag,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9088
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/functions mtp,diag
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=mtp,diag,diag_mdm,diag_qsc,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9089
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm,diag_qsc
|
||||
write /sys/class/android_usb/android0/functions mtp,diag,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,ccid
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9045
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions diag,ccid
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,diag_mdm,ccid,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9044
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag,diag_mdm
|
||||
write /sys/class/android_usb/android0/functions diag,adb,ccid
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#on property:sys.usb.config=mass_storage,adb
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct 9015
|
||||
# write /sys/class/android_usb/android0/functions adb,mass_storage
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# start adbd
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
#Mass-storage only composition
|
||||
#on property:sys.usb.config=mass_storage
|
||||
# write /sys/class/android_usb/android0/enable 0
|
||||
# write /sys/class/android_usb/android0/idVendor 05C6
|
||||
# write /sys/class/android_usb/android0/idProduct F000
|
||||
# write /sys/class/android_usb/android0/functions mass_storage
|
||||
# write /sys/class/android_usb/android0/enable 1
|
||||
# setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 904A
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/functions diag,qdss
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9060
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/functions diag,qdss,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss,rmnet_bam
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9083
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,qdss,rmnet
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=diag,qdss,rmnet_bam,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9084
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/f_rmnet/transports smd,bam
|
||||
write /sys/class/android_usb/android0/functions diag,qdss,adb,rmnet
|
||||
write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,qdss
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9081
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,qdss
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=rndis,diag,qdss,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 9082
|
||||
write /sys/class/android_usb/android0/f_diag/clients diag
|
||||
write /sys/class/android_usb/android0/functions rndis,diag,qdss,adb
|
||||
write /sys/module/dwc3/parameters/tx_fifo_resize_enable 1
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ncm
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 0525
|
||||
write /sys/class/android_usb/android0/idProduct A4A1
|
||||
write /sys/class/android_usb/android0/functions ncm
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=ncm,adb
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 05C6
|
||||
write /sys/class/android_usb/android0/idProduct 908C
|
||||
write /sys/class/android_usb/android0/functions ncm,adb
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
start adbd
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:sys.usb.config=charging
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
write /sys/class/android_usb/android0/idVendor 04E8
|
||||
write /sys/class/android_usb/android0/idProduct 6860
|
||||
write /sys/class/android_usb/android0/f_acm/instances 1
|
||||
write /sys/class/android_usb/android0/functions acm
|
||||
write /sys/class/android_usb/android0/enable 1
|
||||
setprop sys.usb.state ${sys.usb.config}
|
||||
|
||||
on property:service.adb.root=1
|
||||
write /sys/class/android_usb/android0/enable 0
|
||||
restart adbd
|
||||
write /sys/class/android_usb/android0/enable 1
|
94
rootdir/etc/init.target.rc
Normal file
94
rootdir/etc/init.target.rc
Normal file
|
@ -0,0 +1,94 @@
|
|||
# Copyright (c) 2009-2012, 2014, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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.
|
||||
|
||||
on post-fs-data
|
||||
# Permissions for svc led
|
||||
chown system system /sys/class/sec/led/led_r
|
||||
chown system system /sys/class/sec/led/led_g
|
||||
chown system system /sys/class/sec/led/led_b
|
||||
chown system system /sys/class/sec/led/led_pattern
|
||||
chown system system /sys/class/sec/led/led_blink
|
||||
chown system system /sys/class/sec/led/led_lowpower
|
||||
|
||||
# For disabling softkeys *FIXME*
|
||||
chown root system /sys/class/leds/button-backlight/max_brightness
|
||||
chmod 0664 /sys/class/leds/button-backlight/max_brightness
|
||||
|
||||
# Torch
|
||||
chmod 0666 /sys/class/leds/led:flash_torch/brightness
|
||||
chown system camera /sys/class/leds/led:flash_torch/brightness
|
||||
|
||||
on boot
|
||||
# NFC_NXP
|
||||
symlink /dev/pn547 /dev/pn544
|
||||
symlink /dev/pn547 /dev/pn54x
|
||||
|
||||
# NFC_SLSI
|
||||
mkdir /data/nfc 0770 nfc nfc
|
||||
mkdir /data/nfc/param 0770 nfc nfc
|
||||
|
||||
# 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
|
||||
|
||||
# Gyro_sensor
|
||||
chown system radio /sys/class/sensors/gyro_sensor/power_on
|
||||
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/vendor
|
||||
chown system radio /sys/class/sensors/gyro_sensor/name
|
||||
|
||||
# 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
|
||||
|
||||
# Magnetic_sensor
|
||||
chown system radio /sys/class/sensors/magnetic_sensor/selftest
|
||||
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
|
||||
|
||||
# Proximity_sensor
|
||||
chown system radio /sys/class/sensors/proximity_sensor/state
|
||||
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/prox_tresh
|
||||
chown system radio /sys/class/sensors/proximity_sensor/vendor
|
||||
chown system radio /sys/class/sensors/proximity_sensor/name
|
||||
|
||||
# Sensors
|
||||
chown system system /efs/FactoryApp/baro_delta
|
||||
chmod 0640 /efs/FactoryApp/baro_delta
|
||||
restorecon /efs/FactoryApp/baro_delta
|
||||
|
||||
chown system system /efs/gyro_cal_data
|
||||
chmod 0640 /efs/gyro_cal_data
|
||||
restorecon /efs/gyro_cal_data
|
|
@ -1,353 +0,0 @@
|
|||
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||
#
|
||||
# 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 BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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.
|
||||
#
|
||||
|
||||
# the DIAG device node is not world writable/readable.
|
||||
/dev/diag 0660 system oem_2950
|
||||
|
||||
/dev/genlock 0666 system system
|
||||
/dev/kgsl 0666 system system
|
||||
/dev/kgsl-3d0 0666 system system
|
||||
/dev/kgsl-2d0 0666 root root
|
||||
/dev/kgsl-2d1 0666 root root
|
||||
/dev/ion 0664 system system
|
||||
/dev/rtc0 0600 system system
|
||||
/dev/smd0 0660 system system
|
||||
/dev/smd4 0660 system system
|
||||
/dev/smd_cxm_qmi 0640 radio radio
|
||||
/dev/smd5 0660 system system
|
||||
/dev/smd6 0660 system system
|
||||
/dev/smd7 0660 bluetooth bluetooth
|
||||
|
||||
#permissions for CSVT
|
||||
/dev/smd11 0660 radio radio
|
||||
/dev/radio0 0640 system system
|
||||
/dev/rfcomm0 0660 bluetooth bluetooth
|
||||
/dev/smdcntl0 0640 radio radio
|
||||
/dev/smdcntl1 0640 radio radio
|
||||
/dev/smdcntl2 0640 radio radio
|
||||
/dev/smdcntl3 0640 radio radio
|
||||
/dev/smdcntl4 0640 radio radio
|
||||
/dev/smdcntl5 0640 radio radio
|
||||
/dev/smdcntl6 0640 radio radio
|
||||
/dev/smdcntl7 0640 radio radio
|
||||
/dev/smdcnt_rev0 0640 radio radio
|
||||
/dev/smdcnt_rev1 0640 radio radio
|
||||
/dev/smdcnt_rev2 0640 radio radio
|
||||
/dev/smdcnt_rev3 0640 radio radio
|
||||
/dev/smdcnt_rev4 0640 radio radio
|
||||
/dev/smdcnt_rev5 0640 radio radio
|
||||
/dev/smdcnt_rev6 0640 radio radio
|
||||
/dev/smdcnt_rev7 0640 radio radio
|
||||
/dev/smdcnt_rev8 0640 radio radio
|
||||
/dev/smuxctl32 0640 radio radio
|
||||
/dev/sdioctl0 0640 radio radio
|
||||
/dev/sdioctl1 0640 radio radio
|
||||
/dev/sdioctl2 0640 radio radio
|
||||
/dev/sdioctl3 0640 radio radio
|
||||
/dev/sdioctl4 0640 radio radio
|
||||
/dev/sdioctl5 0640 radio radio
|
||||
/dev/sdioctl6 0640 radio radio
|
||||
/dev/sdioctl7 0640 radio radio
|
||||
/dev/sdioctl8 0640 radio radio
|
||||
/dev/rmnet_mux_ctrl 0640 radio radio
|
||||
/dev/hsicctl0 0640 radio radio
|
||||
/dev/hsicctl1 0640 radio radio
|
||||
/dev/hsicctl2 0640 radio radio
|
||||
/dev/hsicctl3 0640 radio radio
|
||||
/dev/hsicctl4 0640 radio radio
|
||||
/dev/hsicctl5 0640 radio radio
|
||||
/dev/hsicctl6 0640 radio radio
|
||||
/dev/hsicctl7 0640 radio radio
|
||||
/dev/hsicctl8 0640 radio radio
|
||||
/dev/hsicctl9 0640 radio radio
|
||||
/dev/hsicctl10 0640 radio radio
|
||||
/dev/hsicctl11 0640 radio radio
|
||||
/dev/hsicctl12 0640 radio radio
|
||||
/dev/hsicctl13 0640 radio radio
|
||||
/dev/hsicctl14 0640 radio radio
|
||||
/dev/hsicctl15 0640 radio radio
|
||||
/dev/hsicctl16 0640 radio radio
|
||||
/dev/video* 0660 system camera
|
||||
/dev/media* 0660 system camera
|
||||
/dev/v4l-subdev* 0660 system camera
|
||||
/dev/qseecom 0660 system drmrpc
|
||||
/dev/gemini0 0660 system camera
|
||||
/dev/jpeg0 0660 system camera
|
||||
/dev/jpeg1 0660 system camera
|
||||
/dev/jpeg2 0660 system camera
|
||||
/dev/adsprpc-smd 0664 system system
|
||||
/dev/msm_camera/* 0660 system camera
|
||||
/dev/gemini/ 0660 system camera
|
||||
/dev/mercury0 0660 system camera
|
||||
/dev/msm_vidc_reg 0660 system audio
|
||||
/dev/msm_vidc_dec 0660 system audio
|
||||
/dev/msm_vidc_dec_sec 0660 system audio
|
||||
/dev/msm_vidc_enc 0660 system audio
|
||||
/dev/msm_rotator 0660 system system
|
||||
/dev/hw_random 0660 root root
|
||||
/dev/adsprpc-smd 0664 system system
|
||||
|
||||
#permissions for audio
|
||||
/dev/msm_qcelp 0660 system audio
|
||||
/dev/msm_evrc 0660 system audio
|
||||
/dev/msm_wma 0660 system audio
|
||||
/dev/msm_wmapro 0660 system audio
|
||||
/dev/msm_amrnb 0660 system audio
|
||||
/dev/msm_amrwb 0660 system audio
|
||||
/dev/msm_amrwbplus 0660 system audio
|
||||
/dev/msm_aac 0660 system audio
|
||||
/dev/msm_multi_aac 0660 system audio
|
||||
/dev/msm_aac_in 0660 system audio
|
||||
/dev/msm_qcelp_in 0660 system audio
|
||||
/dev/msm_evrc_in 0660 system audio
|
||||
/dev/msm_amrnb_in 0640 system audio
|
||||
/dev/msm_a2dp_in 0660 system audio
|
||||
/dev/msm_ac3 0660 system audio
|
||||
/dev/msm_acdb 0660 system audio
|
||||
/dev/msm_cad 0660 system audio
|
||||
/dev/msm_fm 0660 system audio
|
||||
/dev/msm_mvs 0660 system audio
|
||||
/dev/msm_pcm_lp_dec 0660 system audio
|
||||
/dev/msm_preproc_ctl 0660 system audio
|
||||
/dev/msm_rtac 0660 system audio
|
||||
/dev/msm_voicememo 0660 system audio
|
||||
/dev/radio0 0640 fm_radio fm_radio
|
||||
/dev/smd3 0660 bluetooth bluetooth
|
||||
/dev/smd2 0660 bluetooth bluetooth
|
||||
/dev/ttyHSL1 0660 system system
|
||||
/dev/mdm 0660 system radio
|
||||
/sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio
|
||||
/dev/sdio_tty_ciq_00 0660 system system
|
||||
/dev/tty_sdio_00 0660 system system
|
||||
/dev/ttyGS0 0660 system system
|
||||
/dev/i2c-5 0660 media media
|
||||
/dev/voice_svc 0660 system audio
|
||||
|
||||
# Audience ES705 UART - do not be tempted to uncomment the below unless you
|
||||
# want firmware loading to be blocked by selinux
|
||||
#/dev/ttyHS3 0660 media audio
|
||||
|
||||
# Bluetooth
|
||||
/dev/ttyHS0 0660 bluetooth bluetooth
|
||||
/dev/ttyHS2 0660 bluetooth bluetooth
|
||||
|
||||
# bluetooth LPM
|
||||
/dev/btlock 0600 bluetooth bluetooth
|
||||
|
||||
# Broadcast devices
|
||||
/dev/tsc_mux0 0660 media media
|
||||
/dev/tsc_ci0 0660 media media
|
||||
|
||||
# DVB devices
|
||||
/dev/dvb/adapter0/demux* 0440 media media
|
||||
/dev/dvb/adapter0/dvr* 0660 media media
|
||||
/dev/dvb/adapter0/video* 0660 media media
|
||||
|
||||
# Fingerprint
|
||||
/dev/vfsspi 0660 system system
|
||||
|
||||
# IR_LED
|
||||
/dev/ice4_dev 0660 system system
|
||||
|
||||
# NFC_NXP
|
||||
/dev/pn547 0660 nfc nfc
|
||||
|
||||
# NFC bcm2079x (kltespr, kltedv)
|
||||
/dev/bcm2079x 0660 nfc nfc
|
||||
|
||||
# NFC_SLSI
|
||||
/dev/sec-nfc 0660 nfc nfc
|
||||
|
||||
# SHTC1 BULK
|
||||
/dev/shtc1_sensor 0600 system system
|
||||
|
||||
# UIO devices
|
||||
/dev/uio0 0660 system system
|
||||
/dev/uio1 0660 system system
|
||||
/dev/uio2 0660 system system
|
||||
|
||||
# wlan
|
||||
/dev/rfkill 0600 wifi wifi
|
||||
|
||||
# sensors
|
||||
/sys/devices/i2c-12/12-* pollrate_ms 0664 system system
|
||||
/sys/devices/f9925000.i2c/i2c-0/0-* enable 0660 input system
|
||||
/sys/devices/f9925000.i2c/i2c-0/0-* poll_delay 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/proximity ps_adc 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/proximity ps_poll_delay 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/lightsensor ls_auto 0660 input system
|
||||
/sys/devices/virtual/optical_sensors/lightsensor ls_poll_delay 0660 input system
|
||||
/sys/devices/virtual/input/input* poll 0660 input system
|
||||
/sys/devices/virtual/input/input* pollrate_ms 0660 input system
|
||||
|
||||
# sensorhub
|
||||
/dev/batch_io 0660 system system
|
||||
/dev/ssp_sensorhub 0660 system system
|
||||
/dev/iio:device* 0660 system system
|
||||
/sys/devices/f9967000.spi/spi_master/spi32766/spi32766.0/iio:device* buffer/enable 0660 system system
|
||||
/sys/devices/f9967000.spi/spi_master/spi32766/spi32766.0/iio:device* buffer/length 0660 system system
|
||||
/sys/devices/f9967000.spi/spi_master/spi32765/spi32765.0/iio:device* buffer/enable 0660 system system
|
||||
/sys/devices/f9967000.spi/spi_master/spi32765/spi32765.0/iio:device* buffer/length 0660 system system
|
||||
/sys/devices/f9967000.spi/spi_master/spi11/spi11.0/iio:device* buffer/enable 0660 system system
|
||||
/sys/devices/f9967000.spi/spi_master/spi11/spi11.0/iio:device* buffer/length 0660 system system
|
||||
/sys/devices/f9924000.spi/spi_master/spi32766/spi32766.0/iio:device* buffer/enable 0660 system radio
|
||||
/sys/devices/f9924000.spi/spi_master/spi32766/spi32766.0/iio:device* buffer/length 0660 system radio
|
||||
/sys/devices/f9924000.spi/spi_master/spi32765/spi32765.0/iio:device* buffer/enable 0660 system radio
|
||||
/sys/devices/f9924000.spi/spi_master/spi32765/spi32765.0/iio:device* buffer/length 0660 system radio
|
||||
|
||||
#Accelerometer sensor
|
||||
/sys/devices/f9925000.i2c/i2c-0/0-0018/input/input* enable 0664 system system
|
||||
/sys/devices/f9925000.i2c/i2c-0/0-0018/input/input* delay 0664 system system
|
||||
/sys/devices/i2c.73/i2c-16/16-0018/input/input* enable 0664 system system
|
||||
/sys/devices/i2c.73/i2c-16/16-0018/input/input* delay 0664 system system
|
||||
|
||||
# sysfs iio event
|
||||
/sys/devices/f9927000.i2c/i2c-5/5-0024/iio:device* 0664 system radio
|
||||
/sys/devices/f9927000.i2c/i2c-5/5-0024/iio:device* enable 0660 system radio
|
||||
/sys/devices/f9927000.i2c/i2c-5/5-0024/iio:device* in_grip0_input 0660 system radio
|
||||
|
||||
|
||||
/sys/devices/f9927000.i2c/i2c-5/5-0039/iio:device* 0664 system radio
|
||||
/sys/devices/f9927000.i2c/i2c-5/5-0039/iio:device* enable 0660 system radio
|
||||
/sys/devices/f9927000.i2c/i2c-5/5-0039/iio:device* prox_enable 0660 system radio
|
||||
/sys/devices/f9927000.i2c/i2c-5/5-0039/iio:device* delay 0660 system radio
|
||||
/sys/devices/f9927000.i2c/i2c-5/5-0039/iio:device* prox_delay 0660 system radio
|
||||
/sys/devices/f9927000.i2c/i2c-5/5-0039/iio:device* in_illuminance0_input 0660 system radio
|
||||
/sys/devices/f9927000.i2c/i2c-5/5-0039/iio:device* in_proximity0_input 0660 system radio
|
||||
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* uevent 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* dev 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* buffer/length 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* buffer/enable 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* scan_elements/in_timestamp_en 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* scan_elements/in_timestamp_type 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* scan_elements/in_timestamp_index 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* sampling_frequency_available 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* reg_dump 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* temperature 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_scale 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_x_calibbias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_y_calibbias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_z_calibbias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_x_offset 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_y_offset 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_z_offset 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_self_test_scale 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* self_test_samples 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* self_test_threshold 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* gyro_enable 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* gyro_fifo_enable 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* gyro_rate 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* power_state 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* sampling_frequency 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* self_test 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* gyro_matrix 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* secondary_name 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* reg_write 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* debug_smd_enable_testp1 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* debug_smd_enable_testp2 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* debug_smd_exe_state 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* debug_smd_delay_cntr 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* test_suspend_resume 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* test_gyro_counter 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* test_accel_counter 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* test_compass_counter 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* test_pressure_counter 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* test_LPQ_counter 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* test_PEDQ_counter 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* test_SIXQ_counter 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* event_display_orientation 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* event_accel_motion 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* event_smd 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* event_pedometer 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_scale 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_x_calibbias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_y_calibbias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_z_calibbias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_self_test_scale 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_x_offset 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_y_offset 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_z_offset 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_x_dmp_bias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_y_dmp_bias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_accel_z_dmp_bias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_x_dmp_bias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_y_dmp_bias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_anglvel_z_dmp_bias 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* pedometer_int_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* pedometer_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* pedometer_steps 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* pedometer_time 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* smd_enable 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* smd_threshold 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* smd_delay_threshold 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* smd_delay_threshold2 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* display_orientation_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* dmp_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* dmp_int_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* dmp_event_int_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* step_indicator_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* batchmode_timeout 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* batchmode_wake_fifo_full_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* six_axes_q_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* six_axes_q_rate 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* three_axes_q_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* three_axes_q_rate 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* ped_q_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* ped_q_rate 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* step_detector_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* motion_lpa_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* motion_lpa_freq 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* motion_lpa_threshold 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* accel_enable 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* accel_fifo_enable 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* firmware_loaded 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* accel_matrix 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* accel_rate 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* in_magn_scale 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* compass_enable 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* compass_rate 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* compass_matrix 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* compass_sens 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* name 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* trigger/current_trigger 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* power/runtime_status 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* power/control 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* power/runtime_suspended_time 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* power/runtime_active_time 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* power/autosuspend_delay_ms 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* dmp_firmware 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* event_tap 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* flush_batch 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* master_enable 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* tap_min_count 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* tap_on 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* tap_threshold 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* tap_time 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* dmp_firmware 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* pedometer_int_thresh 0660 system radio
|
||||
/sys/devices/f9968000.i2c/i2c-12/12-0068/iio:device* pedometer_step_thresh 0660 system radio
|
|
@ -16,15 +16,14 @@
|
|||
#
|
||||
|
||||
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
|
||||
$(call inherit-product, frameworks/native/build/phone-xxhdpi-2048-dalvik-heap.mk)
|
||||
|
||||
# Overlays
|
||||
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
|
||||
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay-lineage
|
||||
|
||||
# Boot animation
|
||||
TARGET_SCREEN_HEIGHT := 1920
|
||||
TARGET_SCREEN_WIDTH := 1080
|
||||
TARGET_SCREEN_HEIGHT := 1280
|
||||
TARGET_SCREEN_WIDTH := 720
|
||||
|
||||
# Audio
|
||||
PRODUCT_COPY_FILES += \
|
||||
|
@ -37,8 +36,8 @@ PRODUCT_COPY_FILES += \
|
|||
PRODUCT_PACKAGES += \
|
||||
android.hardware.camera.provider@2.4-impl \
|
||||
camera.device@1.0-impl \
|
||||
camera.msm8974 \
|
||||
libshim_camera \
|
||||
libboringssl-compat \
|
||||
camera.msm8226 \
|
||||
libxml2 \
|
||||
Snap
|
||||
|
||||
|
@ -54,6 +53,11 @@ PRODUCT_PACKAGES += \
|
|||
PRODUCT_PACKAGES += \
|
||||
FlipFlap
|
||||
|
||||
# FM
|
||||
PRODUCT_PACKAGES += \
|
||||
FMRadio \
|
||||
libfmjni
|
||||
|
||||
# IPv6 tethering
|
||||
PRODUCT_PACKAGES += \
|
||||
ebtables \
|
||||
|
@ -67,7 +71,7 @@ PRODUCT_COPY_FILES += \
|
|||
# Lights
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.light@2.0-impl \
|
||||
lights.MSM8974
|
||||
lights.MSM8226
|
||||
|
||||
# Media
|
||||
PRODUCT_COPY_FILES += \
|
||||
|
@ -77,8 +81,6 @@ PRODUCT_COPY_FILES += \
|
|||
# Permissions
|
||||
PRODUCT_COPY_FILES += \
|
||||
frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
|
||||
frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
|
||||
frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml \
|
||||
frameworks/native/data/etc/android.hardware.telephony.cdma.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.cdma.xml \
|
||||
frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
|
||||
frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \
|
||||
|
@ -91,36 +93,25 @@ PRODUCT_PACKAGES += \
|
|||
# Ramdisk
|
||||
PRODUCT_PACKAGES += \
|
||||
fstab.qcom \
|
||||
init.qcom.rc \
|
||||
init.qcom.usb.rc \
|
||||
ueventd.qcom.rc
|
||||
init.target.rc
|
||||
|
||||
# Sensors
|
||||
PRODUCT_PACKAGES += \
|
||||
sensors.msm8974
|
||||
sensors.msm8226
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/configs/sensors/_hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/_hals.conf
|
||||
|
||||
# Thermal
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/configs/thermal-engine-8974.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-8974.conf
|
||||
$(LOCAL_PATH)/configs/thermal-engine-8226.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-8226.conf
|
||||
|
||||
# Vibrator
|
||||
PRODUCT_PACKAGES += \
|
||||
android.hardware.vibrator@1.0-impl
|
||||
|
||||
# Wifi
|
||||
PRODUCT_PACKAGES += \
|
||||
libnetcmdiface \
|
||||
macloader \
|
||||
|
||||
PRODUCT_COPY_FILES += \
|
||||
$(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf \
|
||||
$(LOCAL_PATH)/configs/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf
|
||||
|
||||
# Get non-open-source specific aspects
|
||||
$(call inherit-product-if-exists, vendor/samsung/klte-common/klte-common-vendor.mk)
|
||||
$(call inherit-product-if-exists, vendor/samsung/s3ve3g-common/s3ve3g-common-vendor.mk)
|
||||
|
||||
# common msm8974
|
||||
$(call inherit-product, device/samsung/msm8974-common/msm8974.mk)
|
||||
# common msm8226
|
||||
$(call inherit-product, device/samsung/msm8226-common/msm8226.mk)
|
|
@ -1,2 +0,0 @@
|
|||
# Fingerprint
|
||||
type vfsspi_device, dev_type;
|
|
@ -1,9 +1,5 @@
|
|||
# data files
|
||||
/data/validity(/.*)? u:object_r:vfsspi_data_file:s0
|
||||
|
||||
# device nodes
|
||||
/dev/ttyHS3 u:object_r:audio_device:s0
|
||||
/dev/vfsspi u:object_r:vfsspi_device:s0
|
||||
|
||||
# sysfs
|
||||
/sys/devices(/.*)?/input/input[1-2]/enabled u:object_r:sysfs_hal_pwr:s0
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
r_dir_file(hal_fingerprint_default, firmware_file)
|
||||
|
||||
allow hal_fingerprint_default tee_device:chr_file rw_file_perms;
|
||||
allow hal_fingerprint_default vfsspi_data_file:dir rw_dir_perms;
|
||||
allow hal_fingerprint_default vfsspi_data_file:file create_file_perms;
|
||||
allow hal_fingerprint_default vfsspi_device:chr_file rw_file_perms;
|
|
@ -16,4 +16,4 @@
|
|||
|
||||
# Board specific SELinux policy variable definitions
|
||||
BOARD_SEPOLICY_DIRS += \
|
||||
device/samsung/klte-common/sepolicy/common
|
||||
device/samsung/s3ve3g-common/sepolicy/common
|
||||
|
|
|
@ -37,7 +37,7 @@ fi
|
|||
setup_vendor "$DEVICE_COMMON" "$VENDOR" "$CM_ROOT" true
|
||||
|
||||
# Copyright headers and common guards
|
||||
write_headers "klte klteactivexx kltechn kltechnduo klteduos kltedv kltekdi kltekor kltespr kltesprsports klteusc kltevzw"
|
||||
write_headers "s3ve3gxx s3ve3gjv s3ve3gds"
|
||||
|
||||
write_makefiles "$MY_DIR"/common-proprietary-files.txt
|
||||
|
||||
|
@ -59,4 +59,4 @@ done
|
|||
|
||||
write_footers
|
||||
|
||||
./../msm8974-common/setup-makefiles.sh $@
|
||||
./../msm8226-common/setup-makefiles.sh $@
|
||||
|
|
43
system.prop
43
system.prop
|
@ -1,6 +1,3 @@
|
|||
# Art
|
||||
dalvik.vm.dex2oat-swap=false
|
||||
|
||||
# Audio
|
||||
af.fast_track_multiplier=1
|
||||
audio_hal.period_size=192
|
||||
|
@ -17,15 +14,37 @@ audio.offload.pcm.24bit.enable=true
|
|||
audio.offload.multiple.enabled=false
|
||||
audio.offload.buffer.size.kb=32
|
||||
|
||||
# Bluetooth
|
||||
ro.bluetooth.hfp.ver=1.6
|
||||
qcom.bluetooth.soc=smd
|
||||
qcom.bt.le_dev_pwr_class=1
|
||||
ro.qualcomm.bluetooth.opp=true
|
||||
ro.qualcomm.bluetooth.hfp=true
|
||||
ro.qualcomm.bluetooth.hsp=true
|
||||
ro.qualcomm.bluetooth.pbap=true
|
||||
ro.qualcomm.bluetooth.ftp=true
|
||||
ro.qualcomm.bluetooth.nap=true
|
||||
ro.qualcomm.bluetooth.map=true
|
||||
ro.bluetooth.sap=true
|
||||
ro.bluetooth.dun=true
|
||||
ro.bluetooth.hfp.ver=1.6
|
||||
ro.qualcomm.bt.hci_transport=smd
|
||||
|
||||
# Camera
|
||||
camera2.portability.force_api=1
|
||||
|
||||
# Debug
|
||||
ro.adb.secure=0
|
||||
ro.debuggable=1
|
||||
persist.service.adb.enable=1
|
||||
persist.sys.usb.config=adb
|
||||
|
||||
# Display
|
||||
ro.hdcp2.rx=tz
|
||||
ro.qualcomm.cabl=1
|
||||
ro.secwvk=144
|
||||
ro.sf.lcd_density=480
|
||||
debug.hwui.use_buffer_age=false
|
||||
ro.sf.lcd_density=320
|
||||
debug.composition.type=c2d
|
||||
|
||||
# GPS
|
||||
persist.gps.qc_nlp_in_use=0
|
||||
|
@ -34,6 +53,8 @@ ro.qc.sdk.izat.premium_enabled=0
|
|||
ro.qc.sdk.izat.service_mask=0x0
|
||||
|
||||
# Media
|
||||
media.stagefright.legacyencoder=true
|
||||
media.stagefright.less-secure=true
|
||||
persist.media.treble_omx=false
|
||||
|
||||
# NFC
|
||||
|
@ -43,17 +64,24 @@ ro.nfc.port=I2C
|
|||
ro.vendor.extension_library=/vendor/lib/libqti-perfd-client.so
|
||||
|
||||
# Radio
|
||||
persist.data.netmgrd.qos.enable=true
|
||||
persist.data.netmgrd.qos.enable=false
|
||||
persist.data.qmi.adb_logmask=0
|
||||
persist.radio.add_power_save=1
|
||||
rild.libpath=/system/vendor/lib/libsec-ril.so
|
||||
rild.libpath=/vendor/lib/libsec-ril.so
|
||||
ro.telephony.mms_data_profile=5
|
||||
ro.ril.telephony.qan_resp_strings=6
|
||||
ro.telephony.default_network=3
|
||||
persist.radio.apm_sim_not_pwdn=1
|
||||
ro.use_data_netmgrd=false
|
||||
ro.data.large_tcp_window_size=true
|
||||
|
||||
# Ril sends only one RIL_UNSOL_CALL_RING, so set call_ring.multiple to false
|
||||
ro.telephony.call_ring.multiple=0
|
||||
|
||||
# Sensors
|
||||
ro.qc.sdk.gestures.camera=false
|
||||
ro.qc.sdk.camera.facialproc=false
|
||||
ro.qc.sdk.sensors.gestures=true
|
||||
debug.sensors=1
|
||||
|
||||
# Tethering
|
||||
|
@ -63,4 +91,5 @@ net.tethering.noprovisioning=true
|
|||
ro.lineage.build.vendor_security_patch=2017-08-01
|
||||
|
||||
# WiFi
|
||||
ro.disableWifiApFirmwareReload=true
|
||||
wifi.interface=wlan0
|
||||
|
|
4
twrp.mk
4
twrp.mk
|
@ -17,8 +17,8 @@ TARGET_RECOVERY_DEVICE_DIRS += $(COMMON_PATH)/twrp
|
|||
RECOVERY_SDCARD_ON_DATA := true
|
||||
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
|
||||
TARGET_RECOVERY_QCOM_RTC_FIX := true
|
||||
TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/msm_dwc3/f9200000.dwc3/gadget/lun%d/file"
|
||||
TW_BRIGHTNESS_PATH := "/sys/devices/mdp.0/qcom\x2cmdss_fb_primary.191/leds/lcd-backlight/brightness"
|
||||
TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/platform/msm_hsusb/gadget/lun%d/file"
|
||||
TW_BRIGHTNESS_PATH := "/sys/class/leds/lcd-backlight/brightness"
|
||||
TW_DEFAULT_BRIGHTNESS := 162
|
||||
TW_HAS_DOWNLOAD_MODE := true
|
||||
TW_INCLUDE_CRYPTO := true
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
/modem vfat /dev/block/platform/msm_sdcc.1/by-name/modem /dev/block/platform/msm_sdcc.1/by-name/mdm flags=backup=1;display="Modem";fsflags=ro,context=u:object_r:firmware_file:s0
|
||||
/firmware vfat /dev/block/platform/msm_sdcc.1/by-name/apnhlos flags=backup=1;subpartitionof=/modem;mounttodecrypt;fsflags=ro,context=u:object_r:firmware_file:s0
|
||||
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot
|
||||
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery
|
||||
/misc emmc /dev/block/platform/msm_sdcc.1/by-name/fota
|
||||
/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system
|
||||
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata flags=encryptable=footer;length=-16384
|
||||
/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache
|
||||
/efs ext4 /dev/block/platform/msm_sdcc.1/by-name/efs flags=backup=1;display="EFS"
|
||||
/modemst1 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst1 flags=backup=1;subpartitionof=/efs
|
||||
/modemst2 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst2 flags=backup=1;subpartitionof=/efs
|
||||
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
|
||||
/usbstorage vfat /dev/block/sda1 /dev/block/sda flags=display="USB Storage";storage;wipeingui;removable
|
||||
/boot emmc /dev/block/platform/msm_sdcc.1/by-name/boot
|
||||
/recovery emmc /dev/block/platform/msm_sdcc.1/by-name/recovery flags=backup=1
|
||||
/system ext4 /dev/block/platform/msm_sdcc.1/by-name/system
|
||||
/data ext4 /dev/block/platform/msm_sdcc.1/by-name/userdata length=-16384
|
||||
/cache ext4 /dev/block/platform/msm_sdcc.1/by-name/cache
|
||||
/efs1 emmc /dev/block/platform/msm_sdcc.1/by-name/efs flags=backup=1;display=EFS
|
||||
/efs2 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst1 flags=backup=1;subpartitionof=/efs1
|
||||
/efs3 emmc /dev/block/platform/msm_sdcc.1/by-name/modemst2 flags=backup=1;subpartitionof=/efs1
|
||||
/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable
|
||||
/modem emmc /dev/block/platform/msm_sdcc.1/by-name/modem flags=backup=1;display="Modem"
|
||||
/preload ext4 /dev/block/mmcblk0p25 flags=display="Preload";wipeingui;backup=1
|
||||
/usbstorage vfat /dev/block/sda1 flags=display="USB Storage";storage;removable
|
||||
|
|
Loading…
Reference in a new issue