Patrick Tjin | ea3b3cd | 2015-03-31 10:38:39 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright 2015 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
| 17 | import init.angler.usb.rc |
| 18 | import init.angler.diag.rc |
| 19 | |
| 20 | on early-init |
| 21 | mount debugfs debugfs /sys/kernel/debug |
| 22 | chown system system /sys/kernel/debug/kgsl/proc |
| 23 | |
| 24 | on init |
| 25 | # Set permissions for persist partition |
| 26 | mkdir /persist 0771 system system |
| 27 | mkdir /firmware 0771 system system |
| 28 | |
| 29 | # Support legacy paths |
| 30 | symlink /sdcard /mnt/sdcard |
| 31 | symlink /sdcard /storage/sdcard0 |
| 32 | |
| 33 | on fs |
| 34 | mount_all ./fstab.angler |
| 35 | |
Naveen Ramaraj | 8701898 | 2015-04-24 21:10:40 -0700 | [diff] [blame] | 36 | # Enable rmnet data and aggregation |
| 37 | setprop persist.rmnet.mux enabled |
| 38 | setprop persist.rmnet.data.enable true |
| 39 | setprop persist.data.wda.enable true |
| 40 | setprop persist.data.df.agg.dl_pkt 10 |
| 41 | setprop persist.data.df.agg.dl_size 4096 |
| 42 | |
Patrick Tjin | ea3b3cd | 2015-03-31 10:38:39 -0700 | [diff] [blame] | 43 | on early-boot |
| 44 | # set RLIMIT_MEMLOCK to 64MB |
| 45 | setrlimit 8 67108864 67108864 |
| 46 | |
| 47 | on boot |
Zhihui Wu | 7d7b98c | 2015-04-24 00:40:19 -0700 | [diff] [blame] | 48 | # set cpu governor to interactive after boot up |
| 49 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive |
| 50 | write /sys/module/lpm_levels/parameters/sleep_disabled N |
| 51 | |
Patrick Tjin | ea3b3cd | 2015-03-31 10:38:39 -0700 | [diff] [blame] | 52 | # Enable DEBUG_SUSPEND, DEBUG_EXIT_SUSPEND, and DEBUG_WAKEUP |
| 53 | write /sys/module/wakelock/parameters/debug_mask 7 |
| 54 | |
| 55 | # create symlink for fb1 as HDMI |
| 56 | symlink /dev/graphics/fb1 /dev/graphics/hdmi |
Naveen Ramaraj | 8701898 | 2015-04-24 21:10:40 -0700 | [diff] [blame] | 57 | symlink /dev/block/platform/soc.0/f9824900.sdhci /dev/block/bootdevice |
Patrick Tjin | ea3b3cd | 2015-03-31 10:38:39 -0700 | [diff] [blame] | 58 | |
| 59 | # setup permissions for fb1 related nodes |
| 60 | chown system graphics /sys/class/graphics/fb1/hpd |
| 61 | chown system graphics /sys/class/graphics/fb1/vendor_name |
| 62 | chown system graphics /sys/class/graphics/fb1/product_description |
| 63 | chmod 0664 /sys/devices/virtual/graphics/fb1/hpd |
| 64 | chmod 0664 /sys/devices/virtual/graphics/fb1/vendor_name |
| 65 | chmod 0664 /sys/devices/virtual/graphics/fb1/product_description |
| 66 | |
Naveen Ramaraj | 8701898 | 2015-04-24 21:10:40 -0700 | [diff] [blame] | 67 | #Create QMUX deamon socket |
| 68 | mkdir /dev/socket/qmux_radio 0770 radio radio |
| 69 | chmod 2770 /dev/socket/qmux_radio |
| 70 | mkdir /dev/socket/qmux_audio 0770 media audio |
| 71 | chmod 2770 /dev/socket/qmux_audio |
| 72 | mkdir /dev/socket/qmux_gps 0770 gps gps |
| 73 | chmod 2770 /dev/socket/qmux_gps |
| 74 | |
| 75 | write /sys/bus/platform/drivers/xhci_msm_hsic/unbind msm_hsic_host |
| 76 | write /sys/module/rmnet_usb/parameters/mux_enabled 1 |
| 77 | write /sys/module/rmnet_usb/parameters/no_fwd_rmnet_links 8 |
| 78 | write /sys/module/rmnet_usb/parameters/no_rmnet_insts_per_dev 17 |
| 79 | write /sys/module/rmnet_usb/parameters/rmnet_data_init 1 |
| 80 | chown radio radio /sys/devices/virtual/hsicctl/hsicctl0/modem_wait |
| 81 | |
| 82 | # Create /data/time folder for time-services |
| 83 | mkdir /data/time/ 0700 system system |
| 84 | mkdir /data/audio/ 0770 media audio |
| 85 | |
| 86 | start qmuxd |
| 87 | start netmgrd |
| 88 | |
| 89 | |
| 90 | on property:init.svc.per_mgr=running |
| 91 | start per_proxy |
| 92 | |
| 93 | on property:sys.shutdown.requested=* |
| 94 | stop per_proxy |
| 95 | |
Patrick Tjin | ea3b3cd | 2015-03-31 10:38:39 -0700 | [diff] [blame] | 96 | on post-fs-data |
| 97 | write /sys/kernel/boot_adsp/boot 1 |
| 98 | |
| 99 | # Ecc_Handler qcril.db |
| 100 | mkdir /data/misc/radio 0770 radio radio |
| 101 | symlink /system/etc/qcril.db /data/misc/radio/qcril.db |
| 102 | |
| 103 | setprop vold.post_fs_data_done 1 |
| 104 | |
Mekala Natarajan | eb9c2a3 | 2015-04-27 11:01:22 -0700 | [diff] [blame] | 105 | # Create directory for TZ Apps |
| 106 | mkdir /data/misc/qsee 0770 system system |
| 107 | |
Patrick Tjin | ea3b3cd | 2015-03-31 10:38:39 -0700 | [diff] [blame] | 108 | on charger |
Zhihui Wu | 13d03c6 | 2015-04-23 22:06:27 -0700 | [diff] [blame] | 109 | #low power governing |
| 110 | write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor interactive |
| 111 | write /sys/devices/system/cpu/cpu1/online 0 |
| 112 | write /sys/devices/system/cpu/cpu2/online 0 |
| 113 | write /sys/devices/system/cpu/cpu3/online 0 |
| 114 | write /sys/devices/system/cpu/cpu4/online 0 |
| 115 | write /sys/devices/system/cpu/cpu5/online 0 |
| 116 | write /sys/devices/system/cpu/cpu6/online 0 |
| 117 | write /sys/devices/system/cpu/cpu7/online 0 |
| 118 | |
| 119 | service charger /sbin/healthd -c |
| 120 | class charger |
| 121 | group log |
| 122 | seclabel u:r:healthd:s0 |
Patrick Tjin | ea3b3cd | 2015-03-31 10:38:39 -0700 | [diff] [blame] | 123 | |
Naveen Ramaraj | 8701898 | 2015-04-24 21:10:40 -0700 | [diff] [blame] | 124 | service per_mgr /system/bin/pm-service |
| 125 | class core |
| 126 | user root |
| 127 | group system net_raw |
| 128 | |
| 129 | service per_proxy /system/bin/pm-proxy |
| 130 | class core |
| 131 | user root |
| 132 | group system net_raw |
| 133 | disabled |
| 134 | |
| 135 | service rmt_storage /system/bin/rmt_storage |
| 136 | class core |
| 137 | user root |
| 138 | |
Mekala Natarajan | eb9c2a3 | 2015-04-27 11:01:22 -0700 | [diff] [blame] | 139 | service qseecomd /system/bin/qseecomd |
| 140 | class core |
| 141 | user root |
| 142 | group root |
| 143 | |
Naveen Ramaraj | 8701898 | 2015-04-24 21:10:40 -0700 | [diff] [blame] | 144 | service irsc_util /system/bin/irsc_util "/etc/sec_config" |
| 145 | class main |
| 146 | user root |
| 147 | oneshot |
| 148 | |
| 149 | service bridgemgrd /system/bin/bridgemgrd |
| 150 | class late_start |
| 151 | user radio |
| 152 | group radio |
| 153 | |
Naveen Ramaraj | 910680c | 2015-05-04 10:45:49 -0700 | [diff] [blame] | 154 | service thermal-engine /system/bin/thermal-engine |
| 155 | class main |
| 156 | user root |
| 157 | socket thermal-send-client stream 0660 system system |
| 158 | socket thermal-recv-client stream 0660 system system |
| 159 | socket thermal-recv-passive-client stream 0660 system system |
| 160 | group root |
| 161 | |
Naveen Ramaraj | 8701898 | 2015-04-24 21:10:40 -0700 | [diff] [blame] | 162 | # QMUX must be in multiple groups to support external process connections |
| 163 | service qmuxd /system/bin/qmuxd |
| 164 | class main |
| 165 | user root |
| 166 | group root radio audio bluetooth gps |
| 167 | disabled |
| 168 | |
| 169 | service netmgrd /system/bin/netmgrd |
| 170 | class root |
| 171 | group radio |
| 172 | disabled |
| 173 | |
| 174 | service time_daemon /system/bin/time_daemon |
| 175 | class late_start |
| 176 | user root |
| 177 | group root |
| 178 | |
Mekala Natarajan | 1992559 | 2015-05-04 10:19:48 -0700 | [diff] [blame^] | 179 | service loc_launcher /system/bin/loc_launcher |
| 180 | class late_start |
| 181 | group gps inet net_raw net_admin wifi |
| 182 | |
Patrick Tjin | ea3b3cd | 2015-03-31 10:38:39 -0700 | [diff] [blame] | 183 | # bugreport is triggered by holding down volume down, volume up and power |
| 184 | service bugreport /system/bin/dumpstate -d -p -B \ |
| 185 | -o /data/data/com.android.shell/files/bugreports/bugreport |
| 186 | class main |
| 187 | disabled |
| 188 | oneshot |
| 189 | keycodes 114 115 116 |