Android emulator keyboard input not working (SDK Tools rev 20)
Codemia Knowledge Hub ·
When the Android emulator starts but ignores your physical keyboard, the cause is almost always the AVD configuration, not your app. AVDs created with SDK Tools rev 20 often had hardware keyboard support switched off, so the host keyboard was never forwarded. If the same app accepts typing on a real device, stop changing app code or EditText behavior and look at the emulator.
Turn on hw.keyboard in the AVD config
On older emulator setups, keyboard forwarding depends on the AVD configuration. An AVD created without hardware keyboard support may show a text field but never accept typing from the host, and no amount of tapping text fields will change that.
The setting that matters is usually:
It lives in the AVD's config.ini. A typical path on macOS or Linux:
If the file says hw.keyboard=no, change it to yes, save, and restart the emulator.
You can set the same property from the AVD Manager instead of editing the file. In the rev 20 AVD Manager, edit the AVD, click New... in the Hardware section, pick Keyboard support and set it to yes. Later SDK Tools releases show this as a Hardware keyboard present checkbox, and Android Studio's Device Manager has Enable keyboard input under Show Advanced Settings.
Make sure the emulator window has focus
On some older emulator builds, keyboard events only reach the guest when the emulator display itself has focus. If you are clicking in an extended-controls window, your IDE or another tool window, your typing never gets to Android.
To test:
- click directly inside the emulator screen
- tap a text field in the app
- type a few visible characters
If the soft keyboard appears but the physical keyboard still does nothing, the problem is more likely configuration than focus.
Check Android's own input settings
Android inside the emulator has its own language and input settings, and on some system images the physical keyboard can be disabled or configured in a way that hides the behavior you expect.
Open:
and confirm that a hardware keyboard is listed and enabled, if the image has that screen. This will not fix every emulator bug, but it rules out guest-side misconfiguration.
Recreate a stale AVD
SDK Tools rev 20 is old enough that a stale AVD definition is a realistic cause. If the AVD was created under an earlier emulator and then partially upgraded, deleting it and creating a fresh one is often the fastest fix, especially when:
- the AVD was copied between machines
- the system image changed under it
- multiple old emulator settings have accumulated
A new AVD usually fixes input quirks faster than salvaging every legacy setting.
Update the emulator tools
The long-term answer is usually to update the emulator and platform tools rather than work around an old bug. Older emulator builds had more host integration problems with graphics, focus and input forwarding than current releases.
If your project is not tied to historical tooling, use the SDK manager to install a newer emulator package, so you are relying on supported behavior instead of workarounds.
Related reading
- Android Emulator Error Message PANIC Missing emulator engine program for 'x86' CPUS.
- Android Emulator Installation error INSTALL_FAILED_VERSION_DOWNGRADE
- Android Emulator issues in new versions - The emulator process has terminated
- Android emulator not able to access the internet
- Android error Failed to install .apk on device timeout
- Android Facebook integration with invalid key hash
- Android Endless List
- Android equivalent of NSUserDefaults in iOS
.png&w=3840&q=75)
Tackling System Design Interview Problems
A short course that equips you with the skills to approach system design interviews methodically.
Start the free courseNo course covers this one yet
Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.
Build my courseData Structures & Algorithms practice on Codemia
Step through 300+ coding interview problems with animated visualisers that show the data structure changing as the code runs. The Blind 75 are free.