loglevel 3
# setup the global environment
- export PATH /sbin:/system/sbin:/system/bin:/system/xbin
+ export PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin
export LD_LIBRARY_PATH /system/lib
export ANDROID_BOOTLOGO 1
+ export ANDROID_CACHE /data/cache
export ANDROID_ROOT /system
export ANDROID_ASSETS /system/app
export ANDROID_DATA /data
+ export DOWNLOAD_CACHE /data/cache/download
export EXTERNAL_STORAGE /mnt/sdcard2
export ASEC_MOUNTPOINT /mnt/asec
+ export LOOP_MOUNTPOINT /mnt/obb
+ export SD_EXT_DIRECTORY /sd-ext
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
# Location of BT firmware files
export BT_FW_PATH /vendor/firmware
-# for windows adb users..
- export LS_COLORS none
-
# Backward compatibility
symlink /system/etc /etc
symlink /sys/kernel/debug /d
mkdir /system
mkdir /data 0771 system system
- mkdir /cache 0770 system cache
+ mkdir /data/cache 0771 system cache
+ symlink /data/cache /cache
mkdir /config 0500 root root
# Directory for putting things only root should see.
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
+
+ mkdir /sd-ext 0771 system system
+
# write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
# 5.0 %
write /dev/cpuctl/bg_non_interactive/cpu.shares 52
-# Power Management Patches
- chmod 0777 /sys/power/state
- chmod 0777 /sys/power/wake_lock
- chmod 0777 /sys/power/wake_unlock
- chmod 0777 /sys/power/wait_for_fb_sleep
- chmod 0777 /sys/power/wait_for_fb_wake
+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
write /proc/apanic_console 1
# Same reason as /data above
- chown system cache /cache
- chmod 0770 /cache
+ chown system cache /data/cache
+ chmod 0771 /data/cache
# This may have been created by the recovery system with odd permissions
chown system cache /cache/recovery
chmod 0777 /dev/video1
chmod 0777 /dev/video2
chmod 0777 /dev/omap-resizer
-
-# change permissions for Overlay on 2.6.37 kernel
- chmod 777 /dev/video7
-
+ chmod 777 /dev/video7
# create basic filesystem structure
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 /system/etc/wifi 0770 system wifi
chmod 0770 /system/etc/wifi
chmod 0660 /system/etc/wifi/wpa_supplicant.conf
+
chown system wifi /system/etc/wifi/wpa_supplicant.conf
mkdir /data/misc/wifi 0770 system wifi
mkdir /data/misc/wifi/sockets 0777 system wifi
chown wifi wifi /data/misc/wifi
chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
- mkdir /data/local 0771 shell shell
+ mkdir /data/local 0751 root root
mkdir /data/local/tmp 0771 shell shell
+ mkdir /data/local/download 0771 system cache
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/cache/download 0771 system cache
+
mkdir /data/misc/dhcp 0777 dhcp dhcp
mkdir /data/misc/udhcpd 0777 system wifi
chown dhcp dhcp /data/misc/dhcp
chown system system /data/dalvik-cache
chmod 0771 /data/dalvik-cache
+ mkdir /data/cache/dalvik-cache 0771 system system
+ chown system system /data/cache/dalvik-cache
+ chmod 0771 /data/cache/dalvik-cache
+
# create the lost+found directories, so as to enforce our permissions
mkdir /data/lost+found 0770
mkdir /cache/lost+found 0770
chown root root /cache/lost+found
chmod 0770 /cache/lost+found
+ # allow net_raw to have access to /dev/socket directory
+ chown root net_raw /dev/socket
+ chmod 0775 /dev/socket
+
+ # allow system to modify cpufreq control files
+ chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
+ chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
+ chown root system /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+ chmod 0664 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
+
# console changed to ttyO* from ttyS* since 2.6.37 kernel.
chmod 0660 /dev/ttyO1
chown bluetooth bluetooth /dev/ttyO1
# set RLIMIT_NICE to allow priorities from 19 to -20
setrlimit 13 40 40
-# No battery hardware present
- setprop hw.nobattery true
- setprop hw.nophone true
-
# Power Management Patches
setprop hw.nopm true
-# Enabling CPU Freq and CPU Idle
-# CPU Freq
- write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor performance
-# CPU Idle
- mkdir /debug
- mount debugfs debugfs /debug
-# write /debug/pm_debug/sleep_while_idle 0
-# write /debug/pm_debug/enable_off_mode 0
-
# 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.SECONDARY_SERVER_MEM 6144
setprop ro.BACKUP_APP_MEM 6144
setprop ro.HOME_APP_MEM 6144
- setprop ro.HIDDEN_APP_MEM 5120
- setprop ro.EMPTY_APP_MEM 6144
+ setprop ro.HIDDEN_APP_MEM 7168
+ setprop ro.EMPTY_APP_MEM 8192
# Write value must be consistent with the above properties.
# Note that the driver only supports 6 slots, so we have HOME_APP at the
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_score_adj.
- write /proc/1/oom_score_adj -16
+ # 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
chmod 0660 /sys/power/state
chmod 0660 /sys/power/wake_lock
chmod 0660 /sys/power/wake_unlock
-#Brightness Control patches for 2.6.37 kernel
-# chmod 0777 /sys/devices/omapdss/display0/backlight/sharp-ls/brightness
-# chown system system /sys/devices/omapdss/display0/backlight/sharp-ls/brightness
-# chown system system /sys/class/timed_output/vibrator/enable
-# chown system system /sys/class/leds/keyboard-backlight/brightness
-# 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_rmem_max
chown root radio /proc/cmdline
chown system system /system/etc/wifi
-# wl12xx_sdio, wlan module for 2.6.37 wlan release
-# chown system system /system/etc/wifi/wl12xx_sdio.ko
-
-# chmod 0755 /wl1271bt_enable
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
setprop wifi.interface wlan0
+# Include extra init file
+# import /system/etc/init.local.rc
+
+# Run sysinit
+ exec /system/bin/sysinit
+
class_start default
## Daemon processes to be run by init.
#service console /system/bin/sh
# console
+# disabled
+# user shell
+# group log
+
+#on property:ro.secure=0
+# start console
service pvr /system/bin/rc.pvr start
on property:persist.service.adb.enable=0
stop adbd
+on property:service.adb.tcp.port=5555
+ restart adbd
+
+on property:service.adb.tcp.port=-1
+ restart adbd
+
service servicemanager /system/bin/servicemanager
user system
critical
service netd /system/bin/netd
socket netd stream 0660 root system
+ socket dnsproxyd stream 0660 root inet
service debuggerd /system/bin/debuggerd
socket rild stream 660 root radio
socket rild-debug stream 660 radio system
user root
- group radio cache inet misc audio
+ group radio cache inet misc audio sdcard_rw net_admin net_raw qcom_oncrpc diag
service zygote /system/bin/app_process -Xzygote /system/bin --zygote --start-system-server
- socket zygote stream 666
+ socket zygote stream 660 root system
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
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
+ # 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 map /system/bin/sdptool add --channel=16 MAS
+ 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.
disabled
oneshot
-service dhcpcd /system/bin/dhcpcd -ABKL wlan0
+service dhcpcd_wlan0 /system/bin/dhcpcd -ABKL
disabled
oneshot