OSDN Git Service

android_x86: enable embedded Superuser
[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 post-fs-data
49     sysclktz 1
50
51     mkdir /data/media 0770 media_rw media_rw
52
53     mkdir /data/misc/wifi 0770 wifi wifi
54     mkdir /data/misc/wifi/sockets 0770 wifi wifi
55     mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
56     mkdir /data/misc/dhcp 0770 dhcp dhcp
57     mkdir /data/system 0775 system system
58
59     # Set indication (checked by vold) that we have finished this action
60     setprop vold.post_fs_data_done 1
61
62 on early-boot
63     readprops /x86.prop
64
65 on boot
66     setprop ro.radio.use-ppp yes
67     setprop ro.radio.noril no
68     setprop status.battery.state Slow
69     setprop status.battery.level 5
70     setprop status.battery.level_raw  50
71     setprop status.battery.level_scale 9
72
73     # merge from system.prop
74     setprop ro.config.sync yes
75     setprop app.setupwizard.disable 0
76     setprop ro.alarm.volume.adjustable true
77     setprop ro.simulated.phone false
78     # disable red frame boarder in eng build
79     setprop persist.sys.strictmode.visual 0
80     setprop persist.sys.strictmode.disable 1
81     # workaround for h.265 slowness
82     setprop sys.media.vdec.drop 0
83
84 on fs
85     setprop ro.crypto.fuse_sdcard true
86     # manually start class late_start since we don't use mount_all
87     class_start main
88     class_start late_start
89
90 service wpa_supplicant /system/bin/wpa_supplicant -c/data/misc/wifi/wpa_supplicant.conf \
91     -ddddd \
92     -iwlan0 -Dnl80211 \
93     -O/data/misc/wifi/sockets \
94     -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
95     #   we will start as root and wpa_supplicant will switch to user wifi
96     #   after setting up the capabilities required for WEXT
97     #   user wifi
98     #   group wifi inet keystore
99     class main
100     socket wpa_wlan0 dgram 660 wifi wifi
101     disabled
102
103 service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
104     class main
105     disabled
106     oneshot
107
108 service iprenew_wlan0 /system/bin/dhcpcd -n
109     class main
110     disabled
111     oneshot
112
113 service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL
114     class main
115     disabled
116     oneshot
117
118 service iprenew_eth0 /system/bin/dhcpcd -n
119     class main
120     disabled
121     oneshot
122
123 service enable_houdini /system/bin/enable_houdini
124     class main
125     oneshot
126
127 service powerbtnd /system/bin/powerbtnd
128     class late_start
129
130 service sdcard /system/bin/sdcard -u 1023 -g 1023 -l /data/media /mnt/shell/emulated
131     class late_start
132
133 service fuse_sdcard1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/sdcard1 /storage/sdcard1
134     class late_start
135     disabled
136
137 service fuse_usb0 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb0 /storage/usb0
138     class late_start
139     disabled
140
141 service fuse_usb1 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb1 /storage/usb1
142     class late_start
143     disabled
144
145 service fuse_usb2 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb2 /storage/usb2
146     class late_start
147     disabled
148
149 service fuse_usb3 /system/bin/sdcard -u 1023 -g 1023 -w 1023 -d /mnt/media_rw/usb3 /storage/usb3
150     class late_start
151     disabled
152
153 service logcat /system/bin/logcat -v threadtime -f /data/log.txt
154     class debug
155
156 service wacom-input /system/bin/wacom-input
157     disabled
158     oneshot
159
160 service tablet-mode /system/bin/tablet-mode
161     disabled
162     oneshot
163
164 on property:init.svc.wpa_supplicant=stopped
165     stop dhcpcd
166
167 on property:system_init.startsurfaceflinger=0
168     # disable cursor blinking
169     write /dev/tty0 "\e[?17;0;0c"
170     start surfaceflinger
171     stop console
172
173 on property:sys.boot_completed=1
174     write /proc/sys/kernel/ctrl-alt-del 0
175     exec /system/bin/logwrapper /system/bin/sh /system/etc/init.sh bootcomplete
176
177 on property:net.dns1=*
178     exec /system/bin/logwrapper /system/bin/sh /system/etc/init.sh netconsole
179
180 on property:debug.logcat=1
181     class_start debug