-
Notifications
You must be signed in to change notification settings - Fork 1
/
80-fdroid.sh
executable file
·49 lines (46 loc) · 1.09 KB
/
80-fdroid.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
48
49
#!/sbin/sh
#
# ADDOND_VERSION=4
#
# /system/addon.d/80-fdroid.sh
# During a system upgrade, this script backs up F-Droid client and privext,
# /system is formatted and reinstalled, then the files are restored.
#
. /tmp/backuptool.functions
list_files() {
cat <<EOF
/product/etc/permissions/privapp-permissions-org.fdroid.fdroid.privileged.xml
/product/etc/permissions/privapp-permissions-com.aurora.services.xml
/product/etc/permissions/privapp-permissions-com.google.android.gms.xml
/product/etc/permissions/privapp-permissions-com.android.vending.xml
/product/app/F-Droid/F-Droid.apk
/product/priv-app/F-DroidPrivilegedExtension/F-DroidPrivilegedExtension.apk
/product/priv-app/AuroraServices/AuroraServices.apk
/product/priv-app/GmsCore/GmsCore.apk
/product/priv-app/FakeStore/FakeStore.apk
EOF
}
case "$1" in
backup)
list_files | while read FILE; do
backup_file "$FILE"
done
;;
restore)
list_files | while read FILE; do
restore_file "$FILE"
done
;;
pre-backup)
# Stub
;;
post-backup)
# Stub
;;
pre-restore)
# Stub
;;
post-restore)
# Stub
;;
esac