M7350v1_en_gpl

This commit is contained in:
T
2024-09-09 08:52:07 +00:00
commit f9cc65cfda
65988 changed files with 26357421 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
# files that live under /system/etc/...
copy_from := \
etc/vold.conf \
etc/dbus.conf \
etc/hosts \
etc/init.qcom.post_boot.sh \
etc/init.qcom.bt.sh \
etc/init.qcom.coex.sh \
etc/init.qcom.fm.sh \
etc/init.qcom.sdio.sh \
etc/init.qcom.wifi.sh
ifeq ($(TARGET_PRODUCT),generic)
copy_from += etc/vold.fstab
endif
# the /system/etc/init.goldfish.sh is needed to enable emulator support
# in the system image. In theory, we don't need these for -user builds
# which are device-specific. However, these builds require at the moment
# to run the dex pre-optimization *in* the emulator. So keep the file until
# we are capable of running dex preopt on the host.
#
copy_from += etc/init.goldfish.sh
copy_to := $(addprefix $(TARGET_OUT)/,$(copy_from))
copy_from := $(addprefix $(LOCAL_PATH)/,$(copy_from))
$(copy_to) : PRIVATE_MODULE := system_etcdir
$(copy_to) : $(TARGET_OUT)/% : $(LOCAL_PATH)/% | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(copy_to)
# files that live under /...
# Only copy init.rc if the target doesn't have its own.
ifneq ($(TARGET_PROVIDES_INIT_RC),true)
file := $(TARGET_ROOT_OUT)/init.rc
$(file) : $(LOCAL_PATH)/init.rc | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
$(INSTALLED_RAMDISK_TARGET): $(file)
endif
file := $(TARGET_ROOT_OUT)/ueventd.rc
$(file) : $(LOCAL_PATH)/ueventd.rc | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
$(INSTALLED_RAMDISK_TARGET): $(file)
# Just like /system/etc/init.goldfish.sh, the /init.godlfish.rc is here
# to allow -user builds to properly run the dex pre-optimization pass in
# the emulator.
file := $(TARGET_ROOT_OUT)/init.goldfish.rc
$(file) : $(LOCAL_PATH)/etc/init.goldfish.rc | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
$(INSTALLED_RAMDISK_TARGET): $(file)
file := $(TARGET_ROOT_OUT)/ueventd.goldfish.rc
$(file) : $(LOCAL_PATH)/etc/ueventd.goldfish.rc | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
$(INSTALLED_RAMDISK_TARGET): $(file)
file := $(TARGET_ROOT_OUT)/init.qcom.rc
$(file) : $(LOCAL_PATH)/etc/init.qcom.rc | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
file := $(TARGET_ROOT_OUT)/init.qcom.sh
$(file) : $(LOCAL_PATH)/etc/init.qcom.sh | $(ACP)
$(transform-prebuilt-to-target)
ALL_PREBUILT += $(file)
# create some directories (some are mount points)
DIRS := $(addprefix $(TARGET_ROOT_OUT)/, \
sbin \
dev \
proc \
sys \
system \
data \
) \
$(TARGET_OUT_DATA)
$(DIRS):
@echo Directory: $@
@mkdir -p $@
ALL_PREBUILT += $(DIRS)

View File

@@ -0,0 +1,27 @@
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Our well-known bus type, do not change this -->
<type>system</type>
<!-- Only allow socket-credentials-based authentication -->
<auth>EXTERNAL</auth>
<!-- Only listen on a local socket. (abstract=/path/to/socket
means use abstract namespace, don't really create filesystem
file; only Linux supports this. Use path=/whatever on other
systems.) -->
<listen>unix:path=/dev/socket/dbus</listen>
<!-- Allow everything, D-Bus socket is protected by unix filesystem
permissions -->
<policy context="default">
<allow send_interface="*"/>
<allow receive_interface="*"/>
<allow own="*"/>
<allow user="*"/>
<allow send_requested_reply="true"/>
<allow receive_requested_reply="true"/>
</policy>
</busconfig>

View File

@@ -0,0 +1 @@
127.0.0.1 localhost

View File

@@ -0,0 +1,52 @@
on boot
setprop ARGH ARGH
setprop net.eth0.dns1 10.0.2.3
setprop net.gprs.local-ip 10.0.2.15
setprop ro.radio.use-ppp no
setprop ro.build.product generic
setprop ro.product.device generic
# fake some battery state
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
# disable some daemons the emulator doesn't want
stop dund
stop akmd
setprop ro.setupwizard.mode EMULATOR
# enable Google-specific location features,
# like NetworkLocationProvider and LocationCollector
setprop ro.com.google.location_feature 1
# For the emulator, which bypasses Setup Wizard, you can specify
# account info for the device via these two properties. Google
# Login Service will insert these accounts into the database when
# it is created (ie, after a data wipe).
#
# setprop ro.config.hosted_account username@hosteddomain.org:password
# setprop ro.config.google_account username@gmail.com:password
#
# You MUST have a Google account on the device, and you MAY
# additionally have a hosted account. No other configuration is
# supported, and arbitrary breakage may result if you specify
# something else.
service goldfish-setup /system/etc/init.goldfish.sh
oneshot
service qemud /system/bin/qemud
socket qemud stream 666
oneshot
# -Q is a special logcat option that forces the
# program to check wether it runs on the emulator
# if it does, it redirects its output to the device
# named by the androidboot.console kernel option
# if not, is simply exit immediately
service goldfish-logcat /system/bin/logcat -Q
oneshot

View File

@@ -0,0 +1,47 @@
#!/system/bin/sh
ifconfig eth0 10.0.2.15 netmask 255.255.255.0 up
route add default gw 10.0.2.2 dev eth0
qemud=`getprop ro.kernel.android.qemud`
case "$qemud" in
"")
radio_ril=`getprop ro.kernel.android.ril`
case "$radio_ril" in
"")
# no need for the radio interface daemon
# telephony is entirely emulated in Java
setprop ro.radio.noril yes
stop ril-daemon
;;
esac
;;
esac
num_dns=`getprop ro.kernel.android.ndns`
case "$num_dns" in
2) setprop net.eth0.dns2 10.0.2.4
;;
3) setprop net.eth0.dns2 10.0.2.4
setprop net.eth0.dns3 10.0.2.5
;;
4) setprop net.eth0.dns2 10.0.2.4
setprop net.eth0.dns3 10.0.2.5
setprop net.eth0.dns4 10.0.2.6
;;
esac
# disable boot animation for a faster boot sequence when needed
boot_anim=`getprop ro.kernel.android.bootanim`
case "$boot_anim" in
0) setprop debug.sf.nobootanimation 1
;;
esac
# call 'qemu-props' to set system properties from the emulator.
#
/system/bin/qemu-props
# this line doesn't really do anything useful. however without it the
# previous setprop doesn't seem to apply for some really odd reason
setprop ro.qemu.init.completed 1

View File

@@ -0,0 +1,130 @@
#!/system/bin/sh
# Copyright (c) 2009-2011, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
BLUETOOTH_SLEEP_PATH=/proc/bluetooth/sleep/proto
LOG_TAG="qcom-bluetooth"
LOG_NAME="${0}:"
hciattach_pid=""
loge ()
{
/system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
}
logi ()
{
/system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
}
failed ()
{
loge "$1: exit code $2"
exit $2
}
start_hciattach ()
{
/system/bin/hciattach -n $BTS_DEVICE $BTS_TYPE $BTS_BAUD &
hciattach_pid=$!
logi "start_hciattach: pid = $hciattach_pid"
echo 1 > $BLUETOOTH_SLEEP_PATH
}
kill_hciattach ()
{
echo 0 > $BLUETOOTH_SLEEP_PATH
logi "kill_hciattach: pid = $hciattach_pid"
## careful not to kill zero or null!
kill -TERM $hciattach_pid
# this shell doesn't exit now -- wait returns for normal exit
}
# mimic hciattach options parsing -- maybe a waste of effort
USAGE="hciattach [-n] [-p] [-b] [-t timeout] [-s initial_speed] <tty> <type | id> [speed] [flow|noflow] [bdaddr]"
while getopts "blnpt:s:" f
do
case $f in
b | l | n | p) opt_flags="$opt_flags -$f" ;;
t) timeout=$OPTARG;;
s) initial_speed=$OPTARG;;
\?) echo $USAGE; exit 1;;
esac
done
shift $(($OPTIND-1))
# Note that "hci_qcomm_init -e" prints expressions to set the shell variables
# BTS_DEVICE, BTS_TYPE, BTS_BAUD, and BTS_ADDRESS.
#Selectively Disable sleep
BOARD=`getprop ro.product.device`
POWER_CLASS=`getprop qcom.bt.dev_power_class`
#find the transport type
TRANSPORT=`getprop ro.qualcomm.bt.hci_transport`
logi "Transport : $TRANSPORT"
case $POWER_CLASS in
1) PWR_CLASS="-p 0" ;
logi "Power Class: 1";;
2) PWR_CLASS="-p 1" ;
logi "Power Class: 2";;
3) PWR_CLASS="-p 2" ;
logi "Power Class: CUSTOM";;
*) PWR_CLASS="";
logi "Power Class: Ignored. Default(1) used (1-CLASS1/2-CLASS2/3-CUSTOM)";
logi "Power Class: To override, Before turning BT ON; setprop qcom.bt.dev_power_class <1 or 2 or 3>";;
esac
eval $(/system/bin/hci_qcomm_init -e $PWR_CLASS && echo "exit_code_hci_qcomm_init=0" || echo "exit_code_hci_qcomm_init=1")
case $exit_code_hci_qcomm_init in
0) logi "Bluetooth QSoC firmware download succeeded, $BTS_DEVICE $BTS_TYPE $BTS_BAUD $BTS_ADDRESS";;
*) failed "Bluetooth QSoC firmware download failed" $exit_code_hci_qcomm_init;;
esac
# init does SIGTERM on ctl.stop for service
trap "kill_hciattach" TERM INT
case $TRANSPORT in
"smd")
logi "Seting property to insert the hci smd transport module"
setprop bt.hci_smd.driver.load 1
;;
*)
logi "start hciattach"
start_hciattach
wait $hciattach_pid
logi "Bluetooth stopped"
;;
esac
exit 0

