├── Android.mk
├── BoardConfigCommon.mk
├── README
├── audio
├── audio_effects.xml
├── audio_platform_info.xml
├── audio_policy_configuration.xml
└── mixer_paths.xml
├── bluetooth
├── bdroid_buildcfg.h
└── vnd_klte.txt
├── camera
├── Android.mk
└── CameraWrapper.cpp
├── common-proprietary-files-pn547.txt
├── common-proprietary-files-ril-m.txt
├── common-proprietary-files.txt
├── config.fs
├── configs
├── media_codecs_performance.xml
├── media_profiles_V1_0.xml
├── p2p_supplicant_overlay.conf
├── sensors
│ └── _hals.conf
├── thermal-engine-8974.conf
└── wpa_supplicant_overlay.conf
├── extract-files.sh
├── fingerprint
├── Android.mk
├── QSEEComAPI.c
├── QSEEComAPI.h
├── board.mk
├── fingerprint.c
├── fingerprint_common.h
├── fingerprint_tz.c
├── fingerprint_tz.h
├── fp_klte.h
├── hash.c
├── hash.h
├── product.mk
└── vfs61xx_ioctl.h
├── include
├── device_perms.h
├── samsung_ir.h
├── samsung_lights.h
├── samsung_macloader.h
└── telephony
│ └── ril.h
├── keylayout
├── gpio-keys.kl
└── sec_touchkey.kl
├── klte.mk
├── libshims
├── Android.mk
└── libshim_camera
│ ├── Android.mk
│ └── camera_shim.c
├── lineage.dependencies
├── manifest.xml
├── nfc
├── Android.mk
├── bcm2079x
│ ├── board.mk
│ ├── libnfc-brcm-20791b04.conf
│ ├── libnfc-brcm-20791b05.conf
│ ├── libnfc-nci.conf
│ └── product.mk
├── board.mk
├── manifest.xml
├── nfcee_access.xml
├── pn547
│ ├── Android.mk
│ ├── board.mk
│ ├── libnfc-nci.conf
│ ├── libnfc-nxp.conf
│ ├── product.mk
│ └── src
│ │ ├── Android.mk
│ │ └── libpn547_fw.c
└── product.mk
├── overlay-lineage
├── frameworks
│ └── base
│ │ └── core
│ │ └── res
│ │ └── res
│ │ └── values
│ │ └── config.xml
└── lineage-sdk
│ └── lineage
│ └── res
│ └── res
│ └── values
│ └── config.xml
├── overlay
├── frameworks
│ ├── base
│ │ ├── core
│ │ │ └── res
│ │ │ │ └── res
│ │ │ │ ├── values
│ │ │ │ ├── config.xml
│ │ │ │ └── strings.xml
│ │ │ │ └── xml
│ │ │ │ └── power_profile.xml
│ │ └── packages
│ │ │ └── SettingsProvider
│ │ │ └── res
│ │ │ └── values
│ │ │ └── config.xml
│ └── opt
│ │ └── net
│ │ └── wifi
│ │ └── service
│ │ └── res
│ │ └── values
│ │ └── config.xml
└── packages
│ ├── apps
│ ├── Dialer
│ │ └── java
│ │ │ └── com
│ │ │ └── android
│ │ │ └── dialer
│ │ │ └── callrecord
│ │ │ └── res
│ │ │ └── values
│ │ │ └── config.xml
│ ├── FlipFlap
│ │ └── res
│ │ │ └── values
│ │ │ ├── config.xml
│ │ │ └── dimens.xml
│ ├── Settings
│ │ └── res
│ │ │ └── values
│ │ │ ├── bools.xml
│ │ │ ├── config.xml
│ │ │ └── dimens.xml
│ └── Snap
│ │ └── res
│ │ └── values
│ │ ├── config.xml
│ │ └── qcomstrings.xml
│ └── services
│ └── Telephony
│ └── res
│ └── values
│ └── config.xml
├── radio
├── dual
│ ├── board.mk
│ ├── manifest.xml
│ ├── product.mk
│ └── system.prop
└── single
│ ├── board.mk
│ └── manifest.xml
├── recovery
└── recovery_keys.c
├── rootdir
├── Android.mk
└── etc
│ ├── fstab.qcom
│ ├── init.qcom.rc
│ ├── init.qcom.usb.rc
│ └── ueventd.qcom.rc
├── sepolicy
├── common
│ ├── device.te
│ ├── file.te
│ ├── file_contexts
│ ├── hal_fingerprint_default.te
│ ├── init.te
│ ├── kernel.te
│ └── tee.te
└── sepolicy.mk
├── setup-makefiles.sh
└── system.prop
/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2014 The CyanogenMod Project
3 | # Copyright (C) 2021 The LineageOS Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | LOCAL_PATH := $(call my-dir)
19 |
20 | ifneq ($(filter klte klteactivexx klteaio kltechn kltechnduo klteduos kltedv kltekdi kltekor,$(TARGET_DEVICE)),)
21 | include $(call all-subdir-makefiles,$(LOCAL_PATH))
22 | endif
23 |
--------------------------------------------------------------------------------
/BoardConfigCommon.mk:
--------------------------------------------------------------------------------
1 | # Copyright (C) 2016 The CyanogenMod Project
2 | # Copyright (C) 2017,2021 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 |
16 | # inherit from common msm8974
17 | include device/samsung/msm8974-common/BoardConfigCommon.mk
18 |
19 | COMMON_PATH := device/samsung/klte-common
20 |
21 | TARGET_SPECIFIC_HEADER_PATH := $(COMMON_PATH)/include
22 |
23 | BUILD_FINGERPRINT := samsung/kltexx/klte:6.0.1/MMB29M/G900FXXU1CRH1:user/release-keys
24 |
25 | # Audio
26 | USE_CUSTOM_AUDIO_POLICY := 1
27 |
28 | # Bluetooth
29 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(COMMON_PATH)/bluetooth
30 | BOARD_CUSTOM_BT_CONFIG := $(COMMON_PATH)/bluetooth/vnd_klte.txt
31 | BOARD_HAVE_BLUETOOTH_BCM := true
32 | BOARD_HAVE_SAMSUNG_BLUETOOTH := true
33 |
34 | # Bootloader
35 | TARGET_BOOTLOADER_BOARD_NAME := MSM8974
36 |
37 | # Filesystem
38 | TARGET_FS_CONFIG_GEN += $(COMMON_PATH)/config.fs
39 |
40 | # HIDL
41 | DEVICE_MANIFEST_FILE += $(COMMON_PATH)/manifest.xml
42 |
43 | # Kernel
44 | BOARD_KERNEL_BASE := 0x00000000
45 | 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
46 | BOARD_KERNEL_IMAGE_NAME := zImage
47 | BOARD_KERNEL_PAGESIZE := 2048
48 | BOARD_KERNEL_SEPARATED_DT := true
49 | BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000 --tags_offset 0x01e00000
50 | BOARD_CUSTOM_BOOTIMG := true
51 | BOARD_CUSTOM_BOOTIMG_MK := hardware/samsung/mkbootimg.mk
52 | BOARD_RAMDISK_USE_XZ := true
53 | TARGET_KERNEL_SOURCE := kernel/samsung/msm8974
54 |
55 | # Legacy BLOB Support
56 | TARGET_LD_SHIM_LIBS += \
57 | /system/vendor/lib/hw/camera.vendor.msm8974.so|libshim_camera.so \
58 | /system/vendor/lib/libperipheral_client.so|libshim_binder.so
59 | TARGET_PROCESS_SDK_VERSION_OVERRIDE += \
60 | /system/bin/mediaserver=22 \
61 | /system/vendor/bin/mm-qcamera-daemon=22 \
62 | /system/vendor/bin/hw/rild=27
63 |
64 | # Partitions
65 | BOARD_BOOTIMAGE_PARTITION_SIZE := 13631488
66 | BOARD_CACHEIMAGE_PARTITION_SIZE := 157286400
67 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 15728640
68 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2411724800
69 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 2411724800
70 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
71 | BOARD_FLASH_BLOCK_SIZE := 131072
72 | BOARD_ROOT_EXTRA_FOLDERS := efs firmware firmware-modem
73 | BOARD_ROOT_EXTRA_SYMLINKS := \
74 | /data/tombstones:/tombstones
75 | TARGET_USERIMAGES_USE_EXT4 := true
76 | TARGET_USERIMAGES_USE_F2FS := true
77 |
78 | # Properties
79 | TARGET_SYSTEM_PROP += $(COMMON_PATH)/system.prop
80 |
81 | # Radio
82 | BOARD_PROVIDES_LIBRIL := true
83 |
84 | # Recovery
85 | BOARD_CUSTOM_RECOVERY_KEYMAPPING := ../../$(COMMON_PATH)/recovery/recovery_keys.c
86 | BOARD_USES_MMCUTILS := true
87 | BOARD_HAS_LARGE_FILESYSTEM := true
88 | BOARD_HAS_NO_MISC_PARTITION := true
89 | BOARD_HAS_NO_SELECT_BUTTON := true
90 | BOARD_RECOVERY_SWIPE := true
91 | TARGET_RECOVERY_DENSITY := xhdpi
92 | TARGET_RECOVERY_FSTAB := $(COMMON_PATH)/rootdir/etc/fstab.qcom
93 |
94 | # SELinux
95 | include $(COMMON_PATH)/sepolicy/sepolicy.mk
96 |
97 | # Sensors
98 | TARGET_NO_SENSOR_PERMISSION_CHECK := true
99 |
100 | # Wifi
101 | BOARD_HAVE_SAMSUNG_WIFI := true
102 | BOARD_WLAN_DEVICE := bcmdhd
103 | BOARD_HOSTAPD_DRIVER := NL80211
104 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
105 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211
106 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
107 | WPA_SUPPLICANT_VERSION := VER_0_8_X
108 | WIFI_BAND := 802_11_ABG
109 | WIFI_DRIVER_MODULE_ARG := "firmware_path=/vendor/etc/wifi/bcmdhd_sta.bin nvram_path=/vendor/etc/wifi/nvram_net.txt"
110 | WIFI_DRIVER_MODULE_AP_ARG := "firmware_path=/vendor/etc/wifi/bcmdhd_apsta.bin nvram_path=/vendor/etc/wifi/nvram_net.txt"
111 | WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/dhd/parameters/firmware_path"
112 | WIFI_DRIVER_FW_PATH_STA := "/vendor/etc/wifi/bcmdhd_sta.bin"
113 | WIFI_DRIVER_FW_PATH_AP := "/vendor/etc/wifi/bcmdhd_apsta.bin"
114 | WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := true
115 |
116 | # inherit from the proprietary version
117 | include vendor/samsung/klte-common/BoardConfigVendor.mk
118 |
--------------------------------------------------------------------------------
/README:
--------------------------------------------------------------------------------
1 | Copyright 2014 - The CyanogenMod Project
2 |
3 | Common device configuration for Samsung Galaxy S5.
4 |
5 | WORK IN PROGRESS. WILL EAT YOUR CAT.
6 |
--------------------------------------------------------------------------------
/audio/audio_effects.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/audio/audio_platform_info.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
--------------------------------------------------------------------------------
/audio/audio_policy_configuration.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
48 |
49 |
50 |
51 |
52 | - Earpiece
53 | - Speaker
54 | - Telephony Tx
55 | - Built-In Mic
56 | - Built-In Back Mic
57 | - Telephony Rx
58 |
59 | Speaker
60 |
61 |
62 |
64 |
65 |
67 |
69 |
70 |
71 |
74 |
75 |
77 |
80 |
81 |
82 |
83 |
86 |
87 |
88 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
99 |
100 |
101 |
103 |
104 |
105 |
107 |
108 |
109 |
111 |
112 |
113 |
115 |
116 |
117 |
119 |
120 |
121 |
123 |
124 |
125 |
127 |
128 |
129 |
131 |
132 |
133 |
135 |
136 |
137 |
139 |
140 |
141 |
142 |
145 |
146 |
147 |
150 |
151 |
152 |
155 |
156 |
157 |
159 |
160 |
161 |
163 |
164 |
165 |
166 |
167 |
169 |
171 |
173 |
175 |
177 |
179 |
181 |
183 |
185 |
187 |
189 |
191 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
--------------------------------------------------------------------------------
/bluetooth/bdroid_buildcfg.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 The Android Open Source Project
3 | * Copyright (C) 2012 The CyanogenMod Project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | #ifndef _BDROID_BUILDCFG_H
19 | #define _BDROID_BUILDCFG_H
20 |
21 | #define BTM_DEF_LOCAL_NAME "Samsung Galaxy S5"
22 |
23 | #define BTA_DISABLE_DELAY 1000 /* in milliseconds */
24 |
25 | #define BTM_WBS_INCLUDED TRUE /* Enable WBS */
26 | #define BTIF_HF_WBS_PREFERRED TRUE /* Use WBS */
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/bluetooth/vnd_klte.txt:
--------------------------------------------------------------------------------
1 | BLUETOOTH_UART_DEVICE_PORT = "/dev/ttyHS0"
2 | BTHW_DBG = TRUE
3 | BT_WAKE_VIA_PROC = TRUE
4 | BT_WAKE_VIA_PROC_NOTIFY_DEASSERT=TRUE
5 | FW_PATCHFILE_LOCATION = "/vendor/firmware"
6 | FW_PATCH_SETTLEMENT_DELAY_MS = 100
7 | LPM_COMBINE_SLEEP_MODE_AND_LPM = 0
8 | LPM_IDLE_TIMEOUT_MULTIPLE = 5
9 | PROC_BTWRITE_TIMER_TIMEOUT_MS = 0
10 | SCO_WBS_SAMPLE_RATE = 0
11 | UART_FORCE_TWO_STOPBITS = TRUE
12 | UART_TARGET_BAUD_RATE = 3000000
13 | USE_AXI_BRIDGE_LOCK = TRUE
14 |
--------------------------------------------------------------------------------
/camera/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 | include $(CLEAR_VARS)
3 |
4 | LOCAL_C_INCLUDES := \
5 | system/media/camera/include
6 |
7 | LOCAL_SRC_FILES := \
8 | CameraWrapper.cpp
9 |
10 | LOCAL_STATIC_LIBRARIES := libbase libarect
11 | LOCAL_SHARED_LIBRARIES := \
12 | libhardware libgui liblog libcamera_client libutils libcutils libdl \
13 | android.hidl.token@1.0-utils \
14 | android.hardware.graphics.bufferqueue@1.0
15 |
16 | LOCAL_HEADER_LIBRARIES := libnativebase_headers
17 |
18 | LOCAL_MODULE := camera.$(TARGET_BOARD_PLATFORM)
19 | LOCAL_MODULE_RELATIVE_PATH := hw
20 | LOCAL_MODULE_TAGS := optional
21 | LOCAL_PROPRIETARY_MODULE := true
22 |
23 | include $(BUILD_SHARED_LIBRARY)
24 |
--------------------------------------------------------------------------------
/common-proprietary-files-pn547.txt:
--------------------------------------------------------------------------------
1 | # Built from Lineage-15.1 sources
2 | vendor/lib/hw/nfc_nci.msm8974.so|7dcb79a385dd1155cb9b6310a3e7b85b7dc8db13
3 |
--------------------------------------------------------------------------------
/common-proprietary-files-ril-m.txt:
--------------------------------------------------------------------------------
1 | # Samsung Package Version: G900FXXU1CSA1_G900FVIA1CSC1_VIA, unless pinned
2 |
3 | # Qualcomm Framework
4 | lib/libmdmdetect.so:vendor/lib/libmdmdetect.so
5 | vendor/lib/libconfigdb.so
6 | vendor/lib/libdiag.so
7 | vendor/lib/libdsutils.so
8 | vendor/lib/libidl.so
9 | vendor/lib/libnetmgr.so
10 | vendor/lib/libqcci_legacy.so
11 | vendor/lib/libqmi.so
12 | vendor/lib/libqmi_cci.so
13 | vendor/lib/libqmi_client_qmux.so
14 | vendor/lib/libqmi_common_so.so
15 | vendor/lib/libqmi_csi.so
16 | vendor/lib/libqmi_encdec.so
17 | vendor/lib/libqmiservices.so
18 |
19 | # Radio
20 | bin/efsks:vendor/bin/efsks
21 | bin/ks:vendor/bin/ks
22 | bin/qcks:vendor/bin/qcks
23 | bin/qmuxd:vendor/bin/qmuxd
24 | bin/rfs_access:vendor/bin/rfs_access
25 | bin/rmt_storage:vendor/bin/rmt_storage
26 | lib/libprotobuf-cpp-full.so:vendor/lib/libprotobuf-cpp-full-v23.so
27 | vendor/lib/libril-qcril-hook-oem.so
28 |
--------------------------------------------------------------------------------
/common-proprietary-files.txt:
--------------------------------------------------------------------------------
1 | # Samsung Package Version: G900FXXU1CSA1_G900FVIA1CSC1_VIA, unless pinned
2 |
3 | # Activity recognition
4 | vendor/lib/libsensor1.so
5 |
6 | # Audio
7 | vendor/lib/libacdbloader.so|27ceba70917afc0e9b26877354c8404dae5af09c
8 | vendor/lib/libacdbrtac.so
9 | vendor/lib/libadiertac.so
10 | vendor/lib/libaudcal.so
11 | etc/firmware/audience-es705-fw.bin:vendor/firmware/audience-es705-fw.bin
12 | etc/firmware/audience-es705-vs.bin:vendor/firmware/audience-es705-vs.bin
13 | etc/Bluetooth_cal.acdb:vendor/etc/acdbdata/Bluetooth_cal.acdb
14 | etc/General_cal.acdb:vendor/etc/acdbdata/General_cal.acdb
15 | etc/Global_cal.acdb:vendor/etc/acdbdata/Global_cal.acdb
16 | etc/Handset_cal.acdb:vendor/etc/acdbdata/Handset_cal.acdb
17 | etc/Hdmi_cal.acdb:vendor/etc/acdbdata/Hdmi_cal.acdb
18 | etc/Headset_cal.acdb:vendor/etc/acdbdata/Headset_cal.acdb
19 | etc/Speaker_cal.acdb:vendor/etc/acdbdata/Speaker_cal.acdb
20 | vendor/lib/soundfx/libqcbassboost.so
21 | vendor/lib/soundfx/libqcvirt.so
22 | vendor/lib/soundfx/libqcreverb.so
23 |
24 | # ADSP
25 | bin/adsprpcd:vendor/bin/adsprpcd
26 | vendor/lib/libadsprpc.so
27 | vendor/lib/libfastcvadsp_stub.so
28 | vendor/lib/libfastcvopt.so
29 | vendor/lib/rfsa/adsp/libadsp_fd_skel.so
30 |
31 | # Bluetooth firmware - Pinned to G900VVRU2DQH2_G900VVZW2DQH2_VZW
32 | vendor/firmware/bcm4350_V0395.0797.hcd|ff51604a8fc4cd1179d1ac869f517a413baad27f
33 | vendor/firmware/bcm4350_V0395.0797_murata.hcd|ff51604a8fc4cd1179d1ac869f517a413baad27f
34 | vendor/firmware/bcm4350_V0395.0797_semco.hcd|ff51604a8fc4cd1179d1ac869f517a413baad27f
35 | vendor/firmware/bcm4350_V0395.0797_semco3rd.hcd|ff51604a8fc4cd1179d1ac869f517a413baad27f
36 | vendor/firmware/bcm4350_V0395.0797_semcosh.hcd|ff51604a8fc4cd1179d1ac869f517a413baad27f
37 | vendor/firmware/bcm4350_V0395.0798_wisol.hcd|c4a2f642b274de774014aafacf3ed4253b000aa9
38 |
39 | # Camera
40 | bin/mm-qcamera-daemon:vendor/bin/mm-qcamera-daemon
41 | lib/hw/camera.msm8974.so:vendor/lib/hw/camera.vendor.msm8974.so
42 | lib/libarcsoft_nighthawk.so:vendor/lib/libarcsoft_nighthawk.so
43 | lib/libliveframework.so:vendor/lib/libliveframework.so
44 | lib/libmmcamera2_stats_algorithm.so:vendor/lib/libmmcamera2_stats_algorithm.so
45 | lib/libmmcamera_cac3_lib.so:vendor/lib/libmmcamera_cac3_lib.so
46 | lib/libmmcamera_fidelix_eeprom.so:vendor/lib/libmmcamera_fidelix_eeprom.so
47 | lib/libmmcamera_interface.so:vendor/lib/libmmcamera_interface.so
48 | lib/libmmipl.so:vendor/lib/libmmipl.so
49 | lib/libmmjpeg_interface.so:vendor/lib/libmmjpeg_interface.so
50 | lib/libmmqjpeg_codec.so:vendor/lib/libmmqjpeg_codec.so
51 | lib/libqomx_core.so:vendor/lib/libqomx_core.so
52 | lib/libqomx_jpegenc.so:vendor/lib/libqomx_jpegenc.so
53 | lib/libvdis.so:vendor/lib/libvdis.so
54 | vendor/lib/libactuator_ak7345_camcorder.so
55 | vendor/lib/libactuator_ak7345_camera.so
56 | vendor/lib/libactuator_dw9714_camcorder.so
57 | vendor/lib/libactuator_dw9714_camera.so
58 | vendor/lib/libactuator_dw9716_camcorder.so
59 | vendor/lib/libactuator_dw9716_camera.so
60 | vendor/lib/libactuator_wv560_camcorder.so
61 | vendor/lib/libactuator_wv560_camera.so
62 | vendor/lib/libmmcamera2_c2d_module.so
63 | vendor/lib/libmmcamera2_companion_s5k2p2xx.so
64 | vendor/lib/libmmcamera2_companion_imx240.so
65 | vendor/lib/libmmcamera2_cpp_module.so
66 | vendor/lib/libmmcamera2_iface_modules.so
67 | vendor/lib/libmmcamera2_imglib_modules.so
68 | vendor/lib/libmmcamera2_isp_modules.so
69 | vendor/lib/libmmcamera2_pproc_modules.so
70 | vendor/lib/libmmcamera2_sensor_modules.so
71 | vendor/lib/libmmcamera2_stats_modules.so
72 | vendor/lib/libmmcamera2_vpe_module.so
73 | vendor/lib/libmmcamera2_wnr_module.so
74 | vendor/lib/libmmcamera_faceproc.so
75 | vendor/lib/libmmcamera_image_stab.so
76 | vendor/lib/libmmcamera_imglib_faceproc_adspstub.so
77 | vendor/lib/libmmcamera_imglib.so
78 | vendor/lib/libmmcamera_imx240.so
79 | vendor/lib/libmmcamera_s5k2p2xx.so
80 | vendor/lib/libmmcamera_s5k8b1yx.so
81 | vendor/lib/liboemcamera.so
82 |
83 | # Camera chromatix
84 | lib/C16QL_libchromatix_s5k2p2xx_default_video.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_default_video.so
85 | lib/C16QL_libchromatix_s5k2p2xx_golfshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_golfshot.so
86 | lib/C16QL_libchromatix_s5k2p2xx_hdr_liveshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hdr_liveshot.so
87 | lib/C16QL_libchromatix_s5k2p2xx_hdr_preview.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hdr_preview.so
88 | lib/C16QL_libchromatix_s5k2p2xx_hdr_uhd_video.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hdr_uhd_video.so
89 | lib/C16QL_libchromatix_s5k2p2xx_hdr_video.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hdr_video.so
90 | lib/C16QL_libchromatix_s5k2p2xx_hdr_zslshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hdr_zslshot.so
91 | lib/C16QL_libchromatix_s5k2p2xx_hfr_120.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hfr_120.so
92 | lib/C16QL_libchromatix_s5k2p2xx_hfr_1080p_b.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hfr_1080p_b.so
93 | lib/C16QL_libchromatix_s5k2p2xx_hfr_1080p_s.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_hfr_1080p_s.so
94 | lib/C16QL_libchromatix_s5k2p2xx_liveshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_liveshot.so
95 | lib/C16QL_libchromatix_s5k2p2xx_pip.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_pip.so
96 | lib/C16QL_libchromatix_s5k2p2xx_preview.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_preview.so
97 | lib/C16QL_libchromatix_s5k2p2xx_shotmode_preview.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_shotmode_preview.so
98 | lib/C16QL_libchromatix_s5k2p2xx_shotmode_zslshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_shotmode_zslshot.so
99 | lib/C16QL_libchromatix_s5k2p2xx_snapshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_snapshot.so
100 | lib/C16QL_libchromatix_s5k2p2xx_uhd_video.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_uhd_video.so
101 | lib/C16QL_libchromatix_s5k2p2xx_vt.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_vt.so
102 | lib/C16QL_libchromatix_s5k2p2xx_vt_hd.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_vt_hd.so
103 | lib/C16QL_libchromatix_s5k2p2xx_zslshot.so:vendor/lib/C16QL_libchromatix_s5k2p2xx_zslshot.so
104 | lib/C16QL_libTsAe.so:vendor/lib/C16QL_libTsAe.so
105 | lib/C16QL_libTsAf.so:vendor/lib/C16QL_libTsAf.so
106 | lib/C16QL_libTs_J_Accm.so:vendor/lib/C16QL_libTs_J_Accm.so
107 | lib/C16QL_libTs_J_Awb.so:vendor/lib/C16QL_libTs_J_Awb.so
108 | lib/F16QL_libchromatix_s5k2p2xx_default_video.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_default_video.so
109 | lib/F16QL_libchromatix_s5k2p2xx_golfshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_golfshot.so
110 | lib/F16QL_libchromatix_s5k2p2xx_hdr_liveshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hdr_liveshot.so
111 | lib/F16QL_libchromatix_s5k2p2xx_hdr_preview.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hdr_preview.so
112 | lib/F16QL_libchromatix_s5k2p2xx_hdr_uhd_video.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hdr_uhd_video.so
113 | lib/F16QL_libchromatix_s5k2p2xx_hdr_video.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hdr_video.so
114 | lib/F16QL_libchromatix_s5k2p2xx_hdr_zslshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hdr_zslshot.so
115 | lib/F16QL_libchromatix_s5k2p2xx_hfr_120.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hfr_120.so
116 | lib/F16QL_libchromatix_s5k2p2xx_hfr_1080p_b.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hfr_1080p_b.so
117 | lib/F16QL_libchromatix_s5k2p2xx_hfr_1080p_s.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_hfr_1080p_s.so
118 | lib/F16QL_libchromatix_s5k2p2xx_liveshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_liveshot.so
119 | lib/F16QL_libchromatix_s5k2p2xx_lowres_zslshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_lowres_zslshot.so
120 | lib/F16QL_libchromatix_s5k2p2xx_pip.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_pip.so
121 | lib/F16QL_libchromatix_s5k2p2xx_preview.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_preview.so
122 | lib/F16QL_libchromatix_s5k2p2xx_shotmode_preview.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_shotmode_preview.so
123 | lib/F16QL_libchromatix_s5k2p2xx_shotmode_zslshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_shotmode_zslshot.so
124 | lib/F16QL_libchromatix_s5k2p2xx_snapshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_snapshot.so
125 | lib/F16QL_libchromatix_s5k2p2xx_uhd_video.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_uhd_video.so
126 | lib/F16QL_libchromatix_s5k2p2xx_vt.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_vt.so
127 | lib/F16QL_libchromatix_s5k2p2xx_vt_hd.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_vt_hd.so
128 | lib/F16QL_libchromatix_s5k2p2xx_zslshot.so:vendor/lib/F16QL_libchromatix_s5k2p2xx_zslshot.so
129 | lib/F16QL_libTsAe.so:vendor/lib/F16QL_libTsAe.so
130 | lib/F16QL_libTsAf.so:vendor/lib/F16QL_libTsAf.so
131 | lib/F16QL_libTs_J_Accm.so:vendor/lib/F16QL_libTs_J_Accm.so
132 | lib/F16QL_libTs_J_Awb.so:vendor/lib/F16QL_libTs_J_Awb.so
133 | lib/F16QS_libchromatix_imx240_default_video.so:vendor/lib/F16QS_libchromatix_imx240_default_video.so
134 | lib/F16QS_libchromatix_imx240_golfshot.so:vendor/lib/F16QS_libchromatix_imx240_golfshot.so
135 | lib/F16QS_libchromatix_imx240_hdr_liveshot.so:vendor/lib/F16QS_libchromatix_imx240_hdr_liveshot.so
136 | lib/F16QS_libchromatix_imx240_hdr_preview.so:vendor/lib/F16QS_libchromatix_imx240_hdr_preview.so
137 | lib/F16QS_libchromatix_imx240_hdr_uhd_video.so:vendor/lib/F16QS_libchromatix_imx240_hdr_uhd_video.so
138 | lib/F16QS_libchromatix_imx240_hdr_video.so:vendor/lib/F16QS_libchromatix_imx240_hdr_video.so
139 | lib/F16QS_libchromatix_imx240_hdr_zslshot.so:vendor/lib/F16QS_libchromatix_imx240_hdr_zslshot.so
140 | lib/F16QS_libchromatix_imx240_hfr_120.so:vendor/lib/F16QS_libchromatix_imx240_hfr_120.so
141 | lib/F16QS_libchromatix_imx240_hfr_1080p_b.so:vendor/lib/F16QS_libchromatix_imx240_hfr_1080p_b.so
142 | lib/F16QS_libchromatix_imx240_hfr_1080p_s.so:vendor/lib/F16QS_libchromatix_imx240_hfr_1080p_s.so
143 | lib/F16QS_libchromatix_imx240_liveshot.so:vendor/lib/F16QS_libchromatix_imx240_liveshot.so
144 | lib/F16QS_libchromatix_imx240_lowres_zslshot.so:vendor/lib/F16QS_libchromatix_imx240_lowres_zslshot.so
145 | lib/F16QS_libchromatix_imx240_pip.so:vendor/lib/F16QS_libchromatix_imx240_pip.so
146 | lib/F16QS_libchromatix_imx240_preview.so:vendor/lib/F16QS_libchromatix_imx240_preview.so
147 | lib/F16QS_libchromatix_imx240_shotmode_preview.so:vendor/lib/F16QS_libchromatix_imx240_shotmode_preview.so
148 | lib/F16QS_libchromatix_imx240_shotmode_zslshot.so:vendor/lib/F16QS_libchromatix_imx240_shotmode_zslshot.so
149 | lib/F16QS_libchromatix_imx240_snapshot.so:vendor/lib/F16QS_libchromatix_imx240_snapshot.so
150 | lib/F16QS_libchromatix_imx240_uhd_video.so:vendor/lib/F16QS_libchromatix_imx240_uhd_video.so
151 | lib/F16QS_libchromatix_imx240_vt.so:vendor/lib/F16QS_libchromatix_imx240_vt.so
152 | lib/F16QS_libchromatix_imx240_vt_hd.so:vendor/lib/F16QS_libchromatix_imx240_vt_hd.so
153 | lib/F16QS_libchromatix_imx240_zslshot.so:vendor/lib/F16QS_libchromatix_imx240_zslshot.so
154 | lib/F16QS_libTsAe.so:vendor/lib/F16QS_libTsAe.so
155 | lib/F16QS_libTsAf.so:vendor/lib/F16QS_libTsAf.so
156 | lib/F16QS_libTs_J_Accm.so:vendor/lib/F16QS_libTs_J_Accm.so
157 | lib/F16QS_libTs_J_Awb.so:vendor/lib/F16QS_libTs_J_Awb.so
158 | lib/libTsAe.so:vendor/lib/libTsAe.so
159 | lib/libTsAf.so:vendor/lib/libTsAf.so
160 | lib/libTs_J_Accm.so:vendor/lib/libTs_J_Accm.so
161 | lib/libTs_J_Awb.so:vendor/lib/libTs_J_Awb.so
162 | vendor/lib/C16QL_libchromatix_s5k2p2xx_common.so
163 | vendor/lib/C16QL_libchromatix_s5k2p2xx_common_res0.so
164 | vendor/lib/C16QL_libchromatix_s5k2p2xx_common_res1.so
165 | vendor/lib/C16QL_libchromatix_s5k2p2xx_common_res2.so
166 | vendor/lib/C16QL_libchromatix_s5k2p2xx_common_res3.so
167 | vendor/lib/F16QL_libchromatix_s5k2p2xx_common.so
168 | vendor/lib/F16QL_libchromatix_s5k2p2xx_common_res0.so
169 | vendor/lib/F16QL_libchromatix_s5k2p2xx_common_res1.so
170 | vendor/lib/F16QL_libchromatix_s5k2p2xx_common_res2.so
171 | vendor/lib/F16QL_libchromatix_s5k2p2xx_common_res3.so
172 | vendor/lib/F16QS_libchromatix_imx240_common.so
173 | vendor/lib/F16QS_libchromatix_imx240_common_res0.so
174 | vendor/lib/F16QS_libchromatix_imx240_common_res1.so
175 | vendor/lib/F16QS_libchromatix_imx240_common_res2.so
176 | vendor/lib/F16QS_libchromatix_imx240_common_res3.so
177 | vendor/lib/libchromatix_s5k8b1yx_common.so
178 | vendor/lib/libchromatix_s5k8b1yx_pip.so
179 | vendor/lib/libchromatix_s5k8b1yx_preview.so
180 | vendor/lib/libchromatix_s5k8b1yx_smart_stay.so
181 | vendor/lib/libchromatix_s5k8b1yx_snapshot.so
182 | vendor/lib/libchromatix_s5k8b1yx_video.so
183 | vendor/lib/libchromatix_s5k8b1yx_vt_beauty.so
184 | vendor/lib/libchromatix_s5k8b1yx_vt_hd.so
185 | vendor/lib/libchromatix_s5k8b1yx_vt.so
186 | vendor/lib/libchromatix_s5k8b1yx_zslshot.so
187 |
188 | # Camera firmware
189 | cameradata/C16QL_Isp0_s5k2p2xx.bin:vendor/cameradata/C16QL_Isp0_s5k2p2xx.bin
190 | cameradata/C16QL_Isp1_s5k2p2xx.bin:vendor/cameradata/C16QL_Isp1_s5k2p2xx.bin
191 | cameradata/F16QL_Isp0_s5k2p2xx.bin:vendor/cameradata/F16QL_Isp0_s5k2p2xx.bin
192 | cameradata/F16QL_Isp1_s5k2p2xx.bin:vendor/cameradata/F16QL_Isp1_s5k2p2xx.bin
193 | cameradata/F16QS_Isp0_imx240.bin:vendor/cameradata/F16QS_Isp0_imx240.bin
194 | cameradata/F16QS_Isp1_imx240.bin:vendor/cameradata/F16QS_Isp1_imx240.bin
195 | cameradata/Master0.bin:vendor/cameradata/Master0.bin
196 | cameradata/Master1.bin:vendor/cameradata/Master1.bin
197 | cameradata/cal_data_LSCmaster.bin:vendor/cameradata/cal_data_LSCmaster.bin
198 | cameradata/datapattern_420sp.yuv:vendor/cameradata/datapattern_420sp.yuv
199 | cameradata/datapattern_front_420sp.yuv:vendor/cameradata/datapattern_front_420sp.yuv
200 | etc/C16QL_s5k2p2xx_module_info.xml:vendor/etc/C16QL_s5k2p2xx_module_info.xml
201 | etc/F16QL_s5k2p2xx_module_info.xml:vendor/etc/F16QL_s5k2p2xx_module_info.xml
202 | etc/F16QS_imx240_module_info.xml:vendor/etc/F16QS_imx240_module_info.xml
203 | etc/firmware/cpp_firmware_v1_1_1.fw:vendor/firmware/cpp_firmware_v1_1_1.fw
204 | etc/firmware/cpp_firmware_v1_1_6.fw:vendor/firmware/cpp_firmware_v1_1_6.fw
205 | etc/firmware/cpp_firmware_v1_2_0.fw:vendor/firmware/cpp_firmware_v1_2_0.fw
206 |
207 | # CPU
208 | bin/mpdecision:vendor/bin/mpdecision
209 | vendor/bin/thermal-engine
210 | vendor/lib/libthermalclient.so
211 | vendor/lib/libthermalioctl.so
212 |
213 | # DRM
214 | bin/qseecomd:vendor/bin/qseecomd
215 | vendor/lib/libdrmdiag.so
216 | vendor/lib/libdrmfs.so
217 | vendor/lib/libdrmtime.so
218 | vendor/lib/libQSEEComAPI.so
219 | vendor/lib/librpmb.so
220 | vendor/lib/libssd.so
221 |
222 | # IPC router security
223 | bin/irsc_util:vendor/bin/irsc_util
224 | etc/sec_config:vendor/etc/sec_config
225 |
226 | # IPv6 Tethering
227 | bin/radish:vendor/bin/radish
228 |
229 | # Media
230 | vendor/lib/libOmxAacDec.so
231 | vendor/lib/libOmxAmrwbplusDec.so
232 | vendor/lib/libOmxEvrcDec.so
233 | vendor/lib/libOmxQcelp13Dec.so
234 | vendor/lib/libOmxWmaDec.so
235 |
236 | # Perf
237 | vendor/lib/libqti-perfd-client.so
238 |
239 | # Qualcomm
240 | vendor/lib/libxml.so
241 |
242 | # Qualcomm Framework - Pinned to G900FXXS1BPCL_G900FOXA1BOJ1_BTU
243 | lib/libperipheral_client.so:vendor/lib/libperipheral_client.so|7107a8e656fabc5ff6b7a33740be80a1add6abbd
244 | vendor/lib/libdsi_netctrl.so|d5d25fd5b1ea250bdfcb64059eafaf609fe2e32c
245 | vendor/lib/libqdi.so|6bd79ba4dc4b4af654cda666e829312ba07a22e9
246 |
247 | # Sensors
248 | lib/hw/sensors.msm8974.so:vendor/lib/hw/sensors.vendor.msm8974.so|48c6112bc4097e9176fcd53bf3f7ba0d643b27aa
249 | lib/libhr.so:vendor/lib/libhr.so
250 |
251 | # Wi-Fi
252 | etc/wifi/bcmdhd_apsta.bin:vendor/etc/wifi/bcmdhd_apsta.bin
253 | etc/wifi/bcmdhd_ibss.bin:vendor/etc/wifi/bcmdhd_ibss.bin
254 | etc/wifi/bcmdhd_mfg.bin:vendor/etc/wifi/bcmdhd_mfg.bin
255 | etc/wifi/bcmdhd_sta.bin:vendor/etc/wifi/bcmdhd_sta.bin
256 | etc/wifi/nvram_mfg.txt:vendor/etc/wifi/nvram_mfg.txt
257 | etc/wifi/nvram_mfg.txt_a0:vendor/etc/wifi/nvram_mfg.txt_a0
258 | etc/wifi/nvram_mfg.txt_muratafem1:vendor/etc/wifi/nvram_mfg.txt_murata
259 | etc/wifi/nvram_mfg.txt_semco3rd:vendor/etc/wifi/nvram_mfg.txt_semco3rd
260 | etc/wifi/nvram_net.txt:vendor/etc/wifi/nvram_net.txt
261 | etc/wifi/nvram_net.txt_a0:vendor/etc/wifi/nvram_net.txt_a0
262 | etc/wifi/nvram_net.txt_muratafem1:vendor/etc/wifi/nvram_net.txt_murata
263 | etc/wifi/nvram_net.txt_semco3rd:vendor/etc/wifi/nvram_net.txt_semco3rd
264 |
--------------------------------------------------------------------------------
/config.fs:
--------------------------------------------------------------------------------
1 | [efs/]
2 | mode: 0771
3 | user: AID_SYSTEM
4 | group: AID_RADIO
5 | caps: 0
6 |
7 | [firmware/]
8 | mode: 0771
9 | user: AID_SYSTEM
10 | group: AID_SYSTEM
11 | caps: 0
12 |
13 | [firmware-modem/]
14 | mode: 0771
15 | user: AID_SYSTEM
16 | group: AID_SYSTEM
17 | caps: 0
18 |
--------------------------------------------------------------------------------
/configs/media_codecs_performance.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
--------------------------------------------------------------------------------
/configs/media_profiles_V1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
21 |
22 |
23 |
24 |
25 |
26 |
31 |
35 |
36 |
37 |
38 |
43 |
47 |
48 |
49 |
50 |
55 |
59 |
60 |
61 |
62 |
67 |
71 |
72 |
73 |
74 |
79 |
83 |
84 |
85 |
86 |
91 |
92 |
96 |
97 |
98 |
99 |
104 |
105 |
109 |
110 |
111 |
112 |
117 |
118 |
122 |
123 |
124 |
125 |
130 |
131 |
135 |
136 |
137 |
138 |
143 |
144 |
148 |
149 |
150 |
151 |
156 |
157 |
161 |
162 |
163 |
164 |
169 |
170 |
171 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
192 |
196 |
197 |
198 |
199 |
204 |
208 |
209 |
210 |
211 |
216 |
220 |
221 |
222 |
223 |
228 |
232 |
233 |
234 |
235 |
240 |
244 |
245 |
246 |
247 |
252 |
253 |
257 |
258 |
259 |
260 |
265 |
266 |
270 |
271 |
272 |
273 |
278 |
279 |
283 |
284 |
285 |
286 |
291 |
292 |
296 |
297 |
298 |
299 |
304 |
305 |
309 |
310 |
311 |
312 |
313 |
314 |
315 |
316 |
317 |
318 |
319 |
320 |
321 |
326 |
331 |
332 |
337 |
338 |
343 |
344 |
348 |
349 |
353 |
354 |
358 |
359 |
363 |
364 |
368 |
369 |
376 |
377 |
378 |
379 |
--------------------------------------------------------------------------------
/configs/p2p_supplicant_overlay.conf:
--------------------------------------------------------------------------------
1 | disable_scan_offload=1
2 | p2p_search_delay=100
3 | p2p_no_group_iface=1
4 |
--------------------------------------------------------------------------------
/configs/sensors/_hals.conf:
--------------------------------------------------------------------------------
1 | /vendor/lib/hw/sensors.vendor.msm8974.so
--------------------------------------------------------------------------------
/configs/thermal-engine-8974.conf:
--------------------------------------------------------------------------------
1 | sampling 5000
2 |
3 | [SS-CPU0]
4 | #algo_type ss
5 | sampling 100
6 | sensor cpu0
7 | device cpu
8 | set_point 75000
9 | set_point_clr 60000
10 | override 15000
11 |
12 | [SS-CPU1]
13 | #algo_type ss
14 | sampling 100
15 | sensor cpu1
16 | device cpu
17 | set_point 75000
18 | set_point_clr 60000
19 | override 15000
20 |
21 | [SS-CPU2]
22 | #algo_type ss
23 | sampling 100
24 | sensor cpu2
25 | device cpu
26 | set_point 75000
27 | set_point_clr 60000
28 | override 15000
29 |
30 | [SS-CPU3]
31 | #algo_type ss
32 | sampling 100
33 | sensor cpu3
34 | device cpu
35 | set_point 75000
36 | set_point_clr 60000
37 | override 15000
38 |
39 | [SS-GPU]
40 | #algo_type ss
41 | sampling 250
42 | sensor tsens_tz_sensor10
43 | device gpu
44 | set_point 85000
45 | set_point_clr 55000
46 | override 15000
47 |
48 | [SS-POPMEM]
49 | #algo_type ss
50 | sampling 10
51 | sensor pop_mem
52 | device cpu
53 | set_point 80000
54 | set_point_clr 55000
55 | override 15000
56 | time_constant 16
57 |
58 | [GPU_MONITOR]
59 | algo_type monitor
60 | sensor tsens_tz_sensor10
61 | sampling 1000
62 | thresholds 75000
63 | thresholds_clr 55000
64 | actions battery
65 | action_info 1
66 |
67 | [CPU0_MONITOR]
68 | algo_type monitor
69 | sensor cpu0
70 | sampling 65
71 | thresholds 115000
72 | thresholds_clr 110000
73 | actions shutdown
74 | action_info 0
75 |
76 | [CPU1_MONITOR]
77 | algo_type monitor
78 | sensor cpu1
79 | sampling 65
80 | thresholds 115000
81 | thresholds_clr 110000
82 | actions shutdown
83 | action_info 0
84 |
85 | [CPU2_MONITOR]
86 | algo_type monitor
87 | sensor cpu2
88 | sampling 65
89 | thresholds 115000
90 | thresholds_clr 110000
91 | actions shutdown
92 | action_info 0
93 |
94 | [CPU3_MONITOR]
95 | algo_type monitor
96 | sensor cpu3
97 | sampling 65
98 | thresholds 115000
99 | thresholds_clr 110000
100 | actions shutdown
101 | action_info 0
102 |
103 |
--------------------------------------------------------------------------------
/configs/wpa_supplicant_overlay.conf:
--------------------------------------------------------------------------------
1 | disable_scan_offload=1
2 | p2p_disabled=1
3 | tdls_external_control=1
4 | driver_param=use_p2p_group_interface=1
5 |
--------------------------------------------------------------------------------
/extract-files.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017-2021 The LineageOS Project
5 | #
6 | # SPDX-License-Identifier: Apache-2.0
7 | #
8 |
9 | set -e
10 |
11 | if [ -z "${DEVICE_COMMON}" ]; then
12 | echo ""
13 | echo "error: This is a script in a common tree. Please execute" $(basename $0) "from a device tree."
14 | echo ""
15 | exit 1
16 | fi
17 |
18 | # Load extract_utils and do some sanity checks
19 | MY_DIR="${BASH_SOURCE%/*}"
20 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
21 |
22 | ANDROID_ROOT="${MY_DIR}/../../.."
23 |
24 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
25 | if [ ! -f "${HELPER}" ]; then
26 | echo "Unable to find helper script at ${HELPER}"
27 | exit 1
28 | fi
29 | source "${HELPER}"
30 |
31 | function blob_fixup() {
32 | case "${1}" in
33 | vendor/bin/thermal-engine)
34 | sed -i 's|/system/etc|/vendor/etc|g' "${2}"
35 | ;;
36 | vendor/lib/libmmcamera2_sensor_modules.so)
37 | sed -i 's|system/etc|vendor/etc|g;
38 | s|/system/lib|/vendor/lib|g;
39 | s|/system/cameradata|/vendor/cameradata|g' "${2}"
40 | ;;
41 | esac
42 | }
43 |
44 | setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true
45 |
46 | for BLOB_LIST in "${MY_DIR}"/common-proprietary-files*.txt; do
47 | extract "${BLOB_LIST}" "${SRC}"
48 | done
49 |
50 | export BOARD_COMMON=msm8974-common
51 |
52 | "./../../${VENDOR}/${BOARD_COMMON}/extract-files.sh" "$@"
53 |
--------------------------------------------------------------------------------
/fingerprint/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2016 The Mokee Project
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | LOCAL_PATH := $(call my-dir)
19 |
20 | include $(CLEAR_VARS)
21 |
22 | LOCAL_MODULE := fingerprint.msm8974
23 | LOCAL_MODULE_RELATIVE_PATH := hw
24 | LOCAL_SRC_FILES := \
25 | fingerprint.c \
26 | fingerprint_tz.c \
27 | QSEEComAPI.c \
28 | hash.c
29 |
30 | LOCAL_C_INCLUDES += \
31 | external/sqlite/dist
32 |
33 | LOCAL_SHARED_LIBRARIES := \
34 | liblog \
35 | libsqlite
36 |
37 | LOCAL_MODULE_TAGS := optional
38 | LOCAL_PROPRIETARY_MODULE := true
39 |
40 | include $(BUILD_SHARED_LIBRARY)
41 |
--------------------------------------------------------------------------------
/fingerprint/QSEEComAPI.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The Android Open Source Project
3 | * Copyright (C) 2016 The CyanogenMod Project
4 | * Copyright (C) 2016 The Mokee Project
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License"); you
7 | * may not use this file except in compliance with the License. You may
8 | * obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | */
18 |
19 | #define LOG_TAG "Custom_QSEE"
20 | #define LOG_NDEBUG 0
21 |
22 | #include
23 |
24 | #include
25 | #include
26 |
27 | #include "QSEEComAPI.h"
28 |
29 | struct qcom_keymaster_handle {
30 | void *libhandle;
31 | int (*QSEECom_start_app)(struct QSEECom_handle ** handle, const char* path,
32 | const char* appname, uint32_t size);
33 | int (*QSEECom_shutdown_app)(struct QSEECom_handle **handle);
34 | int (*QSEECom_send_cmd)(struct QSEECom_handle* handle, void *cbuf,
35 | uint32_t clen, void *rbuf, uint32_t rlen);
36 | int (*QSEECom_send_modified_cmd)(struct QSEECom_handle* handle, void *cbuf,
37 | uint32_t clen, void *rbuf, uint32_t rlen,
38 | struct QSEECom_ion_fd_info *ihandle);
39 | int (*QSEECom_set_bandwidth)(struct QSEECom_handle* handle, bool high);
40 | };
41 | typedef struct qcom_keymaster_handle qcom_keymaster_handle_t;
42 |
43 | bool init = false;
44 | qcom_keymaster_handle_t* km_handle;
45 | int file_num = 0;
46 |
47 | static int qcom_km_get_lib_sym(qcom_keymaster_handle_t* km_handle)
48 | {
49 | km_handle->libhandle = dlopen("libQSEEComAPI.so", RTLD_NOW);
50 | if ( km_handle->libhandle ) {
51 | *(void **)(&km_handle->QSEECom_start_app) =
52 | dlsym(km_handle->libhandle,"QSEECom_start_app");
53 | if (km_handle->QSEECom_start_app == NULL) {
54 | ALOGE("dlsym: Error Loading QSEECom_start_app");
55 | dlclose(km_handle->libhandle );
56 | km_handle->libhandle = NULL;
57 | return -1;
58 | }
59 | *(void **)(&km_handle->QSEECom_shutdown_app) =
60 | dlsym(km_handle->libhandle,"QSEECom_shutdown_app");
61 | if (km_handle->QSEECom_shutdown_app == NULL) {
62 | ALOGE("dlsym: Error Loading QSEECom_shutdown_app");
63 | dlclose(km_handle->libhandle );
64 | km_handle->libhandle = NULL;
65 | return -1;
66 | }
67 | *(void **)(&km_handle->QSEECom_send_cmd) =
68 | dlsym(km_handle->libhandle,"QSEECom_send_cmd");
69 | if (km_handle->QSEECom_send_cmd == NULL) {
70 | ALOGE("dlsym: Error Loading QSEECom_send_cmd");
71 | dlclose(km_handle->libhandle );
72 | km_handle->libhandle = NULL;
73 | return -1;
74 | }
75 | *(void **)(&km_handle->QSEECom_send_modified_cmd) =
76 | dlsym(km_handle->libhandle,"QSEECom_send_modified_cmd");
77 | if (km_handle->QSEECom_send_modified_cmd == NULL) {
78 | ALOGE("dlsym: Error Loading QSEECom_send_modified_cmd");
79 | dlclose(km_handle->libhandle );
80 | km_handle->libhandle = NULL;
81 | return -1;
82 | }
83 | *(void **)(&km_handle->QSEECom_set_bandwidth) =
84 | dlsym(km_handle->libhandle,"QSEECom_set_bandwidth");
85 | if (km_handle->QSEECom_set_bandwidth == NULL) {
86 | ALOGE("dlsym: Error Loading QSEECom_set_bandwidth");
87 | dlclose(km_handle->libhandle );
88 | km_handle->libhandle = NULL;
89 | return -1;
90 | }
91 |
92 | } else {
93 | ALOGE("failed to load qseecom library");
94 | return -1;
95 | }
96 | return 0;
97 | }
98 |
99 | static int init_qsee()
100 | {
101 | if (init) {
102 | return 0;
103 | }
104 | int ret = 0;
105 | km_handle = (qcom_keymaster_handle_t *)malloc(sizeof(qcom_keymaster_handle_t));
106 | if (km_handle == NULL) {
107 | ALOGE("Memalloc for keymaster handle failed");
108 | return -1;
109 | }
110 | km_handle->libhandle = NULL;
111 | ret = qcom_km_get_lib_sym(km_handle);
112 | if (ret) {
113 | free(km_handle);
114 | return -1;
115 | }
116 | init = true;
117 | return 0;
118 | }
119 |
120 |
121 | int QSEECom_start_app(struct QSEECom_handle **clnt_handle, const char *path,
122 | const char *fname, uint32_t sb_size)
123 | {
124 | init_qsee();
125 | int ret = 0;
126 | ret = (*km_handle->QSEECom_start_app)(clnt_handle,path,fname,sb_size);
127 | return ret;
128 | }
129 |
130 | int QSEECom_shutdown_app(struct QSEECom_handle **handle)
131 | {
132 | init_qsee();
133 | int ret = 0;
134 | ret = (*km_handle->QSEECom_shutdown_app)(handle);
135 | return ret;
136 | }
137 |
138 | int QSEECom_send_cmd(struct QSEECom_handle *handle, void *send_buf,
139 | uint32_t sbuf_len, void *rcv_buf, uint32_t rbuf_len)
140 | {
141 | init_qsee();
142 | int ret = 0;
143 | ret = (*km_handle->QSEECom_send_cmd)(handle,send_buf,sbuf_len,rcv_buf,rbuf_len);
144 | return ret;
145 | }
146 |
147 | int QSEECom_send_modified_cmd(struct QSEECom_handle *handle, void *send_buf,
148 | uint32_t sbuf_len, void *resp_buf, uint32_t rbuf_len,
149 | struct QSEECom_ion_fd_info *ifd_data)
150 | {
151 | init_qsee();
152 | int ret = 0;
153 | ret = (*km_handle->QSEECom_send_modified_cmd)(handle,send_buf,sbuf_len,resp_buf,rbuf_len,ifd_data);
154 | return ret;
155 | }
156 |
157 | int QSEECom_set_bandwidth(struct QSEECom_handle *handle, bool high)
158 | {
159 | init_qsee();
160 | int ret = 0;
161 | ret = (*km_handle->QSEECom_set_bandwidth)(handle,high);
162 | return ret;
163 | }
164 |
165 |
--------------------------------------------------------------------------------
/fingerprint/QSEEComAPI.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2012, The Android Open Source Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you
5 | * may not use this file except in compliance with the License. You may
6 | * obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
13 | * implied. See the License for the specific language governing
14 | * permissions and limitations under the License.
15 | */
16 |
17 | #ifndef __QSEECOMAPI_H_
18 | #define __QSEECOMAPI_H_
19 |
20 |
21 | /*----------------------------------------------------------------------------
22 | * Include Files
23 | * -------------------------------------------------------------------------*/
24 | #include
25 | #include
26 |
27 | #define QSEECOM_ALIGN_SIZE 0x40
28 | #define QSEECOM_ALIGN_MASK (QSEECOM_ALIGN_SIZE - 1)
29 | #define QSEECOM_ALIGN(x) \
30 | ((x + QSEECOM_ALIGN_SIZE) & (~QSEECOM_ALIGN_MASK))
31 |
32 | #ifdef __cplusplus
33 | extern "C" {
34 | #endif
35 |
36 | /*----------------------------------------------------------------------------
37 | * Preprocessor Definitions and Constants
38 | * -------------------------------------------------------------------------*/
39 | /** The memory is locked and non-pageable */
40 | #define MEM_LOCKED 0x00000001
41 | /** The memory is marked non-cacheable */
42 | #define MEM_NON_CACHED 0x00000002
43 |
44 | #define QSEECOM_APP_QUERY_FAILED -6
45 | #define QSEECOM_APP_NOT_LOADED -5
46 | #define QSEECOM_APP_ALREADY_LOADED -4
47 | #define QSEECOM_LISTENER_UNREGISTERED -3
48 | #define QSEECOM_LISTENER_ALREADY_REGISTERED -2
49 | #define QSEECOM_LISTENER_REGISTER_FAIL -1
50 |
51 | /*----------------------------------------------------------------------------
52 | * Type Declarations
53 | * -------------------------------------------------------------------------*/
54 | struct QSEECom_handle {
55 | unsigned char *ion_sbuffer;
56 | };
57 |
58 | struct QSEECom_ion_fd_data {
59 | int32_t fd;
60 | uint32_t cmd_buf_offset;
61 | };
62 |
63 | struct QSEECom_ion_fd_info {
64 | struct QSEECom_ion_fd_data data[4];
65 | };
66 |
67 | /*----------------------------------------------------------------------------
68 | * Function Declarations and Documentation
69 | * -------------------------------------------------------------------------*/
70 | /**
71 | * @brief Open a handle to the QSEECom device.
72 | *
73 | * - Load a secure application. The application will be verified that it is
74 | * secure by digital signature verification.
75 | * Allocate memory for sending requests to the QSAPP
76 | *
77 | * Note/Comments:
78 | * There is a one-to-one relation for a HLOS client and a QSAPP;
79 | * meaning that only one app can communicate to a QSAPP at a time.
80 | *
81 | * Please note that there is difference between an application and a listener
82 | * service. A QSAPP must be loaded at the request of the HLOS,
83 | * and all requests are orginated by the HLOS client.
84 | * A listener service on the otherhand is started during start-up by a
85 | * daemon, qseecomd.
86 | *
87 | * A HLOS application may create mutiple handles to the QSAPP
88 | *
89 | * @param[in/out] handle The device handle
90 | * @param[in] fname The directory and filename to load.
91 | * @param[in] sb_size Size of the shared buffer memory for sending requests.
92 | * @return Zero on success, negative on failure. errno will be set on
93 | * error.
94 | */
95 | int QSEECom_start_app(struct QSEECom_handle **clnt_handle, const char *path,
96 | const char *fname, uint32_t sb_size);
97 |
98 | /**
99 | * @brief Close the application associated with the handle.
100 | *
101 | * - Unload a secure application. The driver will verify if there exists
102 | * any other applications that are communicating with the QSAPP to which
103 | * the "handle" is tied.
104 | * - De-allocate memory for sending requests to QSAPP.
105 | *
106 | * @param[in] handle The device handle
107 | * @return Zero on success, negative on failure. errno will be set on
108 | * error.
109 | */
110 | int QSEECom_shutdown_app(struct QSEECom_handle **handle);
111 |
112 | /**
113 | * @brief Open a handle to the QSEECom device.
114 | *
115 | * - Load an external elf. The elf will be verified that it is
116 | * secure by digital signature verification.
117 | *
118 | * A HLOS application may create mutiple opens (only one is permitted for the
119 | * app, but each listener service can open a unique device in the same HLOS app
120 | * /executable.
121 | * @param[in/out] handle The device handle
122 | * @param[in] fname The directory and filename to load.
123 | * @return Zero on success, negative on failure. errno will be set on
124 | * error.
125 | */
126 | int QSEECom_load_external_elf(struct QSEECom_handle **clnt_handle, const char *path,
127 | const char *fname);
128 |
129 | /**
130 | * @brief Close the external elf
131 | *
132 | * - Unload an external elf.
133 | *
134 | * @param[in] handle The device handle
135 | *
136 | * @return Zero on success, negative on failure. errno will be set on
137 | * error.
138 | */
139 | int QSEECom_unload_external_elf(struct QSEECom_handle **handle);
140 |
141 | /**
142 | * @brief Register an HLOS listener service. This allows messages from QSAPP
143 | * to be received.
144 | *
145 | * @param[in] handle The device handle
146 | * @param[in] lstnr_id The listener service identifier. This ID must be uniquely
147 | * assigned to avoid any collisions.
148 | * @param[in] sb_length Shared memory buffer between OS and QSE.
149 | * @param[in] flags Provide the shared memory flags attributes.
150 | *
151 | * @return Zero on success, negative on failure. errno will be set on
152 | * error.
153 | *
154 | */
155 | int QSEECom_register_listener(struct QSEECom_handle **handle,
156 | uint32_t lstnr_id, uint32_t sb_length, uint32_t flags);
157 |
158 | /**
159 | * @brief Unregister a listener service.
160 | *
161 | * @param[in] handle The device handle
162 | *
163 | * @return Zero on success, negative on failure. errno will be set on
164 | * error.
165 | */
166 | int QSEECom_unregister_listener(struct QSEECom_handle *handle);
167 |
168 |
169 | /**
170 | * @brief Send QSAPP a "user" defined buffer (may contain some message/
171 | * command request) and receives a response from QSAPP in receive buffer.
172 | * The HLOS client writes to the send_buf, where QSAPP writes to the rcv_buf.
173 | * This is a blocking call.
174 | *
175 | * @param[in] handle The device handle
176 | * @param[in] send_buf The buffer to be sent.
177 | * If using ion_sbuffer, ensure this
178 | * QSEECOM_BUFFER_ALIGN'ed.
179 | * @param[in] sbuf_len The send buffer length
180 | * If using ion_sbuffer, ensure length is
181 | * multiple of QSEECOM_BUFFER_ALIGN.
182 | * @param[in] rcv_buf The QSEOS returned buffer.
183 | * If using ion_sbuffer, ensure this is
184 | * QSEECOM_BUFFER_ALIGN'ed.
185 | * @param[in] rbuf_len The returned buffer length.
186 | * If using ion_sbuffer, ensure length is
187 | * multiple of QSEECOM_BUFFER_ALIGN.
188 | * @param[in] rbuf_len The returned buffer length.
189 | *
190 | * @return Zero on success, negative on failure. errno will be set on
191 | * error.
192 | */
193 | int QSEECom_send_cmd(struct QSEECom_handle *handle, void *send_buf,
194 | uint32_t sbuf_len, void *rcv_buf, uint32_t rbuf_len);
195 |
196 |
197 | /**
198 | * @brief Send QSAPP a "user" defined buffer (may contain some message/
199 | * command request) and receives a response from QSAPP in receive buffer.
200 | * This API is same as send_cmd except it takes in addition parameter,
201 | * "ifd_data". This "ifd_data" holds information (ion fd handle and
202 | * cmd_buf_offset) used for modifying data in the message in send_buf
203 | * at an offset. Essentailly, it has the ion fd handle information to
204 | * retrieve physical address and modify the message in send_buf at the
205 | * mentioned offset.
206 | *
207 | * The HLOS client writes to the send_buf, where QSAPP writes to the rcv_buf.
208 | * This is a blocking call.
209 | *
210 | * @param[in] handle The device handle
211 | * @param[in] send_buf The buffer to be sent.
212 | * If using ion_sbuffer, ensure this
213 | * QSEECOM_BUFFER_ALIGN'ed.
214 | * @param[in] sbuf_len The send buffer length
215 | * If using ion_sbuffer, ensure length is
216 | * multiple of QSEECOM_BUFFER_ALIGN.
217 | * @param[in] rcv_buf The QSEOS returned buffer.
218 | * If using ion_sbuffer, ensure this is
219 | * QSEECOM_BUFFER_ALIGN'ed.
220 | * @param[in] rbuf_len The returned buffer length.
221 | * If using ion_sbuffer, ensure length is
222 | * multiple of QSEECOM_BUFFER_ALIGN.
223 | * @param[in] QSEECom_ion_fd_info data related to memory allocated by ion.
224 | *
225 | * @return Zero on success, negative on failure. errno will be set on
226 | * error.
227 | */
228 | int QSEECom_send_modified_cmd(struct QSEECom_handle *handle, void *send_buf,
229 | uint32_t sbuf_len, void *resp_buf, uint32_t rbuf_len,
230 | struct QSEECom_ion_fd_info *ifd_data);
231 |
232 | /**
233 | * @brief Receive a service defined buffer.
234 | *
235 | * @param[in] handle The device handle
236 | * @param[out] buf The buffer that is received
237 | * @param[in] len The receive buffer length
238 | *
239 | * @return Zero on success, negative on failure. errno will be set on
240 | * error.
241 | */
242 | int QSEECom_receive_req(struct QSEECom_handle *handle,
243 | void *buf, uint32_t len);
244 |
245 | /**
246 | * @brief Send a response based on the previous QSEECom_receive_req.
247 | *
248 | * This allows a listener service to receive a command (e.g. read file abc).
249 | * The service can then handle the request from QSEECom_receive_req, and provide
250 | * that information back to QSAPP.
251 | *
252 | * This allows the HLOS to act as the server and QSAPP to behave as the client.
253 | *
254 | * @param[in] handle The device handle
255 | * @param[out] send_buf The buffer to be returned back to QSAPP
256 | * @param[in] len The send buffer length
257 | *
258 | * @return Zero on success, negative on failure. errno will be set on
259 | * error.
260 | */
261 | int QSEECom_send_resp(struct QSEECom_handle *handle,
262 | void *send_buf, uint32_t len);
263 |
264 | /**
265 | * @brief Set the bandwidth for QSEE.
266 | *
267 | * This API resulst in improving the performance on the Crypto hardware
268 | * in QSEE. It should be called before issuing send_cmd/send_modified_cmd
269 | * for commands that requires using the crypto hardware on the QSEE.
270 | * Typically this API should be called before issuing the send request to
271 | * enable high performance mode and after completion of the send_cmd to
272 | * resume to low performance and hence to low power mode.
273 | *
274 | * This allows the clients of QSEECom to set the QSEE cyptpo HW bus
275 | * bandwidth to high/low.
276 | *
277 | * @param[in] high Set to 1 to enable bandwidth.
278 | *
279 | * @return Zero on success, negative on failure. errno will be set on
280 | * error.
281 | */
282 | int QSEECom_set_bandwidth(struct QSEECom_handle *handle, bool high);
283 |
284 | /**
285 | * @brief Query QSEE to check if app is loaded.
286 | *
287 | * This API queries QSEE to see if the app is loaded or not.
288 | *
289 | * @param[in] app_name Name of the app.
290 | *
291 | * @return QSEECOM_APP_QUERY_FAILED/QSEECOM_APP_NOT_LOADED/QSEECOM_APP_LOADED.
292 | */
293 | int QSEECom_app_load_query(struct QSEECom_handle *handle, char *app_name);
294 |
295 | #ifdef __cplusplus
296 | }
297 | #endif
298 |
299 | #endif
300 |
--------------------------------------------------------------------------------
/fingerprint/board.mk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/LineageOS/android_device_samsung_klte-common/8f71a63415397def5ba886f4030b0d91e2253262/fingerprint/board.mk
--------------------------------------------------------------------------------
/fingerprint/fingerprint_common.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The Android Open Source Project
3 | * Copyright (C) 2016 The CyanogenMod Project
4 | * Copyright (C) 2016 The Mokee Project
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License"); you
7 | * may not use this file except in compliance with the License. You may
8 | * obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | */
18 |
19 | #ifndef __FINGERPRINT_COMMON_H_
20 | #define __FINGERPRINT_COMMON_H_
21 |
22 | #include
23 |
24 | #define SB_LENGTH (0x100000)
25 | #define BUFFER_LENGTH (0x19000)
26 | #define AUTH_TOKEN_LENGTH (0x70)
27 | #define AUTH_SESSION_TOKEN_LENGTH (0x20)
28 | #define CALIBRATE_DATA_MAX_LENGTH (0x500c)
29 | #define FINGER_DATA_MAX_LENGTH (0x2900)
30 | #define PAYLOAD_MAX_LENGTH (0x24)
31 | #define MAX_NUM_FINGERS (5)
32 |
33 | typedef enum worker_state_t {
34 | STATE_IDLE = 0,
35 | STATE_ENROLL,
36 | STATE_SCAN,
37 | STATE_CANCEL
38 | } worker_state_t;
39 |
40 | typedef struct vcs_sensor_t {
41 | int fd;
42 | bool init;
43 | bool signal;
44 | pthread_cond_t cond;
45 | pthread_mutex_t lock;
46 | }vcs_sensor_t;
47 |
48 | typedef struct finger_t {
49 | bool exist;
50 | char data[FINGER_DATA_MAX_LENGTH];
51 | char payload[PAYLOAD_MAX_LENGTH];
52 | }finger_t;
53 |
54 | typedef struct timeout_t {
55 | uint32_t timeout;
56 | pthread_t timeout_thread;
57 | pthread_cond_t cond;
58 | pthread_mutex_t lock;
59 | }timeout_t;
60 |
61 | typedef struct trust_zone_t {
62 | bool init;
63 | worker_state_t state;
64 | struct QSEECom_handle *qhandle;
65 | bool auth_session_opend;
66 | char auth_token[AUTH_TOKEN_LENGTH];
67 | char auth_session_token[AUTH_SESSION_TOKEN_LENGTH];
68 | int calibrate_len;
69 | char calibrate_data[CALIBRATE_DATA_MAX_LENGTH];
70 | finger_t finger[MAX_NUM_FINGERS + 1]; // Start from finger[1]
71 | timeout_t timeout;
72 | pthread_t auth_thread;
73 | pthread_t enroll_thread;
74 | pthread_mutex_t lock;
75 | }trust_zone_t;
76 |
77 | #endif //__FINGERPRINT_COMMON_H_
78 |
--------------------------------------------------------------------------------
/fingerprint/fingerprint_tz.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The Android Open Source Project
3 | * Copyright (C) 2016 The CyanogenMod Project
4 | * Copyright (C) 2016 The Mokee Project
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License"); you
7 | * may not use this file except in compliance with the License. You may
8 | * obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15 | * implied. See the License for the specific language governing
16 | * permissions and limitations under the License.
17 | */
18 | #ifndef __FINGERPRINT_TZ_H_
19 | #define __FINGERPRINT_TZ_H_
20 |
21 | #include "fingerprint_common.h"
22 | #include "QSEEComAPI.h"
23 |
24 | /* QSEE cmd */
25 | typedef enum trust_zone_cmd_id_t {
26 | vfmProvision = 0x1,
27 | vfmInitialize = 0x2,
28 | vfmUninitialize = 0x3,
29 | vfmDeviceInitialize = 0x4,
30 | vfmDeviceCalibrate = 0x5,
31 | vfmAuthSessionBegin = 0x6,
32 | vfmAuthSessionEnd = 0x7,
33 | vfmCaptureStart = 0x8,
34 | vfmCaptureReadData = 0x9,
35 | vfmCaptureProcessData = 0xa,
36 | vfmCaptureAbort = 0xb,
37 | vfmCaptureGetStatus = 0xc,
38 | /* QSEE cmd id 0xd is unused. */
39 | vfmCaptureFlushImage = 0xe,
40 | vfmEnrollBegin = 0xf,
41 | vfmEnrollAddImage = 0x10,
42 | vfmEnrollFinish = 0x11,
43 | vfmEnrollmentPasswordSet = 0x12,
44 | vfmEnrollmentPasswordVerify = 0x13,
45 | vfmMatchImageToTemplates = 0x14,
46 | vfmPayloadBind = 0x15,
47 | vfmPayloadRelease = 0x16,
48 | vfmVendorDefinedOperation = 0x17
49 | }trust_zone_cmd_id_t;
50 |
51 | typedef enum trust_zone_vendor_cmd_id_t {
52 | vendorUnknown0 = 0x0,
53 | vendorGetVersion = 0x1,//0x10
54 | vendorUnknownA = 0xa,
55 | vendorGetAuthToken = 0x14,
56 | vendorEnterAuthSession = 0x15,
57 | vendorUpdateCalData = 0x17
58 | }trust_zone_vendor_cmd_id_t;
59 |
60 | typedef struct trust_zone_normal_cmd_t {
61 | trust_zone_cmd_id_t cmd;
62 | int len;
63 | int zero;
64 | char data[BUFFER_LENGTH - 12];
65 | }trust_zone_base_cmd_t;
66 |
67 | typedef struct trust_zone_vendor_cmd_t {
68 | trust_zone_cmd_id_t cmd;
69 | trust_zone_vendor_cmd_id_t vendor_cmd;
70 | int len;
71 | int zero;
72 | char data[BUFFER_LENGTH - 16];
73 | }trust_zone_vendor_cmd_t;
74 |
75 | typedef struct trust_zone_2x_cmd_t {
76 | trust_zone_cmd_id_t cmd;
77 | int len;
78 | int zero;
79 | char data[BUFFER_LENGTH * 2 - 12];
80 | }trust_zone_2x_cmd_t;
81 |
82 | typedef struct trust_zone_3x_cmd_t {
83 | trust_zone_cmd_id_t cmd;
84 | int len;
85 | int zero;
86 | char data[BUFFER_LENGTH * 3 - 12];
87 | }trust_zone_3x_cmd_t;
88 |
89 | typedef struct trust_zone_5x_cmd_t { //only use on vfmMatchImageToTemplates
90 | trust_zone_cmd_id_t cmd;
91 | int len;
92 | int zero;
93 | int unknown[2];
94 | time_t time_now;
95 | char data[563304];
96 | }trust_zone_5x_cmd_t;
97 |
98 | typedef struct trust_zone_normal_result_t {
99 | int zero;
100 | int result;
101 | int data[BUFFER_LENGTH/4 - 2];
102 | }trust_zone_normal_result_t;
103 |
104 | typedef struct trust_zone_2x_result_t {
105 | int zero;
106 | int result;
107 | int data[(BUFFER_LENGTH * 2)/4 - 2];
108 | }trust_zone_2x_result_t;
109 |
110 | #define FINGERPRINT_ERROR_HW_UNAVAILABLE (1)
111 | #define FINGERPRINT_ERROR_UNABLE_TO_PROCESS (2)
112 | #define FINGERPRINT_ERROR_TIMEOUT (3)
113 | #define FINGERPRINT_ERROR_NO_SPACE (4)
114 | #define FINGERPRINT_ERROR_CANCELED (5)
115 | #define FINGERPRINT_ERROR_UNABLE_TO_REMOVE (6)
116 | #define FINGERPRINT_ERROR_VENDOR_BASE (1000)
117 |
118 | worker_state_t get_tz_state();
119 | void set_tz_state(worker_state_t state);
120 |
121 | int vcs_update_cal_data();
122 | int vcs_check_state();
123 | int vcs_start_capture();
124 | void* vcs_authenticate(void* vdev);
125 | void* vcs_enroll(void* vdev);
126 | int vcs_start_authenticate(void *vdev);
127 | int vcs_start_enroll(void *vdev, uint32_t timeout);
128 | int vcs_get_enrolled_finger_num();
129 | int vcs_update_auth_token();
130 | int vcs_start_auth_session();
131 | int vcs_stop_auth_session();
132 | int vcs_resume();
133 | int vcs_uninit();
134 | int vcs_init();
135 |
136 | #endif /* __FINGERPRINT_TZ_H_ */
137 |
--------------------------------------------------------------------------------
/fingerprint/fp_klte.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The Android Open Source Project
3 | * Copyright (C) 2016 The CyanogenMod Project
4 | * Copyright (C) 2016 The Mokee Project
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | * http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #include "fingerprint_common.h"
20 | #include "vfs61xx_ioctl.h"
21 |
22 | #define FINGER_DATABASE_FILENAME "/data/validity/finger.db"
23 | #define SAMSUNG_FP_DB_PATH "/data/validity/template.db"
24 | #define SENSOR_FILE_NAME "/dev/vfsspi"
25 | #define MAX_DATABASE_CMD 255
26 |
27 | int sensor_uninit();
28 | int sensor_init();
29 | void sensor_process_signal(int signum);
30 | int sensor_register();
31 | int sensor_capture_start();
32 |
33 | int db_check_and_create_table(void* device);
34 | int db_read_to_tz(void *device);
35 | int db_write_to_db(void *device, bool remove, int fid);
36 | int db_init(void *device);
37 | int db_uninit(void *device);
38 |
39 | void send_error_notice(void* device, int error_info_int);
40 | void send_acquired_notice(void* device, int acquired_ret);
41 | void send_enroll_notice(void *device, int fid, int remaining);
42 | void send_authenticated_notice(void *device, int fid);
43 | void send_remove_notice(void *device, int fid);
44 |
45 |
46 |
--------------------------------------------------------------------------------
/fingerprint/hash.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The Android Open Source Project
3 | * Copyright (C) 2016 The CyanogenMod Project
4 | * Copyright (C) 2016 The Mokee Project
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | *http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #include
20 | #include
21 |
22 | #include "hash.h"
23 |
24 | SHA1Context sha;
25 |
26 | /*
27 | * HASH method: SHA1
28 | */
29 |
30 | uint64_t convert_hash_to_number() {
31 | uint64_t num = 0;
32 | num = ((uint64_t)sha.Message_Digest[0] << 32) + sha.Message_Digest[1];
33 | return num;
34 | }
35 |
36 | uint64_t hash_file(const char *file_path) {
37 | FILE * file;
38 | char str[MAX_FILE_LENGTH];
39 | int len = 0;
40 | file = fopen(file_path, "rb");
41 | if (!file)
42 | return 1;
43 | len = fread(str, sizeof(char), MAX_FILE_LENGTH, file);
44 | fclose(file);
45 | sha1_hash(str, len);
46 | return convert_hash_to_number();
47 | }
48 |
49 | uint64_t hash_string(const char *str) {
50 | sha1_hash(str, strlen(str));
51 | return convert_hash_to_number();
52 | }
53 |
54 | void SHA1Reset(SHA1Context *context){
55 | context->Length_Low = 0;
56 | context->Length_High = 0;
57 | context->Message_Block_Index = 0;
58 |
59 | context->Message_Digest[0] = 0x67452301;
60 | context->Message_Digest[1] = 0xEFCDAB89;
61 | context->Message_Digest[2] = 0x98BADCFE;
62 | context->Message_Digest[3] = 0x10325476;
63 | context->Message_Digest[4] = 0xC3D2E1F0;
64 |
65 | context->Computed = 0;
66 | context->Corrupted = 0;
67 | }
68 |
69 |
70 | int SHA1Result(SHA1Context *context){
71 | if (context->Corrupted) {
72 | return 0;
73 | }
74 | if (!context->Computed) {
75 | SHA1PadMessage(context);
76 | context->Computed = 1;
77 | }
78 | return 1;
79 | }
80 |
81 |
82 | void SHA1Input(SHA1Context *context,const char *message_array,unsigned length){
83 | if (!length) return;
84 |
85 | if (context->Computed || context->Corrupted){
86 | context->Corrupted = 1;
87 | return;
88 | }
89 |
90 | while(length-- && !context->Corrupted){
91 | context->Message_Block[context->Message_Block_Index++] = (*message_array & 0xFF);
92 |
93 | context->Length_Low += 8;
94 |
95 | context->Length_Low &= 0xFFFFFFFF;
96 | if (context->Length_Low == 0){
97 | context->Length_High++;
98 | context->Length_High &= 0xFFFFFFFF;
99 | if (context->Length_High == 0) context->Corrupted = 1;
100 | }
101 |
102 | if (context->Message_Block_Index == 64){
103 | SHA1ProcessMessageBlock(context);
104 | }
105 | message_array++;
106 | }
107 | }
108 |
109 | void SHA1ProcessMessageBlock(SHA1Context *context){
110 | const unsigned K[] = {0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 };
111 | int t;
112 | unsigned temp;
113 | unsigned W[80];
114 | unsigned A, B, C, D, E;
115 |
116 | for(t = 0; t < 16; t++) {
117 | W[t] = ((unsigned) context->Message_Block[t * 4]) << 24;
118 | W[t] |= ((unsigned) context->Message_Block[t * 4 + 1]) << 16;
119 | W[t] |= ((unsigned) context->Message_Block[t * 4 + 2]) << 8;
120 | W[t] |= ((unsigned) context->Message_Block[t * 4 + 3]);
121 | }
122 |
123 | for(t = 16; t < 80; t++) W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);
124 |
125 | A = context->Message_Digest[0];
126 | B = context->Message_Digest[1];
127 | C = context->Message_Digest[2];
128 | D = context->Message_Digest[3];
129 | E = context->Message_Digest[4];
130 |
131 | for(t = 0; t < 20; t++) {
132 | temp = SHA1CircularShift(5,A) + ((B & C) | ((~B) & D)) + E + W[t] + K[0];
133 | temp &= 0xFFFFFFFF;
134 | E = D;
135 | D = C;
136 | C = SHA1CircularShift(30,B);
137 | B = A;
138 | A = temp;
139 | }
140 | for(t = 20; t < 40; t++) {
141 | temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];
142 | temp &= 0xFFFFFFFF;
143 | E = D;
144 | D = C;
145 | C = SHA1CircularShift(30,B);
146 | B = A;
147 | A = temp;
148 | }
149 | for(t = 40; t < 60; t++) {
150 | temp = SHA1CircularShift(5,A) + ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];
151 | temp &= 0xFFFFFFFF;
152 | E = D;
153 | D = C;
154 | C = SHA1CircularShift(30,B);
155 | B = A;
156 | A = temp;
157 | }
158 | for(t = 60; t < 80; t++) {
159 | temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3];
160 | temp &= 0xFFFFFFFF;
161 | E = D;
162 | D = C;
163 | C = SHA1CircularShift(30,B);
164 | B = A;
165 | A = temp;
166 | }
167 | context->Message_Digest[0] = (context->Message_Digest[0] + A) & 0xFFFFFFFF;
168 | context->Message_Digest[1] = (context->Message_Digest[1] + B) & 0xFFFFFFFF;
169 | context->Message_Digest[2] = (context->Message_Digest[2] + C) & 0xFFFFFFFF;
170 | context->Message_Digest[3] = (context->Message_Digest[3] + D) & 0xFFFFFFFF;
171 | context->Message_Digest[4] = (context->Message_Digest[4] + E) & 0xFFFFFFFF;
172 | context->Message_Block_Index = 0;
173 | }
174 |
175 | void SHA1PadMessage(SHA1Context *context){
176 | if (context->Message_Block_Index > 55) {
177 | context->Message_Block[context->Message_Block_Index++] = 0x80;
178 | while(context->Message_Block_Index < 64) context->Message_Block[context->Message_Block_Index++] = 0;
179 | SHA1ProcessMessageBlock(context);
180 | while(context->Message_Block_Index < 56) context->Message_Block[context->Message_Block_Index++] = 0;
181 | } else {
182 | context->Message_Block[context->Message_Block_Index++] = 0x80;
183 | while(context->Message_Block_Index < 56) context->Message_Block[context->Message_Block_Index++] = 0;
184 | }
185 | context->Message_Block[56] = (context->Length_High >> 24 ) & 0xFF;
186 | context->Message_Block[57] = (context->Length_High >> 16 ) & 0xFF;
187 | context->Message_Block[58] = (context->Length_High >> 8 ) & 0xFF;
188 | context->Message_Block[59] = (context->Length_High) & 0xFF;
189 | context->Message_Block[60] = (context->Length_Low >> 24 ) & 0xFF;
190 | context->Message_Block[61] = (context->Length_Low >> 16 ) & 0xFF;
191 | context->Message_Block[62] = (context->Length_Low >> 8 ) & 0xFF;
192 | context->Message_Block[63] = (context->Length_Low) & 0xFF;
193 |
194 | SHA1ProcessMessageBlock(context);
195 | }
196 |
197 | int sha1_hash(const char *source, int len){
198 | SHA1Reset(&sha);
199 | SHA1Input(&sha, source, len);
200 |
201 | if (!SHA1Result(&sha)){
202 | return -1;
203 | }
204 | return 0;
205 | }
206 |
207 |
--------------------------------------------------------------------------------
/fingerprint/hash.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The Android Open Source Project
3 | * Copyright (C) 2016 The CyanogenMod Project
4 | * Copyright (C) 2016 The Mokee Project
5 | *
6 | * Licensed under the Apache License, Version 2.0 (the "License");
7 | * you may not use this file except in compliance with the License.
8 | * You may obtain a copy of the License at
9 | *
10 | *http://www.apache.org/licenses/LICENSE-2.0
11 | *
12 | * Unless required by applicable law or agreed to in writing, software
13 | * distributed under the License is distributed on an "AS IS" BASIS,
14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 | * See the License for the specific language governing permissions and
16 | * limitations under the License.
17 | */
18 |
19 | #ifndef __HASH_H_
20 | #define __HASH_H_
21 |
22 |
23 | #define SHA1CircularShift(bits,word) ((((word) << (bits)) & 0xFFFFFFFF) | ((word) >> (32-(bits))))
24 | #define MAX_FILE_LENGTH (300000)
25 |
26 | typedef struct SHA1Context{
27 | unsigned Message_Digest[5];
28 | unsigned Length_Low;
29 | unsigned Length_High;
30 | unsigned char Message_Block[64];
31 | int Message_Block_Index;
32 | int Computed;
33 | int Corrupted;
34 | } SHA1Context;
35 |
36 | void SHA1Reset(SHA1Context *);
37 | int SHA1Result(SHA1Context *);
38 | void SHA1Input( SHA1Context *,const char *,unsigned);
39 |
40 | void SHA1ProcessMessageBlock(SHA1Context *);
41 | void SHA1PadMessage(SHA1Context *);
42 | int sha1_hash(const char *source, int len);
43 |
44 | uint64_t hash_file(const char *file_path);
45 | uint64_t hash_string(const char *str);
46 |
47 | #endif //__HASH_H_
48 |
--------------------------------------------------------------------------------
/fingerprint/product.mk:
--------------------------------------------------------------------------------
1 | # Fingerprint
2 | PRODUCT_PACKAGES += \
3 | android.hardware.biometrics.fingerprint@2.1-service \
4 | fingerprint.msm8974
5 |
6 | PRODUCT_COPY_FILES += \
7 | frameworks/native/data/etc/android.hardware.fingerprint.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.fingerprint.xml
8 |
--------------------------------------------------------------------------------
/fingerprint/vfs61xx_ioctl.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The Android Open Source Project
3 | * Copyright (C) 2016 The Mokee Project
4 | * Copyright (C) 2016 The CyanogenMod Project
5 | *
6 | * Copied from kernel - drivers/fingerprint/vfs61xx.h
7 | *
8 | * Licensed under the Apache License, Version 2.0 (the "License");
9 | * you may not use this file except in compliance with the License.
10 | * You may obtain a copy of the License at
11 | *
12 | * http://www.apache.org/licenses/LICENSE-2.0
13 | *
14 | * Unless required by applicable law or agreed to in writing, software
15 | * distributed under the License is distributed on an "AS IS" BASIS,
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 | * See the License for the specific language governing permissions and
18 | * limitations under the License.
19 | */
20 |
21 | #ifndef VFS61XX_IOCTL_H_
22 | #define VFS61XX_IOCTL_H_
23 |
24 | /* See kernel/include/linux/fprint_secure.h */
25 | #ifndef ENABLE_SENSORS_FPRINT_SECURE
26 | #define ENABLE_SENSORS_FPRINT_SECURE
27 | #endif
28 |
29 | #include
30 |
31 | /* Pass to VFSSPI_IOCTL_REGISTER_DRDY_SIGNAL command */
32 | struct vfsspi_iocRegSignal {
33 | /* Process ID to which SPI driver sends signal
34 | * indicating that DRDY is asserted */
35 | int userPID;
36 | int signalID; /* Signal number */
37 | };
38 |
39 | /* Magic number of IOCTL command */
40 | #define VFSSPI_IOCTL_MAGIC 'k'
41 |
42 | /*
43 | * IOCTL commands definitions
44 | */
45 |
46 | #ifndef ENABLE_SENSORS_FPRINT_SECURE
47 | /* Transmit data to the device
48 | and retrieve data from it simultaneously */
49 | #define VFSSPI_IOCTL_RW_SPI_MESSAGE \
50 | _IOWR(VFSSPI_IOCTL_MAGIC, 1, unsigned int)
51 | #endif
52 | /* Hard reset the device */
53 | #define VFSSPI_IOCTL_DEVICE_RESET \
54 | _IO(VFSSPI_IOCTL_MAGIC, 2)
55 | /* Set the baud rate of SPI master clock */
56 | #define VFSSPI_IOCTL_SET_CLK \
57 | _IOW(VFSSPI_IOCTL_MAGIC, 3, unsigned int)
58 | #ifndef ENABLE_SENSORS_FPRINT_SECURE
59 | /* Get level state of DRDY GPIO */
60 | #define VFSSPI_IOCTL_CHECK_DRDY \
61 | _IO(VFSSPI_IOCTL_MAGIC, 4)
62 | #endif
63 | /* Register DRDY signal. It is used by SPI driver
64 | * for indicating host that DRDY signal is asserted. */
65 | #define VFSSPI_IOCTL_REGISTER_DRDY_SIGNAL \
66 | _IOW(VFSSPI_IOCTL_MAGIC, 5, unsigned int)
67 | /* Store the user data into the SPI driver. Currently user data is a
68 | * device info data, which is obtained from announce packet. */
69 | #ifndef ENABLE_SENSORS_FPRINT_SECURE
70 | #define VFSSPI_IOCTL_SET_USER_DATA \
71 | _IOW(VFSSPI_IOCTL_MAGIC, 6, unsigned int)
72 | #endif
73 | #ifndef ENABLE_SENSORS_FPRINT_SECURE
74 | /* Retrieve user data from the SPI driver*/
75 | #define VFSSPI_IOCTL_GET_USER_DATA \
76 | _IOWR(VFSSPI_IOCTL_MAGIC, 7, unsigned int)
77 | #endif
78 | /* Enable/disable DRDY interrupt handling in the SPI driver */
79 | #define VFSSPI_IOCTL_SET_DRDY_INT \
80 | _IOW(VFSSPI_IOCTL_MAGIC, 8, unsigned int)
81 | /* Put device in Low power mode */
82 | #define VFSSPI_IOCTL_DEVICE_SUSPEND \
83 | _IO(VFSSPI_IOCTL_MAGIC, 9)
84 | #ifndef ENABLE_SENSORS_FPRINT_SECURE
85 | /* Indicate the fingerprint buffer size for read */
86 | #define VFSSPI_IOCTL_STREAM_READ_START \
87 | _IOW(VFSSPI_IOCTL_MAGIC, 10, unsigned int)
88 | /* Indicate that fingerprint acquisition is completed */
89 | #define VFSSPI_IOCTL_STREAM_READ_STOP \
90 | _IO(VFSSPI_IOCTL_MAGIC, 11)
91 | /* Retrieve supported SPI baud rate table */
92 | #define VFSSPI_IOCTL_GET_FREQ_TABLE \
93 | _IOWR(VFSSPI_IOCTL_MAGIC, 12, unsigned int)
94 | #endif
95 | /* Turn on the power to the sensor */
96 | #define VFSSPI_IOCTL_POWER_ON \
97 | _IO(VFSSPI_IOCTL_MAGIC, 13)
98 | /* Turn off the power to the sensor */
99 | #define VFSSPI_IOCTL_POWER_OFF \
100 | _IO(VFSSPI_IOCTL_MAGIC, 14)
101 | #ifdef ENABLE_SENSORS_FPRINT_SECURE
102 | /* To disable spi core clock */
103 | #define VFSSPI_IOCTL_DISABLE_SPI_CLOCK \
104 | _IO(VFSSPI_IOCTL_MAGIC, 15)
105 | /* To set SPI configurations like gpio, clks */
106 | #define VFSSPI_IOCTL_SET_SPI_CONFIGURATION \
107 | _IO(VFSSPI_IOCTL_MAGIC, 16)
108 | /* To reset SPI configurations */
109 | #define VFSSPI_IOCTL_RESET_SPI_CONFIGURATION \
110 | _IO(VFSSPI_IOCTL_MAGIC, 17)
111 | #endif
112 | /* get sensor orienation from the SPI driver*/
113 | #define VFSSPI_IOCTL_GET_SENSOR_ORIENT \
114 | _IOR(VFSSPI_IOCTL_MAGIC, 18, unsigned int)
115 | #endif /* VFS61XX_IOCTL_H_ */
116 |
--------------------------------------------------------------------------------
/include/device_perms.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2012 The CyanogenMod Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef DEVICE_PERMS_H
18 | #define DEVICE_PERMS_H
19 |
20 | #define PROPERTY_PERMS_APPEND \
21 | { "persist.audio.", AID_SYSTEM, 0 }, \
22 | { "persist.sys.camera.", AID_MEDIA, 0 }, \
23 | { "wlan.hdcp2.", AID_MEDIA, 0 },
24 | #endif /* DEVICE_PERMS_H */
25 |
--------------------------------------------------------------------------------
/include/samsung_ir.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The CyanogenMod Project
3 | * Copyright (C) 2020 The LineageOS Project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | #ifndef SAMSUNG_CONSUMERIR_H
19 | #define SAMSUNG_CONSUMERIR_H
20 |
21 | #include
22 |
23 | using android::hardware::ir::V1_0::ConsumerIrFreqRange;
24 |
25 | /*
26 | * Board specific nodes
27 | *
28 | * If your kernel exposes these controls in another place, you can either
29 | * symlink to the locations given here, or override this header in your
30 | * device tree.
31 | */
32 | #define IR_PATH "/sys/class/sec/sec_ir/ir_send"
33 |
34 | /*
35 | * Board specific configs
36 | *
37 | * If your device needs a different configuration, you
38 | * can override this header in your device tree
39 | */
40 | // Some devices need MS_IR_SIGNAL to avoid ms to pulses conversionn
41 | #define MS_IR_SIGNAL
42 |
43 | static const std::vector consumerirFreqs = {
44 | {.min = 30000, .max = 30000},
45 | {.min = 33000, .max = 33000},
46 | {.min = 36000, .max = 36000},
47 | {.min = 38000, .max = 38000},
48 | {.min = 40000, .max = 40000},
49 | {.min = 56000, .max = 56000},
50 | };
51 |
52 | #endif // SAMSUNG_CONSUMERIR_H
53 |
--------------------------------------------------------------------------------
/include/samsung_lights.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016 The CyanogenMod Project
3 | * Copyright (C) 2017 The LineageOS Project
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 |
18 | #ifndef SAMSUNG_LIGHTS_H
19 | #define SAMSUNG_LIGHTS_H
20 |
21 | /*
22 | * Board specific nodes
23 | *
24 | * If your kernel exposes these controls in another place, you can either
25 | * symlink to the locations given here, or override this header in your
26 | * device tree.
27 | */
28 | #define PANEL_BRIGHTNESS_NODE "/sys/class/leds/lcd-backlight/brightness"
29 | #define PANEL_MAX_BRIGHTNESS_NODE "/sys/class/leds/lcd-backlight/max_brightness"
30 | #define BUTTON_BRIGHTNESS_NODE "/sys/class/sec/sec_touchkey/brightness"
31 | #define LED_BLINK_NODE "/sys/class/sec/led/led_blink"
32 |
33 | /*
34 | * Brightness adjustment factors
35 | *
36 | * If one of your device's LEDs is more powerful than the others, use these
37 | * values to equalise them. This value is in the range 0.0-1.0.
38 | */
39 | #define LED_ADJUSTMENT_R 1.0
40 | #define LED_ADJUSTMENT_G 1.0
41 | #define LED_ADJUSTMENT_B 1.0
42 |
43 | /*
44 | * Light brightness factors
45 | *
46 | * It might make sense for all colours to be scaled down (for example, if your
47 | * LED is too bright). Use these values to adjust the brightness of each
48 | * light. This value is within the range 0-255.
49 | */
50 | #define LED_BRIGHTNESS_BATTERY 255
51 | #define LED_BRIGHTNESS_NOTIFICATION 255
52 | #define LED_BRIGHTNESS_ATTENTION 255
53 |
54 | #endif // SAMSUNG_LIGHTS_H
55 |
--------------------------------------------------------------------------------
/include/samsung_macloader.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | #ifndef SAMSUNG_MACLOADER_H
18 | #define SAMSUNG_MACLOADER_H
19 |
20 | /*
21 | * Board specific nodes
22 | *
23 | * If your kernel exposes these controls in another place, you can either
24 | * symlink to the locations given here, or override this header in your
25 | * device tree.
26 | */
27 |
28 | /* NVRAM calibration, NULL if calibration unneeded */
29 | #define WIFI_DRIVER_NVRAM_PATH "/vendor/etc/wifi/nvram_net.txt"
30 |
31 | /* NVRAM calibration parameters */
32 | #define WIFI_DRIVER_NVRAM_PATH_PARAM "/sys/module/dhd/parameters/nvram_path"
33 |
34 | /* Physical address (MAC) */
35 | #define MACADDR_PATH "/efs/wifi/.mac.info"
36 |
37 | /* Consumer identification number (CID) */
38 | #define CID_PATH "/data/.cid.info"
39 |
40 | #endif // SAMSUNG_MACLOADER_H
41 |
--------------------------------------------------------------------------------
/keylayout/gpio-keys.kl:
--------------------------------------------------------------------------------
1 | # Copyright (c) 2012, The Linux Foundation. All rights reserved.
2 | #
3 | # Redistribution and use in source and binary forms, with or without
4 | # modification, are permitted provided that the following conditions are
5 | # met:
6 | # * Redistributions of source code must retain the above copyright
7 | # notice, this list of conditions and the following disclaimer.
8 | # * Redistributions in binary form must reproduce the above
9 | # copyright notice, this list of conditions and the following
10 | # disclaimer in the documentation and/or other materials provided
11 | # with the distribution.
12 | # * Neither the name of The Linux Foundation nor the names of its
13 | # contributors may be used to endorse or promote products derived
14 | # from this software without specific prior written permission.
15 | #
16 | # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
17 | # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 | # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
19 | # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
20 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 | # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 | # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
23 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
24 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
25 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
26 |
27 | key 115 VOLUME_UP
28 | key 114 VOLUME_DOWN
29 | key 172 HOME
30 | key 528 FOCUS
31 | key 252 CAMERA
32 | key 766 CAMERA
33 | key 116 POWER
34 | key 139 MENU
35 | key 158 BACK
36 | key 254 APP_SWITCH
37 |
--------------------------------------------------------------------------------
/keylayout/sec_touchkey.kl:
--------------------------------------------------------------------------------
1 | key 254 APP_SWITCH VIRTUAL
2 | key 158 BACK VIRTUAL
3 |
--------------------------------------------------------------------------------
/klte.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2014-2016 The CyanogenMod Project
3 | # Copyright (C) 2017-2018,2021 The LineageOS Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | $(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
19 |
20 | # Overlays
21 | DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
22 | DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay-lineage
23 |
24 | # Boot animation
25 | TARGET_SCREEN_HEIGHT := 1920
26 | TARGET_SCREEN_WIDTH := 1080
27 |
28 | # Audio
29 | PRODUCT_COPY_FILES += \
30 | $(LOCAL_PATH)/audio/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
31 | $(LOCAL_PATH)/audio/audio_platform_info.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_platform_info.xml \
32 | $(LOCAL_PATH)/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
33 | $(LOCAL_PATH)/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
34 | frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
35 | frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
36 | frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
37 | frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
38 | frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml
39 |
40 | # Camera
41 | PRODUCT_PACKAGES += \
42 | libshim_camera
43 |
44 | # Device uses high-density artwork where available
45 | PRODUCT_AAPT_CONFIG := normal
46 | PRODUCT_AAPT_PREF_CONFIG := xxhdpi
47 |
48 | # Doze
49 | PRODUCT_PACKAGES += \
50 | SamsungDoze
51 |
52 | # FlipFlap
53 | PRODUCT_PACKAGES += \
54 | FlipFlap
55 |
56 | # Keylayouts
57 | PRODUCT_COPY_FILES += \
58 | $(LOCAL_PATH)/keylayout/gpio-keys.kl:system/usr/keylayout/gpio-keys.kl \
59 | $(LOCAL_PATH)/keylayout/sec_touchkey.kl:system/usr/keylayout/sec_touchkey.kl
60 |
61 | # Media
62 | PRODUCT_COPY_FILES += \
63 | $(LOCAL_PATH)/configs/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
64 | $(LOCAL_PATH)/configs/media_codecs_performance.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance.xml
65 |
66 | # Permissions
67 | PRODUCT_COPY_FILES += \
68 | frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml \
69 | frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \
70 | frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml \
71 | frameworks/native/data/etc/android.hardware.telephony.cdma.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.cdma.xml \
72 | frameworks/native/data/etc/android.hardware.telephony.gsm.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.telephony.gsm.xml \
73 | frameworks/native/data/etc/com.nxp.mifare.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.nxp.mifare.xml \
74 | frameworks/native/data/etc/handheld_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/handheld_core_hardware.xml
75 |
76 | # Radio
77 | PRODUCT_PACKAGES += \
78 | libsecnativefeature
79 |
80 | # Ramdisk
81 | PRODUCT_PACKAGES += \
82 | fstab.qcom \
83 | init.qcom.rc \
84 | init.qcom.usb.rc \
85 | ueventd.qcom.rc
86 |
87 | # Sensors
88 | PRODUCT_COPY_FILES += \
89 | $(LOCAL_PATH)/configs/sensors/_hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/_hals.conf
90 |
91 | # Shims
92 | PRODUCT_PACKAGES += \
93 | libshim_binder
94 |
95 | # Shipping API level
96 | $(call inherit-product, $(SRC_TARGET_DIR)/product/product_launched_with_k.mk)
97 |
98 | # Thermal
99 | PRODUCT_COPY_FILES += \
100 | $(LOCAL_PATH)/configs/thermal-engine-8974.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-8974.conf
101 |
102 | # Vibrator
103 | PRODUCT_PACKAGES += \
104 | android.hardware.vibrator@1.0-impl
105 |
106 | # Wifi
107 | PRODUCT_PACKAGES += \
108 | macloader
109 |
110 | PRODUCT_COPY_FILES += \
111 | $(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
112 | $(LOCAL_PATH)/configs/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
113 |
114 | # Get non-open-source specific aspects
115 | $(call inherit-product, vendor/samsung/klte-common/klte-common-vendor.mk)
116 |
117 | # common msm8974
118 | $(call inherit-product, device/samsung/msm8974-common/msm8974.mk)
119 |
--------------------------------------------------------------------------------
/libshims/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2017 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | include $(call first-makefiles-under,$(call my-dir))
18 |
--------------------------------------------------------------------------------
/libshims/libshim_camera/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH := $(call my-dir)
2 |
3 | include $(CLEAR_VARS)
4 | LOCAL_SRC_FILES := camera_shim.c
5 | LOCAL_MODULE := libshim_camera
6 | LOCAL_MODULE_TAGS := optional
7 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES
8 | LOCAL_PROPRIETARY_MODULE := true
9 | include $(BUILD_SHARED_LIBRARY)
10 |
--------------------------------------------------------------------------------
/libshims/libshim_camera/camera_shim.c:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2017 The LineageOS Project
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | // rt hdr
18 | const char _ZN7android16CameraParameters10KEY_RT_HDRE[] = "rt-hdr";
19 | const char _ZN7android16CameraParameters20KEY_SUPPORTED_RT_HDRE[] = "rt-hdr-values";
20 | const char _ZN7android16CameraParameters9RTHDR_OFFE[] = "off";
21 | const char _ZN7android16CameraParameters8RTHDR_ONE[] = "on";
22 |
23 | // phase af
24 | const char _ZN7android16CameraParameters12KEY_PHASE_AFE[] = "phase-af";
25 | const char _ZN7android16CameraParameters22KEY_SUPPORTED_PHASE_AFE[] = "phase-af-values";
26 | const char _ZN7android16CameraParameters7PAF_OFFE[] = "off";
27 | const char _ZN7android16CameraParameters6PAF_ONE[] = "on";
28 |
29 | // dynamic range control
30 | const char _ZN7android16CameraParameters25KEY_DYNAMIC_RANGE_CONTROLE[] = "dynamic-range-control";
31 | const char _ZN7android16CameraParameters35KEY_SUPPORTED_DYNAMIC_RANGE_CONTROLE[] = "dynamic-range-control-values";
32 | const char _ZN7android16CameraParameters7DRC_OFFE[] = "off";
33 | const char _ZN7android16CameraParameters6DRC_ONE[] = "on";
34 |
--------------------------------------------------------------------------------
/lineage.dependencies:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "repository": "android_device_samsung_msm8974-common",
4 | "target_path": "device/samsung/msm8974-common"
5 | },
6 | {
7 | "repository": "android_kernel_samsung_msm8974",
8 | "target_path": "kernel/samsung/msm8974"
9 | }
10 | ]
11 |
--------------------------------------------------------------------------------
/manifest.xml:
--------------------------------------------------------------------------------
1 | >
2 |
3 | android.hardware.vibrator
4 | passthrough
5 | 1.0
6 |
7 | IVibrator
8 | default
9 |
10 |
11 |
12 | vendor.lineage.touch
13 | hwbinder
14 | 1.0
15 |
16 | IGloveMode
17 | default
18 |
19 |
20 | IStylusMode
21 | default
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/nfc/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2016 The CyanogenMod Project
3 | # Copyright 2017-2018 The LineageOS Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | include $(call first-makefiles-under,$(call my-dir))
19 |
--------------------------------------------------------------------------------
/nfc/bcm2079x/board.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # NFC
18 | include $(COMMON_PATH)/nfc/board.mk
19 |
--------------------------------------------------------------------------------
/nfc/bcm2079x/libnfc-brcm-20791b04.conf:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Firmware patch file
3 | # If the value is not set then patch download is disabled.
4 | FW_PATCH="/vendor/firmware/bcm2079xB4_firmware.ncd"
5 | FW_PATCH_20793="/vendor/firmware/bcm2079xB4_firmware_20793.ncd"
6 |
7 | ###############################################################################
8 | # Firmware pre-patch file (sent before the above patch file)
9 | # If the value is not set then pre-patch is not used.
10 | FW_PRE_PATCH="/vendor/firmware/bcm2079xB4_pre_firmware.ncd"
11 | FW_PRE_PATCH_20793="/vendor/firmware/bcm2079xB4_pre_firmware_20793.ncd"
12 |
13 | ###############################################################################
14 | # LPTD mode configuration
15 | # byte[0] is the length of the remaining bytes in this value
16 | # if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
17 | # byte[1] is the param id it should be set to B9.
18 | # byte[2] is the length of the LPTD parameters
19 | # byte[3] indicates if LPTD is enabled
20 | # if set to 0, LPTD will be disabled (parameters will still be sent).
21 | # byte[4-n] are the LPTD parameters.
22 | # By default, LPTD is enabled and default settings are used.
23 | #
24 | # These settings are tuned for B4 evaluation boards.
25 | # LPTD DISABLED ---
26 | #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}
27 |
28 | # Eval Board ---
29 | #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}
30 |
31 | # HLTE EUR NFC LPTD ENABLED
32 | 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}
33 |
34 | ###############################################################################
35 | # Startup Configuration (100 bytes maximum)
36 | #
37 | # For the 0xC2 parameter, set byte[0] to 60 to disable UICC Idle Timeout.
38 | # set to 61 to enable (The least significant bit of this byte enables
39 | # the power off when Idle mode).
40 | # 20 A1 07 00 == > These 4 bytes form a 4 byte value which decides the idle timeout(in us)
41 | # value to trigger the uicc deactivation.
42 | # NFC forum conformance
43 | #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}
44 | # GCF combined + clfCfgTagPicc
45 | 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}
46 |
47 | ###############################################################################
48 | # Pre-Discovery Startup Configuration (256 bytes maximum)
49 | #
50 | # This is applied before starting Discovery the first time.
51 | #NFA_DM_PRE_DISCOVERY_CFG={0A:C2:08:01:08:00:04:80:C3:C9:01}
52 |
53 | ###############################################################################
54 | # Antenna Configuration - This data is used when setting 0xC8 config item
55 | # at startup (before discovery is started). If not used, no value is sent.
56 | #
57 | # The settings for this value are documented here:
58 | # http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
59 | # Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
60 | # This document is maintained by Paul Forshaw.
61 | #
62 | # The values marked as ?? should be tweaked per antenna or customer/app:
63 | # {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}
64 | # array[0] = 0x20 is length of the payload from array[1] to the end
65 | # array[1] = 0xC8 is PREINIT_DSP_CFG
66 | 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}
67 |
68 | ###############################################################################
69 | # Snooze Mode Settings
70 | #
71 | # By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
72 | # to disable.
73 | #
74 | # If SNOOZE_MODE_CFG is not provided, the default settings are used:
75 | # They are as follows:
76 | # 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
77 | # 0 Idle Threshold Host
78 | # 0 Idle Threshold HC
79 | # 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
80 | # 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
81 | #
82 | #SNOOZE_MODE_CFG={08:00:00:00:01}
83 |
84 | BRCM_CTS_WAR=0x03
85 |
--------------------------------------------------------------------------------
/nfc/bcm2079x/libnfc-brcm-20791b05.conf:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Firmware patch file
3 | # If the value is not set then patch download is disabled.
4 | FW_PATCH="/vendor/firmware/bcm2079xB5_firmware.ncd"
5 | #FW_PATCH_20793="/vendor/firmware/bcm2079xB5_firmware_20793.ncd"
6 |
7 | ###############################################################################
8 | # Firmware pre-patch file (sent before the above patch file)
9 | # If the value is not set then pre-patch is not used.
10 | FW_PRE_PATCH="/vendor/firmware/bcm2079xB5_pre_firmware.ncd"
11 | #FW_PRE_PATCH_20793="/vendor/firmware/bcm2079xB5_pre_firmware_20793.ncd"
12 |
13 | ###############################################################################
14 | # LPTD mode configuration
15 | # byte[0] is the length of the remaining bytes in this value
16 | # if set to 0, LPTD params will NOT be sent to NFCC (i.e. disabled).
17 | # byte[1] is the param id it should be set to B9.
18 | # byte[2] is the length of the LPTD parameters
19 | # byte[3] indicates if LPTD is enabled
20 | # if set to 0, LPTD will be disabled (parameters will still be sent).
21 | # byte[4-n] are the LPTD parameters.
22 | # By default, LPTD is enabled and default settings are used.
23 | # See nfc_hal_dm_cfg.c for defaults
24 | 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}
25 |
26 | ###############################################################################
27 | # Startup Configuration (256 bytes maximum)
28 | #
29 | # This is applied at stack startup.
30 | #
31 | 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}
32 |
33 | ###############################################################################
34 | # Pre-Discovery Startup Configuration (256 bytes maximum)
35 | #
36 | # This is applied before starting Discovery the first time.
37 | NFA_DM_PRE_DISCOVERY_CFG={0A:C2:08:01:08:00:04:80:C3:C9:01}
38 |
39 | ###############################################################################
40 | # Antenna Configuration - This data is used when setting 0xC8 config item
41 | # at startup (before discovery is started). If not used, no value is sent.
42 | #
43 | # The settings for this value are documented here:
44 | # http://wcgbu.broadcom.com/wpan/PM/Project%20Document%20Library/bcm20791B0/
45 | # Design/Doc/PHY%20register%20settings/BCM20791-B2-1027-02_PHY_Recommended_Reg_Settings.xlsx
46 | #
47 | # The values marked as ?? should be tweaked per antenna or customer/app:
48 | # {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}
49 | # array[0] = 0x20 is length of the payload from array[1] to the end
50 | # array[1] = 0xC8 is PREINIT_DSP_CFG
51 | 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}
52 |
53 | ###############################################################################
54 | # Snooze Mode Settings
55 | #
56 | # By default snooze mode is enabled. Set SNOOZE_MODE_CFG byte[0] to 0
57 | # to disable.
58 | #
59 | # If SNOOZE_MODE_CFG is not provided, the default settings are used:
60 | # They are as follows:
61 | # 8 Sleep Mode (0=Disabled 1=UART 8=SPI/I2C)
62 | # 0 Idle Threshold Host
63 | # 0 Idle Threshold HC
64 | # 0 NFC Wake active mode (0=ActiveLow 1=ActiveHigh)
65 | # 1 Host Wake active mode (0=ActiveLow 1=ActiveHigh)
66 | #
67 | #SNOOZE_MODE_CFG={08:00:00:00:01}
68 |
69 | BRCM_CTS_WAR=0x02
70 |
71 |
--------------------------------------------------------------------------------
/nfc/bcm2079x/libnfc-nci.conf:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Application options
3 | APPL_TRACE_LEVEL=0xFF
4 | PROTOCOL_TRACE_LEVEL=0xFFFFFFFF
5 |
6 | ###############################################################################
7 | # Logging
8 | # Set USE_RAW_NCI_TRACE = 1 for protocol logging in a raw format
9 | # instead of decoded
10 | # Set LOG_TO_FILE = 1 to log protocol traces to a file on the sdcard
11 | # instead of to adb logcat
12 | # Set LOGCAT_FILTER to the filter string which is passed to logcat
13 | #USE_RAW_NCI_TRACE=0
14 | #LOG_TO_FILE=0
15 | #LOGCAT_FILTER="BrcmNciX:V BrcmNciR:V BrcmNote:V *:S"
16 |
17 | PRESERVE_STORAGE=1
18 |
19 | ###############################################################################
20 | # performance measurement
21 | # Change this setting to control how often USERIAL log the performance (throughput)
22 | # data on read/write/poll
23 | # defailt is to log performance dara for every 100 read or write
24 | #REPORT_PERFORMANCE_MEASURE=100
25 |
26 | ###############################################################################
27 | # File used for NFA storage
28 | NFA_STORAGE="/data/bcmnfc"
29 |
30 | ###############################################################################
31 | # Low Power Mode Settings
32 | #
33 | # If NFA_DM_LP_CFG is not provided, stack default settings are
34 | # used (see nfa_dm_brcm_cfg.c). They are as follows:
35 | # 1 Power cycle to full power mode from CEx
36 | # 5 Parameter for low power mode command
37 | # 0 Primary Threshold for battery monitor
38 | # 0-7 representing below voltages:
39 | # {2, 2.2, 2.7, 2.8, 2.9, 3, 3.1, 3.2}
40 | # 8 Secondary Threshold for battery monitor
41 | # 0-15 representing below voltages:
42 | # {5.2, 4.87, 4.54, 4.22, 3.9, 3.73, 3.57, 3.4,
43 | # 3.2, 3.1, 3.0, 2.9, 2.8, 2.7, 2.2, 2.0}
44 | #
45 | #NFA_DM_LP_CFG={01:05:00:08}
46 | # LPM Disable FW VBAT MON
47 | NFA_DM_LP_CFG={01:01:00:08}
48 |
49 | ###############################################################################
50 | # Insert a delay in milliseconds after NFC_WAKE and before write to NFCC
51 | NFC_WAKE_DELAY=20
52 |
53 | ###############################################################################
54 | # Various Delay settings (in ms) used in USERIAL
55 | # POWER_ON_DELAY
56 | # Delay after turning on chip, before writing to transport (default 300)
57 | # PRE_POWER_OFF_DELAY
58 | # Delay after deasserting NFC-Wake before turn off chip (default 0)
59 | # POST_POWER_OFF_DELAY
60 | # Delay after turning off chip, before USERIAL_close returns (default 0)
61 | # CE3_PRE_POWER_OFF_DELAY
62 | # Delay after deasserting NFC-Wake before turn off chip (default 1000)
63 | # when going to CE3 Switch Off mode
64 | #
65 | #POWER_ON_DELAY=300
66 | PRE_POWER_OFF_DELAY=1500
67 | #POST_POWER_OFF_DELAY=0
68 | #CE3_PRE_POWER_OFF_DELAY=1000
69 |
70 |
71 | ###############################################################################
72 | # Device Manager Config
73 | #
74 | # If NFA_DM_CFG is not provided, stack default settings are
75 | # used (see nfa_dm_cfg.c). They are as follows:
76 | # 0 (FALSE) Automatic NDEF detection when background polling
77 | # 0 (FALSE) Automatic NDEF read when background polling
78 | #
79 | #NFA_DM_CFG={00:00}
80 |
81 | ###############################################################################
82 | # Default poll duration (in ms)
83 | # The defualt is 500ms if not set (see nfc_target.h) same as M0
84 | NFA_DM_DISC_DURATION_POLL=500
85 |
86 | ###############################################################################
87 | # Startup Vendor Specific Configuration (100 bytes maximum);
88 | # byte[0] TLV total len = 0x5
89 | # byte[1] NCI_MTS_CMD|NCI_GID_PROP = 0x2f
90 | # byte[2] NCI_MSG_FRAME_LOG = 0x9
91 | # byte[3] 2
92 | # byte[4] 0=turn off RF frame logging; 1=turn on
93 | # byte[5] 0=turn off SWP frame logging; 1=turn on
94 | # NFA_DM_START_UP_VSC_CFG={05:2F:09:02:01:01}
95 |
96 | #HW FSM
97 | #NFA_DM_START_UP_VSC_CFG={04:2F:06:01:00}
98 |
99 | ###############################################################################
100 | # Configure crystal frequency when internal LPO can't detect the frequency.
101 | #XTAL_FREQUENCY=0
102 |
103 | ###############################################################################
104 | # Use Nexus S NXP RC work to allow our stack/firmware to work with a retail
105 | # Nexus S that causes IOP issues. Note, this will not pass conformance and
106 | # should be removed for production.
107 | #USE_NXP_P2P_RC_WORKAROUND=1
108 |
109 | ###############################################################################
110 | # Configure the default Destination Gate used by HCI (the default is 4, which
111 | # is the ETSI loopback gate.
112 | #NFA_HCI_DEFAULT_DEST_GATE=0x04
113 |
114 | ###############################################################################
115 | # Configure the single default SE to use. The default is to use the first
116 | # SE that is detected by the stack. This value might be used when the phone
117 | # supports multiple SE (e.g. 0xF3 and 0xF4) but you want to force it to use
118 | # one of them (e.g. 0xF4).
119 | ACTIVE_SE=0xF4
120 |
121 | ###############################################################################
122 | # Configure the NFC Extras to open and use a static pipe. If the value is
123 | # not set or set to 0, then the default is use a dynamic pipe based on a
124 | # destination gate (see NFA_HCI_DEFAULT_DEST_GATE). Note there is a value
125 | # for each UICC (where F3="UICC0" and F4="UICC1")
126 | NFA_HCI_STATIC_PIPE_ID_F3=0x71
127 | NFA_HCI_STATIC_PIPE_ID_F4=0x71
128 |
129 | ###############################################################################
130 | # When disconnecting from Oberthur secure element, perform a warm-reset of
131 | # the secure element to deselect the applet.
132 | # The default hex value of the command is 0x3. If this variable is undefined,
133 | # then this feature is not used.
134 | OBERTHUR_WARM_RESET_COMMAND=0x03
135 |
136 | ###############################################################################
137 | # Force UICC to only listen to the following technology(s).
138 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
139 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B.
140 | #UICC_LISTEN_TECH_MASK=0x03
141 |
142 | ###############################################################################
143 | # AID for Empty Select command
144 | # If specified, this AID will be substituted when an Empty SELECT command is
145 | # detected. The first byte is the length of the AID. Maximum length is 16.
146 | AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00}
147 |
148 | ###############################################################################
149 | # Force tag polling for the following technology(s).
150 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
151 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B |
152 | # NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 |
153 | # NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_A_ACTIVE |
154 | # NFA_TECHNOLOGY_MASK_F_ACTIVE.
155 | #
156 | # Notable bits:
157 | # NFA_TECHNOLOGY_MASK_A 0x01
158 | # NFA_TECHNOLOGY_MASK_B 0x02
159 | # NFA_TECHNOLOGY_MASK_F 0x04
160 | # NFA_TECHNOLOGY_MASK_ISO15693 0x08
161 | # NFA_TECHNOLOGY_MASK_B_PRIME 0x10
162 | # NFA_TECHNOLOGY_MASK_KOVIO 0x20
163 | # NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40
164 | # NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80
165 | POLLING_TECH_MASK=0xEF
166 |
167 | ###############################################################################
168 | # Force P2P to only listen for the following technology(s).
169 | # The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h.
170 | # Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F |
171 | # NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE
172 | P2P_LISTEN_TECH_MASK=0xC4
173 |
174 | ###############################################################################
175 | # This setting allows you to disable registering the T4t Virtual SE that causes
176 | # the NFCC to send PPSE requests to the DH.
177 | # The default setting is enabled (i.e. T4t Virtual SE is registered).
178 | #REGISTER_VIRTUAL_SE=1
179 | REGISTER_VIRTUAL_SE=0
180 |
181 | ###############################################################################
182 | # When screen is turned off, specify the desired power state of the controller.
183 | # 0: power-off-sleep state; DEFAULT
184 | # 1: full-power state
185 | # 2: screen-off card-emulation (CE4/CE3/CE1 modes are used)
186 | # 3: FPM CE in snooze mode, Switch Off, Battery Off still available.
187 | SCREEN_OFF_POWER_STATE=3
188 |
189 | ###############################################################################
190 | # SPD Debug mode
191 | # If set to 1, any failure of downloading a patch will trigger a hard-stop
192 | #SPD_DEBUG=0
193 |
194 | ###############################################################################
195 | # SPD Max Retry Count
196 | # The number of attempts to download a patch before giving up (defualt is 3).
197 | # Note, this resets after a power-cycle.
198 | #SPD_MAX_RETRY_COUNT=3
199 |
200 | ###############################################################################
201 | # Patch RAM Version Checking
202 | # By default the stack will reject any attempt to download a patch where major
203 | # version is < the one that is in NVM. If this config item is set to 1 then
204 | # this version check is skipped.
205 | #
206 | #SPD_IGNORE_VERSION=0
207 |
208 | ###############################################################################
209 | # transport driver
210 | #
211 | # TRANSPORT_DRIVER=
212 | #
213 | # where can be, for example:
214 | # "/dev/ttyS" (UART)
215 | # "/dev/bcmi2cnfc" (I2C)
216 | # "hwtun" (HW Tunnel)
217 | # "/dev/bcmspinfc" (SPI)
218 | # "/dev/btusb0" (BT USB)
219 | TRANSPORT_DRIVER="/dev/bcm2079x"
220 |
221 | ###############################################################################
222 | # power control driver
223 | # Specify a kernel driver that support ioctl commands to control NFC_EN and
224 | # NFC_WAKE gpio signals.
225 | #
226 | # POWER_CONTRL_DRIVER=
227 | # where can be, for example:
228 | # "/dev/nfcpower"
229 | # "/dev/bcmi2cnfc" (I2C)
230 | # "/dev/bcmspinfc" (SPI)
231 | # i2c and spi driver may be used to control NFC_EN and NFC_WAKE signal
232 | POWER_CONTROL_DRIVER="/dev/bcm2079x"
233 |
234 | ###############################################################################
235 | # I2C transport driver options
236 | #
237 | BCMI2CNFC_ADDRESS=0
238 |
239 | ###############################################################################
240 | # I2C transport driver try to read multiple packets in read() if data is available
241 | # remove the comment below to enable this feature
242 | #READ_MULTIPLE_PACKETS=1
243 |
244 | ###############################################################################
245 | # SPI transport driver options
246 | #SPI_NEGOTIATION={0A:F0:00:01:00:00:00:FF:FF:00:00}
247 |
248 | ###############################################################################
249 | # UART transport driver options
250 | #
251 | # PORT=1,2,3,...
252 | # BAUD=115200, 19200, 9600, 4800,
253 | # DATABITS=8, 7, 6, 5
254 | # PARITY="even" | "odd" | "none"
255 | # STOPBITS="0" | "1" | "1.5" | "2"
256 |
257 | #UART_PORT=2
258 | #UART_BAUD=115200
259 | #UART_DATABITS=8
260 | #UART_PARITY="none"
261 | #UART_STOPBITS="1"
262 |
263 | ###############################################################################
264 | # Insert a delay in microseconds per byte after a write to NFCC.
265 | # after writing a block of data to the NFCC, delay this an amopunt of time before
266 | # writing next block of data. the delay is calculated as below
267 | # NFC_WRITE_DELAY * (number of byte written) / 1000 milliseconds
268 | # e.g. after 259 bytes is written, delay (259 * 20 / 1000) 5 ms before next write
269 | NFC_WRITE_DELAY=20
270 |
271 | ###############################################################################
272 | # Configure the default NfcA/IsoDep techology and protocol route. Can be
273 | # either a secure element (e.g. 0xF4) or the host (0x00)
274 | DEFAULT_ISODEP_ROUTE=0xF3
275 |
276 | ###############################################################################
277 | # Configure the default "off-host" AID route. The default is 0xF4
278 | DEFAULT_OFFHOST_ROUTE=0xF4
279 |
280 | POWER_SAVER_WORKAROUND_1=0xF3
281 |
282 | PRESENCE_CHECK_ALGORITHM=1
283 | AID_MATCHING_MODE=2
284 | AUTO_ADJUST_ISO_BITRATE=1
285 |
--------------------------------------------------------------------------------
/nfc/bcm2079x/product.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # NFC
18 | $(call inherit-product, device/samsung/klte-common/nfc/product.mk)
19 |
20 | PRODUCT_PACKAGES += \
21 | android.hardware.nfc@1.0-impl-bcm \
22 | android.hardware.nfc@1.0-service \
23 | nfc_nci.bcm2079x.default
24 |
25 | PRODUCT_COPY_FILES += \
26 | device/samsung/klte-common/nfc/bcm2079x/libnfc-nci.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-nci.conf \
27 | device/samsung/klte-common/nfc/bcm2079x/libnfc-brcm-20791b04.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-brcm-20791b04.conf \
28 | device/samsung/klte-common/nfc/bcm2079x/libnfc-brcm-20791b05.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-brcm-20791b05.conf
29 |
--------------------------------------------------------------------------------
/nfc/board.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # NFC
18 | DEVICE_MANIFEST_FILE += $(COMMON_PATH)/nfc/manifest.xml
19 |
--------------------------------------------------------------------------------
/nfc/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.hardware.nfc
4 | passthrough
5 | 1.0
6 |
7 | INfc
8 | default
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/nfc/nfcee_access.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/nfc/pn547/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | include $(call first-makefiles-under,$(call my-dir))
18 |
--------------------------------------------------------------------------------
/nfc/pn547/board.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # NFC
18 | include $(COMMON_PATH)/nfc/board.mk
19 |
20 | # PN547 specific flags
21 | BOARD_NFC_CHIPSET := pn547
22 |
--------------------------------------------------------------------------------
/nfc/pn547/product.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # NFC
18 | $(call inherit-product, device/samsung/klte-common/nfc/product.mk)
19 |
20 | PRODUCT_PACKAGES += \
21 | android.hardware.nfc@1.0-impl \
22 | libpn547_fw
23 |
24 | PRODUCT_COPY_FILES += \
25 | device/samsung/klte-common/nfc/pn547/libnfc-nci.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-nci.conf \
26 | device/samsung/klte-common/nfc/pn547/libnfc-nxp.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libnfc-nxp.conf \
27 | vendor/samsung/klte-common/proprietary/vendor/lib/hw/nfc_nci.msm8974.so:$(TARGET_COPY_OUT_VENDOR)/lib/hw/nfc_nci.msm8974.so
28 |
--------------------------------------------------------------------------------
/nfc/pn547/src/Android.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright 2016 The CyanogenMod Project
3 | # Copyright 2017-2018 The LineageOS Project
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 | #
17 |
18 | LOCAL_PATH := $(call my-dir)
19 |
20 | include $(CLEAR_VARS)
21 |
22 | LOCAL_SRC_FILES := libpn547_fw.c
23 | LOCAL_MODULE := libpn547_fw
24 | LOCAL_MODULE_OWNER := nxp
25 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/firmware
26 | LOCAL_MODULE_TAGS := optional
27 | LOCAL_PACK_MODULE_RELOCATIONS := false
28 |
29 | include $(BUILD_SHARED_LIBRARY)
30 |
--------------------------------------------------------------------------------
/nfc/product.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # NFC
18 | PRODUCT_PACKAGES += \
19 | com.android.nfc_extras \
20 | NfcNci \
21 | Tag
22 |
23 | PRODUCT_COPY_FILES += \
24 | device/samsung/klte-common/nfc/nfcee_access.xml:system/etc/nfcee_access.xml
25 |
26 | # NFC Permissions
27 | PRODUCT_COPY_FILES += \
28 | frameworks/native/data/etc/android.hardware.nfc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.xml \
29 | frameworks/native/data/etc/android.hardware.nfc.hce.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.nfc.hce.xml \
30 | frameworks/native/data/etc/com.android.nfc_extras.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/com.android.nfc_extras.xml
31 |
--------------------------------------------------------------------------------
/overlay-lineage/frameworks/base/core/res/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
21 |
22 |
23 |
26 | false
27 |
28 |
29 |
--------------------------------------------------------------------------------
/overlay-lineage/lineage-sdk/lineage/res/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 |
20 |
35 | 75
36 |
37 |
49 | 83
50 |
51 |
63 | 65
64 |
65 |
66 | true
67 |
68 |
70 | false
71 |
72 |
74 | true
75 |
76 |
77 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
23 |
24 |
25 | false
26 |
27 |
28 | #ffffffff
29 |
30 |
31 |
32 | 0xFFFF6000
33 |
34 |
44 |
45 | - 2
46 | - 7
47 | - 15
48 | - 50
49 | - 100
50 | - 200
51 | - 400
52 | - 1000
53 | - 2000
54 | - 3000
55 | - 5000
56 | - 10000
57 | - 30000
58 |
59 |
60 |
64 |
65 | - 13
66 | - 25
67 | - 32
68 | - 41
69 | - 52
70 | - 62
71 | - 69
72 | - 78
73 | - 88
74 | - 134
75 | - 178
76 | - 225
77 | - 255
78 | - 255
79 |
80 |
81 |
82 | 2
83 |
84 |
85 | 17
86 |
87 |
88 | com.android.systemui/com.android.systemui.doze.DozeService
89 |
90 |
92 | true
93 |
94 |
96 | 102
97 |
98 |
100 | 2
101 |
102 |
104 | 255
105 |
106 |
108 |
109 |
111 |
114 |
115 |
116 | - "wifi,1,1,1,-1,true"
117 | - "mobile,0,0,0,-1,true"
118 | - "mobile_mms,2,0,2,180000,true"
119 | - "mobile_supl,3,0,2,60000,true"
120 | - "mobile_dun,4,0,2,60000,true"
121 | - "mobile_hipri,5,0,3,60000,true"
122 | - "mobile_bluetooth,7,7,2,-1,true"
123 | - "wifi_p2p,13,1,0,-1,true"
124 |
125 |
126 |
128 |
129 | - "1,1"
130 | - "0,1"
131 | - "7,1"
132 |
133 |
134 |
135 | false
136 |
137 |
138 | true
139 |
140 |
141 |
142 | true
143 |
144 |
145 |
146 | - 0
147 | - 1
148 | - 20
149 | - 21
150 |
151 |
152 |
153 |
154 | - 0
155 | - 10
156 | - 20
157 | - 30
158 |
159 |
160 |
161 |
162 | - 10
163 |
164 |
165 |
166 |
167 | - 0
168 | - 1
169 | - 20
170 | - 21
171 | - 500
172 | - 600
173 |
174 |
175 |
176 |
177 | - 0
178 | - 15
179 | - 10
180 | - 10
181 |
182 |
183 |
184 | true
185 |
186 |
187 | true
188 |
189 |
199 | 3
200 |
201 |
202 | - lte:2097152,4194304,8388608,262144,524288,1048576
203 | - lte_ca:2097152,4194304,8388608,262144,524288,1048576
204 | - umts:4094,87380,110208,4096,16384,110208
205 | - hspa:4094,87380,1220608,4096,16384,1220608
206 | - hsupa:4094,87380,1220608,4096,16384,1220608
207 | - hsdpa:4094,87380,2441216,4096,16384,2441216
208 | - hspap:4094,87380,1220608,4096,16384,1220608
209 | - edge:4093,26280,35040,4096,16384,35040
210 | - gprs:4092,8760,11680,4096,8760,11680
211 | - evdo:4094,87380,1048576,4096,16384,262144
212 | - ehrpd:4094,87380,1048576,4096,16384,262144
213 |
214 |
215 |
221 | 2
222 |
223 |
227 |
228 | - 0:2:15
229 |
230 |
231 |
232 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
22 |
23 |
24 | Galaxy S5
25 |
26 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/core/res/res/xml/power_profile.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | - 0
4 | - 65
5 | - 202
6 | - 87
7 | - 1
8 | - 3
9 | - 240
10 | - 129
11 | - 29
12 | - 215
13 | - 125
14 | - 25
15 | - 1
16 |
17 | 4.5
18 | 4.5
19 |
20 | - 4
21 |
22 | 2457600
23 | 2265600
24 | 1958400
25 | 1728000
26 | 1574400
27 | 1497600
28 | 1267200
29 | 1190400
30 | 1036800
31 | 960000
32 | 883200
33 | 729600
34 | 652800
35 | 422400
36 | 300000
37 |
38 | - 3.1
39 |
40 | 348
41 | 313
42 | 265
43 | 232
44 | 213
45 | 203
46 | 176
47 | 132
48 | 122
49 | 114
50 | 97
51 | 92
52 | 84
53 | 74
54 | 56
55 |
56 | - 2800
57 |
58 | .0002
59 | .002
60 | .02
61 | .2
62 | 2
63 |
64 |
65 |
--------------------------------------------------------------------------------
/overlay/frameworks/base/packages/SettingsProvider/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 | true
21 | true
22 |
23 |
24 |
--------------------------------------------------------------------------------
/overlay/frameworks/opt/net/wifi/service/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
20 | 524288,2097152,4194304,262144,524288,1048576
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Dialer/java/com/android/dialer/callrecord/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
18 |
19 | true
20 | 4
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/FlipFlap/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
29 | 3
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/overlay/packages/apps/FlipFlap/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
23 |
24 | 0px
25 | 60px
26 | 960px
27 | 960px
28 |
29 |
30 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Settings/res/values/bools.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 | true
20 |
21 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Settings/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
20 | true
21 |
22 |
23 | true
24 |
25 |
31 | 1
32 |
33 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Settings/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 | 5dp
20 | - 94.68%
21 |
22 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Snap/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
17 |
18 |
19 | true
20 |
21 |
22 | denoise-on
23 |
24 |
25 | true
26 |
27 |
--------------------------------------------------------------------------------
/overlay/packages/apps/Snap/res/values/qcomstrings.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
21 |
22 |
23 | auto
24 | ISO_HJR
25 | 100
26 | 200
27 | 400
28 | 800
29 | 1600
30 |
31 |
32 |
--------------------------------------------------------------------------------
/overlay/packages/services/Telephony/res/values/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
19 |
20 |
21 | true
22 |
23 |
--------------------------------------------------------------------------------
/radio/dual/board.mk:
--------------------------------------------------------------------------------
1 | # Audio
2 | AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
3 | AUDIO_FEATURE_SAMSUNG_DUAL_SIM := true
4 |
5 | # Properties
6 | TARGET_SYSTEM_PROP += $(COMMON_PATH)/radio/dual/system.prop
7 |
8 | # Radio/RIL
9 | DEVICE_MANIFEST_FILE += $(COMMON_PATH)/radio/dual/manifest.xml
10 |
--------------------------------------------------------------------------------
/radio/dual/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.hardware.radio
4 | hwbinder
5 | 1.1
6 |
7 | IRadio
8 | slot1
9 | slot2
10 |
11 |
12 | ISap
13 | slot1
14 | slot2
15 |
16 |
17 |
18 | android.hardware.radio.deprecated
19 | hwbinder
20 | 1.0
21 |
22 | IOemHook
23 | slot1
24 | slot2
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/radio/dual/product.mk:
--------------------------------------------------------------------------------
1 | # Radio/RIL
2 | PRODUCT_PACKAGES += \
3 | rild_dsds.rc
4 |
--------------------------------------------------------------------------------
/radio/dual/system.prop:
--------------------------------------------------------------------------------
1 | # RIL
2 | persist.radio.multisim.config=dsds
3 | ro.multisim.simslotcount=2
4 | ro.multisim.set_audio_params=true
5 | ro.telephony.ril.config=simactivation
6 |
--------------------------------------------------------------------------------
/radio/single/board.mk:
--------------------------------------------------------------------------------
1 | # Radio/RIL
2 | DEVICE_MANIFEST_FILE += $(COMMON_PATH)/radio/single/manifest.xml
3 |
--------------------------------------------------------------------------------
/radio/single/manifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | android.hardware.radio
4 | hwbinder
5 | 1.1
6 |
7 | IRadio
8 | slot1
9 |
10 |
11 | ISap
12 | slot1
13 |
14 |
15 |
16 | android.hardware.radio.deprecated
17 | hwbinder
18 | 1.0
19 |
20 | IOemHook
21 | slot1
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/recovery/recovery_keys.c:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "recovery_ui.h"
4 | #include "common.h"
5 | #include "extendedcommands.h"
6 |
7 |
8 | int device_handle_key(int key_code, int visible) {
9 | if (visible) {
10 | switch (key_code) {
11 | case KEY_CAPSLOCK:
12 | case KEY_DOWN:
13 | case KEY_VOLUMEDOWN:
14 | return HIGHLIGHT_DOWN;
15 | case KEY_MENU:
16 | return NO_ACTION;
17 | case KEY_LEFTSHIFT:
18 | case KEY_UP:
19 | case KEY_VOLUMEUP:
20 | return HIGHLIGHT_UP;
21 | case KEY_HOMEPAGE:
22 | case KEY_POWER:
23 | case KEY_LEFTBRACE:
24 | case KEY_ENTER:
25 | case BTN_MOUSE:
26 | case KEY_CAMERA:
27 | case KEY_F21:
28 | case KEY_SEND:
29 | return SELECT_ITEM;
30 | case KEY_END:
31 | case KEY_BACKSPACE:
32 | case KEY_SEARCH:
33 | case KEY_BACK:
34 | return GO_BACK;
35 | }
36 | }
37 |
38 | return NO_ACTION;
39 | }
40 |
--------------------------------------------------------------------------------
/rootdir/Android.mk:
--------------------------------------------------------------------------------
1 | LOCAL_PATH:= $(call my-dir)
2 | include $(CLEAR_VARS)
3 |
4 | include $(CLEAR_VARS)
5 | LOCAL_MODULE := fstab.qcom
6 | LOCAL_MODULE_TAGS := optional
7 | LOCAL_MODULE_CLASS := ETC
8 | LOCAL_SRC_FILES := etc/fstab.qcom
9 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)
10 | include $(BUILD_PREBUILT)
11 |
12 | include $(CLEAR_VARS)
13 | LOCAL_MODULE := init.qcom.rc
14 | LOCAL_MODULE_TAGS := optional
15 | LOCAL_MODULE_CLASS := ETC
16 | LOCAL_SRC_FILES := etc/init.qcom.rc
17 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
18 | include $(BUILD_PREBUILT)
19 |
20 | include $(CLEAR_VARS)
21 | LOCAL_MODULE := init.qcom.usb.rc
22 | LOCAL_MODULE_TAGS := optional
23 | LOCAL_MODULE_CLASS := ETC
24 | LOCAL_SRC_FILES := etc/init.qcom.usb.rc
25 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
26 | include $(BUILD_PREBUILT)
27 |
28 | include $(CLEAR_VARS)
29 | LOCAL_MODULE := ueventd.qcom.rc
30 | LOCAL_MODULE_STEM := ueventd.rc
31 | LOCAL_MODULE_TAGS := optional
32 | LOCAL_MODULE_CLASS := ETC
33 | LOCAL_SRC_FILES := etc/ueventd.qcom.rc
34 | LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)
35 | include $(BUILD_PREBUILT)
36 |
--------------------------------------------------------------------------------
/rootdir/etc/fstab.qcom:
--------------------------------------------------------------------------------
1 | # Android fstab file.
2 | # The filesystem that contains the filesystem e2fsck binary (typically /system) cannot
3 | # specify 'check', and must come before any filesystems that do specify 'check'
4 | #
5 | # NOTE: /system partition is now early-mounted and the fstab entry is explicitly
6 | # specified for recovery-mount only:
7 | #
8 | #
9 | /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,errors=panic wait,recoveryonly
10 | /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
11 | /dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs nosuid,nodev,noatime,rw,inline_xattr wait,check,formattable,encryptable=footer,length=-16384
12 | /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 nosuid,nodev,noatime,noauto_da_alloc,errors=continue,commit=20 wait,check,formattable
13 | /dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs nosuid,nodev,noatime,rw,inline_xattr wait,check,formattable
14 | /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
15 | /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
16 | /dev/block/platform/msm_sdcc.1/by-name/efs /efs ext4 nosuid,nodev,noatime,noauto_da_alloc,journal_async_commit,errors=panic wait,check
17 | /dev/block/platform/msm_sdcc.1/by-name/fota /misc emmc defaults defaults
18 |
19 | /dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
20 | /dev/block/platform/msm_sdcc.1/by-name/recovery /recovery emmc defaults recoveryonly
21 |
22 | /devices/msm_sdcc.3/mmc_host/mmc* auto auto defaults voldmanaged=sdcard1:auto,encryptable=userdata
23 |
24 | /dev/block/zram0 none swap defaults zramsize=25%,max_comp_streams=4,swapprio=10,notrim
25 |
26 | /devices/platform/xhci-hcd* auto auto defaults voldmanaged=usb:auto
27 |
--------------------------------------------------------------------------------
/sepolicy/common/device.te:
--------------------------------------------------------------------------------
1 | # Fingerprint
2 | type vfsspi_device, dev_type;
3 |
--------------------------------------------------------------------------------
/sepolicy/common/file.te:
--------------------------------------------------------------------------------
1 | type sysfs_fingerprint, fs_type, sysfs_type;
2 | type vfsspi_data_file, file_type, data_file_type;
3 |
--------------------------------------------------------------------------------
/sepolicy/common/file_contexts:
--------------------------------------------------------------------------------
1 | # data files
2 | /data/validity(/.*)? u:object_r:vfsspi_data_file:s0
3 |
4 | # device nodes
5 | /dev/ttyHS3 u:object_r:audio_device:s0
6 | /dev/vfsspi u:object_r:vfsspi_device:s0
7 |
8 | # sysfs
9 | /sys/devices(/.*)?/input/input[1-2]/enabled u:object_r:sysfs_hal_pwr:s0
10 |
11 | # sysfs - audio
12 | /sys/devices/[a-f0-9]+\.slim/es705-codec-gen0(/.*)? u:object_r:sysfs_audio:s0
13 | /sys/kernel/DualWave/sound(/.*)? u:object_r:sysfs_audio:s0
14 |
15 | # sysfs - fingerprint
16 | /sys/devices/virtual/fingerprint(/.*)? u:object_r:sysfs_fingerprint:s0
17 |
--------------------------------------------------------------------------------
/sepolicy/common/hal_fingerprint_default.te:
--------------------------------------------------------------------------------
1 | r_dir_file(hal_fingerprint_default, firmware_file)
2 |
3 | allow hal_fingerprint_default fingerprintd_data_file:dir w_dir_perms;
4 | allow hal_fingerprint_default tee_device:chr_file rw_file_perms;
5 | allow hal_fingerprint_default vfsspi_data_file:dir rw_dir_perms;
6 | allow hal_fingerprint_default vfsspi_data_file:file create_file_perms;
7 | allow hal_fingerprint_default vfsspi_device:chr_file rw_file_perms;
8 |
--------------------------------------------------------------------------------
/sepolicy/common/init.te:
--------------------------------------------------------------------------------
1 | allow init sysfs_fingerprint:file setattr;
2 |
--------------------------------------------------------------------------------
/sepolicy/common/kernel.te:
--------------------------------------------------------------------------------
1 | # Samsung literally vfs_write()s to the es705 UART at /dev/ttyHS3 to
2 | # load the firmware. Without crafting a userspace helper or re-doing
3 | # the whole path, there is no way around this.
4 | allow kernel audio_device:chr_file rw_file_perms;
5 |
--------------------------------------------------------------------------------
/sepolicy/common/tee.te:
--------------------------------------------------------------------------------
1 | allow tee vfsspi_data_file:dir create_dir_perms;
2 | allow tee vfsspi_data_file:file create_file_perms;
3 |
--------------------------------------------------------------------------------
/sepolicy/sepolicy.mk:
--------------------------------------------------------------------------------
1 | #
2 | # Copyright (C) 2018 The LineageOS Project
3 | #
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | #
8 | # http://www.apache.org/licenses/LICENSE-2.0
9 | #
10 | # Unless required by applicable law or agreed to in writing, software
11 | # distributed under the License is distributed on an "AS IS" BASIS,
12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | # See the License for the specific language governing permissions and
14 | # limitations under the License.
15 | #
16 |
17 | # Board specific SELinux policy variable definitions
18 | BOARD_SEPOLICY_DIRS += \
19 | device/samsung/klte-common/sepolicy/common
20 |
--------------------------------------------------------------------------------
/setup-makefiles.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | #
3 | # Copyright (C) 2016 The CyanogenMod Project
4 | # Copyright (C) 2017-2021 The LineageOS Project
5 | #
6 | # SPDX-License-Identifier: Apache-2.0
7 | #
8 |
9 | set -e
10 |
11 | if [ -z "${DEVICE_COMMON}" ]; then
12 | echo ""
13 | echo "error: This is a script in a common tree. Please execute" $(basename $0) "from a device tree."
14 | echo ""
15 | exit 1
16 | fi
17 |
18 | # Load extract_utils and do some sanity checks
19 | MY_DIR="${BASH_SOURCE%/*}"
20 | if [[ ! -d "${MY_DIR}" ]]; then MY_DIR="${PWD}"; fi
21 |
22 | ANDROID_ROOT="${MY_DIR}/../../.."
23 |
24 | HELPER="${ANDROID_ROOT}/tools/extract-utils/extract_utils.sh"
25 | if [ ! -f "${HELPER}" ]; then
26 | echo "Unable to find helper script at ${HELPER}"
27 | exit 1
28 | fi
29 | source "${HELPER}"
30 |
31 | # Initialize the helper for common
32 | setup_vendor "${DEVICE_COMMON}" "${VENDOR}" "${ANDROID_ROOT}" true
33 |
34 | # Warning headers and guards
35 | write_headers "klte klteactivexx klteaio kltechn kltechnduo klteduos kltedv kltekdi kltekor"
36 |
37 | # The standard common blobs
38 | write_makefiles "${MY_DIR}/common-proprietary-files.txt" true
39 |
40 | # Finish
41 | write_footers
42 |
43 | # This is the "common" M radio/QC framework stack. Most variants will inherit
44 | # this file. If they cannot then they will ship their own stack
45 | PRODUCTMK="$(echo $PRODUCTMK | sed -e 's|-vendor.mk|-vendor-ril-m.mk|g')"
46 | write_makefile_header "$PRODUCTMK"
47 | parse_file_list "${MY_DIR}/common-proprietary-files-ril-m.txt"
48 | write_product_copy_files true
49 |
50 | export BOARD_COMMON=msm8974-common
51 |
52 | "./../../${VENDOR}/${BOARD_COMMON}/setup-makefiles.sh" "$@"
53 |
--------------------------------------------------------------------------------
/system.prop:
--------------------------------------------------------------------------------
1 | # Art
2 | dalvik.vm.dex2oat-swap=false
3 |
4 | # Audio
5 | af.fast_track_multiplier=1
6 | audio.deep_buffer.media=true
7 | audio.offload.buffer.size.kb=32
8 | audio.offload.pcm.16bit.enable=true
9 | audio.offload.pcm.24bit.enable=true
10 | audio.offload.video=true
11 | persist.vendor.audio.fluence.speaker=true
12 | persist.vendor.audio.fluence.voicecall=true
13 | persist.vendor.audio.fluence.voicerec=false
14 | ro.vendor.audio.sdk.fluencetype=fluence
15 | vendor.audio.offload.multiple.enabled=false
16 | vendor.audio_hal.period_size=192
17 | vendor.dedicated.device.for.voip=true
18 | vendor.voice.path.for.pcm.voip=false
19 |
20 | # Camera
21 | camera2.portability.force_api=1
22 |
23 | # Dalvik heap
24 | dalvik.vm.heapstartsize=16m
25 | dalvik.vm.heapgrowthlimit=192m
26 | dalvik.vm.heapsize=512m
27 | dalvik.vm.heaptargetutilization=0.75
28 | dalvik.vm.heapminfree=2m
29 | dalvik.vm.heapmaxfree=8m
30 |
31 | # GPS
32 | persist.gps.qc_nlp_in_use=0
33 | ro.gps.agps_provider=1
34 | ro.qc.sdk.izat.premium_enabled=0
35 | ro.qc.sdk.izat.service_mask=0x0
36 |
37 | # Memory optimizations
38 | ro.vendor.qti.am.reschedule_service=true
39 |
40 | # NFC
41 | ro.nfc.port=I2C
42 |
43 | # Perf
44 | ro.vendor.extension_library=/vendor/lib/libqti-perfd-client.so
45 |
46 | # Radio
47 | persist.data.netmgrd.qos.enable=true
48 | persist.data.qmi.adb_logmask=0
49 | persist.radio.add_power_save=1
50 | rild.libpath=/system/vendor/lib/libsec-ril.so
51 | ro.telephony.mms_data_profile=5
52 | ro.ril.telephony.qan_resp_strings=6
53 |
54 | # Ril sends only one RIL_UNSOL_CALL_RING, so set call_ring.multiple to false
55 | ro.telephony.call_ring.multiple=0
56 |
57 | # Sensors
58 | debug.sensors=1
59 |
60 | # Tethering
61 | net.tethering.noprovisioning=true
62 |
63 | # Vendor security patch level
64 | ro.lineage.build.vendor_security_patch=2017-08-01
65 |
66 | # WiFi
67 | wifi.interface=wlan0
68 |
--------------------------------------------------------------------------------