blob: 2a6e2844c5a5cda4e493a40847ebb3e11caa2cf1 (
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
|
on init
restorecon /dev/block/bootdevice/by-name/kpatch
parse_kpatch /patch_hn/kpatch/insmod_list
mkdir /mnt/update_engine 0700 root root
mount tmpfs none /mnt/update_engine nodev nosuid mode=0700
on post-fs-data
setprop vold.crypto_unencrypt_updatedir /data/update
#Create directory for OtaSave
mkdir /data/OtaSave 0770 system system
mkdir /data/cota 0775 system system encryption=None
restorecon_recursive /data/cota
mkdir /data/cota/ecota
chmod 0755 /data/cota/ecota
chown root root /data/cota/ecota
restorecon_recursive /data/cota/ecota
mkdir /data/cota/cloud
chmod 0770 /data/cota/cloud
chown system system /data/cota/cloud
restorecon_recursive /data/cota/cloud
#Create directory for cache/fotapkg
mkdir /cache/fotapkg 0771 system system
mkdir /data/hotpatch 0755 system cache
restorecon /data/hotpatch
mkdir /data/hotpatch/apkpatchdir 0775 root system
restorecon /data/hotpatch/apkpatchdir
load_data_version_prop
load_data_system_auto_install_props
restorecon /data/custom.bin
restorecon /data/custom_cota.bin
restorecon /data/cust_ver.bin
restorecon /data/test_ver.bin
restorecon /data/product.bin
restorecon /data/test_nv.bin
# Make sure cota update become effect and delete temp files
trigger later_cota_update_action
start cust_from_init
#Zram writeback config files
mkdir /data/system/zram
chown root root /data/system/zram
chmod 700 /data/system/zram
on early-boot
exec u:r:update_wifi_cfg:s0 wifi wifi -- /system_ext/bin/update_wifi_cfg.sh
on property:ro.runmode=factory
chmod 0664 /dev/block/sdc
chown root system /dev/block/sdc
chmod 0775 /data/media/0/Music
chmod 0775 /data/media/0/Pictures
chown media_rw media_rw /data/media/0
chown media_rw media_rw /data/media/0/Music
chown media_rw media_rw /data/media/0/Pictures
on property:sys.mount_patch=true
umount /patch_hn
remove_dm_device patch_hn-verity
mkdir patch_hn
mount ext4 /dev/block/bootdevice/by-name/patch${ro.boot.slot_suffix} /patch_hn wait ro
mount erofs /dev/block/bootdevice/by-name/patch${ro.boot.slot_suffix} /patch_hn wait ro
setprop sys.mount_patch false
on property:sys.boot_completed=1 && property:ro.user_hota_update=1
#update user hota update state in oeminfo, and enture oeminfo_nvm has been working already
# 1: hota first boot start
# 0: hota first boot end
write /dev/kmsg " user_hota_update_oem first boot end++"
#user_hota_update_oem 0
write /dev/kmsg " user_hota_update_oem first boot end--"
service cust_from_init /system/bin/cust_init
user root
group root system cache
oneshot
disabled
seclabel u:r:cust:s0
#regionalphone reset modem setting
on property:sys.regional.resetmodem=1
exec - root -- chmod 666 /proc/ModemNv
write /proc/ModemNv abc
setprop persist.radio.current_version " "
setprop persist.odm.radio.current_version " "
exec - root -- chmod 660 /proc/ModemNv
on property:cota.live_update.handle_version_img=enable
trigger cota_live_update_mount_version_image_action
on property:cota.live_update.set_cust_policy_dirs=enable
trigger cota_live_update_update_cust_policy_action
on later_cota_update_action
later_cota_update
on cota_live_update_mount_version_image_action
cota_live_update_mount_version_image
on cota_live_update_update_cust_policy_action
cota_live_update_update_cust_policy
service cota_verifier /system/bin/cota_verify
user root
group root system cache
oneshot
disabled
on property:mscw.hnouc.update.imgverify=1
start cota_verifier
|