CN115543454A - Control method and device of electronic equipment - Google Patents

Control method and device of electronic equipment Download PDF

Info

Publication number
CN115543454A
CN115543454A CN202210999164.4A CN202210999164A CN115543454A CN 115543454 A CN115543454 A CN 115543454A CN 202210999164 A CN202210999164 A CN 202210999164A CN 115543454 A CN115543454 A CN 115543454A
Authority
CN
China
Prior art keywords
image file
electronic device
flag bit
read
bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210999164.4A
Other languages
Chinese (zh)
Inventor
赵小利
丁高珂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210999164.4A priority Critical patent/CN115543454A/en
Publication of CN115543454A publication Critical patent/CN115543454A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/50Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems
    • G06F21/52Monitoring users, programs or devices to maintain the integrity of platforms, e.g. of processors, firmware or operating systems during program execution, e.g. stack integrity ; Preventing unwanted data erasure; Buffer overflow
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a control method and device of electronic equipment, relates to the field of terminals, simplifies the flow of entering a fastboot mode of the electronic equipment, does not depend on chip manufacturers, and can improve the development efficiency of developers of the terminal manufacturers. The method is applied to electronic equipment, the electronic equipment comprises a preset storage medium, and the method comprises the following steps: acquiring and loading a mirror image file of a preset storage medium, wherein the mirror image file comprises a flag bit which is used for indicating to enter a fast boot mode; operating a miniaturized kernel LK, and reading a zone bit from the image file in the LK operation stage; and if the flag bit is read, controlling the electronic equipment to enter a fastboot mode.

Description

