Equipment debugging methods and devices, storage media

By enabling automatic network configuration and debugging via radio frequency communication, the cumbersome operation of existing ADB debugging methods has been resolved, resulting in a highly efficient device debugging experience, especially improving connection stability and transmission speed in long-distance scenarios.

CN116074222BActive Publication Date: 2026-04-03BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-29
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing ADB debugging methods require users to manually configure the network and manually enable the debugging function, which is cumbersome and inefficient. Especially when users cannot connect at close range, the Wi-Fi debugging method is insufficient in terms of connection distance, stability and transmission speed.

Method used

The network configuration information is sent to the device via radio frequency communication, eliminating the need for manual operation by the user. This allows the device to automatically join the local area network and enable debugging functions. Debugging is performed using the wireless connection of the local area network, improving connection distance, stability, and transmission speed.

Benefits of technology

It enables an intelligent debugging process that requires no manual user intervention, improving the efficiency and user experience of ADB debugging, and significantly enhancing connection stability and transmission speed, especially in long-distance scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116074222B_ABST
    Figure CN116074222B_ABST
Patent Text Reader

Abstract

This disclosure relates to a device debugging method, apparatus, and storage medium. The device debugging method, applied to a first device, includes: establishing a radio frequency communication connection with a second device; sending network configuration information to the second device based on the radio frequency communication connection; the network configuration information being used by the second device to join the local area network (LAN) where the first device is located and triggering the activation of the debugging function; and performing debugging on the second device within the LAN. This method improves device debugging efficiency and operational convenience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a device debugging method and apparatus, and a storage medium. Background Technology

[0002] ADB (Android Debug Bridge) is a general-purpose command-line tool in the Android development kit. It can act as a bridge between Android devices and personal computers (PCs), so ADB is also known as the Android debug bridge.

[0003] Users can perform various operations on Android devices from their PCs using ADB, such as installing and debugging applications, transferring files, and running shells. Due to its ease of use and rich functionality, ADB has become an indispensable and powerful tool for Android developers and testers. Improving the efficiency of ADB debugging has always been a focus of attention. Summary of the Invention

[0004] This disclosure provides a device for debugging equipment and a storage medium.

[0005] According to a first aspect of the present disclosure, a device debugging method is provided, applied to a first device, comprising:

[0006] Establish radio frequency communication connection with the second device;

[0007] Based on the radio frequency communication connection, network configuration information is sent to the second device; the network configuration information is used for the second device to join the local area network where the first device is located and to trigger the start of the debugging function.

[0008] The second device is debugged within the local area network.

[0009] In some embodiments, sending distribution network information to the second device based on the radio frequency communication connection includes:

[0010] Based on the radio frequency communication connection, a debugging request is sent to the second device;

[0011] Receive the confirmation message from the second device in response to the debugging request;

[0012] Based on the confirmation message, the distribution network information is sent to the second device via the radio frequency communication connection.

[0013] In some embodiments, sending the network distribution information to the second device based on the radio frequency communication connection according to the confirmation message includes:

[0014] Based on the confirmation message, the network connection method of the first device is determined;

[0015] If the first device uses a wired connection, it sends network configuration information for connecting to the hotspot of the first device to the second device based on the radio frequency communication connection;

[0016] If the first device uses a wireless connection, it sends the network configuration information of the local area network where the first device is located to the second device based on the radio frequency communication connection.

[0017] In some embodiments, the method further includes:

[0018] Based on the radio frequency communication connection, the network address of the second device sent by the second device is received;

[0019] The debugging of the second device within the local area network includes:

[0020] Within the local area network, a connection for debugging is established based on the network address and the second device, and debugging commands are sent to the second device.

[0021] In some embodiments, the connection for debugging includes an Android Debug Bridge (ADB) connection; the network address includes the Internet Protocol (IP) address of the second device and the port number of the ADB service in the second device.

[0022] According to a second aspect of the present disclosure, a device debugging method is provided, applied to a second device, the method comprising:

[0023] Establish radio frequency communication connection with the first device;

[0024] Based on the radio frequency communication connection, the distribution network information sent by the first device is received;

[0025] Based on the network configuration information, join the local area network where the first device is located and enable the debugging function;

[0026] Debugging is performed within the local area network and with the first device.

[0027] In some embodiments, receiving the network distribution information sent by the first device based on the radio frequency communication connection includes:

[0028] Based on the radio frequency communication connection, receive the debugging request sent by the first device;

[0029] A confirmation message is sent to the first device according to the debugging request;

[0030] Based on the radio frequency communication connection, the distribution network information sent by the first device according to the confirmation message is received.

[0031] In some embodiments, sending an acknowledgment message to the first device according to the debugging request includes:

[0032] Upon receiving the debugging request, a first message prompting whether to perform device debugging is output.

[0033] In response to detecting an acknowledgment operation based on the first message output, the acknowledgment message is sent to the first device.

[0034] In some embodiments, the method further includes:

[0035] Based on the radio frequency communication connection, the network address of the second device is sent to the first device;

[0036] The debugging process within the local area network and on the first device includes:

[0037] Within the local area network, a connection for debugging is established based on the network address and the first device, and debugging instructions sent by the first device are received.

[0038] In some embodiments, the method further includes:

[0039] After establishing a debugging connection based on the network address and the first device, a second message indicating that the connection was successfully established is output.

