IP Library Granted Patent US 8,910,139
Granted Patent B2
US 8,910,139 · App. 13/712,646 · Granted Dec 9, 2014

Method for processing firmware based on firmware over the air technology, apparatus, and system

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,910,139
App. No.
13/712,646
Granted
Dec 9, 2014
Kind
B2
Abstract

Embodiments of the present invention provide a method for processing firmware based on a firmware over the air technology, an apparatus, and a system. The method includes: performing check processing on at least one firmware upgrade file to form first check data; performing encryption processing on the first check data to form first encryption data; and combining the first encryption data, the first check data, and the firmware upgrade file to a firmware upgrade package, and sending the firmware upgrade package through an air interface to a mobile terminal. The apparatus includes: a checking module, an encrypting module, and a processing module. The system includes: a server and a mobile terminal. The embodiments of the present invention, by performing check, encryption, and combination processing on the firmware upgrade file, quickly implements upgrade of multiple pieces of firmware, and improves security of the mobile terminal.

Claims (52)

1. A method for providing firmware upgrades based on a firmware over the air technology, comprising:

performing, by a server, check processing on at least one firmware upgrade file to form first check data corresponding to the at least one firmware upgrade file;

performing, by the server, encryption processing on the first check data to form first encryption data; and

combining, by the server, the first encryption data, the first check data, and the at least one firmware upgrade file to form a firmware upgrade package, and sending, by the server, the firmware upgrade package, through an air interface, to a mobile terminal;

wherein performing check processing to form first check data comprises:

performing cyclic redundancy check (CRC) processing, by the server, on the at least one firmware upgrade file to form CRC data as the first check data; or

performing Message-Digest Algorithm 5 (MD5) processing, by the server, on the at least one firmware upgrade file to form MD5 information check data as the first check data;

wherein performing encryption processing on the first check data to form the first encryption data comprises:

when the first check data is CRC data, performing MD5 processing on the CRC data to form MD5 information corresponding to the CRC data, and performing a private key encryption on the MD5 information corresponding to the CRC data to form the first encryption data; or

when the first check data is MD5 information check data, performing CRC processing on the MD5 information check data to form CRC data corresponding to the MD5 information check data, and performing a private key encryption on the CRC data corresponding to the MD5 information check data to form the first encryption data;

wherein the private key is internally stored in the server and matches with a public key internally stored in the mobile terminal.

2. The method according to claim 1 , further comprising:

obtaining, by the server, multiple firmware upgrade files before performing the check processing on the at least one firmware upgrade wherein the firmware upgrade package comprises the obtained multiple firmware upgrade files.

3. A method for upgrading firmware based on a firmware over the air technology, comprising:

receiving, by a mobile terminal, through an air interface, a firmware upgrade package sent by a server, and storing the firmware upgrade package in a cache partition, wherein a file system of the firmware upgrade package is not supported the mobile terminal;

reading, by the mobile terminal, the firmware upgrade package stored in the cache partition, wherein the firmware upgrade package comprises: first encryption data, first check data, and a firmware upgrade file;

performing, by the mobile terminal, decryption on the first encryption data in the firmware upgrade package to form second check data; and

when the second check data is consistent with the first check data, performing, by the mobile terminal, an upgrade operation on corresponding firmware according to the firmware upgrade file in the firmware upgrade package;

wherein reading the firmware upgrade package stored in the cache partition comprises:

traversing the cache partition to obtain file headers corresponding to the firmware upgrade package;

selecting, from the file headers corresponding to the firmware upgrade package, a valid file header as a target file header; and

reading, according to an identity in the target file header, data packets corresponding to the identity, and rearranging the data packets corresponding to the identity to form the firmware upgrade package.

4. The method according to claim 3 , wherein selecting the valid file header as the target file header comprises:

selecting, from valid file headers corresponding to the firmware upgrade package, a file header with a maximum block number as the target file header; and

when multiple file headers have the maximum block number, selecting, from the multiple file headers, a file header that has a maximum flash address as the target file header.

