Device connection management Inquiries connected device / simulator
Now run adb shell, take a look at the command line prompt is not turned into a#?Īfter some phone root can not let adbd by adb root execute commands with root privileges, some models such as Samsung, will be prompted to adbd can not run as root in production builds, then you can install adbd Insecure, then adb root try.Īccordingly, if you want to restore adbd non-root privileges, you can use adb unroot command. Then you can then execute the command adb shell after su, but also allows adbd root privileges to perform this high privilege can execute arbitrary commands. So if adbd ordinary rights to perform some require root privileges to execute the command can not be directly used adb xxx execution.
The operating principle is adb adb server daemon and the phone side PC side adbd establish a connection, then the PC side adb client via adb server forward command parsing after running adbd receive commands. Revision 8f855a3d9b35-android Run adbd as root Sample output: Android Debug Bridge version 1.0.36 Stop adb server command: adb kill-server View adb version
(Generally no need to manually execute this command, when you run the command adb adb server if found does not start automatically from the transfer.) Start adb server command: adb start-server For example, this time I want to specify cf264b8f this equipment to run the adb command to take a screen resolution: adb -s cf264b8f shell wm sizeĮncountered multiple devices / simulators use the case of these parameters for the command to specify the target device, hereinafter to simplify the description will not be repeated. Output in the cf264b8f and emulator-5554 is serialNumber. In the case of multiple devices / simulators are connected to the more common -s parameters, serialNumber can be obtained through adb devices command. Specifies the device number corresponding serialNumber / simulator command target Specify currently the only goal for the command to run the simulator Specifies currently the only Android device USB connector as the command target If you have more than one device / emulator connection, you need to specify the target device for the command. If only one device / emulator connection, you can omit the this part, the direct use adb. Īdb basic syntax of the command is as follows: adb.
The Android Debug Bridge (ADB) is a toolkit included in the Android SDK package, it is not only a powerful tool for Android developers and testers, but also a good toy for Android fans.