[0040] According to a third aspect of the present disclosure, a device debugging apparatus is provided, applied in a first device, comprising:

[0041] The first module is configured to establish a radio frequency communication connection with the second device.

[0042] The first transmitting module is configured to send network configuration information to the second device based on the radio frequency communication connection; the network configuration information is used for the second device to join the local area network where the first device is located and to trigger the start of the debugging function;

[0043] The first debugging module is configured to debug the second device within the local area network.

[0044] In some embodiments, the first transmitting module is further configured to send a debugging request to the second device based on the radio frequency communication connection; receive a confirmation message from the second device based on the debugging request; and send the distribution network information to the second device based on the confirmation message based on the radio frequency communication connection.

[0045] In some embodiments, the first sending module is further configured to determine the network connection mode of the first device based on the confirmation message; if the first device uses a wired connection, send network configuration information for connecting to the hotspot of the first device to the second device based on the radio frequency communication connection; if the first device uses a wireless connection, send network configuration information of the local area network where the first device is located to the second device based on the radio frequency communication connection.

[0046] In some embodiments, the apparatus further includes:

[0047] The first receiving module is configured to receive the network address of the second device sent by the second device based on the radio frequency communication connection;

[0048] The first debugging module is further configured to establish a debugging connection with the second device based on the network address within the local area network, and to send debugging commands to the second device.

[0049] In some embodiments, the connection for debugging includes an Android Debug Bridge (ADB) connection; the network address includes the Internet Protocol (IP) address of the second device and the port number of the ADB service in the second device.

[0050] According to a fourth aspect of the present disclosure, a device debugging apparatus is provided, applied in a second device, comprising:

[0051] The second connection module is configured to establish a radio frequency communication connection with the first device;

[0052] The second receiving module is configured to receive network distribution information sent by the first device based on the radio frequency communication connection;

[0053] The distribution network module is configured to join the local area network where the first device is located and enable the debugging function according to the distribution network information;

[0054] The second debugging module is configured to perform debugging within the local area network and with the first device.

[0055] In some embodiments, the second receiving module is further configured to receive a debugging request sent by the first device based on the radio frequency communication connection; send an acknowledgment message to the first device according to the debugging request; and receive the network distribution information sent by the first device according to the acknowledgment message based on the radio frequency communication connection.

[0056] In some embodiments, the second receiving module is further configured to, in response to receiving the debugging request, output a first message prompting whether to perform device debugging; and in response to detecting a confirmation operation based on the output first message, send the confirmation message to the first device.

[0057] In some embodiments, the apparatus further includes:

[0058] The second transmitting module is configured to transmit the network address of the second device to the first device based on the radio frequency communication connection;

[0059] The second debugging module is further configured to establish a debugging connection with the first device based on the network address within the local area network, and to receive debugging instructions sent by the first device.

[0060] In some embodiments, the apparatus further includes:

[0061] The output module is configured to output a second message indicating that the connection was successfully established after establishing a debugging connection based on the network address and the first device.

[0062] According to a fifth aspect of the present disclosure, a device debugging apparatus is provided, comprising:

[0063] processor;

[0064] Memory used to store processor-executable instructions;

[0065] The processor is configured to perform the device debugging method as described in the first aspect above; or is configured to perform the device debugging method as described in the second aspect above.

[0066] According to a sixth aspect of the present disclosure, a storage medium is provided, comprising:

[0067] When the instructions in the storage medium are executed by the processor of the first device, the first device is able to perform the device debugging method as described in the first aspect above; or, when the instructions in the storage medium are executed by the processor of the second device, the second device is able to perform the device debugging method as described in the second aspect above.

[0068] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0069] The first device in this disclosure sends network configuration information to the second device via radio frequency communication, eliminating the need for manual network configuration by the user to add the second device to the local area network (LAN) where the first device is located. Furthermore, after the second device joins the LAN via radio frequency communication, it triggers the activation of the debugging function, allowing the first device to debug the second device within the LAN. This also eliminates the need for manual user intervention to activate the debugging function, thus demonstrating intelligence and improving the user experience. In addition, this disclosure establishes radio frequency communication to obtain network configuration information and then performs debugging within the LAN. Considering that wireless connections based on LANs are superior to radio frequency communication connections in terms of connection distance, stability, and transmission speed, this disclosure is more convenient for users and improves debugging efficiency compared to debugging via radio frequency communication.

[0070] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0071] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0072] Figure 1 This is a device debugging method flow shown in an embodiment of the present disclosure. Figure 1 .

[0073] Figure 2 The diagram shown illustrates an example of a personal computer and an Android phone establishing near-field communication.

[0074] Figure 3 This is an example diagram of device debugging in an embodiment of this disclosure.

[0075] Figure 4 This is a device debugging method flow shown in an embodiment of the present disclosure. Figure 2 .

[0076] Figure 5 This is an interactive diagram illustrating a device debugging method according to an embodiment of this disclosure.

[0077] Figure 6 This is an example diagram illustrating a device debugging method according to an embodiment of this disclosure.

[0078] Figure 7 This is a device debugging apparatus according to an exemplary embodiment. Figure 1 .

[0079] Figure 8 This is a device debugging apparatus according to an exemplary embodiment. Figure 2 .

