-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.x86.rc
155 lines (125 loc) · 5.04 KB
/
init.x86.rc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import /init.configfs_x86.rc
on early-init
write /proc/sys/kernel/ctrl-alt-del 1
write /sys/module/xt_qtaguid/parameters/ctrl_write_limited N
export force_s3tc_enable true
export EGL_LOG_LEVEL info
export OPENSSL_armcap 0
export INTEL_DEBUG heur32
export VIRGL_DEBUG nocoherent
# export EGL_DRIVERS egl_dri2
exec u:r:init:s0 -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh eglsetup
on early-init && property:mesa.loader.override=*
export MESA_LOADER_DRIVER_OVERRIDE ${mesa.loader.override}
on early-init && property:mesa.galliumhud.value=*
export GALLIUM_HUD ${mesa.galliumhud.value}
on early-init && property:mesa.galliumhud.period=*
export GALLIUM_HUD_PERIOD ${mesa.galliumhud.period}
write /sys/block/zram0/comp_algorithm zstd
on init
write /proc/sys/vm/page-cluster 0
on fs
mount_all /fstab.${ro.hardware}
swapon_all /fstab.${ro.hardware}
on post-fs
exec u:r:init:s0 -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh
on post-fs
chmod 0664 /dev/ion
chown system system /dev/ion
on post-fs-data
# HACK: Temporary remove dGPU node. We will have a better solution for hybrid laptop later
rm /dev/dri/card1
rm /dev/dri/renderD129
# Create the directories used by the Wireless subsystem
mkdir /data/vendor/wifi 0771 wifi wifi
mkdir /data/vendor/wifi/wpa 0770 wifi wifi
mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
mkdir /data/misc/hcid 0770 bluetooth bluetooth
mkdir /data/system 0775 system system
chown wifi wifi /data/misc/wifi/wpa_supplicant.conf
# Set indication (checked by vold) that we have finished this action
setprop vold.post_fs_data_done 1
setprop persist.vendor.thermal.mode thermal-daemon
mkdir /data/vendor/thermal-daemon 0660 system system
on boot
setprop ro.radio.use-ppp yes
setprop status.battery.state Slow
setprop status.battery.level 5
setprop status.battery.level_raw 50
setprop status.battery.level_scale 9
# merge from system.prop
setprop ro.config.sync yes
setprop app.setupwizard.disable 0
setprop ro.alarm.volume.adjustable true
setprop ro.simulated.phone false
# disable red frame boarder in eng build
setprop persist.sys.strictmode.visual 0
setprop persist.sys.strictmode.disable 1
# workaround for h.265 slowness
setprop sys.media.vdec.drop 0
#Celadon thermal HAL
chown system system /sys/devices/system/cpu/intel_pstate/max_perf_pct
chown system system /sys/devices/system/cpu/intel_pstate/min_perf_pct
chown system system /sys/devices/system/cpu/intel_pstate/no_turbo
chown system system /sys/class/powercap/intel-rapl:0/enabled
chown system system /sys/class/powercap/intel-rapl:0/constraint_0_power_limit_uw
chown system system /sys/class/dmi/id/product_uuid
chown system system /sys/class/dmi/id/product_name
chown system system /system/vendor/etc/
chown system system /system/vendor/etc/thermal-daemon/thermal-conf.xml
restorecon_recursive /sys/class/powercap
service wpa_supplicant /vendor/bin/hw/wpa_supplicant -dd \
-O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1 \
-g@android:wpa_wlan0
# we will start as root and wpa_supplicant will switch to user wifi
# after setting up the capabilities required for WEXT
# user wifi
# group wifi inet keystore
interface android.hardware.wifi.supplicant@1.0::ISupplicant default
interface android.hardware.wifi.supplicant@1.1::ISupplicant default
interface android.hardware.wifi.supplicant@1.2::ISupplicant default
interface android.hardware.wifi.supplicant@1.3::ISupplicant default
class main
socket wpa_wlan0 dgram 660 wifi wifi
disabled
oneshot
service logcat /system/bin/logcat -b all -v threadtime -f /data/log.txt
class debug
service thermal-daemon /system/vendor/bin/thermal-daemon --config-file /system/vendor/etc/thermal-daemon/thermal-conf.xml --ignore-cpuid-check
class main
user system
group system
disabled
service btattach /system/bin/btattach
class main
disabled
oneshot
seclabel u:r:bluetooth:s0
service wacom-input /system/bin/wacom-input
disabled
oneshot
seclabel u:r:inputflinger:s0
service tablet-mode /system/bin/tablet-mode
disabled
oneshot
seclabel u:r:inputflinger:s0
service ctrl-alt-del /system/bin/input keyevent --longpress POWER
disabled
oneshot
keycodes 97 100 111
seclabel u:r:init:s0
on property:system_init.startsurfaceflinger=0
# disable cursor blinking
write /dev/tty0 "[?17;0;0c"
start surfaceflinger
stop console
on property:sys.boot_completed=1
write /proc/sys/kernel/ctrl-alt-del 0
exec u:r:init:s0 -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh bootcomplete
on property:net.dns1=*
exec u:r:init:s0 -- /system/bin/logwrapper /system/bin/sh /system/etc/init.sh netconsole
on property:debug.logcat=1
class_start debug
on property:sys.boot_completed=1 && property:vendor.thermal.enable=1
start thermal-daemon