ADB自动刷抖音(快手)视频脚本

1. 下载好抖音(快手)app,并进行登录。

2. 使用adb连接上手机。ADB使用请参考awesome-adb

3. 打开应用,在命令行输入该命令来查看当前在前台的activity:

script
1
2
qincji:Downloads mac$ adb shell dumpsys activity activities | grep mResumedActivity
mResumedActivity: ActivityRecord{e3c2d05 u0 com.ss.android.ugc.aweme.lite/com.ss.android.ugc.aweme.splash.SplashActivity t122}

4. 编写shell脚本,然后执行:

script
1
2
3
4
5
6
7
8
9
10
#!/bin/bash
adb shell am start -n com.ss.android.ugc.aweme.lite/com.ss.android.ugc.aweme.splash.SplashActivity
sleep 10s
a=1
while (($a < 500)); do
adb shell input swipe 300 1000 300 500
echo "while语句,滑动屏幕:$a"
let "a++"
sleep 10s
done