Control method and device of electronic equipment
Technical Field
The present application relates to the field of terminals, and in particular, to a method and an apparatus for controlling an electronic device.
Background
Before the electronic equipment leaves a factory, engineering version software needs to be loaded for performance testing, and the user version software is loaded after the testing is qualified, so that the engineering version software has more basic functions than the user version software. The electronic device needs to enter a fast boot (fastboot) mode before loading the engineering version. However, conventional chip products purchased by terminal vendors (e.g., glory) from chip vendors (e.g., media Tek, MTK) do not typically support entering the fastboot mode, requiring the terminal vendors to customize the flow (the flow of causing the chip products to enter the fastboot mode) specifically to the chip vendors.
However, it usually takes a long time (two days or a week) for the chip manufacturer to customize the flow, which seriously affects the development efficiency of the developer of the terminal manufacturer.
Disclosure of Invention
The embodiment of the application provides a control method and device for electronic equipment, and development efficiency of developers can be improved.
In a first aspect, an embodiment of the present application provides a method for controlling an electronic device, where the method is applied to an electronic device, where the electronic device includes a preset storage medium, and the method includes: acquiring and loading a mirror image file of a preset storage medium, wherein the mirror image file comprises a flag bit, and the flag bit is used for indicating to enter a fast boot mode; operating a miniaturized kernel LK, and reading a zone bit from the mirror image file at the LK operation stage; and if the flag bit is read, controlling the electronic equipment to enter a fastboot mode.
Based on the method provided by the embodiment of the application, a flag bit can be written into an image file of a preset storage medium (for example, an oeminfo storage medium glorious from research) in advance, and the flag bit is used for indicating entry into a fastboot mode. The image file of the preset storage medium can be loaded in the boot stage, the flag bit in the image file is read through the oeminfo read-write interface in the LK process, the flag bit is read, the electronic device enters the fastboot mode, the process of entering the fastboot mode of the electronic device is simplified, a chip manufacturer is not depended on, and the development efficiency of developers of the terminal manufacturer can be improved (the overall progress of a project can be improved by entering the fastboot mode for 2-7 days by using the scheme).
In one possible implementation, reading the flag bits from the image file during the LK running phase includes: acquiring a first partition mark and a first offset according to a preset read-write interface, wherein the preset read-write interface is arranged in an image file of the LK; the flag bits are read based on the first partition flag and the first offset. For example, the predetermined read/write interface may include a getindex interface and a getoffset interface. The getindex interface may be configured to obtain a partition identifier (e.g., a first partition identifier) corresponding to a storage space storing the flag bits. The getoffset interface may be used to obtain an offset (e.g., a first offset) of a partition corresponding to a storage space in which the flag bit is stored. Mbn image file may determine a location in the oeminfo image file where the flag bit is stored according to the first partition identifier and the first offset, and may then read the flag bit from the location. Thus, it can be determined that the electronic device can successfully read the flag bit during the LK phase.
In one possible implementation, the method further includes: and after reading the zone bit, erasing the zone bit. Therefore, reading and erasing of information (flag bit) in the preset storage medium (oeminfo) are realized, the next normal startup can not be influenced, and the robustness of the code is enhanced.
In a possible implementation manner, the preset read-write interface is a hidden application program interface API. Therefore, the preset read-write interface can be prevented from being tampered or embezzled.
In one possible implementation, the flag is an encrypted string. Namely, the zone bit can be encrypted, so that the data of the zone bit is invisible to the outside, and the zone bit is prevented from being tampered or stolen.
In one possible implementation, the flag is encrypted by secure hash algorithm 2 (SHA 2). SHA2 is a cryptographic hash function algorithm standard and may include a number of different algorithm standards, which may include, for example, SHA-224, SHA-256, SHA-384, SHA-512/224, SHA-512/256, and the like. Different algorithm standards have differences in the length of the generated summary and the number of loop runs, but the basic structure of the algorithm is consistent. For example, the flag bits may be encrypted according to the SHA-256 algorithm, and the flag bits may be encrypted according to the SHA-256 algorithm to obtain a 256-bit long hash value, which may be referred to as a message digest. The message digest is equivalent to an array of 32 bytes in length, and may be represented by a 64-length hexadecimal string. For example, assuming that the flag bit is a honor _ fastboot, the hexadecimal string obtained by encrypting the flag bit according to the SHA-256 algorithm may be: e6d80457a74478395a4585ba4da543f81501078f8d6889685574ad05100e1acf.
In a second aspect, an embodiment of the present application provides a method for controlling an electronic device, which is applied to a system including the electronic device and a burning device, where the electronic device includes a preset storage medium, and the method includes: the method comprises the steps that a burning device generates a mirror image file of a preset storage medium, wherein the mirror image file comprises a flag bit which is used for indicating to enter a fast boot mode; the burning equipment sends a mirror image file to the electronic equipment; the electronic equipment loads a mirror image file; the electronic equipment runs a miniaturized kernel LK, and a flag bit is read from a mirror image file in the LK running stage; and if the flag bit is read, controlling the electronic equipment to enter a fastboot mode.
Based on the method provided by the embodiment of the application, the burning device can write the flag bit into the mirror image file of the preset storage medium (for example, the glowing self-developed storage medium oeminifo) in advance, and the flag bit is used for indicating to enter the fastboot mode. The electronic equipment can load the mirror image file of the preset storage medium in the starting-up stage, the flag bit in the mirror image file is read through the oeminfo read-write interface in the LK process, the flag bit is read, the electronic equipment enters the fastboot mode, the process of entering the fastboot mode of the electronic equipment is simplified, a chip manufacturer is not depended on, and the development efficiency of developers of the terminal manufacturer can be improved (the whole progress of a project can be improved by entering the fastboot mode for 2-7 days by using the scheme).
In one possible implementation manner, the generating, by the burning device, an image file of the preset storage medium includes: writing the flag bit into a first text file, opening the first text file, reading the flag bit from the first text file and writing the flag bit into a buffer zone; determining a first partition mark and a first offset corresponding to a mark bit in an image file; the flag bit of the buffer is written into the first partition flag and the position indicated by the first offset.
In one possible implementation, reading the flag bits from the image file during the LK running phase includes: acquiring a first partition mark and a first offset according to a preset read-write interface, wherein the preset read-write interface is arranged in an LK mirror image file; the flag bits are read based on the first partition flag and the first offset.
In one possible implementation, the method further comprises: and erasing the zone bit after reading the zone bit.
In a possible implementation manner, the preset read-write interface is a hidden application program interface API.
In one possible implementation, the flag is an encrypted string.
In one possible implementation, the flag is encrypted by the secure hash algorithm SHA 2.
The beneficial effects achieved by the various possible implementation manners of the second aspect can refer to the beneficial effects in the first aspect and any one of the possible design manners thereof, which are not described herein again.
In a third aspect, the present application provides a computer-readable storage medium comprising computer instructions. The computer instructions, when executed on an electronic device, such as a laptop, cause the electronic device to perform the method according to the first and/or second aspect and any possible design thereof.
In a fourth aspect, the present application provides a computer program product for causing a computer to perform the method according to the first and/or second aspect and any one of its possible designs when the computer program product is run on the computer.
In a fifth aspect, embodiments of the present application provide a variable reading and writing apparatus, which includes a processor, and a memory coupled to the processor, wherein the memory stores program instructions, and when the program instructions stored in the memory are executed by the processor, the apparatus implements the method according to the first aspect and/or the second aspect, and any possible design thereof. The apparatus may be an electronic device or a server device; or may be an integral part of the electronic device or the server device, such as a chip.
In a sixth aspect, embodiments of the present application provide a variable reading and writing apparatus, which may be functionally divided into different logical units or modules, and each unit or module performs different functions, so that the apparatus performs the method according to the first aspect and/or the second aspect and any possible design manner thereof.
In a seventh aspect, the present application provides a system-on-chip that includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected by a line. The above chip system may be applied to an electronic device including a communication module and a memory. The interface circuit is configured to receive signals from a memory of the electronic device and to transmit the received signals to the processor, the signals including computer instructions stored in the memory. The electronic device may perform the method as described in the first and/or second aspect and any of its possible designs when the computer instructions are executed by a processor.
It should be understood that, for the beneficial effects that can be achieved by the computer-readable storage medium of the third aspect, the computer program product of the fourth aspect, the apparatus of the fifth aspect, the sixth aspect, and the chip system of the seventh aspect, reference may be made to the beneficial effects of the first aspect and any possible design manner thereof, which are not described herein again.
Drawings
FIG. 1 is a schematic flow chart of a prior art method for entering a fastboot mode;
fig. 2 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 3 is a schematic flowchart illustrating a control method of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a partition of a preset memory according to an embodiment of the present disclosure;
fig. 5A is a schematic flow chart according to an embodiment of the present disclosure;
fig. 5B is a schematic diagram of a burning architecture according to an embodiment of the present application;
FIG. 6A is a schematic flow chart diagram provided by an embodiment of the present application;
FIG. 6B is a schematic illustration of a display provided in an embodiment of the present application;
FIG. 7 is a schematic flow chart diagram provided by an embodiment of the present application;
FIG. 8 is a schematic flow chart diagram provided by an embodiment of the present application;
FIG. 9 is a schematic flow chart diagram provided by an embodiment of the present application;
fig. 10 is a schematic diagram of a chip structure according to an embodiment of the present application.
Detailed Description
For clarity and conciseness of the following description of the various embodiments, a brief introduction to related concepts or technologies is first presented:
fastboot, a Chinese paraphrase is a quick start. The fastboot is a firmware communication protocol and tool for a debugging device (e.g., a computer) to write, erase/format, debug, and transmit various instructions to the firmware of a device to be debugged (e.g., a mobile phone) through a USB data line. The fastboot can be understood as a line brush, which is a method for connecting a mobile phone by using a USB data line. The fastboot flashing method is characterized in that a data line is connected with a mobile phone and a computer, the mobile phone is restarted and switched to an engineering mode, and then the fastboot command carried by an android development kit is used for programming at a PC (personal computer). Img files (i.e., related generated images) are generated in an out/target/product/xxxx/directory (generated directory of google's android image), and the BOOT-up BOOT partition can be generated only by compiling for certain hardware.
Buffer (buffer): is a specially reserved area in the memory for storing certain information, such as a file table obtained from a disk, the contents being read by a program, and the like. The buffer area can be considered as a temporary area, i.e. a temporary storage area, where data is stored. When the computer needs to use some data stored in the disk, it can first judge whether the data is in the buffer area, and then make logic judgment whether it is going to read data from the disk, so that it can reduce the number of operation judgments and raise the speed of reading data by central processor.
Mirror image file: the method is to make a specific series of files into a single file according to a certain format so as to be convenient for a user to download and use, and is similar to compressed files such as rar and ZIP. For example, the image file may be used to compress an operating system, game, etc. The image file may contain all information of one partition (partition of the hard disk) or even one hard disk, for example, the image file may contain system files, boot files, partition table information, and the like. Common mirror file formats are iso,. Mds,. Gho, etc. The image file can be recognized by specific software and can be directly recorded on the optical disc.
An mbn file: an integrated package file containing a set of Encrypted File Systems (EFS) and non-volatile storage (nv) customized for a particular carrier. Each operator will have a specific mbn file contained in the modem's code. The mbn file may be burned with high-pass product support tool (QPST) software.
Burning: that is, the desired data is recorded into the media such as optical disc, recording card, etc. by means of the recording machine, recording software, etc. Before the terminal device leaves a factory, factory parameter data needs to be burned into an electronic device (e.g., a mobile phone) through a special burning device (the burning device may be a computer or other device with a burning function). At present, two burning methods, namely serial port burning and U disk burning, are mainly adopted.
The fopen, fread and fwrite functions referred to in this application are illustrated as follows:
description of the fread function:
a function of reading data from a stream;
function prototype (function declaration) size _ t _ fresh (void _ buffer, size _ t size, size _ t count, FILE stream);
description of the parameters: the parameter buffer is an address (pointer) for receiving data; the parameter size indicates the size of a single element in bytes, for example, 2 bytes for reading an integer number. count represents the number of elements. stream is used to provide file pointers to data.
The function returns the value: the number of successfully read elements.
Description of fopen function:
function: opening a file;
function prototype: FILE fopen (const char path, const char mode);
description of the parameters: the parameter path character string includes a file path to be opened and a file name, and the parameter mode represents a form character string. For example, a form character string of r indicates that a file is opened in a read-only manner. The form character string is rb +, which means that reading and writing open a binary file, and only data reading and writing are allowed. The form character string is w, which indicates that the write-only file is opened, if the file exists, the file length is clear to be 0, and the file content disappears; and if the file does not exist, establishing the file.
The function returns the value: after the file is successfully opened, a file pointer to the stream is returned. If the file fails to open, NULL is returned and an error code is stored in errno. Generally, some file reading or writing operations are performed after the file is opened, and if the file is not opened, the subsequent reading and writing operations cannot be performed smoothly, so that it is common to perform an error judgment and processing after fopen ().
Description of the fwrite function:
function: one data is written into the file (the written data may include text data, binary data, etc.).
Function prototype: size _ t fwrite (const void buffer, size _ t size, size _ t count, FILE stream);
description of the parameters: the parameter buffer is a pointer, which for fwrite is the address to which data is to be written. The parameter size is a single byte number to write the content. The parameter count is the number of data items to be written to the size byte. The parameter stream is a destination file pointer. The parameter count refers to the number of data items returned that were actually written.
The function returns the value: and returning the number of the actually written data items.
An engineering mode: also referred to as factory mode or production mode. Before an electronic device (e.g., a mobile phone) leaves a factory, an engineering version (i.e., entering an engineering mode) software needs to be loaded for performance testing. The engineering version may also be referred to as a burn-in version. After entering the engineering mode of the mobile phone, the tester can see many options, such as options including "Red, green, blue", "Touch", "Mega cam" and "Front cam". The screen can display basic three primary colors of Red, green and Blue by selecting 'Red, green and Blue', and the display effect of the screen can be checked to check whether dead pixels exist on the screen. By selecting the Touch option, whether the Touch of the screen is sensitive or not and whether the response is normal or not can be checked. By selecting the Mega cam and the Front cam, front and back cameras of the mobile phone can be tested to determine whether the image sensor can normally operate. By selecting "Speaker", it is possible to test whether or not the Speaker of the cellular phone can normally emit a sound, and the like.
Before the electronic equipment leaves a factory, engineering version software needs to be loaded for performance testing, and the user version software is loaded after the testing is qualified, so that the functions of the engineering version software are more basic than those of the user version software. The electronic device needs to enter a fastboot mode before loading the engineering version. However, conventional chip products purchased by a terminal vendor (e.g., glory) from a chip vendor (e.g., MTK) do not generally support entering the fastboot mode, and the terminal vendor is required to customize the flow (the flow of making the chip product enter the fastboot mode) specifically to the chip vendor.
As shown in fig. 1, a MTK chip manufacturer may load a native image DA (the DA is an MTK native loading image, and has a built-in boot protection function, and the default is a first image to be loaded), and start to load an LK (miniaturized kernel, which may also be referred to as a small system) image if the loading verifies that the DA is correct, and the LK image determines whether to enter a fastboot mode according to indication information in the DA image. The disadvantage of this is that the flow of entering the fastboot is dependent on the chip vendor. However, it usually takes a long time (two days or a week) for the chip manufacturer to customize the flow, which seriously affects the development efficiency of the developer of the terminal manufacturer.
In order to solve the above problem, the present application provides a method for controlling an electronic device, which may write a flag bit in advance in a mirror image file of a predetermined storage medium (e.g., an oeminfo storage medium glory from research), where the flag bit is used to indicate that a fastboot mode is to be entered. And loading the image file of the preset storage medium in a starting-up stage, reading the zone bit in the image file through a preset read-write interface in the LK process, and controlling the electronic equipment to enter a fastboot mode if the zone bit is read. Therefore, the flow of the electronic equipment entering the fastboot mode is simplified, a chip manufacturer is not depended on, and the development efficiency of developers of terminal manufacturers can be improved.
And the zone bit can be erased when being read, so that the next normal startup of the electronic equipment can not be influenced.
The method provided by the embodiment of the application can be applied to electronic equipment, and the electronic equipment can be, for example, a mobile phone, a tablet computer, a desktop computer, a laptop computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a Personal Digital Assistant (PDA), and the like.
Fig. 2 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present disclosure.
As shown in fig. 2, 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, an antenna 1, an 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like.
The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the present embodiment does not specifically limit the electronic device 100. In other embodiments, electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processor (GPU), an Image Signal Processor (ISP), a controller, a memory, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), among others. The different processing units may be separate devices or may be integrated into one or more processors.
The controller may be a neural center and a command center of the electronic device 100. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
It should be understood that the interface connection relationship between the modules illustrated in the present embodiment is only an exemplary illustration, and does not limit the structure of the electronic device 100. In other embodiments, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive a charging input from a charger. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
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, and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194.
The wireless communication module 160 may provide solutions for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
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 techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), a light-emitting diode (LED), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-ol, a quantum dot light-emitting diode (QLED), or the like.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like. The ISP is used to process the data fed back by the camera 193. The camera 193 is used to capture still images or video. The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The number of the cameras 193 may be 1 to N. For example, an electronic device may include 2 front-facing cameras and 4 rear-facing cameras. Wherein, can include the TOF camera among the leading camera. TOF cameras include TX, which can be used to transmit optical signals (infrared light or laser pulses), and RX, which can be used to receive imaging. TX may be, for example, an infrared light emitter. RX may be, for example, a Complementary Metal Oxide Semiconductor (CMOS) or a Charge Coupled Device (CCD) image sensor.
The NPU is a neural-network (NN) computing processor, which processes input information quickly by referring to a biological neural network structure, for example, by referring to a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card. The internal memory 121 may be used to store computer-executable program code, which includes instructions. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121. For example, in the embodiment of the present application, the processor 110 may execute instructions stored in the internal memory 121, and the internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. The speaker 170A, also called a "horn", is used to convert the audio electrical signal into a sound signal. The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into a sound signal. The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. The earphone interface 170D is used to connect a wired earphone.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100. The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc. The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc.
The methods in the following embodiments may be implemented in the electronic device 100 having the above-described hardware structure.
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, unless otherwise specified, "at least one" means one or more, "a plurality" means two or more. In addition, in order to facilitate clear description of technical solutions of the embodiments of the present application, in the embodiments of the present application, terms such as "first" and "second" are used to distinguish the same items or similar items having substantially the same functions and actions. Those skilled in the art will appreciate that the terms "first," "second," and the like do not denote any order or importance, but rather the terms "first," "second," and the like do not denote any order or importance.
For convenience of understanding, the following describes a control method of an electronic device provided in an embodiment of the present application in detail with reference to the accompanying drawings.
As shown in fig. 3, an embodiment of the present application provides a method for controlling an electronic device, including:
301. the computer generates an image file corresponding to a preset storage medium, wherein the image file comprises a flag bit, and the flag bit is used for indicating that a fastboot mode is entered.
The preset storage medium may be, for example, the storage medium oeminfo in glory self-research. oeminfo is a storage medium with high security. The oeminfo can store key information of the mobile phone. The key information may include information such as a Serial Number (SN), a Back Sequence Number (BSN), and a physical address (lan mac).
oeminfo may be divided into a plurality of partitions, the role of each partition in the plurality of partitions may be different, and the specific number and functions of the partitions are not limited in the embodiments of the present application. In order to distinguish different partitions, each partition may have a partition identifier (also referred to as an index), which may be a number, a symbol, a letter, or any combination of the three, and this is not limited in this application.
The partition identification of each partition may be used to indicate that the partition is at the byte start of oeminfo. A block of storage space in oeminfo can be uniquely determined based on the start position of the byte in combination with a byte offset (which may be referred to as an offset for short). The address of the uniquely determined memory space may be represented by a partition identification and an offset.
Illustratively, the partition identification may be a number. Fig. 4 shows a schematic diagram of a predetermined storage medium (predetermined memory). As shown in fig. 4, the predetermined memory (oeminfo) may include 4 partitions, and the partition identifiers of the 4 partitions may be 1, 2, 3, and 4, respectively. For example, the partition with partition identification 1 may be used to store a single bar code, the partition with partition identification 2 may be used to store a complete bar code, the partition with partition identification 3 may be used to store various types of flag bits, and the partition with partition identification 4 may be used to store a physical address.
The following describes the process of writing the flag bit into the image file of oeminfo by the computer:
as shown in FIG. 5A, in one aspect, a first process may be performed. The first process may include: a TXT file is preset in advance, and a flag bit, which may be, for example, "horojfastboot", is written in the TXT file. The flag bit is stored in the buffer based on fopen-fread mechanism. For example, the TXT file may be opened according to fopen function, flag bits may be read from the TXT file according to fread function, and the read flag bits may be written into the buffer according to fwrite function. On the other hand, the second process may be executed. The second process includes: mbn is an empty image file, for example, oeminfo, set in advance for oeminfo. Mbn, a storage space capable of storing a flag bit is determined in a storage space corresponding to oeminfo, and the storage space can be represented by a first partition identifier and a first offset. And then, opening oeminfo.mbn according to fopen function, and writing the flag bit in the buffer into the first partition identifier and the position indicated by the first offset through the fwrite function, so that the flag bit in the image file is ensured to exist before the image file of the oeminfo is loaded.
302. The computer burns the image file of the oeminfo into the electronic device (namely, the electronic device loads the image file of the oeminfo).
That is, the computer sends an image file of oeminfo to the electronic device. The mirror image file of oeminfo includes a data name and a corresponding check code. After receiving the mirror image file of the oeminfo, the electronic device writes the mirror image file of the oeminfo into the oeminfo (namely, loads the mirror image file of the oeminfo), and completes burning of the mirror image file of the oeminfo.
As shown in fig. 5B, the burning device PC 310 and the mobile phone 320 are connected via a network cable. The PC 001 includes therein mirror image data to be burned (e.g., an image file of oeminfo). The PC 001 may send an image file of oeminfo to the handset 002. The mobile phone 002 includes a Wi-Fi module, a read-write module, and a storage module. The Wi-Fi module is used for providing an Internet Protocol (IP) address for the read-write module. The read-write module is configured to acquire mirror image data (mirror image file of oeminfo) to be burned, which is transmitted to the mobile phone 002 by the burning device (PC 001), and write the acquired mirror image data into the storage module. Further, the storage module can read the mirror image data to be burned from the PC 001 through the read-write module, and write the data into the storage module.
303. The electronic device is turned on and the flag bit is read from oeminfo at the stage LK.
The electronic device can load an LK (miniaturized kernel, which may also be referred to as a small system) image file at the boot stage. Wherein, LK is a BOOTLOADER mode before the high-pass platform enters the LINUX operating system, and may also be called a LITTLE KERNEL. LK is mainly used for guiding the process and downloading, charging and pointing the LOGO mark of the initial LCD.
In the starting process, when the system runs to an LK stage (namely, an LK image file is loaded), the zone bit in the Oeminfo image file can be read according to a preset read-write interface (Oeminfo read-write interface) which is arranged in the LK image file in advance. The oeminfo read-write interface may include a getindex interface and a getoffset interface. The getindex interface may be configured to obtain a partition identifier (e.g., a first partition identifier) corresponding to a storage space storing the flag bits. The getoffset interface may be used to obtain an offset (e.g., a first offset) of a partition corresponding to a storage space in which the flag bit is stored. Mbn image file may determine a location in the oeminfo image file where the flag bit is stored according to the first partition identifier and the first offset, and may then read the flag bit from the location.
Preset information (such as a glory exclusive log) can be set in the oeminfo read-write interface, the oeminfo read-write interface can be called, but codes of the oeminfo read-write interface are invisible from inside to outside, namely the oeminfo read-write interface can be a hidden API, and the oeminfo read-write interface is prevented from being tampered or stolen.
In addition, the flag bit can be set to be a dedicated character string (for example, glory dedicated), that is, the flag bit can be encrypted, so that the data of the flag bit is invisible to the outside, and the flag bit is prevented from being tampered or stolen.
In one possible design, the flag bit may be encrypted according to the secure hash algorithm SHA 2. SHA2 is a cryptographic hash function algorithm standard and may include a number of different algorithm standards, which may include, for example, SHA-224, SHA-256, SHA-384, SHA-512/224, SHA-512/256, and the like. Different algorithm standards have differences in the length of the generated summary and the number of loop runs, but the basic structure of the algorithm is consistent. For example, the flag bits may be encrypted according to the SHA-256 algorithm, and the flag bits may be encrypted according to the SHA-256 algorithm to obtain a 256-bit long hash value, which may be referred to as a message digest. The message digest is equivalent to an array of 32 bytes in length, and may be represented by a 64-length hexadecimal string.
For example, assuming that the flag bit is a honor _ fastboot, the hexadecimal string obtained by encrypting the flag bit according to the SHA-256 algorithm may be: e6d80457a74478395a4585ba4da543f81501078f8d6889685574ad05100e1acf.
304. If the flag bit is read, the mode of fastboot is entered by default.
For example, as shown in fig. 6A, first, the electronic device is turned on, and during the turning-on process, when the system runs to the LK stage, the flag bit in the oeminfo image file may be read according to the oeminfo read-write interface (getindex interface and getoffset interface) which is set in advance in the LK image file. If the flag bit is read, the mode of fastboot is entered by default. If the flag bit cannot be read, the electronic device can be restarted. The electronic device may restart to re-execute step 303 in order to read the flag bit.
As shown in fig. 6B, after the electronic device enters the fastboot mode, the display may indicate that the electronic device has entered the fastboot mode.
305. And after reading the zone bit, erasing the zone bit.
In one possible design, the flag bit may be erased immediately after being read, so that the next boot is not entered into the fastboot mode, which may not affect the next normal boot. The storage space (first storage space) of the flag bit can be determined according to the first partition identifier and the first offset which are obtained through the getindex interface and the getoffset interface, and then the erasing operation is performed on the storage space, that is, the flag bit is erased from the storage space. Therefore, reading and erasing of information (flag bit) in the preset storage medium (oeminfo) are realized, the next normal startup can not be influenced, and the robustness of the code is enhanced.
For example, as shown in fig. 7, the flag bit may be erased immediately after the electronic device reads the flag bit, so that the next boot will not enter the fastboot mode, and thus the next normal boot will not be affected.
Based on the method provided by the embodiment of the application, a flag bit can be written into an image file of a preset storage medium (for example, an oeminfo storage medium glorious from research) in advance, and the flag bit is used for indicating entry into a fastboot mode. The image file of the preset storage medium can be loaded in the boot stage, the flag bit in the image file is read through the oeminfo read-write interface in the LK process, the flag bit is read, the electronic device enters the fastboot mode, the process of entering the fastboot mode of the electronic device is simplified, a chip manufacturer is not depended on, and the development efficiency of developers of the terminal manufacturer can be improved (the overall progress of a project can be improved by entering the fastboot mode for 2-7 days by using the scheme).
And the zone bit can be erased when being read, so that the next normal startup of the electronic equipment can not be influenced.
Fig. 8 is a schematic flowchart of a control method of an electronic device according to an embodiment of the present application. The method may be performed by an electronic device shown in fig. 2, the electronic device including a preset storage medium, as shown in fig. 8, and the method may include:
801. the electronic equipment acquires and loads the mirror image file of the preset storage medium.
The image file comprises a flag bit, and the flag bit is used for indicating that a fastboot mode is entered.
802. And operating the miniaturized kernel LK, and reading the flag bit from the image file in the LK operation stage.
Reading the flag bit from the image file in the LK operation stage comprises the following steps: acquiring a first partition mark and a first offset according to a preset read-write interface, wherein the preset read-write interface is arranged in an image file of the LK; the flag bits are read based on the first partition flag and the first offset.
Optionally, the preset read-write interface is a hidden application program interface API.
Optionally, the flag bit is an encrypted string.
Optionally, the flag is encrypted by using a secure hash algorithm SHA 2.
803. And if the flag bit is read, controlling the electronic equipment to enter a fastboot mode.
804. And erasing the zone bit after reading the zone bit.
The specific process of the embodiment shown in fig. 8 may refer to the description related to the embodiment shown in fig. 3, and the embodiment of the present application has the same effect as the embodiment described above, and may refer to the description in the embodiment described above, which is not repeated herein.
Fig. 9 is a schematic flowchart of a control method of an electronic device according to an embodiment of the present application. The method may be executed by a burning device (e.g., a PC shown in fig. 5B) and the electronic device shown in fig. 2, and as shown in fig. 9, the method may include:
901. the burning equipment generates a mirror image file of a preset storage medium.
The image file comprises a flag bit, and the flag bit is used for indicating that a fastboot mode is entered.
The method for generating the mirror image file of the preset storage medium by the burning equipment comprises the following steps: writing the flag bit into a first text file, opening the first text file, reading the flag bit from the first text file and writing the flag bit into a buffer zone; determining a first partition mark and a first offset corresponding to a mark bit in an image file; the flag bit of the buffer is written into the first partition flag and the position indicated by the first offset.
902. And the burning equipment sends the mirror image file to the electronic equipment.
903. And the electronic equipment loads the mirror image file.
904. The electronic equipment runs the miniaturized kernel LK, and the flag bit is read from the mirror image file in the LK running stage.
Reading the flag bit from the image file in the LK running stage comprises the following steps: acquiring a first partition mark and a first offset according to a preset read-write interface, wherein the preset read-write interface is arranged in an image file of the LK; the flag bits are read based on the first partition flag and the first offset.
Optionally, the preset read-write interface is a hidden application program interface API.
Optionally, the flag bit is an encrypted string.
Optionally, the flag is encrypted by using a secure hash algorithm SHA 2.
905. And if the flag bit is read, controlling the electronic equipment to enter a fastboot mode.
906. And erasing the zone bit after reading the zone bit.
The specific process of the embodiment shown in fig. 9 may refer to the related description of the embodiment shown in fig. 3, and the embodiment of the present application has the same effect as the embodiment described above, and may refer to the description in the embodiment described above, which is not repeated herein.
Embodiments of the present application also provide a system on chip (SoC), as shown in fig. 10, including at least one processor 1001 and at least one interface circuit 1002. The processor 1001 and the interface circuit 1002 may be interconnected by wires. For example, the interface circuit 1002 may be used to receive signals from other devices (e.g., a memory of an electronic device). Also for example, the interface circuit 1002 may be used to send signals to other devices (e.g., the processor 1001 or a touch screen of an electronic device). Illustratively, the interface circuit 1002 may read instructions stored in the memory and send the instructions to the processor 1001. The instructions, when executed by the processor 1001, may cause the electronic device to perform the various steps in the embodiments described above. Of course, the chip system may further include other discrete devices, which is not specifically limited in this embodiment of the present application.
Embodiments of the present application further provide a computer-readable storage medium, where the computer-readable storage medium includes computer instructions, and when the computer instructions are executed on the electronic device, the electronic device is caused to perform various functions or steps performed by the electronic device in the foregoing method embodiments.
Embodiments of the present application further provide a computer program product, which, when running on an electronic device, causes the electronic device to perform each function or step performed by the electronic device in the foregoing method embodiments.
Through the description of the above embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules or units is only one logical functional division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another device, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may be one physical unit or a plurality of physical units, that is, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially or partially contributed to by the prior art, or all or part of the technical solutions may be embodied in the form of a software product, where the software product is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (16)

