From: Aditya Aswani Date: Thu, 2 Jun 2022 03:22:28 +0000 (+0530) Subject: Added sdb connect file for bridge connection X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F02%2F275802%2F2;p=sdk%2Femulator%2Fqemu.git Added sdb connect file for bridge connection Change-Id: Iaa6ecb4aa0df383a9ea888affac755bd58ac0b19 Signed-off-by: Aditya Aswani --- diff --git a/tizen/src/Makefile b/tizen/src/Makefile index 5fa5024..dd21768 100755 --- a/tizen/src/Makefile +++ b/tizen/src/Makefile @@ -89,6 +89,7 @@ endif # for bridged network ifdef CONFIG_LINUX cp -pP scripts/emulator-ifup-linux.sh $(EMUL_DIR)/etc/emulator-ifup.sh + cp -pP scripts/emulator-sdb-connect.sh $(EMUL_DIR)/etc/emulator-sdb-connect.sh cp -pP ../supplements/SDK/tizen-sudoers.rules $(EMUL_DIR)/etc endif ifdef CONFIG_DARWIN diff --git a/tizen/src/scripts/emulator-sdb-connect.sh b/tizen/src/scripts/emulator-sdb-connect.sh new file mode 100755 index 0000000..00d7c53 --- /dev/null +++ b/tizen/src/scripts/emulator-sdb-connect.sh @@ -0,0 +1,36 @@ +#!/bin/sh +x + +# $1: device IP +# $2: emulator.log file path +# $3: sdb path + + +if [ "x$1" = "x" ] || [ "x$2" = "x" ] || [ "x$3" = "x" ];then + echo "Incorrect arguments passed" + #IP=192.168.7.2 + #EMULATOR_LOG_PATH=~/tizen-studio-data/emulator/vms/t-0531-1/logs/emulator.log + #SDB_PATH=~/tizen-studio/tools/sdb + exit 1 +else + IP=$1 + EMULATOR_LOG_PATH=$2 + SDB_PATH=$3 +fi + +SUBSTR="boot completed" + +echo "Waiting for the emulator to boot up" +timeout 120s tail -f $EMULATOR_LOG_PATH | sed "/$SUBSTR/ q" + +#RETVALUE="$?" +#echo "Trying sdb connect $1" + +#echo "Return value is $RETVALUE" +#if [ "$RETVALUE" = "124" ];then +# echo "Emulator boot up taking longer than usual. Run the following command to connect to the emulator manually. sdb connect " +# exit 1 +#else + echo "$SDB_PATH connect $IP" + $SDB_PATH connect $IP + exit 0 +#fi