Coder Social home page Coder Social logo

android-emulator-wrapper's Introduction

Android Emulator wrapper script

This wrapper for the Android Emulator executable works around an issue where emulator -snapshot-list causes a Segmentation Fault.

Background

This may for example happen when using Jenkins with the Android Emulator plugin.

The Jenkins plugin executes emulator -snapshot-list ... to find out whether to start from an existing snapshot or create one. Then emulator segfaults. The Jenkins plugin interprets that to mean there are no snapshots, and it should boot up the avd from scratch and create the first snapshot. This means it keeps re-creating a snapshot at every build, instead of creating it only once, and then reusing it.

I found an issue filed against the AOSP where one of the comments suggests that some of the different emulator-* executables segfault, and others do not, when supplied the -snapshot-list argument: https://code.google.com/p/android/issues/detail?id=34233#c57

Installation instructions

Find out where your emulator executable is located.

If it's a Jenkins server, look at the build log for complete path.

If it's your own developer machine, you can probably find it like this:

which emulator

In my case, on osx and having installed the Android SDK via brew, it's /usr/local/bin/emulator.

Rename the original emulator to emulator.bak in the same directory where it was. In my case:

mv /usr/local/bin/emulator{,.bak} 

Then chmod this wrapper, and copy into the original emulator's place:

chmod +x emulator
cp emulator /usr/local/bin/

It should now magically work!

android-emulator-wrapper's People

Contributors

hugojosefson avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.