[0080] Figure 9This is a block diagram of an electronic device illustrated in an embodiment of this disclosure. Detailed Implementation

[0081] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0082] ADB is a client-server program consisting of three components: a client, which sends commands and runs on the server; a daemon process called adbd, which runs commands on the Android device as a background process; and a server, which manages communication between the client and the daemon process and runs as a background process on the PC. When a user launches an ADB client, the client first checks if an ADB server process is running. If not, it starts the server process. After starting, the server binds to the local Transmission Control Protocol (TCP) port 5037 and listens for commands from ADB clients. Then, the server establishes connections with all running Android devices. It searches for emulators or Android devices by scanning odd-numbered ports between 5555 and 5585. Once the server finds the ADB daemon process adbd, it establishes a connection to the corresponding port. The daemon process running on the Android device continuously queries the received debug commands and the results of the sent debug commands, providing debugging information for maintenance personnel to analyze and resolve faults.

[0083] Figure 1 This is a device debugging method flow shown in an embodiment of the present disclosure. Figure 1 ,like Figure 1 As shown, the device debugging method applied to the first device includes the following steps:

[0084] S11. Establish radio frequency communication connection with the second device;

[0085] S12. Based on the radio frequency communication connection, send network configuration information to the second device; the network configuration information is used for the second device to join the local area network where the first device is located and to trigger the start of debugging function.

[0086] S13. Debug the second device within the local area network.

[0087] In embodiments of this disclosure, the first device includes, but is not limited to, a personal computer, and the second device may be a smartphone, a tablet computer, or a smartphone emulator.

[0088] Both the first and second devices are point-to-point radio frequency (RF) devices. In step S11, the first device establishes an RF communication connection with the second device. This RF communication connection can be a Bluetooth connection, a Near Field Communication (NFC) connection, or an infrared communication connection, etc.

[0089] Figure 2 The image shown is an example of a personal computer and an Android phone establishing near-field communication. Figure 2 As shown, the personal computer is the first device, and the Android phone is the second device. When a user wants to debug their Android phone, they simply need to bring the NFC-enabled phone close to the NFC module's sensing area on the personal computer to establish a radio frequency communication connection.

[0090] In step S12, the first device sends network configuration information to the second device based on the radio frequency communication connection, enabling the second device to join the local area network where the first device is located and to enable the debugging function. It should be noted that the second device can only accept debugging from the first device in step S13 after enabling the debugging function. For example, the second device can enable the debugging function by actively turning on the debugging switch.

[0091] In the embodiments of this disclosure, the network configuration information includes at least a wireless network identifier and may also include a password corresponding to the wireless network identifier. For example, for a public network without a password, the network configuration information only needs to include the wireless network identifier, while for a private network, the network configuration information needs to include both the wireless network identifier and the password. The wireless network identifier can be a Service Set Identifier (SSID), which is used to distinguish different networks. The SSID can be the name of a local area network (LAN), and devices with the same SSID can communicate with each other within their respective LANs.

[0092] Taking an Android device as an example, where the first device performs ADB debugging on the second device, the standard Android platform supports Universal Serial Bus (USB) interface connection debugging. This means the personal device connects to the Android device via USB cable for ADB, and the personal computer sends ADB debugging commands to the Android device, which then sends debugging information back to the personal computer. Additionally, the standard Android platform also supports remote ADB connection to the Android device using Wi-Fi wireless communication. This means the personal computer and Android device connect to the same wireless network, and the personal computer sends ADB debugging commands and receives debugging information from the Android device. When the Android device's USB port is occupied or malfunctioning, the advantages of using Wi-Fi for ADB debugging become apparent. Furthermore, even in scenarios where the personal computer and Android device are far apart, Wi-Fi-based ADB can still accomplish the task effectively.

[0093] However, using the ADB debugging method via Wi-Fi requires connecting the PC and Android device to the same Wi-Fi network and manually enabling the Android device's wireless debugging switch. For example, the user needs to go to the settings interface and tap the build number seven times to display the wireless debugging switch and enable the debugging function. As you can see, the operation is very cumbersome, which is inconvenient for both developers and testers.

[0094] Another solution is to debug based on point-to-point radio frequency communication. However, this solution does not reduce the preparation work on the Android device. For example, the user still needs to manually turn on the debug switch. Moreover, the distance, stability and transmission speed of the radio frequency connection are not as good as the Wi-Fi connection.

[0095] To address this, this disclosure utilizes a radio frequency (RF) communication connection to send network configuration information to the second device. This eliminates the need for manual network configuration by the user to add the second device to the local area network (LAN) where the first device is located. Furthermore, once the second device joins the LAN via the RF communication connection, it triggers the activation of the debugging function, allowing the first device to debug the second device within the LAN. This also eliminates the need for manual user intervention to activate the debugging function, thus providing intelligence and improving the user experience. In addition, this disclosure establishes RF communication to obtain network configuration information and then performs debugging within the LAN. Considering that LAN-based wireless connections offer superior connection distance, stability, and transmission speed compared to RF communication connections, this disclosure is more convenient for users while also improving debugging efficiency.

[0096] It should be noted that the solution disclosed herein is not limited to ADB debugging. Any other debugging method that requires users to manually configure the network and / or manually enable the debugging function is within the scope of protection of this disclosure.

