summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/rootdir/init.rc117
1 files changed, 96 insertions, 21 deletions
diff --git a/core/rootdir/init.rc b/core/rootdir/init.rc
index 5c355fd..47312f1 100644
--- a/core/rootdir/init.rc
+++ b/core/rootdir/init.rc
@@ -1,8 +1,4 @@
-# Copyright (C) 2012 The Android Open Source Project
# Copyright (C) 2012 Thunder Software Technology Co.,Ltd.
-# IMPORTANT: Do not create world writable files or directories.
-# This is a common source of Android security bugs.
-#
import /init.${ro.hardware}.rc
import /init.usb.rc
@@ -32,7 +28,8 @@ loglevel 6
export ANDROID_DATA /data
export ASEC_MOUNTPOINT /mnt/asec
export LOOP_MOUNTPOINT /mnt/obb
- export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework_ext.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar
+ export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework_ext.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/com.qrd.plugin.feature_query.jar:/system/framework/com.qrdinside.impl.jar
+# important note for BOOTCLASSPATH, when you add new Jar in it, you must also add it into DEXPREOPT_BOOT_JARS(inside dex_preopt.mk), otherwise the PreDexOpt will work abnormally in user release.
# Backward compatibility
symlink /system/etc /etc
@@ -70,6 +67,11 @@ loglevel 6
mkdir /mnt/obb 0700 root system
mount tmpfs tmpfs /mnt/obb mode=0755,gid=1000
+ # Filesystem debugfs
+ mkdir /mnt/debugfs 0700 root system
+ mount debugfs debugfs /mnt/debugfs mode=0755,gid=1000
+ mount debugfs debugfs /sys/kernel/debug
+
write /proc/sys/kernel/panic_on_oops 1
write /proc/sys/kernel/hung_task_timeout_secs 0
write /proc/cpu/alignment 4
@@ -116,10 +118,10 @@ loglevel 6
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@cache /cache nosuid nodev
+#mount yaffs2 mtd@system /system
+#mount yaffs2 mtd@system /system ro remount
+#mount yaffs2 mtd@userdata /data nosuid nodev
+#mount yaffs2 mtd@cache /cache nosuid nodev
on post-fs
# once everything is setup, no need to modify /
@@ -272,22 +274,15 @@ on boot
chmod 0660 /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
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/blink
chown system system /sys/class/leds/red/brightness
+ chown system system /sys/class/leds/green/blink
chown system system /sys/class/leds/green/brightness
+ chown system system /sys/class/leds/blue/blink
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/flashlight/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
@@ -297,6 +292,29 @@ on boot
chown system system /sys/kernel/ipv4/tcp_rmem_def
chown system system /sys/kernel/ipv4/tcp_rmem_max
chown root radio /proc/cmdline
+ chown system system /sys/bus/platform/devices/fastboot/fastboot
+ chown system system /sys/bus/platform/devices/fastboot/resume
+ chown system system /sys/class/compass/akm8975/delay_acc
+ chown system system /sys/class/compass/akm8975/delay_mag
+ chown system system /sys/class/compass/akm8975/delay_ori
+ chown system system /sys/class/compass/akm8975/enable_acc
+ chown system system /sys/class/compass/akm8975/enable_mag
+ chown system system /sys/class/compass/akm8975/enable_ori
+ chown system system /sys/class/compass/akm8975/accel
+ chown input system /sys/bus/i2c/devices/1-0039/enable_als_sensor
+ chown input system /sys/bus/i2c/devices/1-0039/enable_ps_sensor
+ chown input system /sys/bus/i2c/devices/1-0039/ps_sensor_thld
+ chown input system /sys/bus/i2c/devices/1-0039/als_poll_delay
+ chmod 0664 /sys/bus/i2c/devices/1-0039/enable_als_sensor
+ chmod 0664 /sys/bus/i2c/devices/1-0039/enable_ps_sensor
+ chmod 0664 /sys/bus/i2c/devices/1-0039/ps_sensor_thld
+ chmod 0664 /sys/bus/i2c/devices/1-0039/als_poll_delay
+ chown input system /sys/devices/i2c-1/1-000f/enable
+ chmod 0664 /sys/devices/i2c-1/1-000f/enable
+
+ # insert the system monitor modules
+ insmod /system/lib/modules/sm_event_log.ko
+ insmod /system/lib/modules/sm_event_driver.ko
# Define TCP buffer sizes for various networks
# ReadMin, ReadInitial, ReadMax, WriteMin, WriteInitial, WriteMax,
@@ -361,6 +379,18 @@ service console /system/bin/sh
user shell
group log
+service perfman_init /system/bin/perfman_init
+ class core
+ user root
+ group root
+ oneshot
+
+service memopt_init /system/bin/memopt_init
+ class core
+ user root
+ group root
+ oneshot
+
on property:ro.debuggable=1
start console
@@ -438,7 +468,6 @@ service media /system/bin/mediaserver
service bootanim /system/bin/bootanimation
class main
- user graphics
group graphics
disabled
oneshot
@@ -505,3 +534,49 @@ service mdnsd /system/bin/mdnsd
socket mdnsd stream 0660 mdnsr inet
disabled
oneshot
+
+service openslntprfl /system/bin/silent_profile 1
+ disabled
+ oneshot
+
+on property:persist.sys.silent=1
+ start openslntprfl
+
+service clsslntprfl /system/bin/silent_profile 0
+ disabled
+ oneshot
+
+on property:persist.sys.silent=0
+ start clsslntprfl
+service qlogd /system/xbin/qlogd
+ class main
+service rootagent /system/bin/sh /system/etc/init.qcom.rootagent.sh
+ disabled
+ oneshot
+on property:persist.sys.rootagent=1
+ start rootagent
+on property:persist.sys.rootagent=0
+ stop rootagent
+
+#service secd /system/bin/secd
+# class main
+# socket secd stream 600 system system
+
+#service cpucontroller /system/bin/cpucontroller
+# class main
+# socket CpuControllerService stream 600 system system
+
+#AllJoyn
+service alljoyn /system/xbin/alljoyn-daemon --internal --no-switch-user
+ class main
+ oneshot
+
+service fastmmi_pcba /system/bin/sh -c "mkdir -p /data/fastmmi; /system/bin/mmi -p > /data/fastmmi/log.pcba"
+ user root
+ group root
+ oneshot
+
+service fastmmi_full /system/bin/sh -c "mkdir -p /data/fastmmi; /system/bin/mmi -f > /data/fastmmi/log.full"
+ user root
+ group root
+ oneshot