Debugging and opening methods, devices, computer equipment, and storage media

By verifying and authorizing the user upon receiving a debugging request on the terminal device, the low security issue caused by all users being able to open the debugging function is resolved. This ensures that only authorized users can open the debugging function, thereby improving the security of the system and data.

CN116055532BActive Publication Date: 2026-03-10SHENZHEN LUMIUNITED TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing technologies, the debugging function of terminal devices can be enabled by all users, resulting in low system security, the risk of leakage of important data, and the inability of maintenance personnel to view and analyze problems through the debugging function when issues arise.

Method used

Upon receiving a request to enable debugging, the system obtains and verifies the verification information. Debugging is only enabled when verification is successful and authorization is granted by the second device. Measures such as dynamic passwords, credentials, and authorized devices are used to ensure that only authorized users can enable debugging.

Benefits of technology

It improves the system security of terminal devices and the security of important data, prevents unauthorized users from opening debugging functions, and ensures that only authorized users can perform debugging and data analysis when needed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116055532B_ABST
    Figure CN116055532B_ABST
Patent Text Reader

Abstract

This application relates to a debugging enabling method, apparatus, computer device, and storage medium. The method includes: if a debugging enabling request for a first device is received, obtaining verification information; if the verification information passes verification, sending a debugging enabling authorization request to a second device; and in response to the second device's authorization information based on the debugging enabling authorization request, enabling debugging on the first device. By using this application, the native debugging function entry point on the terminal device is removed, preventing unauthorized users from opening the debugging function on the terminal device, thereby improving the security of the terminal device system and data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminal, in particular to a debugging starting method and device, computer equipment and storage medium. BACKGROUND

[0002] Terminal debugging function is a versatile command line tool that allows users to communicate with a device. For example, the debugging function of mobile phone systems such as Android, Apple and Harmony, as well as other terminal systems. The debugging function of the terminal can be used to perform various device operations (such as installing and debugging applications), and provides access to the Unix shell (usually referred to as "command line", which can be used to run various commands on the device).

[0003] The current debugging function on the device can be opened by setting operations by all users, which leads to low system security and the risk of important data leakage. For device providers, it is not desirable for everyone to be able to open the debugging function of the released device to avoid important data being copied, but if the debugging function of the device is completely closed, maintenance personnel and others cannot view and analyze problems by opening the debugging function of the device when problems occur (such as application abnormal crash, scene capture, etc.).

[0004] Therefore, a debugging starting method, device, computer equipment and storage medium are needed to solve the above problems. SUMMARY

[0005] Therefore, it is necessary to provide a debugging starting method, device, computer equipment and storage medium that can avoid all users being able to open the terminal debugging function.

[0006] A debugging starting method, the method comprising: if a debugging starting request for a first device is received, obtaining verification information; if the verification information is verified, sending a debugging starting authorization request to a second device; and in response to consent authorization information fed back by the second device based on the debugging starting authorization request, starting debugging of the first device.

[0007] A debugging starting device, comprising: a verification module configured to obtain verification information if a debugging starting request of a first device is received, and to verify the verification information; a communication module configured to send a debugging starting authorization request to a second device if the verification information is verified; and a control module configured to start debugging of the first device in response to consent authorization information fed back by the second device based on the debugging starting authorization request.

[0008] In one of the embodiments, further comprising: a debugging trigger module; the debugging trigger module is configured to start timing when detecting a preset operation; if a preset number of trigger operations are acquired within a first preset time period and / or a continuous trigger operation is acquired within a second preset time period, it is confirmed that the debugging start request is received, and an authentication interface is output to acquire the authentication information.

[0009] In one of the embodiments, further comprising: a judgment module; the judgment module is configured to judge the correctness of the authentication information according to current time information and a preset password, the preset password is a dynamic password and is updated periodically according to a preset time period or is updated randomly at any time; if the authentication information is correct, it is confirmed that the authentication information is verified.

[0010] In one of the embodiments, further comprising: a detection module; the detection module is configured to acquire connection device information of the first device if the authentication information is verified; if the second device is not included in the connection device information, the debugging start request is rejected, and a prompt information is output to remind the user of lacking an authorized terminal device; or if the second device is not included in the connection device information, it is judged whether there is a pass information in the first device; if not, the debugging start request of the first device is rejected, and a prompt information is output to remind the user of lacking an authorized terminal; if yes, the validity use time and / or use times of the pass information are verified; if the pass information is within the validity use time and / or the use times are greater than zero, the debugging of the first device is started.

[0011] In one of the embodiments, further comprising: a pass module; the pass module is configured to acquire an encrypted pass and acquire a decryption key; the encrypted pass is decrypted according to the decryption key to acquire pass information, and the debugging of the first device is started according to the pass information; wherein the encrypted pass and the decryption key are updated periodically according to a preset time period or are updated randomly at any time.

[0012] In one of the embodiments, further comprising: an authorization module; an authorization confirmation module is configured to acquire feedback information sent by the second device after the second device verifies the debugging start authorization request, the feedback information includes an authorization agreement information or a refusal authorization information; if the authorization agreement information is received, the debugging of the first device is started in response to the authorization agreement information; if the refusal authorization information is received, the debugging start operation of the first device is exited in response to the refusal authorization information; wherein the debugging start authorization request includes identification information of the first device.