1. A control method of an electronic device, which is applied to an electronic device including a preset storage medium, includes:
acquiring and loading a mirror image file of the preset storage medium, wherein the mirror image file comprises a flag bit, and the flag bit is used for indicating to enter a fast boot mode;
operating a miniaturized kernel LK, and reading the zone bit from the mirror image file in the LK operation stage;
and if the flag bit is read, controlling the electronic equipment to enter a fastboot mode.
2. The method of claim 1, wherein reading the flag bits from the image file during the LK runtime phase comprises:
acquiring a first partition mark and a first offset according to a preset read-write interface, wherein the preset read-write interface is arranged in the image file of the LK;
and reading the zone bit according to the first zone mark and the first offset.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
and erasing the zone bit after reading the zone bit.
4. The method according to any one of claims 1 to 3,
the preset read-write interface is a hidden application program interface API.
5. The method according to any one of claims 1 to 4,
the zone bit is an encrypted character string.
6. The method of claim 5,
the flag bit is encrypted by a secure hash algorithm SHA 2.
7. A control method of an electronic device is applied to a system comprising the electronic device and a burning device, wherein the electronic device comprises a preset storage medium, and the method comprises the following steps:
the burning equipment generates an image file of the preset storage medium, wherein the image file comprises a flag bit which is used for indicating to enter a fast boot mode;
the burning equipment sends the mirror image file to the electronic equipment;
the electronic equipment loads the mirror image file;
the electronic equipment runs a miniaturized kernel LK, and the flag bit is read from the mirror image file in the LK running stage;
and if the flag bit is read, controlling the electronic equipment to enter a fastboot mode.
8. The method of claim 7, wherein the burning device generating the image file of the preset storage medium comprises:
writing the flag bit into a first text file, opening the first text file, reading the flag bit from the first text file and writing the flag bit into a buffer area;
determining a first partition mark and a first offset corresponding to the mark bit in the image file;
writing the flag bit of the buffer to a location indicated by the first partition flag and the first offset.
9. The method as claimed in claim 7 or 8, wherein said reading the flag bit from the image file in the LK running phase comprises:
acquiring a first partition mark and a first offset according to a preset read-write interface, wherein the preset read-write interface is arranged in the image file of the LK;
and reading the zone bit according to the first zone mark and the first offset.
10. The method according to any one of claims 7-9, further comprising:
and erasing the zone bit after reading the zone bit.
11. The method of claim 9,
the preset read-write interface is a hidden application program interface API.
12. The method according to any one of claims 7 to 11,
the zone bit is an encrypted character string.
13. The method of claim 12,
the flag bit is encrypted by a secure hash algorithm SHA 2.
14. An electronic device, characterized in that the electronic device comprises: a wireless communication module, memory, and one or more processors; the wireless communication module, the memory and the processor are coupled;
wherein the memory is to store computer program code comprising computer instructions; the computer instructions, when executed by the processor, cause the electronic device to perform the method of any of claims 1-6.
15. A computer-readable storage medium comprising computer instructions;
the computer instructions, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-6.
16. A system-on-chip, comprising one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through a line;
the chip system is applied to an electronic device comprising a communication module and a memory; the interface circuit to receive signals from the memory and to send the signals to the processor, the signals including computer instructions stored in the memory; the electronic device performs the method of any of claims 1-6 when the processor executes the computer instructions.
CN202210999164.4A 2022-08-19 2022-08-19 Control method and device of electronic equipment Pending CN115543454A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210999164.4A CN115543454A (en) 2022-08-19 2022-08-19 Control method and device of electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210999164.4A CN115543454A (en) 2022-08-19 2022-08-19 Control method and device of electronic equipment

