more bugfix

This commit is contained in:
cooperq
2025-05-16 18:18:30 -07:00
committed by Will Greenberg
parent 4b68c30ed3
commit f03f9fcdae
2 changed files with 20 additions and 140 deletions
+10 -8
View File
@@ -2,33 +2,35 @@ $global:adb = "./platform-tools-latest-windows/platform-tools/adb.exe"
$global:serial = ".\installer-windows-x86_64\installer.exe"
function _adb_push {
& $global:adb -d push @args
& $global:adb -d push @args | Out-Null
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
write-host "push exited with exit code $($exitCode)"
}
return $proc.exitcode
return $exitCode
}
function _adb_shell {
& $global:adb -d shell @args
& $global:adb -d shell @args | Out-Null
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
write-host "shell exited with exit code $($exitCode)"
}
return $proc.exitcode
return $exitCode
}
function _wait_for_adb_shell {
do {
start-sleep -seconds 1
} until ((_adb_shell "uname -a") -eq 0)
$success = _adb_shell "uname -a"
} until ($success -eq 0)
}
function _wait_for_atfwd_daemon {
do {
start-sleep -seconds 1
} until ((_adb_shell "pgrep atfwd_daemon") -eq 0)
$success = _adb_shell "pgrep atfwd_daemon"
} until ($success -eq 0)
}
function force_debug_mode {
@@ -97,10 +99,10 @@ function setup_rayhunter {
function test_rayhunter {
$URL = "http://localhost:8080"
& $global:adb -d shell forward tcp:8080 tcp:8080
& $global:adb -d forward tcp:8080 tcp:8080
$exitCode = $LASTEXITCODE
if ($exitCode -ne 0) {
write-host "adb forward tcp:8080 tcp:8080 failed with exit code $($proc.exitcode)"
write-host "adb forward tcp:8080 tcp:8080 failed with exit code $($exitCode)"
return
}
write-host "checking for rayhunter server..." -nonewline