Original: https: //blog.csdn.net/fasfaf454/article/details/51438743
1, access to the phone system information (CPU, trade names, etc.)
adb shell "CAT /system/build.prop | grep" Product ""
2, get the phone system version
adb shell GetProp ro.build.version.release
3, access to the phone system api version
adb shell GetProp ro.build.version.sdk
4, to obtain the phone device model
adb -d shell GetProp ro.product.model
5, mobile phone manufacturers to obtain the name of
adb -d shell GetProp ro.product.brand
6, acquisition sequence of mobile phones No.
there are two ways
1、 adb get-serialno
2、 adb shell getprop ro.serialno
7, access to the phone's IMEI
three ways, due to mobile phones and systems, not necessarily to get
1, adb shell dumpsys iphonesubinfo
wherein the Device ID is the IMEI number
2, adb shell GetProp gsm.baseband.imei
3, Service Call iphonesubinfo 1
in this way, so you need to get the information processing acquired
8, get phone mac address
CAT shell adb / SYS / class / NET / wlan0 / address
9, to obtain information about the phone's memory
adb shell CAT / proc / meminfo
10, get the phone store information
adb shell df
get internal phone storage information:
Meizu phone: adb shell df / mnt / shell / emulated
other: adb shell df / data
acquisition sdcard to store information:
df shell adb / Storage / sdcard
11, get phone resolution
adb shell "dumpsys window | grep mUnrestrictedScreen"
12, get a physical phone density
adb shell wm density
-
adb shell input text
Enter a string, only supports alphanumeric and some symbol
when you need to input a control content, you need to ensure positive input box in focus -
adb shell dumpsys activty | grep -i mSleeping
Determine the current status screen
-
adb shell dumpsys cpuinfo
-
adb shell top -s cpu
Get information phone cpu
-
adb shell am start packageName/className
Start an Activity
-
adb shell am broadcast
A broadcast transmission, using -a specified Action, -d specified data
adb shell am broadcast -a 'com.icechao.broadcast'
-
adb shell am am force-stop packageName
Force stop an application
-
adb shell pm clear packageName
Clean-up application data
-
adb shelll kill pid
Kill a process
-
adb logcat -v time -d
Print logcat
-
adb shell df
File system disk space occupancy
-
adb shell /system/bin/screencap -p /sdcard/screenshot.png
Phone screenshot
-
adb shell screenrecord --time-limit 10 /sdcard/demo.mp4
Screen Recording
-
adb shell getprop dhcp.wlan0.ipaddress
Get the phone ip address
-
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
Get the phone Cpu minimum frequency
-
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
Get the phone Cpu maximum frequency
-
cat /sys/devices/system/cpu/cpu0/cpufreq/kernel_max
Get the phone number of cpu core
-
adb shell dumpsys window policy | grep mScreenOnFully
Get the phone screen strategy, windows need not use the grep command to filter information
-
adb shell dumpsys window policy | grep mShowingLockscreen
Determine whether the current phone lock screen
-
adb shell svc wifi enable/disable
打开手机wifi,实测部份三星手机不支持些方法
-
adb shell monkey
Lead a monkey implanted pressure test event for the app
grep (command '|' to the end of the name part of) command line you want to filter information from the results obtained in this command only supports linux in windows consider using findstr
After entering the phone number of common command shell mode and linux is the same, so you can directly use the linux command to obtain information phone
When the computer is connected to more than one mobile phone use adb -s command of the serial number of the phone specify phone
adb shell intput swipe left top right bottom
Swipe event implant
upper left starting position of the slide, and the lower right end position of the slide
adb shell input swipe 100 200 500 300
adb shell input tap
Implant screen click event, the first X-axis Y-axis again
adb shell input tap 100 200