remove gello
[projets/cm-custom.git] / cm-data / 99-perso.sh.addon
1 #!/sbin/sh
2 #
3 # $S/addon.d/99-perso.sh
4 #
5
6 # we partially use the script at install, we need to have some fallback
7 # if backuptool functions are not present
8 if [ -e /tmp/backuptool.functions ]
9 then
10   . /tmp/backuptool.functions
11 else
12   S=/system
13 fi
14
15 # path is needed when running from recovery (at install)
16 export PATH="${PATH}:$S/bin:$S/xbin"
17
18 list_files() {
19 cat <<EOF
20 etc/init.d/10-perso.sh
21 etc/init.d/afwallstart
22 lib/libjni_latinimegoogle.so
23 priv-app/FDroidPrivileged/FDroidPrivileged.apk
24 usr/share/zoneinfo/tzdata
25 EOF
26 }
27
28 case "$1" in
29   backup)
30     list_files | while read FILE DUMMY; do
31       backup_file $S/"$FILE"
32     done
33   ;;
34   restore)
35     list_files | while read FILE REPLACEMENT; do
36       R=""
37       [ -n "$REPLACEMENT" ] && R="$S/$REPLACEMENT"
38       [ -f "$C/$S/$FILE" ] && restore_file $S/"$FILE" "$R"
39     done
40   ;;
41   pre-backup)
42     # Stub
43   ;;
44   post-backup)
45     # Stub
46   ;;
47   pre-restore)
48     # Stub
49   ;;
50   post-restore)
51     # mute camera
52     chmod 000 $S/media/audio/ui/camera_*.ogg
53     # fix dir permissions
54     chmod 755 $S/priv-app/FDroidPrivileged || echo "FDroidPrivileged not installed as a system app"
55     # remove bloat
56     rm -rf $S/priv-app/AudioFX
57     rm -rf $S/priv-app/CMAccount
58     rm -rf $S/priv-app/CMBugReport
59     rm -rf $S/priv-app/CMUpdater
60     #rm -rf $S/priv-app/CyanogenSetupWizard
61     rm -rf $S/priv-app/ThemeChooser
62     rm -rf $S/priv-app/ThemesProvider
63     rm -rf $S/priv-app/Trebuchet
64     rm -rf $S/app/BasicDreams
65     rm -rf $S/app/Browser
66     rm -rf $S/app/CMWallpapers
67     rm -rf $S/app/Camera2
68     rm -rf $S/app/Eleven
69     rm -rf $S/app/Email
70     rm -rf $S/app/Exchange2
71     rm -rf $S/app/Galaxy4
72     rm -rf $S/app/Gello
73     rm -rf $S/app/HoloSpiralWallpaper
74     rm -rf $S/app/LiveWallpapers
75     rm -rf $S/app/LiveWallpapersPicker
76     rm -rf $S/app/LockClock
77     rm -rf $S/app/NoiseField
78     rm -rf $S/app/PhaseBeam
79     rm -rf $S/app/PhotoPhase
80     rm -rf $S/app/PhotoTable
81     rm -rf $S/app/Profiles
82     #rm -rf $S/app/Snap
83     rm -rf $S/app/Stk
84     rm -rf $S/app/Terminal
85     rm -rf $S/app/VisualizationWallpapers
86     rm -rf $S/app/WAPPushManager
87     rm -rf $S/app/WhisperPush
88   ;;
89 esac