Skip to content

Commit

Permalink
Lançamento da versão 0.1.2 - Adicionado recurso "sempre no topo" na j…
Browse files Browse the repository at this point in the history
…anela de carregamento do Android SDK Emulator
  • Loading branch information
gustavosotnas committed Mar 5, 2015
1 parent 8ee4c22 commit 076ae0f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion avd-launcher/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: avd-launcher
Version: 0.1.1
Version: 0.1.2
Section: devel
Maintainer: Gustavo Moraes <[email protected]>
Homepage: https://github.com/gustavosotnas/avd-launcher
Expand Down
2 changes: 1 addition & 1 deletion avd-launcher/usr/share/avd-launcher/avd-launcher-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# 100 = "No" para fechar

APP_NAME="Android Virtual Device Launcher"
VERSION="0.1.1"
VERSION="0.1.2"
HELP_DESCRIPTION_TEXT="$APP_NAME is a simple tool that allows running the Android SDK emulator without opening Android Studio or using command-line interface (terminal). You can also perform some operations with Android Virtual Device (AVD) opened: Install and Uninstall APKs, copy files to the AVD or AVD to the computer, install Google Apps (Android 4.3+ only) and send adb commands to the AVD."
ADVICE_DESCRIPTION_TEXT="This tool doesn't download or manage AVDs, for that, use \"AVD Manager\"."
APP_AUTHOR="Copyright (C) 2015 Gustavo Moraes http://about.me/gustavosotnas"
Expand Down
4 changes: 3 additions & 1 deletion avd-launcher/usr/share/avd-launcher/avd-launcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# 100 = "No" para fechar

APP_NAME="Android Virtual Device Launcher"
VERSION="0.1.1"
VERSION="0.1.2"
CONFIG_FILE_SDK="$HOME/.config/androidSDK_path.conf"
AVD_FOLDER="$HOME/.android/avd" # Valor padrão (default) - pode ser diferente
HELP_DESCRIPTION_TEXT="$APP_NAME is a simple tool that allows running the Android SDK emulator without opening Android Studio or using command-line interface (terminal). You can also perform some operations with Android Virtual Device (AVD) opened: Install and Uninstall APKs, copy files to the AVD or AVD to the computer, install Google Apps (Android 4.3+ only) and send adb commands to the AVD."
Expand Down Expand Up @@ -203,6 +203,8 @@ load_avd()
EMULATOR_PID=$(ps -xo pid,command | grep emulator | grep --invert-match grep | cut -d'.' -f1) # Nome do processo pode ser "emulator64-x86", "emulator-x86", "emulator-arm", "emulator-mips", etc. ### Poderia usar o comando "pidof", mas a filtragem para obter apenas o nome do processo (sem "PATH" junto) daria um comando enorme, com um monte de pipes (mais LENTO!)
EMULATOR_PSTATE="S"; # Valor inicial ("SLEEPING": apenas para entrar no while)
( # Início do pipe para o zenity
sleep 1;
wmctrl -r "$APP_NAME" -b toggle,above; # Deixa a janela de progresso do zenity "always-on-top"
sleep 4; # Tempo aproximado para o "emulator*" estabilizar seus PSTATES (pra não sair do while antes da hora)
while [ "$EMULATOR_PSTATE" != "R" ] # Enquanto o emulador não estiver no estado "Running" (PROCESS STATE CODES: R -> running or runnable (on run queue); D -> uninterruptible sleep (usually IO); S -> interruptible sleep (waiting for an event to complete); Z -> defunct/zombie, terminated but not reaped by its parent; T -> stopped, either by a job control signal or because it is being traced)
do
Expand Down

0 comments on commit 076ae0f

Please sign in to comment.