View File

@@ -0,0 +1,88 @@
#!/system/bin/sh
# Copyright (c) 2009-2010, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
LOG_TAG="qcom-bt-wlan-coex"
LOG_NAME="${0}:"
coex_pid=""
loge ()
{
/system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
}
logi ()
{
/system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
}
failed ()
{
loge "$1: exit code $2"
exit $2
}
start_coex ()
{
# Must have -o turned on to avoid daemon (otherwise we cannot get pid)
/system/bin/btwlancoex -o $opt_flags &
coex_pid=$!
logi "start_coex: pid = $coex_pid"
}
kill_coex ()
{
logi "kill_coex: pid = $coex_pid"
kill -TERM $coex_pid
# this shell doesn't exit now -- wait returns for normal exit
}
# mimic coex options parsing -- maybe a waste of effort
USAGE="${0} [-o] [-c] [-r] [-i] [-h]"
while getopts "ocrih" f
do
case $f in
o | c | r | i | h) opt_flags="$opt_flags -$f" ;;
\?) echo $USAGE; exit 1;;
esac
done
# init does SIGTERM on ctl.stop for service
trap "kill_coex" TERM INT
# Build settings may not produce the coex executable
if ls /system/bin/btwlancoex
then
start_coex
wait $coex_pid
logi "Coex stopped"
else
logi "btwlancoex not available"
fi
exit 0

View File

@@ -0,0 +1,109 @@
#!/system/bin/sh
# Copyright (c) 2009-2011, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
setprop hw.fm.init 0
mode=`getprop hw.fm.mode`
version=`getprop hw.fm.version`
isAnalog=`getprop hw.fm.isAnalog`
#find the transport type
TRANSPORT=`getprop ro.qualcomm.bt.hci_transport`
LOG_TAG="qcom-fm"
LOG_NAME="${0}:"
loge ()
{
/system/bin/log -t $LOG_TAG -p e "$LOG_NAME $@"
}
logi ()
{
/system/bin/log -t $LOG_TAG -p i "$LOG_NAME $@"
}
failed ()
{
loge "$1: exit code $2"
exit $2
}
logi "In FM shell Script"
logi "mode: $mode"
logi "isAnalog: $isAnalog"
logi "Transport : $TRANSPORT"
#if it is smd transport insert the transport module and exit from the script
case $TRANSPORT in
"smd")
echo "inserting the radio transport module"
insmod /system/lib/modules/radio-iris-transport.ko
setprop hw.fm.init 1
exit 0
;;
*)
logi "not a smd transport case, need patch download"
;;
esac
#$fm_qsoc_patches <fm_chipVersion> <enable/disable WCM>
#
case $mode in
"normal")
/system/bin/fm_qsoc_patches $version 0
;;
"wa_enable")
/system/bin/fm_qsoc_patches $version 1
;;
"wa_disable")
/system/bin/fm_qsoc_patches $version 2
;;
"config_dac")
/system/bin/fm_qsoc_patches $version 3 $isAnalog
;;
*)
logi "Shell: Default case"
/system/bin/fm_qsoc_patches $version 0
;;
esac
exit_code_fm_qsoc_patches=$?
case $exit_code_fm_qsoc_patches in
0)
logi "FM QSoC calibration and firmware download succeeded"
;;
*)
failed "FM QSoC firmware download and/or calibration failed" $exit_code_fm_qsoc_patches
;;
esac
setprop hw.fm.init 1
exit 0

View File

@@ -0,0 +1,169 @@
#!/system/bin/sh
# Copyright (c) 2009-2011, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
target=`getprop ro.product.device`
case "$target" in
"msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_surf" | "msm7627a" | \
"qsd8250_surf" | "qsd8250_ffa" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "qsd8650a_st1x")
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
chown -h system /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
;;
esac
case "$target" in
"msm7201a_ffa" | "msm7201a_surf")
echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
;;
esac
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
echo 75000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 1 > /sys/module/pm2/parameters/idle_sleep_mode
;;
esac
case "$target" in
"msm7201a_ffa" | "msm7201a_surf" | "msm7627_ffa" | "msm7627_surf" | "msm7630_surf" | "msm7630_1x" | "msm7630_fusion" | "msm7627a" )
echo 245760 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
;;
esac
case "$target" in
"msm8660_surf" | "msm8660_csfb")
echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache
echo 1 > /sys/module/rpm_resources/enable_low_power/pxo
echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_dig
echo 2 > /sys/module/rpm_resources/enable_low_power/vdd_mem
echo 1 > /sys/module/rpm_resources/enable_low_power/rpm_cpu
echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 50000 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 90 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
chown -h system /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
chown -h system /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown -h root.system /sys/devices/system/cpu/mfreq
chmod -h 220 /sys/devices/system/cpu/mfreq
chown -h root.system /sys/devices/system/cpu/cpu1/online
chmod -h 664 /sys/devices/system/cpu/cpu1/online
;;
esac
case "$target" in
"msm8960")
echo 1 > /sys/module/rpm_resources/enable_low_power/L2_cache
echo 1 > /sys/module/rpm_resources/enable_low_power/pxo
echo 1 > /sys/module/pm_8x60/modes/cpu0/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/suspend_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu0/standalone_power_collapse/idle_enabled
echo 1 > /sys/module/pm_8x60/modes/cpu1/standalone_power_collapse/idle_enabled
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "ondemand" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
echo 50000 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
echo 90 > /sys/devices/system/cpu/cpu1/cpufreq/ondemand/up_threshold
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
echo 4 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
chown -h system /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
chown -h system /sys/devices/system/cpu/cpu1/cpufreq/ondemand/sampling_rate
echo 384000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 384000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
chown -h system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
chown -h system /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
chown -h root.system /sys/devices/system/cpu/mfreq
chmod -h 220 /sys/devices/system/cpu/mfreq
chown -h root.system /sys/devices/system/cpu/cpu1/online
chmod -h 664 /sys/devices/system/cpu/cpu1/online
;;
esac
case "$target" in
"msm7627_ffa" | "msm7627_surf" | "msm7627a")
echo 25000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
;;
esac
case "$target" in
"qsd8250_surf" | "qsd8250_ffa" | "qsd8650a_st1x")
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
;;
esac
case "$target" in
"qsd8650a_st1x")
mount -t debugfs none /sys/kernel/debug
;;
esac
emmc_boot=`getprop ro.emmc`
case "$emmc_boot"
in "1")
chown -h system /sys/devices/platform/rs300000a7.65536/force_sync
chown -h system /sys/devices/platform/rs300000a7.65536/sync_sts
chown -h system /sys/devices/platform/rs300100a7.65536/force_sync
chown -h system /sys/devices/platform/rs300100a7.65536/sync_sts
;;
esac
# Post-setup services
case "$target" in
"msm8660_surf" | "msm8660_csfb" | "msm8960")
start mpdecision
;;
esac
case "$target" in
"msm8660_surf" | "msm8660_csfb")
start thermald
;;
esac

View File

