# Backward compatibility
symlink system/etc /etc
symlink system/lib /lib
+ symlink /sys/kernel/debug /d
# create mountpoints and mount tmpfs on sqlite_stmt_journals and debugfs on d
mkdir /d
chmod 0777 /sdcard
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
- mount debugfs debugfs /d
mount rootfs rootfs / ro remount
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
# mount mtd partitions
# TODO: this should be mounted by fs vol id (i.e. /dev/block-by-volid/system),
# create basic filesystem structure
mkdir /data/misc 01771 system misc
- mkdir /data/misc/hcid 0770 bluetooth bluetooth
+ mkdir /data/misc/bluetoothd 0770 bluetooth bluetooth
mkdir /data/local 0771 shell shell
mkdir /data/local/tmp 0771 shell shell
mkdir /data/data 0771 system system
# 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
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
user bluetooth
group bluetooth net_bt_admin
-service hcid /system/bin/hcid -d -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 bluetoothd drop uid to bluetooth with the right linux capabilities
group bluetooth net_bt_admin misc
disabled
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
+
#Please do not change anything below this line. If you want to add new service, add it above this line
#REMOVE FROM HERE
service dhcpcd /system/bin/dhcpcd wlan0