From c26696d47d2f4c832a6ba198a43818cdd75b7475 Mon Sep 17 00:00:00 2001 From: Joel Fernandes Date: Sun, 8 Jul 2018 18:28:12 -0700 Subject: [PATCH] androdeb: Improve adb-root failure message Signed-off-by: Joel Fernandes --- androdeb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/androdeb b/androdeb index 1d64252..a489835 100755 --- a/androdeb +++ b/androdeb @@ -112,12 +112,17 @@ fi if [[ ! -z ${TARDIR+x} ]] && [[ ! -d $TARDIR ]]; then die 7 "Tar dir specified doesn't exist"; fi if [ -z "$BUILD_IMAGE" ]; then -do_adb_root "$ADB" || die 3 "adb root failed, make sure: -- If multiple devices connected, provide --device (or -s ) -- Try to run \"adb root\" manually and see if it works. Typically this needs a userdebug build. + do_adb_root "$ADB" -Note: adb can be typically obtained using the android-tools-adb or the adb -packages on your distro, or by installing the Android SDK." + if [ $? -ne 0 ]; then + c_error "adb root failed, make sure:" + c_error " * If multiple devices connected, provide --device (or -s )" + c_error " * Try to run \"adb root\" manually and see if it works. Typically this needs a userdebug build." + c_error "" + c_error "Note: adb can be typically obtained using the android-tools-adb or the adb" + c_error "packages on your distro, or by installing the Android SDK." + die 3 "Exiting." + fi fi if [ ! -z "$REMOVE" ]; then