diff --git a/device.mk b/device.mk new file mode 100644 index 0000000..042a396 --- /dev/null +++ b/device.mk @@ -0,0 +1,26 @@ +# +# Copyright (C) 2020 The LineageOS Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# This file sets variables that control the way modules are built +# thorughout the system. It should not be used to conditionally +# disable makefiles (the proper mechanism to control what gets +# included in a build is to use PRODUCT_PACKAGES in a product +# definition file). +# + +# Ramdisk +PRODUCT_PACKAGES += \ + init.PL2.target.rc diff --git a/lineage_PL2.mk b/lineage_PL2.mk index caf279d..82de15f 100644 --- a/lineage_PL2.mk +++ b/lineage_PL2.mk @@ -24,6 +24,9 @@ $(call inherit-product, vendor/lineage/config/common_full_phone.mk) # Get non-open-source specific aspects $(call inherit-product, vendor/nokia/PL2/PL2-vendor.mk) +#nherit from PL2 device +$(call inherit-product, device/nokia/PL2/device.mk) + # Inherit from nokia sdm660-common $(call inherit-product, device/nokia/sdm660-common/sdm660.mk) diff --git a/rootdir/Android.mk b/rootdir/Android.mk new file mode 100644 index 0000000..75eab48 --- /dev/null +++ b/rootdir/Android.mk @@ -0,0 +1,9 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) +LOCAL_MODULE := init.PL2.target.rc +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE_CLASS := ETC +LOCAL_SRC_FILES := etc/init.PL2.target.rc +LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw +include $(BUILD_PREBUILT) diff --git a/rootdir/etc/init.PL2.target.rc b/rootdir/etc/init.PL2.target.rc new file mode 100644 index 0000000..8f63049 --- /dev/null +++ b/rootdir/etc/init.PL2.target.rc @@ -0,0 +1,97 @@ +#Samsung NFC hidl rc +import /vendor/etc/init/hw/android.hardware.nfc@1.2-service.sec.rc + +on early-boot + # set property ro.hardware.fingerprint for vendor HAL library load + setprop ro.hardware.fingerprint elan + + #NFC hal surfix + setprop ro.hardware.nfc_nci sec + + # Properties + setprop persist.camera.ffcolor FFDAB9 + setprop persist.capture.burst.exposures 0,-9,9 + setprop ro.rf.power.reduction.for.mcc 1 + setprop persist.audio.fluence.voicecomm true + +on boot + # Fingerprint + chown system system /dev/elan_fp + chmod 0644 /dev/elan_fp + + # Gestures + chown system system /proc/AllHWList/tp_fw_ver + chmod 644 /proc/AllHWList/tp_fw_ver + chmod 644 /dev/ilitek_ctrl + chown system system /dev/ilitek_ctrl + chown system system /proc/AllHWList/tp_alt_rst + chown system system /proc/AllHWList/tp_alt_st_count + chown system system /proc/AllHWList/tp_alt_st_enable + chmod 644 /proc/AllHWList/tp_alt_rst + chmod 644 /proc/AllHWList/tp_alt_st_count + chmod 644 /proc/AllHWList/tp_alt_st_enable + chown system system /proc/AllHWList/tp_double_tap + chmod 644 /proc/AllHWList/tp_double_tap + +on post-fs-data + # Fingerprint + mkdir /data/system/fingerprint 0770 system system + + # NFC storage + mkdir /data/nfc + + # add for Sec-NFC solution + chown nfc nfc /dev/sec-nfc + chmod 0770 /dev/sec-nfc + mkdir /data/vendor/nfc 0770 nfc nfc + mkdir /data/vendor/nfc/param 0770 nfc nfc + + # Gestures + mkdir /data/vendor/misc/touch 0770 system system + +on property:sys.fih.fingerprint=false + setprop sys.fih.fingerprint true + +on property:sys.boot_completed=1 + restorecon_recursive /data/system/users/ + +on property:vendor.sys.cmd_test=1 && property:ro.boot.fp=elan + setprop vendor.sys.fqcfpret 0 + start ElanPrintf_1 + +on property:vendor.sys.fqcaudio=11 + start fqcaudioloopback + +on property:vendor.sys.fqcaudio=10 + start fqcaudioloopback + +on property:vendor.sys.fqcaudio=21 + start fqcaudioloopback + +on property:vendor.sys.fqcaudio=20 + start fqcaudioloopback + +on property:vendor.sys.fqcaudio=31 + start fqcaudioloopback + +on property:vendor.sys.fqcaudio=30 + start fqcaudioloopback + +service vendor.fps_hal /vendor/bin/hw/android.hardware.biometrics.fingerprint@2.1-service + # "class hal" causes a race condition on some devices due to files created + # in /data. As a workaround, postpone startup until later in boot once + # /data is mounted. + class late_start + user system + group system input + writepid /dev/cpuset/system-background/tasks + +service ElanPrintf_1 /vendor/bin/ElanPrintf test_tool all 800 14200 + user system + oneshot + disabled + +service fqcaudioloopback /vendor/bin/fqcaudioloopback_c1n.sh + user system + oneshot + disabled