[0013] In one of the embodiments, the method further comprises: a data copy module; when detecting a data copy request, the data copy module acquires user identity information; according to the user identity information, the method determines whether the current user is an authorized user; if yes, the method permits the data copy request; if no, the method prohibits the data copy request.

[0014] A computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0015] A computer readable storage medium, which stores a computer program, wherein the computer program is executed by a processor to implement the steps of the above method.

[0016] The above debugging enabling method and device, computer device and storage medium enable the debugging function of the first device only when the verification information is verified and the second device is authorized, thereby preventing an unauthorized user from enabling the debugging function of the device and improving the system security of the device and the security of important data in the device. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 An intelligent home system schematic diagram in one embodiment;

[0018] Figure 2 An application environment diagram of the debugging enabling method in one embodiment;

[0019] Figure 3 A flowchart of the debugging enabling method in one embodiment;

[0020] Figure 4 A debugging function enabling request triggering interface diagram of the debugging enabling method in one embodiment;

[0021] Figure 5 A verification information input interface diagram of the debugging enabling method in one embodiment;

[0022] Figure 6 A first device hidden function interface diagram of the debugging enabling method in one embodiment;

[0023] Figure 7 A debugging function hidden enabling flowchart in one embodiment;

[0024] Figure 8 A structural block diagram of the debugging enabling device in one embodiment;

[0025] Figure 9An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0026] For the purpose, technical solutions and advantages of the present application to be more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.

[0027] Reference is made to Figure 1 , Figure 1 An internal structure diagram of a computer device in an embodiment.

[0028] The terminal 100 can be a desktop computer, a notebook computer, a tablet computer, a smart phone or other electronic devices that can implement network connection, which is not limited herein.

[0029] The terminal 100 and the gateway 200 establish a network connection, and in an embodiment, the terminal 100 and the gateway 200 establish a network connection through 2G / 3G / 4G / 5G, WIFI, etc. The terminal 100 interacts with the gateway 200 through the network connection, so that the user controls the Internet of Things devices connected to the gateway 200 to perform corresponding actions by means of the terminal 100.

[0030] The Internet of Things device 300 accesses the gateway 200 in the Internet of Things platform and communicates with the gateway 200 through its own configured communication module, and is controlled by the gateway 200. In an embodiment, the Internet of Things device 300 accesses the gateway 200 through a local area network, and is deployed in the gateway 200. The process of the Internet of Things device 300 accessing the gateway 200 through a local area network includes that the gateway 200 first establishes a local area network, and the Internet of Things device 300 accesses the local area network established by the gateway 200 by connecting the gateway 200. The local area network includes WIFI, ZIGBEE or Bluetooth.

[0031] The Internet of Things device 300 can be a smart printer, a smart fax machine, a smart camera, a smart air conditioner, a smart screen or a device configured with a communication module (such as a ZIGBEE module, a Wi-Fi module, a Bluetooth communication module, etc.), such as a human body sensor, a door and window sensor, a temperature and humidity sensor, a water immersion sensor, a natural gas alarm, a smoke alarm, a wall switch, a wall socket, a wireless switch, a wireless wall switch, a magic cube controller, a curtain motor, a smart control panel, a smart door lock, etc., which is not limited herein.

[0032] The debugging start method provided by the present application can be applied to, for example Figure 2The application environment is shown. Among them, the first device 102 communicates with the second device 104 through the network. When the first device 102 receives the start request of ADB debugging, the verification information is obtained; when the verification information is verified, the connection device information of the first device 102 is obtained. The first device 102 detects whether the second device 104 exists in the connection device information, and when the second device 104 exists in the connection device information, the first device 102 sends the ADB debugging start authorization request to the second device 104. After the second device 104 receives the ADB debugging start authorization request, the second device 104 feeds back the consent information of the ADB debugging start authorization request to the first device 102, so that the first device 102 starts the ADB debugging of itself. Among them, the first device 102 can be but not limited to various personal computers, notebook computers, smart phones, tablet computers, portable wearable devices and smart home devices. The second device 104 can be but not limited to various personal computers, notebook computers, smart phones, tablet computers, portable wearable devices and smart home devices, and in another embodiment, the second device 104 can also be a server, which is realized by an independent server or a server cluster composed of multiple servers.

[0033] In one embodiment, as shown in Figure 3 and Figure 7 , a debugging start method is provided, which is applied to the first device in Figure 1 for example, including the following steps:

[0034] Step S11: If the debugging start request for the first device is received, the verification information is obtained.

[0035] Optionally, the debugging start request is the start request of the debugging function of the terminal, for example, the ADB debugging of the Android device and the debugging method of other system devices, etc. The debugging start request is used to make the device execute the debugging function opening process when the request is received.

[0036] Exemplarily, ADB (i.e. Android Debug Bridge) is a versatile command-line tool that lets users communicate with an Android device. ADB commands can be used to perform various device operations (such as installing and debugging applications) and provide access to a Unix shell (command-line that can be used to run various commands on the device). The ADB tool is an important debugging tool for an Android device, through which applications can be installed / uninstalled, system files can be added / deleted, device information and running status can be obtained, etc. Existing smart devices such as smart central control screens, smart phones, smart refrigerators, smart air conditioners, smart watches, etc. are mainly debugged through the ADB tool. However, the devices based on the Android system that are released need to close the ADB debugging to avoid important data being copied. But when problems such as application abnormal crash and scene capture occur, the ADB debugging needs to be turned on to view and analyze the device problems. At this time, a preset operation can be performed on the first device to send an ADB debugging opening request. When the first device receives the ADB debugging opening request, a verification interface is output to obtain verification information. The verification information can be obtained by the user from the manufacturer of the first device in advance, or can be sent to the user by the manufacturer of the first device after being updated at regular intervals. Through the verification information, the hidden function (such as the debug helper interface shown in FIG. 8) of the first device can be opened, so as to further open the ADB debugging. Figure 4