@@ -0,0 +1,395 @@
# Copyright (c) 2009-2011, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
on boot-pause
exec system/bin/battery_charging
on boot
mkdir /data/misc/bluetooth 0770 bluetooth bluetooth
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/type
chown bluetooth bluetooth /sys/class/rfkill/rfkill0/state
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
chown system system /sys/module/sco/parameters/disable_esco
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /sys/class/rfkill/rfkill0/state
chmod 0660 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth /dev/ttyHS0
chmod 0660 /dev/ttyHS0
chown bluetooth bluetooth /sys/devices/platform/msm_serial_hs.0/clock
chmod 0660 /sys/devices/platform/msm_serial_hs.0/clock
# 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/wifi/wpa_supplicant 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
chown dhcp dhcp /data/misc/dhcp
setprop wifi.interface wlan0
# Create the symlink to qcn wpa_supplicant folder for ar6000 wpa_supplicant
mkdir /data/system 0775 system system
symlink /data/misc/wifi/wpa_supplicant /data/system/wpa_supplicant
# Enable Bluetooth 802.11 PAL when Bluetooth is turned on
setprop ro.config.bt.amp no
# Create directories for wiper services
mkdir /data/wpstiles/ 0777 shell
mkdir /data/wiper 0777 location qcom_oncrpc
# Create directories for gpsone_daemon services
mkdir /data/misc/gpsone_d 0770 gpsone_d qcom_oncrpc
# Create directory from IMS services
mkdir /data/shared 0777
#Set SUID bit for usbhub
chmod 4755 /system/bin/usbhub
chmod 755 /system/bin/usbhub_init
#Set SUID bit for btwlancoex
chmod 4755 /system/bin/btwlancoex
#Set SUID bit for iproute2 ip tool
chmod 4755 /system/bin/ip
#Provide the access to hostapd.conf only to root and group
chmod 0660 /data/hostapd/hostapd.conf
#port-bridge
chmod 0660 /dev/smd0
chown system system /dev/smd0
chmod 0660 /dev/ttyGS0
chown system system /dev/ttyGS0
chmod 0444 /sys/devices/platform/msm_hsusb/gadget/usb_state
# Remove write permissions to video related nodes
chmod 0664 /sys/devices/virtual/graphics/fb1/hpd
chmod 0664 /sys/devices/virtual/graphics/fb1/video_mode
chmod 0664 /sys/devices/virtual/graphics/fb1/format_3d
# Change owner and group for media server and surface flinger
chown media system /sys/devices/virtual/graphics/fb1/format_3d
#For netmgr daemon to inform the USB driver of the correct transport
chown radio radio /sys/class/usb_composite/rmnet_smd_sdio/transport
#To allow interfaces to get v6 address when tethering is enabled
write /proc/sys/net/ipv6/conf/rmnet0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet3/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet4/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet5/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet6/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet7/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio0/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio1/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio2/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio3/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio4/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio5/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio6/accept_ra 2
write /proc/sys/net/ipv6/conf/rmnet_sdio7/accept_ra 2
# Export GPIO56 for fusion targets to enable/disable hub
service usbhub_init /system/bin/usbhub_init
user root
disabled
oneshot
on property:ro.product.device=msm7630_fusion
start usbhub_init
on property:init.svc.wpa_supplicant=stopped
stop dhcpcd
on property:init.svc.bluetoothd=running
start btwlancoex
start amp_load
on property:init.svc.bluetoothd=stopped
start amp_unload
stop btwlancoex
on property:persist.cne.UseCne=none
stop cnd
service cnd /system/bin/cnd
socket cnd stream 660 root radio
service rmt_storage /system/bin/rmt_storage /dev/block/mmcblk0p10 /dev/block/mmcblk0p11 /dev/block/mmcblk0p17
user root
disabled
on property:ro.emmc=1
start rmt_storage
service hciattach /system/bin/sh /system/etc/init.qcom.bt.sh
user bluetooth
group qcom_oncrpc bluetooth net_bt_admin
disabled
oneshot
on property:bt.hci_smd.driver.load=1
insmod /system/lib/modules/hci_smd.ko
on property:bt.hci_smd.driver.load=0
exec /system/bin/rmmod hci_smd.ko
service bt-dun /system/bin/dun-server /dev/smd7 /dev/rfcomm0
disabled
oneshot
service bt-sap /system/bin/sapd 15
disabled
oneshot
service sapd /system/bin/sdptool add --channel=15 SAP
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service dund /system/bin/sdptool add --channel=1 DUN
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service bridgemgrd /system/bin/bridgemgrd
user radio
group radio
disabled
service port-bridge /system/bin/port-bridge /dev/smd0 /dev/ttyGS0
user system
group system inet
disabled
on property:ro.baseband="msm"
start port-bridge
# Enable BT-DUN only for all msms
setprop ro.qualcomm.bluetooth.dun true
on property:ro.baseband="unknown"
start port-bridge
service qmiproxy /system/bin/qmiproxy
user radio
group radio
disabled
service qmuxd /system/bin/qmuxd
user radio
group radio
disabled
service netmgrd /system/bin/netmgrd
disabled
service sensors /system/bin/sensors.qcom
user root
group root
disabled
on property:ro.use_data_netmgrd=false
# netmgr not supported on specific target
stop netmgrd
# Adjust socket buffer to enlarge TCP receive window for high bandwidth
# but only if ro.data.large_tcp_window_size property is set.
on property:ro.data.large_tcp_window_size=true
write /proc/sys/net/ipv4/tcp_adv_win_scale 1
service btwlancoex /system/bin/sh /system/etc/init.qcom.coex.sh
user shell
group bluetooth net_bt_admin
disabled
oneshot
service amp_init /system/bin/amploader -i
user root
disabled
oneshot
service amp_load /system/bin/amploader -l 7000
user root
disabled
oneshot
service amp_unload /system/bin/amploader -u
user root
disabled
oneshot
service wpa_supplicant /system/bin/logwrapper /system/bin/wpa_supplicant -Dwext -iwlan0 -c/data/misc/wifi/wpa_supplicant.conf -dd
user root
group wifi inet
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service dhcpcd_wlan0 /system/bin/dhcpcd -BKLG wlan0
disabled
oneshot
service wiperiface /system/bin/wiperiface
user location
group qcom_oncrpc
oneshot
service gpsone_daemon /system/bin/gpsone_daemon
user root
group qcom_oncrpc
disabled
service fm_dl /system/bin/sh /system/etc/init.qcom.fm.sh
user root
group system qcom_oncrpc
disabled
oneshot
on property:crypto.driver.load=1
insmod /system/lib/modules/qce.ko
insmod /system/lib/modules/qcedev.ko
on property:crypto.driver.load=0
exec /system/bin/rmmod qcedev.ko
exec /system/bin/rmmod qce.ko
service drmdiag /system/bin/drmdiagapp
user root
disabled
oneshot
on property:drmdiag.load=1
start drmdiag
on property:drmdiag.load=0
stop drmdiag
service qcom-sh /system/bin/sh /init.qcom.sh
user root
oneshot
service qcom-post-boot /system/bin/sh /system/etc/init.qcom.post_boot.sh
user root
disabled
oneshot
service qcom-wifi /system/bin/sh /system/etc/init.qcom.wifi.sh
oneshot
on property:init.svc.bootanim=stopped
start qcom-post-boot
service atfwd /system/bin/ATFWD-daemon
user system
group system radio
onrestart /system/bin/log -t RIL-ATFWD -p w "ATFWD daemon restarted"
service hdmid /system/bin/hdmid
socket hdmid stream 0660 root system graphics
disabled
on property:ro.hdmi.enable=true
start hdmid
service abld /system/bin/mm-abl-daemon
disabled
service hostapd /system/bin/hostapd -dddd /data/hostapd/hostapd.conf
user root
group root
oneshot
disabled
service ds_fmc_appd /system/bin/ds_fmc_appd -p "rmnet0" -D
group radio
disabled
oneshot
on property:persist.data.ds_fmc_app.mode=1
start ds_fmc_appd
service ims_regmanager /system/bin/exe-ims-regmanagerprocessnative
user system
group qcom_oncrpc net_bt_admin inet radio wifi
disabled
on property:persist.ims.regmanager.mode=1
start ims_regmanager
on property:ro.data.large_tcp_window_size=true
# Adjust socket buffer to enlarge TCP receive window for high bandwidth (e.g. DO-RevB)
write /proc/sys/net/ipv4/tcp_adv_win_scale 1
service thermald /system/bin/thermald
user root
group root
disabled
on property:persist.thermal.monitor=true
start thermald
service time_daemon /system/bin/time_daemon
user root
group root
oneshot
disabled
on property:persist.timed.enable=true
mkdir /data/time/ 0700
start time_daemon
service ftp /system/bin/sdptool add --psm=5257 --channel=20 FTP
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service map /system/bin/sdptool add --channel=16 MAS
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service ril-daemon1 /system/bin/rild -c 1
socket rild1 stream 660 root radio
socket rild-debug1 stream 660 radio system
user root
disabled
group radio cache inet misc audio sdcard_rw qcom_oncrpc diag
service profiler_daemon /system/bin/profiler_daemon
user root
group root
disabled

View File

@@ -0,0 +1,72 @@
#!/system/bin/sh
# Copyright (c) 2010, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# For successful WLAN card detection, WLAN needs SDIO polling turned on.
# This script can be used to turn on/off SDIO polling on appropriate
# SDIO slot on the MSM target (e.g. slot 3 on 7x30 surf).
arg=$1
target=`getprop ro.product.device`
case "$target" in
"msm7627_surf")
echo "$arg" > /sys/devices/platform/msm_sdcc.1/polling
echo "$arg" > /sys/devices/platform/msm_sdcc.2/polling
;;
"msm7627_ffa")
echo "$arg" > /sys/devices/platform/msm_sdcc.2/polling
;;
"msm7627a")
echo "$arg" > /sys/devices/platform/msm_sdcc.2/polling
;;
"msm7630_surf")
echo "$arg" > /sys/devices/platform/msm_sdcc.3/polling
;;
"msm7630_1x")
echo "$arg" > /sys/devices/platform/msm_sdcc.3/polling
;;
"msm7630_fusion")
echo "$arg" > /sys/devices/platform/msm_sdcc.3/polling
;;
"msm8660_surf")
echo "$arg" > /sys/devices/platform/msm_sdcc.4/polling
;;
"msm8660_csfb")
echo "$arg" > /sys/devices/platform/msm_sdcc.4/polling
;;
esac
exit 0

View File

