系统信息
cat /system/build.prop
获取手机型号
getprop ro.product.model
获取安卓版本
getprop ro.build.version.release
获取分辨率
wm size
查看屏幕密度
wm density
查看显示屏参数
dumpsys window displays
查看android_id
settings get secure android_id
查看IMEI
umpsys iphonesubinfo
4.4
service call iphonesubinfo 1
获取MAC
cat /sys/class/net/wlan0/address
获取cpu
cat /proc/cpuinfo
获取电池信息
dumpsys battery
使用adb命令获取GPS信息
dumpsys location
native internal state: Gnss Location Data:: LatitudeDegrees: 32.8108, LongitudeDegrees: 115.895, altitudeMeters: 122.174, speedMetersPerSecond: 0, bearingDegrees: 0, horizontalAccuracyMeters: 22.512, verticalAccuracyMeters: 16, speedAccuracyMetersPerSecond: 0.33541, bearingAccuracyDegrees: 180, ageSeconds: 1.73269e+09
打开定位设置界面:
am start -a android.settings.LOCATION_SOURCE_SETTINGS
静默开启定位:
settings put secure location_providers_allowed +gps
静默关闭定位:
settings put secure location_providers_allowed -gps
查看定位方式:
settings get secure location_providers_allowed (前提是位置信息开启)
修改gps定位信息
使用adb emu命令执行设备的console命令geo fix,gps的经度和纬度
adb -s emulator-5554 emu geo fix 121.49612 31.24010
获取顶层活动的app
dumpsys window |grep mCurrentFocus
查看安装包
pm list packages
通过包名获取apk路径
pm path <package-name>
读取手机短信:这将列出所有短信消息的详细信息,例如短信内容、发送者和接收者的电话号码、时间戳等。
adb shell content query --uri content://sms/
读取手机通话记录:这将列出所有通话记录的详细信息,例如通话类型、通话时间、对方号码、通话持续时间等。
adb shell content query --uri content://call_log/calls
读取手机日历:这将列出所有日历事件的详细信息,例如事件名称、开始时间、结束时间、位置等。
db shell content query --uri content://com.android.calendar/events
读取手机通讯录:这将列出手机通讯录中所有联系人的电话号码、姓名和其他详细信息。
adb shell content query --uri content://contacts/phones/
拍照
shell am start -a android.media.action.STILL_IMAGE_CAMERA 启动camera
adb shell input keyevent 27 //camera 键
adb shell input keyevent 4 //back 键