[0037] Optionally, when problems such as application abnormal crash and scene capture occur, the device can open the debugging function of the device through the debugging opening request and subsequent operations, so as to view and analyze the device problems.

[0038] Optionally, the debugging opening request can be a touch operation, voice operation or gesture operation performed by the user on the first device. The verification information can be password information, fingerprint information and gesture information, etc.

[0039] Optionally, the verification information is the information required by the verification interface that is popped up when the user opens the debugging function / mode of the first device. The verification information can be but is not limited to character password, and can also be pictures, images, voice, etc. Hereinafter, the verification information is described as character password.

[0040] ​Exemplarily, after receiving the debugging start request for the device, the first device needs to obtain the verification information which is a character password dynamically updated by the server. The update time of the character password can be random or according to a preset period, for example, random or periodic update according to a week, half a month, a month, half a year or a year, etc. The specific update method can be, but is not limited to, that the server randomly generates a 6-digit or other digit character, etc., and can also be a character defined by the administrator. After updating the verification information each time, the server sends the updated verification information to the first device via the router and gateway; after receiving the new verification information sent by the server, the first device sets the new verification information as the verification information needed by the first device after receiving the debugging start request, thereby replacing the old verification information. After updating the verification information, the old verification information can no longer be used to open the debugging function of the device, and after updating the verification information, only the specific user with the authorization permission of the device publisher / manufacture can check the updated new verification information through the server and terminal device, etc., greatly improving the security of the password.

[0041] Step S12: If the verification information is verified, a debugging start authorization request is sent to the second device.

[0042] Optionally, after the first device confirms that the verification information input by the user is verified, the terminal device information connected with the first device can be obtained.

[0043] The terminal device connected with the first device can be a terminal device connected with the first device in a wireless connection mode such as Bluetooth connection, infrared connection, or a terminal device connected with the first device in a wired connection mode.

