A method for starting a subsystem, an electronic device and a chip system
By directly launching subsystem applications from the main system interface and encrypting data using a security chip, the problems of cumbersome subsystem startup and insufficient security are solved, achieving fast and efficient subsystem startup and data access.
Patent Information
- Application Number
- CN202310862263.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2043-07-12
AI Technical Summary
The startup methods for secondary systems in existing electronic devices are cumbersome, inefficient, and lack user data security.
By displaying subsystem application icons or controls on the main system interface, subsystem applications can be launched directly. The main system can also mount the subsystem's storage space and use a security password generated by a security chip to encrypt the data, thereby improving startup speed and security.
It enables rapid startup of subsystems and efficient data access, and improves the security of user data, especially when the system is not rooted.
Smart Images

Figure CN119311321B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of dual-system technology, and more particularly to a method for starting a subsystem, an electronic device, and a chip system. Background Technology
[0002] Electronic devices offer a wide range of functions, and users are increasingly reliant on them for work and daily life; therefore, these devices store a significant amount of personal data. To enhance user data privacy and security, many electronic devices support dual systems: a primary system for daily use and a secondary system for privacy purposes.
[0003] Currently, the main system and the secondary system are two separate systems, each with its own independent desktop, wallpaper, and storage space. To access the secondary system, the device must be locked, and the secondary system's lock screen password must be entered before it can be launched. Since the secondary system is independent of the main system, it also needs to perform operations such as loading the desktop and wallpaper. Understandably, this method of launching the secondary system is rather cumbersome and inefficient. Summary of the Invention
[0004] This application provides a subsystem startup method, electronic device, and chip system, which can provide a subsystem application with independent storage space running in the main system. This subsystem application has a simple startup method and a high startup speed.
[0005] To achieve the above objectives, this application adopts the following technical solution:
[0006] In a first aspect, this application provides a method for starting a subsystem, including:
[0007] The electronic device displays the interface of the main system, which includes the system desktop or the settings interface of the main system.
[0008] The electronic device receives a first operation performed on the interface of the main system;
[0009] In response to the first operation, the electronic device launches a subsystem application through the main system;
[0010] During the process of launching the subsystem application through the main system, the electronic device mounts the first storage space corresponding to the subsystem application through the main system;
[0011] The electronic device displays the main interface of the subsystem application. The main interface includes a first control, which displays the icon of the first application. The first control is used to launch the first application in the subsystem application.
[0012] In this application, the subsystem implements its functions as an application. When a user starts the subsystem, it can be launched from the interface of the main system; and the subsystem is launched through the main system. After the subsystem is launched, its main interface is displayed, and the icon of the first application in the subsystem is displayed through the main interface to launch the first application in the subsystem. Since the subsystem is launched as an application, it is faster than launching the system. Therefore, this method of launching the subsystem is more efficient.
[0013] As one implementation of this application, the interface of the main system is the system desktop of the main system, and the icons of the subsystem applications are displayed on the interface of the main system. The first operation is an operation performed on the icons of the subsystem applications.
[0014] This application allows you to set icons for subsystem applications on the main system's desktop, thereby enabling you to launch subsystem applications via these icons.
[0015] As another implementation of the first aspect of this application, the interface of the main system includes a settings interface of the main system, and the settings interface of the main system includes a second control. The second control is used to open the subsystem application, and the first operation is an operation performed on the second control.
[0016] This application also allows users to launch subsystem applications via controls in the settings interface.
[0017] As another implementation of the first aspect of this application, the subsystem application does not have a desktop and wallpaper. During the process of launching the subsystem application through the main system, the method further includes:
[0018] The electronic device does not load the desktop and the wallpaper;
[0019] The electronic device does not set the root container of the main system to empty.
[0020] In this application, since the subsystem is an application-based system, there is no need to set a desktop and wallpaper, nor is it necessary to set the root container of the main system to be empty.
[0021] As another implementation of the first aspect of this application, the electronic device includes a main chip and a security chip, the main chip is used to run the main system, and the user data in the first storage space is encrypted or decrypted by the master key of the electronic device.
[0022] As another implementation of the first aspect of this application, the main system includes a system kernel and a control module for the memory of the electronic device; the electronic device also includes a first TEE system, and the method further includes:
[0023] The subsystem application obtains the security password from the security chip;
[0024] The subsystem application sends the security password to the first TEE system;
[0025] After receiving the security password, the first TEE system encrypts the DE key stored in the first TEE based on the security password to generate a security key;
[0026] The first TEE system sends the security key to the system kernel;
[0027] After receiving the security key, the system kernel stores the security key in the system kernel.
[0028] In this application, the security password is generated by a security chip, providing higher security. The security password is then sent to the first TEE system to encrypt the DE key, resulting in a higher level of security for the obtained security key. Therefore, the security of user data in the subsystem can be improved.
[0029] As another implementation of the first aspect of this application, when the electronic device displays the main interface of the subsystem application, the method further includes:
[0030] The electronic device receives a second operation, which is to launch the first application through the first control and access the first data through the first application.
[0031] In response to the second operation, the first application sends the access request to the system kernel;
[0032] After receiving the access request, the system kernel sends the security key to the first TEE system and sends the access request to the control module of the memory.
[0033] After receiving the security key, the first TEE system obtains the key plaintext based on the security key and sends the key plaintext to the control module of the memory;
[0034] After receiving the access request sent by the system kernel and the plaintext key sent by the first TEE system, the control module of the memory generates plaintext data of the first data based on the plaintext key and the ciphertext data of the first data stored in the memory.
[0035] The control module of the memory sends the plaintext data of the first data to the system kernel;
[0036] After receiving the plaintext data of the first data, the system kernel sends the plaintext data of the first data to the first application.
[0037] In this application, when there is a data access request, the master key of the user data in the encrypted storage space can only be decrypted based on the security password. Therefore, it can be applied to improve the security of subsystems that cannot set a lock screen password and only have a DE key.
[0038] As another implementation of the first aspect of this application, the first TEE system obtains the key plaintext based on the security key, including:
[0039] The first TEE system obtains the DE key based on the security password and the security key;
[0040] The first TEE system generates the key plaintext based on the DE key.
[0041] In this application, the first TEE system, which generates a secure password, can reverse-engineer a DE key based on the secure password and the secure key when data is accessed. Then, based on the DE key, a plaintext key for decrypting user data can be generated.
[0042] As another implementation of the first aspect of this application, the main chip further includes a second TEE system, wherein the subsystem application obtains the security password from the security chip in the following ways:
[0043] The subsystem application sends a request to the second TEE system to obtain the security password;
[0044] After receiving the acquisition request, the second TEE system sends the security password acquisition request to the security chip;
[0045] After receiving the acquisition request, the security chip generates the security password based on the acquisition request;
[0046] The security chip sends the security password to the second TEE system;
[0047] After receiving the security password, the second TEE system sends it to the subsystem application;
[0048] The subsystem application receives the security password.
[0049] In order to adapt to the communication and information exchange with the security chip, this application also sets up a second TEE system, which is modified without changing the original first TEE system.
[0050] As another implementation of the first aspect of this application, before the second TEE system sends the security password acquisition request to the security chip, the method further includes:
[0051] The second TEE system performs a root detection on the electronic device to determine that the electronic device has not been rooted.
[0052] In this application, since electronic devices are vulnerable to attack after being rooted, in order to further improve security, the security password is only obtained when the device is not rooted.
[0053] As another implementation of the first aspect of this application, the control module of the memory generates plaintext data of the first data based on the plaintext key and the ciphertext data of the first data stored in the memory, including:
[0054] The control module of the memory retrieves the encrypted data of the first data from the first storage space based on the access request of the first data.
[0055] The control module of the memory decrypts the ciphertext data of the first data based on the plaintext key, and generates the plaintext data of the first data.
[0056] As one implementation of the first aspect, the first TEE system and the second TEE system are the same TEE system.
[0057] In this application, the first TEE system is usually a higher-level execution environment than the operating system that comes with the main chip platform, while the second TEE system is a higher-level execution environment than the operating system that is self-developed to adapt to various functions of electronic devices. These two execution environments can also exist as different modules in one execution environment.
[0058] In a second aspect, an electronic device is provided, including a main chip and a security chip, the main chip and the security chip being used to run a computer program stored in a memory to implement the method of any one of the first aspects of this application.
[0059] Thirdly, a chip system is provided, including a main chip coupled to a memory, wherein the main chip executes a computer program stored in the memory to implement the method of any one of the first aspects of this application.
[0060] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by one or more processors, implements the method of any one of the first aspects of this application.
[0061] Fifthly, embodiments of this application provide a computer program product that, when run on a device, causes the device to execute the method of any one of the first aspects of this application.
[0062] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0063] Figure 1 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application;
[0064] Figure 2 A schematic diagram illustrating the process of generating and installing a DE key when an electronic device is powered on for the first time, as provided in an embodiment of this application;
[0065] Figure 3 A flowchart illustrating a data access method without a lock screen password, provided in an embodiment of this application;
[0066] Figure 4 A schematic diagram illustrating the process of generating and installing a CE key when setting a lock screen password, provided in an embodiment of this application;
[0067] Figure 5 A flowchart illustrating a data access method with a lock screen password provided in an embodiment of this application;
[0068] Figure 6 A schematic diagram illustrating a process for generating and installing security keys for a subsystem, provided as an embodiment of this application;
[0069] Figure 7 A flowchart illustrating a method based on a security key, provided as an embodiment of this application;
[0070] Figure 8 A timing diagram for starting a secondary system provided in an embodiment of this application;
[0071] Figure 9 This is a timing diagram of a startup subsystem provided in an embodiment of this application. Detailed Implementation
[0072] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limiting purposes, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details.
[0073] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0074] It should also be understood that in the embodiments of this application, "one or more" refers to one, two, or more; "and / or" describes the relationship between the associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following associated objects have an "or" relationship.
[0075] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," "fourth," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0076] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0077] This application provides a subsystem startup method that can be applied to electronic devices to improve the security of user data. These electronic devices can be tablets, mobile phones, wearable devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), and other similar devices. This application does not limit the specific type of electronic device.
[0078] Figure 1A schematic diagram of an electronic device is shown. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a touch sensor 180K, an ambient light sensor 180L, etc.
[0079] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0080] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a sensor coprocessor (SCP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. For example, processor 110 is used to execute the startup method of the subsystem in the embodiments of this application.
[0081] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.
[0082] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0083] The processor can be the main chip, or it can include both a main chip and a security chip.
[0084] USB interface 130 is an interface that conforms to the USB standard specification, specifically it can be a Mini USB interface, Micro USB interface, USB Type C interface, etc. USB interface 130 can be used to connect a charger to charge electronic device 100, and it can also be used for data transfer between electronic device 100 and peripheral devices.
[0085] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0086] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.
[0087] Internal memory 121 can be used to store executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback, image playback, etc.).
[0088] In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0089] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130.
[0090] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.
[0091] In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be located in the same device.
[0092] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0093] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.
[0094] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1.
[0095] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0096] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with networks and other devices through wireless communication technology.
[0097] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0098] The audio module 170 is used to convert digital audio signals into analog audio signals for output, and also to convert analog audio inputs into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0099] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.
[0100] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0101] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to monitoring voice messages, can also perform noise reduction. In other embodiments, electronic device 100 may have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify sound sources, and perform directional recording, etc. Headphone jack 170D is used to connect wired headphones. Headphone jack 170D can be a USB interface 130, or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, or a Cellular Telecommunications Industry Association of the USA (CTIA) standard interface.
[0102] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch operation intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A.
[0103] Touch sensor 180K, also known as a "touch panel," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touch screen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.
[0104] The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touches.
[0105] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.
[0106] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.
[0107] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0108] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a minimized display, a microLED, a micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.
[0109] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0110] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0111] This application does not specifically limit the specific structure of the execution entity of a subsystem startup method. As long as the code recording the startup method of a subsystem according to this application can be run, communication can be performed according to the startup method of the subsystem provided in this application. For example, the execution entity of the startup method of a subsystem provided in this application can be a functional module in an electronic device capable of calling and executing programs, or a communication device applied in an electronic device, such as a main chip, or a chip module composed of a main chip and a security chip.
[0112] Currently, many electronic devices support rich execution environment (REE) and trusted execution environment (TEE).
[0113] REE execution environments are typically used to run general-purpose operating systems, such as Android. The operating system, in turn, provides basic functionality and computing resources for installed applications. While REE execution environments can provide system security, their large size makes comprehensive security checks and certifications difficult. Therefore, REE execution environments are relatively vulnerable to attacks. In this application's embodiments, the REE execution environment can be equated to an operating system or main system.
[0114] The TEE Execution Environment is a secure area on the central processing unit (main chip) used for digital rights management, mobile payments, and sensitive data protection. Sensitive data is processed within this secure area, thus protecting it from software attacks originating from the TEE Execution Environment. Typically, some key data can be stored within the TEE Execution Environment.
[0115] To improve the security of data in electronic devices, these devices can provide device encryption capabilities.
[0116] Reference Figure 2 The diagram shown is a schematic representation of the process for generating and installing a DE key when an electronic device is powered on for the first time, as provided in an embodiment of this application.
[0117] Typically, when an electronic device is powered on for the first time after leaving the factory (or the first time after a factory reset), it generates a master key for memory encryption. The user data stored in the device's memory is encrypted using this master key (ciphertext data); the encrypted data stored in memory must be decrypted using the master key to obtain the decrypted data (plaintext data). The electronic device encrypts this master key based on its unique identifier (e.g., device serial number) to obtain a hardware-specific DE key (Device Encryption master key). This DE key is generated by KeyMasterTA in the TEE execution environment and stored in the system kernel.
[0118] Reference Figure 2 As shown, the main system of the main chip is configured with a user layer, a kernel layer and a hardware layer. In this embodiment, there is also a TEE execution environment (which can be referred to as the first TEE execution environment or the first TEE system) provided by the main chip.
[0119] The user layer includes the application layer and the application framework layer. The application layer contains multiple upper-layer applications. This embodiment uses application 1 located in the main system and the lock screen application as examples. In practical applications, the application layer can contain more applications; of course, the lock screen application may not exist.
[0120] The application framework layer contains UserManager, StorageManager, and VOID. UserManager is a user management class, a tool that manages different users on electronic devices, such as the main system (master user). StorageManager is a software or system service that improves data reliability by managing the storage resources of electronic devices. VOID enables key transactions.
[0121] Fscrypt and Keyring exist at the kernel level.
[0122] Fscrypt is a general-purpose file system encryption module that supports F2FS / ext4 file systems.
[0123] Keyring can store keys.
[0124] As an example of the process of generating DE keys and storing DE keys in the system kernel:
[0125] When an electronic device is powered on for the first time, UserManager sends a command to StorageManager to prepare user storage space.
[0126] Upon receiving this instruction, StorageManager sends a command to VOID to prepare user storage space.
[0127] After receiving the instruction to prepare user storage space, VOID requests the DE key for creating the storage space from KeyMasterTA in the first TEE execution environment.
[0128] In the first TEE execution environment, KeyMasterTA creates a master key, and then encrypts the master key based on the unique identifier of the electronic device to generate a DE key.
[0129] Following this step, KeyMasterTA in the first TEE execution environment generates and stores the DE key.
[0130] After VOID obtains the DE key from KeyMasterTA, it stores the DE key in Keyring via Fscrypt.
[0131] At this point, the DE key is stored in the system kernel's Keyring.
[0132] Once the DE key is stored in the Keyring, users may store user data in the memory during subsequent use of electronic devices. For example, images taken by the camera of an electronic device, or files received through instant messaging applications. This user data is encrypted using the master key when stored in memory. When a user needs to view this data, the master key is used to decrypt the encrypted data stored in memory, generating the plaintext data. Only then can the user view this user data. Furthermore, the master key used to decrypt the encrypted user data in memory is the plaintext key generated by reversing the DE key stored in the Keyring.
[0133] Reference Figure 3 The flowchart shown in the embodiment illustrates a data access method based on DE key decryption.
[0134] At the kernel level, there exist F2FS / ext4, Blockcrypto, and UFSDriver.
[0135] F2FS (Flash-Friendly File System) and ext4 are both file systems. Blockcrypto is used to transmit access requests to lower layers and plaintext data of user data to upper layers, while UFSDriver is the driver for UFS type of storage.
[0136] In this process, access requests from upper-layer applications can be received through the kernel layer's F2FS / ext4 and then transmitted to the UFSDriver via Blockcrypto.
[0137] At the kernel level, there are also KeyslotManager, UFScrypto, and Commoncryptolib.
[0138] KeyslotManager acts as a key manager bridge between the VFS layer and the memory driver layer in the system kernel, enabling the transfer of keys between the VFS layer and the memory driver.
[0139] UFScrypto can achieve a wide range of features to provide differentiated solutions for electronic device manufacturers.
[0140] Commoncryptolib is used to communicate with the TZ ICE Driver in the first TEE execution environment.
[0141] UFScrypto can transmit the DE key transmitted to the memory driver layer to the TZ ICE Driver in the first TEE execution environment via Commoncryptolib for decryption, thus obtaining the plaintext key.
[0142] At the hardware layer, there exists a UFS control module and a UFS physical storage, which stores encrypted user data.
[0143] The UFS control module is used to decrypt encrypted data of accessed user data. It is also used to encrypt plaintext data to be stored in physical storage before storing it.
[0144] As an example of a data access method based on DE key decryption:
[0145] When a user opens application 1 (e.g., gallery, file manager, etc.) and opens the gallery to view pictures in the gallery (or opens the file manager application to view stored files, or sends data stored in the local storage to a friend via an instant messaging application), application 1 receives a data access request. For ease of description, the access data corresponding to this access request can be denoted as data A.
[0146] Application 1 sends the access request to F2FS / ext4 in the system kernel layer.
[0147] After receiving the access request, the F2FS / ext4 kernel layer sends messages to both branches.
[0148] The first branch: F2FS / ext4 transmits the access request to the lower layer. This access request is transmitted to HW ICE in the hardware layer through BlockCrypto and UFSDriver. HW ICE, as the control module of the physical memory in the hardware layer, can obtain the ciphertext data (i.e., the encrypted data after being encrypted with the master key) of data A pointed to by the access request from the memory.
[0149] The second branch: F2FS / ext4 transmits a decryption request to Fscrypt; upon receiving the decryption request, Fscrypt transmits it to Keyring; upon receiving the decryption request, Keyring transmits the stored DE key through KeyslotManager, UFScrypto, and Commoncryptolib to the TZ ICEDriver in the first TEE execution environment. As mentioned earlier, the DE key is generated by KeyMasterTA in the first TEE execution environment. Therefore, the TZ ICE Driver, also in the first TEE execution environment, can decrypt based on the previous encryption process to obtain the master key (key master) before the DE key was generated, which can also be understood as the plaintext key. The TZ ICEDriver in the first TEE execution environment sends the generated plaintext key to HW ICE in the memory control module.
[0150] After the first and second branches are completed, HW ICE has obtained the ciphertext data of data A corresponding to the access request and the master key for encrypting the plaintext data of the user data. Therefore, HW ICE can decrypt the ciphertext data of data A based on the master key to generate the plaintext data of data A (i.e., the decrypted data of the user data).
[0151] HW ICE transmits the plaintext data of data A to the upper layer. After passing through UFSDriver, BlockCrypto, and F2FS / ext4, it can be transmitted to application 1. Users can view the plaintext data of data A corresponding to the access request through application 1.
[0152] This data access method using DE key decryption explains that when electronic device A is damaged (e.g., unable to power on, but with intact memory), its memory (e.g., memory A) can be removed and installed on another electronic device B. The TEE execution environment of electronic device B decrypts the DE key on B to obtain the plaintext key B, which is the plaintext key B of electronic device B, not the plaintext key A of memory A. Therefore, the HWICE in memory A cannot decrypt the user data encrypted with plaintext key A in memory A using plaintext key B. This improves the security of user data in the memory.
[0153] However, even if electronic device A is lost and still functioning normally, other users can still access it and directly access the user data in the memory using the aforementioned method, resulting in relatively low security for the user data in the memory.
[0154] Therefore, to enhance the security of user data in memory, many electronic devices have a screen lock password. This screen lock password is used to access the corresponding system when the screen is locked. For example, when the main chip of an electronic device only has the main system, this screen lock password is the password to access the main system when the electronic device is locked.
[0155] Reference Figure 4 This is a schematic diagram illustrating the process of generating and installing a CE key when setting a lock screen password, as provided in an embodiment of this application.
[0156] Typically, users enter a lock screen password through the lock screen password settings interface of the lock screen application. The electronic device can then generate a CE key based on the user-input lock screen password and store it.
[0157] Reference Figure 4 As shown, after a user enters their lock screen password in the lock screen app's password settings interface on their electronic device, and every time they subsequently log into the main system using the lock screen password, the following operations are performed:
[0158] The lock screen application located at the application layer transmits the user-entered lock screen password to KeyMasterTA in the first TEE execution environment via StorageManager and VOID.
[0159] In the first TEE execution environment, KeyMasterTA encrypts the DE key based on the lock screen password, generates the CE key, and stores it.
[0160] After VOID obtains the CE key from KeyMasterTA, it stores the CE key in Keyring via Fscrypt.
[0161] At this point, the CE key is stored in the system kernel's Keyring.
[0162] Once the CE key is stored in the keyring, users may store user data in the memory or access the stored user data during subsequent use of the electronic device. The data stored in memory is still encrypted with the master key; that is, regardless of whether there is a screen lock password, the user data stored in memory is encrypted with the master key. However, when there is no screen lock password, the master key is obtained by decrypting the CE key using the DE key. When there is a screen lock password, the DE key is obtained by decrypting the CE key using the screen lock password, and then the master key is obtained by decrypting the DE key using the DE key. Because when there is a screen lock password, the data access method using the DE key is improved compared to the method without a screen lock password. Furthermore, the process of generating the DE key from the CE key requires the screen lock password parameter, so even if the user's electronic device is lost, an additional layer of screen lock password protection is provided, further enhancing data security.
[0163] Reference Figure 5 The flowchart shown in the embodiment illustrates a data access method based on CE key decryption.
[0164] When a user opens application 1 (e.g., gallery, file manager, etc.) and opens the gallery to view pictures in the gallery (or opens the file manager application to view stored files, or sends data stored in the local storage to a friend via an instant messaging application), application 1 receives a data access request. For ease of description, the access data corresponding to this access request can be denoted as data A.
[0165] Application 1 sends the access request to F2FS / ext4 in the system kernel layer.
[0166] After receiving the access request, the F2FS / ext4 kernel layer sends messages to both branches.
[0167] The first branch: F2FS / ext4 transmits the access request to the lower layer. This access request is transmitted to HW ICE in the hardware layer through BlockCrypto and UFSDriver. HW ICE, as the control module of the physical memory in the hardware layer, can obtain the ciphertext data (i.e., the encrypted data after being encrypted with the master key) of data A pointed to by the access request from the memory.
[0168] The second branch: F2FS / ext4 transmits a decryption request to Fscrypt; upon receiving the decryption request, Fscrypt transmits it to Keyring; upon receiving the decryption request, Keyring transmits the stored CE key through KeyslotManager, UFScrypto, and Commoncryptolib to the TZ ICEDriver in the first TEE execution environment. As mentioned earlier, the CE key is generated by KeyMasterTA in the first TEE execution environment. Therefore, the TZ ICE Driver, also in the first TEE execution environment, can decrypt based on the previous encryption process, thereby obtaining the DE key before the CE key was generated based on the lock screen password. As mentioned earlier, the DE key is also generated in the first TEE execution environment. Therefore, the TZ ICE Driver can also generate the master key (key master), i.e., the plaintext key, based on the DE key. The TZ ICE Driver in the first TEE execution environment sends the generated plaintext key to the HW ICE in the memory control module.
[0169] After the first and second branches are completed, HW ICE has obtained the ciphertext data of data A corresponding to the access request and the master key for encrypting the plaintext data of the user data. Therefore, HW ICE can decrypt the ciphertext data of data A based on the master key to generate the plaintext data of data A (i.e., the decrypted data of the user data).
[0170] HW ICE transmits the plaintext data of data A to the upper layer. After passing through UFSDriver, BlockCrypto, and F2FS / ext4, it can be transmitted to application 1. Users can view the plaintext data of data A corresponding to the access request through application 1.
[0171] This data access method demonstrates that, compared to the data access method for the DE key without a lock screen password, the data access method for the CE key with a lock screen password further enhances the security of data in the memory.
[0172] Typically, the screen lock password is related to the operating system of the electronic device. For example, when an electronic device stores a primary system (corresponding to the primary user) and a secondary system (corresponding to another user or secondary user), the secondary system is a private system. Therefore, the primary and secondary systems are isolated. If the primary system has a screen lock password, the secondary system can also have a screen lock password. This allows access to the corresponding system using their respective screen lock passwords, thereby improving the security of data within each system. For instance, if a user knows the primary system's screen lock password but not the secondary system's screen lock password, they can only access the primary system.
[0173] In addition, the DE key of the main system and the DE key of the sub-system are the same. However, the CE keys of the two systems are different. Therefore, the DE key is obtained from the lock screen password and CE key of the main system in the main system, and the DE key is obtained from the lock screen password and CE key of the sub-system in the sub-system. As a result, the main system and the sub-system cannot access the user data of the other system.
[0174] This application provides a subsystem, which is a subsystem application installed within the storage space of the main system. That is, the subsystem application resides in the application layer of the main system, and its operation depends on the support of the main system. Therefore, this subsystem is a privacy space within the main system, existing only as an application. The subsystem has its own independent storage space, and the data in this storage space is encrypted using a master key. Although the subsystem application can set a login password, it cannot set a corresponding lock screen password. Since the main system has a lock screen password, and the subsystem cannot set a lock screen password, the user data corresponding to the subsystem is effectively protected by a DE key with a lower security level. Therefore, the security of user data in the subsystem's storage space is relatively low.
[0175] Therefore, embodiments of this application provide a more secure data access method for subsystem applications.
[0176] Reference Figure 6 This is a schematic diagram illustrating the process of generating and installing security keys based on a security chip, as provided in an embodiment of this application. The electronic device also includes a security chip. Another TEE execution environment is also provided in the main chip. This other TEE execution environment is referred to as the second TEE execution environment.
[0177] Of course, in practical applications, two TEE execution environments can also be merged into the same TEE execution environment, and this application embodiment does not limit this.
[0178] A security chip (Secure Processing Unit, SPU) is a device that can generate keys independently. It has its own processor and storage unit, which can store keys and provide encryption and security authentication services for electronic devices.
[0179] This security chip can communicate with the main chip (central processing unit) of electronic devices. The main chip can store sensitive information in the security chip, which provides a high level of security.
[0180] Based on the above description, it can be understood that the main chip of the electronic device is equipped with an REE execution environment, a first TEE execution environment, and a second TEE execution environment, and the electronic device is also equipped with a security chip.
[0181] The REE execution environment runs the general operating system of this electronic device, such as the main system: Android operating system.
[0182] The main chip also supports a first-level TEE execution environment to further enhance the security of electronic devices. For example, keys can be protected.
[0183] The main chip also supports a second TEE execution environment to establish a communication connection with the security chip, thereby enabling the security chip to provide a higher level of protection for electronic devices.
[0184] The second TEE execution environment includes HUKS TA and ROOT detection TA. HUKS TA is used to trigger ROOT detection TA to perform ROOT detection on electronic devices to determine whether the electronic devices have been rooted.
[0185] The security chip contains a secure storage applet that can generate secure passwords.
[0186] Currently, the security level of the security chip is higher than that of the TEE execution environment (first TEE execution environment and second TEE execution environment), and the security level of the TEE execution environment is higher than that of the REE execution environment.
[0187] In a specific implementation of this application embodiment, after the login password is set for the first time the subsystem is created and after the login password is entered each time the subsystem is opened, the login password is first verified. After the login password is successfully verified, the subsystem application requests a security password from HUKS TA in the second TEE execution environment.
[0188] After receiving the request, HUKS TA will use ROOT detection TA to test the electronic device.
[0189] If the electronic device is confirmed not to be rooted, HUKS TA requests a security password from the secure storage applet in the security chip.
[0190] If the electronic device is determined to be rooted, HUKS TA will no longer request a security password from the secure storage applet in the security chip.
[0191] After receiving a security password request, the security chip generates a security password and sends it to HUKS TA in the second TEE execution environment within the main chip. Upon receiving the security password, HUKS TA forwards it to the subsystem application.
[0192] As an upper-layer application, the subsystem application executes a similar process upon receiving the security password as the lock screen application in the above embodiment executes upon receiving the lock screen password corresponding to the subsystem.
[0193] The subsystem application located at the application layer transmits the received secure password to KeyMasterTA in the first TEE execution environment via StorageManager and VOID.
[0194] In the first TEE execution environment, KeyMasterTA encrypts the DE key based on a secure password, generates a secure key, and stores it.
[0195] After obtaining the security key from KeyMasterTA, VOID stores the security key in Keyring via Fscrypt.
[0196] At this point, the security key is stored in the system kernel's Keyring.
[0197] Once the security key is stored in the Keyring, users may subsequently access user data corresponding to the subsystem application in the subsystem's corresponding storage area or in the memory during electronic device use. The data stored in the memory is still encrypted with the master key; that is, regardless of whether there is a screen lock password, the user data stored in the memory is encrypted with the master key. However, within the subsystem, when there is no screen lock password, the master key is obtained by decrypting using the DE key. When a security password is set, the DE key is obtained by decrypting using the security password and the security key, and then the master key is obtained by decrypting using the DE key. Because with a security password, the security key must first be decrypted using the security password to obtain the DE key, and then the DE key is decrypted to obtain the master key. This improves data security compared to data access methods without a screen lock password or a security password (DE key).
[0198] Reference Figure 7 The flowchart shown in the embodiment illustrates a data access method based on a security key.
[0199] When a user opens application 2 (e.g., the gallery or file manager in a subsystem application), and the user opens the gallery to view the pictures in the gallery (or opens the file manager application to view the stored files, or sends data stored in the local storage to a friend through an instant messaging application), application 2 receives a data access request. For ease of description, the access data corresponding to this access request can be denoted as data B.
[0200] Application 2 sends an access request to F2FS / ext4 in the system kernel layer.
[0201] After receiving the access request, the F2FS / ext4 kernel layer sends messages to both branches.
[0202] The first branch: F2FS / ext4 transmits the access request to the lower layer. This access request is transmitted through BlockCrypto and UFSDriver to the HWICE in the hardware layer. As the control module of the physical memory in the hardware layer, HWICE can obtain the ciphertext data (i.e., the encrypted data after being encrypted with the master key) of the data B pointed to by the access request from the user data area of the memory subsystem.
[0203] The second branch: F2FS / ext4 transmits a decryption request to Fscrypt; upon receiving the decryption request, Fscrypt transmits it to Keyring; upon receiving the decryption request, Keyring transmits the stored security key through KeyslotManager, UFScrypto, and Commoncryptolib to the TZ ICEDriver in the first TEE execution environment. As mentioned earlier, the security key is generated by KeyMasterTA in the first TEE execution environment. Therefore, the TZ ICE Driver, also in the first TEE execution environment, can decrypt based on the previous encryption process, thereby obtaining the DE key before the encryption of the security key based on the security password. As mentioned earlier, the DE key is also generated in the first TEE execution environment. Therefore, the TZ ICE Driver can also generate the master key (key master), i.e., the plaintext key, based on the DE key. The TZ ICE Driver in the first TEE execution environment sends the generated plaintext key to the HW ICE in the memory control module.
[0204] After the first and second branches are completed, HW ICE has obtained the ciphertext data of data B corresponding to the access request and the master key for encrypting the plaintext data of the user data; therefore, HW ICE can decrypt the ciphertext data of data B based on the master key to generate the plaintext data of data B (i.e., the decrypted data of the user data).
[0205] HW ICE transmits the plaintext data of data B to the upper layer. After passing through UFSDriver, BlockCrypto, and F2FS / ext4, it can be transmitted to application 2. Users can view the plaintext data of data B corresponding to the access request through application 2.
[0206] This data access method demonstrates that, compared to the data access method using a DE key without a lock screen password or security password, it further enhances the security of data in the memory. Therefore, this embodiment can be applied to subsystems where a lock screen password cannot be set, thereby improving the security of user data in those subsystems.
[0207] As another embodiment of this application, the data access method is applied to an electronic device including a main chip, a security chip, and a memory. The main chip includes a main system and a first TEE system. The main system includes a subsystem application, a system kernel, and a control module for the memory. A first application is installed in the subsystem application. A security key is stored in the system kernel. The memory stores encrypted data of the first data. The method includes:
[0208] After receiving the access request for the first data, the first application sends the access request to the system kernel;
[0209] After receiving the access request, the system kernel sends the security key to the first TEE system and sends the access request to the control module of the memory. The security key is generated by the first TEE system after encrypting the DE key based on the security password, and the security password is generated by the security chip.
[0210] After receiving the security key, the first TEE system obtains the key plaintext based on the security key and sends the key plaintext to the control module of the memory;
[0211] After receiving the access request sent by the system kernel and the plaintext key sent by the first TEE system, the control module of the memory generates plaintext data of the first data based on the plaintext key and the ciphertext data of the first data stored in the memory.
[0212] The control module of the memory sends the plaintext data of the first data to the system kernel;
[0213] After receiving the plaintext data of the first data, the system kernel sends the plaintext data of the first data to the first application.
[0214] In this embodiment, the first TEE system is the first TEE execution environment described in the above embodiments; the first application can be application 2 described in the above embodiments. The first data can also be user data in the subsystem.
[0215] As another embodiment of this application, before the first application receives the access request for the first data, the method further includes:
[0216] The main system installs the subsystem application within the main system.
[0217] The main system starts the subsystem application for the first time after it is installed.
[0218] After the subsystem starts, the first application is installed in the subsystem.
[0219] The subsystem launches the first application.
[0220] As another embodiment of this application, during the initial startup of the subsystem application by the main system, the method further includes:
[0221] The subsystem application obtains the security password from the security chip.
[0222] The subsystem application sends the security password to the first TEE system.
[0223] After receiving the security password, the first TEE system encrypts the DE key stored in the first TEE based on the security password to generate a security key.
[0224] The first TEE system sends the security key to the system kernel.
[0225] After receiving the security key, the system kernel stores the security key in the system kernel.
[0226] In another embodiment of this application, the first TEE system obtains the plaintext of the key based on the security key, including:
[0227] The first TEE system obtains the DE key based on the security password and the security key.
[0228] The first TEE system generates the key plaintext based on the DE key.
[0229] In another embodiment of this application, the main chip further includes a second TEE system, wherein the subsystem application obtains the security password from the security chip by:
[0230] The subsystem application sends a request to the second TEE system to obtain the security password.
[0231] After receiving the acquisition request, the second TEE system sends the security password acquisition request to the security chip.
[0232] After receiving the acquisition request, the security chip generates the security password based on the acquisition request.
[0233] The security chip sends the security password to the second TEE system.
[0234] After receiving the security password, the second TEE system sends it to the subsystem application.
[0235] The subsystem application receives the security password.
[0236] The second TEE system is the second TEE execution environment in the above embodiments.
[0237] As another embodiment of this application, before the second TEE system sends the security password acquisition request to the security chip, the method further includes:
[0238] The second TEE system performs a root detection on the electronic device to determine that the electronic device has not been rooted.
[0239] ROOT detection is used to determine whether an electronic device has been flashed or has been granted administrator privileges by other users.
[0240] In another embodiment of this application, the control module of the memory generates plaintext data of the first data based on the plaintext key and the ciphertext data of the first data stored in the memory, including:
[0241] The control module of the memory retrieves the encrypted data of the first data from the memory based on the access request of the first data.
[0242] The control module of the memory decrypts the ciphertext data of the first data based on the plaintext key, and generates the plaintext data of the first data.
[0243] In another embodiment of this application, the first TEE system and the second TEE system are the same TEE system.
[0244] As mentioned above, the subsystem provided in this application differs from the secondary system in current dual-system architectures. In current dual-system architectures, the primary system corresponds to the primary user, and the secondary system corresponds to the secondary user. The primary system user can use it for daily use, while the secondary system user can use it as a privacy system. During the use of both systems, the user can only access the system from the lock screen. For example, if a user is currently using system A and wants to switch to system B, the user needs to lock the electronic device and then access system B using the lock screen password. They cannot directly access system B while using system A, making system switching inconvenient.
[0245] The subsystem in this embodiment is not a subsystem completely parallel to the main system, but rather a subsystem application running in the application layer of the main system. This subsystem application has system functions; for example, after the subsystem application is started, it can display the main interface of the subsystem application, which can display icons of multiple applications installed within the subsystem application (e.g., instant messaging applications, camera applications, and game applications). Of course, the subsystem also has its own independent storage space, which can also store user data that is inaccessible under the main system but accessible only after entering the subsystem.
[0246] As can be understood from the above description, this subsystem can achieve similar functions to the subsystem in the above embodiments, and because it uses a secure key for decryption, it is more secure than the CE-class key used by the subsystem. Furthermore, the subsystem provided in this application embodiment has a more efficient startup method.
[0247] Reference Figure 8 This is the startup method for the secondary system in a dual-system configuration provided in this application embodiment.
[0248] Step A1: The lock screen app receives the password.
[0249] As mentioned earlier, when entering the secondary system, which has a similar startup process to the main system, you need to enter through the lock screen. That is, the user enters a password on the lock screen password input interface. If the password is the same as the main system lock screen password, you will enter the main system; if the password is the same as the secondary system lock screen password, you will enter the secondary system.
[0250] In step A2, the lock screen application confirms that the received password matches the secondary user's password.
[0251] If the received password matches the secondary user's password, proceed to the process of starting the secondary system.
[0252] Step B1: The lock screen application sends a command to UserController to switch to the secondary user.
[0253] In step C1, after receiving the instruction to switch to the secondary user, UserController sends a secondary user data preparation instruction to SystemServiceManager.
[0254] In step C2, after receiving the preparation instruction for the secondary user's data, SystemServiceManager performs preparatory work before loading the secondary user's storage space.
[0255] Before actually loading the storage space corresponding to the secondary user, some verification work is still required.
[0256] In this embodiment, the storage space between the secondary system and the primary system, as well as the user data in the storage space, are completely isolated. Therefore, when entering the secondary system, it is necessary to perform preparatory work before loading the user data storage space of the secondary system.
[0257] Step D1: UserController loads the desktop.
[0258] In this embodiment of the application, since the secondary system is a separate system, it is also necessary to load the desktop, wallpaper, etc. when it is started.
[0259] In step E1, UserController sends a command to ActivityTaskManagerService to invoke the root container.
[0260] In step E2, after receiving the call instruction from the root container, ActivityTaskManagerService sets the root container to null.
[0261] In the Android operating system, all windows and Activities are stored in containers. When switching to a secondary system, the root container needs to be reset to empty to store the secondary system's windows and Activities.
[0262] In step F1, after the root container is also set to null, UserController sends a broadcast indicating that the user has switched to the foreground.
[0263] In step G1, UserController sends a message to SystemServiceManager that the secondary user is starting up.
[0264] In step G2, after SystemServiceManager receives the message that the secondary user is starting up, the primary user's service performs the corresponding processing.
[0265] In practice, the services for the primary user can be stopped, or the services for the primary user can be discontinued.
[0266] In step G3, UserController sends a message to SystemServiceManager that the secondary user is being switched.
[0267] In step G4, after receiving the message that the secondary user is being switched, SystemServiceManager starts the services that were running before the secondary user was unlocked.
[0268] In this application, neither CE-class storage space nor DE-class storage space has been loaded using a CE key. Therefore, currently, only services that can run before unlocking can be started in the secondary user account. These services are unrelated to system unlocking, such as alarm clocks.
[0269] In step H5, UserController begins loading the wallpaper.
[0270] It should be noted that steps C1, D1, E1, and G1 are executed in parallel and do not have a strict sequential order. Typically, H5 is executed later than any of the steps listed above.
[0271] In step J1, if the lock screen application confirms that the received password matches the secondary user's password, it sends a command to ActivityManagerService to unlock the secondary user.
[0272] In this embodiment, when the secondary system is shut down, the key of the secondary system will be destroyed and the storage space corresponding to the secondary system will be unmounted. Therefore, after the secondary system is restarted from the shut-down state, the CE key of the secondary system needs to be restored first, and then the storage space of the secondary system is remounted.
[0273] Steps J1 and B1 are executed in parallel, so there is no strict order between the operations after step J1 and the operations after step B1.
[0274] In step J2, after receiving the instruction, ActivityManagerService sends an instruction to UserController to unlock the secondary user.
[0275] In step J3, after receiving the instruction to unlock the secondary user, UserController sends an unlock instruction for the secondary user's storage space to VOID.
[0276] In step J4, after receiving the unlock command for the secondary user storage space, VOID decrypts the CE key and loads the secondary user storage space: CE class storage space and DE class storage space.
[0277] In step J5, VOID sends a message to UserController indicating that the storage space has been loaded.
[0278] It should be noted that the wallpaper loading process takes a relatively long time, and may not be completed until after step J5. In this embodiment, the execution time of the wallpaper completion recorded in step H5 is not in a definite sequential relationship with the execution times of subsequent steps.
[0279] In step J6, UserController sends a message to SystemServiceManager requesting the storage space to be unlocked.
[0280] In step J7, after receiving this information, SystemServiceManager starts the services that can be run after being unlocked in the secondary user.
[0281] In step J8, SystemServiceManager returns information to UserController indicating that the secondary user's unlocking is complete.
[0282] In step J9, the UserController receives the message that the secondary user has completed unlocking and broadcasts that the secondary user's unlocking is complete.
[0283] This process illustrates that the secondary system, as an independent system, has its own storage space and CE key. During startup, it also needs to load the desktop, wallpaper, etc., making the process more complex and the startup time slower.
[0284] The subsystem application provided in this application embodiment runs at the application layer of the main system. Therefore, it does not need to load the desktop, wallpaper, etc. during startup, simplifying the process while providing the same independent storage space and more secure security keys. Furthermore, the subsystem provided in this application embodiment can also be directly accessed from the main system; details can be found in [reference needed]. Figure 9 Description of the illustrated embodiment.
[0285] Step K1: Set the application or desktop to receive the switching operation.
[0286] In this embodiment, since the subsystem can function as an application with system functions within the main system, an icon for the subsystem application can be displayed on the desktop of the main system. Users can access the subsystem by clicking the subsystem application's icon. Alternatively, a virtual button can be configured in the settings application, allowing users to access the subsystem via this virtual button.
[0287] Step K2: Configure the application or desktop to send a command to ActivityManagerService to switch sub-users.
[0288] In step K3, after receiving the instruction, ActivityManagerService sends an instruction to UserController to start the sub-user from the background.
[0289] It is understood that the access methods for the subsystems and auxiliary systems provided in the embodiments of this application are completely different.
[0290] In step C1, after receiving the instruction to start the sub-user from the background, UserController sends a sub-user data preparation instruction to SystemServiceManager.
[0291] In step C2, after receiving the preparation instruction for the sub-user data, SystemServiceManager executes the preparation work for the sub-user's storage space.
[0292] In this embodiment of the application, the storage space between the subsystem and the main system, as well as the data in the storage space, are completely isolated. Therefore, when entering the subsystem, it is necessary to prepare the storage space of the subsystem.
[0293] This subsystem can be understood as an application with system functions, so the step of loading the desktop (D1) is unnecessary. Since this subsystem application runs in the application layer of the main system, the step of clearing the root container is also unnecessary when entering the subsystem. That is, steps E1 to E2 are no longer necessary.
[0294] In step F1, UserController sends a broadcast announcing that the user has switched to the foreground.
[0295] In step G1, UserController sends a message to SystemServiceManager that the child user is starting up.
[0296] In step G4, after receiving the message that the child user is starting up, SystemServiceManager starts the services that can run in the child user before unlocking.
[0297] In this application, user data has not yet been decrypted using the CE key. Therefore, currently, only services that can run before unlocking can be started in the secondary user account. These services are unrelated to unlocking the system, such as alarm clocks.
[0298] Similarly, the method provided in this application embodiment no longer requires loading the wallpaper. That is, step E5 does not need to be executed.
[0299] Furthermore, since the subsystem in this application does not involve a screen lock password, steps J1 and J2 are not executed.
[0300] In step J3, UserController sends an unlock command to VOID for the sub-user's storage space.
[0301] In step J4, after receiving the unlock command for the sub-user storage space, VOID decrypts the security key and loads the sub-user storage space.
[0302] In this embodiment of the application, as mentioned above, the subsystem uses a security key to decrypt user data during subsequent data access. Therefore, in this step, the data decrypted before loading the sub-user's storage space is the security key.
[0303] In step J5, VOID sends a message to UserController indicating that the storage space has been loaded.
[0304] In step J6, UserController sends a message to SystemServiceManager requesting the storage space to be unlocked.
[0305] In step J7, after receiving this information, SystemServiceManager starts the services that can be run after being unlocked in the sub-user.
[0306] In step J8, SystemServiceManager returns information to UserController indicating that the child user's unlocking is complete.
[0307] In step J9, UserController receives the message that the sub-user has completed unlocking and broadcasts that the sub-user has completed unlocking.
[0308] Figure 9 In the illustrated embodiment, steps C1, G1, and J3 can be executed in parallel and do not have a strict order.
[0309] The subsystem application provided in this application embodiment can provide a main interface, which can display multiple controls. The content of each control is an icon of an application installed in the subsystem. When a user clicks on a control, the user can launch the application corresponding to that control. This allows other applications to run within the subsystem.
[0310] Additionally, secondary systems or subsystems are primarily used to provide users with an alternative storage space isolated from the primary user's storage space to protect the privacy of user data within the subuser's storage space; such as Figure 9 As shown in the timing diagram, the subsystem of this application embodiment can also provide another storage space isolated from the main user's storage space to protect the privacy of user data in the subuser's storage space. Although the subsystem in this application embodiment cannot set a lock screen password, a security chip can be used to provide a security key to provide a higher level of security protection for user data in the subsystem. Given that Figure 8 and Figure 9 By comparison, it can be understood that the subsystem provided in this application embodiment can achieve the same function as the secondary system while reducing the startup process and startup time.
[0311] In this embodiment of the application, when the system desktop or settings interface of the main system is displayed, the first operation on the interface can trigger the main system to start the subsystem application of the electronic device.
[0312] When the main system desktop is displayed, icons of subsystem applications can be displayed on the main system desktop. The first operation is to click on the subsystem application icon. Of course, the first operation can also be a specific gesture.
[0313] When the main system's settings interface is displayed, there is a button on the settings interface that says "Enter Subsystem". The user's first action of clicking this button triggers the main system to launch the subsystem application.
[0314] During startup, the storage space of the subsystem application needs to be mounted (which can be referred to as the first storage space).
[0315] The interface displayed after the subsystem application starts is the main interface of the subsystem application. The main interface of the subsystem application displays icons of one or more applications installed in the subsystem application. These icons can be displayed as controls (buttons). For example, if the first application is installed in the subsystem application, the icon of the first application will be displayed on the main interface of the subsystem application. The user can trigger the launch of the first application by clicking the button or control that displays the icon of the first application.
[0316] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0317] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the steps in the above-described method embodiments.
[0318] This application also provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.
[0319] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to the first device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0320] This application also provides a chip system, which includes a processor coupled to a memory. The processor executes a computer program stored in the memory to implement the steps of any method embodiment of this application. The chip system can be a single chip or a chip module composed of multiple chips. For example, it can be a main chip or a chip module composed of a main chip and qualified security chips.
[0321] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0322] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0323] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for starting a subsystem, characterized in that, include: The electronic device displays the interface of the main system, which includes the system desktop or the settings interface of the main system. The electronic device receives a first operation performed on the interface of the main system; In response to the first operation, the electronic device launches a subsystem application through the main system; During the process of launching the subsystem application through the main system, the electronic device mounts the first storage space corresponding to the subsystem application through the main system; The electronic device displays the main interface of the subsystem application. The main interface includes a first control, which displays the icon of the first application. The first control is used to launch the first application in the subsystem application. When the electronic device displays the main interface of the subsystem application, the electronic device receives a second operation, which is to launch the first application through the first control and access the first data through the first application; the main system includes a system kernel and a control module for the memory of the electronic device, and the electronic device also includes a first TEE system; In response to the second operation, the first application sends an access request to the system kernel; After receiving the access request, the system kernel sends the security key to the first TEE system and sends the access request to the control module of the electronic device's memory. The security key is obtained by the first TEE system from the security password generated by the security chip during the application startup process of the subsystem. After receiving the security key, the first TEE system obtains the key plaintext based on the security key and sends the key plaintext to the control module of the memory; After receiving the access request sent by the system kernel and the plaintext key sent by the first TEE system, the control module of the memory generates plaintext data of the first data based on the plaintext key and the ciphertext data of the first data stored in the memory. The control module of the memory sends the plaintext data of the first data to the system kernel; After receiving the plaintext data of the first data, the system kernel sends the plaintext data of the first data to the first application.
2. The method as described in claim 1, characterized in that, The interface of the main system is the system desktop of the main system, and the icons of the subsystem applications are displayed on the interface of the main system. The first operation is an operation performed on the icons of the subsystem applications.
3. The method as described in claim 1, characterized in that, The main system interface includes a settings interface, which includes a second control for launching the subsystem application. The first operation is an operation performed on the second control.
4. The method according to any one of claims 1 to 3, characterized in that, The subsystem application does not have a desktop and wallpaper. During the process of launching the subsystem application through the main system, the method further includes: The electronic device does not load the desktop and the wallpaper; The electronic device does not set the root container of the main system to empty.
5. The method according to any one of claims 1 to 3, characterized in that, The electronic device includes a main chip and a security chip. The main chip is used to run the main system, and the user data in the first storage space is encrypted or decrypted using the master key of the electronic device.
6. The method as described in claim 5, characterized in that, The method further includes, during the process of launching the subsystem application through the main system: The subsystem application obtains the security password from the security chip; The subsystem application sends the security password to the first TEE system; After receiving the security password, the first TEE system encrypts the DE key stored in the first TEE system based on the security password to generate a security key. The DE key is the key generated by the first TEE system when the electronic device is powered on. The first TEE system sends the security key to the system kernel; After receiving the security key, the system kernel stores the security key in the system kernel.
7. The method as described in claim 6, characterized in that, The first TEE system obtains the plaintext key based on the security key, including: The first TEE system obtains the DE key based on the security password and the security key; The first TEE system generates the key plaintext based on the DE key.
8. The method as described in claim 6, characterized in that, The main chip also includes a second TEE system, and the subsystem application obtains the security password from the security chip in the following ways: The subsystem application sends a request to the second TEE system to obtain the security password; After receiving the acquisition request, the second TEE system sends the security password acquisition request to the security chip; After receiving the acquisition request, the security chip generates the security password based on the acquisition request; The security chip sends the security password to the second TEE system; After receiving the security password, the second TEE system sends it to the subsystem application; The subsystem application receives the security password.
9. The method as described in claim 8, characterized in that, Before the second TEE system sends the security password retrieval request to the security chip, the method further includes: The second TEE system performs a root detection on the electronic device to determine that the electronic device has not been rooted.
10. The method according to any one of claims 6 to 9, characterized in that, The control module of the memory generates plaintext data of the first data based on the plaintext key and the ciphertext data of the first data stored in the memory, including: The control module of the memory retrieves the encrypted data of the first data from the first storage space based on the access request of the first data. The control module of the memory decrypts the ciphertext data of the first data based on the plaintext key, and generates the plaintext data of the first data.
11. The method as described in claim 8 or 9, characterized in that, The first TEE system and the second TEE system are the same TEE system.
12. An electronic device, characterized in that, The electronic device includes a main chip and a security chip, the main chip and the security chip being used to run a computer program stored in a memory, so that the electronic device implements the method as described in any one of claims 1 to 11.
13. A chip system, characterized in that, The system includes a main chip coupled to a memory, the main chip executing a computer program stored in the memory to implement the method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Dual-system switching method and device
CN104702788A
Security authentication method and electronic equipment
CN113821787A