[0097] In one embodiment, sending distribution network information to the second device based on the radio frequency communication connection includes:

[0098] Based on the radio frequency communication connection, a debugging request is sent to the second device;

[0099] Receive the confirmation message from the second device in response to the debugging request;

[0100] Based on the confirmation message, the distribution network information is sent to the second device via the radio frequency communication connection.

[0101] In the embodiments of this disclosure, before sending network distribution information to the second device, the first device first sends a debugging request to the second device to allow the user of the second device to confirm whether the second device can be debugged. If the user of the second device confirms that the second device can be debugged, a confirmation message is sent to the first device. After receiving the confirmation message, the first device then sends the network distribution information to the second device based on the radio frequency communication connection.

[0102] The debugging request sent by the first device may carry the identification information of the first device or the user information of the user of the first device, so that the user of the second device can confirm whether the first device has debugging privileges.

[0103] It should be noted that in the embodiments of this disclosure, if the first device does not receive a confirmation message from the second device, the first device will not send network configuration information to the second device, and therefore the first device cannot debug the second device within the local area network. Furthermore, the first device can also preset a time limit to determine whether it receives a confirmation message from the second device within that preset time limit. If the first device does not receive a confirmation message within the preset time limit, it will not send network configuration information to the second device. By setting a preset time limit, the ineffective waiting time of the first device can be reduced.

[0104] It is understood that this disclosure determines whether to send distribution network information through a request (debugging request) and response (confirmation message) method, so that the second device can be debugged in the local area network later. This can reduce the invalid transmission of distribution network information when the user does not allow the second device to be debugged, thereby increasing the necessity of sending distribution network information and thus improving the debugging efficiency of the device.

[0105] In one embodiment, sending the distribution network information to the second device based on the radio frequency communication connection according to the confirmation message includes:

[0106] Based on the confirmation message, the network connection method of the first device is determined;

[0107] If the first device uses a wired connection, it sends network configuration information for connecting to the hotspot of the first device to the second device based on the radio frequency communication connection;

[0108] If the first device uses a wireless connection, it sends the network configuration information of the local area network where the first device is located to the second device based on the radio frequency communication connection.

[0109] In the embodiments of this disclosure, the first device sends network configuration information to the second device in advance according to its own network connection method, so that the second device can join the local area network (LAN) where the first device is located. If the first device uses a wired connection to access the network, it sends the network configuration information of its hotspot to the second device to share the wired route. After the second device accesses the network based on the network configuration information of the first device's hotspot, it will be in the same LAN as the first device. If the first device uses a wireless connection, it can also send the network configuration information of its connected LAN to the second device, enabling the second device to access the LAN.

[0110] Understandably, the first device in this disclosure sends distribution information according to its own network connection method, which is flexible and can improve the success rate of the second device connecting to the local area network where the first device is located, thus helping to debug the second device in the local area network.

[0111] In one embodiment, the method further includes:

[0112] Based on the radio frequency communication connection, the network address of the second device sent by the second device is received;

[0113] The debugging of the second device within the local area network includes:

[0114] Within the local area network, a connection for debugging is established based on the network address and the second device, and debugging commands are sent to the second device.

[0115] In embodiments of this disclosure, the first device needs to establish a debugging connection with the second device in order to debug the second device. Before establishing the debugging connection, the first device needs to obtain the network address of the second device. In embodiments of this disclosure, since the first device and the second device have established a point-to-point radio frequency communication connection beforehand, the first device can receive the network address of the second device based on radio frequency communication.

[0116] Of course, in the embodiments disclosed herein, the first device may send its network address to the second device based on the radio frequency communication connection, and the second device may actively establish a debugging connection with the first device based on the network address of the first device.

[0117] In one embodiment, the connection for debugging includes an Android Debug Bridge (ADB) connection; the address information includes the Internet Protocol (IP) address of the second device and the port number of the ADB service in the second device.

[0118] In the embodiments of this disclosure, the first device can establish an ADB connection with the second device based on the Internet Protocol Address (IP) and the port number of the ADB service provided by the second device, and send debugging commands to the second device to debug it. The port number of the ADB service is the same as the port number corresponding to the aforementioned ADB daemon process adbd.

[0119] Figure 3 This is an example diagram of device debugging in an embodiment of this disclosure, such as... Figure 3 As shown, once the server detects the ADB daemon process (adbd) on an Android device, it establishes a connection with the corresponding port, thus establishing an ADB connection between the first device (PC) and the second device (Android phone). Clients running on the server send debugging commands to the daemon process, which continuously queries the received commands and sends the results back to the client.

[0120] Figure 4 This is a device debugging method flow shown in an embodiment of the present disclosure. Figure 2 ,like Figure 4 As shown, the device debugging method applied to the second device includes the following steps:

[0121] S21. Establish a radio frequency communication connection with the first device;

[0122] S22. Based on the radio frequency communication connection, receive the network distribution information sent by the first device;

[0123] S23. According to the network configuration information, join the local area network where the first device is located and enable the debugging function;

[0124] S24. Debugging is performed on the local area network and the first device.

[0125] As described in the device debugging method applied to the first device, the first device includes, but is not limited to, a personal computer, and the second device can be a smartphone, tablet, or a smartphone emulator. Both the first and second devices are point-to-point radio frequency devices.

