################################################################################## ### VENDOR_EDIT, OEM All rights reserved. ### ### File: - init.oem.rc ### Author: jiangyonggao ### all oem triger & init are here ### ------------------------------- Revision History: ---------------------------- ### ### ------------------------------------------------------------------------------ ### jiangyg@PM 2013-10-21 Create this file ################################################################################## #ifdef VENDOR_EDIT on init # ic, Slow Motion Scheduling Group (SMSG), in order to intercept the very first app/service, must be this section mkdir /dev/cpuctl/smsg chown system system /dev/cpuctl/smsg/tasks chown system system /dev/cpuctl/smsg/cpu.cfs_period_us chown system system /dev/cpuctl/smsg/cpu.cfs_quota_us chown system system /dev/cpuctl/smsg/cpu.cfs_quota_us_per_task chmod 0666 /dev/cpuctl/smsg/tasks write /dev/cpuctl/smsg/cpu.shares 52 #endif #ifdef VENDOR_EDIT #Add for fpc fingerprints permission on boot chmod -h 777 /dev/qseecom chown system system /dev/fpc1020 chmod 0660 /dev/fpc1020 mkdir /data/oemnvitems 0771 radio radio chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/diag/spi_register chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/diag/spi_data chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/setup/adc_gain chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/setup/adc_shift chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/setup/capture_col_groups chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/setup/capture_col_start chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/setup/capture_count chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/setup/capture_mode chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/setup/capture_row_count chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/setup/capture_row_start chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/setup/capture_settings_mux chown system system /sys/bus/spi/drivers/fpc1020/spi12.0/setup/pxl_ctrl chown system system /sys/devices/virtual/fpsensor/fpc1020/clock_enable chown system system /sys/devices/virtual/fpsensor/fpc1020/ap_tz_switch # 2015.3.26 Likelong@camera chmod /dev/stmvl6180_ranging to test Laser AF in factory mode chown system system /dev/stmvl6180_ranging #endif write /sys/bus/i2c/devices/2-0020/tp_fw_update 0 #ifdef VENDOR_EDIT #added by zhangxiaowei@camera 20150325 for leds permission chown system system /sys/class/leds/led:flash_0/brightness chown system system /sys/class/leds/led:flash_1/brightness chown system system /sys/class/leds/led:torch_0/brightness chown system system /sys/class/leds/led:torch_1/brightness #endif /*VENDOR_EDIT*/ #ifdef VENDOR_EDIT #added by zhangxiaowei@camera 20150413 for product mode flashlight chown system system /proc/qcom_flash #endif /*VENDOR_EDIT*/ #ifdef VENDOR_EDIT #shankai@bsp , 2015/03/26, Modify for RGB light support chown system system /sys/class/leds/red/blink chown system system /sys/class/leds/blue/blink chown system system /sys/class/leds/green/blink #endif /*VENDOR_EDIT*/ #ifdef VENDOR_EDIT #shankai@bsp , 2015/04/26,modify for RGB breath effect control support chown system system /sys/class/leds/red/ramp_step_ms chown system system /sys/class/leds/blue/ramp_step_ms chown system system /sys/class/leds/green/ramp_step_ms chown system system /sys/class/leds/red/duty_pcts chown system system /sys/class/leds/blue/duty_pcts chown system system /sys/class/leds/green/duty_pcts chmod 660 /sys/class/leds/red/ramp_step_ms chmod 660 /sys/class/leds/green/ramp_step_ms chmod 660 /sys/class/leds/blue/ramp_step_ms chmod 660 /sys/class/leds/red/duty_pcts chmod 660 /sys/class/leds/green/duty_pcts chmod 660 /sys/class/leds/blue/duty_pcts #endif /*VENDOR_EDIT*/ #ifdef VENDOR_EDIT #add access permission for torch, longxiaowu@camera 2016/07/14 chmod 666 /sys/class/leds/led:flash_torch/brightness #endif #ifdef VENDOR_EDIT #liuhuisheng@framework add for enginerr app for sys/class selinux recon restorecon /sys/class/leds/keyboard-backlight/brightness restorecon /sys/class/leds/button-backlight/brightness restorecon /sys/class/leds/red/brightness restorecon /sys/class/leds/green/brightness restorecon /sys/class/leds/blue/brightness restorecon /sys/class/leds/red/blink restorecon /sys/class/leds/green/blink restorecon /sys/class/leds/blue/blink #endif /*VENDOR_EDIT*/ #ifdef VENDOR_EDIT #/* wifi ftm test */ chown system system /system/bin/wifi_ftm chmod 0777 /system/bin/wifi_ftm chown system system /system/bin/wifi_single chmod 0777 /system/bin/wifi_single chown system system /system/bin/iwpriv chmod 0777 /system/bin/iwpriv chown system system /system/bin/iwlist chmod 0777 /system/bin/iwlist chown system system /system/xbin/tcpdump chmod 0777 /system/xbin/tcpdump #endif write /sys/module/printk/parameters/print_wall_time 1 # add for nfc setprop ro.nfc.port "I2C" chmod 0666 /dev/pn544 chown nfc nfc /dev/pn544 #ifdef VENDOR_EDIT #huruihuan@android add for enable cgroup_freezer on init mkdir /sys/fs/cgroup/freezer 0750 root system mount cgroup none /sys/fs/cgroup/freezer freezer chmod 777 /sys/fs/cgroup/freezer #endif #erik.yang, 2015/3/20, add for property self-adaptive service self-init /sbin/self-init class core user root oneshot seclabel u:r:self-init:s0 service copy_wifi_nv /system/bin/copy_wifi_nv class late_start oneshot service wififtmserver /system/bin/sh system/bin/wifi_ftm class late_start user root group root disabled #oneshot service wifisingle /system/bin/sh system/bin/wifi_single class late_start user root group root disabled oneshot on property:wlan.WifiSgle=1 start wifisingle on property:wlan.WifiSgle=0 stop wifisingle #endif /* VENDOR_EDIT */ # Adb over Network on property:service.adb.tcp.port=5555 stop adbd start adbd on property:service.adb.tcp.port=-1 stop adbd start adbd #ifdef VENDOR_EDIT #niejianan@oneplus.framework , 2015/04/25, add for mmi charging test on property:sys.fastcharger=true write /sys/class/power_supply/battery/charging_enabled 1 on property:sys.fastcharger=false write /sys/class/power_supply/battery/charging_enabled 0 #endif /* VENDOR_EDIT */ #changhua.li Add for [alipay ta upate], { service updateTA /system/bin/sh /updateTA.sh class main user root disabled oneshot #} add end for [alipay ta upate]. #ifdef VENDOR_EDIT #liuhuisheng@framework 2015-05-06 Add begin for OTG switch on property:persist.sys.oem.otg_support=true write /sys/module/dwc3/parameters/otg_switch 1 on property:persist.sys.oem.otg_support=false write /sys/module/dwc3/parameters/otg_switch 0 #endif #ifdef VENDOR_EDIT #added by wuaijun@system service engineermode-sh /system/bin/sh /init.oem.engineermode.sh class late_start user root oneshot on post-fs chown system system /d/qpnp-smbcharger/ship_mode chown system system /dev/param chmod 660 /dev/param chown system system /sys/class/leds/led:flash_torch/brightness chown system system /dev/SN3193 restorecon /sys/class/leds/led:flash_torch/brightness #endif /*VENDOR_EDIT*/ #ifdef VENDOR_EDIT #hefaxi@bsp, 2015/11/06 on post-fs-data chmod 0660 /dev/block/mmcblk0p23 chown root system /dev/block/mmcblk0p23 # add for nfc mkdir /data/nfc #endif /*VENDOR_EDIT*/ on property:persist.sys.adbroot=1 setprop selinux.reload_policy 1 #ifdef VENDOR_EDIT #hieu@oneplus.net, 2015/10/30, SND-10768, add service for bugreport service bugreport /system/bin/dumpstate -d -p -B \ -o /data/data/com.android.shell/files/bugreports/bugreport class main disabled oneshot #endif #ifdef VENDOR_EDIT #lifei@oneplus.media, 2016/02/14, add service for CTS and engineer app service oem_audio_device /system/bin/chcon u:object_r:oem_audio_device:s0 /dev/snd class late_start oneshot #endif #ifdef VENDOR_EDIT #WayneChang, 2015/12/29, add for control virtual key feature on property:persist.sys.oem.region=OverSeas write /proc/s1302/virtual_key 0 on property:persist.sys.oem.region=CN write /proc/s1302/virtual_key 1 #endif