Added another way of checking the AVDs Internet connection

This commit is contained in:
newbit1
2023-08-12 00:24:04 +02:00
parent 38680643ef
commit a585799519
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -371,6 +371,10 @@ rootAVD.bat system-images\android-25\google_apis_playstore\armeabi-v7a\ramdisk.i
</details>
### 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
+6
View File
@@ -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