Coder Social home page Coder Social logo

open-avd's Introduction

open-avd

this project is based in this question, Open AVD or emulators without opening Android Studio that has this gist to work in linux and my modification to work in windows 7.

Support

  • linux install bin
  • windows (execute avd.sh)
  • macOS (execute avd-mac.sh)

To run

  • copy file with base in your OS
  • change permission to 755
  • execute file to open emulator

To install bin in linux

  • createa file in /bin/avd
  • AVD file or AVD2 file
  • change permission with this command sudo chmod -x /bin/avd
  • run avd in terminal

Thanks

The big thanks for the help:

Licence (MIT)

open-avd's People

Contributors

enieber avatar uj947nxmrqv2nrawshkthztvckuupd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

open-avd's Issues

emulator.exe path

emulator resides on C:\Users<user>\AppData\Local\Android\Sdk\emulator on latest versions, not on tools

should change to:
...
pushd ${ANDROID_HOME}/emulator
...

Compatibility with Android Studio 2023.2.1 Canary 15

Since several versions now (don't know which), on canary Android Studio, the avd.sh script is not working anymore because of an extra INFO line shown by emulator command.

i adapted the script to fix it:

#!/usr/bin/sh

# don't show pushd stack
pushd () {
    command pushd "$@" > /dev/null
}

pushd ${ANDROID_HOME}/emulator
emuAvds=$(./emulator -list-avds)
# echo "emuAvds: ${emuAvds}" # DEBUG


echo "Emulator Android Virtual Devices:"
avds=$(echo "${emuAvds}" | grep -v ^INFO | cat -n)
echo "${avds}"

ignoredINFO_lines=$(echo ${emuAvds} | grep ^INFO | wc -l)
# echo "number of beginning INFO lines ignored: ${ignoredINFO_lines}"
# eg. INFO line: 
# INFO    | Storing crashdata in: C:\Users\<user>\AppData\Local\Temp\\AndroidEmulator\emu-crash-34.1.12.db, detection is enabled for process: 8548

printf "Select AVD to start: "
read index
#echo "index: ${index}" # DEBUG

emuAvdsIndex=$((${index} + ${ignoredINFO_lines}))
#echo "emuAvdsIndex: ${emuAvdsIndex}" # DEBUG


avd=$(echo "${emuAvds}" | sed "${emuAvdsIndex}q;d")
echo "Selected ${emuAvdsIndex}: ${avd}"
./emulator -netdelay none -netspeed full -avd "${avd}"
popd

# REF: https://github.com/enieber/open-avd/blob/master/avd.sh

I tested it in git bash in windows on android studio canary.
Would be good to test on current stable android studio emulator before releasing.

Cheers

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.