-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathpush-fileset
executable file
·45 lines (33 loc) · 1.13 KB
/
push-fileset
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
#!/bin/bash
set -e
base_suffix=.
source "$(dirname "$(readlink -f "$0")")/$base_suffix/.global"
if [ "$1" == "" ]; then
usage "push-fileset <fileset-dir> [ <adb-option> ... ]"
fi
fileset_dir="${1%/}"
adb_options=( "${@:2}" )
check_fileset "$fileset_dir"
check_adb
run_adb root || true
#run_adb wait-for-device
run_adb remount || true
run_adb push "$fileset_dir/framework.jar" "/system/framework/"
if [ -f "$fileset_dir/framework2.jar" ]; then
run_adb push "$fileset_dir/framework2.jar" "/system/framework/"
fi
# TODO: Support the two versions of core jars that KK devices have.
for file in "${fs_framework_jars[@]}"; do
run_adb push "$fileset_dir/$file" "/system/framework/"
done
for file in "${fs_priv_apps[@]}"; do
run_adb push "$fileset_dir/$file" "/system/priv-app/${file%.apk}/" ||
run_adb push "$fileset_dir/$file" "/system/priv-app/" ||
run_adb push "$fileset_dir/$file" "/system/app/"
done
for file in "${fs_non_priv_apps[@]}"; do
run_adb push "$fileset_dir/$file" "/system/app/${file%.apk}/" ||
run_adb push "$fileset_dir/$file" "/system/app/"
done
echo
echo "*** push-fileset: success"