[0044] As shown in Figures 4 to 7 After receiving the debugging start request, the display screen of the first device pops up a verification interface (as shown in Figure 5 ), so that the user inputs the verification information through the verification interface, thereby verifying the same, to confirm whether the verification information input by the user is correct. After the first device obtains the verification information input by the user, the password can be verified to determine whether the verification information input by the user is correct (determine whether the verification information input by the user is the same as the verification information set by the server / device publisher / manufacture) and / or whether it is within the valid time. When the verification information input by the user is correct or valid, the hidden function in the first device can be opened (as shown in Figure 6The first device sends a request for opening the debugging function to the second device. The second device sends an authorization instruction to the first device in response to the request for opening the debugging function. The first device opens the debugging function in response to the authorization instruction. The first device sends a request for opening the debugging function to the second device. The second device sends an authorization instruction to the first device in response to the request for opening the debugging function. The first device opens the debugging function in response to the authorization instruction.

[0045] Optionally, the first device can send access information to the terminal device connected thereto uniformly (the information can be set by a device manufacturer for the first device and the second device, and the second device will feed back reply information after receiving the access information, and other terminal devices will not respond), and confirm that the corresponding terminal device is the second device after receiving the reply information. In other embodiments, the first device can also broadcast the access information within a preset range, and all terminal devices within the preset range can receive the access information, and then monitor whether the reply information is received. If the reply information is received, the first device is in communication connection with the terminal device sending the reply information, and the terminal device is confirmed to be the second device.

[0046] Optionally, when the second device is included in the device information connected to the first device, the first device sends a request for opening the debugging function to the second device.

[0047] As shown in FIG. 1, the first device activates a request for opening the debugging function through a preset operation, and the second device sends an authorization instruction to the first device in response to the request for opening the debugging function of the first device. Figure 4

[0048] Step S13: In response to the consent authorization information fed back by the second device based on the request for opening the debugging function, the debugging of the first device is opened.

[0049] Optionally, in response to the request for opening the debugging function of the first device sent by the second device, the first device opens the debugging function of the first device.

[0050] ​The debugging start instruction of the first device can be automatically sent by the second device to the first device after the second device receives the debugging start authorization request sent by the first device, or the second device can output a prompt interface after receiving the debugging start authorization request sent by the first device, and then send the debugging start instruction to the first device after a user selects to authorize on the second device.

[0051] As shown in Figure 4 When the first device determines that the debugging start instruction of the second device is received, it indicates that the first device has met the condition of starting the debugging function, and at this time, the first device can open the debugging function to allow the user to perform operations such as maintenance management, analysis of device fault problems, and the like on the system.

[0052] In the above debugging start method, after the first device receives the start request of the debugging function, the verification interface is inputted, the verification information is obtained for verification, and the debugging start authorization request is sent to the second device after the verification is passed. After the second device sends the debugging start instruction to the first device in response to the debugging start authorization request, the first device opens the debugging function, thereby realizing the safe setting of the device debugging function, solving the problem of low system security caused by the fact that all users can open the device debugging function in the prior art, and reducing the risk of leakage of important data on the device, thereby improving the security of the debugging function start and the security of important data in the device.

[0053] In an embodiment, if the debugging start request for the first device is received, the step of obtaining the verification information comprises:

[0054] When the preset operation is detected, the timing is started;

[0055] If the triggering operation of the preset number of times is obtained within the first preset time length and / or the triggering operation is continuously obtained within the second preset time length, it is determined that the debugging start request is received, and the verification interface is outputted to obtain the verification information.

[0056] Optionally, the operation of the device debugging function start request is set in a plurality of keys, and the debugging start request can be sent to the device by performing a preset operation on the plurality of keys. The preset operation and the plurality of keys are not informed to ordinary users, and only specific users know. Therefore, the ordinary user cannot trigger the debugging start request on the terminal.

[0057] Exemplarily, as shown in Figure 4 and Figure 5As shown, the user enters the setting interface through the setting icon on the Android device display screen, then clicks the about menu after finding the about menu in the setting interface, and finally clicks the device name bar and the device ID bar in the about menu interface, for example, clicks the device name bar and the device ID bar each once and cycles 5 times (i.e. alternately clicks the device name and the device ID each 5 times), to send the ADB debugging start request to the Android device; the Android device outputs the verification interface after receiving the ADB debugging start request, to receive the verification information input by the user in the interface.

[0058] In an embodiment, if the debugging start request for the first device is received, the step of obtaining the verification information includes:

[0059] According to the current time information and the preset password, the correctness of the verification information is judged, the preset password is a dynamic password, and the preset time period is periodically updated, or is randomly updated at irregular times;

[0060] If the verification information is correct, it is confirmed that the verification information is verified.

[0061] Exemplarily, in order to further ensure that the ordinary user cannot open the device debugging function, the device outputs the verification interface to obtain the verification information after receiving the debugging start request. If the unauthorized user / ordinary user (such as a user who cannot obtain the verification information A from the server and does not hold the second device) unintentionally triggers the debugging start request of the device (or obtains the starting operation of the debugging start request from the authorized user), the verification information can be obtained by the first device outputting the verification interface, and only when the verification is passed, the next step can be performed until the debugging function of the device is finally opened, effectively ensuring the security of the terminal data.

[0062] After the first device obtains the verification information input by the user from the verification interface, the verification information input by the user can be verified to determine whether the verification information input by the user is consistent with the verification information A set by the first device, or after confirming that the verification information input by the user is correct, the verification information input by the user is verified again whether it is within the effective time (for example, when the first device is not connected to the network and cannot obtain the updated password from the server, the first device can update the verification information A and set the effective time of the verification information A at the same time; after the use time of the verification information A is exceeded, even if the verification information input by the user is correct, the next operation cannot be performed, so as to achieve the purpose of protecting the terminal data).

[0063] As Figure 5 and Figure 6As shown, the verification information A of the first device is "123456". After the user inputs the password "123456" in the verification interface, the first device compares the verification information input by the user with the verification information A, and confirms that they are consistent, and then opens the debugging assistant interface.

[0064] In an embodiment, after the step of verifying the verification information, the method further comprises:

[0065] If the verification information is verified, obtaining the connection device information of the first device;

[0066] If the second device is not included in the connection device information, rejecting the debugging opening request and outputting a prompt information to remind the user of lacking of an authorized terminal device; or

[0067] If the second device is not included in the connection device information, determining whether the first device has a pass information;

[0068] If not, rejecting the debugging opening request of the first device and outputting a prompt information to remind the user of lacking of an authorized terminal;

[0069] If yes, verifying the valid use time and / or the use times of the pass information;

[0070] If the pass information is within the valid use time and / or the use times is greater than zero, opening the debugging of the first device.

[0071] The execution subject of the embodiment can be the terminal with the Android system installed as described above. In order to avoid that the ordinary user unintentionally knows the starting mode of the debugging opening request of the device and the verification information described above, a second device is further set to authorize in the process of opening / enabling the debugging function of the device, so as to further ensure that the ordinary user cannot open the debugging function of the device. The specific user authorized by the manufacturer can open the debugging function of the device through the second device authorized by the manufacturer.

[0072] Exemplarily, as Figure 6As shown, after the above operations and the user input verification information is verified successfully, the Android device opens the debugging assistant interface, which can include, but is not limited to, exception viewing and network debugging. When the user selects exception viewing or network debugging, the ADB debugging of the Android device needs to be opened. At this time, information of other devices connected with the Android device is acquired, and it is judged whether the connected devices include a terminal device authorized by the manufacturer (i.e., the second device). If the second device exists, the Android device sends an ADB debugging opening authorization request to the second device; if the second device does not exist, the opening request of the ADB debugging is rejected, and a prompt information is outputted to remind the user that the lack of the authorized terminal cannot open the device debugging function (or, the user is prompted to open the debugging function of the device through other ways, such as the identification information of the two-dimensional code, bar code and the like published by the manufacturer for opening the debugging function. That is, when the verification information is verified successfully but the second device does not exist, a prompt information is outputted to remind the user to exit the debugging function opening operation, or to open the camera to scan the two-dimensional code, bar code and the like authorized by the manufacturer, so as to realize the opening of the debugging function of the first device).

[0073] In an embodiment, in response to the consent authorization information fed back by the second device based on the debugging opening authorization request, the step of opening the debugging of the first device comprises:

[0074] acquiring an encrypted passcode and acquiring a decryption key;

[0075] decrypting the encrypted passcode according to the decryption key to acquire passcode information, and opening the debugging of the first device according to the passcode information;

[0076] wherein the encrypted passcode and the decryption key are updated according to a preset time period or randomly updated at irregular times.

[0077] Optionally, the consent authorization information fed back by the second device based on the debugging opening authorization request includes a decryption key, which is used to decrypt the encrypted passcode. The decrypted passcode is used to open the debugging function of the device.

[0078] Optionally, the encrypted passcode is acquired by the first device from a server. The decryption key is acquired by the first device from the second device; the decryption key in the second device can be sent to the second device by the server after receiving the encrypted passcode acquisition request sent by the first device, in which case the server saves the binding relationship between the first device and the second device, and can directly acquire the second device according to the device information of the first device; or the second device acquires the decryption key from the server according to the decryption key acquisition request sent by the first device; or the decryption key is stored in the storage after being set by the manufacturer when the second device is manufactured.

[0079] Optionally, in order to avoid the user unlimitedly using a specific decryption key to decrypt the encrypted passcode to open the debugging function of the device, the encrypted passcode, the decryption key and the passcode required to open the debugging function of the device are updated regularly or irregularly. And the use time limit of the passcode obtained after decryption is set, so that even if the server does not update the passcode and decryption key information in time, the user can also be prohibited from opening the debugging function of the device after the passcode exceeds the use time limit.

[0080] Optionally, the encrypted passcode is generated by the server by encrypting the passcode in a certain way, and the specific encryption method is not limited. The passcode is a proof for opening the debugging function of the device, and the first device cannot open its own debugging function without the passcode.

[0081] Illustratively, after the server receives the passcode acquisition request of the Android device (the server can use different passcodes according to different device systems), the passcode A for opening the ADB debugging is acquired, and the passcode A is encrypted in a certain encryption method and sent to the Android device; then based on the passcode acquisition request of the Android device, the second device (for example, the Android device is A, and the binding device is B) bound with the Android device is found from the database, and the decryption key is sent to the second device, so that the Android device can acquire the decryption key from the second device for decrypting the encrypted passcode acquired from the server, and finally obtain the passcode to open the ADB debugging.

[0082] In an embodiment, after the step of sending the debugging start authorization request to the second device if the verification information is verified, the method further comprises:

[0083] Acquiring feedback information sent by the second device after the second device verifies the debugging start authorization request, wherein the feedback information comprises authorization agreement information or authorization refusal information;

[0084] If the authorization agreement information is received, the debugging of the first device is started in response to the authorization agreement information;

[0085] If the authorization refusal information is received, the debugging start operation of the first device is exited in response to the authorization refusal information;

[0086] The debugging start authorization request comprises identification information of the first device.

[0087] Optionally, the device publisher / manufacturer embeds terminal device information (such as one or more of a tablet, a mobile phone, a smart home device, and a computer) that can / support or allow authorization in a second device when producing the second device, and the second device can only authorize to open the debugging function of the above-mentioned embedded type device, and the debugging function of the un-authorized type device cannot be authorized by the second device; or the device publisher / manufacturer configures each first device produced with a corresponding second device (for example, one first device corresponds to one second device, or multiple first devices correspond to one second device, or one device corresponds to multiple second devices, etc.), and the first device and the second device are associated and bound after production. That is, a certain first device can only use the second device corresponding thereto to authorize when it needs to open the debugging function; other second devices that are not bound with the first device cannot authorize the first device.

[0088] Exemplarily, the device publisher / manufacturer sets the terminal device type that the second device can authorize to open the debugging function as a smart screen produced by itself. At this time, when the second device receives the debugging opening authorization request sent by the first device, it first acquires the type information of the first device, agrees to open the debugging function of the first device when it confirms that the first device is a smart screen, and rejects the debugging opening authorization request when the first device is a terminal device of other types. Or the first device cannot detect the second device when detecting the second device.

[0089] Optionally, after receiving the debugging opening authorization request sent by the first device, the second device can pop up authorization reminder information (for example, authorization reminder information package: agree to authorize and disagree to authorize) on the display screen to provide the user holding the second device with a choice of whether to agree to open the debugging function of the first device.

[0090] Optionally, the first device can send a debugging opening authorization request to the second device without being connected to the second device. In this case, the holder of the first device and the holder of the second device can be different, for example, user A can apply to the user (for example, a device publisher, a maintenance personnel, etc.) holding device b when he wants to open the debugging function of device a.

[0091] In an embodiment, the step of opening the ADB debugging in response to the agree-to-authorize information fed back by the second device comprises:

[0092] When detecting the data copy request, acquiring user identity information;

[0093] Confirming whether the current user is an authorized user according to the user identity information;

[0094] If yes, the data copy request is permitted;

[0095] If not, the data copy request is prohibited.

[0096] Exemplarily, in order to protect important data in the device, when detecting the data copy request, the user identity needs to be confirmed. Therefore, the user identity information can be acquired by the first device. The first device sends the acquired user identity information to the server for auditing (the auditing can be manual auditing by a background administrator or automatic auditing by the server according to the authorized user information stored in the database). After confirming that the user is a user who can perform data copy, an instruction is sent to the first device, indicating that the user can perform data copy, and the data copy request of the user is permitted. After confirming that the user is a user who cannot perform data copy, an instruction is sent to the first device, indicating that the user cannot perform data copy, and the data copy request of the user is prohibited.

[0097] It should be understood that although each step in the flowchart of the accompanying drawings is displayed in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and these steps can be executed in other sequences. Moreover, at least part of the steps in the accompanying drawings can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence of these sub-steps or stages is not necessarily sequential, but can be executed in rotation or alternation with at least part of other steps or sub-steps or stages of other steps.

[0098] In one embodiment, as shown in FIG. 1, a debugging start device is provided, comprising a verification module 10, a communication module 20 and a control module 30, wherein: Figure 8 The verification module 10 is configured to acquire verification information when receiving a debugging start request for a first device.

[0099] The communication module 20 is configured to send a debugging start authorization request to a second device when the verification information is verified.

[0100] The control module 30 is configured to start debugging of the first device in response to consent authorization information fed back by the second device based on the debugging start authorization request.

[0101] In one embodiment, the debugging start device further comprises a debugging trigger module. The debugging trigger module is configured to start timing when detecting a preset operation. If a preset number of trigger operations are acquired within a first preset time period and / or the trigger operation is continuously triggered within a second preset time period, it is confirmed that the debugging start request is received, and a verification interface is output to acquire the verification information.

[0102] In one embodiment, the debugging start device further comprises a debugging trigger module. The debugging trigger module is configured to start timing when detecting a preset operation. If a preset number of trigger operations are acquired within a first preset time period and / or the trigger operation is continuously triggered within a second preset time period, it is confirmed that the debugging start request is received, and a verification interface is output to acquire the verification information.

[0103] In one of the embodiments, the debugging starting device further comprises a judging module; the judging module is configured to judge the correctness of the verification information according to the current time information and a preset password, the preset password is a dynamic password and is updated periodically according to a preset time period or is updated randomly at irregular times; if the verification information is correct, it is confirmed that the verification information is verified successfully.

[0104] In one of the embodiments, the debugging starting device further comprises a detecting module; the detecting module is configured to acquire connection device information of the first device if the verification information is verified successfully; if the second device is not included in the connection device information, the debugging starting request is rejected and a prompt information is outputted to remind the user of lacking of an authorized terminal device; or if the second device is not included in the connection device information, it is judged whether there is a pass information in the first device; if not, the debugging starting request of the first device is rejected and a prompt information is outputted to remind the user of lacking of an authorized terminal; if yes, the valid use time and / or the use times of the pass information are verified; if the pass information is within the valid use time and / or the use times is greater than zero, the debugging of the first device is started.

[0105] In one of the embodiments, the debugging starting device further comprises a pass module; the pass module is configured to acquire an encrypted pass and acquire a decryption key; the encrypted pass is decrypted according to the decryption key to acquire pass information, and the debugging of the first device is started according to the pass information; wherein the encrypted pass and the decryption key are updated periodically according to a preset time period or are updated randomly at irregular times.

[0106] In one of the embodiments, the debugging starting device further comprises an authorization module; the authorization confirmation module is configured to acquire feedback information sent by the second device after the second device verifies the debugging starting authorization request, the feedback information comprises agreement authorization information or rejection authorization information; if the agreement authorization information is received, the debugging of the first device is started in response to the agreement authorization information; if the rejection authorization information is received, the debugging starting operation of the first device is exited in response to the rejection authorization information; wherein the debugging starting authorization request comprises identification information of the first device.

[0107] In one of the embodiments, the debugging starting device further comprises a data copying module; the data copying module is configured to acquire user identity information when a data copying request is detected; it is confirmed whether the current user is an authorized user according to the user identity information; if yes, the data copying request is permitted; if not, the data copying request is prohibited.

[0108] The specific definition of the debugging opening device of the embodiment can refer to the definition of the debugging opening method in the foregoing, and will not be described here. Each module in the debugging opening device can be implemented by software, hardware, or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so that the processor calls and executes the operations corresponding to each module.

[0109] In one embodiment, a computer device, which can be a terminal, has an internal structure as shown in Figure 9 The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. The processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for running the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is configured to communicate with external terminals through a network connection. The computer program is executed by the processor to implement a debugging opening method. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball, or touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0110] Those skilled in the art can understand that Figure 9 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0111] In one embodiment, a computer device includes a memory and a processor. The memory stores a computer program. The processor executes the computer program to implement the following steps:

