uiautomatorviewer: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On Debian possible default full paths are:

/usr/bin/uiautomatorviewer - from package: androidsdk-uiautomatorviewer

You may install the required package with command apt-get install {package}
Error in other languages:
uiautomatorviewer: bevel nie gevind nie
uiautomatorviewer: comandă negăsită
uiautomatorviewer: comando não encontrado
uiautomatorviewer: commande introuvable
uiautomatorviewer: command not found
uiautomatorviewer: käsku ei ole
uiautomatorviewer: không tìm thấy lệnh
uiautomatorviewer: komanda nerasta
uiautomatorviewer: Kommando nicht gefunden.
uiautomatorviewer: kommandot finns inte
uiautomatorviewer: komut yok
uiautomatorviewer: nie znaleziono polecenia
uiautomatorviewer: níor aimsíodh an t-ordú
uiautomatorviewer: no se encontró la orden
uiautomatorviewer: no s'ha trobat l'ordre
uiautomatorviewer: opdracht niet gevonden
uiautomatorviewer: parancs nem található
uiautomatorviewer: perintah tidak ditemukan
uiautomatorviewer: príkaz nenájdený
uiautomatorviewer: příkaz nenalezen
uiautomatorviewer: команда не найдена
uiautomatorviewer: командата не е открита
uiautomatorviewer: 命令找不到
uiautomatorviewer: コマンドが見つかりません