@@ -0,0 +1,218 @@
#!/system/bin/sh
# Copyright (c) 2009-2010, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
#
# start ril-daemon only for targets on which radio is present
#
baseband=`getprop ro.baseband`
multirild=`getprop ro.multi.rild`
dsds=`getprop persist.dsds.enabled`
case "$baseband" in
"msm" | "csfb" | "svlte2a" | "unknown")
start ril-daemon
start qmuxd
start netmgrd
case "$baseband" in
"svlte2a" | "csfb")
start qmiproxy
esac
case "$multirild" in
"true")
case "$dsds" in
"true")
start ril-daemon1
esac
esac
esac
#
# Allow unique persistent serial numbers for devices connected via usb
# User needs to set unique usb serial number to persist.usb.serialno
#
serialno=`getprop persist.usb.serialno`
case "$serialno" in
"") ;; #Do nothing here
* )
mount -t debugfs none /sys/kernel/debug
echo "$serialno" > /sys/kernel/debug/android/serial_number
esac
#
# Allow persistent usb charging disabling
# User needs to set usb charging disabled in persist.usb.chgdisabled
#
target=`getprop ro.product.device`
usbchgdisabled=`getprop persist.usb.chgdisabled`
case "$usbchgdisabled" in
"") ;; #Do nothing here
* )
case $target in
"msm8660_surf" | "msm8660_csfb")
echo "$usbchgdisabled" > /sys/module/pmic8058_charger/parameters/disabled
echo "$usbchgdisabled" > /sys/module/smb137b/parameters/disabled
;;
"msm8960")
echo "$usbchgdisabled" > /sys/module/pm8921_charger/parameters/disabled
;;
esac
esac
#
# Start gpsone_daemon for SVLTE Type I & II devices
#
case "$target" in
"msm7630_fusion")
start gpsone_daemon
esac
case "$baseband" in
"svlte2a")
start gpsone_daemon
start bridgemgrd
esac
case "$target" in
"msm7630_surf" | "msm7630_1x" | "msm7630_fusion")
insmod /system/lib/modules/ss_mfcinit.ko
insmod /system/lib/modules/ss_vencoder.ko
insmod /system/lib/modules/ss_vdecoder.ko
chmod -h 0666 /dev/ss_mfc_reg
chmod -h 0666 /dev/ss_vdec
chmod -h 0666 /dev/ss_venc
value=`cat /sys/devices/system/soc/soc0/hw_platform`
case "$value" in
"FFA" | "SVLTE_FFA")
# linking to surf_keypad_qwerty.kcm.bin instead of surf_keypad_numeric.kcm.bin so that
# the UI keyboard works fine.
ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin;;
"Fluid")
setprop ro.sf.lcd_density 240
setprop qcom.bt.dev_power_class 2
start profiler_daemon;;
*)
ln -s /system/usr/keychars/surf_keypad_qwerty.kcm.bin /system/usr/keychars/surf_keypad.kcm.bin;;
esac
# Dynamic Memory Managment (DMM) provides a sys file system to the userspace
# that can be used to plug in/out memory that has been configured as unstable.
# This unstable memory can be in Active or In-Active State.
# Each of which the userspace can request by writing to a sys file.
# ro.dev.dmm = 1; Indicates that DMM is enabled in the Android User Space. This
# property is set in the Android system properties file.
# ro.dev.dmm.dpd.start_address is set when the target has a 2x256Mb memory
# configuration. This is also used to indicate that the target is capable of
# setting EBI-1 to Deep Power Down or Self Refresh.
mem="/sys/devices/system/memory"
op=`cat $mem/movable_start_bytes`
case "$op" in
"0" )
log -p i -t DMM DMM Disabled. movable_start_bytes not set: $op
;;
"$mem/movable_start_bytes: No such file or directory " )
log -p i -t DMM DMM Disabled. movable_start_bytes does not exist: $op
;;
* )
log -p i -t DMM DMM available. movable_start_bytes at $op
movable_start_bytes=0x`cat $mem/movable_start_bytes`
block_size_bytes=0x`cat $mem/block_size_bytes`
block=$(($movable_start_bytes/$block_size_bytes))
echo $movable_start_bytes > $mem/probe
case "$?" in
"0" )
log -p i -t DMM $movable_start_bytes to physical hotplug succeeded.
;;
* )
log -p e -t DMM $movable_start_bytes to physical hotplug failed.
return 1
;;
esac
chown -h system system $mem/memory$block/state
echo online > $mem/memory$block/state
case "$?" in
"0" )
log -p i -t DMM \'echo online\' to logical hotplug succeeded.
;;
* )
log -p e -t DMM \'echo online\' to logical hotplug failed.
return 1
;;
esac
setprop ro.dev.dmm.dpd.start_address $movable_start_bytes
setprop ro.dev.dmm.dpd.block $block
;;
esac
op=`cat $mem/low_power_memory_start_bytes`
case "$op" in
"0" )
log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes not set:$op
;;
"$mem/low_power_memory_start_bytes No such file or directory " )
log -p i -t DMM Self-Refresh-Only Disabled. low_power_memory_start_bytes does not exist:$op
;;
* )
log -p i -t DMM Self-Refresh-Only available. low_power_memory_start_bytes at $op
;;
esac
;;
"msm8660_surf" | "msm8660_csfb" )
platformvalue=`cat /sys/devices/system/soc/soc0/hw_platform`
case "$platformvalue" in
"Fluid")
echo 1 > /data/system/sensors/settings
start sensors
setprop ro.sf.lcd_density 240
start profiler_daemon;;
esac
chown -h root.system /sys/devices/platform/msm_hsusb/gadget/wakeup
chmod -h 220 /sys/devices/platform/msm_hsusb/gadget/wakeup
;;
"msm7627a" )
chown -h root.system /sys/devices/platform/msm_hsusb/gadget/wakeup
chmod -h 220 /sys/devices/platform/msm_hsusb/gadget/wakeup
;;
"msm8960")
echo 1 > /data/system/sensors/settings
start sensors
chown -h root.system /sys/devices/platform/msm_otg/msm_hsusb/gadget/wakeup
chmod -h 220 /sys/devices/platform/msm_otg/msm_hsusb/gadget/wakeup
;;
esac

View File

@@ -0,0 +1,156 @@
#!/system/bin/sh
# Copyright (c) 2010-2011, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of The Linux Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# This script will load and unload the wifi driver to put the wifi in
# in deep sleep mode so that there won't be voltage leakage.
# Loading/Unloading the driver only incase if the Wifi GUI is not going
# to Turn ON the Wifi. In the Script if the wlan driver status is
# ok(GUI loaded the driver) or loading(GUI is loading the driver) then
# the script won't do anything. Otherwise (GUI is not going to Turn On
# the Wifi) the script will load/unload the driver
# This script will get called after post bootup.
target=`getprop ro.product.device`
case "$target" in
msm8960*)
# We need to make sure the WCNSS platform driver is running.
# The WCNSS platform driver can either be built as a loadable
# module or it can be built-in to the kernel. If it is built
# as a loadable module it can have one of several names. So
# look to see if an appropriately named kernel module is
# present
wcnssmod=`ls /system/lib/modules/wcnss*.ko`
case "$wcnssmod" in
*wcnss*)
# A kernel module is present, so load it
insmod $wcnssmod
;;
*)
# A kernel module is not present so we assume the
# driver is built-in to the kernel. If that is the
# case then the driver will export a file which we
# must touch so that the driver knows that userspace
# is ready to handle firmware download requests. See
# if an appropriately named device file is present
wcnssnode=`ls /dev/wcnss*`
case "$wcnssnode" in
*wcnss*)
# There is a device file. Write to the file
# so that the driver knows userspace is
# available for firmware download requests
echo 1 > $wcnssnode
;;
*)
# There is not a kernel module present and
# there is not a device file present, so
# the driver must not be available
echo "No WCNSS module or device node detected"
;;
esac
;;
esac
;;
msm8660*)
exit 0
;;
msm7627a*)
wlanchip=`cat /persist/wlan_chip_id`
echo "The WLAN Chip ID is $wlanchip"
case "$wlanchip" in
"AR6003")
rm /system/lib/modules/wlan.ko
ln -s /system/wifi/ar6000.ko /system/lib/modules/wlan.ko
mv /system/bin/wpa_supplicant /system/bin/wpa_supplicant_wcn
ln -s /system/others/wpa_supplicant /system/bin/wpa_supplicant
;;
*)
echo "********************************************************************"
echo "*** Error:WI-FI chip ID is not specified in /persist/wlan_chip_id **"
echo "******* WI-FI may not work ***********************************"
;;
esac
;;
msm7630*)
wifishd=`getprop wlan.driver.status`
wlanchip=`cat /persist/wlan_chip_id`
echo "The WLAN Chip ID is $wlanchip"
case "$wlanchip" in
"WCN1314")
ln -s /system/lib/modules/volans/WCN1314_rf.ko /system/lib/modules/wlan.ko
;;
"WCN1312")
ln -s /system/lib/modules/libra/libra.ko /system/lib/modules/wlan.ko
ln -s /data/hostapd/qcom_cfg.ini /etc/firmware/wlan/qcom_cfg.ini
ln -s /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
;;
*)
echo "********************************************************************"
echo "*** Error:WI-FI chip ID is not specified in /persist/wlan_chip_id **"
echo "******* WI-FI may not work ***********************************"
;;
esac
case "$wifishd" in
"ok")
;;
"loading")
;;
*)
case "$wlanchip" in
"WCN1314")
;;
"WCN1312")
/system/bin/amploader -i
;;
*)
;;
esac
esac
;;
msm7627*)
ln -s /data/hostapd/qcom_cfg.ini /etc/firmware/wlan/qcom_cfg.ini
ln -s /persist/qcom_wlan_nv.bin /etc/firmware/wlan/qcom_wlan_nv.bin
wifishd=`getprop wlan.driver.status`
case "$wifishd" in
"ok")
;;
"loading")
;;
*)
# For the new .38 kernel for 1312, there was an FFA panic
# when no 1312/1314 chip was present. Hence this is commented out
# Will need to reenable this code for 1312.
#
# /system/bin/amploader -i
;;
esac
;;
*)
;;
esac
exit 0

