Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android DDMS (Monitor) does not start if user profile contains a space in it

Tags:

android

ddms

If I use a Windows account such as "User", the DDMS can be started from Android Studio.

If I use a Windows account which contains a space such as "Test User", the DDMS fails to launch:

enter image description here

The log shows the following:

!SESSION 2013-07-02 12:30:07.031 ----------------------------------------------- eclipse.buildId=unknown java.version=1.7.0_25 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_IE Command-line arguments:  -os win32 -ws win32 -arch x86  !ENTRY org.eclipse.osgi 4 0 2013-07-02 12:30:07.730 !MESSAGE Application error !STACK 1 java.io.IOException: The folder "C:\Users\Test%20User\.android\monitor-workspace\.metadata" is read-only.     at org.eclipse.core.runtime.internal.adaptor.BasicLocation.lock(BasicLocation.java:206)     at org.eclipse.core.runtime.internal.adaptor.BasicLocation.set(BasicLocation.java:164)     at org.eclipse.core.runtime.internal.adaptor.BasicLocation.set(BasicLocation.java:137)     at com.android.ide.eclipse.monitor.MonitorApplication.start(Unknown Source)     at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)     at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)     at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)     at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)     at org.eclipse.equinox.launcher.Main.run(Main.java:1410) 

It does not work for 32 or 64-bit SDK versions and it does not break because of "Android tools installed in a directory with spaces in path do not work correctly" (they do on a "User" account)

Has anyone solved this issue?

like image 590
AFD Avatar asked Jul 02 '13 11:07

AFD


People also ask

How do you invoke an android monitor?

To launch Android Device Monitor from your command line, execute the monitor program in your Android SDK's tools directory. If you prefer to run the tool from Android Studio, choose Tools > Android > Android Device Monitor.

How do I switch to DDMS mode?

DDMS is accessible via Studio > Tools > Android > Android Device Monitor and clicking the DDMS button on menu. You can also place is as a shortcut icon (I do) in your upper panel.

How do I get DDMS on Android?

DDMS is integrated into Android Studio. To use it, launch the Android Device Monitor, and click the DDMS menu button. DDMS works with both the emulator and a connected device. If both are connected and running simultaneously, DDMS defaults to the emulator.

What is DDMS describe some of its capabilities in Android?

Android ships with a debugging tool called the Dalvik Debug Monitor Server (DDMS), which provides port-forwarding services, screen capture on the device, thread and heap information on the device, logcat, process, and radio state information, incoming call and SMS spoofing, location data spoofing, and more.


1 Answers

I've just come across this problem too. My workaround was to create a symbolic directory link from "Test%20User" to "Test User".

  1. Open a command prompt as administrator. (shift+ctrl+(enter or click) on the icon will do this)
  2. cd C:\Users
  3. mklink /d "Test%20User" "Test User"
  4. Launch monitor.bat and it should work.
like image 197
dan Avatar answered Sep 20 '22 16:09

dan