Android developers can now control form factors directly from the terminal using adb emu shortcuts, complementing the Resizable Emulator bundled with Android Studio. The approach aims to speed up testing across multiple devices and configurations by returning control to the invoking shell immediately.
- Target a specific emulator when multiple instances are running by supplying the device’s serial.
- Test foldable-specific journeys by programmatically folding and unfolding the emulator.
- Verify state preservation and layout consistency across display sizes.
HOW THE COMMANDS WORK IN PRACTICE
Developers can leverage fire-and-forget console commands to drive the emulator from the command line, enabling rapid iteration without starting additional emulators. When several emulators are active, a serial argument can be used to select the intended virtual device. TechStaged has also covered Pixel 11 Debuts Real-Time Sign-to-Text Translation for ASL Users.
TESTING FOLDABLE FORM FACTORS PROGRAMMATICALLY
The emulator supports folding and unfolding actions to simulate different physical postures. For example, if a foldable emulator is unfolded, it can be folded to reveal a smaller external display. This capability helps validate how apps adapt to changing screen real estate during user journeys.
Note: not all postures are available for every virtual device; Pixel Fold and the Resizable AVD templates support only certain postures.
- Postures 1, 2, and 3 are supported on standard templates like Pixel Fold and Resizable AVD.
- Attempting to set higher postures (e.g., 4 or 5) can return a KO: Failed to set posture error.
ORIENTATION CHANGES, ROTATIONS, AND STATE RESTORATION
Programmatic device rotations are supported to test how apps handle configuration changes and state restoration. The ability to trigger these changes via the command line helps ensure layouts adapt correctly when orientation shifts occur.
- Rotate the device to test landscape vs portrait layouts.
- Verify that app state remains consistent after rotations.
WHAT THIS MEANS FOR ANDROID DEVELOPERS
The new CLI controls provide a faster workflow for adaptive app development by reducing the need to run multiple emulators in parallel. Developers can focus on verifying layout behavior and feature compatibility across form factors using fewer resources.
RELATED COVERAGE
- Pixel 11 Debuts Real-Time Sign-to-Text Translation for ASL Users
- From Leaderboards to Model Profiles: JetBrains Ties 523 Tasks Across LLMs While Highlighting Divergent Coding Trajectories
- Cloudflare launches Adaptive Intelligence to raise the cost of bot attacks
- New arXiv preprint introduces FedEHR-Agents for Federated EHR Modeling
- Software articles
SOURCES
- Android Developers Blog: Emulator control for adaptive app development Published · Primary source








