Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8113847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:57:51+00:00 2026-06-06T02:57:51+00:00

I would like to have a portable android development environment that I could take

  • 0

I would like to have a portable android development environment that I could take everywhere (e.g. a usb stick). The idea is to have a folder that would include:

  • eclipse
  • android-sdk
  • jdk
  • .android (folder that contains the avd’s and keys)
  • workspace

I installed Eclipse 3.7.0, added ADT plugin and

  • added option “-vm ../jdk/bin/” in eclipse.ini file
  • set the eclipse android-sdk variable to a relative path (../android-sdk)
  • set the eclipse workspace to a relative path
  • set the eclipse key folder to a relative path

The question is how can you make the avd’s portable? How can .android folder be portable? I saw some solutions mentioning the creation of an environment variable but I was thinking of a solution that works out of the box, or an ,as much as possible, automated procedure. The OS should be windows 7, but ideally should work on any version.
Any help would be greatly appreciated. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:57:54+00:00Added an answer on June 6, 2026 at 2:57 am

    I think I found a way to do this on a Mac and Windows. I have tested both solutions on multiple computers, but not exhaustively.

    I had basically the same approach as you, but the problem is that the relative path for the Android SDK in Eclipse breaks the AVD Manager for some reason. It wouldn’t allow me to run existing or create new AVDs. I got around this by including an “initial_setup” script that is to be run one time to set the Android SDK based on where the user unzips this package. It also creates the initial AVD for them. So they download and unzip the package, run the initial_setup script, and are good to go with a default Android development environment.

    The key is updating Eclipse ADT Plugin preferences to use the absolute path of the Android SDK. This is accomplished with this line from the script below. Note that the path for the preferences file is relative to the workspace (and the workspace path is set as relative to the Eclipse installation).

    echo com.android.ide.eclipse.adt.sdk=$sdk_path >> ./workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.android.ide.eclipse.adt.prefs
    

    Mac Instructions

    Here’s my unzipped directory structure:

    android_dev_environment (root)
      - android-sdk-macosx
      - eclipse
      - initial_setup
      - workspace
    

    And here are the contents of initial_setup:

    #!/bin/bash 
    # Set the Android SDK path in Eclipse. Must be the absolute; a relative path
    # does not work with the AVD Manager.
    cd "$(dirname "$0")"
    sdk_path=`pwd`/android-sdk-macosx
    echo "Setting Android SDK path in Eclipse..."
    echo com.android.ide.eclipse.adt.sdk=$sdk_path >> ./workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.android.ide.eclipse.adt.prefs
    echo "Android SDK path set."
    
    # Create a new AVD
    echo "Creating new AVD..."
    echo no | $sdk_path/tools/android create avd -n Android403 -t 1 --force
    echo "AVD created."
    

    Windows Instructions

    Here’s my unzipped directory structure:

    android_dev_environment (root)
      - android-sdk-windows
      - eclipse
      - initial_setup.bat
      - java
      - workspace
    

    The Windows version has its own local JDK 6 in the java directory. Eclipse needs to know about it, so edit eclipse\eclipse.ini. Add the following lines above the -vmargs line:

    -vm 
    ..\Java\jdk1.6.0_33\bin\javaw.exe
    

    And here are the contents of initial_setup.bat:

    REM Set the Android SDK path in Eclipse. Must be the absolute; a relative path
    REM does not work with the AVD Manager.
    cd > temp.txt 2>&1
    set /p sdk_path= < temp.txt
    del temp.txt
    set sdk_path=%sdk_path%\android-sdk-windows
    set sdk_path=%sdk_path:\=\\%
    set sdk_path=%sdk_path::=\:%
    
    echo “Setting Android SDK path in Eclipse...”
    echo com.android.ide.eclipse.adt.sdk=%sdk_path%>> .\workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.android.ide.eclipse.adt.prefs
    echo “Android SDK path set.”
    
    REM Create a new AVD
    echo “Creating a new AVD...”
    echo no | .\android-sdk-windows\tools\android create avd -n Android403 -t 1 --force
    echo “AVD created.”
    
    pause
    

    For 64 bit Windows you also need to tweak the find_java.bat file in the Android SDK so that it finds the Java installed with the bundle. Add the following lines to android-sdk-windows\tools\lib\find_java.bat (before it runs its own check that starts with the comment “rem Check we have a valid Java.exe…”

    set java_exe=%~dp0\..\..\..\Java\jdk1.6.0_33\bin\java.exe
    set javaw_exe=%~dp0\..\..\..\Java\jdk1.6.0_33\bin\javaw.exe
    if defined javaw_exe goto :EOF
    

    How to Use the Environment Bundle

    1. Unzip the bundle
    2. Double-click on initial_setup in the android_dev_environment folder to set the Android SDK path to the user’s absolute path and create the default AVD
    3. Run the Eclipse executable inside the eclipse directory

    Note: Running initial_setup on a Mac or a PC multiple times does not hurt anything. The dev environment will break if the user moves the whole directory after initial_setup, but running initial_setup from the new location will fix it. I plan on including a README file with these instructions.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Data Access Layer library that I would like to make portable.
I would like to have a portable Ruby on Rails development env running on
So in my project i would like have a nice treeview that has images.
I would like to have an AppWidget that designed like this one . Image:
I would like to have a border that is 4px thick pink on the
I would like to have a custom view in my application that consists of
I have features I would like to be portable between my own Rails applications.
I have a file that can be saved to a portable device. I would
I have a couple of hobby C programming projects that I would like to
I am writing a library that I would like to be portable. Thus, it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.