View File

@@ -0,0 +1,322 @@
#!/system/bin/sh
atdev=/dev/omap_csmi_tty0
pppdev=/dev/omap_csmi_tty1
n1=`cat /data/phoneentry1 2>/dev/null`
n2=`cat /data/phoneentry2 2>/dev/null`
n3=`cat /data/phoneentry3 2>/dev/null`
n1=${n1:-"*#06#"}
n2=${n2:-"*#06#"}
n3=${n3:-"*#06#"}
phoneoutputpid=
eventoutputpid=
notifypid=
notifytoggle=false
pppdpid=
powerdidletime=120
# map phone specific keys
setkey -k 0xe4 -v 0x23 # map #
setkey -k 0xe3 -v 0x2a # map *
setkey -k 231 -v 513 # map send to newline
#setkey -k 0x67 -v 0x20b # map up to scroll back
#setkey -k 0x6c -v 0x20a # map down to scroll forward
setkey -k 0x73 -v 0x20b # map volume up to scroll back
setkey -k 0x72 -v 0x20a # map volume down to scroll forward
setkey -k 0x60 -v 0x211 # map PoC to next console
# tuttle keys
setkey -k 0x38 -v 0x703 # map leftalt to alt
setkey -k 0x9b -v 0x703 # map mail to alt
setkey -t 8 -k 0x9b -v 0x703 # map alt-mail to alt
setkey -t 8 -k 0x10 -v 0x21 # map alt-q to !
setkey -t 8 -k 0x11 -v 0x31 # map alt-w to 1
setkey -t 8 -k 0x12 -v 0x32 # map alt-e to 2
setkey -t 8 -k 0x13 -v 0x33 # map alt-r to 3
setkey -t 8 -k 0x14 -v 0x2b # map alt-t to +
setkey -t 8 -k 0x15 -v 0x28 # map alt-y to (
setkey -t 8 -k 0x16 -v 0x29 # map alt-u to )
setkey -t 8 -k 0x17 -v 0x2d # map alt-i to -
setkey -t 8 -k 0x18 -v 0x5f # map alt-o to _
setkey -t 8 -k 0x19 -v 0x22 # map alt-p to "
setkey -t 8 -k 0x1e -v 0x23 # map alt-a to #
setkey -t 8 -k 0x1f -v 0x34 # map alt-s to 4
setkey -t 8 -k 0x20 -v 0x35 # map alt-d to 5
setkey -t 8 -k 0x21 -v 0x36 # map alt-f to 6
setkey -t 8 -k 0x22 -v 0x2f # map alt-g to /
setkey -t 8 -k 0x23 -v 0x3f # map alt-h to ?
setkey -t 8 -k 0x24 -v 0xa3 # map alt-j to pound
setkey -t 8 -k 0x25 -v 0x24 # map alt-k to $
setkey -t 8 -k 0x2c -v 0x2a # map alt-z to *
setkey -t 8 -k 0x2d -v 0x37 # map alt-x to 7
setkey -t 8 -k 0x2e -v 0x38 # map alt-c to 8
setkey -t 8 -k 0x2f -v 0x39 # map alt-v to 9
setkey -t 8 -k 0x30 -v 0x7c # map alt-b to |
setkey -t 8 -k 0x31 -v 0x40 # map alt-n to @
setkey -t 8 -k 0x32 -v 0x3d # map alt-m to =
setkey -t 8 -k 0x33 -v 0x3b # map alt-, to ;
setkey -t 8 -k 0x34 -v 0x3a # map alt-. to :
setkey -t 8 -k 0x0f -v 0x30 # map alt-tab to 0
setkey -t 8 -k 0x67 -v 0x20b # map alt-up to scroll back
setkey -t 8 -k 0x6c -v 0x20a # map alt-down to scroll forward
while true
do
echo
echo "------------------------------"
echo " 1: init commands"
echo " 2: call commands"
echo " 3: misc phone"
echo " 4: phone debug output"
echo " 5: test data connection"
echo " 6: start runtime"
echo " 7: start runtime w/output"
echo " 8: stop runtime"
echo " 9: misc"
echo -n ": "
while true
do
c=`readtty -t 50 -f -a 1234567890#`
case "$c" in
"" ) ;;
* ) break;
esac
done
echo Got key -$c-
case $c in
"1" )
while true; do
echo
echo "------------------------------"
echo " 1: Print phone output"
echo " 2: ATQ0V1E1+CMEE=2;+CREG=0"
echo " 3: AT+CFUN=1"
echo " 4: AT+COPS=0"
echo " 5: AT+CREG?"
echo " 6: Stop phone output"
echo " 0: back"
echo -n ": "
c=`readtty -f -a 1234560#`
echo Got key -$c-
case "$c" in
"1" ) kill $phoneoutputpid; cat $atdev & phoneoutputpid=$! ;;
"2" ) echo -e "ATQ0V1E1+CMEE=2;+CREG=0\r" >$atdev;;
"3" ) echo -e "AT+CFUN=1\r" >$atdev;;
"4" ) echo -e "AT+COPS=0\r" >$atdev;;
"5" ) echo -e "AT+CREG?\r" >$atdev;;
"6" ) kill $phoneoutputpid; phoneoutputpid= ;;
"0" ) break;;
esac
done
;;
"2" )
while true; do
echo
echo "------------------------------"
echo " 1: Dial: ATD $n1;"
echo " 2: Dial: ATD $n2;"
echo " 3: Dial: ATD $n3;"
echo " 4: Set number for 1"
echo " 5: Set number for 2"
echo " 6: Set number for 3"
echo " 7: Dial: ATD ...;"
echo " 8: Hang up: ATH"
echo " 9: Answer: ATA"
echo " 0: back"
echo -n ": "
c=`readtty -f -a 1234567890#`
echo Got key -$c-
case "$c" in
"1" ) echo "Dialing $n1"; echo -e "ATD $n1;\r" >$atdev;;
"2" ) echo "Dialing $n2"; echo -e "ATD $n2;\r" >$atdev;;
"3" ) echo "Dialing $n3"; echo -e "ATD $n3;\r" >$atdev;;
"4" ) echo -n "Number: "; read n1; echo $n1 >/data/phoneentry1;;
"5" ) echo -n "Number: "; read n2; echo $n2 >/data/phoneentry2;;
"6" ) echo -n "Number: "; read n3; echo $n3 >/data/phoneentry3;;
"7" ) echo -n "Number: "; read n; echo "Dialing $n"; echo -e "ATD $n;\r" >$atdev;;
"8" ) echo -e "ATH\r" >$atdev;;
"9" ) echo -e "ATA\r" >$atdev;;
"0" ) break;;
esac
done
;;
"3" )
while true; do
echo
echo "------------------------------"
echo " 1: Save FFS data"
echo " 2: Load user FFS data"
echo " 3: Load system FFS data"
echo " 4: Reset FFS data"
echo " 5: Set uplink gain"
echo " 6: Set echo"
echo " 7: cat /dev/omap_csmi_battery_t"
echo " 8: cat /dev/omap_csmi_htc"
echo " 0: back"
echo -n ": "
c=`readtty -f -a 123456780#`
echo Got key -$c-
case "$c" in
"1" ) cat /dev/omap_csmi_ffs >/data/ffsdata;;
"2" ) cat /data/ffsdata >/dev/omap_csmi_ffs;;
"3" ) cat /system/ffsdata >/dev/omap_csmi_ffs;;
"4" ) echo - >/dev/omap_csmi_ffs;;
"5" )
echo -n "Gain: "; read g;
echo gu$g >/tmp/gain;
cat /tmp/gain 2>/dev/null >/dev/omap_csmi_audio_tes
;;
"6" )
echo -n "Echo param (hex): "; read e;
echo "e0x$e" >/tmp/echo;
cat /tmp/echo 2>/dev/null >/dev/omap_csmi_audio_tes
;;
"7" ) cat /dev/omap_csmi_battery_t;;
"8" ) cat /dev/omap_csmi_htc;;
"0" ) break;;
esac
done
;;
"4" )
while true; do
echo
echo "------------------------------"
echo " 1: Toggle debug I/O"
echo " 2: Toggle debug Flow"
echo " 3: Toggle debug Interrupt"
echo " 4: Toggle debug Info"
echo " 5: Toggle GSM run state"
echo " 6: Clear GSM data area"
echo " 0: back"
echo -n ": "
c=`readtty -f -a 1234560#`
echo Got key -$c-
case "$c" in
"1" ) echo -n "i" >/sys/devices/system/omap_csmi/debug;;
"2" ) echo -n "f" >/sys/devices/system/omap_csmi/debug;;
"3" ) echo -n "I" >/sys/devices/system/omap_csmi/debug;;
"4" ) echo -n "F" >/sys/devices/system/omap_csmi/debug;;
"5" ) echo -n "s" >/sys/devices/system/omap_csmi/debug;;
"6" ) echo -n "c" >/sys/devices/system/omap_csmi/debug;;
"0" ) break;;
esac
done
;;
"5" )
while true; do
echo
echo "------------------------------"
echo " 1: Start pppd - userspace"
echo " 2: Start pppd - kernel"
echo " 3: Start pppd - kernel <at1"
echo " 4: Configure ppp data to at2"
echo " 5: Test with HTTP GET"
echo " 6: Kill pppd"
echo " 0: back"
echo -n ": "
c=`readtty -f -a 1234560#`
echo Got key -$c-
case "$c" in
"1" ) kill $pppdpid; pppd notty < $pppdev > $pppdev & pppdpid=$!;;
"2" ) kill $pppdpid; pppd nodetach $pppdev & pppdpid=$!;;
"3" ) kill &pppdpid; pppd nodetach $pppdev connect "sh -c \"chat -v -f /etc/ppp/connect-data <$atdev >$atdev\"" & pppdpid=$!;;
"4" ) echo -e 'AT%DATA=2,"UART",1,,"SER","UART",0\r' >$atdev;;
"5" ) test-data-connection;;
"6" ) kill $pppdpid; pppdpid=;;
"0" ) break;;
esac
done
;;
"6" )
echo
echo ------------------------
echo Starting android runtime
echo ------------------------
start
;;
"7" )
echo
echo ------------------------
echo Starting android runtime
echo ------------------------
if exists /data/singleproc
then
single_process="-s"
else
single_process=""
fi
start runtime $single_process
;;
"8" )
stop
;;
"9" )
while true; do
echo
echo "------------------------------"
echo " 1: Print events"
echo " 2: Stop event output"
if $notifytoggle
then
echo " 3: stop notify"
else
echo " 3: notify /sys/android_power"
fi
echo " 4: start powerd"
echo " 5: start powerd verbose"
echo " 6: stop powerd"
echo " 7: set powerd idletime ($powerdidletime)"
echo " 8: start multitap shell"
if exists /data/singleproc
then
echo " 9: enable multiprocess"
else
echo " 9: disable multiprocess"
fi
echo " c: start shell"
echo " 0: back"
echo -n ": "
c=`readtty -f -a 1234567890c#`
echo Got key -$c-
case "$c" in
"1" ) kill $eventoutputpid; getevent & eventoutputpid=$! ;;
"2" ) kill $eventoutputpid; eventoutputpid= ;;
"3" )
if $notifytoggle
then
kill $notifypid
notifypid=
notifytoggle=false
else
kill $notifypid
notify -m 0x00000002 -c 0 -p -v 0 -w 30 /sys/android_power &
notifypid=$!
notifytoggle=true
fi
;;
"4" ) start powerd -i $powerdidletime ;;
"5" ) start powerd -i $powerdidletime -v ;;
"6" ) stop powerd ;;
"7" ) echo -n "Idle time (seconds): "; read powerdidletime ;;
"8" )
readtty -f -p -t 10 -e "[ ~" | sh -i
;;
"9" )
if exists /data/singleproc
then
echo "Enabling multiprocess environment."
rm /data/singleproc
else
echo "Disabling multiprocess environment."
echo >/data/singleproc "true"
fi
;;
"c" ) sh -i <>/dev/tty0 1>&0 2>&1 ;;
"0" ) break;;
esac
done
;;
esac
done

