Skip to content

Instantly share code, notes, and snippets.

@junyuecao
Created August 14, 2018 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save junyuecao/33d8f029bd6e24e02ea4591364724360 to your computer and use it in GitHub Desktop.
Save junyuecao/33d8f029bd6e24e02ea4591364724360 to your computer and use it in GitHub Desktop.
Vivo 自动安装
#/bin/bash
while true; do
current_page=`adb shell dumpsys activity top | sed -n '2p'`
pass_input=`echo $current_page | grep AccountVerifyActivity`
continue_install=`echo $current_page | grep PackageInstallerActivity`
confirm_install=`echo $current_page | grep PackageInstallerActivityOther`
if [ 'x'"$pass_input" != 'x' ];then
adb shell input text 'aaaa1111'
adb shell input tap 350 860
fi
if [ 'x'"$confirm_install" != 'x' -o 'x'"$continue_install" != 'x' ]; then
adb shell input tap 480 1683
fi
sleep 0.5
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment