| # |
| # Copyright 2015 The Android Open Source Project |
| # |
| # 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. |
| # |
| |
| import init.bullhead.usb.rc |
| import init.bullhead.power.rc |
| import init.bullhead.diag.rc |
| import init.bullhead.fp.rc |
| |
| on early-init |
| mount debugfs debugfs /sys/kernel/debug |
| chown system system /sys/kernel/debug/kgsl/proc |
| |
| on init |
| # Set permissions for persist partition |
| mkdir /persist 0771 system system |
| mkdir /firmware 0771 system system |
| |
| # Support legacy paths |
| symlink /sdcard /mnt/sdcard |
| symlink /sdcard /storage/sdcard0 |
| |
| on fs |
| mount_all ./fstab.bullhead |
| |
| on early-boot |
| # set RLIMIT_MEMLOCK to 64MB |
| setrlimit 8 67108864 67108864 |
| |
| on boot |
| # Bluetooth |
| chown bluetooth net_bt /sys/class/rfkill/rfkill0/type |
| chown bluetooth net_bt /sys/class/rfkill/rfkill0/state |
| chmod 0660 /sys/class/rfkill/rfkill0/state |
| chown bluetooth net_bt /dev/ttyHS0 |
| chmod 0660 /dev/ttyHS0 |
| chown bluetooth net_bt /sys/class/rfkill/rfkill0/device/extldo |
| chmod 0660 /sys/class/rfkill/rfkill0/device/extldo |
| |
| # Enable DEBUG_SUSPEND, DEBUG_EXIT_SUSPEND, and DEBUG_WAKEUP |
| write /sys/module/wakelock/parameters/debug_mask 7 |
| |
| # create symlink for fb1 as HDMI |
| symlink /dev/graphics/fb1 /dev/graphics/hdmi |
| |
| # setup permissions for fb1 related nodes |
| chown system graphics /sys/class/graphics/fb1/hpd |
| chown system graphics /sys/class/graphics/fb1/vendor_name |
| chown system graphics /sys/class/graphics/fb1/product_description |
| chmod 0664 /sys/devices/virtual/graphics/fb1/hpd |
| chmod 0664 /sys/devices/virtual/graphics/fb1/vendor_name |
| chmod 0664 /sys/devices/virtual/graphics/fb1/product_description |
| |
| # Allow QMUX daemon to assign port open wait time |
| chown radio radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait |
| |
| #Create QMUX deamon socket area |
| mkdir /dev/socket/qmux_radio 0770 radio radio |
| chmod 2770 /dev/socket/qmux_radio |
| mkdir /dev/socket/qmux_audio 0770 media audio |
| chmod 2770 /dev/socket/qmux_audio |
| mkdir /dev/socket/qmux_bluetooth 0770 bluetooth bluetooth |
| chmod 2770 /dev/socket/qmux_bluetooth |
| mkdir /dev/socket/qmux_gps 0770 gps gps |
| chmod 2770 /dev/socket/qmux_gps |
| |
| on post-fs-data |
| write /sys/kernel/boot_adsp/boot 1 |
| |
| # Ecc_Handler qcril.db |
| mkdir /data/misc/radio 0770 radio radio |
| symlink /system/etc/qcril.db /data/misc/radio/qcril.db |
| |
| setprop vold.post_fs_data_done 1 |
| |
| on charger |
| |
| service irsc_util /system/bin/logwrapper /system/bin/irsc_util "/etc/sec_config" |
| class main |
| user root |
| oneshot |
| |
| service rmt_storage /system/bin/rmt_storage |
| class core |
| user root |
| group system |
| |
| service start_hci_filter /system/bin/wcnss_filter |
| class late_start |
| user root |
| group bluetooth |
| disabled |
| |
| on property:wc_transport.start_hci=true |
| start start_hci_filter |
| |
| on property:wc_transport.start_hci=false |
| stop start_hci_filter |
| |
| service dhcpcd_bt-pan /system/bin/dhcpcd -BKLG |
| disabled |
| oneshot |
| |
| service iprenew_bt-pan /system/bin/dhcpcd -n |
| disabled |
| oneshot |
| |
| # QMUX must be in multiple groups to support external process connections |
| service qmuxd /system/bin/qmuxd |
| class main |
| user radio |
| group radio audio bluetooth gps |
| |
| service netmgrd /system/bin/netmgrd |
| class main |
| group radio |
| |
| #service mpdecision /system/bin/mpdecision --avg_comp |
| # user root |
| # disabled |
| # |
| service per_mgr /system/bin/pm-service |
| class core |
| user system |
| group system net_raw |
| |
| service per_proxy /system/bin/pm-proxy |
| class core |
| user system |
| group system net_raw |
| disabled |
| |
| on property:init.svc.per_mgr=running |
| start per_proxy |
| |
| on property:sys.shutdown.requested=* |
| stop per_proxy |
| |
| service thermal-engine /system/bin/thermal-engine |
| class main |
| user root |
| socket thermal-send-client stream 0666 system system |
| socket thermal-recv-client stream 0660 system system |
| socket thermal-recv-passive-client stream 0666 system system |
| group root |
| |
| on property:init.svc.wpa_supplicant=stopped |
| stop dhcpcd |
| |
| service wpa_supplicant /system/bin/wpa_supplicant \ |
| -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| -I/system/etc/wifi/wpa_supplicant_overlay.conf \ |
| -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
| # we will start as root and wpa_supplicant will switch to user wifi |
| # after setting up the capabilities required for WEXT |
| # user wifi |
| # group wifi inet keystore |
| class main |
| socket wpa_wlan0 dgram 660 wifi wifi |
| disabled |
| oneshot |
| |
| service p2p_supplicant /system/bin/wpa_supplicant \ |
| -ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf \ |
| -I/system/etc/wifi/p2p_supplicant_overlay.conf -N \ |
| -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ |
| -I/system/etc/wifi/wpa_supplicant_overlay.conf \ |
| -puse_p2p_group_interface=1 \ |
| -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0 |
| # we will start as root and wpa_supplicant will switch to user wifi |
| # after setting up the capabilities required for WEXT |
| # user wifi |
| # group wifi inet keystore |
| class main |
| socket wpa_wlan0 dgram 660 wifi wifi |
| disabled |
| oneshot |
| |
| service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL |
| class late_start |
| disabled |
| oneshot |
| |
| service dhcpcd_p2p /system/bin/dhcpcd -aABKL |
| class late_start |
| disabled |
| oneshot |
| |
| service iprenew_wlan0 /system/bin/dhcpcd -n |
| class late_start |
| disabled |
| oneshot |
| |
| service iprenew_p2p /system/bin/dhcpcd -n |
| class late_start |
| disabled |
| oneshot |
| |
| service dhcpcd_eth0 /system/bin/dhcpcd -aABDKL |
| class late_start |
| disabled |
| oneshot |
| |
| service iprenew_eth0 /system/bin/dhcpcd -n |
| class late_start |
| disabled |
| oneshot |
| |
| service qseecomd /system/bin/qseecomd |
| class core |
| user root |
| group root |
| |
| service charger /sbin/healthd -c |
| class charger |
| critical |
| seclabel u:r:healthd:s0 |
| |
| # bugreport is triggered by holding down volume down, volume up and power |
| service bugreport /system/bin/dumpstate -d -p -B \ |
| -o /data/data/com.android.shell/files/bugreports/bugreport |
| class main |
| disabled |
| oneshot |
| keycodes 114 115 116 |