OSDN Git Service

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