Add ADB related commands
This commit is contained in:
parent
bb8c792588
commit
cad3d15e55
14
home/.zsh/cmd/adi.sh
Executable file
14
home/.zsh/cmd/adi.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
### ADB
|
||||||
|
# mnemonic [AD]b [I]nstall
|
||||||
|
# install apk via adb
|
||||||
|
|
||||||
|
apk=${1}
|
||||||
|
|
||||||
|
if [[ -z $apk ]]; then
|
||||||
|
apk=$(find . -maxdepth 5 -type f -name '*.apk' ! -iname ".*" | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[adb:install]'" | awk '{print $1}')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $apk ]]; then
|
||||||
|
echo "Trying $apk"
|
||||||
|
adb install -g -r $apk
|
||||||
|
fi
|
14
home/.zsh/cmd/adpo.sh
Executable file
14
home/.zsh/cmd/adpo.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
### ADB
|
||||||
|
# mnemonic [AD]b [P]ush [O]BB
|
||||||
|
# pushes obb directory via adb
|
||||||
|
|
||||||
|
obbdir=${1}
|
||||||
|
|
||||||
|
if [[ -z $obbdir ]]; then
|
||||||
|
obbdir=$(find . -maxdepth 5 -name '*.obb' ! -iname ".*" -exec dirname {} \; | sort -u | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[adb:push]'" | awk '{print $1}')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $obbdir ]]; then
|
||||||
|
echo "Trying $obbdir"
|
||||||
|
adb push $obbdir /sdcard/Android/obb/
|
||||||
|
fi
|
14
home/.zsh/cmd/adu.sh
Executable file
14
home/.zsh/cmd/adu.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
### ADB
|
||||||
|
# mnemonic [AD]b [U]nistall
|
||||||
|
# install apk via adb
|
||||||
|
|
||||||
|
apk=${1}
|
||||||
|
|
||||||
|
if [[ -z $apk ]]; then
|
||||||
|
apk=$(adb shell cmd package list packages | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[adb:uninstall]'" | awk '{print $1}' | sed 's/package://g')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $apk ]]; then
|
||||||
|
echo "Trying $apk"
|
||||||
|
adb uninstall $apk
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user