[0112] If a debugging opening request for the first device is received, verification information is obtained;

[0113] If the verification information is verified, a debugging opening authorization request is sent to the second device;

[0114] In response to the consent authorization information fed back by the second device based on the debugging opening authorization request, the debugging of the first device is opened.

[0115] The embodiment realizes the security setting of the debugging function of the terminal device by popping up a verification interface after receiving the debugging start request of the terminal device, then verifying the verification information input by the user, and sending a debugging start authorization request to the second device after the verification is passed; after receiving the consent authorization start information fed back by the second device, the debugging function of the terminal device is opened, thereby realizing the security setting of the debugging function of the terminal device, solving the problem of low system security caused by the fact that all users can open the debugging function of the terminal device in the prior art, important data leakage on the terminal device, and improving the security of the debugging function of the terminal device and the security of the stored data.

[0116] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0117] If the debugging start request for the first device is received, the step of obtaining the verification information comprises:

[0118] When the preset operation is detected, the timing is started;

[0119] If the triggering operation is obtained for the preset number of times within the first preset time length and / or the triggering operation is continuously obtained within the second preset time length, it is confirmed that the debugging start request is received, and a verification interface is output to obtain the verification information.

[0120] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0121] If the debugging start request for the first device is received, the step of obtaining the verification information comprises:

