Skip to content

[Bug]: Device panel shows black bars around an Android emulator with a wm size override #42959

Backlog

Description

@ipanasenko

Note

🤖 Written by Claude Opus 5.5 on behalf of Illia

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

Device panel (Android emulators), web, desktop and mobile clients

Steps to reproduce

  1. Open a Pixel 7 API 34 emulator (1080x2400) in the Device panel.
  2. Run adb shell wm size 904x2316 to emulate a narrower screen, for example a Galaxy Z Fold 5 cover screen, a 21:9 Xperia, or a passport-style foldable.
  3. Look at the 2D or 3D device view.

Expected behavior

The device frame follows the emulated screen, with no black bars, and taps land where you click.

Actual behavior

Android scales the overridden display to fit and centres it inside the physical framebuffer, which serve-emu streams as is. The panel sizes the screen from that framebuffer, so about 72 px of black shows on each side, and the 3D frame keeps the physical proportions. Taps are also off: with serve-emu's default scrcpy input on expo-device-hub 0.26.1, a tap at frame x lands at display pixel x × 1080 in a 904-wide display, so the right part of the screen can't be reached.

Impact

Major degradation or frequent failure: testing layouts for narrow or tall screens with wm size is not usable from the Device panel.

Version or commit

main at c478fde; expo-device-hub 0.26.1.

Environment

macOS, local device host, Android Emulator API 34.

Workaround

Create an AVD with the target resolution (hw.lcd.width / hw.lcd.height) instead of using wm size.

Activity

  1. added
    vouch:trusted
    on Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    vouch:trusted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions