android怎么执行cmd命令行,Android开发用到的cmd等命令行

添加youDir到用户变量:

setX PATH "%PATH%;youDir"

关于脚本变量、用户变量、系统变量。如果用set则设置的变量,只在当前脚本上有用,修改PATH也是。而用户变量和系统变量,最终会组合到一起。并且系统变量在前边

比如系统变量PATH: “C:hell0",当前用户变量PATH:”C:My"。则通过echo %PATH%看到的就是“C:hell0;C:My",则命令行查找可执行程序先从 当前目录,然后系统变量PATH,然后用户变量PATH

if判断:

@echo off

if "%2" EQU "-r" (ClipBoard D:\so\%1\release) ELSE (ClipBoard D:\so\%1\debug)

等于        equ    equal

大于        gtr    greater than

大于或等于    geq    greater than or equal

小于        lss    less than

小于或等于    leq    less than or equal

不等于        neq    no equal

Android过滤某个进程的log

adb logcat -v brief | find  "%1"

## -v brief 是用来打进称号,然后管道符顾虑。%1是输入的第二个参数

-v后对输出的log进行格式化的参数

brief — Display priority/tag and PID of the process issuing the message (the default format).

process — Display PID only.

tag — Display the priority/tag only.

raw — Display the raw log message, with no other metadata fields.

time — Display the date, invocation time, priority/tag, and PID of the process issuing the message.

threadtime — Display the date, invocation time, priority, tag, and the PID and TID of the thread issuing the message.

long — Display all metadata fields and separate messages with blank lines.

清除文件夹和APK

@echo off

if "%1" NEQ "-k" (adb uninstall com.huawei.hwireader) ELSE (echo "hello")

adb shell rm -rf sdcard/HWiReader

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值