blob: fae0349f1f57d0609587ba4efa809c9ef99e719e [file] [log] [blame]
import init.manta.usb.rc
on early-init
export EXTERNAL_STORAGE /storage/sdcard0
mkdir /storage 0050 system sdcard_r
mkdir /storage/sdcard0 0000 system system
symlink /storage/sdcard0 /sdcard
symlink /storage/sdcard0 /mnt/sdcard
on init
start watchdogd
on post-fs-data
# we will remap this as /storage/sdcard0 with the sdcard fuse tool
mkdir /data/media 0770 media_rw media_rw
chown media_rw media_rw /data/media
setprop vold.post_fs_data_done 1
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
on boot
mount debugfs /sys/kernel/debug /sys/kernel/debug
setprop ro.radio.noril yes
# Set up kernel tracing, but disable it by default
chmod 0222 /sys/kernel/debug/tracing/trace_marker
write /sys/kernel/debug/tracing/tracing_on 0
on fs
mount_all /fstab.manta
setprop ro.crypto.fuse_sdcard true
# Permissions for backlight
chmod 0660 /sys/class/backlight/pwm-backlight.0/brightness
chown system system /sys/class/backlight/pwm-backlight.0/brightness
# create virtual SD card at /storage/sdcard0, based on the /data/media directory
# daemon will drop to user/group system/media_rw after initializing
# underlying files in /data/media will be created with user and group media_rw (1023)
service sdcard /system/bin/sdcard /data/media 1023 1023
class late_start
service p2p_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
-ip2p0 -Dnl80211 -c/data/misc/wifi/p2p_supplicant.conf -e/data/misc/wifi/entropy.bin -puse_p2p_group_interface=1
# 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 wpa_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -e/data/misc/wifi/entropy.bin
# 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 -aABKL
class main
disabled
oneshot
service dhcpcd_p2p /system/bin/dhcpcd -aABKL
class main
disabled
oneshot
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
class main
disabled
oneshot
service iprenew_wlan0 /system/bin/dhcpcd -n
class main
disabled
oneshot
service iprenew_p2p /system/bin/dhcpcd -n
class main
disabled
oneshot
service battery_charger /charger
class charger
# Set watchdog timer to 30 seconds and pet it every 10 seconds to get a 20 second margin
service watchdogd /sbin/watchdogd 10 20
class core
# on userdebug and eng builds, enable kgdb on the serial console
on property:ro.debuggable=1
write /sys/module/kgdboc/parameters/kgdboc ttyFIQ2
write /sys/module/fiq_debugger/parameters/kgdb_enable 1
# bugreport is triggered by holding down volume down, volume up and power
service bugreport /system/bin/bugmailer.sh -v
class main
disabled
oneshot
keycodes 114 115 116