-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmooth_android.sh
More file actions
52 lines (43 loc) · 1.17 KB
/
smooth_android.sh
File metadata and controls
52 lines (43 loc) · 1.17 KB
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
#!/bin/bash
# Parameters
MODE="everything-profile"
ANIMATION="0.75"
handle_error() {
echo -e "\e[31m[!] Something went wrong, quitting!\e[0m"
exit 1
}
trap handle_error ERR
msg() {
echo -e "\e[32m[*] $1\e[0m"
}
install() {
msg "Compiling apps as $MODE mode"
adb shell pm compile -a -f -m "$MODE"
adb shell pm compile -a -f compile-layouts
msg "Running the dexopt job to optimize dex"
adb shell pm bg-dexopt-job
msg "Setting up animations as $ANIMATION for smoothness"
adb shell settings put global window_animation_scale $ANIMATION
adb shell settings put global transition_animation_scale $ANIMATION
adb shell settings put global animator_duration_scale $ANIMATION
msg "Done!"
exit 0
}
uninstall() {
msg "Reverting the tweaks"
adb shell pm compile -a -f -r install
adb shell pm bg-dexopt-job
adb shell settings put global window_animation_scale 1.0
adb shell settings put global transition_animation_scale 1.0
adb shell settings put global animator_duration_scale 1.0
msg "Done!"
exit 0
}
if [[ "$1" == "install" ]]; then
install
elif [[ "$1" == "uninstall" ]]; then
uninstall
else
echo "Usage: $0 install/uninstall"
fi
exit 0