EmuLabZip logo EmuLabZip

Android

Last updated · Edit this page on GitHub

EmuLabZip supports Android emulators and physical devices with USB or wireless debugging enabled.

How it connects#

EmuLabZip speaks the ADB host protocol directly to the ADB server on 127.0.0.1:5037, the same server the adb command and Android Studio use. Nothing is installed on the device: every query is a shell command you could run yourself with adb shell.

SettingEffect
ADB_SERVER_SOCKET=tcp:host:portUse another ADB server, for example one forwarded from a remote machine.
ANDROID_ADB_SERVER_PORT=5038Use another local port.
EMULABZIP_ADB=/path/to/adbThe adb binary used to start the server when it is not running.
ANDROID_HOME, ANDROID_SDK_ROOTWhere to look for the SDK.

What is collected#

FeatureSource
Device listhost:devices-l, then getprop on each online device
NameThe AVD name for emulators (ro.boot.qemu.avd_name), the model otherwise
Overviewgetprop, wm size, wm density, dumpsys battery, /proc/meminfo, uname -r, df (one batched call)
Appspm list packages -3 and -s, with process ids from ps -A
Logslogcat -v threadtime -T <history>
Screenshotsscreencap -p over exec: so the PNG is not altered

Device states#

StateMeaning
OnlineBooted and ready.
BootingConnected, but sys.boot_completed is not set yet. EmuLabZip waits for it.
UnauthorizedAccept the Allow USB debugging prompt on the device.
OfflineThe ADB server lost the device. Restart the emulator, or run adb reconnect.

Tips#

  • Emulators running Google Play images are user builds: run-as works only for debuggable apps, which matters for the Storage tools in Phase 2.
  • Several emulators can run at once; switch between them with the device picker.