blob: efb7b378c49f0a46b40c3f992c59db85d40f4464 (
plain)
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
#
# Copyright (C) 2017 The LineageOS Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
on init
export LD_SHIM_LIBS " \
/system/vendor/lib/libwvm.so|libshims_wvm.so \
:/system/bin/credmgrd|libshims_signal.so \
:/system/bin/iddd|libshims_idd.so \
:/system/bin/suntrold|libshims_signal.so \
:/system/lib/hw/camera.qcom.so|libsonycamera.so \
:/system/vendor/lib/libwvm.so|libdtcpipplayer.so \
"
mkdir /idd 0751 idd idd
mkdir /rca 0750 idd idd
on early-fs
wait /dev/block/mmcblk0p1
class_start trimarea
exec u:r:qti_init_shell:s0 -- /sbin/wait4tad_static
on fs
# mount apps_log
#wait /dev/block/platform/msm_sdcc.1/by-name/apps_log
#mount ext4 /dev/block/platform/msm_sdcc.1/by-name/apps_log /idd nosuid nodev noatime noexec barrier=0 discard
chown idd idd /idd
chmod 0751 /idd
#exec /system/bin/rm -r /idd/lost+found
symlink /idd /mnt/idd
on early-boot
#SONY early boot
start ta_qmi_service
start sct_service
on boot
# PM8941 flash
chown cameraserver system /sys/class/misc/pm8941-flash/device/current1
chown cameraserver system /sys/class/misc/pm8941-flash/device/current2
chown cameraserver system /sys/class/misc/pm8941-flash/device/fault_status
chown cameraserver system /sys/class/misc/pm8941-flash/device/fine_current1
chown cameraserver system /sys/class/misc/pm8941-flash/device/fine_current2
chown cameraserver system /sys/class/misc/pm8941-flash/device/flash_timer
chown cameraserver system /sys/class/misc/pm8941-flash/device/mask_clamp_current
chown cameraserver system /sys/class/misc/pm8941-flash/device/mask_enable
chown cameraserver system /sys/class/misc/pm8941-flash/device/max_current
chown cameraserver system /sys/class/misc/pm8941-flash/device/mode
chown cameraserver system /sys/class/misc/pm8941-flash/device/startup_delay
chown cameraserver system /sys/class/misc/pm8941-flash/device/strobe
chown cameraserver system /sys/class/misc/pm8941-flash/device/vph_pwr_droop
on post-fs
# we will remap this as /mnt/sdcard with the sdcard fuse tool
mkdir /data/misc/camera 0770 camera camera
mkdir /data/misc/cameraserver 0700 cameraserver cameraserver
# create directory for scd
mkdir /dev/socket/scd 0755 system system
mkdir /data/scd 0755 system system
on post-fs-data
# SONY: Start early TA-users
mkdir /data/etc 0755 root shell
exec -- /system/bin/taimport
mkdir /data/media 0770 media_rw media_rw
# SONY: Create dir for Widevine keybox
mkdir /data/persist/wv 0700 system system
mkdir /data/misc/systemkeys 0700 system system
mkdir /data/misc/keystore 0700 keystore keystore
mkdir /data/misc/keychain 0771 system system
installkey /data
mkdir /idd/lost+found 0770 root root
mkdir /idd/output 0755 idd idd
mkdir /idd/socket 0711 idd idd
mkdir /idd/startup-prober 0700 root root
restorecon_recursive /idd
# SONY: Camera
mkdir /data/camera 0770 media camera
chown media camera /sys/devices/sony_camera_0/info
chmod 0770 /sys/devices/sony_camera_0/info
chown media camera /sys/devices/sony_camera_1/info
chmod 0770 /sys/devices/sony_camera_1/info
# SONY: Import MiscTA to System properties
exec -- /system/bin/taimport property
setprop init.taimport.ready true
# taimport ready, use this as trigger for multi-cdf-symlinker
# create credmgrinit log file
touch /cache/credmgr.log
restorecon -R /cache/credmgr.log
service taimport /system/bin/taimport
class late_start
user root
group system
oneshot
service iddd /system/bin/iddd
class main
user idd
group idd log inet
# This script init /cache/CredentialManagerData if /data/credmgr doesn't meet our requirements
service initcredmgr /system/bin/credmgrfirstboot.sh
class late_start
user system
group credmgr_client
oneshot
# When credmgrfirstboot is ready it set sys.credmgrdready=true.
# Start credmgrd after that
on property:sys.credmgrdready=true
start credmgrd
# Start Credential manager daemon
service credmgrd /system/bin/credmgrd
user system
group credmgr_client
socket credmgr stream 0660 system credmgr_client
disabled
# Secure Config Transfer service
service sct_service /system/bin/sct_service
user root
disabled
# Trim Area QMI service
service ta_qmi_service /system/bin/ta_qmi_service
user ta_qmi
group ta_qmi trimarea system root net_raw wakelock
disabled
service scd /system/bin/scd
class late_start
user system
group system
#service wvkbd_installer /system/bin/logwrapper /system/bin/wvkbd
service wvkbd_installer /system/bin/wvkbd
user system
group system
oneshot
disabled
# All services that use qseecomd daemon listeners should
# start on sys.listeners.registered property to make sure that
# all of its service listeners are registered before calling them
on property:sys.listeners.registered=true
start wvkbd_installer
#service qcamerasvr /system/bin/logwrapper /system/bin/mm-qcamera-daemon
service qcamerasvr /system/bin/mm-qcamera-daemon
class late_start
user camera
# group camera system inet input graphics
group camera system inet input graphics credmgr_client cameraserver
# seclabel u:r:mm-qcamerad:s0
# SONY: TrimArea Daemon
# Last 2 args: start block(blk size 128k), number of blocks(partitionsize(kb)/128(kb))
service tad_static /sbin/tad_static /dev/block/bootdevice/by-name/TA 0,16
#service tad_static /sbin/tad_static /data/credmgr/ta_part.bin 0,16
class trimarea
user tad
group tad trimarea root
socket tad stream 0770 system trimarea
# tad_static is in rootfs, normal file_context does not work
seclabel u:r:tad:s0
service updatemiscta /system/bin/updatemiscta
class main
user updatemiscta
group trimarea
oneshot
|