在所有连接的设备上运行的adb命令 [英] Running adb commands on all connected devices
本文介绍了在所有连接的设备上运行的adb命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有在所有连接的设备上运行的adb命令的方法吗?要以亚行卸载com.example.android所有连接的设备卸载的应用程序。
Is there a way of running adb commands on all connected devices? To uninstall an app from all connected devices with "adb uninstall com.example.android".
我感兴趣的主要是安装和命令卸载。
The commands I am interested in is mainly install and uninstall.
我在想编写一个bash脚本这一点,但我觉得应该有人已经做到了:)
I was thinking about writing a bash script for this, but I feel like someone should have done it already :)
推荐答案
创建一个bash(ADB +)
Create a bash (adb+)
adb devices | while read line
do
if [ ! "$line" = "" ] && [ `echo $line | awk '{print $2}'` = "device" ]
then
device=`echo $line | awk '{print $1}'`
echo "$device $@ ..."
adb -s $device $@
fi
done
使用它
adb+ //+ command
这篇关于在所有连接的设备上运行的adb命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文