From a5857995199607bc63891d793bf3c79bcfda2e2a Mon Sep 17 00:00:00 2001 From: newbit1 Date: Sat, 12 Aug 2023 00:24:04 +0200 Subject: [PATCH] Added another way of checking the AVDs Internet connection --- README.md | 4 ++++ rootAVD.sh | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 2a2be4d..61954e8 100644 --- a/README.md +++ b/README.md @@ -371,6 +371,10 @@ rootAVD.bat system-images\android-25\google_apis_playstore\armeabi-v7a\ramdisk.i ### Change Logs + +#### [August 2023] +* [rootAVD.sh] - Added another way of checking the AVDs Internet connection + #### [July 2023] * [rootAVD.bat] - Fixed file ListAllAVDs not found bug * [rootAVD.bat] - Fixed some errors with double spaces diff --git a/rootAVD.sh b/rootAVD.sh index 000f5c1..8a3958d 100755 --- a/rootAVD.sh +++ b/rootAVD.sh @@ -820,6 +820,12 @@ CheckAVDIsOnline() { $BB timeout 3 $BB wget -q --spider --no-check-certificate http://github.com > /dev/null 2>&1 if [ $? -eq 0 ]; then AVDIsOnline=true + else + echo "[-] Checking AVDs Internet connection another way..." + echo -e "GET http://google.com HTTP/1.0\n\n" | $BB timeout 3 $BB nc -v google.com 80 > /dev/null 2>&1 + if [ $? -eq 0 ]; then + AVDIsOnline=true + fi fi $AVDIsOnline && echo "[!] AVD is online" || echo "[!] AVD is offline" fi