package to customize cm12.1
[projets/cm-custom.git] / cm.sh
1 #!/sbin/sh
2
3 set -e
4
5 cd "$(dirname $0)"
6
7 export PATH="${PATH}:/system/bin:/system/xbin"
8
9 # fix swype
10 echo "Fixing SWYPE"
11 rm -f /system/lib/libjni_latinime.so
12 cp cm-data/libjni_latinimegoogle.so /system/lib/libjni_latinimegoogle.so
13 chown root:root /system/lib/libjni_latinimegoogle.so
14 chmod 644 /system/lib/libjni_latinimegoogle.so
15
16 # update timezone infos
17 echo "Upgrading timezones"
18 cp cm-data/tzdata /system/usr/share/zoneinfo/tzdata
19 chown root:root /system/usr/share/zoneinfo/tzdata
20 chmod 644 /system/usr/share/zoneinfo/tzdata
21
22 # disable goolge leaks (204 fetch for captive portal detection, google ntp)
23 echo "Fix google data leaks"
24 # this only work on live android
25 #settings put global captive_portal_server 127.0.0.1
26 #settings put global captive_portal_detection_enabled 0
27 #settings put global ntp_server 127.0.0.1
28 # in recovery, hack into sqlite db
29 sqlite3 /data/data/com.android.providers.settings/databases/settings.db <<EOT
30 UPDATE global SET value = '127.0.0.1' WHERE name = 'captive_portal_server';
31 UPDATE global SET value = '0' WHERE name = 'captive_portal_detection_enabled';
32 UPDATE global SET value = '127.0.0.1' WHERE name = 'ntp_server';
33 EOT
34
35 # CM12.1 remove system apps
36 echo "Remove bloat system apps"
37 rm -rf /system/priv-app/AudioFX
38 rm -rf /system/priv-app/CMAccount
39 rm -rf /system/priv-app/CMBugReport
40 rm -rf /system/priv-app/CMUpdater
41 rm -rf /system/priv-app/CyanogenSetupWizard
42 rm -rf /system/priv-app/ThemeChooser
43 rm -rf /system/priv-app/ThemesProvider
44 rm -rf /system/priv-app/Trebuchet
45 rm -rf /system/app/BasicDreams
46 rm -rf /system/app/Browser
47 rm -rf /system/app/CMWallpapers
48 rm -rf /system/app/Camera2
49 rm -rf /system/app/Eleven
50 rm -rf /system/app/Email
51 rm -rf /system/app/Exchange2
52 rm -rf /system/app/Galaxy4
53 rm -rf /system/app/HoloSpiralWallpaper
54 rm -rf /system/app/LiveWallpapers
55 rm -rf /system/app/LiveWallpapersPicker
56 rm -rf /system/app/LockClock
57 rm -rf /system/app/NoiseField
58 rm -rf /system/app/PhaseBeam
59 rm -rf /system/app/PhotoPhase
60 rm -rf /system/app/PhotoTable
61 rm -rf /system/app/Stk
62 rm -rf /system/app/Terminal
63 rm -rf /system/app/VisualizationWallpapers
64 rm -rf /system/app/WAPPushManager
65 rm -rf /system/app/WhisperPush
66
67 echo "Done"
68 echo "Do not forget to WIPE Cache/Dalvik"
69