sdm660-common: rootdir: separate xiaomiparts related initialization

Change-Id: I7b2b3a9c7b22de550e502a9b98e31683e3b961b6
This commit is contained in:
Stylogey 2020-05-04 18:46:24 +02:00 committed by OdSazib
parent 02e21ea504
commit 1bcf447ec0
No known key found for this signature in database
GPG key ID: CB336514F9F5CF69
5 changed files with 60 additions and 34 deletions

View file

@ -83,6 +83,14 @@ LOCAL_SRC_FILES := etc/init.target.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := init.xiaomi_parts.rc
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_SRC_FILES := etc/init.xiaomi_parts.rc
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR_ETC)/init/hw
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
LOCAL_MODULE := fstab.qcom
LOCAL_MODULE_TAGS := optional

View file

@ -29,6 +29,7 @@ import /vendor/etc/init/hw/init.qcom.usb.rc
import /vendor/etc/init/hw/init.msm.usb.configfs.rc
import /vendor/etc/init/hw/init.target.rc
import /vendor/etc/init/hw/init.device.rc
import /vendor/etc/init/hw/init.xiaomi_parts.rc
on early-init
mount debugfs debugfs /sys/kernel/debug

View file

@ -199,40 +199,6 @@ on boot
chown system system /sys/class/graphics/fb0/msm_fb_cabc_still
chown system system /sys/class/graphics/fb0/msm_fb_hbm
# XiaomiParts
chown system system /sys/devices/virtual/timed_output/vibrator/vtg_level
chmod 0660 /sys/devices/virtual/timed_output/vibrator/vtg_level
chown system system /sys/module/hall/parameters/hall_toggle
chmod 0660 /sys/module/hall/parameters/hall_toggle
# KCal
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_cont
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_enable
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_hue
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_sat
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_val
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_min
chown system system /sys/devices/platform/kcal_ctrl.0/kcal
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_cont
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_enable
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_hue
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_sat
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_val
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_min
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal
service folio_daemon /system/bin/folio_daemon
class late_start
user system
group system uhid
disabled
on property:persist.service.folio_daemon=0
stop folio_daemon
on property:persist.service.folio_daemon=1
start folio_daemon
#Peripheral manager
service vendor.per_mgr /system/vendor/bin/pm-service
class core

View file

@ -0,0 +1,50 @@
#
# Copyright 2020 Paranoid Android
#
# 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.
#
on boot
# XiaomiParts
chown system system /sys/devices/virtual/timed_output/vibrator/vtg_level
chmod 0660 /sys/devices/virtual/timed_output/vibrator/vtg_level
chown system system /sys/module/hall/parameters/hall_toggle
chmod 0660 /sys/module/hall/parameters/hall_toggle
# KCal
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_cont
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_enable
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_hue
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_sat
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_val
chown system system /sys/devices/platform/kcal_ctrl.0/kcal_min
chown system system /sys/devices/platform/kcal_ctrl.0/kcal
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_cont
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_enable
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_hue
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_sat
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_val
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal_min
chmod 660 /sys/devices/platform/kcal_ctrl.0/kcal
service folio_daemon /system/bin/folio_daemon
class late_start
user system
group system uhid
disabled
on property:persist.service.folio_daemon=0
stop folio_daemon
on property:persist.service.folio_daemon=1
start folio_daemon

View file

@ -264,6 +264,7 @@ PRODUCT_PACKAGES += \
init.qti.fm.sh \
init.recovery.qcom.rc \
init.target.rc \
init.xiaomi_parts.rc \
ueventd.qcom.rc
# Ion