Skip to content

toksaitov/AndroidStudioPortable

Repository files navigation

Scripts to make Android Studio portable

Here you can find a number of PowerShell scripts to make Android Studio portable. To run the scripts you need PowerShell version 2.0 or higher.

  • Setup-AndroidStudioPortable.ps1

    • Downloads aria2 and unpacks its archive.
    • Downloads 7zr to bootstrap extraction of 7-zip archives
    • Downloads 7-Zip and unpacks its installer with 7zr.
    • Downloads Android Studio and unpacks its archive.
    • Generates a batch file to start an Android Studio instance without PowerShell.
  • Start-AndroidStudioPortable.ps1

    • Sets environment variables relative to the current directory.

      • HOMEPATH (_~_)
      • USERPROFILE (_~_)
      • ANDROID_HOME (Android SDK root)
      • ANDROID_SDK_HOME (~\.android)
      • GRADLE_USER_HOME (~\.gradle)
    • Adds directories with executables from the SDK at the beginning of the PATH environment variable for use in the Android Studio terminal.

      • Android Studio bin directory
      • Android SDK tools and platform-tools directories
  • Remove-SetupTemporaryFiles.ps1

    • Removes all aria2 and 7-Zip files then Studio archive.
  • Remove-AndroidStudioPortable.ps1

    • Removes all aria2 and 7-Zip files then Studio archive.
    • Removes the unpacked SDK and Studio directories but leaves the portable home directory along.
  • AndroidStudioPortable-Definitions.ps1

    • Contains definitions for URLs, file/directory names, and parameters used by other scripts.
    • Can be modified to install a different version of a certain package.
  • AndroidStudioPortable-Helpers.ps1

    • Contains helper functions and shims to support old PowerShell versions.

Shortcomings

  • The scripts don't touch your project files in any way or form. That means you will have to update the path to the Android SDK directory in your project settings from time to time.

  • In an environment with a Restricted PowerShell execution policy you have to start scripts in the following way

      PowerShell.exe -ExecutionPolicy Bypass -File <a script file name to start>
    
  • Network (or UNC) paths are not supported.

  • SD card and skin paths for AVDs are not automatically updated.

About

Scripts to make Android Studio portable

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •