blob: 127c74a1d8a316a14d7cf7aa4a0ae08dcf903648 [file] [log] [blame]
Joel Fernandes6c1ca312018-03-30 17:13:15 -07001#!/bin/bash -e
Joel Fernandesefe6c4c2018-04-01 21:24:02 -07002#
Joel Fernandes1ed30d72018-05-18 14:08:20 -07003# (c) Joel Fernandes <joel@joelfernandes.org>
Joel Fernandesefe6c4c2018-04-01 21:24:02 -07004
Joel Fernandes5ac823f2018-07-08 14:04:31 -07005VERSION=v0.99e
Joel Fernandesa67be0b2018-04-01 13:40:34 -07006
Joel Fernandes464193e2018-04-02 23:54:49 -07007spath="$(dirname "$(readlink -f "$0")")"
8# spath=$( cd "$(dirname "$0")" ; pwd -P )
Joel Fernandes4fb97ea2018-03-31 11:15:19 -07009curdir=$( pwd -P )
Joel Fernandes4e19ccd2018-07-08 17:23:07 -070010source $spath/utils/support
Joel Fernandesca8fb552018-04-01 13:48:16 -070011source $spath/utils/banners
Joel Fernandes83676b12018-03-30 23:33:47 -070012
Joel Fernandes6c1ca312018-03-30 17:13:15 -070013# Set default vars
Joel Fernandesf0c54092018-04-01 19:05:10 -070014DISTRO=buster; ARCH=arm64
Joel Fernandes02939a32018-04-02 22:18:10 -070015ADB="adb"
Joel Fernandesfdc52002018-07-08 18:49:20 -070016SKIP_DEVICE=0 # Skip device preparation
Joel Fernandesf0c54092018-04-01 19:05:10 -070017
18# Default packages
Joel Fernandes (Google)4f711082018-05-29 16:23:15 -070019DEFAULT_PACKAGES+="bash
20ca-certificates"
21
Joel Fernandes (Google)4b216fd2018-05-29 12:33:27 -070022EXTRA_FILES="none"
Joel Fernandes6c1ca312018-03-30 17:13:15 -070023
Joel Fernandesab5f9282018-04-05 22:53:23 -070024config_full_build() {
Joel Fernandes (Google)d7f21f12018-05-27 20:19:51 -070025 for f in $(ls $spath/packages); do source $spath/packages/$f; done;
Joel Fernandesab5f9282018-04-05 22:53:23 -070026}
27
Joel Fernandes6c1ca312018-03-30 17:13:15 -070028# Parse command line parameters
Joel Fernandes5b4be9c2018-03-30 23:58:27 -070029if [ $# -lt 1 ]; then usage; fi; POSITIONAL=()
Joel Fernandes4fb97ea2018-03-31 11:15:19 -070030while [[ $# -gt 0 ]]; do key="$1";
Joel Fernandesccb993f2018-07-02 19:59:04 -070031
32# If its shell mode, any future args become shell's args
33if [ "x$ASHELL" == "x1" ]; then
34 if [ -z "$SHELL_ARGS" ]; then
35 SHELL_ARGS=$key
36 else
37 SHELL_ARGS="$SHELL_ARGS $key"
38 fi
39 shift || true; continue
40fi
41
Joel Fernandes6c1ca312018-03-30 17:13:15 -070042case $key in
Joel Fernandes (Google)448a1742018-05-29 12:23:18 -070043 prepare) PREPARE=1; shift || true; ;;
Joel Fernandese2a04662018-03-31 19:33:23 -070044 shell) ASHELL=1; shift || true; ;;
Joel Fernandesb4c80a62018-04-02 22:37:22 -070045 remove) REMOVE=1; shift || true; ;;
Erick Reyese25caea2018-06-19 15:42:59 -070046 git-pull) GIT_PULL=1; shift || true; ;;
47 pull) PULL=1; shift || true; break ;;
Erick Reyes5104a6c2018-06-27 15:31:58 -070048 push) PUSH=1; shift || true; break ;;
Joel Fernandes (Google)08d1a072018-05-28 13:29:03 -070049 --arch) ARCH=$2; shift || true; shift || true; ;;
Joel Fernandes9f00bf42018-04-01 10:36:33 -070050 --archive) TARF=$2; shift || true; shift || true; ;;
Joel Fernandes4fb97ea2018-03-31 11:15:19 -070051 --tracers) source $spath/packages/tracers; shift || true; ;;
52 --compilers) source $spath/packages/compilers; shift || true; ;;
53 --editors) source $spath/packages/editors; shift || true; ;;
54 --scheduler) source $spath/packages/scheduler; shift || true; ;;
Joel Fernandesab5f9282018-04-05 22:53:23 -070055 --fullbuild) config_full_build; shift || true; ;;
Joel Fernandesa67be0b2018-04-01 13:40:34 -070056 --download) DOWNLOAD=1; shift || true; ;;
Joel Fernandes100c4682018-04-01 20:09:57 -070057 --bcc) source $spath/packages/bcc; shift || true; ;;
Joel Fernandes5b4be9c2018-03-30 23:58:27 -070058 --kernelsrc) KERNELSRC="$2"; shift || true; shift || true; ;;
Joel Fernandes (Google)1171d2d2018-05-30 17:22:09 -070059 --skip-install) SKIP_INSTALL=1; shift || true; ;;
Joel Fernandes1ed30d72018-05-18 14:08:20 -070060 --kernel-headers-targz) KERNELHDRS=$2; shift || true; shift || true; ;;
Joel Fernandese2a04662018-03-31 19:33:23 -070061 --tempdir) TDIR="$2"; shift || true; shift || true; ;;
Joel Fernandes97958e12018-03-31 23:51:44 -070062 --buildtar) TARDIR="$2"; shift || true; shift || true; ;;
Joel Fernandes02939a32018-04-02 22:18:10 -070063 --device|-s) ADB="$ADB -s $2"; shift || true; shift || true; ;;
Joel Fernandesfdc52002018-07-08 18:49:20 -070064 --build-image) BI=1; BUILD_IMAGEF=$2; SKIP_DEVICE=1; shift || true; shift || true; ;;
Joel Fernandesca8fb552018-04-01 13:48:16 -070065 --debug) set -x; shift || true; ;;
Joel Fernandes112243b2018-07-08 17:42:48 -070066 *) c_error "Unknown option ($1)"; usage; ;;
Joel Fernandes6c1ca312018-03-30 17:13:15 -070067esac
68done
69
Erick Reyese25caea2018-06-19 15:42:59 -070070if [ ! -z "$GIT_PULL" ]; then
Joel Fernandes112243b2018-07-08 17:42:48 -070071 c_info "Updating androdeb by git pull"
Joel Fernandes16371152018-04-05 22:50:36 -070072 cd $spath
73 git pull
Joel Fernandes112243b2018-07-08 17:42:48 -070074 c_info "Done."
Joel Fernandes16371152018-04-05 22:50:36 -070075 exit 0
76fi
77
Erick Reyese25caea2018-06-19 15:42:59 -070078if [ ! -z "$PULL" ]; then
79 if [ $1 == "-a" ]; then
80 PRESERVE="-a"
Joel Fernandes112243b2018-07-08 17:42:48 -070081 c_info "Preserving filestamps and mode"
Erick Reyese25caea2018-06-19 15:42:59 -070082 shift || true
83 fi
Erick Reyes5104a6c2018-06-27 15:31:58 -070084 file_count=`count_sources $@`
Erick Reyese25caea2018-06-19 15:42:59 -070085 i=0
86 while [ $i -lt $file_count ]; do
87 files["$i"]=/data/androdeb/debian/$1
88 shift || true
89 i=$((i + 1))
90 done
91 $ADB pull $PRESERVE "${files[@]}" "$@"
92 exit 0
93fi
94
Erick Reyes5104a6c2018-06-27 15:31:58 -070095if [ ! -z "$PUSH" ]; then
Erick Reyes5104a6c2018-06-27 15:31:58 -070096 file_count=`count_sources $@`
97 i=0
98 while [ $i -lt $file_count ]; do
99 files["$i"]=$1
100 shift || true
101 i=$((i + 1))
102 done
103 dest=/data/androdeb/debian/$1
104 $ADB push $sync "${files[@]}" $dest
105 exit 0
106fi
107
Joel Fernandes9649a262018-07-02 20:49:41 -0700108if [ -z "$ASHELL" ] && [ -z "$REMOVE" ] && [ -z "$PACKAGES" ]; then
Joel Fernandes112243b2018-07-08 17:42:48 -0700109 c_info "No packages specified, so I'm going to build/install all packages (--fullbuild)"
Joel Fernandes (Google)9c3ae932018-05-28 14:34:48 -0700110 config_full_build
111fi
112
Joel Fernandes97958e12018-03-31 23:51:44 -0700113if [[ ! -z ${TARDIR+x} ]] && [[ ! -d $TARDIR ]]; then die 7 "Tar dir specified doesn't exist"; fi
Joel Fernandes92057762018-03-31 23:38:43 -0700114
Joel Fernandesfdc52002018-07-08 18:49:20 -0700115if [ -z $BI ]; then
Joel Fernandesc26696d2018-07-08 18:28:12 -0700116 do_adb_root "$ADB"
Joel Fernandesaf07ec72018-04-02 22:01:19 -0700117
Joel Fernandesc26696d2018-07-08 18:28:12 -0700118 if [ $? -ne 0 ]; then
119 c_error "adb root failed, make sure:"
120 c_error " * If multiple devices connected, provide --device <serialno> (or -s <serialno>)"
121 c_error " * Try to run \"adb root\" manually and see if it works. Typically this needs a userdebug build."
122 c_error ""
123 c_error "Note: adb can be typically obtained using the android-tools-adb or the adb"
124 c_error "packages on your distro, or by installing the Android SDK."
125 die 3 "Exiting."
126 fi
Joel Fernandesfdc52002018-07-08 18:49:20 -0700127else
128 [ ! -z $BUILD_IMAGEF ] || die 8 "--build-image passed but no image file provided"
Joel Fernandes (Google)9c3ae932018-05-28 14:34:48 -0700129fi
Joel Fernandes72656c52018-03-31 20:35:33 -0700130
Joel Fernandesb4c80a62018-04-02 22:37:22 -0700131if [ ! -z "$REMOVE" ]; then
132 die_if_no_androdeb "Nothing to remove."
Joel Fernandes (Google)7c8b1082018-06-25 12:29:10 -0700133 $ADB shell /data/androdeb/device-umount-all || true;
Joel Fernandesb4c80a62018-04-02 22:37:22 -0700134 $ADB shell rm -rf /data/androdeb; exit 0; fi
135
Joel Fernandes83676b12018-03-30 23:33:47 -0700136##########################################################
Joel Fernandese2a04662018-03-31 19:33:23 -0700137# SHELL
Joel Fernandes83676b12018-03-30 23:33:47 -0700138##########################################################
Joel Fernandese381ac72018-03-31 21:46:36 -0700139if [ ! -z ${ASHELL+x} ]; then
Joel Fernandes02939a32018-04-02 22:18:10 -0700140 set +e; $ADB shell ls /data/androdeb/debian/.bashrc > /dev/null 2>&1
Joel Fernandesc9646812018-03-31 19:45:46 -0700141 if [ $? -ne 0 ]; then
142 die 2 "Device doesn't have an androdeb environment, run \"./androdeb prepare\" first";
143 fi; set -e
144
Joel Fernandesccb993f2018-07-02 19:59:04 -0700145 if [ ! -z ${SHELL_ARGS+x} ]; then
146 # Explanation of quotes:
147 # Outer quote is so that androdeb's bash passes the SHELL_ARGS as a single
148 # argument to $ADB shell. Inner quotes is so that run-command can receive all
149 # the args even though they may be separated by spaces. \m/
150 $ADB shell -t /data/androdeb/run-command "\"$SHELL_ARGS\""
151 else
152 $ADB shell -t /data/androdeb/run
153 fi
154
Joel Fernandese2a04662018-03-31 19:33:23 -0700155 exit 0
156fi
157
158##########################################################
159# PREPARE
160##########################################################
Joel Fernandesf0c54092018-04-01 19:05:10 -0700161
162function do_cleanup() {
163 rm -rf $TDIR/*; if [ $MKTEMP -eq 1 ]; then rm -rf $TDIR; fi
164}
165
166function push_unpack_headers() {
Joel Fernandesb4c80a62018-04-02 22:37:22 -0700167 die_if_no_androdeb "Couldn't update headers."
Joel Fernandesf0c54092018-04-01 19:05:10 -0700168
Joel Fernandesf95f2b22018-07-08 17:54:47 -0700169 c_info "Storing kernel headers into androdeb /kernel-headers/"
Joel Fernandes02939a32018-04-02 22:18:10 -0700170 $ADB shell rm -rf /data/androdeb/debian/kernel-headers/
171 $ADB shell mkdir /data/androdeb/debian/kernel-headers/
Joel Fernandesf95f2b22018-07-08 17:54:47 -0700172 run_quiet $ADB push $TDIR_ABS/kh.tgz /data/androdeb/
Joel Fernandes02939a32018-04-02 22:18:10 -0700173 $ADB shell tar -xvf /data/androdeb/kh.tgz -C /data/androdeb/debian/kernel-headers/ > /dev/null
174 $ADB shell rm /data/androdeb/kh.tgz
Joel Fernandesf0c54092018-04-01 19:05:10 -0700175}
176
Joel Fernandes1ed30d72018-05-18 14:08:20 -0700177function push_unpack_tarred_headers() {
178 die_if_no_androdeb "Couldn't update headers."
179
180 $ADB shell rm -rf /data/androdeb/debian/kernel-headers/
181 $ADB shell mkdir /data/androdeb/debian/kernel-headers/
Joel Fernandesf95f2b22018-07-08 17:54:47 -0700182
183 c_info "Pushing headers tar onto device"
184 run_quiet $ADB push $1 /data/androdeb/
185
Joel Fernandes112243b2018-07-08 17:42:48 -0700186 c_info "Storing kernel headers into androdeb root directory"
Joel Fernandes1ed30d72018-05-18 14:08:20 -0700187 $ADB shell tar -xvf /data/androdeb/$(basename $1) -C /data/androdeb/debian/ > /dev/null
188
189 $ADB shell rm /data/androdeb/$(basename $1)
190}
191
Joel Fernandes72065112018-04-01 20:02:53 -0700192function all_done_banner() {
Joel Fernandes112243b2018-07-08 17:42:48 -0700193 c_info "All done! Run \"androdeb shell\" to enter environment"
Joel Fernandes72065112018-04-01 20:02:53 -0700194}
195
Joel Fernandes72656c52018-03-31 20:35:33 -0700196# Prepare is the last command checked
Joel Fernandes9f00bf42018-04-01 10:36:33 -0700197if [ -z "$PREPARE" ]; then usage; fi
Joel Fernandes72656c52018-03-31 20:35:33 -0700198
Joel Fernandes1ed30d72018-05-18 14:08:20 -0700199if [ ! -z "$TARF" ] && [ ! -f $TARF ] && [ -z "$DOWNLOAD" ]; then die 5 "archive provided doesn't exist"; fi
Joel Fernandes9f00bf42018-04-01 10:36:33 -0700200
Joel Fernandes1ed30d72018-05-18 14:08:20 -0700201if [ ! -z "$KERNELSRC" ] && [ ! -d $KERNELSRC ]; then die 6 "Kernel source directory provided doesn't exist"; fi
202
203if [ ! -z "$KERNELHDRS" ] && [ ! -f $KERNELHDRS ]; then die 7 "Kernel headers tar.gz doesn't exist"; fi
Joel Fernandese2a04662018-03-31 19:33:23 -0700204
Joel Fernandesca8fb552018-04-01 13:48:16 -0700205print_prepare_banner
206
Joel Fernandes6c1ca312018-03-30 17:13:15 -0700207# Where do we want to store temporary files
Joel Fernandese2a04662018-03-31 19:33:23 -0700208MKTEMP=0; if [[ -z ${TDIR+x} ]] || [[ ! -d "${TDIR}" ]]; then
209 TDIR=`mktemp -d`; MKTEMP=1; fi
Joel Fernandese381ac72018-03-31 21:46:36 -0700210rm -rf $TDIR/*
211TDIR_ABS=$( cd "$TDIR" ; pwd -P )
Joel Fernandes6c1ca312018-03-30 17:13:15 -0700212
Joel Fernandesa67be0b2018-04-01 13:40:34 -0700213if [ ! -z "$DOWNLOAD" ]; then
Joel Fernandes112243b2018-07-08 17:42:48 -0700214 c_info "Downloading Androdeb from the web..."; c_info ""
Joel Fernandes (Google)9e670aa2018-06-25 13:39:34 -0700215 # Github dropped tar gz support! ##?#??#! Now we've to zip everything.
216 curl -L https://github.com/joelagnel/androdeb/releases/download/$VERSION/androdeb-fs.tgz.zip --output $TDIR_ABS/androdeb-fs.tgz.zip;
217 unzip -e $TDIR_ABS/androdeb-fs.tgz.zip -d $TDIR_ABS/
Joel Fernandesa67be0b2018-04-01 13:40:34 -0700218 TARF=$TDIR_ABS/androdeb-fs.tgz; fi
219
Joel Fernandese2a04662018-03-31 19:33:23 -0700220OUT_TMP=$TDIR/debian; rm -rf $OUT_TMP; mkdir -p $OUT_TMP
Joel Fernandesf0c54092018-04-01 19:05:10 -0700221
Joel Fernandes1ed30d72018-05-18 14:08:20 -0700222# Unpack the supplied kernel headers tar.gz directly into androdeb root
223if [ ! -z "$KERNELHDRS" ]; then
Joel Fernandes112243b2018-07-08 17:42:48 -0700224 c_info "Building updating kernel headers from supplied tar.gz ($KERNELHDRS)"
Joel Fernandes1ed30d72018-05-18 14:08:20 -0700225
226 # Is header tar gz update the only thing left to do?
Joel Fernandes (Google)1171d2d2018-05-30 17:22:09 -0700227 if [[ ! -z "$SKIP_INSTALL" ]]; then
Joel Fernandes112243b2018-07-08 17:42:48 -0700228 c_info "Skipping install"
Joel Fernandes1ed30d72018-05-18 14:08:20 -0700229 push_unpack_tarred_headers $KERNELHDRS; do_cleanup; all_done_banner; exit 0; fi
230
231 tar -xvf $KERNELHDRS -C $OUT_TMP/ > /dev/null
232fi
233
Joel Fernandesf0c54092018-04-01 19:05:10 -0700234# Package kernel headers
235if [ ! -z "$KERNELSRC" ]; then
Joel Fernandes112243b2018-07-08 17:42:48 -0700236 c_info "Building and updating kernel headers from kernel source dir ($KERNELSRC)"
Joel Fernandes72065112018-04-01 20:02:53 -0700237 $spath/bcc/build-kheaders-targz.sh ${KERNELSRC} $TDIR_ABS/kh.tgz > /dev/null
238
Joel Fernandesf0c54092018-04-01 19:05:10 -0700239 # Is header update the only thing left to do?
Joel Fernandes (Google)1171d2d2018-05-30 17:22:09 -0700240 if [[ ! -z "$SKIP_INSTALL" ]]; then
Joel Fernandes112243b2018-07-08 17:42:48 -0700241 c_info "Skipping install"
Joel Fernandes72065112018-04-01 20:02:53 -0700242 push_unpack_headers; do_cleanup; all_done_banner; exit 0; fi
Joel Fernandesf0c54092018-04-01 19:05:10 -0700243
Joel Fernandese381ac72018-03-31 21:46:36 -0700244 mkdir $OUT_TMP/kernel-headers
Joel Fernandes72065112018-04-01 20:02:53 -0700245 tar -xvf $TDIR_ABS/kh.tgz -C $OUT_TMP/kernel-headers/ > /dev/null
Joel Fernandese381ac72018-03-31 21:46:36 -0700246fi
Joel Fernandes4fb97ea2018-03-31 11:15:19 -0700247
Joel Fernandesf0c54092018-04-01 19:05:10 -0700248# Build FS from existing tar, very simple.
Joel Fernandes9f00bf42018-04-01 10:36:33 -0700249if [ ! -z "$TARF" ]; then
Joel Fernandes112243b2018-07-08 17:42:48 -0700250 c_info "Using archive at $TARF for filesystem preparation"
Joel Fernandes02939a32018-04-02 22:18:10 -0700251 $ADB shell mkdir -p /data/androdeb/
Joel Fernandesf95f2b22018-07-08 17:54:47 -0700252
253 c_info "Pushing filesystem to device.."
254 run_quiet $ADB push $TARF /data/androdeb/deb.tar.gz
255
256 c_info "Pushing addons to device.."
257 run_quiet $ADB push $spath/addons/* /data/androdeb/
258
259 c_info "Unpacking filesystem in device.."
260 run_quiet $ADB shell /data/androdeb/device-unpack
Joel Fernandes9f00bf42018-04-01 10:36:33 -0700261
Joel Fernandes1ed30d72018-05-18 14:08:20 -0700262 if [ ! -z "$KERNELHDRS" ]; then push_unpack_tarred_headers $KERNELHDRS; fi
Joel Fernandesf0c54092018-04-01 19:05:10 -0700263 if [ ! -z "$KERNELSRC" ]; then push_unpack_headers; fi
264
Joel Fernandes72065112018-04-01 20:02:53 -0700265 do_cleanup; all_done_banner; exit 0
Joel Fernandesf0c54092018-04-01 19:05:10 -0700266fi
267
268PACKAGES+="$DEFAULT_PACKAGES"
Joel Fernandes112243b2018-07-08 17:42:48 -0700269c_info "Using temporary directory: $TDIR"
Joel Fernandes4fb97ea2018-03-31 11:15:19 -0700270
Joel Fernandes112243b2018-07-08 17:42:48 -0700271if [[ $EUID -ne 0 ]]; then c_info "The next stage runs as sudo, please enter password if asked."; fi
Joel Fernandes4fb97ea2018-03-31 11:15:19 -0700272
Joel Fernandes (Google)57b3fd22018-05-29 16:27:03 -0700273ex_files=$(mktemp); echo $EXTRA_FILES > $ex_files
274
Joel Fernandes (Google)4f711082018-05-29 16:23:15 -0700275sudo $spath/buildstrap $ARCH $DISTRO $TDIR $OUT_TMP \
276 "$(make_csv "$PACKAGES")"\
Joel Fernandesfdc52002018-07-08 18:49:20 -0700277 $ex_files $INSTALL_BCC $SKIP_DEVICE
Joel Fernandes (Google)57b3fd22018-05-29 16:27:03 -0700278rm $ex_files
Joel Fernandes (Google)9c3ae932018-05-28 14:34:48 -0700279
280# If we only wanted to prepare a rootfs and don't have
281# a device connected, then just echo that and skip cleanup
Joel Fernandesfdc52002018-07-08 18:49:20 -0700282if [ $SKIP_DEVICE -eq 1 ]; then
283 c_info "Device preparation is being skipped for the selected options"
Joel Fernandesba7214e2018-07-08 18:15:49 -0700284 c_info "any builds that need to happen on device may be cloned but not built."
Joel Fernandes (Google)9c3ae932018-05-28 14:34:48 -0700285 sudo $spath/buildimage $OUT_TMP $(dirname $BUILD_IMAGE)/$(basename $BUILD_IMAGE)
286 sudo chmod a+rw $(dirname $BUILD_IMAGE)/$(basename $BUILD_IMAGE)
Joel Fernandesba7214e2018-07-08 18:15:49 -0700287
288 do_cleanup
289 c_info "Your .img has been built! Enjoy!"; exit 0
Joel Fernandes (Google)9c3ae932018-05-28 14:34:48 -0700290fi
Joel Fernandes4dd60862018-03-31 13:27:16 -0700291
292# Push tar to device and start unpack
Joel Fernandes02939a32018-04-02 22:18:10 -0700293$ADB shell mkdir -p /data/androdeb/
294$ADB push $TDIR/deb.tar.gz /data/androdeb/
295$ADB push $spath/addons/* /data/androdeb/
296$ADB shell /data/androdeb/device-unpack
Joel Fernandesb61d27d2018-03-31 11:59:45 -0700297
Joel Fernandes6f1c70f2018-03-31 20:26:26 -0700298# Build BCC and install bcc on device if needed
299if [[ ! -z ${INSTALL_BCC+x} ]]; then
Joel Fernandes02939a32018-04-02 22:18:10 -0700300$ADB shell /data/androdeb/run-command /bcc-master/build-bcc.sh; fi
Joel Fernandes4fb97ea2018-03-31 11:15:19 -0700301
Joel Fernandesf0c54092018-04-01 19:05:10 -0700302do_cleanup
Joel Fernandese381ac72018-03-31 21:46:36 -0700303
Joel Fernandes97958e12018-03-31 23:51:44 -0700304# Extract a tar of the built, compiled and installed androdeb env
305if [[ ! -z ${TARDIR+x} ]]; then
Joel Fernandes112243b2018-07-08 17:42:48 -0700306 c_info "Creating and pulling tarball of androdeb env from device"
Joel Fernandes02939a32018-04-02 22:18:10 -0700307 $ADB shell /data/androdeb/build-debian-tar
308 $ADB pull /data/androdeb/androdeb-fs.tgz $TARDIR/
309 $ADB shell rm /data/androdeb/androdeb-fs.tgz; fi
Joel Fernandes97958e12018-03-31 23:51:44 -0700310
Joel Fernandes72065112018-04-01 20:02:53 -0700311all_done_banner