[0122] According to the current time information and the preset password, the correctness of the verification information is judged, the preset password is a dynamic password, and the preset time period is periodically updated or randomly updated at irregular times;

[0123] If the verification information is correct, it is confirmed that the verification information is verified.

[0124] In one embodiment, the processor, when executing the computer program, also implements the following steps:

[0125] After the step of verifying the verification information, it also comprises:

[0126] If the verification information is verified, the connection device information of the first device is obtained;

[0127] When the second device is not included in the connection device information, the debugging start request is rejected, and a prompt information is output to remind the user that the authorized terminal device is missing; or

[0128] When the second device is not included in the connection device information, it is judged whether there is a pass information in the first device.

[0129] If no, the debugging start request of the first device is rejected, and a prompt information is output to remind the user of the lack of an authorized terminal;

[0130] If yes, the valid use time and / or the use times of the pass information are verified;

[0131] When the pass information is within the valid use time and / or the use times are greater than zero, the debugging of the first device is started.

[0132] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0133] In response to the second device feeding back the authorized information in response to the debugging start authorization request, the step of starting the debugging of the first device comprises:

[0134] An encrypted pass is obtained, and a decryption key is obtained;

[0135] The encrypted pass is decrypted according to the decryption key to obtain pass information, and the debugging of the first device is started according to the pass information;

