Android emulator doesn't take keyboard input - SDK tools rev 20
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
When the Android emulator launches but ignores your physical keyboard, the problem is usually not your app. It is typically an emulator or AVD configuration issue, especially in older SDK toolchains where hardware-keyboard support could be disabled or behave inconsistently.
Check whether the AVD is configured to use a hardware keyboard
On older Android emulator setups, keyboard forwarding depends on the AVD configuration. If the virtual device was created without hardware keyboard support, the emulator may show a text field but never accept host typing the way you expect.
The setting that matters in old-style AVD config is often:
You can find it in the AVD's config.ini file. A typical path on macOS or Linux looks like:
If the file says hw.keyboard=no, change it to yes, save the file, and restart the emulator.
Make sure the emulator window actually has focus
This sounds trivial, but it is a real cause of the symptom. On some older emulator builds, keyboard events only go to the guest if the emulator display itself has focus. If you are interacting with an extended-controls window, a host IDE, or another tool window, typing may never reach the Android guest.
A quick test is:
- 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 does not work, the issue is more likely configuration than simple focus.
Verify the Android-side input settings
Inside the emulator, Android still has its own language and input settings. 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 visible and enabled if the image supports that UI. This does not fix every emulator bug, but it rules out guest-side misconfiguration.
Recreate the AVD if the config is stale
SDK Tools Rev 20 is old enough that stale AVD definitions are a realistic cause. If the AVD was created under an earlier emulator state and then partially upgraded, the quickest fix is often to delete and recreate the virtual device with clean settings.
That is especially reasonable if:
- the AVD was copied between machines
- the system image changed under it
- multiple old emulator settings have accumulated
A fresh AVD often fixes input quirks faster than trying to salvage every legacy setting.
Update the emulator tools when possible
Even if the original problem appeared in SDK Tools Rev 20, the long-term answer is usually to update the emulator and platform tools rather than debugging an old bug forever. Older Android emulator builds had more host integration issues around graphics, focus, and input forwarding than current releases.
If the project is not locked to historical tooling, use the SDK manager and move to a newer emulator package. That changes the problem from "work around an old emulator bug" to "use supported behavior."
Common Pitfalls
The most common mistake is changing app code or EditText behavior when the emulator itself is not receiving keyboard events. If the same app works on a real device, suspect the emulator first.
Another mistake is ignoring the AVD config file. On older setups, hw.keyboard is often the deciding setting, and if it is off, no amount of tapping text fields will fix the problem.
Developers also forget that the emulator must have focus. Older emulator windows were more fragile about where keyboard events were routed.
Finally, do not keep patching a badly broken legacy AVD forever. Recreating it is often the fastest clean fix.
Summary
- Physical keyboard input in the Android emulator is usually controlled by emulator and AVD settings, not app code.
- Check the AVD
config.iniand ensurehw.keyboard=yes. - Make sure the emulator display has focus and that Android input settings are sane.
- Recreate the AVD if the configuration is stale or inconsistent.
- If possible, update beyond old SDK tool revisions instead of debugging legacy emulator bugs indefinitely.

