cb6d9e61d1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.7 KiB
1.7 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, notes
| 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 | notes | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| android_emu_battery | function | bash | infra | 1.0.0 | impure | android_emu_battery([--serial <S>], level: int, [--charging <true|false>]) -> void | Simulate battery state on emulator (level + charging). Emulator-only. |
|
|
Stdout 'battery: <N>% [charging=...] on <serial>'. Exit 3 if no device found, exit 1 on other errors. |
|
false | error_go_core | false | bash/functions/infra/android_emu_battery.sh | Util para tests bateria baja, modo ahorro energia. Solo funciona con emuladores (serial emulator-*), no con devices fisicos. |
Ejemplo
# Nivel al 15%, sin cambiar estado de carga
android_emu_battery 15
# Nivel al 5%, forzar descarga (AC off)
android_emu_battery 5 --charging false
# Nivel al 80%, forzar carga (AC on), emulador concreto
android_emu_battery --serial emulator-5554 80 --charging true
Notas
Util para tests de bateria baja y modo ahorro de energia. Solo funciona con emuladores Android
(serial debe empezar con emulator-). No aplica a dispositivos fisicos.
Requiere que adb_wsl.sh este en el mismo directorio. El ADB se resuelve via
ANDROID_SDK_WIN o la ruta por defecto de la instalacion Windows SDK.