working - simulate shake android

How do I “shake” an Android device within the Android emulator to bring up the dev menu to debug my React Native app (8)

I am working on a cross-platform React Native mobile app. I am writing console.log statements as I develop. I want to see these logging statements in Chrome while I'm running the Android app in the default Android emulator. According to Facebook's docs I just need to "shake the device". How do I do this in the Android emulator?

To access the in-app developer menu:

On iOS shake the device or press control + ⌘ + z in the simulator. On Android shake the device or press hardware menu button (available on older >devices and in most of the emulators, e.g. in genymotion you can press ⌘ + m to >simulate hardware menu button click)

'Command + M' for OSX is working for me.

For Linux you click on the three dots "..." beside the emulator, on Virtual sensors check "Move" and then try quickly moving either x, y or z coordinates.

I am on Mac OS so when I press Command, it enable zooming option. Here is my solution

  • Open Configuration window [...] button
  • Go to Settings tab -> General tab -> Send keyboard shortcuts to field
  • Change value to Virtual device" as shown in the picture

After that focus on the emulator and press Command + M, the dev menu appears.

I was trying on a release build via adb install -r -d <app-release>.apk 🤦

Make sure you're running the debug build, then the menu will work via the shortcut or CLI.

It might be not direct solution, but I've created a lib that allows you to use 3 fingers touch instead of shake to open dev menu, when in development mode

You only have to wrap your app inside:

import DevMenuOnTouch from 'react-native-dev-menu-on-touch'; // or: import { DevMenuOnTouch } from 'react-native-dev-menu-on-touch'

class YourRootApp extends Component {
  render() {
    return (
        <YourApp />

It's really useful when you have to debug on real device and you have co-workers sitting next to you.

Use command + m(cmd + M) on MAC. Also make sure that you are accessing your application while you try to access the Debug Menu i.e. your app must be running otherwise Cmd + M will just return the usual ordinary phone menu.

Within your app in the Android Emulator press Command + M on OSX or Ctrl + M on Linux and Windows.

on linux ctrl+m should work but it doesn't for solving the problem click on the (...) (its extended controls) and then close that you can open menu by ctrl+m. then:

  1. click on the (...) (its extended controls)

  2. close extended controls

  3. ctrl+m