summaryrefslogtreecommitdiffstats
path: root/rootdir/init.rc
diff options
context:
space:
mode:
Diffstat (limited to 'rootdir/init.rc')
-rw-r--r--rootdir/init.rc69
1 files changed, 61 insertions, 8 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 9d30518..f62d1d8 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -17,12 +17,14 @@ loglevel 3
# Backward compatibility
symlink /system/etc /etc
+ symlink /sys/kernel/debug /d
# create mountpoints and mount tmpfs on sqlite_stmt_journals
mkdir /sdcard 0000 system system
mkdir /system
mkdir /data 0771 system system
mkdir /cache 0770 system cache
+ mkdir /config 0500 root root
mkdir /sqlite_stmt_journals 01777 root root
mount tmpfs tmpfs /sqlite_stmt_journals size=4m
@@ -34,11 +36,12 @@ loglevel 3
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 sytem system /dev/cpuctl
chown system system /dev/cpuctl/tasks
chmod 0777 /dev/cpuctl/tasks
write /dev/cpuctl/cpu.shares 1024
@@ -64,6 +67,30 @@ loglevel 3
chown system system /data
chmod 0771 /data
+ # 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
+
+ # Collect ramconsole data
+ copy /proc/last_kmsg /data/dontpanic/last_kmsg
+ chown root log /data/dontpanic/last_kmsg
+ chmod 0640 /data/dontpanic/last_kmsg
+
# Same reason as /data above
mount yaffs2 mtd@cache /cache nosuid nodev
chown system cache /cache
@@ -73,10 +100,14 @@ loglevel 3
chown system system /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
+
# create basic filesystem structure
mkdir /data/misc 01771 system misc
- mkdir /data/misc/hcid 0770 bluetooth bluetooth
- mkdir /data/misc/keystore 0770 keystore keystore
+ mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
+ mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/vpn 0770 system system
mkdir /data/misc/vpn/profiles 0770 system system
# give system access to wpa_supplicant.conf for backup and restore
@@ -90,6 +121,7 @@ loglevel 3
mkdir /data/app 0771 system system
mkdir /data/property 0700 root root
+
# create dalvik-cache and double-check the perms
mkdir /data/dalvik-cache 0771 system system
chown system system /data/dalvik-cache
@@ -148,6 +180,10 @@ on boot
# 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
@@ -238,12 +274,13 @@ 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
+ group radio cache inet misc audio
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
service media /system/bin/mediaserver
user media
@@ -265,11 +302,11 @@ service dbus /system/bin/dbus-daemon --system --nofork
user bluetooth
group bluetooth net_bt_admin
-service hcid /system/bin/hcid -s -n -f /etc/bluez/hcid.conf
+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 hcid drop uid to bluetooth with the right linux capabilities
+ # let bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
@@ -285,6 +322,18 @@ service hsag /system/bin/sdptool add --channel=11 HSAG
disabled
oneshot
+service opush /system/bin/sdptool add --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
@@ -294,7 +343,7 @@ service flash_recovery /system/etc/install-recovery.sh
service racoon /system/bin/racoon
socket racoon stream 600 system system
# racoon will setuid to vpn after getting necessary resources.
- group net_admin keystore
+ group net_admin
disabled
oneshot
@@ -305,8 +354,12 @@ service mtpd /system/bin/mtpd
disabled
oneshot
-service keystore /system/bin/keystore
+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