summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fernandes (Google) <joel@joelfernandes.org>2018-10-14 13:14:34 -0700
committerJoel Fernandes (Google) <joel@joelfernandes.org>2018-10-14 13:14:34 -0700
commit5e40e89ded2289b953274d4f44a7ca094377ebd2 (patch)
treed83ba8e94dfb8a97ba5ed887acda6e738008acf1
parent0b3639d1f84de7ccae59cd88ad8a4cd3507dfc19 (diff)
downloadadeb-5e40e89ded2289b953274d4f44a7ca094377ebd2.tar.gz
Fix Qemu image building
The --build-image flag can be used to build images for Qemu. The download_headers function breaks this because it needs to query the kernel version from the device, which is not possible with "--build-image" since there may be no adb-connected device. Just prevent the download_headers from triggering on Qemu images for now. Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
-rwxr-xr-xandrodeb4
1 files changed, 2 insertions, 2 deletions
diff --git a/androdeb b/androdeb
index ee898fb..3600a5b 100755
--- a/androdeb
+++ b/androdeb
@@ -60,7 +60,7 @@ case $key in
--build) DOWNLOAD=0; shift || true; ;;
--buildtar) BTAR=1; DOWNLOAD=0; TARDIR="$2"; shift || true; shift || true; ;;
--device|-s) ADB="$ADB -s $2"; shift || true; shift || true; ;;
- --build-image) BI=1; BUILD_IMAGEF=$2; SKIP_DEVICE=1; shift || true; shift || true; ;;
+ --build-image) BI=1; BUILD_IMAGEF=$2; SKIP_DEVICE=1; DOWNLOAD=0; shift || true; shift || true; ;;
--debug) set -x; shift || true; ;;
*) c_error "Unknown option ($1)"; usage; ;;
esac
@@ -274,7 +274,7 @@ if [ $DOWNLOAD -eq 1 ]; then
TARF=$TDIR_ABS/$FNAME_UZ
fi
-if [ ! -z "$FULL" ] && [ -z "$KERNELSRC" ] && [ -z "$KERNELHDRS" ]; then
+if [ ! -z "$FULL" ] && [ -z "$KERNELSRC" ] && [ -z "$KERNELHDRS" ] && [ -z "$BI" ]; then
c_info "Kernel headers are needed but none were provided. Downloading pre-built headers"
download_headers
fi