forked from ivendor/samsung-kernel-msm7x30
-
Notifications
You must be signed in to change notification settings - Fork 7
/
flashkernel
executable file
·85 lines (72 loc) · 1.34 KB
/
flashkernel
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
ShowMenu () {
clear
echo "What version do you want to flash?"
echo "WARNING: ARIESVE/ANCORA ONLY (mmcblk0p8)"
echo " "
echo " "
echo "Please make your choice:"
echo " "
echo " [1] JellyBean v4.1.x"
echo " [2] JellyBean v4.2.x"
echo " "
echo " [x] Exit"
echo " "
}
while [ 1 ]
do
ShowMenu
read CHOICE
case "$CHOICE" in
"1")
clear
echo "Flashing build/4.1.x/output/boot.img to phone"
echo
cd build
echo "Pushing boot.img to sdcard..."
echo
./adb push 4.1.x/output/boot.img /sdcard/boot.img
echo "Flashing boot.img to mmcblk0p8..."
./adb shell dd if=/sdcard/boot.img of=/dev/block/mmcblk0p8
echo
echo "Do you want to wipe cache ? ( y / n )"
read wipecache
if [ ${wipecache} == "y" ];
then
./adb shell rm /cache/dalvik-cache/*
./adb shell rm /data/dalvik-cache/*
fi;
echo "Rebooting Phone..."
./adb reboot
cd ..
exit
;;
"2")
clear
echo "Flashing build/4.2.x/output/boot.img to phone"
echo
cd build
echo "Pushing boot.img to sdcard..."
echo
./adb push 4.2.x/output/boot.img /sdcard/boot.img
echo "Flashing boot.img to mmcblk0p8..."
./adb shell dd if=/sdcard/boot.img of=/dev/block/mmcblk0p8
echo
echo "Do you want to wipe cache ? ( y / n )"
read wipecache
if [ ${wipecache} == "y" ];
then
./adb shell rm /cache/dalvik-cache/*
./adb shell rm /data/dalvik-cache/*
fi;
echo "Rebooting Phone..."
./adb reboot
cd ..
exit
;;
"x")
exit
;;
esac
done
exit