View File

@@ -0,0 +1,19 @@
## mountd configuration file
## add a mount entry for each mount point to be managed by mountd
mount {
## root block device with partition map or raw FAT file system
block_device /dev/block/mmcblk0
## mount point for block device
mount_point /sdcard
## true if this mount point can be shared via USB mass storage
enable_ums true
## path to the UMS driver file for specifying the block device path
## use this for the mass_storage function driver
driver_store_path /sys/devices/platform/usb_mass_storage/lun0/file
## use this for android_usb composite gadget driver
##driver_store_path /sys/devices/platform/msm_hsusb/gadget/lun0/file
}

View File

@@ -0,0 +1,30 @@
## mountd configuration file
# Copyright (c) 2009, The Linux Foundation.
#
# 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.
#
## add a mount entry for each mount point to be managed by mountd
volume_sdcard {
media_path /devices/platform/msm_sdcc.1/mmc_host/mmc0
media_type mmc
mount_point /sdcard
ums_path /devices/platform/usb_mass_storage/lun0
}
volume_sdcard2 {
media_path /devices/platform/msm_sdcc.4/mmc_host/mmc2
media_type mmc
mount_point /sdcard
ums_path /devices/platform/usb_mass_storage/lun1
}

View File

@@ -0,0 +1,24 @@
## Vold 2.0 Generic fstab
## - San Mehat (san@android.com)
##
#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################
## Example of a standard sdcard mount for the emulator / Dream
# Mounts the first usable partition of the specified device
dev_mount sdcard /mnt/sdcard auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
## Example of a dual card setup
# dev_mount left_sdcard /sdcard1 auto /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1
# dev_mount right_sdcard /sdcard2 auto /devices/platform/goldfish_mmc.1 /devices/platform/msm_sdcc.3/mmc_host/mmc1
## Example of specifying a specific partition for mounts
# dev_mount sdcard /sdcard 2 /devices/platform/goldfish_mmc.0 /devices/platform/msm_sdcc.2/mmc_host/mmc1

View File

@@ -0,0 +1,19 @@
# Adjustments to the out-of-memory killer, for devices that are
# tight on memory. These should not be used if not needed, as they
# can result in more paging.
on early-boot
setprop ro.FOREGROUND_APP_MEM 1536
setprop ro.VISIBLE_APP_MEM 2048
setprop ro.PERCEPTIBLE_APP_MEM 2048
setprop ro.HEAVY_WEIGHT_APP_MEM 2048
setprop ro.SECONDARY_SERVER_MEM 4096
setprop ro.BACKUP_APP_MEM 4096
setprop ro.HOME_APP_MEM 4096
setprop ro.HIDDEN_APP_MEM 5120
setprop ro.EMPTY_APP_MEM 6144
on boot
write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,3072,4096,5120,6144

470
system/core/rootdir/init.rc Normal file
View File

