OSDN Git Service

90018415087b1f8cd2a796364773a2221e2a7d71
[android-x86/device-generic-common.git] / init.x86.rc
1 import /init.superuser.rc
2
3 on early-init
4     mount debugfs debugfs /sys/kernel/debug
5     chmod 755 /sys/kernel/debug
6     write /proc/sys/kernel/ctrl-alt-del 1
7
8     write /sys/module/xt_qtaguid/parameters/ctrl_write_limited N
9
10     export force_s3tc_enable true
11 #   export EGL_LOG_LEVEL info
12 #   export EGL_DRIVERS egl_dri2
13
14 on init
15     mkdir /mnt/shell/emulated 0700 shell shell
16     mkdir /storage/emulated 0555 root root
17     mkdir /mnt/media_rw/usb0 0700 media_rw media_rw
18     mkdir /storage/usb0 0700 root root
19     mkdir /mnt/media_rw/usb1 0700 media_rw media_rw
20     mkdir /storage/usb1 0700 root root
21     mkdir /mnt/media_rw/usb2 0700 media_rw media_rw
22     mkdir /storage/usb2 0700 root root
23     mkdir /mnt/media_rw/usb3 0700 media_rw media_rw
24     mkdir /storage/usb3 0700 root root
25     mkdir /mnt/media_rw/sdcard1 0700 media_rw media_rw
26     mkdir /storage/sdcard1 0700 root root
27
28     export EXTERNAL_STORAGE /storage/emulated/legacy
29     export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
30     export EMULATED_STORAGE_TARGET /storage/emulated
31     export SECONDARY_STORAGE /storage/usb0:/storage/usb1:/storage/usb2:/storage/usb3:/storage/sdcard1
32
33     # Support legacy paths
34     symlink /storage/emulated/legacy /sdcard
35     symlink /storage/emulated/legacy /mnt/sdcard
36     symlink /storage/emulated/legacy /storage/sdcard0
37     symlink /mnt/shell/emulated/0 /storage/emulated/legacy
38
39     # Backward compatibility
40     symlink system/lib /lib
41
42     # device information
43     setprop ro.product.manufacturer $[/sys/class/dmi/id/sys_vendor]
44     setprop ro.product.model $[/sys/class/dmi/id/product_name]
45
46     exec /system/bin/logwrapper /system/bin/sh /system/etc/init.sh
47
48 on fs
49     mount_all /fstab.${ro.hardware}
50     setprop ro.crypto.fuse_sdcard true
51
52 on post-fs-data
53     sysclktz 1
54
55     mkdir /data/media 0770 media_rw media_rw
56
57     mkdir /data/misc/wifi 0770 wifi wifi
58     mkdir /data/misc/wifi/sockets 0770 wifi wifi
59     mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
60     mkdir /data/misc/dhcp 0770 dhcp dhcp
61     mkdir /data/system 0775 system system
62
63     # Set indication (checked by vold) that we have finished this action
64     setprop vold.post_fs_data_done 1
65
66 on early-boot
67     readprops /x86.prop
68
69 on boot
70     setprop ro.radio.use-ppp yes
71     setprop ro.radio.noril no
72     setprop status.battery.state Slow
73     setprop status.battery.level 5
74     setprop status.battery.level_raw  50
75     setprop status.battery.level_scale 9
76
77     # merge from system.prop
78     setprop ro.config.sync yes
79     setprop app.setupwizard.disable 0
80     setprop ro.alarm.volume.adjustable true
81     setprop ro.simulated.phone false
82     # disable red frame boarder in eng build
83     setprop persist.sys.strictmode.visual 0
84     setprop persist.sys.strictmode.disable 1
85     # workaround for h.265 slowness
86     setprop sys.media.vdec.drop 0
87
88 service wpa_supplicant /system/bin/wpa_supplicant -c/data/misc/wifi/wpa_supplicant.conf \
89     -ddddd \
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 enable_houdini /system/bin/enable_houdini
122     class main
123     oneshot
124
125 service powerbtnd /system/bin/powerbtnd
126     class late_start
127
128 service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
129     class late_start
130
131 service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
132     class late_start
133     disabled
134
135 service fuse_usb0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb0 /storage/usb0
136     class late_start
137     disabled
138
139 service fuse_usb1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb1 /storage/usb1
140     class late_start
141     disabled
142
143 service fuse_usb2 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb2 /storage/usb2
144     class late_start
145     disabled
146
147 service fuse_usb3 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb3 /storage/usb3
148     class late_start
149     disabled
150
151 service logcat /system/bin/logcat -v threadtime -f /data/log.txt
152     class debug
153
154 service wacom-input /system/bin/wacom-input
155     disabled
156     oneshot
157
158 service tablet-mode /system/bin/tablet-mode
159     disabled
160     oneshot
161
162 on property:init.svc.wpa_supplicant=stopped
163     stop dhcpcd
164
165 on property:system_init.startsurfaceflinger=0
166     # disable cursor blinking
167     write /dev/tty0 "\e[?17;0;0c"
168     start surfaceflinger
169     stop console
170
171 on property:sys.boot_completed=1
172     write /proc/sys/kernel/ctrl-alt-del 0
173     exec /system/bin/logwrapper /system/bin/sh /system/etc/init.sh bootcomplete
174
175 on property:net.dns1=*
176     exec /system/bin/logwrapper /system/bin/sh /system/etc/init.sh netconsole
177
178 on property:debug.logcat=1
179     class_start debug