Android testing or development of common aadb command collection, you can use Ctrl + F to quickly search
### ADB command highlights:
--help // adb adb help Start adb -server // start adb server the kill adb -server // close the adb server Devices adb // get the device number logcat adb // view the system log bugreport adb // printout dumpsys, dumpstate, logcat of install adb // install applications Uninstall adb // uninstall applications adb pull the phone path path computer // copy the phone to your computer files adb push mobile phone path path computer // send the file to your phone reboot adb // phone restart Recovery reboot adb // reboot into Recovery, fastboot reboot adb // reboot to fastboot in root adb // obtain root privileges GET adb -serialno // obtain the device serial number SN value GET adb -product // get the ID device Forward TCP the adb: 5555 TCP: // 8000 as the main chassis emulator or device requesting port Connect adb // connect your phone (via IP, device number) adb -s shell // device number into the shell PM List Package Penalty for shell adb // List all the application package name dumpsys Package Penalty for shell adb // get the list of phone apk screencap shell adb -p /sdcard/screen.png // screenshots, saved to the sdcard directory shell screenrecord to sdcard adb /record.mp4 // screen recording WM shell size adb // get device resolution adb shell pm dump package name // lists dump information specified applications adb shell pm path package name // lists apk specify the location of the package name PS shell adb | grep [ Process ] lists the specified process PID dumpsys meminfo shell adb [pid (Package Penalty for -name)] // memory for According PID (Packet name) to see the process Top shell adb | grep // app_name can be used to find pid PS shell adb // print process information dumpsys batterystats shell adb > xxx.txt // Check system power situation CAT shell adb / proc / meminfo // Check memory information CAT shell adb / proc / cpuinfo // View CPU Information GetProp ro.product.cpu.abi shell adb // get arm version of the phone GetProp shell adb | findstr the ICCID // get the phone ICCID LOCATION dumpsys shell adb | findstr " Last Know the Location " // get the phone latitude and longitude adb shell settings get secure android_id //查询Android ID CAT shell adb / SYS / class / NET / wlan0 / address // get the phone MAC address GetProp shell adb | grep IMEI // get the phone IMIE CAT shell adb /system/build.prop | grep " Product " // get device information ifconfig wlan0 shell adb | findstr " inet " to obtain the IP address of the phone adb shell ifconfig wlan0 (wlan0 for the network card name) ifconfig wlan0 shell adb | the Find " inet addr " get IPV4 address ifconfig wlan0 shell adb | the Find " inet6 addr " acquiring IPV6 address adb shell ifconfig wlan0 | grep -e 'inet addr | inet6 addr' ifconfig wlan0 shell adb | grep -e 'inet * ' get IPV4 and IPv6 address Privacy adb log related commands: shell logcat adb -b All> file path ----- acquisition system log shell logcat adb -v Time> file path ----- acquisition system log adb shell ps see the process ID PS shell adb > file path to the output process ID file adb logcat -v thread time > d:\xx.txt bugreport the adb > ------ local path using the command fetch 284log GetProp ro.product.model shell adb // get the name of the phone GetProp ro.build.version.release shell adb // get mobile version GetProp ro.product.brand shell adb // get mobile phone manufacturers List IME shell adb -s // get the input method has been installed Secure Settings GET default_input_method shell adb // Get the current input method dumpsys Package Penalty for com.example.test shell adb | findstr versionCode // View App version com.example.test the need to replace the Kazakh according to specific test APP package name Modify phone battery hundred percent: adb shell dumpsys battery unplug 断电 adb shell dumpsys battery set level x is set to "x" power adb shell dumpsys battery reset 重置 dumpsys window Windows shell adb | findstr mFocusedApp // obtain application information currently open App startup time AM Start shell adb -W package name / start name Example: adb shell am start -W com.yly.drawpic/.MainActivity Explanation: TotalTime: app own start-up time WaitTime: boot time application