[0126] In step S21, the second device will establish a communication connection with the first device, such as a Bluetooth communication connection, a near-field communication connection, or an infrared communication connection.

[0127] In step S22, the second device receives the network configuration information sent by the first device based on the radio frequency communication connection, and in step S23, according to the network configuration information, joins the local area network where the first device is located and enables the debugging function. Only after the second device enables the debugging function can it accept debugging from the first device in step S24. The network configuration information includes at least a wireless network identifier, such as an SSID, and may also include a password corresponding to the wireless network identifier.

[0128] It is understandable that this disclosure utilizes a radio frequency communication connection to receive network configuration information sent by the first device, eliminating the need for manual network configuration by the user to add the second device to the local area network (LAN) where the first device is located. Furthermore, after the second device joins the LAN via the radio frequency communication connection, it triggers the activation of the debugging function, allowing the first device to debug the second device within the LAN. This also eliminates the need for manual user operation to activate the debugging function, thus demonstrating intelligence and improving the user experience. In addition, after establishing radio frequency communication to obtain network configuration information, this disclosure performs debugging within the LAN. Considering that wireless connections based on LANs are superior to radio frequency communication connections in terms of connection distance, stability, and transmission speed, this disclosure is more convenient for users and improves debugging efficiency compared to debugging via radio frequency communication connections.

[0129] In one embodiment, receiving the network distribution information sent by the first device based on the radio frequency communication connection includes:

[0130] Based on the radio frequency communication connection, receive the debugging request sent by the first device;

[0131] A confirmation message is sent to the first device according to the debugging request;

[0132] Based on the radio frequency communication connection, the distribution network information sent by the first device according to the confirmation message is received.

[0133] In the embodiments of this disclosure, after receiving a debugging request from the first device, the second device will send a confirmation message, enabling the first device to send network distribution information to the second device based on the confirmation message and the radio frequency communication connection. The second device's feedback of the confirmation message is initiated based on the user's operation; the user of the second device will send a confirmation message after agreeing to the first device's debugging of the second device.

[0134] In one embodiment, sending an acknowledgment message to the first device according to the debugging request includes:

[0135] Upon receiving the debugging request, a first message prompting whether to perform device debugging is output.

[0136] In response to detecting an acknowledgment operation based on the first message output, the acknowledgment message is sent to the first device.

[0137] In this embodiment, after receiving a debugging request, the second device can output a first message indicating whether to perform device debugging via voice or via a pop-up window. Based on the output first message, when the second device detects a confirmation operation—for example, if the second device detects a user's voice confirmation of debugging or a user's click confirmation operation based on a message displayed on the interface—it sends a confirmation message to the first device.

[0138] It is understood that this disclosure determines whether to send distribution network information through a request (debugging request) and response (confirmation message) method, so that the second device can be debugged in the local area network later. This can reduce the invalid transmission of distribution network information when the user does not allow the second device to be debugged, thereby increasing the necessity of sending distribution network information and thus improving the debugging efficiency of the device.

[0139] In one embodiment, the method further includes:

[0140] Based on the radio frequency communication connection, the network address of the second device is sent to the first device;

[0141] The debugging process within the local area network and on the first device includes:

[0142] Within the local area network, a connection for debugging is established based on the network address and the first device, and debugging instructions sent by the first device are received.

[0143] In the embodiments of this disclosure, the second device needs to establish a debugging connection with the first device first, so that the first device can debug the second device. Before establishing the debugging connection, the second device needs to send its own network address to the first device using a radio frequency communication connection, so that the first device can establish a connection with the second device based on the second device's network address, such as establishing an ADB connection.

[0144] In one embodiment, the method further includes:

[0145] After establishing a debugging connection based on the network address and the first device, a second message indicating that the connection was successfully established is output.

[0146] In the embodiments of this disclosure, after the second device and the first device establish a debugging connection, a second message indicating successful connection establishment is output to inform the user. Based on this second message, the user can operate on the first device to debug the second device.

[0147] Figure 5 This is an interactive diagram illustrating a device debugging method according to an embodiment of this disclosure, such as... Figure 5 As shown, the device commissioning method applied to the first and second devices includes the following steps:

[0148] S31. The first device establishes a radio frequency communication connection with the second device;

[0149] S32. The first device sends distribution network information to the second device based on the radio frequency communication connection;

[0150] S33. The second device joins the local area network where the first device is located and enables the debugging function according to the network configuration information.

[0151] S34. The first device debugs the second device within the local area network.

[0152] This disclosure utilizes a radio frequency (RF) communication connection to send network configuration information to a second device, eliminating the need for manual network configuration by the user to add the second device to the local area network (LAN) where the first device is located. Furthermore, once the second device joins the LAN via the RF communication connection, it triggers the activation of the debugging function, allowing the first device to debug the second device within the LAN. This also eliminates the need for manual user intervention to activate the debugging function, thus providing intelligence and improving the user experience. In addition, this disclosure establishes RF communication to obtain network configuration information and then performs debugging within the LAN. Considering that LAN-based wireless connections are superior to RF communication connections in terms of connection distance, stability, and transmission speed, this disclosure offers greater convenience and efficiency compared to debugging via RF communication connections.

