Files
fn_registry/bash/functions/infra/android_app_kill.md
T

1.2 KiB

name, kind, lang, domain, version, purity, signature, description, tags, params, output, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags params output uses_functions uses_types returns returns_optional error_type imports tested tests test_file_path file_path
android_app_kill function bash infra 1.0.0 impure android_app_kill([--serial <S>], package: string) -> void Force-stop running app via am force-stop. Multi-emulator via --serial.
android
adb
app
kill
force-stop
name desc
--serial <S> Optional target device/emulator serial. Auto-detected if omitted.
name desc
package App package to force-stop (e.g. com.example.myapp).
Stdout 'killed <pkg> on <serial>'. Exit 0.
adb_wsl_bash_infra
false error_go_core
false
bash/functions/infra/android_app_kill.sh

Ejemplo

# Detener app en el emulador activo
android_app_kill com.example.myapp

# Detener app en un dispositivo concreto
android_app_kill --serial emulator-5554 com.example.myapp

Notas

Usa adb_pick_serial de adb_wsl.sh para resolver el dispositivo objetivo. Si --serial no se pasa, autodetecta el primer device/emulador disponible. Sale con exit 3 si no hay ningun device conectado. am force-stop detiene todos los procesos y servicios de la app de forma inmediata.