[0136] The encrypted pass and the decryption key are updated according to a preset time period or are randomly updated at irregular times.

[0137] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0138] If the verification information is verified, the step of sending the debugging start authorization request to the second device further comprises:

[0139] Feedback information sent by the second device after verifying the debugging start authorization request is obtained, and the feedback information comprises authorized information or rejected authorization information;

[0140] If the authorized information is received, the debugging of the first device is started in response to the authorized information;

[0141] If the rejected authorization information is received, the debugging start operation of the first device is exited in response to the rejected authorization information;

[0142] The debugging start authorization request comprises identification information of the first device.

[0143] In one embodiment, the processor, when executing the computer program, further implements the following steps:

[0144] In response to the second device feeding back the authorized information of the consent based on the debugging start authorization request, the step of starting the debugging of the first device further comprises:

[0145] If the data copy request is detected, the user identity information is acquired;

[0146] According to the user identity information, it is confirmed whether the current user is an authorized user;

[0147] If yes, the data copy request is permitted;

[0148] If no, the data copy request is prohibited.

[0149] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the following steps:

[0150] If the debugging start request for the first device is received, the verification information is acquired;

[0151] If the verification information is verified, the debugging start authorization request is sent to the second device;

[0152] In response to the second device feeding back the authorized information of the consent based on the debugging start authorization request, the debugging of the first device is started.

[0153] In this embodiment, after receiving the debugging start request of the terminal device, the verification interface is popped up, then the verification information input by the user is verified, and the debugging start authorization request is sent to the second device after the verification is passed; after receiving the authorized debugging start information fed back by the second device, the debugging function of the terminal device is started, so that the security setting of the debugging function of the terminal device is realized, the problem of low system security caused by all users being able to start the debugging function of the terminal device in the prior art is solved, and the security of the debugging function of the terminal device and the security of the stored data are improved.

[0154] In one embodiment, the computer program is executed by the processor to further implement the following steps:

[0155] If the debugging start request for the first device is received, the verification information is acquired;

[0156] When the preset operation is detected, the timing is started;

[0157] If the triggering operation of the preset number of times is acquired within the first preset time length and / or the triggering operation is continuously triggered within the second preset time length, it is confirmed that the debugging start request is received, and the verification interface is output to acquire the verification information.

[0158] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0159] If a debug enable request for the first device is received, the steps following the acquisition of verification information include:

[0160] The correctness of the verification information is determined based on the current time information and the preset password. The preset password is a dynamic password and is updated periodically or randomly at irregular intervals according to a preset time period.

[0161] If the verification information is correct, then the verification of the verification information is confirmed to have passed.

[0162] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0163] If the verification information passes the verification process, the following steps are also included:

[0164] If the verification information passes, obtain the connection device information of the first device;

[0165] If the second device is not included in the connection device information, the debugging start request is rejected, and a reminder message is output to remind the user that an authorized terminal device is missing; or

[0166] If the second device is not included in the connection device information, determine whether there is pass information in the first device;

[0167] If not, the debugging start request of the first device is rejected, and a reminder message is output to remind the user that there is no authorized terminal;

[0168] If so, the valid usage time and / or number of uses of the pass information shall be verified;

[0169] When the pass information is within its valid usage period and / or the number of uses is greater than zero, the debugging of the first device is initiated.

