blob: 279bb95b48ab931439877f0ba88834e27aea7fdf [file] [log] [blame]
on early-init
mount debugfs debugfs /sys/kernel/debug
write /sys/class/firmware/timeout 5
export EXTERNAL_STORAGE /mnt/sdcard
mkdir /mnt/sdcard 0000 system system
# for backwards compatibility
symlink /mnt/sdcard /sdcard
on fs
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/system /system wait ro
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/userdata /data wait noatime nosuid nodev
mount ext4 /dev/block/platform/sdhci-tegra.3/by-name/cache /cache wait noatime nosuid nodev
on boot
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
# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/media 0775 media_rw media_rw
chown media_rw media_rw /data/media
setprop ro.media.storage /data/media
# bluetooth
# power up/down interface
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chmod 0660 /sys/class/rfkill/rfkill0/state
# UART device
chown bluetooth bluetooth /dev/ttyHS2
chmod 0660 /dev/ttyHS2
# bluetooth MAC address programming
chown bluetooth bluetooth /sys/module/board_stingray/parameters/bdaddr
setprop ro.bt.bdaddr_path /sys/module/board_stingray/parameters/bdaddr
# Sensor
chown compass compass /dev/kxtf9
chmod 660 /dev/kxtf9
chown compass compass /dev/max9635
chmod 660 /dev/max9635
chown compass compass /dev/bmp085
chmod 660 /dev/bmp085
chown compass compass /dev/l3g4200d
chmod 660 /dev/l3g4200d
chown compass compass /dev/akm8975_dev
chmod 660 /dev/akm8975_dev
chown compass compass /dev/akm8975_aot
chmod 660 /dev/akm8975_aot
# light
chown system system /sys/class/leds/notification-led/brightness
chmod 660 /sys/class/leds/notification-led/brightness
chown system system /sys/class/leds/notification-led/trigger
chmod 660 /sys/class/leds/notification-led/trigger
chown system system /sys/class/leds/notification-led/delay_on
chmod 660 /sys/class/leds/notification-led/delay_on
chmod 666 /dev/nvhost-ctrl
chmod 666 /dev/nvhost-display
chmod 666 /dev/nvhost-dsi
chmod 666 /dev/nvhost-gr2d
chmod 666 /dev/nvhost-gr3d
chmod 666 /dev/nvhost-isp
chmod 666 /dev/nvhost-mpe
chmod 666 /dev/nvhost-vi
# Camera flash
chown media camera /sys/class/leds/flash/brightness
chown media camera /sys/class/leds/torch/brightness
chmod 660 /sys/class/leds/flash/brightness
chmod 660 /sys/class/leds/torch/brightness
# GPS
#Create location directory, BRCM guci library stores LTO file and read/write
# config file.
mkdir /data/location 0770 radio radio
# UART Device
chown radio radio /dev/ttyHS4
chmod 640 /dev/ttyHS4
# broadcom 4750 device
chown radio radio /dev/gps_brcm4750
chmod 660 /dev/gps_brcm4750
# Whisper UART Device
chown radio radio /dev/ttyHS0
chmod 640 /dev/ttyHS0
# Modem Control
chown radio radio /sys/class/radio/mdm6600/command
chmod 220 /sys/class/radio/mdm6600/command
chown radio radio /sys/bus/usb/devices/usb2/power/control
chmod 660 /sys/bus/usb/devices/usb2/power/control
# Power Management Settings
#write /sys/devices/platform/ohci.0/usb2/2-3/power/level auto
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 312000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1000000
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold 93
write /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate 30000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 312000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1000000
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor ondemand
write /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold 93
write /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate 30000
# Wakelock debug
write /sys/module/wakelock/parameters/debug_mask 7
# No need to continuously scan w1 bus
write /sys/devices/w1\ bus\ master/w1_master_search 1
# HACK prevent LP0
write /d/suspend_mode lp1
service nvrm_daemon /system/bin/nvrm_daemon
user root
onrestart restart servicemanager
# Ecompass daemon
service akmd2 /system/bin/akmd2
user compass
group compass misc input
service wpa_supplicant /system/bin/wpa_supplicant \
-Dwext -ieth0 -c/data/misc/wifi/wpa_supplicant.conf
# 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
socket wpa_eth0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd /system/bin/dhcpcd -ABKL
disabled
oneshot
# bugreport is triggered by the VOLUME-DOWN and VOLUME-UP keys.
# bugtogo.sh tool will invoke bugreport and propt email composer
# if not in user build.
service bugreport /system/bin/bugtogo.sh
disabled
oneshot
keycodes 115 114
service hciattach /system/bin/brcm_patchram_plus --enable_hci \
--baudrate 3000000 --patchram /etc/firmware/bcm4329.hcd /dev/ttyHS2
user bluetooth
group bluetooth net_bt_admin
disabled
service location /system/bin/location
socket gpshal_socket stream 660 radio system
socket location_shim stream 660 system system
socket gps_tcmd stream 660 radio system
user radio
group radio system mot_accy
oneshot
service locDrv /system/bin/brcm_guci_drv -config /system/etc/gpsconfig.xml
user radio
group radio inet sdcard_rw
service tcmd /system/bin/tcmd
oneshot
disabled
service ftmipcd /system/bin/ftmipcd
oneshot
disabled
# Immediately drops to user radio, after starting the real-time thread
service whisper /system/bin/whisperd
group radio system mot_accy
# create virtual SD card at /mnt/sdcard, based on the /data/media directory
# daemon will drop to user/group system/media_rw after initializing
service sdcard /system/bin/sdcard /data/media 1000 1023
service motolocation /system/bin/sh /system/bin/am startservice -n com.motorola.android.locationproxy/com.motorola.android.locationproxy.LocationProxyService
disabled
oneshot
on property:gsm.mot.locatonproxy=start
start motolocation
# Get BP version and save to misc
service savebpver /system/bin/savebpver
oneshot
disabled
on property:dev.bootcomplete=1
start savebpver
on property:ro.bootmode=factorycable
start tcmd
start ftmipcd