Skip to content

Instantly share code, notes, and snippets.

@nestserau
Last active August 29, 2015 14:00
Show Gist options
  • Save nestserau/11364748 to your computer and use it in GitHub Desktop.
Save nestserau/11364748 to your computer and use it in GitHub Desktop.
Launches an Android emulator with some predefined settings
pushd ~/.android/avd/$1.avd/
sed -i .bak 's/\(window.[xy] = \)-*[0-9]*/\10/g' emulator-user.ini
popd
pushd ~/android-sdks/tools/
if [ ! -z "$2" ]; then
emulator @$1 -scale $2
else
emulator @$1
fi
popd
@nestserau
Copy link
Author

Added an ability to specify scale as a 2nd argument.
Example: $ droid nexus7-18 0.75

@nestserau
Copy link
Author

Script now works for both negative and positive values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment