Skip to content

Installing Android Device Monitor

Brent Atkinson edited this page Sep 13, 2016 · 5 revisions

The following article describes how to install and run the Android Device Monitor on a computer running Microsoft Windows. While not necessary for developers running Android Studio, this can be useful for gathering detailed diagnostic information for reporting production defects.

Installing Java Development Kit

Before you attempt to install the Android SDK, you should install the Java Development Kit, which it depends on.

  • Visit http://www.oracle.com/technetwork/java/javase/downloads/index.html
  • Click the 'Download' button underneath the 'Java' icon
  • Click 'Accept License Agreement' radio button underneath version to download (Java SE Development Kit 8u101 at the time of writing)
  • Click the filename for your operating system to start the download (jdk-8u101-windows-x64.exe for 64-bit Windows)
  • Wait for the download to complete
  • Run the downloaded executable to start installing the JDK
  • Complete the installation wizard
  • The default options work fine for Java SE Development Kit 8u101 (no need to change values)
  • You do not need to complete 'Next Steps'

Once you have completed this, you can continue by installing the Android SDK.

Installing Android SDK

Device Monitor is available as part of the standalone Android SDK. The following instructions explain how to install only the pieces you need for Device Monitor to work.

  • Visit https://developer.android.com/studio/index.html
  • You will not be downloading Android Studio, instead click link labeled 'Download Options'
  • Underneath 'Get just the command line tools' click the link for the Windows .exe (installer_r24.4.1-windows.exe at the time of writing)
  • Agree to the license agreement and click the Download button
  • Wait for the download to complete
  • Run the downloaded executable to start installing the Android SDK
  • Complete the installation wizard
  • Since you installed the JDK, the installer should automatically detect it
  • Select 'Install just for me'
  • Keep the default installation path (C:\Users\[user]\AppData\Local\Android\android-sdk)
  • You can install shortcuts or not... the instructions will work either way
  • Click 'Install'
  • Click 'Next'
  • Click 'Finish' with the 'Start SDK Manager' checked
  • Install Tools using 'Android SDK Manager'
  • Click 'Deselect All'
  • Expand the 'Tools' folder and select 'Android SDK Tools' and 'Android SDK Platform-tools'
  • Expand the 'Extras' folder and select 'Google USB Driver'
  • Click the button labeled 'Install 3 packages...'
  • Accept the license for all three packages by clicking 'Accept License' radio button
  • Click 'Install'
  • Wait for the installation to complete (this likely will take a while, SDK tools is large)
  • When it is finished, you can close the 'Android SDK Manager'

Once you have done this, you should have everything you need to run Device Monitor. You just need to add the Android tools to your path so you can run them from the command line.

Adding Android Tools to Windows Path

After you have installed the tools using the Android SDK Manager, you just need to add them to your Windows Path. This will allow you to run Android tools from the command line console (by typing commands rather than clicking icons). Just do the following:

  • Press [Windows] + [Pause/Break] keys together to open system settings
  • Click 'Advanced System Settings'
  • In the 'Advanced' tab, click the 'Environment Variables...' button
  • Add a user variable named 'ANDROID_HOME'
    • Click 'New...'
    • Type ANDROID_HOME as the variable name
    • Type %USERPROFILE%\AppData\Local\Android\android-sdk
  • Edit the user variable named 'Path'
    • Double-click the list item named 'Path' (or select and click 'Edit...' button)
    • Add %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools to the value
      • On Windows 10, the value is shown as separate list items (add new ones for each)
      • Other versions of Windows may require hand-editing the path (add %ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools to the end of the existing value)
  • Click 'Ok'

Once you finish, log out of your Windows account and log back in. You should now be able to run Device Monitor (and other Android tools) from the command line as described in the next section.

Note: Carefully follow the instructions above and enter the exact names and values. Even a single mistake can make the difference between a working and non-working configuration.

Viewing App Logs using Device Monitor

Once the SDK tools are installed and added to your Windows Path, you should be able to start Device Monitor:

  • Press [Windows] + [r] keys together to open the 'Run' dialog
  • Type 'monitor' and click 'Ok'
  • After a brief pause, Device Monitor should start