HBuilder Android real machine debugging wireless connection

HBuilder Android real machine debugging wireless connection

Preparation

Prepare the following first:

  1. ADB toolkit;
  2. Hbuilder
  3. Android phone ;

hbuilderx configuration adb path

  1. Open [hbuilderx] and you can find [Settings] under [Tools] in the menu bar.
    set up

  2. On the left, see [Run Configuration] properties, click and press.

  3. Find [adb path] in the window for custom configuration.
    run configuration

Real machine debugging wireless connection

  1. The Android device enables USB debugging and connects to the computer via a USB cable. (USB stay connected)
  2. cd to the adb directory
  3. cmdThe command executes the following command adb tcpip 5555to make the phone listen to this port.
  4. cmdThe command executes the following command adb connect 192.168.2.157(192.168.2.157 is the IP address of the Android device. Pay attention to the mobile phone pop-up window)
  5. runHBuilderproject
  6. Unplug the USB cable, adb throughwifiDebug Android devices.
  7. If you need to restore to the USB data cable, you can enter it on the command line adb usb, or you canadb disconnect 192.168.2.157:5555

Notice

  1. Android devices need to enable USB debugging.
  2. The Android device must be on the same LAN as the PC.
  3. After the adb wifi connection is successful, the USB cable should be pulled out, otherwise there will be a problem that adb connects to two devices at the same time.
  4. You may need to re-enable USB debugging after executing the command adb tcpip 5555.
  5. available atchrome://inspect/#devices

Guess you like

Origin blog.csdn.net/weixin_43483746/article/details/128381112