〖Android〗存在多个Android设备时,使用Shell脚本选择一个Android设备
16lz
2021-12-04
Shell脚本:
#!/bin/bashdevices=( $(adb devices|grep device$|awk '{print $1}'|xargs echo) )case ${#devices[@]} in 0 ) echo "can't found a android device!" ;; 1 ) serial=$devices ;; * ) select serial in ${devices[@]}; do break; done ;;esacif [[ -z $serial ]]; then echo "Not select a android device, exit not" exit 1fiadb -s $serial shell echo OK
更多相关文章
- qt for android
- FFmpeg交叉编译
- Android(安卓)Bluetooth初始化流程
- [init.rc] android init.rc 总结
- Android平台开发-3G function porting-3G功能移植
- Android多渠道打包(五):360多渠道打包+
- 实力解剖一枚挖矿脚本,风骚操作亮瞎双眼
- MySQL 常用脚本
- 23 个非常实用的 Shell 拿来就用脚本实例