惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
博客园 - 司徒正美
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
Apple Machine Learning Research
Apple Machine Learning Research
Last Week in AI
Last Week in AI
爱范儿
爱范儿
WordPress大学
WordPress大学
V
V2EX
宝玉的分享
宝玉的分享
小众软件
小众软件
B
Blog
博客园 - 叶小钗
U
Unit 42
酷 壳 – CoolShell
酷 壳 – CoolShell
人人都是产品经理
人人都是产品经理
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
腾讯CDC
H
Help Net Security
P
Proofpoint News Feed
D
Docker
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
月光博客
月光博客

博客园 - 翻滚的咸鱼

Ops权限行为记录源码解析 TaskView方案框架原理 视频解码器问题 扫光动效 引导记录 性能优化 View共享动效 常用脚本文件 Launcher 卡片框架多模块集成 Launcher 桌面源码笔记二 Launcher 桌面源码笔记一 氛围灯动态屏保取色方案二 氛围灯动态屏保取色方案一 自定义最近任务管理器 anr问题 TV RecyclerView 焦点处理笔记 多类型适配器 多屏下字体自动取色 阻尼拉伸方案 图片区域点击处理 RecyclerView设置默认焦点跟多页面焦点抢占 TV RecyclerView 滑动后操作保持落焦在左侧第一个View Fragment翻盖动效 当个View下,使用Drawable入场退场动画
常用命令
翻滚的咸鱼 · 2026-07-03 · via 博客园 - 翻滚的咸鱼

投屏相关

D:\scrcpy-win64-v2.1.1\scrcpy.exe --display=2

D:\scrcpy-win64-v3.3.4\scrcpy.exe --display-id=2

模拟按键

adb shell input keyevent 4

禁用应用

adb shell pm disable-user com.test

启用应用

adb shell pm enable com.test

允许执行未授权操作(如未签名应用访问系统资源)

adb shell getenforce  # 输出 "Permissive" 表示成功

adb shell setenforce 0

dump相关

adb shell dumpsys meminfo com.test > d:/dumpsys_mem.txt

adb shell dumpsys input > input.log
adb shell dumpsys activity com.test> actdump.log
adb shell dumpsys window windows > dumpsys_w.txt
adb shell dumpsys SurfaceFlinger > dumpsys_sf.txt

查看进程cpu

获取前台进程包名 adb shell dumpsys window | findstr mCurrentFocus
通过包名获取PID
adb shell ps | findstr com.cubic.autohome
监控进程CPU
adb shell top -p 8971 -u u0_a179

copy文件

adb pull /mnt/log/DHU7  C:\Users\Desktop

删除文件

adb shell rm -r mnt/log/DHU7

adb shell rm -rf  /mnt/scratch/overlay

分辨率相关

adb shell wm size 3200x2000

adb shell wm size reset

adb shell wm density 240

adb shell wm density reset

adb shell wm density 240 -d 2

startActivity

adb shell am start -n  com.test/com.test.activity.MainActivity --display 2

发送广播

adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -n com.test/.receiver.TestReceiver

adb shell am broadcast -a com.intent.action.CONTROL_BOARD_CLOSE

查询设备存储

adb shell df -h
adb shell df -h /sdcard

拉去当前日志

adb logcat -v time > log/logcat.log

结束进程

adb shell am force-stop com.test

adb shell ps | findstr ecarx.launcher3
adb shell kill 18721

切换深浅色

adb shell "cmd uimode night yes"

查询应用版本

adb shell dumpsys package  ecarx.launcher3 | findstr version

打开系统设置

adb shell am start -a android.settings.SETTINGS

清楚应用缓存

adb shell pm clear com.test

所有运行的进程

adb shell
ps -A|grep multi

所有屏幕信息

adb shell

dumpsys display | grep mBaseDis

push

git push origin HEAD:refs/for/master