@@ -0,0 +1,470 @@
on early-init
start ueventd
on init
sysclktz 0
loglevel 3
# setup the global environment
export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /vendor/lib:/system/lib
export ANDROID_BOOTLOGO 1
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
export EXTERNAL_STORAGE /mnt/sdcard
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
export BOOTCLASSPATH /system/framework/core.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/core-junit.jar
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
# Right now vendor lives on the same filesystem as system,
# but someday that may change.
symlink /system/vendor /vendor
# create mountpoints
mkdir /mnt 0775 root system
mkdir /mnt/sdcard 0000 system system
# Create cgroup mount point for cpu accounting
mkdir /acct
mount cgroup none /acct cpuacct
mkdir /acct/uid
# Backwards Compat - XXX: Going away in G*
symlink /mnt/sdcard /sdcard
mkdir /system
mkdir /data 0771 system system
mkdir /persist 0771 system system
mkdir /cache 0770 system cache
mkdir /config 0500 root root
mkdir /persist 0771 system system
# Directory for putting things only root should see.
mkdir /mnt/secure 0700 root root
# Directory for staging bindmounts
mkdir /mnt/secure/staging 0700 root root
# Directory-target for where the secure container
# imagefile directory will be bind-mounted
mkdir /mnt/secure/asec 0700 root root
# Secure container public mount points.
mkdir /mnt/asec 0700 root system
mount tmpfs tmpfs /mnt/asec mode=0755,gid=1000
# Filesystem image public mount points.
mkdir /mnt/obb 0700 root system
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
write /proc/sys/kernel/sched_latency_ns 10000000
write /proc/sys/kernel/sched_wakeup_granularity_ns 2000000
write /proc/sys/kernel/sched_compat_yield 1
write /proc/sys/kernel/sched_child_runs_first 0
# Create cgroup mount points for process groups
mkdir /dev/cpuctl
mount cgroup none /dev/cpuctl cpu
chown system system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0777 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.shares 1024
mkdir /dev/cpuctl/fg_boost
chown system system /dev/cpuctl/fg_boost/tasks
chmod 0777 /dev/cpuctl/fg_boost/tasks
write /dev/cpuctl/fg_boost/cpu.shares 1024
mkdir /dev/cpuctl/bg_non_interactive
chown system system /dev/cpuctl/bg_non_interactive/tasks
chmod 0777 /dev/cpuctl/bg_non_interactive/tasks
# 5.0 %
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
on fs
# mount mtd partitions
# Mount /system rw first to give the filesystem a chance to save a checkpoint
mount yaffs2 mtd@system /system
#mount yaffs2 mtd@system /system ro remount
mount yaffs2 mtd@userdata /data nosuid nodev
mount yaffs2 mtd@persist /persist nosuid nodev
mount yaffs2 mtd@cache /cache nosuid nodev
mount yaffs2 mtd@persist /persist nosuid nodev
on emmc-fs
# mount mmc partitions
wait /dev/block/mmcblk0p12
mount ext4 /dev/block/mmcblk0p12 /system ro barrier=1
wait /dev/block/mmcblk0p13
exec /system/bin/e2fsck -p /dev/block/mmcblk0p13
mount ext4 /dev/block/mmcblk0p13 /data nosuid nodev barrier=1 noauto_da_alloc
mount ext4 /dev/block/mmcblk0p14 /persist nosuid nodev barrier=1
mount ext4 /dev/block/mmcblk0p15 /cache nosuid nodev barrier=1
#Setting permissons for misc partition
chmod 0666 /dev/block/mmcblk0p17
on post-fs
# once everything is setup, no need to modify /
mount rootfs rootfs / ro remount
# We chown/chmod /data again so because mount is run as root + defaults
chown system system /data
chmod 0771 /data
# Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections
# We chown/chmod /persist again so because mount is run as root + defaults
chown system system /persist
chmod 0771 /persist
chmod 0664 /sys/devices/platform/msm_sdcc.1/polling
chmod 0664 /sys/devices/platform/msm_sdcc.2/polling
chmod 0664 /sys/devices/platform/msm_sdcc.3/polling
chmod 0664 /sys/devices/platform/msm_sdcc.4/polling
# Chown polling nodes as needed from UI running on system server
chown system system /sys/devices/platform/msm_sdcc.1/polling
chown system system /sys/devices/platform/msm_sdcc.2/polling
chown system system /sys/devices/platform/msm_sdcc.3/polling
chown system system /sys/devices/platform/msm_sdcc.4/polling
# Create dump dir and collect dumps.
# Do this before we mount cache so eventually we can use cache for
# storing dumps on platforms which do not have a dedicated dump partition.
mkdir /data/dontpanic
chown root log /data/dontpanic
chmod 0750 /data/dontpanic
# Collect apanic data, free resources and re-arm trigger
copy /proc/apanic_console /data/dontpanic/apanic_console
chown root log /data/dontpanic/apanic_console
chmod 0640 /data/dontpanic/apanic_console
copy /proc/apanic_threads /data/dontpanic/apanic_threads
chown root log /data/dontpanic/apanic_threads
chmod 0640 /data/dontpanic/apanic_threads
write /proc/apanic_console 1
# Same reason as /data above
chown system cache /cache
chmod 0770 /cache
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0770 /cache/recovery
#change permissions on vmallocinfo so we can grab it from bugreports
chown root log /proc/vmallocinfo
chmod 0440 /proc/vmallocinfo
#change permissions on kmsg & sysrq-trigger so bugreports can grab kthread stacks
chown root system /proc/kmsg
chmod 0440 /proc/kmsg
chown root system /proc/sysrq-trigger
chmod 0220 /proc/sysrq-trigger
# create basic filesystem structure
mkdir /data/misc 01771 system misc
mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
mkdir /data/misc/bluetooth 0770 system system
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/vpn 0770 system system
mkdir /data/misc/systemkeys 0700 system system
mkdir /data/misc/vpn/profiles 0770 system system
# give system access to wpa_supplicant.conf for backup and restore
mkdir /data/misc/wifi 0770 wifi wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
mkdir /data/local 0771 shell shell
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
mkdir /data/app-private 0771 system system
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
mkdir /data/radio 0770 radio radio
mkdir /data/misc/sensors 0775 root root
write /data/system/sensors/settings 0
chmod 0664 /data/system/sensors/settings
# create dalvik-cache and double-check the perms
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770
mkdir /cache/lost+found 0770
# double check the perms, in case lost+found already exists, and set owner
chown root root /data/lost+found
chmod 0770 /data/lost+found
chown root root /cache/lost+found
chmod 0770 /cache/lost+found
on boot
# basic network init
ifup lo
hostname localhost
domainname localdomain
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
# Define the oom_adj values for the classes of processes that can be
# killed by the kernel. These are used in ActivityManagerService.
setprop ro.FOREGROUND_APP_ADJ 0
setprop ro.VISIBLE_APP_ADJ 1
setprop ro.PERCEPTIBLE_APP_ADJ 2
setprop ro.HEAVY_WEIGHT_APP_ADJ 3
setprop ro.SECONDARY_SERVER_ADJ 4
setprop ro.BACKUP_APP_ADJ 5
setprop ro.HOME_APP_ADJ 6
setprop ro.HIDDEN_APP_MIN_ADJ 7
setprop ro.EMPTY_APP_ADJ 15
# Define the memory thresholds at which the above process classes will
# be killed. These numbers are in pages (4k).
setprop ro.FOREGROUND_APP_MEM 2048
setprop ro.VISIBLE_APP_MEM 3072
setprop ro.PERCEPTIBLE_APP_MEM 4096
setprop ro.HEAVY_WEIGHT_APP_MEM 4096
setprop ro.SECONDARY_SERVER_MEM 6144
setprop ro.BACKUP_APP_MEM 6144
setprop ro.HOME_APP_MEM 6144
setprop ro.HIDDEN_APP_MEM 7168
setprop ro.EMPTY_APP_MEM 8192
setprop ro.com.google.location_feature 1
# Write value must be consistent with the above properties.
# Note that the driver only supports 6 slots, so we have combined some of
# the classes into the same memory level; the associated processes of higher
# classes will still be killed first.
write /sys/module/lowmemorykiller/parameters/adj 0,1,2,4,7,15
write /proc/sys/vm/overcommit_memory 1
write /proc/sys/vm/min_free_order_shift 4
write /sys/module/lowmemorykiller/parameters/minfree 2048,3072,4096,6144,7168,8192
# Set init its forked children's oom_adj.
write /proc/1/oom_adj -16
# Tweak background writeout
write /proc/sys/vm/dirty_expire_centisecs 200
write /proc/sys/vm/dirty_background_ratio 5
# Permissions for System Server and daemons.
chown radio system /sys/android_power/state
chown radio system /sys/android_power/request_state
chown radio system /sys/android_power/acquire_full_wake_lock
chown radio system /sys/android_power/acquire_partial_wake_lock
chown radio system /sys/android_power/release_wake_lock
chown radio system /sys/power/state
chown radio system /sys/power/wake_lock
chown radio system /sys/power/wake_unlock
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/class/leds/keyboard-backlight/brightness
chown system system /sys/class/leds/lcd-backlight/brightness
chown system system /sys/class/leds/button-backlight/brightness
chown system system /sys/class/leds/jogball-backlight/brightness
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/leds/red/brightness
chown system system /sys/class/leds/green/brightness
chown system system /sys/class/leds/blue/brightness
chown system system /sys/class/leds/red/device/grpfreq
chown system system /sys/class/leds/red/device/grppwm
chown system system /sys/class/leds/red/device/blink
chown system system /sys/class/timed_output/vibrator/enable
chown system system /sys/module/sco/parameters/disable_esco
chown system system /sys/kernel/ipv4/tcp_wmem_min
chown system system /sys/kernel/ipv4/tcp_wmem_def
chown system system /sys/kernel/ipv4/tcp_wmem_max
chown system system /sys/kernel/ipv4/tcp_rmem_min
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
chown bluetooth bluetooth /sys/module/bluetooth_power/parameters/power
chown bluetooth bluetooth /proc/bluetooth/sleep/proto
chown system system /sys/module/sco/parameters/disable_esco
chmod 0660 /sys/module/bluetooth_power/parameters/power
chmod 0660 /proc/bluetooth/sleep/proto
chown bluetooth bluetooth /dev/ttyHS0
chmod 0660 /dev/ttyHS0
chmod 0666 /dev/msm_snd
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop net.tcp.buffersize.default 4096,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.wifi 4095,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.umts 4094,87380,110208,4096,16384,110208
setprop net.tcp.buffersize.hspa 4094,87380,1220608,4096,16384,1220608
setprop net.tcp.buffersize.hsupa 4094,87380,1220608,4096,16384,1220608
setprop net.tcp.buffersize.hsdpa 4094,87380,1220608,4096,16384,1220608
setprop net.tcp.buffersize.edge 4093,26280,35040,4096,16384,35040
setprop net.tcp.buffersize.gprs 4092,8760,11680,4096,8760,11680
setprop net.tcp.buffersize.lte 4094,87380,1220608,4096,16384,1220608
setprop net.tcp.buffersize.evdo_b 4094,87380,262144,4096,16384,262144
# 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
class_start default
## Daemon processes to be run by init.
##
service ueventd /sbin/ueventd
critical
service console /system/bin/sh
console
disabled
user shell
group log
on property:ro.secure=0
start console
# adbd is controlled by the persist.service.adb.enable system property
service adbd /sbin/adbd
disabled
# adbd on at boot in emulator
on property:ro.kernel.qemu=1
start adbd
on property:persist.service.adb.enable=1
start adbd
on property:persist.service.adb.enable=0
stop adbd
#ln -s /dev/oncrpc/30000002:00010000 /dev/oncrpc/30000002:00010001
service servicemanager /system/bin/servicemanager
user system
critical
onrestart restart zygote
onrestart restart media
service vold /system/bin/vold
socket vold stream 0660 root mount
ioprio be 2
service netd /system/bin/netd
socket netd stream 0660 root system
service debuggerd /system/bin/debuggerd
service ril-daemon /system/bin/rild
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
group radio cache inet misc audio sdcard_rw qcom_oncrpc diag
disabled
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
socket zygote stream 666
onrestart write /sys/android_power/request_state wake
onrestart write /sys/power/state on
onrestart restart media
onrestart restart netd
service media /system/bin/mediaserver
user media
group system audio camera graphics inet net_bt net_bt_admin net_raw qcom_oncrpc
ioprio rt 4
service bootanim /system/bin/bootanimation
user graphics
group graphics
disabled
oneshot
service dbus /system/bin/dbus-daemon --system --nofork
socket dbus stream 660 bluetooth bluetooth
user bluetooth
group bluetooth net_bt_admin
service bluetoothd /system/bin/bluetoothd -n
socket bluetooth stream 660 bluetooth bluetooth
socket dbus_bluetooth stream 660 bluetooth bluetooth
# init.rc does not yet support applying capabilities, so run as root and
# let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
service hfag /system/bin/sdptool add --channel=10 HFAG
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service hsag /system/bin/sdptool add --channel=11 HSAG
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service opush /system/bin/sdptool add --psm=5255 --channel=12 OPUSH
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service pbap /system/bin/sdptool add --channel=19 PBAP
user bluetooth
group bluetooth net_bt_admin
disabled
oneshot
service installd /system/bin/installd
socket installd stream 600 system system
service flash_recovery /system/etc/install-recovery.sh
oneshot
service racoon /system/bin/racoon
socket racoon stream 600 system system
# racoon will setuid to vpn after getting necessary resources.
group net_admin
disabled
oneshot
service mtpd /system/bin/mtpd
socket mtpd stream 600 system system
user vpn
group vpn net_admin net_raw
disabled
oneshot
service keystore /system/bin/keystore /data/misc/keystore
user keystore
group keystore
socket keystore stream 666
service dumpstate /system/bin/dumpstate -s
socket dumpstate stream 0660 shell log
disabled
oneshot
busybox --install

