Connect the Android device to the computer for adb command operation

The Android real machine performs the operation of the adb command :

Connection method:

  • Data cable connection:

1) The mobile phone needs to be connected to the computer through a data cable;

2) Call up the developer options on the mobile phone; mobile phone operation steps: settings - system - about mobile phone (tablet) - connect and click the version number (5 or 7 times, prompting that the developer mode is turned on) - return to the previous Layer - enter developer options - enable USB debugging;

3) The mobile phone prompts to select the connection method - select MIDI for Huawei mobile phones (it seems that Xiaomi mobile phones do not need to choose and ignore the third step) - then return to the developer option to enable USB debugging - prompt whether to allow USB debugging - OK

4) Open the cmd window and enter: adb devices as shown in the figure below, indicating that the connection is successful

  •  Wireless connections:

Not organized yet, Baidu

The emulator performs the operation of the adb command :

  • Common port numbers for various emulators in windows

Emulator name port number:

  • Real machine 5555
  • Getaway 21503
  • Night Simulator 62001
  • Seahorse Play Simulator 26944
  • Netease mumu simulator 7555
  • Everyday Simulator 6555
  • BlueStacks 5555
  • Everyday Android Simulator 5037
  • Android Emulator Master 54001
  • Genymotion 5555

The simulator generally turns on the developer option by default, so after downloading the simulator, you can directly perform the following operations

Open the cmd window and enter: adb connect 127.0.0.1:7555 as shown in the figure below, indicating that the connection is successful

 

Guess you like

Origin blog.csdn.net/YouJeffrey/article/details/130791338