CN-121979762-A - Microdroid system debugging method and device and electronic equipment
Abstract
The application discloses Microdroid system debugging method, device and electronic equipment, the method comprises the steps of receiving a starting mode switching instruction request, checking a starting mode identification in a safe storage area after the instruction request is checked by a preset instruction checking certificate, inquiring preset equipment information and obtaining a user debugging authorization code if the starting mode identification stored in the safe storage area is a debugging mode, checking whether the user is allowed to debug the equipment or not by using the equipment information, starting a Microdroid system according to the debugging mode if the user is allowed to debug the equipment, starting a Microdroid system according to a normal mode if the starting mode identification stored in the safe storage area is a normal mode, and starting a Microdroid system according to the starting mode in a static configuration mirror file if the starting mode identification does not exist in the safe storage area. The application realizes the flexible switching MicroDroid of the starting mode of the system.
Inventors
- YE GUOHUA
- QIU YILONG
Assignees
- 福建汇思博数字科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20251208
Claims (10)
- 1. A method for debugging Microdroid a system, the method comprising: Receiving a starting mode switching instruction request, checking a signature of the instruction request by using a preset instruction signature verification certificate, and storing a starting mode identifier in a safe storage area after the signature verification is successful; if the starting mode identifier stored in the secure storage area is a debugging mode, inquiring preset equipment information, acquiring a debugging authorization code of a user, checking the debugging authorization code by using the equipment information, and checking whether the user is allowed to debug the equipment; if the user is allowed to debug the equipment, starting Microdroid the system according to the debug mode; If the starting mode identifier stored in the secure storage area is a normal mode, starting Microdroid the system according to the normal mode; If the secure storage area does not have the startup mode identifier, the system is started Microdroid according to the startup mode in the static configuration image file.
- 2. The Microdroid system debugging method of claim 1, wherein signing the instruction request with a preset instruction signing certificate, and storing the start mode identifier in the secure storage area after the signing success comprises: encrypting the starting mode switching instruction by using the instruction verification certificate, and sending the starting mode switching instruction to a secure virtual machine; and the secure virtual machine decrypts and verifies the starting mode switching instruction, and stores the starting mode identifier in a secure storage area after verification is successful.
- 3. The method for debugging Microdroid of claim 2, wherein the secure virtual machine decrypting and verifying the start-up mode switch instruction, and storing the start-up mode identifier in the secure storage area after the verification is successful comprises: Acquiring an identity of a request caller according to the starting mode switching instruction so as to check whether the request caller is a secure virtual machine side application; if the request caller is a secure virtual machine side application, carrying out application identity authentication and startup mode switching instruction signature verification according to the startup mode switching instruction; And when the application identity authentication and the starting mode switching instruction check-up succeed, responding to a starting mode writing-in request.
- 4. The method for debugging Microdroid of claim 3, wherein performing application identity authentication and signature verification of the start mode switch command according to the start mode switch command comprises: Analyzing corresponding application identity information according to the process identification of the starting mode switching instruction; and verifying the application identity information and the application information preset in the secure storage area by using the preset instruction verification certificate so as to verify whether the instruction request is from legal application.
- 5. A method of debugging a Microdroid system according to claim 3, wherein when the application identity authentication and the initiation mode switch instruction verification is successful, responding to an initiation mode write request comprises: decrypting the starting mode switching instruction by using a preset decryption key to obtain instruction signature data; Analyzing a signature working certificate from the instruction signature data, checking the signature working certificate with a preset instruction verification certificate chain, and if the verification is passed, carrying out identity authentication and instruction signature verification on an initiator of an instruction in the signature working certificate; And if the verification sign passes, storing the starting mode identification in a safe storage area.
- 6. The method for debugging Microdroid of claim 1, wherein if the startup mode identifier stored in the secure storage area is a debug mode, querying preset device information, and obtaining a debug authorization code of a user, and checking the debug authorization code by using the device information, the checking whether the user is allowed to debug the device comprises: Extracting a device unique identifier and a debug-allowed expiration time from the device information preset in the secure storage area; judging whether the expiration time of the allowable debugging is expired or not according to the current time, if the expiration time of the allowable debugging is expired, requesting to acquire a debugging authorization code of a user, and checking the debugging authorization code by utilizing the equipment information; And if the current time is within the expiration time allowing debugging, allowing the user to debug the equipment.
- 7. The method of claim Microdroid of claim 6, wherein requesting acquisition of a user's debug authorization code and verifying the debug authorization code with the device information comprises: if the device unique identifier in the debugging authorization code is successfully compared with the device unique identifier in the device information, the verification is successful; and after the verification is successful, storing the debugging authorization code in the safe storage area.
- 8. The Microdroid system debugging method of claim 7, wherein storing the debugging authorization code in the secure memory area after verification is successful comprises: Encrypting the unique identifier of the equipment and the authorization time in the debugging authorization code by utilizing an encryption key which is preset in the secure storage area; And sending the encrypted equipment unique identifier and the encrypted authorization time to the secure storage area, decrypting the equipment unique identifier and the encrypted authorization time according to a decryption key preset in the secure storage area, and if the equipment unique identifier and the encrypted authorization time pass the decryption, updating the expiration time of the allowable debugging in the equipment information according to the authorized time.
- 9. A Microdroid system commissioning device, the device comprising: The starting mode switching triggering module receives a starting mode switching instruction request, performs signature verification on the instruction request by using a preset instruction signature verification certificate, and stores a starting mode identifier in a safe storage area after the signature verification is successful; The debugging authorization request module is used for inquiring preset equipment information and acquiring a user debugging authorization code if the starting mode identifier stored in the secure storage area is a debugging mode, checking the debugging authorization code by using the equipment information and checking whether the user is allowed to debug the equipment; The system comprises a secure storage area, a starting management module and a system management module, wherein the secure storage area is used for storing a starting mode identifier of the device, the starting management module is used for allowing a user to debug the device, starting Microdroid the system according to the debugging mode, starting Microdroid the system according to the normal mode if the starting mode identifier stored in the secure storage area is the normal mode, and starting Microdroid the system according to the starting mode in the static configuration mirror image file if the starting mode identifier does not exist in the secure storage area.
- 10. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor implements the steps of the Microdroid system debugging method of any one of claims 1-8 when the computer program is executed by the processor.
Description
Microdroid system debugging method and device and electronic equipment Technical Field The invention relates to the Microdroid system debugging field, in particular to a Microdroid system debugging method, a Microdroid system debugging device and electronic equipment. Background In the prior art, two debugging modes of Microdroid systems are provided, one is that the debugging mode is manually set in a configuration mirror image file of the Microdroid system, the configuration mirror image is required to be recompiled after the content of the configuration file is changed and updated to a device to start the Microdroid system, the static setting mode is inflexible and does not accord with an application scene requiring flexible switching of the debugging mode, the other is that a command line tool is used, the Microdroid system can be started in the debugging mode temporarily by setting the mode of the Microdroid system as the debugging mode, but only the current starting is effective, the current starting is invalid when the Microdroid system is restarted again, the mode can be switched to the debugging mode only by clicking a popup window authorization of a host computer when a user is debugged for the first time, namely any person can switch to the debugging mode, and the safety degree is insufficient when the scene requiring strong control of the debugging capability of the device such as a financial payment terminal. Disclosure of Invention The invention aims to solve the technical problem of providing a Microdroid system debugging method, a Microdroid system debugging device and electronic equipment, and realizing a debugging mode which can be flexibly set and safely control a Microdroid system. In order to solve the technical problems, the invention adopts a technical scheme that: A Microdroid system debugging method, applied to an electronic device, the method comprising: Receiving a starting mode switching instruction request, checking a signature of the instruction request by using a preset instruction signature verification certificate, and storing a starting mode identifier in a safe storage area after the signature verification is successful; if the starting mode identifier stored in the secure storage area is a debugging mode, inquiring preset equipment information, acquiring a debugging authorization code of a user, checking the debugging authorization code by using the equipment information, and checking whether the user is allowed to debug the equipment; if the user is allowed to debug the equipment, starting Microdroid the system according to the debug mode; If the starting mode identifier stored in the secure storage area is a normal mode, starting Microdroid the system according to the normal mode; If the secure storage area does not have the startup mode identifier, the system is started Microdroid according to the startup mode in the static configuration image file. In order to solve the technical problems, the invention adopts another technical scheme that: an apparatus, comprising: The starting mode switching triggering module receives a starting mode switching instruction request, performs signature verification on the instruction request by using a preset instruction signature verification certificate, and stores a starting mode identifier in a safe storage area after the signature verification is successful; The debugging authorization request module is used for inquiring preset equipment information and acquiring a user debugging authorization code if the starting mode identifier stored in the secure storage area is a debugging mode, checking the debugging authorization code by using the equipment information and checking whether the user is allowed to debug the equipment; The system comprises a secure storage area, a starting management module and a system management module, wherein the secure storage area is used for storing a starting mode identifier of the device, the starting management module is used for allowing a user to debug the device, starting Microdroid the system according to the debugging mode, starting Microdroid the system according to the normal mode if the starting mode identifier stored in the secure storage area is the normal mode, and starting Microdroid the system according to the starting mode in the static configuration mirror image file if the starting mode identifier does not exist in the secure storage area. In order to solve the technical problems, the invention adopts another technical scheme that: An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, the processor implementing the steps of the Microdroid system debugging method described above when executing the computer program. The method has the advantages that the method receives the starting mode switching instruction request, and performs signature verification on the instruction request by using the preset instruction s