160
system/core/rootdir/ueventd.rc Executable file
View File

@@ -0,0 +1,160 @@
/dev/null 0666 root root
/dev/zero 0666 root root
/dev/full 0666 root root
/dev/ptmx 0666 root root
/dev/tty 0666 root root
/dev/random 0666 root root
/dev/urandom 0666 root root
/dev/ashmem 0666 root root
/dev/binder 0666 root root
/dev/hw_random 0660 system system
# logger should be world writable (for logging) but not readable
/dev/log/* 0662 root log
# the msm hw3d client device node is world writable/readable.
/dev/msm_hw3dc 0666 root root
# the DIAG device node is world writable/readable.
/dev/diag 0666 root root
# gpu driver for adreno200 is globally accessible
/dev/kgsl 0666 root root
/dev/kgsl-3d0 0666 root root
/dev/kgsl-2d0 0666 root root
/dev/kgsl-2d1 0666 root root
# these should not be world writable
/dev/diag_arm9 0660 radio radio
/dev/android_adb 0660 adb adb
/dev/android_adb_enable 0660 adb adb
/dev/ttyMSM0 0600 bluetooth bluetooth
/dev/ttyHS0 0600 bluetooth bluetooth
/dev/uinput 0660 system bluetooth
/dev/alarm 0664 system radio
/dev/tty0 0660 root system
/dev/sdio_tty_ciq_00 0660 system system
/dev/graphics/* 0660 root graphics
/dev/msm_hw3dm 0660 system graphics
/dev/msm_rotator 0660 system graphics
/dev/input/* 0660 root input
/dev/eac 0660 root audio
/dev/cam 0660 root camera
/dev/pmem 0660 system graphics
/dev/pmem_audio 0660 system audio
/dev/pmem_adsp* 0660 system audio
/dev/pmem_smipool* 0660 system camera
/dev/pmem_camera* 0660 system camera
/dev/oncrpc/* 0660 root qcom_oncrpc
/dev/adsp/* 0660 system audio
/dev/snd/* 0660 system audio
/dev/mt9t013 0660 system system
/dev/msm_camera/* 0660 system system
/dev/akm8976_daemon 0640 compass system
/dev/akm8976_aot 0640 compass system
/dev/akm8973_daemon 0640 compass system
/dev/akm8973_aot 0640 compass system
/dev/bma150 0640 compass system
/dev/cm3602 0640 compass system
/dev/akm8976_pffd 0640 compass system
/dev/lightsensor 0640 system system
/dev/radio0 0644 fm_radio fm_radio
/dev/i2c-0 0664 root system
/dev/i2c-1 0664 root system
/dev/i2c-2 0664 root system
/dev/i2c-4 0664 root system
/dev/msm_pcm_out* 0660 system audio
/dev/msm_pcm_in* 0660 system audio
/dev/msm_mvs 0660 system audio
/dev/msm_voicememo 0660 system audio
/dev/msm_pcm_ctl* 0660 system audio
/dev/msm_snd* 0660 system audio
/dev/msm_mp3* 0660 system audio
/dev/audience_a1026* 0660 system audio
/dev/tpa2018d1* 0660 system audio
/dev/msm_audpre 0660 system audio
/dev/msm_audio_ctl 0660 system audio
/dev/htc-acoustic 0660 system audio
/dev/vdec 0660 system audio
/dev/tzcom 0660 system audio
/dev/qce 0660 system audio
/dev/q6venc 0660 system audio
/dev/snd/dsp 0660 system audio
/dev/snd/dsp1 0660 system audio
/dev/snd/mixer 0660 system audio
/dev/msm_pcm_lp_dec 0660 system audio
/dev/smd3 0660 bluetooth bluetooth
/dev/smd2 0660 bluetooth bluetooth
/dev/smd0 0640 radio radio
/dev/smd7 0640 radio radio
/dev/smdcntl0 0640 radio radio
/dev/smdcntl1 0640 radio radio
/dev/smdcntl2 0640 radio radio
/dev/smdcntl3 0640 radio radio
/dev/smdcntl4 0640 radio radio
/dev/smdcntl5 0640 radio radio
/dev/smdcntl6 0640 radio radio
/dev/smdcntl7 0640 radio radio
/dev/sdioctl0 0640 radio radio
/dev/sdioctl1 0640 radio radio
/dev/sdioctl2 0640 radio radio
/dev/sdioctl3 0640 radio radio
/dev/sdioctl4 0640 radio radio
/dev/sdioctl4 0640 radio radio
/dev/sdioctl5 0640 radio radio
/dev/sdioctl6 0640 radio radio
/dev/sdioctl7 0640 radio radio
/dev/sdioctl8 0640 radio radio
/dev/rmnet_ctrl 0640 radio radio
/dev/qemu_trace 0666 system system
/dev/qmi 0640 radio radio
/dev/qmi0 0640 radio radio
/dev/qmi1 0640 radio radio
/dev/qmi2 0640 radio radio
/dev/bus/usb/* 0660 root usb
/dev/gemini0 0660 system system
/dev/mdm 0660 system system
/dev/ttyHSL1 0660 system system
/dev/tty_sdio_00 0660 system system
/dev/block/mmcblk0p17 0660 system system
/dev/block/mmcblk0p18 0660 system system
/dev/usb_accessory 0660 root usb
/dev/video* 0660 system system
# CDMA radio interface MUX
/dev/ts0710mux* 0640 radio radio
/dev/ppp 0660 radio vpn
/dev/tun 0640 vpn vpn
# sysfs properties
/sys/devices/virtual/input/input* enable 0660 root input
/sys/devices/virtual/input/input* poll_delay 0660 root input
#permissions for video
/dev/msm_vidc_reg 0660 system audio
/dev/msm_vidc_dec 0660 system audio
/dev/msm_vidc_enc 0660 system audio
#permissions for audio
/dev/msm_amrnb 0660 system audio
/dev/msm_amrwb 0660 system audio
/dev/msm_aac 0660 system audio
/dev/msm_aac_in 0660 system audio
/dev/msm_qcelp 0660 system audio
/dev/msm_evrc 0660 system audio
/dev/msm_fm 0660 system audio
/dev/msm_acdb 0660 system audio
/dev/msm_rtac 0660 system audio
/dev/msm_wma 0660 system audio
/dev/msm_wmapro 0660 system audio
/dev/msm_qcelp_in 0660 system audio
/dev/msm_evrc_in 0660 system audio
/dev/msm_preproc_ctl 0660 system audio
/dev/msm_a2dp_in 0640 system audio
/dev/msm_amrnb_in 0640 system audio
/sys/devices/virtual/usb_composite/* enable 0664 root system
/sys/devices/virtual/smdpkt/smdcntl* open_timeout 0664 radio radio
#permissions for sensors
/dev/msm_dsps 0660 system system
/sys/module/pm_8x60/parameters/modem_port_timeout 0664 root system
/sys/module/pm_8x60/parameters/modem_port_status 0664 root system
/sys/module/pm2/parameters/modem_port_timeout 0664 root system
/sys/module/pm2/parameters/modem_port_status 0664 root system