OSDN Git Service

c21075219e0a5ab31df9fb65de76f263eeb6f285
[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     mount debugfs debugfs /sys/kernel/debug
6     chmod 755 /sys/kernel/debug
7     write /proc/sys/kernel/ctrl-alt-del 1
8
9     write /sys/module/xt_qtaguid/parameters/ctrl_write_limited N
10
11     export force_s3tc_enable true
12     export EGL_LOG_LEVEL info
13 #   export EGL_DRIVERS egl_dri2
14
15 on init
16     mkdir /mnt/shell/emulated 0700 shell shell
17     mkdir /storage/emulated 0555 root root
18     mkdir /mnt/media_rw/usb0 0700 media_rw media_rw
19     mkdir /storage/usb0 0700 root root
20     mkdir /mnt/media_rw/usb1 0700 media_rw media_rw
21     mkdir /storage/usb1 0700 root root
22     mkdir /mnt/media_rw/usb2 0700 media_rw media_rw
23     mkdir /storage/usb2 0700 root root
24     mkdir /mnt/media_rw/usb3 0700 media_rw media_rw
25     mkdir /storage/usb3 0700 root root
26     mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
27     mkdir /storage/sdcard1 0700 root root
28
29     export EXTERNAL_STORAGE /storage/emulated/legacy
30     export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
31     export EMULATED_STORAGE_TARGET /storage/emulated
32     export SECONDARY_STORAGE /storage/usb0:/storage/usb1:/storage/usb2:/storage/usb3:/storage/sdcard1
33
34     # Support legacy paths
35     symlink /storage/emulated/legacy /sdcard
36     symlink /storage/emulated/legacy /mnt/sdcard
37     symlink /storage/emulated/legacy /storage/sdcard0
38     symlink /mnt/shell/emulated/0 /storage/emulated/legacy
39
40     # Backward compatibility
41     symlink system/lib /lib
42
43     # device information
44     setprop ro.product.manufacturer $[/sys/class/dmi/id/sys_vendor]
45     setprop ro.product.model $[/sys/class/dmi/id/product_name]
46
47     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh
48
49 on fs
50     mount_all /fstab.${ro.hardware}
51     setprop ro.crypto.fuse_sdcard true
52
53 on post-fs-data
54     sysclktz 1
55
56     mkdir /data/media 0770 media_rw media_rw
57
58     mkdir /data/misc/wifi 0770 wifi wifi
59     mkdir /data/misc/wifi/sockets 0770 wifi wifi
60     mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
61     mkdir /data/misc/dhcp 0770 dhcp dhcp
62     mkdir /data/system 0775 system system
63
64     # Set indication (checked by vold) that we have finished this action
65     setprop vold.post_fs_data_done 1
66
67 on early-boot
68     readprops /x86.prop
69
70 on boot
71     setprop ro.radio.use-ppp yes
72     setprop ro.radio.noril no
73     setprop status.battery.state Slow
74     setprop status.battery.level 5
75     setprop status.battery.level_raw  50
76     setprop status.battery.level_scale 9
77
78     # merge from system.prop
79     setprop ro.config.sync yes
80     setprop app.setupwizard.disable 0
81     setprop ro.alarm.volume.adjustable true
82     setprop ro.simulated.phone false
83     # disable red frame boarder in eng build
84     setprop persist.sys.strictmode.visual 0
85     setprop persist.sys.strictmode.disable 1
86     # workaround for h.265 slowness
87     setprop sys.media.vdec.drop 0
88
89 service wpa_supplicant /system/bin/wpa_supplicant -c/data/misc/wifi/wpa_supplicant.conf \
90     -iwlan0 -Dnl80211 \
91     -O/data/misc/wifi/sockets \
92     -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
93     #   we will start as root and wpa_supplicant will switch to user wifi
94     #   after setting up the capabilities required for WEXT
95     #   user wifi
96     #   group wifi inet keystore
97     class main
98     socket wpa_wlan0 dgram 660 wifi wifi
99     disabled
100
101 service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
102     class main
103     disabled
104     oneshot
105
106 service iprenew_wlan0 /system/bin/dhcpcd -n
107     class main
108     disabled
109     oneshot
110
111 service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL
112     class main
113     disabled
114     oneshot
115
116 service iprenew_eth0 /system/bin/dhcpcd -n
117     class main
118     disabled
119     oneshot
120
121 service nativebridge /system/bin/enable_nativebridge
122     class main
123     disabled
124     oneshot
125
126 service powerbtnd /system/bin/powerbtnd
127     class late_start
128
129 service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
130     class late_start
131
132 service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
133     class late_start
134     disabled
135
136 service fuse_usb0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb0 /storage/usb0
137     class late_start
138     disabled
139
140 service fuse_usb1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb1 /storage/usb1
141     class late_start
142     disabled
143
144 service fuse_usb2 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb2 /storage/usb2
145     class late_start
146     disabled
147
148 service fuse_usb3 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb3 /storage/usb3
149     class late_start
150     disabled
151
152 service logcat /system/bin/logcat -v threadtime -f /data/log.txt
153     class debug
154
155 service wacom-input /system/bin/wacom-input
156     disabled
157     oneshot
158
159 service tablet-mode /system/bin/tablet-mode
160     disabled
161     oneshot
162
163 on property:init.svc.wpa_supplicant=stopped
164     stop dhcpcd
165
166 on property:system_init.startsurfaceflinger=0
167     # disable cursor blinking
168     write /dev/tty0 "\e[?17;0;0c"
169     start surfaceflinger
170     stop console
171
172 on property:sys.boot_completed=1
173     write /proc/sys/kernel/ctrl-alt-del 0
174     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh bootcomplete
175
176 on property:init.svc.bluetoothd=running
177     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh hci
178
179 on property:init.svc.bluetoothd=stopped
180     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh hci
181
182 on property:net.dns1=*
183     exec -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh netconsole
184
185 on property:debug.logcat=1
186     class_start debug
187
188 on property:persist.sys.nativebridge=1
189     start nativebridge
190
191 on property:persist.sys.nativebridge=0
192     stop nativebridge