Tek Eye Logo

Tek Eye

Windows Symbolic Links for Android Installations on the D: Drive

Update: This article refers to the old Eclipse based method for developing Android apps. The Android Studio development environment does not appear to have the problem reported in this article. Therefore this article is now archived and kept for historical purposes only.

Mike Bugdroid the Android Logo

AVDs Failing to Start if Eclipse is Not on C:

At Tek Eye our machines are built for performance, shaving seconds of the program – compile – test cycle saves hours over the month. Machines have a small solid state drive (SSD) for the Operating System (Win 7 x64) and a big hard disk drive (HDD) for programs and work data. So Win 7 is on a C: drive and everything else on a D: drive. All users' special folders are relocated to D:. For Android development Eclipse is installed with the Android Development Tools (ADT) Plugin onto the D: drive.

A lot of the initial development of an App is done using an Android Virtual Device (AVD). The AVD is set up using the AVD Manager. Once set up an AVD allows an App to be launched onto it via the Eclipse Run or Debug options. Unfortunately on some configurations where the user folders are on the D: drive, an error is reported when an AVD tries to start (even if the AVD Manager successfully created the AVD). A Starting Android Emulator dialog appears with an error message similar to PANIC: Could not open: C:\Users\Name.android/avd/AVDName.ini.

AVD "PANIC: Could not open:..."  error

When debugging or running Apps ADT is trying to load the emulator from C: when it, and the configuration files for it, are on D:. One solution is to use a NTFS symbolic link, a.k.a a symlink. Setting up a symlink can fix the above error.

Open a command prompt in the user directory on C: (if you relocated all your special Windows folders to D: then there may only be a hidden Appdata folder in the user folder on C:). Use the mklink program to make a hard link to the .android directory on D:. If user John Doe moved all his Users files from C:\Users to D:\Users then the command to make the directory junction would be:

mklink /J "C:\Users\John Doe\.android" "D:\Users\John Doe\.android"

mklink command for symlink \(junction\)

Now when the ADT plugin is trying to reference .android on C:, NTFS redirects the request to D: and the emulator starts correctly.

(The mklink command is not shipped with Windows XP, to create a Directory Junction on Windows XP use the Sysinternal Junction tool.)

See Also

  • For programming tutorials using Android Studio see the Android Example Projects page.
  • For a full list of all the articles in Tek Eye see the full site Index.

Archived Comments

Pelle on October 31, 2012 at 2:44 pm said:

Nice one. What do you do on WinXP (does not have mkLink)???

Tek Eye on November 1, 2012 at 4:33 pm said:

As stated in the post Windows XP can use the Junction utility from the Windows Sysinternals web pages.

Rudy Hermawan on July 31, 2013 at 6:49 am said:

Awesome, thanks a lot of 😀

Rudy Hermawan on August 1, 2013 at 3:32 am said:

Thanks I can make mklink folder.

Thanks awesome 😀

Author:  Published:  Archived:

ShareSubmit to TwitterSubmit to FacebookSubmit to LinkedInSubmit to redditPrint Page

Do you have a question or comment about this article?

(Alternatively, use the email address at the bottom of the web page.)

 This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

markdown CMS Small Logo Icon ↓markdown↓ CMS is fast and simple. Build websites quickly and publish easily. For beginner to expert.

Articles on:

Android Programming and Android Practice Projects, HTML, VPS, Computing, IT, Computer History, ↓markdown↓ CMS, C# Programming, Using Windows for Programming

Free Android Projects and Samples:

Android Examples, Android List Examples, Android UI Examples

Tek Eye Published Projects