查看摄像头信息
dumpsys media.camera
临时旋转屏幕角度
#关闭重力感应旋转 adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0 #手动临时旋转屏幕 adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0
查看APP的UID
------------------>1
adb shell
su
cat /data/system/packages.xml | grep com.xx.xx
------------------>2
dumpsys package com.xx.xx | grep userId=查看发送的广播
C:\Users\Administrator>adb shell
root@rk3188:/ # dumpsys |grep BroadcastRecord
dumpsys |grep BroadcastRecord
BroadcastRecord{19a86d4d u-1 android.intent.action.TIME_TICK} to user -1
BroadcastRecord{14923002 u-1 android.intent.action.TIME_TICK} to user -1
BroadcastRecord{306b3d13 u-1 android.intent.action.TIME_TICK} to user -1
BroadcastRecord{19f6fb50 u-1 android.intent.action.TIME_TICK} to user -1
BroadcastRecord{3e9b9149 u0 NextAlarmTracker.trigger} to user 0
BroadcastRecord{35f74a4e u-1 android.intent.action.TIME_TICK} to user -1注:在5.1中只能查到接收成功的广播
ping访问5次IP
ping -c 5 14.215.177.39命令调节DPI大小I
wm density 160adb查看或者设置某数据库的值
settings get system screen_brightness
settings put system screen_brightness 150查看最顶层Activity 注:7.1及7.1以下系统:
adb shell dumpsys activity | grep "mFocusedActivity"
dumpsys window | grep mCurrentFocus //7.1以上启动应用 <Launcher> 关闭应用
am start -n com.android.launcher3/.Launcher
//关闭日历
am force-stop com.android.calendar模拟按键 public static final int KEYCODE_VOLUME_DOWN = 25;
adb shell input keyevent 25 # 模拟音量-获取设置系统屏幕亮度
settings get system screen_brightness //获取屏幕亮度
settings put system screen_brightness 220 //设置屏幕亮度 0-255 查看某包名应用 是否安装
pm list package | grep test查找某文件 并查其MD5值
find vendor/ -name Ismart*.apk | xargs md5sum 查看安卓系统某属性的值
getprop | grep ggr系统休眠唤醒
echo mem > /sys/power/state 使系统进行睡眠
echo on > /sys/power/state 使系统从睡眠中唤醒过来selinux 打开关闭
1|rk3399_all:/ # setenforce 0
rk3399_all:/ # getenforce
getenforce
Permissive
1|rk3399_all:/ # setenforce 1
rk3399_all:/ # getenforce
getenforce
Enforcing查看adb端口被谁占用
netstat -ano | findstr "5037"
tasklist | find "8020"查看服务列表
adb shell service list检查xxx服务是否存在
adb shell service check xxx关机
adb shell reboot -p-----------------------------------------------
查看apk信息
dumpsys package p dumpsys 工具使用拓展:
android系统调试工具之dumpsys_lw6897的博客-CSDN博客_dumpsys
赋权限和移除权限
pm grant pkgname android.permission.CAMERA
pm revoke pkgname android.permission.CAMERA版权声明:本文为u010559573原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。