Android General code

常用的命令

code 说明
adb connect 192.168.2.123 连接到Android设备
adb disconnect 192.168.2.123 断开Android设备
adb logcat -v time >(path) 导出设备logo
adb pull /data/anr/traces.txt (path) 导出设备logo
adb -s 192.168.2.123 logcat -v time >(path) 导出连接到的设备logo
adb -s 192.168.2.95 pull /sdcard/package.log /Users/wangtao/Desktop/respond.log 导出设备数据到文件
adb -s 127.0.0.1 shell input keyevent 82 adb 给app发送按键命令
adb shell monkey -p com.micro.player -p com.micro.player --throttle 100 -v 500000000 monkey 间隔 100
adb shell ps | grep monkey 查找当前的monkey进程
adb shell kill 13339 关闭当前的monkey进程
adb shell monkey -p com.ftxjoy.cibn_tvplayer -c android.intent.category.LAUNCHER 1 adb 启动apk
adb -s 192.168.2.163 push /Users/xx/Downloads/video.m2ts /storage/emulated/0 adb push 文件
adb -s 192.168.2.163 shell am start 包名/MainActivity路径 adb 启动app
adb -s 192.168.2.163 shell am force-stop 包名 adb 停止app
aapt dump badging apk路径 adb 反编译apk
1. 打包上传到svn

assembleAAARelease 中的AAA 表示 productFlavors里面的
app\release\V1.3.3\%1\ 表示svn的本地路径

gradlew assembleAAARelease
move app\build\outputs\apk\%1\release\*.apk app\release\V1.3.3\%1\
svn add app\release\V1.3.3\%1\*.apk
svn commit -m "add apk file : %1" 

你可能感兴趣的:(Android General code)