Skip to content

Instantly share code, notes, and snippets.

@dtmilano
dtmilano / adb-emu-kill.exp
Last active November 17, 2016 16:10
`adb emu kill` does not work in latest `adb` versions. This is a workaround using `expect`.
#!/usr/bin/expect -f
#
# This Expect script was generated by autoexpect on Wed Jun 29 12:07:46 2016
# Expect and autoexpect were both written by Don Libes, NIST.
#
# Note that autoexpect does not guarantee a working script. It
# necessarily has to guess about certain things. Two reasons a script
# might fail are:
#
# 1) timing - A surprising number of programs (rn, ksh, zsh, telnet,
@dtmilano
dtmilano / gist:7426090
Created November 12, 2013 05:45
Jenkins command line plugin installation
/opt/jenkins/jenkins-cli install-plugin \
analysis-core \
android-emulator \
android-lint \
ant \
credentials \
cvs \
emmacoveragecolumn \
emma \
external-monitor-job \
@dtmilano
dtmilano / android-select-device
Last active February 28, 2025 18:51
Script to select one connected device or emulator when running adb
#! /bin/bash
#=====================================================================
# Selects an android device
# Copyright (C) 2012-2022 Diego Torres Milano. All rights reserved.
#
# The simplest way to invoke this script is creating a function like
# this one in your shell startup file:
#
# ```
# adb ()