Skip to content

Instantly share code, notes, and snippets.

@race604
race604 / adb+
Last active August 20, 2023 09:03
#!/bin/bash
# Script adb+
# Run any command adb provides on all your currently connected devices,
# Or prompt to select one device
showHelp() {
echo "Usage: adb+ [-a] <command>"
echo " -h: show help"
echo " -a: run command on all device"
echo " command: normal adb commands"
@race604
race604 / gd.sh
Created August 20, 2023 07:27
Auto find the `gradew` script and run gradle commands
# find file in current and parent dir recursively
function find_up {
path=$(pwd)
while [[ "$path" != "" && ! -e "$path/$1" ]]; do
path=${path%/*}
done
if [[ ! -e "$path/$1" ]]
then
echo "ERROR: $1 not found" 1>&2
return 1