# # Copyright 2014 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.fugu.usb.rc on early-init mount debugfs debugfs /sys/kernel/debug # IMG Graphics chown system system /dev/dri/card0 chmod 0666 /dev/dri/card0 symlink /dev/dri/card0 /dev/card0 on init # See storage config details at http://source.android.com/tech/storage/ mkdir /mnt/shell/emulated 0700 shell shell mkdir /storage/emulated 0555 root root export EXTERNAL_STORAGE /storage/emulated/legacy export EMULATED_STORAGE_SOURCE /mnt/shell/emulated export EMULATED_STORAGE_TARGET /storage/emulated # Support legacy paths symlink /storage/emulated/legacy /sdcard symlink /storage/emulated/legacy /mnt/sdcard symlink /storage/emulated/legacy /storage/sdcard0 symlink /mnt/shell/emulated/0 /storage/emulated/legacy chown system system /usr/bin/ia_watchdogd chmod 0750 /usr/bin/ia_watchdogd on fs mkdir /logs 0770 system log mkdir /factory 0775 system system mount_all ./fstab.fugu setprop ro.crypto.fuse_sdcard true on early-boot # set RLIMIT_MEMLOCK to 64MB setrlimit 8 67108864 67108864 # Bluetooth chmod 0644 /config/bt/bd_addr.conf setprop ro.bt.bdaddr_path "/config/bt/bd_addr.conf" start bd_prov on boot write /proc/sys/vm/swappiness 0 # Assign TCP buffer thresholds to be ceiling value of technology maximums # Increased technology maximums should be reflected here. write /proc/sys/net/core/rmem_max 1220608 write /proc/sys/net/core/wmem_max 1220608 # IMG Graphics chown system system /dev/pvr_sync chmod 666 /dev/pvr_sync chown system system /dev/card0 chown system system /sys/class/backlight/psb-bl/brightness chown system system /sys/class/backlight/psb-bl/max_brightness chown system system /sys/class/backlight/psb-bl/actual_brightness chmod 0666 /dev/card0 chmod 0664 /sys/class/backlight/psb-bl/brightness chmod 0664 /sys/class/backlight/psb-bl/max_brightness chmod 0664 /sys/class/backlight/psb-bl/actual_brightness on post-fs # Performance tweaks for interactive governor chown system system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq chown system system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq chmod 0660 /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq chown system system /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq chmod 0660 /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq chown system system /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq chmod 0660 /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq chown system system /sys/devices/system/cpu/cpufreq/interactive/timer_rate chown system system /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load chown system system /sys/devices/system/cpu/cpufreq/interactive/boostpulse chown system system /sys/devices/system/cpu/cpufreq/interactive/touchboostpulse chown system system /sys/devices/system/cpu/cpufreq/interactive/touchboostpulse_duration chown system system /sys/devices/system/cpu/cpufreq/interactive/touchboost_freq chmod 0220 /sys/devices/system/cpu/cpufreq/interactive/touchboostpulse chmod 0220 /sys/devices/system/cpu/cpufreq/interactive/boostpulse # Bluetooth mkdir /config/bt chown system bluetooth /config/bt chmod 0770 /config/bt on post-fs-data mkdir /data/media 0770 media_rw media_rw # Create the directories used by the Wireless subsystem mkdir /data/misc/wifi 0770 wifi wifi mkdir /data/misc/wifi/sockets 0770 wifi wifi mkdir /data/misc/dhcp 0770 dhcp wifi mkdir /data/tombstones 0771 system system # Bluetooth chmod 0660 /sys/class/rfkill/rfkill0/state chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/state chown bluetooth net_bt_stack /sys/class/rfkill/rfkill0/type chown bluetooth net_bt_stack /dev/ttyMFD0 # Bluetooth disable LPM write /sys/devices/pci0000\:00/0000\:00\:04.1/power/control on # Create directory used by audio subsystem mkdir /data/misc/audio 0770 audio audio mkdir /data/system 0775 system system setprop vold.post_fs_data_done 1 on property:init.svc.wpa_supplicant=stopped stop dhcpcd service wpa_supplicant /system/bin/wpa_supplicant -Dnl80211 -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -d -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi group system wifi inet bluetooth disabled oneshot service p2p_supplicant /system/bin/wpa_supplicant \ -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \ -m/data/misc/wifi/p2p_supplicant.conf \ -puse_p2p_group_interface=1p2p_device=1use_multi_chan_concurrent=1 \ -O/data/misc/wifi/sockets \ -e/data/misc/wifi/entropy.bin \ -d -g@android:wpa_wlan0 class main socket wpa_wlan0 dgram 660 wifi wifi disabled oneshot service dhcpcd_wlan0 /system/bin/logwrapper /system/bin/dhcpcd -ABKL class main group wifi system dhcp disabled oneshot service dhcpcd_p2p /system/bin/dhcpcd -aABKL class main group wifi system dhcp disabled oneshot service iprenew_wlan0 /system/bin/logwrapper /system/bin/dhcpcd -n group system dhcp disabled oneshot service iprenew_p2p /system/bin/dhcpcd -n class main group wifi system dhcp disabled oneshot # Bluetooth related services service dhcpcd_bt-pan /system/bin/logwrapper /system/bin/dhcpcd -ABKL class main group bluetooth wifi system dhcp disabled oneshot service iprenew_bt-pan /system/bin/logwrapper /system/bin/dhcpcd -n group bluetooth system dhcp disabled oneshot service bd_prov /system/bin/bd_prov class core user system group system bluetooth security disabled oneshot # virtual sdcard daemon running as media_rw (1023) service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated class late_start # 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 service watchdogd /usr/bin/ia_watchdogd class core user system group system oneshot # Reset the watchdog counter once boot is completed on property:sys.boot_completed=1 write /sys/devices/virtual/misc/watchdog/counter "0" on property:init.svc.recovery=running write /sys/devices/virtual/misc/watchdog/counter "0" service pvrsrvctl /system/vendor/bin/pvrsrvctl --no-module --start class core oneshot user root