forked from emceethemouth/kernel_cancro
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsideload.sh
executable file
·68 lines (60 loc) · 1.35 KB
/
sideload.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/bash
#
# Copyright © 2016, Monish Kapadia "assasin.monish" <[email protected]>
#
# Custom Flash script for ease.
#
# This software is licensed under the terms of the GNU General Public
# License version 2, as published by the Free Software Foundation, and
# may be copied, distributed, and modified under those terms.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# Please maintain this if you use this script or any part of it
#
###########################################################################
#adb
adb reboot recovery
#Path
BUILD_PATH="/home/monish/kernel/builds"
#Branch entry
while read -p "Which branch(cm/miui)? " mchoice
do
case "$mchoice" in
cm|CM )
BUILD_BRANCH="cm"
echo "CM Branch."
break
;;
m|M )
BUILD_BRANCH="miui"
echo "MIUI Branch."
break
;;
* )
echo
echo "Invalid try again!"
echo
;;
esac
done
#Time entry of zip file
read -p "Time? " time
echo "$time"
function adbstart {
echo
adb devices
adb kill-server
sudo adb start-server
adb devices
}
function sideloadstart {
echo
cd $BUILD_PATH
adb sideload ASSASIN-$BUILD_BRANCH-$(date +%d-%m)_$time.zip
}
adbstart
sideloadstart