[0170] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0171] In response to the authorization information returned by the second device based on the debugging authorization request, the steps to enable debugging of the first device include:

[0172] Obtain the encrypted pass and the decryption key;

[0173] The encrypted pass is decrypted using the decryption key to obtain pass information, and the debugging of the first device is started based on the pass information.

[0174] The encrypted pass and the decryption key are updated according to a preset time period or randomly at irregular intervals.

[0175] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0176] If the verification information passes, after the step of sending a debugging enable authorization request to the second device, the method further includes:

[0177] Obtain feedback information sent by the second device after verifying the debugging start authorization request, the feedback information including authorization consent information or authorization rejection information;

[0178] If the consent authorization information is received, then in response to the consent authorization information, debugging of the first device is started;

[0179] If the denied authorization information is received, the debugging start operation of the first device is exited in response to the denied authorization information;

[0180] The debugging start authorization request includes: the identification information of the first device.

[0181] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:

[0182] Following the step of enabling debugging of the first device in response to the authorization information returned by the second device based on the debugging enable authorization request, the method further includes:

[0183] If a data copy request is detected, obtain the user's identity information;

[0184] Confirm whether the current user is an authorized user based on the user identification information;

[0185] If so, then the data copy request is permitted;

[0186] If not, the data copy request is disabled.

[0187] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0188] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0189] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method of debugging enabling, comprising: The method comprises: if a debugging start request for a first device is received, obtaining verification information; if the verification information is verified, obtaining connection device information of the first device; if the second device exists in the connection device information, sending a debugging start authorization request to the second device, the second device being an authorized terminal device for opening the debugging function of the first device; in response to the second device feeding back consent authorization information based on the debugging start authorization request, starting debugging of the first device; if the second device does not exist in the connection device information, determining whether pass information exists in the first device; if not, rejecting the debugging start request of the first device and outputting prompt information to remind the user of lacking an authorized terminal; if yes, verifying the valid use time and / or use times of the pass information; if the pass information is within the valid use time and / or the use times are greater than zero, starting debugging of the first device.

2. The method of claim 1, wherein, The step of obtaining verification information if a debugging start request for a first device is received comprises: starting timing when a preset operation is detected; if a preset number of trigger operations are obtained within a first preset time period and / or the trigger operation is continuously triggered within a second preset time period, it is determined that the debugging start request is received, and a verification interface is output to obtain the verification information.

3. The method according to claim 1 or 2, characterized in that, The step of obtaining verification information if a debugging start request for a first device is received comprises: determining the correctness of the verification information according to current time information and a preset password, the preset password being a dynamic password and being updated periodically according to a preset time period or randomly at irregular times; if the verification information is correct, it is determined that the verification information is verified.

4. The method of claim 3, wherein, The step of obtaining connection device information of the first device further comprises: if the second device does not exist in the connection device information, rejecting the debugging start request and outputting prompt information to remind the user of lacking an authorized terminal device.

5. The method of claim 1, wherein, The step of starting debugging of the first device in response to the second device feeding back consent authorization information based on the debugging start authorization request comprises: obtaining an encrypted pass and obtaining a decryption key; decrypting the encrypted pass according to the decryption key to obtain pass information, and starting debugging of the first device according to the pass information; wherein the encrypted pass and the decryption key are updated periodically according to a preset time period or randomly at irregular times.

6. The method of claim 1, wherein, The step of sending a debugging start authorization request to a second device if the verification information is verified further comprises: obtaining feedback information sent by the second device after verifying the debugging start authorization request, the feedback information comprising consent authorization information or rejection authorization information; if the consent authorization information is received, starting debugging of the first device in response to the consent authorization information; if the rejection authorization information is received, exiting the debugging start operation of the first device in response to the rejection authorization information; wherein the debugging start authorization request comprises identification information of the first device.

7. The method according to any one of claims 1-2, 5-6, characterized in that, The step of starting the debugging of the first device in response to the second device feeding back the authorized information of the debugging start request based on the debugging start request further comprises: If the data copy request is detected, obtaining user identity information; Confirming whether the current user is an authorized user according to the user identity information; If yes, the data copy request is permitted; If no, the data copy request is prohibited.

8. A debugging and activation device, characterized in that, The device comprises: A verification module, configured to obtain verification information and verify the verification information if a debugging start request of a first device is received; A communication module, configured to obtain connection device information of the first device if the verification information is verified, and send a debugging start authorization request to a second device if the second device exists in the connection device information, the second device being an authorized terminal device for opening the debugging function of the first device; A control module, configured to start the debugging of the first device in response to the second device feeding back the authorized information of the debugging start request based on the debugging start request, and judge whether pass information exists in the first device if the second device does not exist in the connection device information, refuse the debugging start request of the first device and output a prompt information to remind the user of lacking the authorized terminal if no, and verify the valid use time and / or use times of the pass information if yes, and start the debugging of the first device if the pass information is within the valid use time and / or the use times is greater than zero. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The processor executes the computer program to realize the steps of the method in any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • ADB interface opening method and apparatus

    CN105701373A

  • Authentication method and network access server

    CN106714167A

  • ADB debugging port opening method and device, Android equipment and readable storage medium

    CN109885356A

  • Method and device for realizing debugging by temporarily authorizing Root

    CN110781478A

  • Safety debugging method and device, electronic equipment and storage medium

    CN112528257A