69

I just downloaded and installed the new Android SDK. When I start the emulator, on the emulator screen it says "Hardward Buttons not enabled in AVD". There are Home, Menu, etc are all disabled. How do I make these buttons enabled?

Emmy
  • 3,789
  • 5
  • 25
  • 30

8 Answers8

103

You'll need to modify the Device Definitions. To do this, find the "Device Definitions" tab in the Android Virtual Device Manager and double click on the device you're using.

Make sure the Buttons are set to Hardware.

enter image description here

Don't forget to update your device settings:

enter image description here

Rowan Freeman
  • 14,151
  • 8
  • 61
  • 96
  • Hi Rowan: Thanks for the quick reply and nice screen shoot. I did what you said, then I restart the emulator, the buttons are still disabled. – Emmy Feb 26 '13 at 22:21
  • 7
    Make sure you edit the virtual device (not the definition now) to specify your cloned definition. I.e. go into your device settings and change "Device" to (in my case) "Galaxy Nexus Custom". – Rowan Freeman Feb 26 '13 at 22:24
  • It works now. Yes, I did not change virtual device. After I did , everything works fine. Thank you! – Emmy Feb 26 '13 at 23:08
  • 4
    Hey i tried the same way but still not got the Hardware keyboard. – Droid Oct 12 '13 at 07:12
  • I suggest you ask a new question. – Rowan Freeman Oct 13 '13 at 21:35
  • I prefer using the keyboard of the PC itself. It uses less screen size this way. For menu, you click F2 (or page-up), for home you press HOME, and for back you press ESC . Here's a list of those keys:http://developer.android.com/tools/help/emulator.html . – android developer Dec 27 '14 at 22:52
39

I know it has been a long time since the question was asked, but just to let the others to know.

You can manually edit the config.ini settings (on Windows 7 you can find it on C:/Users/the_user/.android/avd/the_emulator_name/config.ini).

Find out the line:

hw.mainKeys=no

And change to:

hw.mainKeys=yes

Hope this helps.

tato.rodrigo
  • 2,503
  • 19
  • 25
  • 5
    Thanks, the accepted answer didn't work for me - this one did. On Linux the path is `~/.android/avd//config.ini`. – johndodo Jan 11 '14 at 18:47
  • This works if screen size is lower than 7 inches. Maybe otherwise it is always assumed to be tablet. hw.mainKeys is reported to be "NO" even if i changed it manually in the ini file and restart Eclipse. – WindRider Jun 16 '14 at 08:29
  • 7 inch tablet worked for me, but I had to restart Android Studio before it showed the change. – Fifer Sheep Apr 07 '15 at 15:56
9

To test your application on an emulator that represents the latest Android device, you can create an AVD with the new WXGA720 skin (it's an xhdpi, normal screen device). Note that the emulator currently doesn't support the new on-screen navigation bar for devices without hardware navigation buttons, so when using this skin, you must use keyboard keys Home for the Home button, ESC for the Back button, and F2 or Page-up for the Menu button.

Taken from: http://developer.android.com/tools/revisions/platforms.html

atilacamurca
  • 168
  • 1
  • 10
  • 12
2

For linux I had to use and modify tato.rodrigo's and johndodo's solutions.

edit ~/.android/avd/<emulator name>/config.ini

The values to set are

hw.keyboard=yes

hw.mainKeys=yes

papadp
  • 721
  • 5
  • 13
1

I had to delete my AVD and completely recreate it with the hardware buttons activated in order to make it work. Simply modifying the existing device definition didn't fix it for some reason.

PWiggin
  • 906
  • 2
  • 12
  • 24
1

The accepted answer is kind of deprecated now, because the android emulator interface changed a little bit.

If you need to display hardware buttons on your android emulator you have to uncheck this toggle inside your android emulator setings -> hardware profile:

enter image description here

Tom Wayne
  • 1,176
  • 1
  • 10
  • 23
0

Go to Tool > Android > SDK Manager > Tool >Manage AVDs > Select Your Emulator > Edit and manage your setting and Restart Android Studio

If you don't understood Please follow the link there is details with screenshot image

http://solutionfrominternet.blogspot.com/2015/01/how-to-show-system-navigation-bar-in.html

Pacific P. Regmi
  • 1,527
  • 17
  • 14
0

For those who cannot make it work: before recreating an AVD, try first to press the numlock key as this influences the behavior of the Fn keys. In my case, if numlock is off, F2 doesn't work.

Xavier Guihot
  • 32,132
  • 15
  • 193
  • 118
marco
  • 1,534
  • 1
  • 18
  • 30