forked from A4Alpha/mulch-webview-overlay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path99-mulch-webview.sh
48 lines (44 loc) · 926 Bytes
/
99-mulch-webview.sh
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
#!/sbin/sh
#
# ADDOND_VERSION=2
#
# /system/addon.d/99-mulch-webview-overlay.sh
# During an Android upgrade, this script backs up treble-overlay-mulch-webview.apk,
# located in either /vendor/overlay/ or /system/product/overlay/,
# the partitions are formatted and reinstalled, then the file is restored.
#
# Adapted from 50-cm.sh
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
vendor/overlay/treble-overlay-mulch-webview.apk
product/overlay/treble-overlay-mulch-webview.apk
EOF
}
case "$1" in
backup)
list_files | while read FILE DUMMY; do
backup_file $S/"$FILE"
done
;;
restore)
list_files | while read FILE REPLACEMENT; do
R=""
[ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
[ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac