自己整理的常用的android adb命令

  1. adb shell kill [PID]       //杀死进程  
  2. adb 命令查看程序进程方便简洁高效  
  3. adb shell ps       //查看所有进程列表,Process Status  
  4. adb shell ps|grep     //查看package_name程序进程  
  5. adb shell ps -x [PID]      //查看PID进程状态  
  6. adb shell top|grep  //实时监听程序进程的变化  
  7. adb shell dumpsys window | findstr mCurrentFocus
  8. adb logcat | findstr -i displayed查找当前显示的程序
  9. adb shell pm dump 包名 | findstr version 包的版本号
  10. adb shell dumpsys package 包名 | findstr version
  11. adb shell stop 避免adb reboot 重启
  12. adb shell start
  13. aapt dump badging +包 查看包的信息version
  14. adb shell dumpsys activity activities
  15. adb logcat -c 清除缓存日志
  16. adb install -t 强制安装
  17. adb shell am start -W com.xgd.update/com.xgd.update.UpdateActivity
  18. adb shell cptbtptpbcptdtptp
  19. adb shell pm path com.android.systemui 查找包名对应的路径
  20. adb shell dumpsys package>package.txt 查看package信息
  21. adb shell dumpsys meminfo com.gree.aiservice查看内存信息:
  22. adb shell procrank
  23. adb shell cat /proc/meminfo
  24. adb shell settings get system screen_brightness 获取当前亮度值
  25. adb shell settings put system screen_brightness 更改亮度值(亮度值在0—255之间)
  26. adb shell settings get system screen_off_timeout 获取屏幕休眠时间
  27. adb shell settings put system screen_off_timeout 更改休眠时间,10分钟
  28. adb shell settings get global auto_time 获取日期时间选项中通过网络获取时间的状态,1为允许、0为不允许
  29. adb shell settings put global auto_time 更改该状态,从1改为0

1.关闭一个app

adb shell am force-stop 包名

2.dump 信息

adb shell dumpsys | grep "DUMP OF SERVICE"

adb shell dumpsys window windows

adb shell dumpsys SurfaceFlinger

adb shell dumpsys window

adb shell dumpsys audio

adb shell dumpsys activity

java - How do I discover memory usage of my application in Android? - Stack Overflow

Ddi.ddi_sys_set_beep(timeout); adb shell getprop persist.sys.system.volum

adb shell getprop persist.xgd.buzzer.sys.enable

adb shell getprop persist.xgd.buzzer.volum.enable

adb shell am start -W 包名/activity的名字

MTK oem解锁:

– boot to Home Screen

– go to setting -> system -> Developer options -> OEM unlocking

– adb reboot bootloader

– fastboot flashing unlock

– press volume up key

– fastboot reboot

– adb root

– adb disable-verity

– adb reboot

usb_control_host

adb命令adb shell settings put global airplane_mode_on 1开启 飞行模式,通过adb shell sett...

adb shell settings get system "airplane_mode_on"

获取当前手机是否是飞行模式:Settings.System.AIRPLANE_MODE_ON

获取当前sim卡是否可用 state.enabled = Settings.Global.getInt(mContext.getContentResolver(), "sim_enable_by_subid"+subId, 1) == 1;

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值