views:

474

answers:

3

I've set up the Android SDK and Eclipse on my machine running Windows XP and AVDs (Android Virtual Devices) are saved to "Documents and Settings\user\.android" by default. Is there any way to change this behavior? I have all of the other components saved in a directory on a separate partition and would like everything to be consolidated. Obviously not a huge deal but does anyone here know a workaround for this?

+1  A: 

Check this out. using the android command to create avd you can specify where to place files.

-p --path     Location path of the directory where the new AVD will be created
Macarse
Do you know of any way to do this through the setup utility and set it to default to a particular location?
primehunter326
Not really. I don't even use windows :(
Macarse
Well like I said it's not a big deal, just thought there would be some way to control it more given how modular the whole SDK package is. Thanks for your help!
primehunter326
A: 

You can change the .ini file for the new AVD:

target=android-7 path=C:\Users\username.android\avd\VIRTUAL_DEVICE_NAME.avd

I don't know how to specify where the .ini file should be stored :)

JFrostos
+2  A: 

Go to the Android tools directory. Edit the android.bat command file. At about the end of the command file, change the following line:

call %java_exe% -Djava.ext.dirs=%java_ext_dirs% -Dcom.android.sdkmanager.toolsdir="%tools_dir%" -Dcom.android.sdkmanager.workdir="%work_dir%" -jar %jar_path% %*

to

call %java_exe% -Duser.home={your_prefer_dir} -Djava.ext.dirs=%java_ext_dirs% -Dcom.android.sdkmanager.toolsdir="%tools_dir%" -Dcom.android.sdkmanager.workdir="%work_dir%" -jar %jar_path% %*

{your_prefer_dire} is your preferred directory without braces, e.g. d:\temp

loftysnake