Publications (1)

Publication Number Publication Date
CN115543454A true CN115543454A (en) 2022-12-30

Family

ID=84726501

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210999164.4A Pending CN115543454A (en) 2022-08-19 2022-08-19 Control method and device of electronic equipment

Country Status (1)

Country Link
CN (1) CN115543454A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107411A (en) * 2023-04-12 2023-05-12 荣耀终端有限公司 Starting-up method and related device
CN116382810A (en) * 2023-06-06 2023-07-04 荣耀终端有限公司 META mode starting method, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102207881A (en) * 2011-07-07 2011-10-05 电子科技大学 Quick operation system start-up method based on Android
CN103905631A (en) * 2012-12-31 2014-07-02 比亚迪股份有限公司 Mobile terminal and MEDOM chip and LINUX chip unified downloading method thereof
CN105786544A (en) * 2014-12-25 2016-07-20 研祥智能科技股份有限公司 Method for booting computer system rapidly and booting system of computer
CN113485764A (en) * 2021-07-05 2021-10-08 珠海格力电器股份有限公司 Embedded system, control method and device thereof and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102207881A (en) * 2011-07-07 2011-10-05 电子科技大学 Quick operation system start-up method based on Android
CN103905631A (en) * 2012-12-31 2014-07-02 比亚迪股份有限公司 Mobile terminal and MEDOM chip and LINUX chip unified downloading method thereof
CN105786544A (en) * 2014-12-25 2016-07-20 研祥智能科技股份有限公司 Method for booting computer system rapidly and booting system of computer
CN113485764A (en) * 2021-07-05 2021-10-08 珠海格力电器股份有限公司 Embedded system, control method and device thereof and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107411A (en) * 2023-04-12 2023-05-12 荣耀终端有限公司 Starting-up method and related device
CN116107411B (en) * 2023-04-12 2023-08-29 荣耀终端有限公司 Starting-up method and related device
CN116382810A (en) * 2023-06-06 2023-07-04 荣耀终端有限公司 META mode starting method, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN115543454A (en) Control method and device of electronic equipment
CN110633090B (en) Patch method, related device and system
US20220308899A1 (en) Application Start Method and Electronic Device
WO2021185105A1 (en) Method for switching between sim card and esim card, and electronic device
CN111124503B (en) Automatic activation method of NFC application and terminal
CN110515646B (en) Differential upgrading method and related equipment
WO2021159746A1 (en) File sharing method and system, and related device
WO2020015259A1 (en) Data backup method and terminal
WO2021151350A1 (en) Method and apparatus for loading dynamic link library
CN115499897B (en) WiFi network access method and related device
CN114301899B (en) Data transmission method, system, electronic device and storage medium
CN112860445A (en) Method and terminal for sharing data between fast application and native application
WO2022228065A1 (en) Function skipping method and electronic device
US10552113B2 (en) Electronic device and method for controlling operation thereof
CN116382810A (en) META mode starting method, electronic equipment and storage medium
CN113784331B (en) Method and device for updating system data of user identity module card
CN116669020B (en) Password management method, password management system and electronic equipment
CN113849194B (en) Burning method and terminal equipment
CN113901485B (en) Application program loading method, electronic device and storage medium
CN114443109B (en) Patch repair method, electronic device and storage medium
CN114579181A (en) Patching method, related equipment and system
CN113760191A (en) Data reading method, data reading apparatus, storage medium, and program product
CN114968657A (en) Data backup method and electronic equipment
CN112446044A (en) Log desensitization method and electronic equipment
CN115952564B (en) Data writing method and terminal equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination