diff --git a/rootdir/etc/Android.bp b/rootdir/etc/Android.bp index 7591800..f2fb240 100644 --- a/rootdir/etc/Android.bp +++ b/rootdir/etc/Android.bp @@ -25,20 +25,6 @@ prebuilt_etc { vendor: true, } -prebuilt_etc { - name: "init.fpc.rc", - src: "init.fpc.rc", - sub_dir: "init/hw", - vendor: true, -} - -prebuilt_etc { - name: "init.lenovo.common.rc", - src: "init.lenovo.common.rc", - sub_dir: "init/hw", - vendor: true, -} - prebuilt_etc { name: "init.lenovo.rc", src: "init.lenovo.rc", @@ -46,12 +32,6 @@ prebuilt_etc { vendor: true, } -prebuilt_etc { - name: "init.lenovo.usb.configfs.rc", - src: "init.lenovo.usb.configfs.rc", - sub_dir: "init/hw", - vendor: true, -} prebuilt_etc { name: "init.power.rc", src: "init.power.rc", diff --git a/rootdir/etc/init.custom.rc b/rootdir/etc/init.custom.rc index d152c3d..f98f5b0 100644 --- a/rootdir/etc/init.custom.rc +++ b/rootdir/etc/init.custom.rc @@ -67,11 +67,6 @@ on property:sys.boot_completed=1 write /dev/blkio/blkio.group_idle 2000 write /dev/blkio/background/blkio.group_idle 0 -on boot - # Touchscreen - chown system system /sys/class/touch/tp_dev/gesture_on - chown 0660 /sys/class/touch/tp_dev/gesture_on - service charger /system/bin/charger class charger user system diff --git a/rootdir/etc/init.fpc.rc b/rootdir/etc/init.fpc.rc deleted file mode 100644 index 29ae29b..0000000 --- a/rootdir/etc/init.fpc.rc +++ /dev/null @@ -1,10 +0,0 @@ -on post-fs-data - chown system system /sys/devices/platform/soc/soc:fpc1020/wakeup_enable - chown system system /sys/devices/platform/soc/soc:fpc1020/handle_wakelock - chown system system /sys/devices/platform/soc/soc:fpc1020/device_prepare - chown system system /sys/devices/platform/soc/soc:fpc1020/hw_reset - chown system system /sys/devices/platform/soc/soc:fpc1020/irq - chown system system /sys/devices/platform/soc/soc:fpc1020/regulator_enable - chown system system /sys/devices/platform/soc/soc:fpc1020/pinctl_set - chown system system /sys/devices/platform/soc/soc:fpc1020/clk_enable - diff --git a/rootdir/etc/init.lenovo.common.rc b/rootdir/etc/init.lenovo.common.rc deleted file mode 100644 index c57c09f..0000000 --- a/rootdir/etc/init.lenovo.common.rc +++ /dev/null @@ -1,18 +0,0 @@ -# common config for all projects. - -on post-fs - # Set dm-verity property for system partition - verity_update_state - -on init - chown system system /sys/class/leds/led:rgb_red/brightness - chmod 0660 /sys/class/leds/led:rgb_red/brightness - chown system system /sys/class/leds/led:rgb_green/brightness - chmod 0660 /sys/class/leds/led:rgb_green/brightness - chown system system /sys/class/leds/led:rgb_blue/brightness - chmod 0660 /sys/class/leds/led:rgb_blue/brightness - chown system system /sys/class/leds/led:rgb_blue/blink - chmod 0660 /sys/class/leds/led:rgb_blue/blink - chown system system /sys/class/leds/red/blink - chown system system /sys/class/leds/green/blink - chown system system /sys/class/leds/blue/blink diff --git a/rootdir/etc/init.lenovo.rc b/rootdir/etc/init.lenovo.rc index 8a59143..b4b2843 100644 --- a/rootdir/etc/init.lenovo.rc +++ b/rootdir/etc/init.lenovo.rc @@ -1,14 +1,38 @@ -import /vendor/etc/init/hw/init.lenovo.common.rc +import /vendor/etc/init/hw/init.custom.rc +import /vendor/etc/init/hw/init.power.rc on init -# added touch gesture wake node permission + + # added touch gesture wake node permission chown system /sys/devices/virtual/touch/tp_dev/gesture_on + chown 0660 /sys/class/touch/tp_dev/gesture_on chown system /sys/devices/virtual/touch/tp_dev/tp_screen_switch + # RGB led + chown system system /sys/class/leds/led:rgb_red/brightness + chmod 0660 /sys/class/leds/led:rgb_red/brightness + chown system system /sys/class/leds/led:rgb_green/brightness + chmod 0660 /sys/class/leds/led:rgb_green/brightness + chown system system /sys/class/leds/led:rgb_blue/brightness + chmod 0660 /sys/class/leds/led:rgb_blue/brightness + chown system system /sys/class/leds/led:rgb_blue/blink + chmod 0660 /sys/class/leds/led:rgb_blue/blink + chown system system /sys/class/leds/red/blink + chown system system /sys/class/leds/green/blink + chown system system /sys/class/leds/blue/blink + on boot chown gps gps /sys/ontim_bootinfo/gps_lna chown gps gps /sys/ontim_bootinfo/gps_avdd_en chown gps gps /sys/ontim_bootinfo/gps_reset chown gps gps /sys/ontim_bootinfo/gps_prtrg - +on post-fs-data + chown system system /sys/devices/platform/soc/soc:fpc1020/wakeup_enable + chown system system /sys/devices/platform/soc/soc:fpc1020/handle_wakelock + chown system system /sys/devices/platform/soc/soc:fpc1020/device_prepare + chown system system /sys/devices/platform/soc/soc:fpc1020/hw_reset + chown system system /sys/devices/platform/soc/soc:fpc1020/irq + chown system system /sys/devices/platform/soc/soc:fpc1020/regulator_enable + chown system system /sys/devices/platform/soc/soc:fpc1020/pinctl_set + chown system system /sys/devices/platform/soc/soc:fpc1020/clk_enable diff --git a/rootdir/etc/init.lenovo.usb.configfs.rc b/rootdir/etc/init.lenovo.usb.configfs.rc deleted file mode 100644 index 2f7c002..0000000 --- a/rootdir/etc/init.lenovo.usb.configfs.rc +++ /dev/null @@ -1,55 +0,0 @@ -# Lenovo USB config compositions - -on property:sys.usb.config=charge && property:sys.usb.configfs=0 - write /sys/class/android_usb/android0/enable 0 - write /sys/class/android_usb/android0/iSerial ${ro.serialno} - write /sys/class/android_usb/android0/idVendor 17EF - write /sys/class/android_usb/android0/idProduct 7B8F - write /sys/class/android_usb/android0/functions mass_storage - write /sys/class/android_usb/android0/enable 1 - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=charge && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Lenovo Charger Only" - write /config/usb_gadget/g1/idVendor 0x17EF - write /config/usb_gadget/g1/idProduct 0x7B8F - symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=charger_storage && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "Lenovo Charger Only" - rm /config/usb_gadget/g1/configs/b.1/f1 - rm /config/usb_gadget/g1/configs/b.1/f2 - rm /config/usb_gadget/g1/configs/b.1/f3 - rm /config/usb_gadget/g1/configs/b.1/f4 - rm /config/usb_gadget/g1/configs/b.1/f5 - rm /config/usb_gadget/g1/configs/b.1/f6 - rm /config/usb_gadget/g1/configs/b.1/f7 - rm /config/usb_gadget/g1/configs/b.1/f8 - rm /config/usb_gadget/g1/configs/b.1/f9 - write /config/usb_gadget/g1/idVendor 0x17EF - write /config/usb_gadget/g1/idProduct 0x7B8F - symlink /config/usb_gadget/g1/functions/mass_storage.0 /config/usb_gadget/g1/configs/b.1/f1 - write /config/usb_gadget/g1/UDC ${sys.usb.controller} - setprop sys.usb.state ${sys.usb.config} - -on property:sys.usb.config=adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x17EF - write /config/usb_gadget/g1/idProduct 0x7B8E - -on property:sys.usb.config=mtp && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x17EF - write /config/usb_gadget/g1/idProduct 0x7B76 - -on property:sys.usb.config=mtp,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x17EF - write /config/usb_gadget/g1/idProduct 0x7B77 - -on property:sys.usb.config=ptp && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x17EF - write /config/usb_gadget/g1/idProduct 0x7B78 - -on property:sys.usb.config=ptp,adb && property:sys.usb.configfs=1 - write /config/usb_gadget/g1/idVendor 0x17EF - write /config/usb_gadget/g1/idProduct 0x7B79 diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc index e141e4f..6de2514 100644 --- a/rootdir/etc/init.qcom.rc +++ b/rootdir/etc/init.qcom.rc @@ -31,7 +31,6 @@ import /vendor/etc/init/hw/init.qcom.test.rc import /vendor/etc/init/hw/init.target.rc import /vendor/etc/init/hw/init.qcom.factory.rc import /vendor/etc/init/hw/init.lenovo.rc -import /vendor/etc/init/hw/init.lenovo.usb.configfs.rc on early-init mount debugfs debugfs /sys/kernel/debug