adb命令-简介

adb命令

**app启动时间:adb shell am start -W -n {package}/{activity}
**app cpu:adb shell dumpsys cpuinfo | findstr “{package}” ;adb shell cat /proc/cpuinfo
app界面信息xml:adb shell uiautomator dump /data/local/tmp/uidump.xml
app界面信息xml pull本地:adb pull /data/local/tmp/uidump.xml ./uidump.xml xml.dom.minidom
app界面信息xml删除:adb shell rm /data/local/tmp/uidump.xml
app当前activity:adb shell dumpsys activity | findstr “mResumedActivity”
app覆盖安装:adb install -r {app path}
app卸载:adb uninstall {package}
list所有app:adb shell pm list package
运行中apps:adb shell top -n 1 | findstr “{package}”
设备日志:adb logcat
清空设备日志:adb logcat -c
启动activity:adb shell am start -n {package}/{activity}
强制结束app:adb shell am force-stop {package}
app界面操作:adb shell input {}
**app内存状况:adb shell dumpsys meminfo {package} ;adb shell top -m 10 -s cpu -n 1
设备键盘状况:adb shell dumpsys input_method | findstr “mInputShown”
app信息:aapt dump badging {app path}
app所有activity:aapt dump xmlstrings {app path} AndroidManifest.xml
设备状态:adb shell dumpsys window policy | findstr mShowingLockscreen
设备状态:adb shell dumpsys window policy | findstr isStatusBarKeyguard
设备屏蔽大小:adb shell dumpsys window | findstr “init”
设备信息:adb shell getprop
设备名:adb shell getprop ro.product.name
设备模型:adb shell getprop ro.product.model
设备输入法:shell ime list -s
设置设备输入法:adb shell ime set io.appium.android.ime/.UnicodeIME
设备截屏:adb shell /system/bin/screencap -p /sdcard/screenshot.png
设备截屏保存本地:adb pull /sdcard/screenshot.png ./screenshot.png
**app的PID:adb shell ps | findstr “{package}” 第二个
**app的UID:adb shell cat /proc/{PID}/status
**app请求数据消耗流量:adb shell cat /proc/uid_stat/{UID}/tcp_rcv
**app接受流量:adb shell cat /proc/uid_stat/{UID}/tcp_snd
**电量:adb shell dumpsys batterystats --enable full-wake-history; adb shell dumpsys batterystats --reset ; adb shell ps|findstr tmall; adb shell dumpsys battery ;adb shell dumpsys batterystats com.honeywell.wholesale.debug | more; adb bugreport > bugreport.txt
**查看CPU频率:adb shell cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
无线连接设备:adb tcpip 5555;adb connect 192.168.32.22

adb shell dumpsys命令:SurfaceFlinger,accessibility,account,activity,alarm,android.security.keystore,appops,appwidget,assetatlas,audio,backup,battery,batterypropreg,batterystats,bluetooth_manager,clipboard,commontime_management,connectivity,consumer_ir,content,country_detector,cpuinfo,dbinfo,device_policy,devicestoragemonitor,diskstats,display,display.qservice,dreams,drm.drmManager,dropbox,entropy,gfxinfo,hardware,input,input_method,iphonesubinfo,isms,listen.service,location,lock_settings,media.audio_flinger,media.audio_policy,media.camera,media.player,media_router,meminfo,mount,netpolicy,netstats,network_management,nfc,notification,package,permission,phone,power,print,procstats,samplingprofiler,scanled,scheduling_policy,search,sensorservice,serial,servicediscovery,simphonebook,sip,statusbar,telephony.registry,textservices,uimode,updatelock,usagestats,usb,user,vibrator,wallpaper,wifi,wifip2p,window

设备性能:
adb shell am start -W -n com.honeywell.wholesale.debug/com.honeywell.wholesale.ui.activity.SplashActivity
ThisTime

adb shell dumpsys cpuinfo | findstr “com.honeywell.wholesale.debug”
0.1% user + 0.1% kernel

adb shell top -n 1 |findstr “com.honeywell.wholesale.debug”
VSS Rss
adb shell dumpsys meminfo com.honeywell.wholesale.debug
Heap Alloc Heap Free Pss Total
30833 5502 52161 TOTAL
Activities: Views: AppContexts: Objects

adb shell ps | findstr “com.honeywell.wholesale.debug”
pid
adb shell cat /proc/{PID}/status
uid
adb shell cat /proc/uid_stat/{UID}/tcp_rcv
adb shell cat /proc/uid_stat/{UID}/tcp_snd
or adb shell cat /proc/{PID}/net/dev | findstr wlan0
wlan0:
adb shell cat /proc/net/xt_qtaguid/stats | findstr “10205”

adb shell cat /sys/class/thermal/thermal_zone0/temp
cpu 温度
adb shell dumpsys battery
temperature: 电池温度

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值