美文网首页
android 常用

android 常用

作者: BK_凌霄 | 来源:发表于2020-03-30 21:43 被阅读0次

1.发送adb命令打开界面
注意在数据&时使用\进行转义。
adb shell am start -a 'android.intent.action.VIEW' -d 'http://www.baidu.com?q=123&name=123'

2.当前activity:
adb shell dumpsys activity activities | sed -En -e '/Running activities/,/Run #0/p'

3.依赖树:
chmod +x gradlew && ./gradlew -q :app:dependencies --configuration compile

4.截屏放到screencap文件夹中:

!/bin/bash

adb shell screencap -p /sdcard/01.png
if [ ! -d screencap ];then
mkdir screencap
fi
adb pull /sdcard/01.png screencap/$(date +%m%d-%H%M%S).png
open screencap

5.基础


image.png

相关文章

网友评论

      本文标题:android 常用

      本文链接:https://www.haomeiwen.com/subject/aqmbuhtx.html