ADB (Android debut Bridge)
ADB This tool allows us to use a computer to manipulate the phone
When Android Studio is installed, it has adb in the SDK, but we want to use it to configure its environment variables as well. Configuration Step Reference: Baidu experience,
Note that because AppData this folder is hidden, you need to unhide the protected operating system files under "Folder Options--View", and click Show hidden files, folders and drives, if you do not know the SDK path, you can use the Android The SDK manager interface of Studio can be seen. You can copy the path and then paste the search in the search in desktop-to-start.
ADB basic use
1. View adb versions: ADB version//We can also use this command to see if the ADB is configured.
2. View log adb shell//feel no soft use, do not know what to do
3. Display all Android platforms in the system: Android list targets
4. Install APK program install:adb install-r app. APK//such as: ADB install-r F:\Test.apk
5. Install APK program value PUSH:ADB push <local> <remote>//such as: ADB push d:\test.apk/system/app/(note: Empty between two file paths Pane
Note: Both of these methods can install the APK, but they also have different, adb install is said apk installed in the Data/data directory as a normal user application, and Adb Push is not the installation command, it is to write a file to the phone storage system. Therefore, as long as you have the appropriate permissions, you can put any apk into any directory, or even put into the system directory, to become a systems application. ADB push can not only install APK, it is the most useful to write files to the phone
6. Get files from your phone: adb pull <remote> <local>//such as: adb push/system/temp/d:\file.text (note: Two spaces between file paths)
7. Delete app: adb remount//re-mount system partition to make system partition writable
ADB Sheel
CD System/app
RM *.apk
8. View system drive letter: ADB Shell DF
9. Output so already installed application: ADB shell PM List packages-f
10. Analog key input: adb shell iinput keyevent//such as: adb shell input keyevent 3
This blog is written by keyevent the corresponding key and number author: p6774199
11. Analog Swipe input: adb shell input touchscreen <x1> <y1> <x2> <y2>//such as: adb shell input Touchscre En swipe 18 665 18 350
12. Check the Running status://such as: adb shell Dumpsys has many running status, detailed command itself Baidu or view API documentation
The PM command is as powerful and complex as the Dumpsys command, and with PM commands you can see all the relevant information about the package in Android
Package Management Information: PM List packages-f//List all package
AM command, this command is also quite complex, and more powerful, detailed commands to view the API documentation
14. For example-start a activity:adb shell am start-n Package Name/package name + class name
15. Recording screen: adb shell Screenrecord/sdcard/demo.mp4
16. Restart: adb reboot
Source of the ADB command:
All of our adb command source \system\core\toolbox, all shell commands are in \frameworks\base\cmds
Configure ADB tools (win7_64)