5. The method according to claim 4 , wherein before performing the upgrade operation, the method further comprises:

performing check processing on the firmware upgrade file to form third check data;

verifying whether the third check data is consistent with the first check data in the firmware upgrade package; and

if the third check data is consistent with the first check data in the firmware upgrade package, performing the upgrade operation on the corresponding firmware according to the firmware upgrade file in the firmware upgrade package; or

if the third check data is not consistent with the first check data in the firmware upgrade package, discarding the firmware upgrade file without performing the upgrade operation on the corresponding firmware according to the firmware upgrade file.

6. The method according to claim 3 , wherein performing decryption on the first encryption data comprises:

performing public key decryption, by the mobile terminal, on the first encryption data in the firmware upgrade package;

wherein the public key is internally stored in the mobile terminal and matches with a private key internally stored in the server.

7. The method according to claim 6 , wherein after performing decryption on the first encryption data, the method further comprises:

(a) when the first check data is cyclic redundancy check (CRC) data, and the first encryption data is data obtained by private key encryption being performed on the CRC data, directly comparing the second check data and the first check data to determine whether the second check data and the first check data are the same;

(b) when the first check data is Message-Digest Algorithm 5 (MD5) information check data, and the first encryption data is data obtained by private key encryption being performed on the MD5 information check data, directly comparing the second check data and the first check data to determine whether the second check data and the first check data are the same; and

(c) when the first check data is CRC data, and the first encryption data is data obtained by private key encryption being performed on MD5 information corresponding to the CRC data, performing MD5 processing on the CRC data in the firmware upgrade package to form second MD5 information, and verifying whether the second check data is consistent with the second MD5 information.

8. The method according to claim 7 , wherein before performing the upgrade operation, the method further comprises:

performing check processing on the firmware upgrade file to form third check data;

verifying whether the third check data is consistent with the first check data in the firmware upgrade package; and

if the third check data is consistent with the first check data in the firmware upgrade package, performing the upgrade operation on the corresponding firmware according to the firmware upgrade file in the firmware upgrade package; or

if the third check data is not consistent with the first check data in the firmware upgrade package, discarding the firmware upgrade file without performing the upgrade operation on the corresponding firmware according to the firmware upgrade file.

9. The method according to claim 6 , wherein before performing the upgrade operation, the method further comprises:

performing check processing on the firmware upgrade file to form third check data;

verifying whether the third check data is consistent with the first check data in the firmware upgrade package; and

if the third check data is consistent with the first check data in the firmware upgrade package, performing the upgrade operation on the corresponding firmware according to the firmware upgrade file in the firmware upgrade package; or

if the third check data is not consistent with the first check data in the firmware upgrade package, discarding the firmware upgrade file without performing the upgrade operation on the corresponding firmware according to the firmware upgrade file.

10. The method according to claim 3 , wherein before performing the upgrade operation, the method further comprises:

performing check processing on the firmware upgrade file to form third check data;

verifying whether the third check data is consistent with the first check data in the firmware upgrade package; and

if the third check data is consistent with the first check data in the firmware upgrade package, performing the upgrade operation on the corresponding firmware according to the firmware upgrade file in the firmware upgrade package; or

if the third check data is not consistent with the first check data in the firmware upgrade package, discarding the firmware upgrade file without performing the upgrade operation on the corresponding firmware according to the firmware upgrade file.

Assignments (3)
CHANGE OF NAME Recorded Mar 11, 2019
From: HUAWEI DEVICE (DONGGUAN) CO.,LTD.
To: HUAWEI DEVICE CO.,LTD.
Reel/Frame 048555/0951 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 5, 2017
From: HUAWEI DEVICE CO., LTD.
To: HUAWEI DEVICE (DONGGUAN) CO., LTD.
Reel/Frame 043750/0393 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 20, 2013
From: LI, XIANGYU; LEI, PENG; ZHONG, MING; JIA, ZHIFENG
To: HUAWEI DEVICE CO., LTD.
Reel/Frame 029661/0764 →