Opening software debugging method and system for remote computing password local authorization
By using a remote calculation method for local authorization of passwords, authorization request codes are generated and approved, solving the balance between security and flexible debugging in software debugging management, and realizing secure and flexible debugging function management on embedded devices.
Patent Information
- Application Number
- CN202511782826.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-30
- Publication Date
- 2026-03-03
AI Technical Summary
In existing technologies, software debugging management methods cannot guarantee security while meeting temporary debugging needs, leading to difficulties in on-site problem diagnosis and repair, and fixed passwords pose a risk of leakage.
The system generates an authorization request code and encrypts it by remotely calculating the password and granting local authorization. After remote approval, it generates an authorization password, verifies the device's unique identifier and validity period, and writes it to the non-volatile storage area. The system enables the debugging function within the validity period according to the approved debugging items, and automatically clears the data and restarts after the expiration.
This feature enables temporary activation of specific debugging functions under a security policy that disables the debugging channel by default. This prevents the spread of authorized information, provides fine-grained permission management, reduces operational complexity and security risks, and ensures that debugging permissions are valid for a specific period of time.
Smart Images

Figure CN121597547A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security technology, and in particular to a method and system for debugging software that enables remote calculation of local authorization of passwords. Background Technology
[0002] In the software development and maintenance of in-vehicle intelligent systems and embedded devices, software debugging is a crucial step in locating and resolving system anomalies. Currently, common debugging methods include outputting logs, executing commands, or pushing files through interfaces such as serial ports and Android debug bridges. However, due to stringent information security requirements, devices in production environments typically employ strict security policies, such as disabling serial ports, disabling ADB interfaces, enabling SELinux security modules, enabling firewalls, and prohibiting the use of flashing tools like Fastboot and QFIL. While these measures effectively improve system security, they also significantly complicate on-site problem diagnosis and repair.
[0003] Existing technologies for managing debugging channels have significant drawbacks: either they lack an enable / disable switch, making on-site debugging impossible, or they use fixed passwords, posing a risk of data leakage. This "open or closed" management approach fails to achieve refined management that satisfies both temporary debugging needs and ensures security, making it difficult to strike an effective balance between flexible debugging and secure control. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for enabling remote computation password local authorization to debug software, at least solving a technical problem in the management method of either opening or closing, which cannot achieve refined management that meets both temporary debugging needs and ensures security.
[0005] This invention provides the following solution:
[0006] According to one aspect of the present invention, a method for enabling software debugging by remotely calculating local authorization of passwords is provided, comprising:
[0007] The local device collects the device's unique identifier, the user-selected debugging item data, and the current time. The data is then combined, encrypted, and used to generate an authorization request code.
[0008] The remote authorization service decrypts the authorization request code, approves the decrypted debug item data according to the predetermined authorization strategy, extends the validity period of the decrypted time data, and then recombines and encrypts the device unique identifier, the approved debug item and the new validity period to generate an authorization password.
[0009] The local device decrypts the authorization password, verifies whether the decrypted device unique identifier is consistent with the local machine and whether the new validity period is valid; after successful verification, the approved debugging items and the new validity period are written to the non-volatile storage area of the local machine.
[0010] When the local device starts up, it reads the non-volatile storage area. If the current time has not exceeded the new validity period, it enables the corresponding debugging function according to the approved debugging items.
[0011] The local device monitors the system time during operation. Once it determines that the new validity period has expired, it automatically clears the authorized data in the non-volatile storage area and triggers a system restart.
[0012] Furthermore, the generation of the authorization request code includes:
[0013] Obtain the device chip serial number as a unique identifier for the device;
[0014] The device's unique identifier, debugging item data, and current time data are sequentially concatenated to form the first composite data block;
[0015] The first composite data block is encrypted using a symmetric encryption algorithm to generate ciphertext as an authorization request code.
[0016] The authorization request code is presented to the user through a modal dialog box in the graphical user interface, guiding the user to send it to the remote licensor.
[0017] Furthermore, the user-selected debug item data includes:
[0018] A dedicated debugging permission management interface is provided in the device's operating system;
[0019] This interface presents users with multiple software debugging channels that can be independently enabled or disabled;
[0020] In response to user actions, dynamically generate data structures to represent the set of debugging functions selected by the user, forming the user-selected debugging item data.
[0021] Furthermore, the current time is composed of numerical values representing the date and time.
[0022] Furthermore, extending the validity period of the decrypted time data includes:
[0023] Using the decryption algorithm corresponding to the local device's encryption algorithm, the received authorization request code is decrypted to restore the device's unique identifier, original debugging item data, and original time data;
[0024] Based on the authorization policy library, the original debug item data is reviewed for security and compliance, and unauthorized debug items are filtered out to generate an approved debug item dataset.
[0025] Based on the original time data, a new validity period is calculated by overlaying the time increment.
[0026] Furthermore, the generation of the authorization password includes:
[0027] The device's unique identifier obtained from decryption and restoration, the approved debug item dataset, and the new validity period are then concatenated in a predetermined format to form a second composite data block.
[0028] The second composite data block is encrypted using the same encryption algorithm used to generate the authorization request code, thereby generating the authorization password.
[0029] Furthermore, the step of writing the approved debugging items and the new validity period into the non-volatile memory area of the local machine includes:
[0030] After verification, the approved debugging items and new validity period will be written as key-value pairs to a separate persistent storage partition on the device that will not be cleared when the device is restored to factory settings.
[0031] Furthermore, enabling the corresponding debugging function based on the approved debugging item includes:
[0032] Later in the device operating system boot sequence, the non-volatile memory area is read by system services;
[0033] If the read is successful and the current system time is within the new validity period, the system service will call the underlying system interface to enable the corresponding debugging function channel one by one, based on the stored debugging items.
[0034] Furthermore, the automatic clearing of authorized data in the non-volatile storage area and triggering a system restart includes:
[0035] A permission monitoring daemon runs in the system background, which continuously or periodically compares the current system time with the new expiration date.
[0036] Once it is detected that the current system time has exceeded the new validity period, a control command is immediately initiated. The execution of this command will clear all data related to the debug authorization in the non-volatile storage area and trigger a system restart.
[0037] According to a second aspect of the present invention, a remote calculation password local authorization opening software debugging system is provided, comprising:
[0038] The request code generation module is used to collect the device's unique identifier, the user-selected debugging item data, and the current time, combine the data, encrypt it, and generate an authorization request code.
[0039] The authorization calculation module is used to decrypt the received authorization request code, approve the decrypted debugging item data according to the predetermined authorization strategy, extend the validity period of the decrypted time data, and then re-encrypt the device unique identifier, the approved debugging item and the new validity period to generate the authorization password.
[0040] The authorization verification and execution module is used to decrypt the authorization password from the remote authorization service, verify whether the decrypted device unique identifier is consistent with the local machine and whether the new validity period is valid; after the verification is successful, the approved debugging items and the new validity period are written to the non-volatile storage area of the local machine.
[0041] The function control module is used to read the non-volatile storage area when the system starts up. If the current time has not exceeded the new validity period, the corresponding debugging function is enabled according to the approved debugging item.
[0042] The security recovery module monitors system time during system operation and automatically clears authorized data in non-volatile storage and triggers a system restart after determining that the new expiration date has been exceeded.
[0043] The above solution achieves the following beneficial technical effects:
[0044] This application provides a dedicated debugging permission management interface in the system settings, which enables the temporary and selective activation of specific debugging functions according to actual troubleshooting needs, even under the security policy that disables debugging channels such as serial ports and ADB by default. This provides the necessary means for locating and analyzing on-site problems and avoids the difficulty of troubleshooting caused by the inability to debug.
[0045] This application achieves strict binding of the authorization password to a specific device by using the device's unique identifier as a necessary element for authorization requests and verification. This one-device-one-password design ensures that even if the authorization password is leaked during transmission, it cannot be used on other devices, effectively preventing the spread and abuse of authorization information.
[0046] This application ensures that debugging permissions are only valid within a specific time window by setting an expiration date in the authorization process and establishing a monitoring mechanism in the system; the system can automatically clear the authorized data and restore the default security state after the authorization expires. This time-dimensional control keeps potential security risks within a limited time range.
[0047] This application uses a remote authorization service to approve debugging requests based on predefined authorization policies, which can filter out unnecessary or high-risk debugging functions and enable only the minimum set of functions necessary for troubleshooting; this fine-grained permission management further reduces the security exposure surface during the debugging process.
[0048] This application eliminates the need for manual intervention in storing passwords or manually clearing permissions throughout the entire process, from authorization request generation, remote calculation, local verification to automatic recovery. This reduces operational complexity and avoids security risks caused by human negligence. Attached Figure Description
[0049] Figure 1 This is a flowchart of a method for enabling software debugging by remotely calculating local authorization of passwords, provided by one or more embodiments of the present invention.
[0050] Figure 2 This is a schematic diagram of the running interface of a remote calculation password local authorization enabling software debugging method provided by one or more embodiments of the present invention.
[0051] Figure 3 This is a schematic diagram of the running interface of a remote calculation password local authorization enabling software debugging method provided by one or more embodiments of the present invention.
[0052] Figure 4 This is an architecture diagram of a remote calculation password local authorization enabling software debugging system provided by one or more embodiments of the present invention. Detailed Implementation
[0053] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] Figure 1 This is a flowchart of a method for enabling software debugging by remotely calculating local authorization of passwords, provided by one or more embodiments of the present invention.
[0055] Figure 2 This is a schematic diagram of the running interface of a remote calculation password local authorization enabling software debugging method provided by one or more embodiments of the present invention.
[0056] Figure 3 This is a schematic diagram of the running interface of a remote calculation password local authorization enabling software debugging method provided by one or more embodiments of the present invention.
[0057] like Figures 1-3The methods for enabling software debugging with local authorization for remote calculation passwords, as shown, include:
[0058] The local device collects the device's unique identifier, the user-selected debugging item data, and the current time. The data is then combined, encrypted, and used to generate an authorization request code.
[0059] Furthermore, generating the authorization request code includes:
[0060] Obtain the device chip serial number as a unique identifier for the device;
[0061] The device's unique identifier, debugging item data, and current time data are sequentially concatenated to form the first composite data block;
[0062] The first composite data block is encrypted using a symmetric encryption algorithm to generate ciphertext as an authorization request code.
[0063] The authorization request code is presented to the user through a modal dialog box in the graphical user interface, guiding the user to send it to the remote licensor.
[0064] Furthermore, the user-selected debug item data includes:
[0065] A dedicated debugging permission management interface is provided in the device's operating system;
[0066] This interface presents users with multiple software debugging channels that can be independently enabled or disabled;
[0067] In response to user actions, dynamically generate data structures to represent the set of debugging functions selected by the user, forming the user-selected debugging item data.
[0068] Furthermore, the current time consists of numerical values representing the date and time.
[0069] Specifically, the process involves generating a local device authorization request code. This process begins with the acquisition of the device's unique identifier, reading the chip serial number embedded in the device's hardware. This serial number is fixed by the chip manufacturer during the manufacturing process and is globally unique and tamper-proof, providing a reliable device identity authentication foundation for subsequent authorization binding. Simultaneously, the system interacts with the user through a debugging permission management interface integrated into the device's operating system. This interface presents multiple software debugging channels in the form of a list of independently controllable switches, such as a UART debugging channel, an ADB debugging channel, or a file push debugging channel. When the user operates a switch element in the interface, the system dynamically parses the user input and generates a structured data object. This object records the set of debugging functions selected by the user in a binary bitmap or a predefined encoding format, thus forming the user-selected debugging item data.
[0070] After completing data acquisition, the system further obtains the current time information, which consists of numerical values representing the date and time, such as using the DDHH format, where DD represents a two-digit date value and HH represents a two-digit hour value, to achieve a balance between data conciseness and time accuracy. Subsequently, the system concatenates the device's unique identifier, debugging item data, and current time data in a fixed order to form the first composite data block. This concatenation operation follows predefined field order and length specifications to ensure the uniformity and integrity of the data structure and effectively avoid parsing ambiguity.
[0071] The system uses a symmetric encryption algorithm to encrypt the first composite data block; optionally, the AES algorithm can be used to perform encryption in ECB mode, where the encryption key is securely stored in the trusted execution environment of the device; the encryption process converts the plaintext data block into a binary ciphertext sequence, then converts it into a readable string through Base64 encoding, and finally generates an authorization request code;
[0072] Finally, the system presents the authorization request code to the user through a modal dialog box in the graphical user interface. This modal dialog box has interface exclusivity, which can prevent the user from performing other operations until the current interaction is completed, thereby effectively guiding the user's attention. In addition to displaying the authorization request code string, the dialog box also contains clear operation guidance text, prompting the user to send the code to the designated remote authorization server to continue the subsequent authorization process. The entire process ensures the security, reliability, and user-friendliness of the request code generation stage through modular design and strict execution sequence.
[0073] The remote authorization service decrypts the authorization request code, approves the decrypted debug item data according to the predetermined authorization policy, extends the validity period of the decrypted time data, and then recombines and encrypts the device unique identifier, the approved debug item and the new validity period to generate an authorization password.
[0074] Furthermore, extending the validity period of the decrypted time data includes:
[0075] Using the decryption algorithm corresponding to the local device's encryption algorithm, the received authorization request code is decrypted to restore the device's unique identifier, original debugging item data, and original time data;
[0076] Based on the authorization policy library, the original debug item data is reviewed for security and compliance, and unauthorized debug items are filtered out to generate an approved debug item dataset.
[0077] Based on the original time data, a new validity period is calculated by overlaying time increments.
[0078] Furthermore, generating the authorization password includes:
[0079] The device's unique identifier obtained from decryption and restoration, the approved debug item dataset, and the new validity period are then concatenated in a predetermined format to form a second composite data block.
[0080] The second composite data block is encrypted using the same encryption algorithm used to generate the authorization request code, thereby generating the authorization password.
[0081] Specifically, after receiving the authorization request code from the local device, the remote authorization service initiates a complete authorization calculation process. This process first performs a decryption operation, using a decryption algorithm that is completely corresponding to that on the local device to decrypt the authorization request code. The decryption algorithm selected here matches the encryption algorithm of the local device. For example, if the local device uses the AES-128 algorithm for encryption, the remote service uses the same algorithm and key for decryption to ensure that the data can be accurately restored to the three core elements: the device's unique identifier, the original debugging item data, and the original time data.
[0082] After successfully restoring the original data, the system performs a security review and approval of the original debug item data based on a predefined authorization policy library. The authorization policy library contains complete debugging function licensing rules, and its approval process is implemented through set operations.
[0083]
[0084] The authorization policy whitelist is defined as a set of all debugging function codes allowed by the system. This operation ensures that only debugging functions that meet security requirements are retained, and automatically filters out unauthorized or risky debugging items.
[0085] In the time processing stage, the system calculates the new validity period by superimposing a predefined time increment onto the original time data obtained from decryption. Considering that the time data adopts the compact DDHH format, the superposition of the time increment needs to follow the time base conversion rules. The specific calculation process is implemented through the following formula:
[0086]
[0087]
[0088] Where DD represents the original date value and HH represents the original hour value. Represents a predefined time increment. This is the floor function. For modulo operation; this calculation scheme ensures the mathematical correctness of time extension operations in a compact four-bit time representation, while automatically handling carry-over issues for dates and hours;
[0089] After completing data verification and time calculation, the system enters the authorization password generation stage. First, the device unique identifier, the verified debugging item dataset, and the new validity period are concatenated according to the predefined format specifications to form a second composite data block. This concatenation operation strictly follows the same field order, length, and encoding rules as the first composite data block to ensure the consistency of the data structure.
[0090] Finally, the system uses the exact same encryption algorithm and key parameters as when generating the authorization request code to encrypt the second composite data block; the encryption process employs the same algorithm mode and working mechanism, and its encryption function is expressed as:
[0091]
[0092] Where K is the encryption key. This represents the execution process of the encryption algorithm. Through this end-to-end consistent encryption mechanism, the algorithmic symmetry between the decryption and encryption stages is ensured. The generated authorization password maintains data security and provides a reliable input basis for subsequent local verification. The entire remote authorization calculation process establishes a complete trust chain through rigorous data processing and algorithm matching, providing a technical foundation for the secure granting of debugging permissions.
[0093] The local device decrypts the authorization password, verifies whether the decrypted device unique identifier is consistent with the local machine and whether the new validity period is valid; after successful verification, the approved debugging items and the new validity period are written to the non-volatile storage area of the local machine.
[0094] Furthermore, writing the approved debugging items and the new expiration date into the non-volatile memory area of the local machine includes:
[0095] After verification, the approved debugging items and new validity period will be written as key-value pairs to a separate persistent storage partition on the device that will not be cleared when the device is restored to factory settings.
[0096] Specifically, after receiving the authorization password entered by the user, the local device initiates the authorization verification and data persistence process. This process first decrypts the authorization password using the same decryption algorithm and key parameters as the remote authorization server, such as using the AES-128 algorithm decryption mode, to restore the authorization password into a plaintext data block containing the device's unique identifier, the approved debug item dataset, and a new validity period.
[0097] The system employs a dual verification mechanism. First, it compares the decrypted device unique identifier with the device identifier stored locally. This comparison is achieved using a string exact matching algorithm to ensure that the authorization information is strictly bound to the current device, preventing the misuse of authorization information across different devices. Second, the system obtains the current system time and compares it with the decrypted new validity period in chronological order. The verification conditions can be expressed as follows:
[0098]
[0099] Both the current time and the new validity period use the same DDHH time representation, and this verification ensures that the authorization is only valid within the valid time range;
[0100] The system enters the data persistence phase only when both device identification verification and time validity verification pass. In this phase, the approved debug item dataset and the new validity period are organized as key-value pairs, where the keys use a predefined naming convention, such as... This indicates the debug configuration. Indicates the validity period of the authorization; the key-value pair data structure is converted into binary format through serialization operations, such as using TLV encoding or JSON serialization;
[0101] The system writes the serialized data to a special non-volatile storage area on the device. This storage area is physically independent of the user data partition and will not be cleared during a factory reset operation. One possible implementation is to use the OTP area or protected eMMC partition in the embedded device to implement the data writing operation through low-level system calls.
[0102] During the writing process, the system uses atomic write operations to ensure data integrity. If an exception occurs during the writing process, it will automatically roll back to the previous stable state. After the writing is completed, the system immediately synchronizes the storage cache to ensure that the data is actually written to disk, and confirms the correctness of the data writing through a read verification mechanism. The entire verification and persistence process establishes a safe and reliable data foundation for the subsequent debugging function through multiple verifications and a reliable storage mechanism.
[0103] When the local device starts up, it reads the non-volatile storage area. If the current time has not exceeded the new validity period, it enables the corresponding debugging function according to the approved debugging items.
[0104] Furthermore, enabling the corresponding debugging functions based on the approved debugging items includes:
[0105] Later in the device operating system boot sequence, the non-volatile memory area is read by system services;
[0106] If the read is successful and the current system time is within the new validity period, the system service will call the underlying system interface to enable the corresponding debugging function channel one by one, based on the stored debugging items.
[0107] Specifically, the local device performs a check and recovery process for the debug function authorization status during the startup phase; this process is triggered later in the device operating system startup sequence, specifically in the time window after the system service management subsystem has completed initialization and before the application framework layer starts; at this time, the dedicated authorization management service reads the persistent authorization data in the non-volatile storage area.
[0108] The authorization management service accesses independent persistent storage partitions through predefined device nodes or system call interfaces; read operations use binary streams to obtain stored key-value pair data, and then deserialize the approved debug item dataset and new expiration date; data integrity verification is performed during the parsing process, for example, by using cyclic redundancy check codes to verify that the data has not been accidentally damaged during storage;
[0109] After obtaining the authorized data, the system immediately performs a time validity verification; this verification compares the current system time with the newly stored validity period, and the comparison operation can be expressed as:
[0110]
[0111] The current system time and the new validity period are both converted to a unified time representation format, such as the cumulative number of minutes since a certain base time point; this unified representation method avoids comparison errors caused by differences in date formats.
[0112] The system enters the debugging function activation phase only when the data is successfully read and the time validity verification is passed. The authorization management service processes each authorized debugging function one by one in an iterative manner based on the debug item dataset obtained by parsing. For each debug item, the system executes the following standard operation sequence: First, it queries the function configuration mapping table according to the debug item code to determine the underlying system resources that need to be operated on; then, it modifies the corresponding kernel debug flags or adjusts system parameters through safe system call interfaces, such as ioctl operations or sysfs file writing.
[0113] Specifically, the system employs differentiated implementation mechanisms for enabling different types of debugging functions. For serial port debugging channels, the operation includes setting the correct baud rate parameters and removing serial port access restrictions. For ADB debugging functions, it is necessary to start the ADB daemon process and configure the corresponding network debugging permissions. For file push debugging, it involves creating a temporary file transfer directory and setting appropriate access permissions.
[0114] All debugging function activation operations are logged in detail, including operation time, debug item identifier, and execution result. After the system completes the activation of all authorized debug items, it sends an authorization status update notification to the system event manager to ensure that other system components can obtain the latest debugging function status. The entire startup authorization recovery process uses a phased verification and execution mechanism to ensure that the debugging function can be automatically and accurately restored to the authorized state when the authorization conditions are met.
[0115] The local device monitors the system time during operation. Once it determines that the new validity period has expired, it automatically clears the authorized data in the non-volatile storage area and triggers a system restart.
[0116] Furthermore, automatically clearing authorized data in non-volatile storage and triggering a system restart includes:
[0117] A permission monitoring daemon runs in the system background, which continuously or periodically compares the current system time with the new expiration date.
[0118] Once it is detected that the current system time has exceeded the new validity period, a control command is immediately initiated. The execution of this command will clear all data related to the debug authorization in the non-volatile storage area and trigger a system restart.
[0119] Specifically, the local device executes a continuous monitoring mechanism for the validity period of the authorization during normal system operation; this mechanism is implemented through a permission monitoring daemon running in the background of the system, which is automatically activated after the system completes the startup sequence and resides in the system memory as a service;
[0120] The permission monitoring daemon adopts a periodic working mode, and its monitoring frequency can be adjusted through configuration parameters, such as waking up every five minutes to perform a check task. In each wake-up cycle, the process first obtains the current system time through the system clock service, and then accesses the non-volatile storage area to read the pre-stored authorization validity period data. The time comparison operation uses a unified time base and representation format to ensure the accuracy of the comparison.
[0121] The validity of the time period is determined by the following logical expression:
[0122]
[0123] The current system time and validity period are both converted into numerical representations calculated from a fixed reference point, such as a Unix timestamp or the cumulative number of seconds since the device started. This unified numerical comparison scheme avoids complex time format parsing and improves the reliability of the judgment.
[0124] When the monitoring process detects that the current system time has exceeded the storage validity period, it immediately triggers the authorization expiration process. This process first records the authorization expiration event in the system log, including the time of expiration and related device identification information. Then, the process initiates a data clearing command, which performs an erasure operation on all data areas related to the debugging authorization in the non-volatile storage area through the underlying storage access interface.
[0125] The data erasure process uses atomic operations to ensure thorough cleaning of the storage area, specifically including deleting the stored debug configuration data, validity period data, and related verification information; for key-value pair storage structures, the process will delete all key-value pair entries related to authorization one by one; for block storage structures, the entire authorized data area will be formatted and written.
[0126] After data erasure is complete, the monitoring process immediately initiates a system reboot command. This command notifies the kernel to execute an ordered reboot process through a standard system call interface, including standard operations such as stopping user space processes, synchronizing the file system, and unloading storage devices. After completing all cleanup work, the system performs a hardware-level reboot to ensure that the device is restored to its default security state after the authorization expires.
[0127] The entire monitoring and recovery mechanism is implemented through an independent daemon process, which does not depend on the normal operation of other system components. Even under high load or partial system anomalies, it can still ensure timely recovery after the authorization expires. This design scheme ensures the strict enforcement of authorization time limits through automated monitoring and recovery mechanisms, providing continuous security for the system.
[0128] Figure 4 This is an architecture diagram of a remote calculation password local authorization enabling software debugging system provided by one or more embodiments of the present invention.
[0129] like Figure 4 The remote calculation password local authorization enabling software debugging system shown includes:
[0130] The request code generation module is used to collect the device's unique identifier, the user-selected debugging item data, and the current time, combine the data, encrypt it, and generate an authorization request code.
[0131] The authorization calculation module is used to decrypt the received authorization request code, approve the decrypted debugging item data according to the predetermined authorization strategy, extend the validity period of the decrypted time data, and then re-encrypt the device unique identifier, the approved debugging item and the new validity period to generate the authorization password.
[0132] The authorization verification and execution module is used to decrypt the authorization password from the remote authorization service, verify whether the decrypted device unique identifier is consistent with the local machine and whether the new validity period is valid; after the verification is successful, the approved debugging items and the new validity period are written to the non-volatile storage area of the local machine.
[0133] The function control module is used to read the non-volatile memory area when the system starts up. If the current time has not exceeded the new validity period, the corresponding debugging function will be enabled according to the approved debugging item.
[0134] The security recovery module monitors system time during system operation and automatically clears authorized data in non-volatile storage and triggers a system restart after determining that the new expiration date has been exceeded.
[0135] It is worth noting that although this system only discloses the request code generation module, authorization calculation module, authorization verification and execution module, function control module, and security recovery module, it does not mean that this system is limited to the above-mentioned basic functional modules. On the contrary, what this invention intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can add one or more functional modules in combination with existing technology to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. It should not be assumed that the scope of protection of the claims of this invention is limited to the above-disclosed basic functional modules just because this embodiment only discloses a few basic functional modules.
[0136] Specifically, the request code generation module, as the front-end interactive component of the system, is responsible for initiating the entire authorization process. This module reads the chip serial number as the unique identifier of the device through the device hardware interface, obtains the debugging configuration data selected by the user from the system settings interface, and collects the current time information in conjunction with a real-time clock source. The module internally implements data combination logic, concatenating the three types of data according to predefined format specifications to form the original data block to be encrypted. The encryption unit uses a symmetric encryption algorithm, such as the AES-128 algorithm, to perform encryption operations on the data block and generate a base64 encoded authorization request code string. Finally, this string is presented to the user through a graphical interface, completing the request code generation stage.
[0137] The authorization calculation module is deployed on a remote server and constitutes the core processing unit of the system. After receiving the authorization request code from the client, the module first uses the decryption key and algorithm that matches the client to perform decryption operations, restoring the original device identifier, debugging item data, and time data. The module integrates an authorization policy engine, which performs a security assessment on the original debugging items through a rule parser. In terms of time processing, the module uses a time increment algorithm to calculate the new validity period. Finally, the module re-encrypts the processed data and generates an authorization password to be sent back to the client.
[0138] The authorization verification and execution module runs on the local device and is responsible for verifying the validity of the authorization. After receiving the authorization password entered by the user, the module first decrypts it to obtain the authorization data sent by the remote server. Then, it executes a dual verification mechanism, including device identifier matching verification and time validity verification. During the verification process, an exact matching algorithm is used to compare the device identifier, and the current time is obtained through the system time service and compared with the validity period in the authorization data. Only when both verifications pass, the module writes the approved debugging items and validity period to a specific non-volatile storage area through a secure storage interface.
[0139] The function control module is automatically activated during system startup, enabling on-demand enabling of debugging functions. This module, executed as a system service later in the startup sequence, reads authorized data from persistent storage via the storage driver interface. An integrated time verification unit compares the current system time with the storage validity period using a unified time base. When time conditions are met, the module calls the underlying system's debugging function management interface, enabling the corresponding debugging channels item by item according to the authorized configuration. For different debugging function types, the module employs differentiated enabling strategies, such as adjusting kernel debugging flags via system calls or modifying system configuration files to enable specific debugging services.
[0140] The security recovery module serves as the system's security mechanism, continuously monitoring the authorization status during device operation. This module operates as a background daemon, periodically checking the relationship between system time and authorization validity period using a timed wake-up mechanism. The monitoring algorithm is based on a time comparison principle: a recovery operation is triggered when the current time > the validity period. Once authorization expiration is detected, the module immediately initiates a cleanup process, thoroughly erasing authorized data from non-volatile storage via the storage management interface and triggering a system-level security reboot command. This process ensures that the device automatically restores to its default secure state after authorization expiration.
[0141] Each functional module exchanges data and synchronizes its status through standardized interfaces, forming a complete control loop. The system adopts a layered design concept, with appropriate independence between modules to facilitate functional expansion and system maintenance. Those skilled in the art can add auxiliary functional modules, such as log recording modules, network communication modules, or performance monitoring modules, based on the above basic modules and according to the needs of specific application scenarios. These extensions all fall within the protection scope of this invention. The entire system achieves secure management and precise control of debugging permissions through modular architecture design and rigorous workflow.
[0142] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for enabling software debugging with remote calculation of password local authorization, characterized in that, The method for enabling software debugging with local authorization of remote calculation password includes: The local device collects the device's unique identifier, the user-selected debugging item data, and the current time. The data is then combined, encrypted, and used to generate an authorization request code. The remote authorization service decrypts the authorization request code, approves the decrypted debug item data according to the predetermined authorization strategy, extends the validity period of the decrypted time data, and then recombines and encrypts the device unique identifier, the approved debug item and the new validity period to generate an authorization password. The local device decrypts the authorization password, verifies whether the decrypted device unique identifier is consistent with the local machine and whether the new validity period is valid; after successful verification, the approved debugging items and the new validity period are written to the non-volatile storage area of the local machine. When the local device starts up, it reads the non-volatile storage area. If the current time has not exceeded the new validity period, it enables the corresponding debugging function according to the approved debugging items. The local device monitors the system time during operation. Once it determines that the new validity period has expired, it automatically clears the authorized data in the non-volatile storage area and triggers a system restart.
2. The method for enabling remote calculation password local authorization and debugging software according to claim 1, characterized in that, The generated authorization request code includes: Obtain the device chip serial number as a unique identifier for the device; The device's unique identifier, debugging item data, and current time data are sequentially concatenated to form the first composite data block; The first composite data block is encrypted using a symmetric encryption algorithm to generate ciphertext as an authorization request code. The authorization request code is presented to the user through a modal dialog box in the graphical user interface, guiding the user to send it to the remote licensor.
3. The method for enabling software debugging with remote calculation password local authorization according to claim 1, characterized in that, The user-selected debug item data includes: A dedicated debugging permission management interface is provided in the device's operating system; This interface presents users with multiple software debugging channels that can be independently enabled or disabled; In response to user actions, dynamically generate data structures to represent the set of debugging functions selected by the user, forming the user-selected debugging item data.
4. The method for enabling software debugging with remote calculation password local authorization according to claim 1, characterized in that, The current time is composed of numerical values representing the date and time.
5. The method for enabling software debugging with local authorization of remote calculation password as described in claim 1, characterized in that, The extension of the validity period of the decrypted time data includes: Using the decryption algorithm corresponding to the local device's encryption algorithm, the received authorization request code is decrypted to restore the device's unique identifier, original debugging item data, and original time data; Based on the authorization policy library, the original debug item data is reviewed for security and compliance, and unauthorized debug items are filtered out to generate an approved debug item dataset. Based on the original time data, a new validity period is calculated by overlaying the time increment.
6. The method for enabling software debugging with remote calculation password local authorization according to claim 1, characterized in that, The generated authorization password includes: The device's unique identifier obtained from decryption and restoration, the approved debug item dataset, and the new validity period are then concatenated in a predetermined format to form a second composite data block. The second composite data block is encrypted using the same encryption algorithm used to generate the authorization request code, thereby generating the authorization password.
7. The method for enabling software debugging with remote calculation password local authorization according to claim 1, characterized in that, The step of writing the approved debugging items and the new validity period into the non-volatile memory area of the local machine includes: After verification, the approved debugging items and new validity period will be written as key-value pairs to a separate persistent storage partition on the device that will not be cleared when the device is restored to factory settings.
8. The method for enabling software debugging with remote calculation password local authorization according to claim 1, characterized in that, The step of enabling the corresponding debugging function based on the approved debugging item includes: Later in the device operating system boot sequence, the non-volatile memory area is read by system services; If the read is successful and the current system time is within the new validity period, the system service will call the underlying system interface to enable the corresponding debugging function channel one by one, based on the stored debugging items.
9. The method for enabling software debugging with local authorization of remote calculation password as described in claim 1, characterized in that, The automatic clearing of authorized data in the non-volatile storage area and triggering a system restart includes: A permission monitoring daemon runs in the system background, which continuously or periodically compares the current system time with the new expiration date. Once it is detected that the current system time has exceeded the new validity period, a control command is immediately initiated. The execution of this command will clear all data related to the debug authorization in the non-volatile storage area and trigger a system restart.
10. A remote calculation password local authorization opening software debugging system, characterized in that, The method for enabling software debugging for remote computation password local authorization as described in any one of claims 1-9 includes: The request code generation module is used to collect the device's unique identifier, the user-selected debugging item data, and the current time, combine the data, encrypt it, and generate an authorization request code. The authorization calculation module is used to decrypt the received authorization request code, approve the decrypted debugging item data according to the predetermined authorization strategy, extend the validity period of the decrypted time data, and then re-encrypt the device unique identifier, the approved debugging item and the new validity period to generate the authorization password. The authorization verification and execution module is used to decrypt the authorization password from the remote authorization service, verify whether the decrypted device unique identifier is consistent with the local machine and whether the new validity period is valid; after the verification is successful, the approved debugging items and the new validity period are written to the non-volatile storage area of the local machine. The function control module is used to read the non-volatile storage area when the system starts up. If the current time has not exceeded the new validity period, the corresponding debugging function is enabled according to the approved debugging item. The security recovery module monitors system time during system operation and automatically clears authorized data in non-volatile storage and triggers a system restart after determining that the new expiration date has been exceeded.