kunlun2: Remove unnened lenovo init scripts

and some cleanup
This commit is contained in:
Giammarco Senatore 2021-07-17 18:12:00 +02:00
parent c119216557
commit f63ead3994
No known key found for this signature in database
GPG key ID: 661348FC1E144F04
7 changed files with 27 additions and 112 deletions

View file

@ -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",

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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