OSDN Git Service

Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86
[android-x86/device-generic-common.git] / init.x86.rc
1 import /init.superuser.rc
2
3 on early-init
4     write /proc/sys/kernel/ctrl-alt-del 1
5
6     write /sys/module/xt_qtaguid/parameters/ctrl_write_limited N
7
8     export force_s3tc_enable true
9     export EGL_LOG_LEVEL info
10 #   export EGL_DRIVERS egl_dri2
11
12 on init
13
14 on fs
15     mount_all /fstab.${ro.hardware}
16
17 on post-fs
18     exec u:r:init:s0 -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh
19
20 on post-fs-data
21     mkdir /data/misc/wifi 0770 wifi wifi
22     mkdir /data/misc/wifi/sockets 0770 wifi wifi
23     mkdir /data/misc/wifi/wpa_supplicant 0770 wifi wifi
24     mkdir /data/misc/dhcp 0770 dhcp dhcp
25     mkdir /data/system 0775 system system
26
27     # Set indication (checked by vold) that we have finished this action
28     setprop vold.post_fs_data_done 1
29
30 on boot
31     setprop ro.radio.use-ppp yes
32     setprop status.battery.state Slow
33     setprop status.battery.level 5
34     setprop status.battery.level_raw  50
35     setprop status.battery.level_scale 9
36
37     # merge from system.prop
38     setprop ro.config.sync yes
39     setprop app.setupwizard.disable 0
40     setprop ro.alarm.volume.adjustable true
41     setprop ro.simulated.phone false
42     # disable red frame boarder in eng build
43     setprop persist.sys.strictmode.visual 0
44     setprop persist.sys.strictmode.disable 1
45     # workaround for h.265 slowness
46     setprop sys.media.vdec.drop 0
47
48 service wpa_supplicant /vendor/bin/hw/wpa_supplicant -dd \
49     -iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf \
50     -I/system/etc/wifi/wpa_supplicant_overlay.conf \
51     -O/data/misc/wifi/sockets \
52     -e/data/misc/wifi/entropy.bin -g@android:wpa_wlan0
53     #   we will start as root and wpa_supplicant will switch to user wifi
54     #   after setting up the capabilities required for WEXT
55     #   user wifi
56     #   group wifi inet keystore
57     class main
58     socket wpa_wlan0 dgram 660 wifi wifi
59     disabled
60     oneshot
61
62 service nativebridge /system/bin/enable_nativebridge
63     class main
64     disabled
65     oneshot
66     seclabel u:r:zygote:s0
67
68 service logcat /system/bin/logcat -b all -v threadtime -f /data/log.txt
69     class debug
70
71 service btattach /system/bin/btattach
72     class main
73     disabled
74     oneshot
75     seclabel u:r:bluetooth:s0
76
77 service rtk_hciattach /vendor/bin/rtk_hciattach -n -s 115200 /dev/rtk_h5 rtk_h5
78     class main
79     disabled
80     oneshot
81     seclabel u:r:bluetooth:s0
82
83 service wacom-input /system/bin/wacom-input
84     disabled
85     oneshot
86     seclabel u:r:inputflinger:s0
87
88 service tablet-mode /system/bin/tablet-mode
89     disabled
90     oneshot
91     seclabel u:r:inputflinger:s0
92
93 service ctrl-alt-del /system/bin/input keyevent --longpress POWER
94     disabled
95     oneshot
96     keycodes 97 100 111
97     seclabel u:r:init:s0
98
99 on property:system_init.startsurfaceflinger=0
100     # disable cursor blinking
101     write /dev/tty0 "\e[?17;0;0c"
102     start surfaceflinger
103     stop console
104
105 on property:sys.boot_completed=1
106     write /proc/sys/kernel/ctrl-alt-del 0
107     exec u:r:init:s0 -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh bootcomplete
108
109 on property:net.dns1=*
110     exec u:r:init:s0 -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh netconsole
111
112 on property:debug.logcat=1
113     class_start debug
114
115 on property:persist.sys.nativebridge=1
116     start nativebridge
117
118 on property:persist.sys.nativebridge=0
119     stop nativebridge