Lost a stupid amount of time to this one:
expo run:android --device emulator-5554 kept failing with "Could not find device with name: emulator-5554" even though the emulator was running and adb devices listed it fine. Turns out --device doesn't go through adb at all. Expo builds its own device list (getAttachedDevicesAsync in @expo/cli) and matches against that, which means it wants the AVD name for emulators (like Pixel_7_API_35) and the raw model: value for physical devices (like Pixel_7). The serial adb hands you never matches, and the error makes it sound like the device isn't there. I ended up checking AVD name first, then model, then serial as a fallback.
I hit this while building a mobile panel into my fork of Zed, named Lathe, so I could stop bouncing between Android Studio, a Metro terminal and a logcat tab. It handles the device naming for you now. So, if anyone wants to poke at it: https://github.com/paterschris/lathe. Curious if anyone else has been bitten by this or has a cleaner workaround.
submitted by /u/Opposite_Analysis_24[link] [comments]