diff --git a/recovery/root/init.recovery.mt6763.rc b/recovery/root/init.recovery.mt6763.rc new file mode 100644 index 0000000000000000000000000000000000000000..2fda6021d3c7041f52840f5ce2b82f086cb3d9f7 --- /dev/null +++ b/recovery/root/init.recovery.mt6763.rc @@ -0,0 +1,68 @@ +on init + mkdir /config + mount configfs none /config + mkdir /config/usb_gadget/g1 0770 shell shell + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0xd001 + mkdir /config/usb_gadget/g1/strings/0x409 0770 + write /config/usb_gadget/g1/strings/0x409/serialnumber ${ro.serialno} + write /config/usb_gadget/g1/strings/0x409/manufacturer ${ro.product.manufacturer} + write /config/usb_gadget/g1/strings/0x409/product ${ro.product.model} + mkdir /config/usb_gadget/g1/configs/b.1 0777 shell shell + mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell + mkdir /config/usb_gadget/g1/functions/ffs.adb + setprop sys.usb.ffs.aio_compat 1 + +on property:ro.debuggable=0 + # distinguish USB shoulde connect or not, i.e. CDP vs SDP + write /sys/class/udc/musb-hdrc/device/cmode 2 + # set charging free due to it wait for USB activation + start adbd + +on property:sys.usb.ffs.ready=1 + write /config/usb_gadget/g1/UDC "none" + rm /config/usb_gadget/g1/configs/b.1/f1 + rm /config/usb_gadget/g1/configs/b.1/f2 + write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration "adb" + write /config/usb_gadget/g1/idVendor 0x18d1 + write /config/usb_gadget/g1/idProduct 0xd001 + symlink /config/usb_gadget/g1/functions/ffs.adb /config/usb_gadget/g1/configs/b.1/f1 + write /config/usb_gadget/g1/UDC "musb-hdrc" + +on post-fs + # Support A/B feature for EMMC and UFS boot region + symlink /dev/block/sda /dev/block/mmcblk0boot0 + symlink /dev/block/sdb /dev/block/mmcblk0boot1 + symlink /dev/block/mmcblk0boot0 /dev/block/platform/bootdevice/by-name/preloader_a + symlink /dev/block/mmcblk0boot1 /dev/block/platform/bootdevice/by-name/preloader_b + +on fs + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/idVendor 18D1 + write /sys/class/android_usb/android0/idProduct D001 + write /sys/class/android_usb/android0/f_ffs/aliases adb + write /sys/class/android_usb/android0/functions adb + write /sys/class/android_usb/android0/iManufacturer ${ro.product.manufacturer} + write /sys/class/android_usb/android0/iProduct ${ro.product.model} + write /sys/class/android_usb/android0/iSerial ${ro.serialno} + +on property:sys.usb.config=none + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/bDeviceClass 0 + +on property:sys.usb.config=mass_storage,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + +on property:sys.usb.config=mtp,adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable 1 + start adbd + +on property:sys.usb.config=adb + write /sys/class/android_usb/android0/enable 0 + write /sys/class/android_usb/android0/functions ${sys.usb.config} + write /sys/class/android_usb/android0/enable ${service.adb.root} + start adbd diff --git a/recovery/root/ueventd.mt6763.rc b/recovery/root/ueventd.mt6763.rc new file mode 100644 index 0000000000000000000000000000000000000000..94c629ddec2ea35a86f6ebe8575d2087d1ba2ba8 --- /dev/null +++ b/recovery/root/ueventd.mt6763.rc @@ -0,0 +1,130 @@ +#change partition permission +/dev/block/mmcblk0 0660 root system +/dev/block/mmcblk0boot0 0660 root system +/dev/block/mmcblk0boot1 0660 root system +/dev/misc-sd 0660 root system +/dev/block/platform/bootdevice/by-name/misc2 0660 root system +/dev/block/platform/bootdevice/by-name/boot 0640 root system +/dev/block/platform/bootdevice/by-name/recovery 0640 root system +/dev/block/platform/bootdevice/by-name/secro 0640 root system +/dev/block/platform/bootdevice/by-name/seccfg 0660 root system +/dev/block/platform/bootdevice/by-name/proinfo 0660 root system +/dev/block/platform/bootdevice/by-name/nvram 0660 root system +/dev/block/platform/bootdevice/by-name/para 0660 root system +/dev/block/platform/bootdevice/by-name/logo 0660 root system +/dev/block/platform/bootdevice/by-name/frp 0660 root system +/dev/block/platform/bootdevice/by-name/md1img 0640 root system +/dev/block/platform/bootdevice/by-name/md1img_a 0640 root system +/dev/block/platform/bootdevice/by-name/md1img_b 0640 root system +/dev/block/platform/bootdevice/by-name/md1dsp 0660 root system + + +# OTP +/dev/otp 0660 system system +/dev/block/platform/bootdevice/by-name/otp 0660 root system + +# Connectivity +/dev/stpwmt 0660 system system +/dev/wmtdetect 0660 system system +/dev/fw_log_wmt 0660 system system + +# BT +/dev/stpbt 0660 bluetooth bluetooth +/dev/fw_log_bt 0660 bluetooth bluetooth + +# GPS +/dev/stpgps 0660 gps gps +/dev/gps 0660 gps system +/dev/fw_log_gps 0660 gps gps + +# WIFI +/dev/wmtWifi 0660 wifi wifi +/dev/fw_log_wifi 0660 wifi wifi + +# FMRadio +/dev/fm 0660 system media + +# NFC +/dev/msr3110 0666 root root +/dev/mt6605 0660 nfc radio +/dev/st21nfc 0660 nfc radio + +# MTK BTIF driver +/dev/btif 0600 system system + +# Trusty driver +/dev/trusty-ipc-dev0 0660 system system + +# TrustonicTEE driver +/dev/mobicore 0600 system system +/dev/mobicore-user 0666 system system +/dev/t-base-tui 0666 system system + +# add the read write right of ttyUSB* +/dev/bus/usb/* 0660 root usb +/dev/ttyUSB0 0660 radio radio +/dev/ttyUSB1 0660 radio radio +/dev/ttyUSB2 0660 radio radio +/dev/ttyUSB3 0660 radio radio +/dev/ttyUSB4 0660 radio radio + +# Anyone can read the logs, but if they're not in the "logs" +# group, then they'll only see log entries for their UID. +/dev/log/ksystem 0600 root log + +/dev/ccci* 0660 radio radio +/dev/ttyC* 0660 radio radio +/sys/kernel/ccci modem_info 0644 radio radio +/sys/kernel/ccci md1_postfix 0644 radio radio +/sys/kernel/ccci md2_postfix 0644 radio radio +/dev/eemcs* 0660 radio radio +/dev/emd* 0660 radio radio +/dev/ccci_pcm_rx 0660 audio audio +/dev/ccci_pcm_tx 0660 audio audio +/dev/ccci_aud 0660 audio audio +/dev/ccci2_aud 0660 audio audio +/dev/ccci3_aud 0660 audio audio +/dev/ccci_raw_audio 0660 audio audio +/dev/ccci3_raw_audio 0660 audio audio +/dev/eemcs_aud 0660 audio audio +/dev/irtx 0660 system system +/dev/ir-learning 0660 system system +# SGX device node +/dev/pvrsrvkm 0666 root root +/dev/pvr_sync 0666 root root + + +/sys/devices/platform/leds-mt65xx/leds/green delay_on 0664 system system +/sys/devices/platform/leds-mt65xx/leds/green delay_off 0664 system system +/sys/devices/platform/leds-mt65xx/leds/red delay_on 0664 system system +/sys/devices/platform/leds-mt65xx/leds/red delay_off 0664 system system +/sys/devices/platform/leds-mt65xx/leds/blue delay_on 0664 system system +/sys/devices/platform/leds-mt65xx/leds/blue delay_off 0664 system system + +#GPIO +/dev/mtgpio 0600 radio root + + +#FOR VIA MODEM +/dev/ttySDIO* 0660 radio sdcard_rw +/dev/ttyRB* 0660 radio radio + +# Mali node +/dev/mali 0666 system graphics + +# Change ION driver permission +/dev/ion 0666 system graphics + +#touch +/dev/touch 0660 root system +/dev/hotknot 0660 root system + +#hang_detect +/dev/RT_Monitor 0600 system system +/dev/kick_powerkey 0600 system system + +#MTK In-House TEE +/dev/ttyACM0 0660 radio radio + +# TrustKernel add +/dev/tkcoredrv 0600 system system