OSDN Git Service

init: move the init.sh execution to the post-fs stage
[android-x86/device-generic-common.git] / init.x86.rc
1 import /init.bluetooth.rc
2 import /init.superuser.rc
3
4 on early-init
5     write /proc/sys/kernel/ctrl-alt-del 1
6
7     write /sys/module/xt_qtaguid/parameters/ctrl_write_limited N
8
9     export force_s3tc_enable true
10     export EGL_LOG_LEVEL info
11 #   export EGL_DRIVERS egl_dri2
12
13 on init
14     symlink /sdcard /mnt/sdcard
15     symlink /sdcard /storage/sdcard0
16
17     # Backward compatibility
18     symlink system/lib /lib
19
20 on fs
21     mount_all /fstab.${ro.hardware}
22
23 on post-fs
24     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh
25
26 on post-fs-data
27     sysclktz 1
28
29     mkdir /data/misc/wifi 0770 wifi wifi
30     mkdir /data/misc/wifi/sockets 0770 wifi wifi
31     mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
32     mkdir /data/misc/dhcp 0770 dhcp dhcp
33     mkdir /data/system 0775 system system
34
35     # Set indication (checked by vold) that we have finished this action
36     setprop vold.post_fs_data_done 1
37
38 on boot
39     setprop ro.radio.use-ppp yes
40     setprop ro.radio.noril no
41     setprop status.battery.state Slow
42     setprop status.battery.level 5
43     setprop status.battery.level_raw  50
44     setprop status.battery.level_scale 9
45
46     # merge from system.prop
47     setprop ro.config.sync yes
48     setprop app.setupwizard.disable 0
49     setprop ro.alarm.volume.adjustable true
50     setprop ro.simulated.phone false
51     # disable red frame boarder in eng build
52     setprop persist.sys.strictmode.visual 0
53     setprop persist.sys.strictmode.disable 1
54     # workaround for h.265 slowness
55     setprop sys.media.vdec.drop 0
56
57 service wpa_supplicant /system/bin/wpa_supplicant -c/data/misc/wifi/wpa_supplicant.conf \
58     -iwlan0 -Dnl80211 \
59     -O/data/misc/wifi/sockets \
60     -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
61     #   we will start as root and wpa_supplicant will switch to user wifi
62     #   after setting up the capabilities required for WEXT
63     #   user wifi
64     #   group wifi inet keystore
65     class main
66     socket wpa_wlan0 dgram 660 wifi wifi
67     disabled
68
69 service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
70     class main
71     disabled
72     oneshot
73
74 service iprenew_wlan0 /system/bin/dhcpcd -n
75     class main
76     disabled
77     oneshot
78
79 service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL
80     class main
81     disabled
82     oneshot
83
84 service iprenew_eth0 /system/bin/dhcpcd -n
85     class main
86     disabled
87     oneshot
88
89 service nativebridge /system/bin/enable_nativebridge
90     class main
91     disabled
92     oneshot
93
94 service powerbtnd /system/bin/powerbtnd
95     class late_start
96
97 service logcat /system/bin/logcat -v threadtime -f /data/log.txt
98     class debug
99
100 service btattach /system/bin/btattach -Pbcm
101     class main
102     disabled
103     oneshot
104
105 service wacom-input /system/bin/wacom-input
106     disabled
107     oneshot
108
109 service tablet-mode /system/bin/tablet-mode
110     disabled
111     oneshot
112
113 on property:init.svc.wpa_supplicant=stopped
114     stop dhcpcd
115
116 on property:system_init.startsurfaceflinger=0
117     # disable cursor blinking
118     write /dev/tty0 "\e[?17;0;0c"
119     start surfaceflinger
120     stop console
121
122 on property:sys.boot_completed=1
123     write /proc/sys/kernel/ctrl-alt-del 0
124     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh bootcomplete
125
126 on property:init.svc.bluetoothd=running
127     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh hci
128
129 on property:init.svc.bluetoothd=stopped
130     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh hci
131
132 on property:net.dns1=*
133     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh netconsole
134
135 on property:debug.logcat=1
136     class_start debug
137
138 on property:persist.sys.nativebridge=1
139     mkdir /data/arm 0775 system system
140     start nativebridge
141
142 on property:persist.sys.nativebridge=0
143     stop nativebridge
144
145 on property:debug.egl.hw=0
146     setprop ro.kernel.qemu 1