forked from openatx/atxserver2-android-provider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-adb.sh
54 lines (43 loc) · 888 Bytes
/
install-adb.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
#!/bin/bash -x
#
# Create: 2018/4/8
# Author: codeskyblue
# System: Linux
set -e
SYSTEM=
case "$(uname -s)" in
Linux)
SYSTEM="linux"
;;
Darwin)
echo "Unsupported Mac platform, run command: brew cask install android-platform-tools"
exit 1
;;
*)
echo "Unsupported system $(uname -s)"
exit 1
;;
esac
TAG=
case "$(uname -m)" in
x86_64)
TAG="linux-amd64"
;;
armv*l)
TAG="linux-armhf"
;;
*)
echo "Unknown arch: $(uname -m)"
exit 1
;;
esac
wget -q "https://github.com/openatx/adb-binaries/raw/master/1.0.40/$TAG/adb" -O /usr/local/bin/adb-tmp
chmod +x /usr/local/bin/adb-tmp
mv /usr/local/bin/adb-tmp /usr/local/bin/adb
if ! test -d /root/.android
then
mkdir -m 0750 /root/.android
fi
cp vendor/keys/adbkey /root/.android/adbkey
cp vendor/keys/adbkey.pub /root/.android/adbkey.pub
adb version