CN107526608B - OTA upgrade package upgrading method and device - Google Patents

OTA upgrade package upgrading method and device Download PDF

Info

Publication number
CN107526608B
CN107526608B CN201710429312.8A CN201710429312A CN107526608B CN 107526608 B CN107526608 B CN 107526608B CN 201710429312 A CN201710429312 A CN 201710429312A CN 107526608 B CN107526608 B CN 107526608B
Authority
CN
China
Prior art keywords
upgrade package
storage path
address space
mapping relation
file
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.)
Active
Application number
CN201710429312.8A
Other languages
Chinese (zh)
Other versions
CN107526608A (en
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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology 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 Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201710429312.8A priority Critical patent/CN107526608B/en
Publication of CN107526608A publication Critical patent/CN107526608A/en
Application granted granted Critical
Publication of CN107526608B publication Critical patent/CN107526608B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an OTA upgrade package upgrade method and equipment, which are applied to an intelligent system and used for reading an encryption upgrade package from a specified storage path for storing the encryption upgrade package; decrypting the encrypted upgrade package, writing the upgrade package obtained after decryption into an address space under the specified storage path, and generating a mapping relation file by using the address space and an identifier for indexing the address space; and when the specified storage path is different from the storage path of the mapping relation file, reading the decrypted upgrade package according to the mapping relation file, and starting upgrading after reading the upgrade package. When the OTA of the intelligent system is upgraded, the invention can generate the mapping file according to the upgrade package and acquire the upgrade package information from the mapping file, thereby solving the problem that the OTA upgrade of the upgrade package downloaded to the SD card with the built-in encryption fails.

Description

OTA upgrade package upgrading method and device
Technical Field
The invention relates to the technical field of communication, in particular to an OTA upgrade package upgrading method. The invention also relates to an intelligent device.
Background
In present intelligent terminal, from android 6.0 version, the SD card is in the adopt mode for the intelligent system support (acceptance), the adopt mode is after the SD card is formatted, set up to the built-in storage of android system, can enlarge the inside memory space of system to a certain extent to the upgrade package can be encrypted before depositing in the SD card that is in built-in storage state, lead to the unable direct SD card of follow of system after the discernment upgrade package after encrypting, can improve the privacy nature of upgrade package.
After an upgrade package is downloaded to an SD card by using an over-the-air (OTA) technology, the android system is required to be restarted to enter a recovery mode, in the mode, upgrade package data are loaded into an operating memory, then upgrade operation of the upgrade package is started, when the SD card is detected to be in a built-in storage state, an encryption algorithm in the android system encrypts the upgrade package, and the encrypted upgrade package is stored in an address space of the SD card.
Because the encrypted upgrade packet data is messy codes and the format is changed, the information of the upgrade packet cannot be identified from the SD card, and thus normal mounting operation cannot be executed to start upgrading the upgrade packet.
In view of the above, it is desirable to implement an upgrade scheme when an upgrade package is downloaded to a built-in SD card, so as to solve the problem of OTA upgrade failure when the upgrade package is downloaded to the built-in encrypted SD card.
Disclosure of Invention
The invention provides an OTA upgrade package upgrade method and intelligent equipment, which are used for solving the problem of OTA upgrade failure of an upgrade package downloaded to a built-in encrypted SD card by generating a mapping file from the upgrade package and writing the mapping file into a cache memory area.
In order to achieve the technical purpose, an embodiment of the present invention provides an OTA upgrade package upgrade method, which is applied to an intelligent system, and the method includes:
the intelligent system reads the encrypted upgrade package from a specified storage path for storing the encrypted upgrade package;
decrypting the encrypted upgrade package, writing the upgrade package obtained after decryption into an address space under the specified storage path, and generating a mapping relation file by using the address space and an identifier for indexing the address space;
and when the specified storage path is different from the storage path of the mapping relation file, reading the decrypted upgrade package according to the mapping relation file, and starting upgrading after reading the upgrade package.
Further, the air conditioner is provided with a fan,
in the step that the intelligent system reads the encrypted upgrade package from the specified storage path for storing the encrypted upgrade package, the method further comprises the following steps:
and when detecting that the specified storage path is in a built-in storage state, respectively reading the block data of the encrypted upgrade package from different address spaces under the specified storage path.
Preferably, the first and second electrodes are formed of a metal,
in the process of generating the mapping relationship file by the address space and the identifier used for indexing the address space, the method further comprises the following steps:
decrypting the blocks of each encrypted upgrade package, and writing the decrypted blocks into different address spaces under the specified storage path;
and generating a mapping relation file by using each address space and the identifier for indexing the address space.
Further comprising:
and writing the mapping relation file into a Cache area of a Cache memory, and writing a corresponding path of the Cache area into a storage path different from the SD card.
Further, in the present invention,
after the intelligent system is restarted, entering a recovery mode; in the recovery mode, judging whether the specified storage path is the same as the mapping relation file, if not, loading the address space and the identifier in the mapping relation file into an operating memory;
and searching the address space mapped with the identifier, and loading the upgrade packet data in the address space into the running memory.
Correspondingly, the embodiment of the invention also provides an intelligent device, which comprises:
the reading module is used for reading the encrypted upgrade package from a specified storage path for storing the encrypted upgrade package;
the generating module is used for decrypting the encrypted upgrade package, writing the upgrade package obtained after decryption into an address space under the specified storage path, and generating a mapping relation file by using the address space and an identifier used for indexing the address space;
and the upgrading module reads the upgrading packet obtained after decryption according to the mapping relation file when the specified storage path is different from the storage path of the mapping relation file, reads the upgrading packet and starts upgrading.
Further comprising:
and the writing module is used for writing the blocks of the encrypted upgrade package into different address spaces under the specified storage path when the specified storage path is detected to be in a built-in storage state.
Decrypting the blocks of each encrypted upgrade package, and writing the decrypted blocks into different address spaces under the specified storage path;
and generating a mapping relation file by using each address space and the identifier for indexing the address space.
And writing the mapping relation file into a Cache area of a Cache memory, and writing a corresponding path of the Cache area into a storage path different from the SD card.
The judging module is used for entering a recovery mode after the intelligent system is restarted, judging whether the specified storage path is the same as the mapping relation file or not in the recovery mode, and if not, loading the address space and the identifier in the mapping relation file into an operating memory;
and searching the address space mapped with the identifier, and loading the upgrade packet data in the address space into the running memory.
In summary, compared with the prior art, the technical solutions proposed by the embodiments of the present invention have the following beneficial effects:
the invention discloses an OTA upgrade package upgrade method and intelligent equipment, which are applied to an intelligent system and used for reading an encryption upgrade package from a specified storage path for storing the encryption upgrade package; decrypting the encrypted upgrade package, writing the upgrade package obtained after decryption into an address space under the specified storage path, and generating a mapping relation file by using the address space and an identifier for indexing the address space; and when the specified storage path is different from the storage path of the mapping relation file, reading the decrypted upgrade package according to the mapping relation file, and starting upgrading after reading the upgrade package. When the OTA of the intelligent system is upgraded, the invention can generate the mapping file according to the upgrade package and acquire the upgrade package information from the mapping file, thereby solving the problem that the OTA upgrade of the upgrade package downloaded to the SD card with the built-in encryption fails.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solution of the present invention is further described in detail by the accompanying drawings and embodiments.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
FIG. 1 is a schematic flow chart of an OTA upgrade package upgrade method according to the present invention;
FIG. 2 is a diagram of the hexadecimal format of the upgrade package file in the SD according to the embodiment of the present invention;
FIG. 3 is a plaintext diagram illustrating the decrypted upgrade packet data according to an embodiment of the invention;
FIG. 4 is a diagram of a mapping package according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an intelligent device according to the present invention.
Detailed Description
As described in the background art, since the SD card is formatted as the encrypted built-in storage by the user, the recovery mode cannot perform the normal mount operation at this time, so that the OTA upgrade package on the built-in SD card cannot be acquired in the recovery mode, and the problem that the OTA cannot be upgraded in the smart device occurs.
In view of the above problems in the prior art, the present application provides an OTA upgrade package upgrade method. According to the method, the upgrading packet is generated into the mapping file, and the mapping file is written into the Cache high-speed buffer memory, so that the problem that OTA upgrading of the upgrading packet downloaded to the SD card with the built-in encryption in the prior art is failed is solved, and the user experience is improved.
As shown in fig. 1, a schematic flow chart of an OTA upgrade method provided by an embodiment of the present invention includes the following steps:
s101, the intelligent system reads the encrypted upgrade package from a designated storage path for storing the encrypted upgrade package.
As described in the background art, in the smart device used in the prior art, when the SD memory card is formatted as the built-in memory card by the user, the OTA upgrade package may be downloaded to the built-in SD memory card, and the SD memory card may be encrypted after being formatted in order to protect the private data of the user. At this time, when the mobile phone enters the recovery mode and is upgraded, the smart device cannot execute normal mounting operation, so that the OTA upgrade package on the built-in SD memory card cannot be acquired in the recovery mode. Therefore, the core technical idea of the invention is that the intelligent device generates the update package into the mapping file through the Ioctl function command, writes the mapping file into the cache memory area, and achieves the purpose of updating by using the mapping file when the device terminal is updated. The situation that the intelligent device cannot mount the SD memory card to cause upgrading failure can be effectively avoided, and the specific implementation process will be elaborated in the following discussion.
The recovery mode mentioned above refers to a mode (similar to windows PE or DOS) in which data or system modifications can be made inside the android. In this mode, a new intelligent system can be refreshed, or an existing system can be backed up or upgraded, and factory settings can be restored. Mount formatting operations may be performed.
Concept regarding mounting: when a device is to be used, for example, a device such as a formatted partition, an optical disc, or software in a hard disk is to be read, the device must be first mapped to a directory, and the directory is called a "mount point" so that the device can be read, and the mapping action is "mount". Physical partition details are masked out. The user has only a unified logical concept. All things are files. For example, Mount command in Linux can implement Mount: mount [ -fnrsvw ] [ -t vfstype ] [ -o options ] device dir.
OTA (Over-the-Air Technology) is a Technology for remote management of SIM card data and applications Over the Air interface of a mobile communications (GSM, CDMA, etc.) network. The existing OTA is a novel technology, and is a standard software upgrading mode provided by an Android system and an iSO system.
Cache is a special memory subsystem in which frequently used data is copied to facilitate fast access. The cache memory of the memory stores the contents of frequently accessed RAM locations and the memory addresses of these data items. When the processor references an address in memory, the cache checks to see if the address is present. If the address is stored, returning the data to the processor; if the address is not saved, a normal memory access is made. Since cache memory is always faster than main RAM memory, cache memory is often used when the RAM access speed is lower than the speed of the microprocessor.
Ioctl: is a function of managing the I/O channels of a device in a device driver
In a preferred embodiment of the present invention, reading, by the intelligent system, the encrypted upgrade package from a specified storage path in which the encrypted upgrade package is stored specifically includes:
and when the specified storage path is detected to be in a built-in storage state of the intelligent system, respectively reading the block data of the encrypted upgrade package from different address spaces under the specified storage path.
S102, decrypting the encrypted upgrade package, writing the upgrade package obtained after decryption into an address space under the specified storage path, and generating a mapping relation file by using the address space and an identifier used for indexing the address space;
in a preferred embodiment of the present invention, in the process of generating a mapping relationship file by using the address space and an identifier used for indexing the address space, the method further includes:
decrypting the blocks of each encrypted upgrade package, and writing the decrypted blocks into different address spaces under the specified storage path; and generating a mapping relation file by using each address space and the identifier for indexing the address space.
In a specific embodiment, the ioctl command informs the system kernel to obtain the physical device initial address stored in the upgrade package and blocks (blocks) where the upgrade package is located, where the blocks are anonymous functions (i.e., functions without names) with local variables, which are also called closures. Blocks may be continuous or discrete.
But since the data actually stored is encrypted, it cannot be used directly. After the physical address of the upgrade package file is acquired, data in the physical address needs to be read, a system kernel decryption template is called to decrypt the encrypted data into a plaintext, and the decrypted data is written into the same physical address.
S103, when the designated storage path is different from the storage path of the mapping relation file, reading the decrypted upgrade package according to the mapping relation file, and starting upgrade after reading the upgrade package.
Preferably, the mapping relationship file is written into a Cache area of a Cache memory, and a corresponding path of the Cache area is written into a storage path different from the SD card.
After the mapping relationship file is written into a Cache area of a Cache memory and a corresponding path of the Cache area is written into a storage path different from the SD card, the method further comprises the following steps: after the intelligent system is restarted, entering a recovery mode; in the recovery mode, judging whether the specified storage path is the same as the mapping relation file, if not, loading the address space and the identifier in the mapping relation file into an operating memory; and searching the address space mapped with the identifier, and loading the upgrade packet data in the address space into the running memory.
There are many methods for entering recovery mode, such as entering a software portion in an intelligent device, entering a device shutdown key combination, or entering a computer through a USB serial interface control, and these methods do not affect the scheme of the present application, and are within the scope of protection of the present application.
It should be noted that the storage path different from the SD card is any storage path except for the storage path stored in the encrypted built-in SD memory card, and it is a preferred embodiment of the present invention that the mapping relationship file is written into the Cache area and the upgrade package information is acquired from the Cache area.
And finally, the intelligent system can acquire the decrypted OTA upgrade file from the memory and carry out OTA upgrade operation of the local terminal.
In summary, compared with the prior art, the technical solutions proposed by the embodiments of the present invention have the following beneficial effects:
the invention discloses an OTA upgrade package upgrade method and intelligent equipment, which are applied to an intelligent system and used for reading an encryption upgrade package from a specified storage path for storing the encryption upgrade package; decrypting the encrypted upgrade package, writing the upgrade package obtained after decryption into an address space under the specified storage path, and generating a mapping relation file by using the address space and an identifier for indexing the address space; and when the specified storage path is different from the storage path of the mapping relation file, reading the decrypted upgrade package according to the mapping relation file, and starting upgrading after reading the upgrade package. When the OTA of the intelligent system is upgraded, the invention can generate the mapping file according to the upgrade package and acquire the upgrade package information from the mapping file, thereby solving the problem that the OTA upgrade of the upgrade package downloaded to the SD card with the built-in encryption fails.
In order to further illustrate the technical idea of the present invention, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are a part of embodiments of the present invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
The embodiment of the invention provides an OTA (over the air) upgrading method for an android mobile phone. The scheme of the invention is not limited to the android system. As described in the background art, the preferred embodiment of the present application is performed in an environment of the Android version 6.0 and higher, and the specific implementation scheme is as follows:
step one, under an Android system, after a request for detecting and upgrading a new version from an OTA server is received, an upgrade package is downloaded to a local terminal.
The mobile phone OTA upgrading is a standard software upgrading mode provided by an Android system and an apple iSO system, can be used for upgrading the system without loss, mainly adopts the steps of automatically downloading an OTA upgrading package and automatically upgrading through a network (including WIFI and 3G), is not limited, and also supports the upgrading from downloading the OTA upgrading package to an SD card.
And step two, after the upgrade package is downloaded, when the Android system receives an upgrade starting command, judging whether the path of the upgrade package is stored on the SD card with the built-in encryption. If yes, the physical address analysis and decryption operation of file storage is executed before upgrading. When the physical address analysis operation is completed, a file displayed in the Android mobile phone file management system is notified to a mobile phone kernel through an ioctl command, and a device initial address where the file is stored and blocks (which may be continuous or discrete) where the file is located are obtained, that is, an actual address where the file is stored on a memory, so as to form a mapping relation file, wherein the mapping relation file comprises a device address where the file is located and each distributed physical address interval.
For encrypted equipment in the Android mode, the Android can virtualize a corresponding logic equipment, the physical equipment stores encrypted data, and the logic equipment is used for encrypting and decrypting the data. And reading data from the encrypted physical device, and displaying the read encrypted data to a user after the logic device executes decryption operation on the read encrypted data. When data is written to the encrypted physical device, the logical device encrypts the data to be written first and then writes the encrypted data to the physical device.
Since the actually stored data is encrypted, it cannot be directly used. After the physical address of the upgrade package file is acquired, data in the physical address needs to be read, a system kernel decryption template is called to decrypt the encrypted data into a plaintext, and the decrypted data is written into the same physical address.
When the encrypted SD card is not mountable, all files mentioned in the above steps, which are actually present in the SD card device, are hexadecimal data as shown in fig. 2.
For example, when the device name is encrypted in fig. 2, the corresponding hexadecimal form is:
00000040h:00 00 00 00 00 00 00 00 00 00 00 00 B9 85 DC 10;
the encrypted device name data is decrypted into a plaintext by calling a system kernel decryption template, and as shown in fig. 3, the decrypted plaintext is:
00000040h:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00; /dev/block/mmcb1k1p1
when the total number of device blocks occupied by a file is encrypted, as shown in fig. 2:
00000110h:00 00 00 00 32 50 42 32 4C 52 32 52 46 32 47 52;
decrypting the total data of the device blocks occupied by the encrypted file into a plaintext by calling a system kernel decryption template, wherein the decrypted plaintext is shown in fig. 3:
00000110h:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00;3
accordingly, the encrypted and decrypted plaintext of the upgrade package information data is not listed, and please refer to fig. 2 and fig. 3 in detail.
In the Android system, the address interval of the OTA file in fig. 3 needs to be found out according to the path of the OTA file, wherein when the upgrade packet data is stored in blocks, the upgrade packet data can be dispersed in different address intervals, which can be continuous adjacent address intervals or discrete address intervals, and after decryption, the decrypted data is written into the SD card device according to the physical address of the decrypted data, and a mapping packet is generated.
As shown in fig. 4, which is a form diagram of a mapping package in the embodiment of the present invention, it can be obviously seen that the mapping package includes information such as a device name where an upgrade package file is located, a byte number where the file is located, a block size of a device where the file is located, a total number of device blocks occupied by the file, and addresses of intervals where the file is located.
For example, 49652 and 4096 in fig. 4 respectively identify the number of bytes and the device block size in which the file resides, and 2100 and 2102 respectively identify the start address and the end address of the second span address in which the file resides. The specific mapping relationship information is shown in fig. 4.
Some terms are explained in this step as follows:
physical address: to store information in units of bytes in memory, each byte unit is assigned a unique memory address, called physical address, also called real address or absolute address, for proper storage or retrieval of information.
In addition, the address space includes a physical space as well as a virtual space.
Ioctl is a function in the device driver that manages the I/O channel of the device. Managing I/O channels is controlling some characteristics of the device. The ioctl function is an attribute component in the file structure, and if the driver provides support for ioctl, the user can use the ioctl function to control the I/O channel of the device in the user program.
The first address: the address of the first location in the storage area occupied by the variable is relative to a segment of memory space.
Blocks: anonymous functions with local variables (i.e., functions without names), also called closures.
And step three, writing the mapping file generated in the step two into a cache area, writing a corresponding path into a command, restarting the mobile phone and sending a command for entering a recovery mode.
The main function of the/cache in the android partition is to download cache, for example, the directory stored in the apk downloaded by the electronic market is in the/cache/download. While the radio is being brushed on, the img of the radio is decompressed to/under the cache. The upgrade package is cached when the mobile phone is upgraded online.
Recovery mode refers to a mode (similar to windows PE or DOS) in which data or system modifications can be made inside the android. In this mode, a new intelligent system can be refreshed, or an existing system can be backed up or upgraded, and factory settings can be restored.
And step four, analyzing the parameters after entering the recovery mode, judging whether the corresponding path in the command is the path of the upgrade package or the path in the mapping table, applying for a section of memory space if the corresponding path in the command is the path in the mapping table, and sequentially loading the physical address of the upgrade package recorded in the mapping table into the memory, so that the OTA upgrade file which is completed after decryption can be obtained in the memory.
In addition, the android mobile phone system reads the hexadecimal data in fig. 2 into the memory directly according to the physical address where the upgrade package file recorded in the mapping package is located, and all information of a completed upgrade package is in the memory, so that OTA upgrade can be performed.
In a specific application scene, the application also provides a corresponding detailed code of the OTA upgrading scheme of the android mobile phone. The following is the corresponding text description of the important part of the code:
firstly, reading a mapping table, acquiring the physical equipment where the file is located, searching the name of the upgrade file, and decrypting. In the program, the name of the upgrade file is not the name displayed on the mobile phone screen device, and needs to be parsed. And then, establishing a mapping table, acquiring related information of the file according to the upgrade package path, calculating the number of blocks occupied by the upgrade package, defining a section, storing the address section stored by the upgrade package, searching and acquiring physical address data of the decrypted upgrade package in blocks, informing Android updating progress, acquiring the physical address of the data, and writing back the decrypted data.
And writing the total block number occupied by the file in the mapping table, and writing the physical address block section of the data in the mapping table. And then, analyzing and decrypting the upgrade file, acquiring an absolute path where the upgrade patch is located, acquiring the physical equipment where the upgrade patch is located, and translating the equipment name and whether the equipment is encrypted. And if the path of the file is the built-in SD device, starting to execute address analysis and decryption operation, and finally receiving Android upgrade file analysis operation.
Correspondingly, the embodiment of the invention also provides the intelligent device, which is shown in fig. 4.
A reading module 41, configured to read the encrypted upgrade package from a specified storage path in which the encrypted upgrade package is stored.
And the generating module 42 is configured to decrypt the encrypted upgrade package, write the upgrade package obtained after decryption into an address space under the specified storage path, and generate a mapping relationship file by using the address space and an identifier used for indexing the address space.
And the upgrading module 43, when the specified storage path is different from the storage path of the mapping relation file, reading the upgrading packet obtained after decryption according to the mapping relation file, and starting upgrading after reading the upgrading packet.
Further comprising:
and the writing module 44 is used for reading the block data of the encrypted upgrade package from different address spaces under the specified storage path respectively when detecting that the specified storage path is in a built-in storage state.
Decrypting the blocks of each encrypted upgrade package, and writing the decrypted blocks into different address spaces under the specified storage path;
and generating a mapping relation file by using each address space and the identifier for indexing the address space.
And writing the mapping relation file into a Cache area of a Cache memory, and writing a corresponding path of the Cache area into a storage path different from the SD card.
Further, an embodiment of the present invention further provides a determining module:
a determining module 45, configured to enter a recovery mode after the intelligent system is restarted, in the recovery mode, determine whether the specified storage path is the same as the mapping relation file, and if not, load the address space and the identifier in the mapping relation file into an operating memory;
and searching the address space mapped with the identifier, and loading the upgrade packet data in the address space into the running memory.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present invention.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above-mentioned invention numbers are merely for description and do not represent the merits of the implementation scenarios.
The above disclosure is only a few specific implementation scenarios of the present invention, however, the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.

Claims (10)

1. A method for upgrading an OTA upgrade package is applied to an intelligent system, and is characterized by comprising the following steps:
reading the encrypted upgrade package from a designated storage path for storing the encrypted upgrade package;
decrypting the encrypted upgrade package, writing the upgrade package obtained after decryption into an address space under the specified storage path, and generating a mapping relation file by using the address space and an identifier for indexing the address space;
in a recovery mode, when the specified storage path is different from the storage path of the mapping relation file, reading the decrypted upgrade package according to the mapping relation file, reading the upgrade package and starting upgrading;
and writing the mapping relation file into a cache area, writing a corresponding path into a command, restarting the mobile phone and sending a command for entering a recovery mode.
2. The method according to claim 1, wherein reading, in the intelligent system, the encrypted upgrade package from a specified storage path in which the encrypted upgrade package is stored specifically comprises:
and when the specified storage path is detected to be in a built-in storage state of the intelligent system, respectively reading the block data of the encrypted upgrade package from different address spaces under the specified storage path.
3. The method according to any one of claims 1 to 2, wherein decrypting the encrypted upgrade package, writing the upgrade package obtained after decryption into an address space under the specified storage path, and generating a mapping relationship file by using the address space and an identifier for indexing the address space specifically includes:
decrypting the block data of each encrypted upgrade packet, and writing the decrypted block data into different address spaces under the specified storage path;
and generating a mapping relation file by using each address space and the identifier for indexing the address space.
4. The method according to claim 3, wherein, in decrypting the encrypted upgrade package, writing the upgrade package obtained after decryption into an address space under the specified storage path, and generating a mapping relationship file by using the address space and an identifier used for indexing the address space, the method further comprises:
and writing the mapping relation file into a Cache area of a Cache memory, wherein the storage path of the Cache area is different from the specified storage path.
5. The method according to claim 1 or 4, wherein when the specified storage path is different from the storage path of the mapping relation file, reading the upgrade package obtained after the decryption according to the mapping relation file, and starting the upgrade after reading the upgrade package, specifically further includes:
restarting the intelligent system and then entering a recovery mode;
in the recovery mode, judging whether the specified storage path is the same as the mapping relation file, if not, loading the address space and the identifier in the mapping relation file into an operating memory;
and searching the address space mapped with the identifier, and loading the upgrade package in the address space into the running memory.
6. A smart device, comprising:
the reading module is used for reading the encrypted upgrade package from a specified storage path for storing the encrypted upgrade package;
the generating module is used for decrypting the encrypted upgrade package, writing the upgrade package obtained after decryption into an address space under the specified storage path, and generating a mapping relation file by using the address space and an identifier used for indexing the address space;
the updating module reads the updating package obtained after decryption according to the mapping relation file when the specified storage path is different from the storage path of the mapping relation file, reads the updating package and starts updating;
and writing the mapping relation file into a cache area, writing a corresponding path into a command, restarting the mobile phone and sending a command for entering a recovery mode.
7. The apparatus of claim 6, further comprising:
and the writing module is used for respectively reading the block data of the encrypted upgrade package from different address spaces under the specified storage path when the specified storage path is detected to be in a built-in storage state.
8. The apparatus of any of claims 6-7, further comprising:
decrypting the blocks of each encrypted upgrade package, and writing the decrypted blocks into different address spaces under the specified storage path;
and generating a mapping relation file by using each address space and the identifier for indexing the address space.
9. The apparatus of claim 8, further comprising:
and writing the mapping relation file into a Cache area of a Cache memory, wherein the storage path of the Cache area is different from the specified storage path.
10. The apparatus of claim 6 or 9, further comprising:
the judging module is used for entering a recovery mode after the intelligent system is restarted, judging whether the specified storage path is the same as the mapping relation file or not in the recovery mode, and if not, loading the address space and the identifier in the mapping relation file into an operating memory;
and searching the address space mapped with the identifier, and loading the upgrade package in the address space into the running memory.
CN201710429312.8A 2017-06-08 2017-06-08 OTA upgrade package upgrading method and device Active CN107526608B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710429312.8A CN107526608B (en) 2017-06-08 2017-06-08 OTA upgrade package upgrading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710429312.8A CN107526608B (en) 2017-06-08 2017-06-08 OTA upgrade package upgrading method and device

Publications (2)

Publication Number Publication Date
CN107526608A CN107526608A (en) 2017-12-29
CN107526608B true CN107526608B (en) 2021-05-25

Family

ID=60748084

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710429312.8A Active CN107526608B (en) 2017-06-08 2017-06-08 OTA upgrade package upgrading method and device

Country Status (1)

Country Link
CN (1) CN107526608B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110764813A (en) * 2019-10-31 2020-02-07 京东方科技集团股份有限公司 Upgrading method of system software and running method thereof
CN111078471B (en) * 2019-12-06 2023-09-05 深圳创维-Rgb电子有限公司 System fault recovery method and device for display device and computer storage medium
CN113810446A (en) * 2020-06-16 2021-12-17 上海赫千电子科技有限公司 Safety upgrading management method for ECU of vehicle-mounted network
CN112764827B (en) * 2020-12-31 2023-04-07 重庆广播电视大学重庆工商职业学院 Java class hot loading method with safety verification
CN112860287A (en) * 2021-01-18 2021-05-28 深圳市锐尔觅移动通信有限公司 System program upgrading method and device, computer equipment and storage medium
CN115357295B (en) * 2022-10-21 2023-03-31 荣耀终端有限公司 System rollback method, device and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012831A (en) * 2010-12-08 2011-04-13 四川金网通电子科技有限公司 Over-the-air technology (OTA) upgrading method based on Linux platform
CN105912369A (en) * 2016-04-26 2016-08-31 青岛海信移动通信技术股份有限公司 System upgrading method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102012831A (en) * 2010-12-08 2011-04-13 四川金网通电子科技有限公司 Over-the-air technology (OTA) upgrading method based on Linux platform
CN105912369A (en) * 2016-04-26 2016-08-31 青岛海信移动通信技术股份有限公司 System upgrading method and device

Also Published As

Publication number Publication date
CN107526608A (en) 2017-12-29

Similar Documents

Publication Publication Date Title
CN107526608B (en) OTA upgrade package upgrading method and device
CN107870968B (en) Performing real-time updates to a file system volume
US9301164B2 (en) Method, system, and terminal for performing system update between mobile communication terminals
US20180157863A1 (en) Method and apparatus for storing privacy information based on application
US9582513B2 (en) Accessing data in a compressed container through dynamic redirection
US10204235B2 (en) Content item encryption on mobile devices
US20150095652A1 (en) Encryption and decryption processing method, apparatus, and device
CN110022558B (en) Method for encrypting and decrypting upgrade package, electronic device and storage medium
EP2631795A1 (en) Terminal and method for assigning permission to application
CN104866389A (en) Data recovery method as well as data backup method, device and system based on mobile operating system
US11455430B2 (en) Secure element and related device
WO2018157716A1 (en) Smart card
CN110597542A (en) Automatic OTA (over the air) software upgrading method and device and electronic equipment
CN105678183A (en) User data management method and device for intelligent terminal
CN103229150A (en) Data control method and system
CN111427860A (en) Distributed storage system and data processing method thereof
CN115357295B (en) System rollback method, device and storage medium
CN111143879A (en) Android platform SD card file protection method, terminal device and storage medium
EP3992783A1 (en) Patch releasing method, server and terminal device
CN114327548A (en) Software upgrading method and related device
CN111046389A (en) Method for securely updating firmware components and portable computer station for implementation
CN112084524B (en) USB flash disk access method and USB flash disk
EP3764224B1 (en) Resource permission processing method and apparatus, and storage medium and chip
US8468493B2 (en) Information processing apparatus, information processing method, and program
US11995451B2 (en) Resource permission processing method and apparatus, storage medium, and chip

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266555, No. 218, Bay Road, Qingdao economic and Technological Development Zone, Shandong

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266555, No. 218, Bay Road, Qingdao economic and Technological Development Zone, Shandong

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.