[0153] Taking a scenario where the first device is a personal computer and the second device is a mobile phone, and the first device is performing ADB debugging on the second device, as an example... Figure 6 This is an example diagram illustrating a device debugging method according to an embodiment of this disclosure, such as... Figure 6 As shown, it includes the following steps:

[0154] S41. The personal computer is connected to the network, and the mobile phone is placed close to the near-field communication sensing area of ​​the personal computer.

[0155] In this embodiment, the personal computer can connect to the wireless network via wired or wireless means. In addition, when the mobile phone is brought close to the near-field communication sensing area of ​​the personal computer, a radio frequency communication connection will be established between the mobile phone and the computer.

[0156] S42. The user confirms whether to start ADB debugging; if yes, proceed to step S43; if no, proceed to step S50.

[0157] In this embodiment, the personal computer, acting as the initiator, sends an ADB debugging request via NFC peer-to-peer functionality. The mobile phone, acting as the peer-to-peer receiver, receives the ADB debugging request and prompts the user to agree to ADB debugging. If the user confirms that ADB debugging is enabled, the mobile phone will send a confirmation message to the personal computer in step S43 below; if the user confirms that ADB debugging is not enabled, the device debugging method of this disclosure ends.

[0158] S43. The mobile phone replies to the personal computer with a confirmation message via near-field communication point-to-point.

[0159] S44. After receiving the confirmation debugging message, the personal computer determines whether it is connected to a wireless network. If yes, proceed to step S45; otherwise, proceed to step S46.

[0160] In this embodiment, after receiving the confirmation debugging message, the personal computer determines whether it is connected to a wireless network, that is, the first device confirms its own network connection method.

[0161] S45. The individual computer sends the name and password of the Wi-Fi network it is connected to to the mobile phone via near-field communication point-to-point, and continues to execute step S47.

[0162] In this embodiment, if the first device uses a wireless connection, the first device sends the network configuration information of the local area network where the first device is located to the second device based on the radio frequency communication connection. The network configuration information includes the Wi-Fi name and password.

[0163] S46. The personal computer actively turns on the hotspot and sends the hotspot name and password to the mobile phone via near-field communication point-to-point, and continues to execute step S47.

[0164] In this embodiment, if the first device uses a wired connection, the first device sends network configuration information for connecting to the hotspot of the first device to the second device based on the radio frequency communication connection. The network configuration information includes the Wi-Fi name and password.

[0165] S47. After receiving the Wi-Fi name and password, the mobile phone automatically connects to the wireless network and turns on the wireless debugging switch, and then sends the obtained Internet protocol address and port information to the personal computer.

[0166] In this embodiment, the mobile phone automatically connects to the Wi-Fi network and turns on the wireless debugging switch, meaning the second device joins the local area network of the first device and triggers the debugging function. The mobile phone sends the obtained Internet Protocol address and port information to the personal computer, meaning the second device sends its own network address to the first device.

[0167] S48. The personal computer receives the Internet Protocol address and port information, executes the adb connect IP:port command, and completes the ADB wireless connection.

[0168] In this embodiment, the first device establishes a connection for debugging based on the network address and the second device.

[0169] S49. The user performs ADB debugging.

[0170] In this embodiment, the user performs ADB debugging, that is, after the first device and the second device establish an ADB connection, the user sends debugging commands to the second device through the first device.

[0171] S50, End.

[0172] This disclosure allows a personal computer to send network configuration information to a mobile phone via a near-field communication (NFC) connection. This eliminates the need for manual network configuration by the user to add the phone to the local area network (LAN) where the personal computer is located. Furthermore, once the mobile phone joins the LAN via a radio frequency (RF) communication connection, it triggers the activation of debugging functions, enabling the personal computer to debug the phone within the LAN. This also eliminates the need for manual user intervention to activate the debugging function, thus providing intelligence and improving the user experience. In addition, this disclosure establishes RF communication to obtain network configuration information and then performs debugging within the LAN. Considering that Wi-Fi-based wireless connections to LANs offer superior connection distance, stability, and transmission speed compared to RF communication connections, this disclosure is more convenient for users while also improving debugging efficiency.

[0173] Figure 7 This is a device debugging apparatus according to an exemplary embodiment. Figure 1 . Reference Figure 7 The equipment debugging device used in the first device includes:

[0174] The first establishment module 101 is configured to establish a radio frequency communication connection with the second device;

[0175] The first transmitting module 102 is configured to send network configuration information to the second device based on the radio frequency communication connection; the network configuration information is used for the second device to join the local area network where the first device is located and to trigger the start of the debugging function.

[0176] The first debugging module 103 is configured to debug the second device within the local area network.

[0177] In some embodiments, the first transmitting module 102 is further configured to send a debugging request to the second device based on the radio frequency communication connection; receive a confirmation message from the second device based on the debugging request; and send the distribution network information to the second device based on the confirmation message based on the radio frequency communication connection.

[0178] In some embodiments, the first sending module 102 is further configured to determine the network connection mode of the first device based on the confirmation message; if the first device uses a wired connection, send network configuration information for connecting to the hotspot of the first device to the second device based on the radio frequency communication connection; if the first device uses a wireless connection, send network configuration information of the local area network where the first device is located to the second device based on the radio frequency communication connection.

[0179] In some embodiments, the apparatus further includes:

[0180] The first receiving module 104 is configured to receive the network address of the second device sent by the second device based on the radio frequency communication connection;

[0181] The first debugging module 103 is further configured to establish a debugging connection with the second device based on the network address within the local area network, and to send debugging commands to the second device.

[0182] In some embodiments, the connection for debugging includes an Android Debug Bridge (ADB) connection; the network address includes the Internet Protocol (IP) address of the second device and the port number of the ADB service in the second device.

[0183] Figure 8 This is a device debugging apparatus according to an exemplary embodiment. Figure 2 . Reference Figure 8 The equipment debugging device used in the second device includes:

[0184] The second connection module 201 is configured to establish a radio frequency communication connection with the first device;

[0185] The second receiving module 202 is configured to receive network distribution information sent by the first device based on the radio frequency communication connection;

[0186] The distribution network module 203 is configured to join the local area network where the first device is located and enable the debugging function according to the distribution network information;

[0187] The second debugging module 204 is configured to perform debugging within the local area network and with the first device.

[0188] In some embodiments, the second receiving module 202 is further configured to receive a debugging request sent by the first device based on the radio frequency communication connection; send an acknowledgment message to the first device according to the debugging request; and receive the network distribution information sent by the first device according to the acknowledgment message based on the radio frequency communication connection.

[0189] In some embodiments, the second receiving module 202 is further configured to, in response to receiving the debugging request, output a first message prompting whether to perform device debugging; and in response to detecting a confirmation operation based on the output first message, send the confirmation message to the first device.

[0190] In some embodiments, the apparatus further includes:

[0191] The second transmitting module 205 is configured to send the network address of the second device to the first device based on the radio frequency communication connection.

[0192] The second debugging module 204 is further configured to establish a debugging connection with the first device based on the network address within the local area network, and to receive debugging instructions sent by the first device.

[0193] In some embodiments, the apparatus further includes:

[0194] The output module 206 is configured to output a second message indicating that the connection has been successfully established after establishing a connection for debugging based on the network address and the first device.

[0195] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0196] Figure 9 This is a block diagram illustrating an electronic device 800 according to an exemplary embodiment. For example, device 800 may be a first device or a second device according to the present disclosed embodiments.

[0197] Reference Figure 9 The device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0198] Processing component 802 typically controls the overall operation of device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 802 may include one or more modules to facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802.

[0199] Memory 804 is configured to store various types of data to support the operation of device 800. Examples of this data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0200] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power to the device 800.

[0201] Multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 808 includes a front-facing camera and / or a rear-facing camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0202] Audio component 810 is configured to output and / or input audio signals. For example, audio component 810 includes a microphone (MIC) configured to receive external audio signals when device 800 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 804 or transmitted via communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.

[0203] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0204] Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of device 800. For example, sensor assembly 814 may detect the on / off state of device 800, the relative positioning of components such as the display and keypad of device 800, changes in the position of device 800 or a component of device 800, the presence or absence of user contact with device 800, the orientation or acceleration / deceleration of device 800, and temperature changes of device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 814 may also include an accelerometer, a gyroscope, a magnetometer, a pressure sensor, or a temperature sensor.

[0205] Communication component 816 is configured to facilitate wired or wireless communication between device 800 and other devices. Device 800 can access wireless networks based on communication standards, such as Wi-Fi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 816 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0206] In an exemplary embodiment, the apparatus 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0207] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, which can be executed by a processor 820 of the device 800 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0208] A non-transitory computer-readable storage medium, wherein when instructions in the storage medium are executed by a processor of a first device, the first device is enabled to perform a device debugging method, the method comprising:

[0209] Establish radio frequency communication connection with the second device;

[0210] Based on the radio frequency communication connection, network configuration information is sent to the second device; the network configuration information is used for the second device to join the local area network where the first device is located and to trigger the start of the debugging function.

[0211] The second device is debugged within the local area network.

[0212] When the instructions in the storage medium are executed by the processor of the second device, the second device is able to execute a device debugging method, the method comprising:

[0213] Establish radio frequency communication connection with the first device;

[0214] Based on the radio frequency communication connection, the distribution network information sent by the first device is received;

[0215] Based on the network configuration information, join the local area network where the first device is located and enable the debugging function;

[0216] Debugging is performed within the local area network and with the first device.

[0217] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0218] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for debugging equipment, characterized in that, Applied in a first device, the method includes: Establish radio frequency communication connection with the second device; Based on the radio frequency communication connection, network configuration information is sent to the second device, and the network address of the second device is received from the second device; the network configuration information is used for the second device to join the local area network where the first device is located and to trigger the start of the debugging function; the network address includes the IP address of the second device and the port number of the ADB service; Within the local area network, an ADB connection is directly established with the second device based on the IP address and the port number of the ADB service, and debugging commands are sent to the second device. The step of sending distribution network information to the second device based on the radio frequency communication connection includes: Based on the radio frequency communication connection, a debugging request is sent to the second device; wherein, the debugging request carries the identification information of the first device and / or the user information of the first device, for the purpose of enabling the user of the second device to confirm whether the first device has debugging permissions; In response to receiving a confirmation message from the second device based on the debugging request within a preset time period, the network distribution information is sent to the second device based on the radio frequency communication connection; wherein, if the confirmation message is not received within the preset time period, the network distribution information is not sent.

2. The method according to claim 1, characterized in that, The step of sending the distribution network information to the second device based on the confirmation message and the radio frequency communication connection includes: Based on the confirmation message, the network connection method of the first device is determined; If the first device uses a wired connection, it sends network configuration information for connecting to the hotspot of the first device to the second device based on the radio frequency communication connection; If the first device uses a wireless connection, it sends the network configuration information of the local area network where the first device is located to the second device based on the radio frequency communication connection.

3. A method for debugging equipment, characterized in that, When applied to a second device, the method includes: Establish radio frequency communication connection with the first device; Based on the radio frequency communication connection, the distribution network information sent by the first device is received; Based on the network configuration information, join the local area network where the first device is located and enable the debugging function, and send the network address of the second device to the first device; the network address includes the IP address of the second device and the port number of the ADB service. Within the local area network, a debugging connection is established directly with the first device based on the IP address and the port number of the ADB service, and debugging instructions sent by the first device are received. The step of receiving the network distribution information sent by the first device based on the radio frequency communication connection includes: Based on the radio frequency communication connection, a debugging request sent by the first device is received; wherein, the debugging request carries the identification information of the first device and / or the user information of the first device, for the purpose of enabling the user of the second device to confirm whether the first device has debugging permissions; After confirming that the second device has been debugged according to the debugging request, a confirmation message is sent to the first device. Based on the radio frequency communication connection, the distribution network information sent by the first device according to the confirmation message is received; wherein, the first device sends the distribution network information if it receives the confirmation message within a preset time period, and does not send the distribution network information if it does not receive the confirmation message within the preset time period.

4. The method according to claim 3, characterized in that, The step of sending a confirmation message to the first device after confirming that the second device has been debugged according to the debugging request includes: Upon receiving the debugging request, a first message prompting whether to perform device debugging is output. In response to detecting an acknowledgment operation based on the first message output, the acknowledgment message is sent to the first device.

5. The method according to claim 3, characterized in that, The method further includes: After establishing a debugging connection based on the network address and the first device, a second message indicating that the connection was successfully established is output.

6. A device for debugging equipment, characterized in that, Applied in a first device, the device includes: The first module is configured to establish a radio frequency communication connection with the second device. The first transmitting module is configured to send a debugging request to the second device based on the radio frequency communication connection; wherein the debugging request carries the identification information and / or user information of the first device, for enabling the user of the second device to confirm whether the first device has debugging permissions; in response to receiving a confirmation message from the second device based on the debugging request within a preset time period, the module sends network configuration information to the second device based on the radio frequency communication connection and receives the network address of the second device sent by the second device; wherein the network address includes the IP address of the second device and the port number of the ADB service; if the confirmation message is not received within the preset time period, the network configuration information is not sent; the network configuration information is used for the second device to join the local area network where the first device is located and trigger the start of the debugging function; The first debugging module is configured to establish an ADB connection with the second device directly based on the IP address and the port number of the ADB service within the local area network, and send debugging commands to the second device.

7. The apparatus according to claim 6, characterized in that, The first sending module is further configured to determine the network connection mode of the first device based on the confirmation message; if the first device uses a wired connection, send network configuration information for connecting to the hotspot of the first device to the second device based on the radio frequency communication connection; If the first device uses a wireless connection, it sends the network configuration information of the local area network where the first device is located to the second device based on the radio frequency communication connection.

8. A device for debugging equipment, characterized in that, Applied in a second device, the device includes: The second connection module is configured to establish a radio frequency communication connection with the first device; The second receiving module is configured to, based on the radio frequency communication connection, receive a debugging request sent by the first device, and send the network address of the second device to the first device; wherein, the debugging request carries the identification information and / or user information of the first device, for enabling the user of the second device to confirm whether the first device has debugging permissions; the network address includes the IP address of the second device and the port number of the ADB service; after confirming that the second device is being debugged according to the debugging request, it sends a confirmation message to the first device; and, based on the radio frequency communication connection, receive network configuration information sent by the first device according to the confirmation message; wherein, the first device sends the network configuration information if it receives the confirmation message within a preset time period, and does not send the network configuration information if it does not receive the confirmation message within the preset time period; The distribution network module is configured to join the local area network where the first device is located and enable the debugging function according to the distribution network information; The second debugging module is configured to establish a debugging connection with the first device directly within the local area network based on the IP address and the port number of the ADB service, and to receive debugging commands sent by the first device.

9. The apparatus according to claim 8, characterized in that, The second receiving module is further configured to, in response to receiving the debugging request, output a first message prompting whether to perform device debugging; In response to detecting an acknowledgment operation based on the first message output, the acknowledgment message is sent to the first device.

10. The apparatus according to claim 8, characterized in that, The device further includes: The output module is configured to output a second message indicating that the connection was successfully established after establishing a debugging connection based on the network address and the first device.

11. A device for debugging equipment, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the device debugging method as described in any one of claims 1 to 2; or, configured to perform the device debugging method as described in any one of claims 3 to 5.

12. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the first device, the first device is able to perform the device debugging method as described in any one of claims 1 to 2; or, when the instructions in the storage medium are executed by the processor of the second device, the second device is able to perform the device debugging method as described in any one of claims 3 to 5.

Citation Information

Patent Citations

  • Method for processing information and electronic devices

    CN104182366A

  • Network distribution method and device, electronic equipment and storage medium

    CN110896364A