常见的使用工具

795 阅读1分钟

1. App包名

  1. B站: tv.danmaku.bili || tv.danmaku.bilibilihd
  2. air.tv.douyu.android
  3. com.baidu.BaiduMap
  4. com.autonavi.minimap
  5. com.smile.gifmaker
  6. com.ss.android.ugc.aweme
  7. com.eg.android.AlipayGphone
  8. 西瓜视频:com.ss.android.article.video
  9. 爱奇艺pad:com.qiyi.video.pad 10.优酷: com.youku.phone 11.腾讯视频&腾讯视频HD:com.tencent.qqlive
  • 清除app内容

adb shell pm clear com.android.systemui

  • 强制停止app

adb shell am force-stop com.eg.android.AlipayGphone

2. 锁屏和解锁广播

// 锁屏广播

public static final String ACTION_SCREEN_OFF = "android.intent.action.SCREEN_OFF";
public static final String ACTION_SCREEN_ON = "android.intent.action.SCREEN_ON";

// 解锁广播

public static final String ACTION_USER_PRESENT = "android.intent.action.USER_PRESENT";

3.查看当前rom的feature标志

adb shell pm list features > feature.txt

4.查看当前模块的持锁情况

adb shell dumpsys power > power.txt

5.adb进行截屏

  • record vedio

adb shell screenrecord --time-limit 20 /sdcard/demo.mp4

  • record picture

adb shell /system/bin/screencap -p /sdcard/douyin.png

6.adb启动某个actiivty

adb shell am start -n com.tencent.mm/.plugin.finder.feed.ui.FinderLiveVisitorWithoutAffinityUI

启动QQ音乐 service : adb shell am startservice -n com.tencent.qqmusic/.service.MainService

7.过滤打印相应的日志

adb logcat -c & adb logcat -b all > temp.log

8. 过滤打印

adb shell

logcat | grep "pause in recents anim for mTaskFragment"

9. 查看进程优先级

  1. adb shell
  2. ps -A | grep com.android.mms

image.png

  1. 查看进程优先级

cat proc/12069/oom_adj

  1. 查找字符串所在的文件

grep -rn "Large reply" *