WO2015074435A1 - Method and apparatus for updating firmware of mobile terminal - Google Patents

Method and apparatus for updating firmware of mobile terminal Download PDF

Info

Publication number
WO2015074435A1
WO2015074435A1 PCT/CN2014/082852 CN2014082852W WO2015074435A1 WO 2015074435 A1 WO2015074435 A1 WO 2015074435A1 CN 2014082852 W CN2014082852 W CN 2014082852W WO 2015074435 A1 WO2015074435 A1 WO 2015074435A1
Authority
WO
WIPO (PCT)
Prior art keywords
mobile terminal
firmware
hardware
data channel
update
Prior art date
Application number
PCT/CN2014/082852
Other languages
French (fr)
Chinese (zh)
Inventor
刘明辉
李军
盛立国
陈建佳
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2015074435A1 publication Critical patent/WO2015074435A1/en

Links

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/445Program loading or initiating

Definitions

  • a mobile terminal also referred to as a mobile communication terminal refers to a portable mobile computer device, and broadly includes a mobile phone, a data card, a tablet computer, and the like.
  • Firmware refers to the software that is the most basic and lowest-level work of a digital product.
  • the firmware is generally stored in an EEPROM (Electrically Erasable Programmable Read-Only Memory) or FLASH (Flash) chip in a mobile terminal. In, it can be updated in some way.
  • the firmware version is closely related to the hardware of the mobile terminal, the firmware of the early mobile terminal can generally only be provided by the mobile terminal manufacturer.
  • the firmware of mobile terminals is becoming more and more abundant, but the way of firmware update is mostly complicated, cumbersome or subject to many factors, thus hindering the copying and propagation of firmware.
  • the more common firmware update methods are as follows.
  • the method only needs to connect the mobile terminal to the receiving network, and the mobile terminal can automatically download the differential upgrade package and automatically complete the upgrade process, which is convenient and fast, and has high reliability.
  • this method is generally only applicable to the same manufacturer and the same series of versions.
  • the differential upgrade package can only be provided by the mobile terminal manufacturer. Therefore, the FOTA upgrade can only be upgraded to the official firmware version, the selectivity is small, and the firmware changes are limited in a single upgrade.
  • the technical problem to be solved by the present invention is to provide a method and apparatus for updating a firmware of a mobile terminal, which can complete the update of the firmware of the mobile terminal without using other auxiliary software and auxiliary equipment, and can further advance the firmware update of the mobile terminal before completion. Understand the effect of the target firmware to be updated.
  • a method for updating a firmware of a mobile terminal including: establishing a first data channel with a second mobile terminal; and setting its own target firmware through the first data channel Sending to the second mobile terminal, and notifying the second mobile terminal to perform target firmware update; after receiving the update completion instruction of the second mobile terminal, notifying the second mobile terminal to switch back to the normal working mode, Switch itself to normal working mode.
  • the method before establishing the first data channel with the second mobile terminal, the method further includes: establishing a second data channel with the second mobile terminal; detecting whether the target firmware is related to the second mobile terminal The hardware is compatible; when the target firmware is compatible with the hardware of the second mobile terminal, the second mobile terminal is notified to enter the controlled upgrade mode, and switches itself to the firmware extraction and transmission mode.
  • detecting whether the target firmware is compatible with the hardware of the second mobile terminal comprises: acquiring hardware configuration information of the second mobile terminal; and querying according to a pre-stored list of hardware models supported by the target firmware Determining whether hardware of the second mobile terminal is in the hardware model list, if all hardware of the second mobile terminal is in the hardware model list, determining hardware of the target firmware and the second mobile terminal compatible.
  • a mobile terminal firmware updating apparatus including: a data communication module configured to establish a first data channel with a second mobile terminal; and a firmware extraction module configured to pass the Transmitting, by the first data channel, the target firmware to the second mobile terminal, and notifying the second mobile terminal to perform target firmware update; and the mode switching module is configured to: after receiving the update completion instruction of the second mobile terminal, The second mobile terminal is notified to switch back to the normal working mode, and switches itself to the normal working mode.
  • the data communication module is further configured to establish a second data channel with the second mobile terminal;
  • the device further includes: a compatibility detection module, configured to detect whether the target firmware is The hardware of the second mobile terminal is compatible;
  • the mode switching module is further configured to notify the second mobile terminal to enter the controlled upgrade mode when the target firmware is compatible with the hardware of the second mobile terminal, and switch the switch itself To firmware extraction and send mode.
  • the device further includes: a hardware information acquiring module, configured to acquire hardware configuration information of the second mobile terminal; the compatibility detecting module is specifically configured to be based on a hardware model supported by the target firmware stored in advance a list, querying whether the hardware of the second mobile terminal is in the hardware model list, and if all hardware of the second mobile terminal is in the hardware model list, determining the target firmware and the second The hardware of the mobile terminal is compatible.
  • a mobile terminal firmware update method is provided, including: establishing a first data channel with a first mobile terminal; receiving, by the first data channel, the first mobile terminal sending Target firmware; perform firmware update based on the received target firmware, and send an update completion command to the first mobile terminal after the update is completed.
  • the method before establishing the first data channel with the first mobile terminal, the method further includes: establishing a second data channel with the first mobile terminal; receiving the first mobile by using the second data channel The mode switching instruction of the terminal; switching itself to the controlled upgrade mode, and transmitting the switching result to the first mobile terminal, so that the first mobile terminal switches itself to the firmware extraction and transmission mode.
  • a mobile terminal firmware updating apparatus including: a data communication module configured to establish a first data channel with a first mobile terminal; and a firmware receiving module configured to pass the The first data channel receives the target firmware sent by the first mobile terminal; the firmware update module is configured to perform firmware update according to the received target firmware, and send an update completion command to the first mobile terminal after the update is completed.
  • the data communication module is further configured to establish a second data channel with the first mobile terminal; the device further includes: a mode switching module, configured to receive the The mode switching instruction of the first mobile terminal switches itself to the controlled upgrade mode, and sends the handover result to the first mobile terminal, so that the first mobile terminal switches itself to the firmware extraction and transmission mode.
  • a mode switching module configured to receive the The mode switching instruction of the first mobile terminal switches itself to the controlled upgrade mode, and sends the handover result to the first mobile terminal, so that the first mobile terminal switches itself to the firmware extraction and transmission mode.
  • the embodiment of the present invention has the following beneficial effects:
  • a data channel is established between the first mobile terminal and the second mobile terminal, and the target firmware is sent to the second mobile terminal through the data channel, and the second mobile terminal receives the data according to the
  • the target firmware performs firmware update, so that the firmware of the mobile terminal can be updated without using other auxiliary software and auxiliary equipment, and the first mobile terminal can be passed before the firmware update of the mobile terminal is completed.
  • the firmware of the mobile terminal can be updated quickly and conveniently, the convenience of the firmware update process of the mobile terminal is improved, and the transmission and circulation of the firmware between the mobile terminals can be effectively accelerated.
  • FIG. 1 is a schematic flowchart of a method for updating a firmware of a mobile terminal according to an embodiment of the present invention
  • FIG. 2 is a block diagram showing a structure of a firmware updating device for a mobile terminal according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a firmware update apparatus for a mobile terminal according to another embodiment of the present invention
  • FIG. 5 is a schematic flowchart of a firmware update method of a mobile terminal according to an embodiment of the present invention
  • FIG. 6 is a second mobile terminal handover according to an embodiment of the present invention
  • Embodiments of the present invention provide a mobile terminal firmware update method for an existing firmware update method that relies on a network and a computer platform, and needs to find an appropriate target firmware before updating, and cannot predict the effect of the target firmware before the update.
  • the device can complete the update of the firmware of the mobile terminal without using other auxiliary software and auxiliary equipment, and can also know the effect of the target firmware to be updated in advance before the firmware update of the mobile terminal is completed.
  • Step 101 Establish a first data channel with the second mobile terminal.
  • Step 102 Send, by the first data channel, its own target firmware to the second mobile terminal, and notify the second mobile terminal to perform target firmware update.
  • Step 103 After receiving the update completion instruction of the second mobile terminal, notify the second mobile terminal to switch back to the normal working mode, and switch itself to the normal working mode.
  • the target firmware may be firmware that is being used by the first mobile terminal, and the first mobile terminal extracts the firmware that is being used by itself, and delivers the firmware to the second mobile terminal.
  • a data channel is established between the first mobile terminal and the second mobile terminal, and the target firmware is sent to the second mobile terminal through the data channel, and the second mobile terminal performs the target firmware according to the received target firmware.
  • the firmware update enables the update of the firmware of the mobile terminal without the aid of other auxiliary software and auxiliary devices.
  • the effect of the target firmware to be updated can be known in advance by the first mobile terminal before the firmware update of the mobile terminal is completed.
  • the method before establishing the first data channel with the second mobile terminal, the method further includes: establishing the second mobile terminal Detecting whether the target firmware is compatible with hardware of the second mobile terminal; notifying the second mobile terminal when the target firmware is compatible with hardware of the second mobile terminal Controlled upgrade mode and switch itself to firmware extraction and delivery mode.
  • detecting whether the target firmware is compatible with hardware of the second mobile terminal may include: acquiring the second mobile terminal Querying, according to a pre-stored list of hardware models supported by the target firmware, whether the hardware of the second mobile terminal is in the hardware model list, if all hardware of the second mobile terminal is in the In the hardware model list, it is determined that the target firmware is compatible with the hardware of the second mobile terminal.
  • the embodiment of the present invention further provides a mobile terminal firmware update apparatus. As shown in FIG.
  • the apparatus of this embodiment mainly includes: a data communication module, configured to establish a first data channel with the second mobile terminal; a firmware extraction module, configured to send target firmware to the second mobile terminal through the first data channel, and notify the second mobile terminal to perform target firmware update; and the mode switching module is configured to receive the After the update completion instruction of the mobile terminal, the second mobile terminal is notified to switch back to the normal working mode, and switches itself to the normal working mode.
  • the data communication module is further configured to establish a second data channel with the second mobile terminal;
  • the device further includes: a compatibility detecting module, configured to detect whether the target firmware is related to the first The hardware of the mobile terminal is compatible;
  • the mode switching module is further configured to notify the second mobile terminal to enter the controlled upgrade mode when the target firmware is compatible with the hardware of the second mobile terminal, and switch itself to Firmware extraction and transmission mode.
  • the device further includes: a hardware information acquiring module, configured to acquire hardware configuration information of the second mobile terminal; the compatibility detecting module is specifically configured to be configured according to a hardware model supported by the target firmware stored in advance Querying whether the hardware of the second mobile terminal is in the hardware model list, and if all hardware of the second mobile terminal is in the hardware model list, determining the target firmware and the second mobile The hardware of the terminal is compatible.
  • a hardware information acquiring module configured to acquire hardware configuration information of the second mobile terminal
  • the compatibility detecting module is specifically configured to be configured according to a hardware model supported by the target firmware stored in advance Querying whether the hardware of the second mobile terminal is in the hardware model list, and if all hardware of the second mobile terminal is in the hardware model list, determining the target firmware and the second mobile The hardware of the terminal is compatible.
  • the mobile terminal firmware update apparatus of this embodiment is disposed on the first mobile terminal, can establish a data channel with the second mobile terminal, and send the target firmware to the second mobile terminal through the data channel, and the second mobile terminal receives the The target firmware performs firmware update, so that the firmware of the mobile terminal can be updated without using other auxiliary software and auxiliary equipment, and the target firmware to be updated can be known in advance through the first mobile terminal before the firmware update of the mobile terminal is completed. effect.
  • the firmware of the mobile terminal can be updated quickly and conveniently, the convenience of the firmware update process of the mobile terminal is improved, and the transmission and circulation of the firmware between the mobile terminals can be effectively accelerated.
  • Step 201 Establish a first data channel with the first mobile terminal.
  • Step 202 Receive target firmware sent by the first mobile terminal by using the first data channel.
  • Step 203 Perform firmware update according to the received target firmware, and send an update completion command to the first mobile terminal after the update is completed.
  • a data channel is established between the first mobile terminal and the second mobile terminal, and the target firmware is sent to the second mobile terminal through the data channel, and the second mobile terminal performs the target firmware according to the received target firmware.
  • the firmware update enables the update of the firmware of the mobile terminal without the aid of other auxiliary software and auxiliary devices.
  • the effect of the target firmware to be updated can be known in advance by the first mobile terminal before the firmware update of the mobile terminal is completed.
  • the method before establishing the first data channel with the first mobile terminal, the method further includes: establishing the first mobile terminal a second data channel between the first data channel; receiving, by the second data channel, a mode switching instruction of the first mobile terminal; switching itself to a controlled upgrade mode, and transmitting a handover result to the first mobile terminal, so as to The first mobile terminal switches itself to a firmware extraction and transmission mode.
  • the embodiment of the present invention further provides a mobile terminal firmware update apparatus. As shown in FIG.
  • the embodiment includes: a data communication module, configured to establish a first data channel with the first mobile terminal; and a firmware receiving module, And configured to receive the target firmware sent by the first mobile terminal by using the first data channel; the firmware update module is configured to perform firmware update according to the received target firmware, and send an update completion command to the first after the update is completed.
  • a mobile terminal Further, the data communication module is further configured to establish a second data channel with the first mobile terminal; the device further includes: a mode switching module, configured to receive the first data channel by using the second data channel A mode switching instruction of the mobile terminal switches itself to the controlled upgrade mode, and sends the handover result to the first mobile terminal, so that the first mobile terminal switches itself to the firmware extraction and transmission mode.
  • the device further includes a hardware information detecting module, configured to detect hardware configuration information of the second mobile terminal, and send hardware configuration information of the second mobile terminal to the hardware information acquiring module of the first mobile terminal.
  • the mobile terminal firmware update apparatus of this embodiment is disposed on the second mobile terminal, establishes a data channel with the first mobile terminal, and receives the target firmware through the data channel, and performs firmware update according to the received target firmware, so that the Other auxiliary software and auxiliary equipment can complete the update of the firmware of the mobile terminal, and the effect of the target firmware to be updated can be known in advance through the first mobile terminal before the firmware update of the mobile terminal is completed.
  • the firmware of the mobile terminal can be updated quickly and conveniently, the convenience of the firmware update process of the mobile terminal is improved, and the transmission and circulation of the firmware between the mobile terminals can be effectively accelerated.
  • the method and device for updating the firmware of the mobile terminal of the present invention will be described in detail below with reference to specific embodiments.
  • the existing firmware update method must rely on the network and computer platform. It needs to find the appropriate target firmware before updating, and the target firmware effect cannot be predicted before the update.
  • the present invention provides a mobile terminal firmware update method and apparatus, which can copy firmware in one mobile terminal to another mobile terminal, which simplifies the process of finding the target firmware and finds a suitable mobile.
  • the terminal finds the target firmware, does not need external environment support such as network, does not need to use the personal computer platform, and does not need to copy and dump.
  • the method does not need other auxiliary software and auxiliary equipment, and the operation is simple and quick.
  • the effect of the target firmware can be known in advance by the first mobile terminal providing the target firmware before the firmware update.
  • the technical solution of the present invention includes a first mobile terminal that provides target firmware and a second mobile terminal that receives target firmware.
  • the first mobile terminal includes a data communication module, a firmware extraction module, a hardware information acquisition module, a compatibility detection module, and a mode switching module.
  • the second mobile terminal includes a data communication module, a firmware receiving module, a firmware update module, and hardware information.
  • the first mobile terminal is responsible for providing the target firmware, controlling the second mobile terminal, establishing a data channel, and transmitting the built-in target firmware to the second mobile terminal through the data channel.
  • the second mobile terminal is responsible for assisting the first mobile terminal to establish a data channel, receiving the target firmware sent by the first mobile terminal, and replacing the original built-in firmware with the received target firmware.
  • the data channel is a bridge connecting the first mobile terminal and the second mobile terminal, and is responsible for transmitting data between the first mobile terminal and the second mobile terminal.
  • the data includes, but is not limited to: instruction data sent by the first mobile terminal to the second mobile terminal, command response information fed back by the second mobile terminal to the first mobile terminal, target firmware data embedded in the first mobile terminal, and second Hardware information of the mobile terminal, etc.
  • each module of the first mobile terminal and the second mobile terminal may coexist in the same mobile terminal.
  • each mobile terminal can serve as both the first mobile terminal and the second mobile terminal.
  • the mobile terminal firmware update method of the present invention includes the following step aal-step aal0.
  • Step a1 The data communication modules of the first mobile terminal and the second mobile terminal cooperate to establish a second data channel.
  • Data channel types include, but are not limited to, USB cable, WIFI, Bluetooth, and the like.
  • the first mobile terminal and the second mobile terminal can be connected by a USB cable.
  • the second mobile terminal is used as the USB peripheral device of the first mobile terminal, and a USB data transmission path is established between the first mobile terminal and the second mobile terminal.
  • the step may attach a protection mechanism such as identity authentication between the first mobile terminal and the second mobile terminal, so as to initially confirm that both parties are the same-group mobile terminal supporting firmware replication.
  • Step a2 The first mobile terminal detects whether the own target firmware is compatible with the hardware of the second mobile terminal.
  • the hardware information acquisition module in the first mobile terminal acquires the hardware configuration information of the second mobile terminal by using the hardware information detection module in the second mobile terminal, and further determines whether the hardware of the second mobile terminal can run the target built in the first mobile terminal.
  • firmware Preferably, the compatibility detecting module in the first mobile terminal queries whether the model of the hardware acquired from the second mobile terminal is in the supported hardware model list according to the pre-stored hardware model list supported by the target firmware. If all hardware of the second mobile terminal is supported, it indicates that the target firmware can run on the second mobile terminal, that is, the target firmware of the first mobile terminal is compatible with the hardware of the second mobile terminal; otherwise, it indicates that the two are incompatible.
  • Step a3 The first mobile terminal sends a mode switching instruction to the second mobile terminal by using the second data channel, and the mode switching module of the second mobile terminal switches itself to the controlled upgrade mode after receiving the mode switching instruction, and the switching result is obtained. Report to the first mobile terminal.
  • the partition in which the mobile terminal firmware is located must be written without the mobile terminal firmware being used. Therefore, there is a need for an alternate thin system for mobile terminal firmware updates, hereinafter referred to as a firmware update system.
  • the system comprises the foregoing four modules of a data communication module, a firmware receiving module, a firmware update module and a mode switching module located on the second mobile terminal.
  • the firmware update module has full write permission to the storage device partition where the firmware of the mobile terminal is working normally, and can update the entire contents of the partition where the mobile terminal firmware is located.
  • the flow of the second mobile terminal switching to the controlled upgrade mode is as shown in FIG. 6.
  • the second mobile terminal sets an identifier to enter the "controlled upgrade mode" (an empty file /flags/enter_upgrade_firmware_mode.flg of the firmware file name stored in the pre-agreed path). Then, the mode switching module passes It is known that the second mobile terminal is restarted.
  • the mode switching module checks whether the aforementioned identifier exists, and if so, enters the firmware update system; otherwise, starts the mobile terminal normal working system. After successfully cutting into the controlled upgrade mode, the second mobile terminal reports the information about the successful mode switching to the first mobile terminal, and sends a request for establishing the data channel to the first mobile terminal.
  • Step a4 After receiving the feedback that the second mobile terminal mode is successfully switched, the first mobile terminal switches itself to the firmware extraction and transmission mode by the mode switching module. In order to extract the firmware of the mobile terminal, it is necessary to read the storage partition where the mobile terminal firmware is located without running the working terminal of the mobile terminal.
  • the firmware extraction and delivery system is a streamlined system that provides only the essential functions of data communication, firmware extraction, firmware delivery, and mode switching. Specifically, the foregoing includes a data communication module, a firmware extraction module, and a mode switching module, which are located on the first mobile terminal.
  • the firmware extraction and delivery system is another backup system that is completely separate from the operating system when the mobile terminal is in normal use. The two systems are stored separately in two separate partitions. Both systems can be started independently, but not simultaneously.
  • the application in the firmware extraction and transmission system has read data permission for the partition where the mobile terminal firmware is located.
  • the process of the first mobile terminal switching from the normal working mode to the firmware extracting and transmitting mode is as shown in FIG.
  • the mode switching module sets the identifier of the "firmware extraction and transmission mode" (an empty file /flags/enter_get_firmware_mode stored in the pre-agreed path of the firmware file name). Flg ) 0
  • the mode switching module notifies the first mobile terminal to restart.
  • the mode switching module detects whether the foregoing identifier exists, and if so, enters the firmware extraction and transmission system; otherwise, starts the mobile terminal normal working system.
  • Step a5 The first mobile terminal in the firmware extraction and transmission mode and the second mobile terminal in the controlled upgrade mode re-establish the data channel through the respective data communication module, that is, the first data channel.
  • the first mobile terminal and the second mobile terminal respectively cut into the new mode will re-establish a connection through the USB device, the first mobile terminal is still a USB host device, and the second mobile terminal is still a USB slave device. device.
  • Step a6 The first mobile terminal extracts its own built-in target firmware through the firmware extraction module, and sends it to the second mobile terminal. As mentioned earlier, there are multiple storage partitions on the storage device of the first mobile terminal.
  • the firmware extraction module holds a partition information file that describes each partition information in the storage device.
  • the file is written during the production process of the mobile terminal, and is updated by the upgrade tool when the partition information of the storage device changes.
  • This file is stored in the root directory of the partition where the firmware extraction and sending system is located.
  • the fixed name is: partiti 0n _t a bl e .inf.
  • the firmware extraction module determines information such as a partition where the target firmware is located, a target firmware size, a start and end position, and the like according to the partition information file. And according to the information, the corresponding data is read from the storage device and sent to the second mobile terminal.
  • Step a7 The first mobile terminal notifies the second mobile terminal to perform firmware upgrade after the target firmware is sent.
  • Step a8 The firmware update module of the second mobile terminal updates its own firmware according to the received target firmware, and notifies the first mobile terminal after the update is completed.
  • the firmware update module also holds a partition information file of the second mobile terminal, and after receiving the target firmware, writes the received target firmware to the corresponding partition corresponding to the mobile terminal firmware according to the partition information of the second mobile terminal.
  • the firmware update of the second mobile terminal is completed.
  • the second mobile terminal has the target firmware (ie, the firmware to be updated) that is completely complete with the first mobile terminal, that is, the second mobile terminal clones the firmware of the first mobile terminal.
  • the second mobile terminal sends an update completion instruction to notify the first mobile terminal that the firmware update is completed.
  • Step a9 After the first mobile terminal receives the update completion instruction of the second mobile terminal, the sending mode switching instruction notifies the second mobile terminal to switch back to the normal working mode.
  • Step a10 The first mobile terminal switches from the firmware extraction and transmission mode back to the normal working mode. At this point, the target firmware of the first mobile terminal is successfully cloned into the second mobile terminal, and the first mobile terminal and the second mobile terminal are all in the normal working mode, and the entire mobile terminal firmware update process ends.
  • the firmware can be effectively accelerated in the user circle of the mobile terminal supporting the technical solution of the present invention, thereby promoting the development and growth of the user group of the mobile terminal.
  • the modules may be implemented in software for execution by various types of processors.
  • an identified executable code module can comprise one or more physical or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nonetheless, the executable code of the identified modules need not be physically located together, but may include different instructions stored in different physicalities.
  • the executable code module can be a single instruction or a number of instructions, and can even be distributed across multiple different code segments, distributed among different programs, and distributed across multiple memory devices.
  • operational data may be identified within the module and may be implemented in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed at different locations (including on different storage devices), and may at least partially exist as an electronic signal on a system or network.
  • the module can be implemented by software, considering the level of the existing hardware process, the module can be implemented in software.
  • the hardware circuitry includes conventional Very Large Scale Integration (VLSI) circuits or gate arrays as well as existing semiconductors such as logic chips, transistors, or other discrete components. Modules can also be implemented with programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like.
  • VLSI Very Large Scale Integration
  • programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like.
  • the sequence numbers of the steps are not used to limit the sequence of the steps. For those skilled in the art, the steps of the steps are changed without any creative work. It is also within the scope of the invention.
  • a data channel is established between the first mobile terminal and the second mobile terminal, and the target firmware is sent to the second mobile terminal through the data channel, and the second mobile terminal performs firmware according to the received target firmware.
  • the update enables the update of the firmware of the mobile terminal without the aid of other auxiliary software and auxiliary devices.
  • the effect of the target firmware to be updated can be known in advance by the first mobile terminal before the firmware update of the mobile terminal is completed.

Abstract

The present invention provides a method and an apparatus for updating firmware of a mobile terminal, and relates to the field of mobile terminals. The method for updating firmware of a mobile terminal comprises: establishing a first data channel with a second mobile terminal; sending target firmware to the second mobile terminal through the first data channel, and informing the second terminal of performing the updating of the target firmware; and after an updating completion instruction from the second mobile terminal is received, notifying the second mobile terminal to switch back to a normal working mode, and switching self to a normal working mode. By using the technical solutions of the present invention, the updating of firm wall of a mobile terminal can be completed without using another auxiliary software and an auxiliary device; in addition, before the updating of the firmware of the mobile terminal is completed, the effect of target firmware to be updated can be known in advance.

Description

移动终端固件更新方法及装置 技术领域 本发明涉及移动终端领域, 特别是指一种移动终端固件更新方法及装置。 背景技术 移动终端(亦称移动通信终端)是指便携的移动计算机设备, 广义的讲包括手机、 数据卡、 平板电脑等。 固件是指担任着一个数码产品最基础、 最底层工作的软件, 固 件一般存储于移动终端中的 EEPROM (Electrically Erasable Programmable Read-Only Memory, 电可擦可编程只读存储器) 或 FLASH (闪存) 芯片中, 可通过某种方式进 行更新。 由于固件版本和移动终端硬件紧密相关, 早期的移动终端的固件一般只能由移动 终端生产厂商提供。 随着智能移动终端及其操作系统的发展, 尤其是开源的 Android 操作系统的发展, 除移动终端生产厂商外, 大量的个人或第三方公司也开始开发并提 供移动终端固件。 移动终端固件越来越丰富, 但是固件更新的方式大多较为复杂、 繁琐或受诸多因 素制约, 因而阻碍了固件的复制和传播。 目前较常见的固件更新方式有如下 3类。  The present invention relates to the field of mobile terminals, and in particular to a method and apparatus for updating firmware of a mobile terminal. BACKGROUND OF THE INVENTION A mobile terminal (also referred to as a mobile communication terminal) refers to a portable mobile computer device, and broadly includes a mobile phone, a data card, a tablet computer, and the like. Firmware refers to the software that is the most basic and lowest-level work of a digital product. The firmware is generally stored in an EEPROM (Electrically Erasable Programmable Read-Only Memory) or FLASH (Flash) chip in a mobile terminal. In, it can be updated in some way. Since the firmware version is closely related to the hardware of the mobile terminal, the firmware of the early mobile terminal can generally only be provided by the mobile terminal manufacturer. With the development of smart mobile terminals and their operating systems, especially the development of the open source Android operating system, in addition to mobile terminal manufacturers, a large number of individuals or third-party companies have begun to develop and provide mobile terminal firmware. The firmware of mobile terminals is becoming more and more abundant, but the way of firmware update is mostly complicated, cumbersome or subject to many factors, thus hindering the copying and propagation of firmware. At present, the more common firmware update methods are as follows.
1、 通过 PC侧辅助工具更新。 该方法需要较多的准备工作。需要先找到合适的目标固件版本、合适的升级工具、 合适的驱动。 而且, 升级异常还很有可能破坏移动终端固件, 导致更新失败的移动终 端完全无法使用。 1. Update by PC side auxiliary tool. This method requires more preparation work. You need to find the right target firmware version, the appropriate upgrade tool, and the right driver. Moreover, the upgrade exception is also likely to damage the mobile terminal firmware, making the mobile terminal that failed the update completely unusable.
2、 通过 FOTA (Firmware Over The Air, 空中固件升级) 更新。 该方法只须将移动终端连接收到网络, 移动终端即可自动下载差分升级包, 并自 动完成升级过程, 较为方便快捷, 可靠性也比较高。 但该方法一般只适用于同厂商、 同系列版本更新, 差分升级包一般只能由移动终端生产厂商提供。 所以, FOTA 升级 一般只能升级到官方的固件版本, 选择性小, 单次升级对固件的改动也很有限。 2. Updated via FOTA (Firmware Over The Air). The method only needs to connect the mobile terminal to the receiving network, and the mobile terminal can automatically download the differential upgrade package and automatically complete the upgrade process, which is convenient and fast, and has high reliability. However, this method is generally only applicable to the same manufacturer and the same series of versions. The differential upgrade package can only be provided by the mobile terminal manufacturer. Therefore, the FOTA upgrade can only be upgraded to the official firmware version, the selectivity is small, and the firmware changes are limited in a single upgrade.
3、 通过 SD ( Secure Digital, 安全数码) 卡更新包更新。 该方法需要先获取 SD卡更新包(通常也需要通过网络查找和下载), 然后将其拷 贝到 SD卡中; 再通过移动终端界面的菜单启动更新过程。 整个更新过程比较快捷、 比较安全可靠, 但更新包的来源往往也只能是移动终端生产厂商, 可选范围较小。 综上, 这 3种方法均需要查找和获取要升级到的目标固件版本, 有的还需要借助 辅助工具, 才能进行固件更新。 此外, 这 3类方案, 都只有在更新完成后, 才能看到 目标固件的效果。 发明内容 本发明要解决的技术问题是提供一种移动终端固件更新方法及装置, 能够不借助 其它辅助软件和辅助设备即可完成移动终端固件的更新, 另外可以在移动终端固件更 新完成前, 预先了解到待更新的目标固件的效果。 为解决上述技术问题,根据本发明的一个方面,提供一种移动终端固件更新方法, 包括: 建立与第二移动终端之间的第一数据通道; 通过所述第一数据通道将自身的目 标固件发送给所述第二移动终端, 并通知所述第二移动终端进行目标固件更新; 在接 收到所述第二移动终端的更新完成指令之后, 通知所述第二移动终端切换回正常工作 模式, 并将自身切换至正常工作模式。 可选地, 建立与第二移动终端之间的第一数据通道之前还包括: 建立与所述第二 移动终端之间的第二数据通道; 检测所述目标固件是否与所述第二移动终端的硬件兼 容; 在所述目标固件与所述第二移动终端的硬件兼容时, 通知所述第二移动终端进入 受控升级模式, 并将自身切换至固件提取与发送模式。 可选地, 检测所述目标固件是否与所述第二移动终端的硬件兼容包括: 获取所述 第二移动终端的硬件配置信息; 根据预先存储的所述目标固件支持的硬件型号列表, 查询所述第二移动终端的硬件是否在所述硬件型号列表中, 如果所述第二移动终端的 所有硬件均在所述硬件型号列表中, 则判断所述目标固件与所述第二移动终端的硬件 兼容。 根据本发明的另一个方面, 还提供了一种移动终端固件更新装置, 包括: 数据通 信模块, 设置为建立与第二移动终端之间的第一数据通道; 固件提取模块, 设置为通 过所述第一数据通道将目标固件发送给所述第二移动终端, 并通知所述第二移动终端 进行目标固件更新; 模式切换模块, 设置为在接收到所述第二移动终端的更新完成指 令之后,通知所述第二移动终端切换回正常工作模式, 并将自身切换至正常工作模式。 可选地, 所述数据通信模块还设置为建立与所述第二移动终端之间的第二数据通 道; 所述装置还包括: 兼容性检测模块, 设置为检测所述目标固件是否与所述第二移 动终端的硬件兼容; 所述模式切换模块还设置为在所述目标固件与所述第二移动终端 的硬件兼容时, 通知所述第二移动终端进入受控升级模式, 并将自身切换至固件提取 与发送模式。 可选地, 所述装置还包括: 硬件信息获取模块, 设置为获取所述第二移动终端的 硬件配置信息; 所述兼容性检测模块具体设置为根据预先存储的所述目标固件支持的 硬件型号列表, 查询所述第二移动终端的硬件是否在所述硬件型号列表中, 如果所述 第二移动终端的所有硬件均在所述硬件型号列表中, 则判断所述目标固件与所述第二 移动终端的硬件兼容。 根据本发明的另一个方面, 还提供了一种移动终端固件更新方法, 包括: 建立与 第一移动终端之间的第一数据通道; 通过所述第一数据通道接收所述第一移动终端发 送的目标固件; 根据接收到的目标固件进行固件更新, 并在更新完成后发送更新完成 指令至所述第一移动终端。 可选地, 建立与第一移动终端之间的第一数据通道之前还包括: 建立与所述第一 移动终端之间的第二数据通道; 通过所述第二数据通道接收所述第一移动终端的模式 切换指令; 将自身切换至受控升级模式, 并将切换结果发送给所述第一移动终端, 以 便所述第一移动终端将自身切换至固件提取与发送模式。 根据本发明的另一个方面, 还提供了一种移动终端固件更新装置, 包括: 数据通 信模块, 设置为建立与第一移动终端之间的第一数据通道; 固件接收模块, 设置为通 过所述第一数据通道接收所述第一移动终端发送的目标固件; 固件更新模块, 设置为 根据接收到的目标固件进行固件更新, 并在更新完成后发送更新完成指令至所述第一 移动终端。 可选地, 所述数据通信模块还设置为建立与所述第一移动终端之间的第二数据通 道; 所述装置还包括: 模式切换模块, 设置为通过所述第二数据通道接收所述第一移 动终端的模式切换指令, 将自身切换至受控升级模式, 并将切换结果发送给所述第一 移动终端, 以便所述第一移动终端将自身切换至固件提取与发送模式。 本发明的实施例具有以下有益效果: 上述方案中, 第一移动终端与第二移动终端 之间建立数据通道, 并通过数据通道将目标固件发送给第二移动终端, 第二移动终端 根据接收到的目标固件进行固件更新, 这样能够不借助其它辅助软件和辅助设备即可 完成移动终端固件的更新, 另外可以在移动终端固件更新完成前, 通过第一移动终端 预先了解到待更新的目标固件的效果。 采用本发明的技术方案, 能够快速、 方便地更 新移动终端的固件, 提高移动终端固件更新过程的便捷性, 可有效加速固件在移动终 端之间的传递和流通。 附图说明 图 1为本发明实施例移动终端固件更新方法的流程示意图; 图 2为本发明实施例移动终端固件更新装置的结构框图; 图 3为本发明另一实施例移动终端固件更新方法的流程示意图; 图 4为本发明另一实施例移动终端固件更新装置的结构框图; 图 5为本发明具体实施例移动终端固件更新方法的流程示意图; 图 6为本发明实施例第二移动终端切换至受控升级模式的流程图; 以及 图 7为本发明实施例第一移动终端切换至固件提取与发送模式的流程图。 具体实施方式 为使本发明的实施例要解决的技术问题、 技术方案和优点更加清楚, 下面将结合 附图及具体实施例进行详细描述。 本发明的实施例针对现有固件更新方法必须依赖网络和计算机平台, 以及需要先 找到合适的目标固件之后才能更新, 且更新前不能预知目标固件效果的问题, 提供一 种移动终端固件更新方法及装置, 能够不借助其它辅助软件和辅助设备即可完成移动 终端固件的更新, 另外可以在移动终端固件更新完成前, 预先了解到待更新的目标固 件的效果。 图 1为本发明实施例移动终端固件更新方法的流程示意图, 如图 1所示, 本实施 例的方法主要包括步骤 101-步骤 103。 步骤 101 : 建立与第二移动终端之间的第一数据通道。 步骤 102: 通过所述第一数据通道将自身的目标固件发送给所述第二移动终端, 并通知所述第二移动终端进行目标固件更新。 步骤 103 : 在接收到所述第二移动终端的更新完成指令之后, 通知所述第二移动 终端切换回正常工作模式, 并将自身切换至正常工作模式。 其中, 目标固件可以是第一移动终端正在使用的固件, 第一移动终端将自己正在 使用的固件提取出来, 并将其传递给第二移动终端。 本实施例的移动终端固件更新方法, 第一移动终端与第二移动终端之间建立数据 通道, 并通过数据通道将目标固件发送给第二移动终端, 第二移动终端根据接收到的 目标固件进行固件更新, 这样能够不借助其它辅助软件和辅助设备即可完成移动终端 固件的更新, 另外可以在移动终端固件更新完成前, 通过第一移动终端预先了解到待 更新的目标固件的效果。 采用本发明的技术方案, 能够快速、 方便地更新移动终端的 固件, 提高移动终端固件更新过程的便捷性, 可有效加速固件在移动终端之间的传递 和流通。 进一步地, 本发明实施例的另一实施方式中, 包括上述步骤 101-103 的基础上, 建立与第二移动终端之间的第一数据通道之前还可以包括: 建立与所述第二移动终端之间的第二数据通道; 检测所述目标固件是否与所述第二移动终端的硬件兼容; 在所述目标固件与所述第二移动终端的硬件兼容时, 通知所述第二移动终端进入 受控升级模式, 并将自身切换至固件提取与发送模式。 进一步地, 本发明实施例的另一实施方式中, 包括上述步骤 101-103 的基础上, 检测所述目标固件是否与所述第二移动终端的硬件兼容可以包括: 获取所述第二移动终端的硬件配置信息; 根据预先存储的所述目标固件支持的硬件型号列表, 查询所述第二移动终端的硬 件是否在所述硬件型号列表中, 如果所述第二移动终端的所有硬件均在所述硬件型号 列表中, 则判断所述目标固件与所述第二移动终端的硬件兼容。 本发明实施例还提供了一种移动终端固件更新装置, 如图 2所示, 本实施例的装 置主要包括: 数据通信模块, 设置为建立与第二移动终端之间的第一数据通道; 固件提取模块, 设置为通过所述第一数据通道将目标固件发送给所述第二移动终 端, 并通知所述第二移动终端进行目标固件更新; 模式切换模块, 设置为在接收到所述第二移动终端的更新完成指令之后, 通知所 述第二移动终端切换回正常工作模式, 并将自身切换至正常工作模式。 进一步地, 所述数据通信模块还设置为建立与所述第二移动终端之间的第二数据 通道; 所述装置还包括: 兼容性检测模块,设置为检测所述目标固件是否与所述第二移动终端的硬件兼容; 所述模式切换模块还设置为在所述目标固件与所述第二移动终端的硬件兼容时, 通知所述第二移动终端进入受控升级模式, 并将自身切换至固件提取与发送模式。 进一步地, 所述装置还包括: 硬件信息获取模块, 设置为获取所述第二移动终端的硬件配置信息; 所述兼容性检测模块具体设置为根据预先存储的所述目标固件支持的硬件型号列 表, 查询所述第二移动终端的硬件是否在所述硬件型号列表中, 如果所述第二移动终 端的所有硬件均在所述硬件型号列表中, 则判断所述目标固件与所述第二移动终端的 硬件兼容。 本实施例的移动终端固件更新装置设置在第一移动终端上, 能够与第二移动终端 之间建立数据通道, 并通过数据通道将目标固件发送给第二移动终端, 第二移动终端 根据接收到的目标固件进行固件更新, 这样能够不借助其它辅助软件和辅助设备即可 完成移动终端固件的更新, 另外可以在移动终端固件更新完成前, 通过第一移动终端 预先了解到待更新的目标固件的效果。 采用本发明的技术方案, 能够快速、 方便地更 新移动终端的固件, 提高移动终端固件更新过程的便捷性, 可有效加速固件在移动终 端之间的传递和流通。 图 3为本发明另一实施例移动终端固件更新方法的流程示意图, 如图 3所示, 本 实施例的方法主要包括步骤 201-步骤 203。 步骤 201 : 建立与第一移动终端之间的第一数据通道。 步骤 202: 通过所述第一数据通道接收所述第一移动终端发送的目标固件。 步骤 203 : 根据接收到的目标固件进行固件更新, 并在更新完成后发送更新完成 指令至所述第一移动终端。 本实施例的移动终端固件更新方法, 第一移动终端与第二移动终端之间建立数据 通道, 并通过数据通道将目标固件发送给第二移动终端, 第二移动终端根据接收到的 目标固件进行固件更新, 这样能够不借助其它辅助软件和辅助设备即可完成移动终端 固件的更新, 另外可以在移动终端固件更新完成前, 通过第一移动终端预先了解到待 更新的目标固件的效果。 采用本发明的技术方案, 能够快速、 方便地更新移动终端的 固件, 提高移动终端固件更新过程的便捷性, 可有效加速固件在移动终端之间的传递 和流通。 进一步地, 本发明实施例的另一实施方式中, 包括上述步骤 201-203 的基础上, 建立与第一移动终端之间的第一数据通道之前还可以包括: 建立与所述第一移动终端之间的第二数据通道; 通过所述第二数据通道接收所述第一移动终端的模式切换指令; 将自身切换至受控升级模式, 并将切换结果发送给所述第一移动终端, 以便所述 第一移动终端将自身切换至固件提取与发送模式。 本发明实施例还提供了一种移动终端固件更新装置, 如图 4所示,本实施例包括: 数据通信模块, 设置为建立与第一移动终端之间的第一数据通道; 固件接收模块, 设置为通过所述第一数据通道接收所述第一移动终端发送的目标 固件; 固件更新模块, 设置为根据接收到的目标固件进行固件更新, 并在更新完成后发 送更新完成指令至所述第一移动终端。 进一步地, 所述数据通信模块还设置为建立与所述第一移动终端之间的第二数据 通道; 所述装置还包括: 模式切换模块, 设置为通过所述第二数据通道接收所述第一移动终端的模式切换 指令, 将自身切换至受控升级模式, 并将切换结果发送给所述第一移动终端, 以便所 述第一移动终端将自身切换至固件提取与发送模式。 进一步地, 所述装置还包括硬件信息检测模块, 设置为检测第二移动终端的硬件 配置信息, 并将第二移动终端的硬件配置信息发送给第一移动终端的硬件信息获取模 块。 本实施例的移动终端固件更新装置设置在第二移动终端上, 与第一移动终端之间 建立数据通道, 并通过数据通道接收目标固件,根据接收到的目标固件进行固件更新, 这样能够不借助其它辅助软件和辅助设备即可完成移动终端固件的更新, 另外可以在 移动终端固件更新完成前, 通过第一移动终端预先了解到待更新的目标固件的效果。 采用本发明的技术方案, 能够快速、 方便地更新移动终端的固件, 提高移动终端固件 更新过程的便捷性, 可有效加速固件在移动终端之间的传递和流通。 下面结合具体的实施例对本发明的移动终端固件更新方法及装置进行详细介绍。 现有固件更新方法必须依赖网络和计算机平台, 需要先找到合适的目标固件之后 才能更新, 且更新前不能预知目标固件效果。 针对这种情况, 本发明提出了一种移动 终端固件更新方法及装置, 能够将一个移动终端中的固件复制到另一个移动终端中, 该方法简化了寻找目标固件的过程, 找到一个合适的移动终端就找到了目标固件, 不 需要网络等外部环境支持, 不需要借助个人计算机平台、 也不需要拷贝、 转储, 另外, 该方法也不需要借助其它辅助软件和辅助设备, 操作简便快捷。 而且, 可在固件更新 前, 通过提供目标固件的第一移动终端预先了解目标固件的效果。 本发明的技术方案中包括有提供目标固件的第一移动终端和接收目标固件的第二 移动终端。 其中, 第一移动终端包括有数据通信模块、 固件提取模块、 硬件信息获取 模块、 兼容性检测模块和模式切换模块, 第二移动终端包括有数据通信模块、 固件接 收模块、 固件更新模块、 硬件信息检测模块和模式切换模块。 其中, 第一移动终端负责提供目标固件, 控制第二移动终端, 建立数据通道, 并 通过数据通道将自身内置的目标固件传输到第二移动终端。 第二移动终端负责协助第 一移动终端建立数据通道, 接收第一移动终端发送的目标固件, 并用接收到的目标固 件替换自身原本内置的固件。 数据通道是连接第一移动终端和第二移动终端的桥梁, 负责在第一移动终端和第二移动终端之间传输数据。 所述数据包括但不限于: 第一移 动终端发送给第二移动终端的指令数据、 第二移动终端反馈给第一移动终端的指令响 应信息、 第一移动终端内嵌的目标固件数据和第二移动终端的硬件信息等。 另外, 第一移动终端和第二移动终端的各模块可以共存在同一个移动终端中。 这 样, 每一个移动终端都既可以作为第一移动终端又可以作为第二移动终端。 具体地,如图 5所示,本发明的移动终端固件更新方法包括以下步骤 al-步骤 al0。 步骤 al : 第一移动终端和第二移动终端的数据通信模块相互协作建立起第二数据 通道。 数据通道类型包括但不限于 USB线缆、 WIFI、 蓝牙等。 优选地,第一移动终端、第二移动终端间可通过 USB线缆连接。采用 OTG(On The Go, 活动式) 技术, 使第二移动终端作为第一移动终端的 USB外围设备, 在第一移 动终端、 第二移动终端间建立 USB数据传输通路。 另外, 该步骤可附加第一移动终端、 第二移动终端间的身份认证等保护机制, 以 便初步确认双方是支持固件复制的同族移动终端。 步骤 a2: 第一移动终端检测自身目标固件是否兼容第二移动终端的硬件。 第一移 动终端中的硬件信息获取模块通过第二移动终端中的硬件信息检测模块获取到第二移 动终端的硬件配置信息, 进而判断第二移动终端的硬件是否可以运行第一移动终端内 置的目标固件。 优选地: 第一移动终端中的兼容性检测模块, 根据预先存储的、 目标固件支持的 硬件型号列表, 查询从第二移动终端中获取到的硬件的型号是否在所支持的硬件型号 列表内。 如果第二移动终端的所有硬件均被支持, 则表明目标固件可运行在第二移动 终端上, 即第一移动终端的目标固件与第二移动终端的硬件兼容; 否则, 表明二者不 兼容。 步骤 a3 : 第一移动终端通过第二数据通道向第二移动终端发送模式切换指令, 第 二移动终端的模式切换模块在接收到模式切换指令后将自身切换至受控升级模式, 并 将切换结果报给第一移动终端。 为了更新移动终端固件, 必须在移动终端固件不被使用的情况下对移动终端固件 所在分区进行写入。 所以, 需要一个用于移动终端固件更新的备用精简系统, 以下称 固件更新系统。该系统包含前述位于第二移动终端上的数据通信模块、固件接收模块、 固件更新模块和模式切换模块等四个模块。 在固件更新系统下, 固件更新模块对移动 终端正常工作时的固件所在的存储设备分区具有完全的写入权限, 可以更新移动终端 固件所在分区的全部内容。 第二移动终端切换至受控升级模式的流程如图 6所示。 第二移动终端在接收到模 式切换指令时, 设置进入 "受控升级模式" 的标识 (一个存储在预先约定的路径下的 固件文件名的空文件 /flags/enter_upgrade_firmware_mode.flg)。 然后, 模式切换模块通 知第二移动终端重新启动。 在第二移动终端重新启动过程中, 模式切换模块检查前述 标识是否存在, 如果存在, 则进入到固件更新系统; 否则, 启动移动终端正常工作系 统。 第二移动终端成功切入到受控升级模式后, 向第一移动终端报告模式切换成功的 信息, 并向第一移动终端发出建立数据通道的请求。 步骤 a4: 第一移动终端在接收到第二移动终端模式切换成功的反馈后, 通过模式 切换模块将自身切换至固件提取与发送模式。 为了提取移动终端固件, 需要在不运行正常工作的移动终端操作系统的前提下对 移动终端固件所在存储分区进行读取。 所以, 需要一个专门的、 用于固件提取和发送 的精简系统, 以下称为固件提取与发送系统。 固件提取与发送系统是仅提供数据通信、 固件提取、 固件发送和模式切换等必备 功能的一个精简系统。 具体包含前述位于第一移动终端上的数据通信模块、 固件提取 模块和模式切换模块等模块。 固件提取与发送系统是与移动终端正常使用时的操作系统完全分离的另一个备用 系统。 两个系统分别存储于完全分离的、 两个不同的分区中。 两个系统可以分别独立 启动, 但不能同时启动。 固件提取与发送系统中的应用, 对移动终端固件所在分区具 有读取数据权限。 第一移动终端从正常工作模式切换至固件提取与发送模式的过程如图 7所示。 首 先, 第一移动终端在接收到模式切换指令时, 通过模式切换模块设置进入 "固件提取 和发送模式" 的标识 (一个存储在预先约定的路径下的固件文件名的空文件 /flags/enter_get_firmware_mode.flg ) 0然后,模式切换模块通知第一移动终端重新启动。 最后, 在第一移动终端重启过程中, 模式切换模块检测前述标识是否存在, 如果存在, 则进入固件提取与发送系统; 否则, 启动移动终端正常工作系统。 步骤 a5 : 固件提取与发送模式下的第一移动终端与受控升级模式下的第二移动终 端, 通过各自的数据通信模块重新建立数据通道, 即为第一数据通道。 前述 a3、 a4两步骤完成后, 分别切入新模式下的第一移动终端、 第二移动终端会 重新通过 USB设备建立连接,第一移动终端仍为 USB主设备,第二移动终端仍为 USB 从设备。 步骤 a6: 第一移动终端通过固件提取模块提取自身内置的目标固件, 并将其发送 给第二移动终端。 前面提到, 第一移动终端的存储设备上有多个存储分区。 固件提取模块持有一个 描述存储设备中的各分区信息的分区信息文件。 该文件在移动终端生产过程中写入, 存储设备的分区信息发生变化时被升级工具更新。 该文件存储在固件提取与发送系统 所在分区的根目录下, 固定名为: partiti0n_table.inf。 固件提取模块根据该分区信息文 件确定目标固件所在分区、 目标固件大小、 起止位置等信息。 并根据这些信息, 从存 储设备中读取对应数据, 发送给第二移动终端。 步骤 a7:第一移动终端在目标固件发送完成后,通知第二移动终端进行固件升级。 步骤 a8 : 第二移动终端的固件更新模块根据接收到的目标固件更新自身的固件, 并在更新完成后通知第一移动终端。 固件更新模块同样持有一个第二移动终端的分区信息文件,在接收到目标固件后, 根据第二移动终端的分区信息, 把接收到的目标固件写入到相应的、 移动终端固件对 应的分区中, 完成第二移动终端的固件更新。 此时, 第二移动终端即拥有和第一移动 终端完全的目标固件(即待更新的固件),即第二移动终端克隆了第一移动终端的固件。 第二移动终端发送更新完成指令通知第一移动终端固件更新完成。 步骤 a9: 第一移动终端接收到第二移动终端的更新完成指令后, 发送模式切换指 令通知第二移动终端切换回正常工作模式。 步骤 alO: 第一移动终端从固件提取与发送模式切换回正常工作模式。 至此,第一移动终端的目标固件被成功克隆到第二移动终端中,且第一移动终端、 第二移动终端均处于正常工作模式下, 整个移动终端固件更新过程结束。 采用本发明的技术方案, 达到了快速、 方便地更新移动终端的固件的目的, 提高 了移动终端固件更新过程的便捷性。 与仅支持传统固件更新方式的移动终端相比, 可 有效加速固件在支持本发明的技术方案的移动终端的用户圈内的传递和流通, 进而促 进了该类移动终端的用户群的发展和壮大, 同时提升该类移动终端生产商的品牌忠诚 度和产品认可程度。 此说明书中所描述的许多功能部件都被称为模块, 以便更加特别地强调其实现方 式的独立性。 本发明实施例中, 模块可以用软件实现, 以便由各种类型的处理器执行。 举例来 说, 一个标识的可执行代码模块可以包括计算机指令的一个或多个物理或者逻辑块, 举例来说, 其可以被构建为对象、 过程或函数。 尽管如此, 所标识模块的可执行代码 无需物理地位于一起, 而是可以包括存储在不同物理上的不同的指令, 当这些指令逻 辑上结合在一起时, 其构成模块并且实现该模块的规定目的。 实际上, 可执行代码模块可以是单条指令或者是许多条指令, 并且甚至可以分布 在多个不同的代码段上, 分布在不同程序当中, 以及跨越多个存储器设备分布。 同样 地, 操作数据可以在模块内被识别, 并且可以依照任何适当的形式实现并且被组织在 任何适当类型的数据结构内。 所述操作数据可以作为单个数据集被收集, 或者可以分 布在不同位置上(包括在不同存储设备上), 并且至少部分地可以仅作为电子信号存在 于系统或网络上。 在模块可以利用软件实现时, 考虑到现有硬件工艺的水平, 所以可以以软件实现 的模块, 在不考虑成本的情况下, 本领域技术人员都可以搭建对应的硬件电路来实现 对应的功能, 所述硬件电路包括常规的超大规模集成 (VLSI) 电路或者门阵列以及诸 如逻辑芯片、 晶体管之类的现有半导体或者是其它分立的元件。 模块还可以用可编程 硬件设备, 诸如现场可编程门阵列、 可编程阵列逻辑、 可编程逻辑设备等实现。 在本发明各方法实施例中,所述各步骤的序号并不能用于限定各步骤的先后顺序, 对于本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 对各步骤的先后变化 也在本发明的保护范围之内。 以上所述是本发明的优选实施方式, 应当指出, 对于本技术领域的普通技术人员 来说, 在不脱离本发明所述原理的前提下, 还可以作出若干改进和润饰, 这些改进和 润饰也应视为本发明的保护范围。 工业实用性 本发明实施例中, 第一移动终端与第二移动终端之间建立数据通道, 并通过数据 通道将目标固件发送给第二移动终端, 第二移动终端根据接收到的目标固件进行固件 更新, 这样能够不借助其它辅助软件和辅助设备即可完成移动终端固件的更新, 另外 可以在移动终端固件更新完成前, 通过第一移动终端预先了解到待更新的目标固件的 效果。 采用本发明的技术方案, 能够快速、 方便地更新移动终端的固件, 提高移动终 端固件更新过程的便捷性, 可有效加速固件在移动终端之间的传递和流通。 具有工业 实用性。 3. Update the package update via SD (Secure Digital) card. This method needs to obtain the SD card update package (usually also needs to be searched and downloaded through the network), and then copy it to the SD card; then start the update process through the menu of the mobile terminal interface. The whole update process is relatively fast, relatively safe and reliable, but the source of the update package is often only the mobile terminal manufacturer, and the range of options is small. In summary, all three methods need to find and obtain the target firmware version to be upgraded, and some need help tools to perform firmware update. In addition, these three types of solutions can only see the effect of the target firmware after the update is completed. SUMMARY OF THE INVENTION The technical problem to be solved by the present invention is to provide a method and apparatus for updating a firmware of a mobile terminal, which can complete the update of the firmware of the mobile terminal without using other auxiliary software and auxiliary equipment, and can further advance the firmware update of the mobile terminal before completion. Understand the effect of the target firmware to be updated. In order to solve the above technical problem, according to an aspect of the present invention, a method for updating a firmware of a mobile terminal is provided, including: establishing a first data channel with a second mobile terminal; and setting its own target firmware through the first data channel Sending to the second mobile terminal, and notifying the second mobile terminal to perform target firmware update; after receiving the update completion instruction of the second mobile terminal, notifying the second mobile terminal to switch back to the normal working mode, Switch itself to normal working mode. Optionally, before establishing the first data channel with the second mobile terminal, the method further includes: establishing a second data channel with the second mobile terminal; detecting whether the target firmware is related to the second mobile terminal The hardware is compatible; when the target firmware is compatible with the hardware of the second mobile terminal, the second mobile terminal is notified to enter the controlled upgrade mode, and switches itself to the firmware extraction and transmission mode. Optionally, detecting whether the target firmware is compatible with the hardware of the second mobile terminal comprises: acquiring hardware configuration information of the second mobile terminal; and querying according to a pre-stored list of hardware models supported by the target firmware Determining whether hardware of the second mobile terminal is in the hardware model list, if all hardware of the second mobile terminal is in the hardware model list, determining hardware of the target firmware and the second mobile terminal compatible. According to another aspect of the present invention, a mobile terminal firmware updating apparatus is provided, including: a data communication module configured to establish a first data channel with a second mobile terminal; and a firmware extraction module configured to pass the Transmitting, by the first data channel, the target firmware to the second mobile terminal, and notifying the second mobile terminal to perform target firmware update; and the mode switching module is configured to: after receiving the update completion instruction of the second mobile terminal, The second mobile terminal is notified to switch back to the normal working mode, and switches itself to the normal working mode. Optionally, the data communication module is further configured to establish a second data channel with the second mobile terminal; the device further includes: a compatibility detection module, configured to detect whether the target firmware is The hardware of the second mobile terminal is compatible; the mode switching module is further configured to notify the second mobile terminal to enter the controlled upgrade mode when the target firmware is compatible with the hardware of the second mobile terminal, and switch the switch itself To firmware extraction and send mode. Optionally, the device further includes: a hardware information acquiring module, configured to acquire hardware configuration information of the second mobile terminal; the compatibility detecting module is specifically configured to be based on a hardware model supported by the target firmware stored in advance a list, querying whether the hardware of the second mobile terminal is in the hardware model list, and if all hardware of the second mobile terminal is in the hardware model list, determining the target firmware and the second The hardware of the mobile terminal is compatible. According to another aspect of the present invention, a mobile terminal firmware update method is provided, including: establishing a first data channel with a first mobile terminal; receiving, by the first data channel, the first mobile terminal sending Target firmware; perform firmware update based on the received target firmware, and send an update completion command to the first mobile terminal after the update is completed. Optionally, before establishing the first data channel with the first mobile terminal, the method further includes: establishing a second data channel with the first mobile terminal; receiving the first mobile by using the second data channel The mode switching instruction of the terminal; switching itself to the controlled upgrade mode, and transmitting the switching result to the first mobile terminal, so that the first mobile terminal switches itself to the firmware extraction and transmission mode. According to another aspect of the present invention, a mobile terminal firmware updating apparatus is provided, including: a data communication module configured to establish a first data channel with a first mobile terminal; and a firmware receiving module configured to pass the The first data channel receives the target firmware sent by the first mobile terminal; the firmware update module is configured to perform firmware update according to the received target firmware, and send an update completion command to the first mobile terminal after the update is completed. Optionally, the data communication module is further configured to establish a second data channel with the first mobile terminal; the device further includes: a mode switching module, configured to receive the The mode switching instruction of the first mobile terminal switches itself to the controlled upgrade mode, and sends the handover result to the first mobile terminal, so that the first mobile terminal switches itself to the firmware extraction and transmission mode. The embodiment of the present invention has the following beneficial effects: In the above solution, a data channel is established between the first mobile terminal and the second mobile terminal, and the target firmware is sent to the second mobile terminal through the data channel, and the second mobile terminal receives the data according to the The target firmware performs firmware update, so that the firmware of the mobile terminal can be updated without using other auxiliary software and auxiliary equipment, and the first mobile terminal can be passed before the firmware update of the mobile terminal is completed. Know in advance the effect of the target firmware to be updated. By adopting the technical solution of the invention, the firmware of the mobile terminal can be updated quickly and conveniently, the convenience of the firmware update process of the mobile terminal is improved, and the transmission and circulation of the firmware between the mobile terminals can be effectively accelerated. BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a schematic flowchart of a method for updating a firmware of a mobile terminal according to an embodiment of the present invention; FIG. 2 is a block diagram showing a structure of a firmware updating device for a mobile terminal according to an embodiment of the present invention; FIG. 4 is a schematic structural diagram of a firmware update apparatus for a mobile terminal according to another embodiment of the present invention; FIG. 5 is a schematic flowchart of a firmware update method of a mobile terminal according to an embodiment of the present invention; FIG. 6 is a second mobile terminal handover according to an embodiment of the present invention; A flowchart to the controlled upgrade mode; and FIG. 7 is a flowchart of the first mobile terminal switching to the firmware extraction and transmission mode according to the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS The technical problems, technical solutions, and advantages of the embodiments of the present invention will be more clearly understood from the following detailed description. Embodiments of the present invention provide a mobile terminal firmware update method for an existing firmware update method that relies on a network and a computer platform, and needs to find an appropriate target firmware before updating, and cannot predict the effect of the target firmware before the update. The device can complete the update of the firmware of the mobile terminal without using other auxiliary software and auxiliary equipment, and can also know the effect of the target firmware to be updated in advance before the firmware update of the mobile terminal is completed. FIG. 1 is a schematic flowchart of a method for updating a firmware of a mobile terminal according to an embodiment of the present invention. As shown in FIG. 1, the method in this embodiment mainly includes steps 101-103. Step 101: Establish a first data channel with the second mobile terminal. Step 102: Send, by the first data channel, its own target firmware to the second mobile terminal, and notify the second mobile terminal to perform target firmware update. Step 103: After receiving the update completion instruction of the second mobile terminal, notify the second mobile terminal to switch back to the normal working mode, and switch itself to the normal working mode. The target firmware may be firmware that is being used by the first mobile terminal, and the first mobile terminal extracts the firmware that is being used by itself, and delivers the firmware to the second mobile terminal. In the mobile terminal firmware update method of the embodiment, a data channel is established between the first mobile terminal and the second mobile terminal, and the target firmware is sent to the second mobile terminal through the data channel, and the second mobile terminal performs the target firmware according to the received target firmware. The firmware update enables the update of the firmware of the mobile terminal without the aid of other auxiliary software and auxiliary devices. In addition, the effect of the target firmware to be updated can be known in advance by the first mobile terminal before the firmware update of the mobile terminal is completed. By adopting the technical solution of the invention, the firmware of the mobile terminal can be updated quickly and conveniently, the convenience of the firmware update process of the mobile terminal is improved, and the transmission and circulation of the firmware between the mobile terminals can be effectively accelerated. Further, in another implementation manner of the embodiment of the present invention, including the foregoing steps 101-103, before establishing the first data channel with the second mobile terminal, the method further includes: establishing the second mobile terminal Detecting whether the target firmware is compatible with hardware of the second mobile terminal; notifying the second mobile terminal when the target firmware is compatible with hardware of the second mobile terminal Controlled upgrade mode and switch itself to firmware extraction and delivery mode. Further, in another implementation manner of the embodiment of the present invention, including the foregoing steps 101-103, detecting whether the target firmware is compatible with hardware of the second mobile terminal may include: acquiring the second mobile terminal Querying, according to a pre-stored list of hardware models supported by the target firmware, whether the hardware of the second mobile terminal is in the hardware model list, if all hardware of the second mobile terminal is in the In the hardware model list, it is determined that the target firmware is compatible with the hardware of the second mobile terminal. The embodiment of the present invention further provides a mobile terminal firmware update apparatus. As shown in FIG. 2, the apparatus of this embodiment mainly includes: a data communication module, configured to establish a first data channel with the second mobile terminal; a firmware extraction module, configured to send target firmware to the second mobile terminal through the first data channel, and notify the second mobile terminal to perform target firmware update; and the mode switching module is configured to receive the After the update completion instruction of the mobile terminal, the second mobile terminal is notified to switch back to the normal working mode, and switches itself to the normal working mode. Further, the data communication module is further configured to establish a second data channel with the second mobile terminal; the device further includes: a compatibility detecting module, configured to detect whether the target firmware is related to the first The hardware of the mobile terminal is compatible; the mode switching module is further configured to notify the second mobile terminal to enter the controlled upgrade mode when the target firmware is compatible with the hardware of the second mobile terminal, and switch itself to Firmware extraction and transmission mode. Further, the device further includes: a hardware information acquiring module, configured to acquire hardware configuration information of the second mobile terminal; the compatibility detecting module is specifically configured to be configured according to a hardware model supported by the target firmware stored in advance Querying whether the hardware of the second mobile terminal is in the hardware model list, and if all hardware of the second mobile terminal is in the hardware model list, determining the target firmware and the second mobile The hardware of the terminal is compatible. The mobile terminal firmware update apparatus of this embodiment is disposed on the first mobile terminal, can establish a data channel with the second mobile terminal, and send the target firmware to the second mobile terminal through the data channel, and the second mobile terminal receives the The target firmware performs firmware update, so that the firmware of the mobile terminal can be updated without using other auxiliary software and auxiliary equipment, and the target firmware to be updated can be known in advance through the first mobile terminal before the firmware update of the mobile terminal is completed. effect. By adopting the technical solution of the invention, the firmware of the mobile terminal can be updated quickly and conveniently, the convenience of the firmware update process of the mobile terminal is improved, and the transmission and circulation of the firmware between the mobile terminals can be effectively accelerated. FIG. 3 is a schematic flowchart of a method for updating a firmware of a mobile terminal according to another embodiment of the present invention. As shown in FIG. 3, the method in this embodiment mainly includes steps 201-203. Step 201: Establish a first data channel with the first mobile terminal. Step 202: Receive target firmware sent by the first mobile terminal by using the first data channel. Step 203: Perform firmware update according to the received target firmware, and send an update completion command to the first mobile terminal after the update is completed. In the mobile terminal firmware update method of the embodiment, a data channel is established between the first mobile terminal and the second mobile terminal, and the target firmware is sent to the second mobile terminal through the data channel, and the second mobile terminal performs the target firmware according to the received target firmware. The firmware update enables the update of the firmware of the mobile terminal without the aid of other auxiliary software and auxiliary devices. In addition, the effect of the target firmware to be updated can be known in advance by the first mobile terminal before the firmware update of the mobile terminal is completed. By adopting the technical solution of the invention, the firmware of the mobile terminal can be updated quickly and conveniently, the convenience of the firmware update process of the mobile terminal is improved, and the transmission and circulation of the firmware between the mobile terminals can be effectively accelerated. Further, in another implementation manner of the embodiment of the present invention, including the foregoing steps 201-203, before establishing the first data channel with the first mobile terminal, the method further includes: establishing the first mobile terminal a second data channel between the first data channel; receiving, by the second data channel, a mode switching instruction of the first mobile terminal; switching itself to a controlled upgrade mode, and transmitting a handover result to the first mobile terminal, so as to The first mobile terminal switches itself to a firmware extraction and transmission mode. The embodiment of the present invention further provides a mobile terminal firmware update apparatus. As shown in FIG. 4, the embodiment includes: a data communication module, configured to establish a first data channel with the first mobile terminal; and a firmware receiving module, And configured to receive the target firmware sent by the first mobile terminal by using the first data channel; the firmware update module is configured to perform firmware update according to the received target firmware, and send an update completion command to the first after the update is completed. A mobile terminal. Further, the data communication module is further configured to establish a second data channel with the first mobile terminal; the device further includes: a mode switching module, configured to receive the first data channel by using the second data channel A mode switching instruction of the mobile terminal switches itself to the controlled upgrade mode, and sends the handover result to the first mobile terminal, so that the first mobile terminal switches itself to the firmware extraction and transmission mode. Further, the device further includes a hardware information detecting module, configured to detect hardware configuration information of the second mobile terminal, and send hardware configuration information of the second mobile terminal to the hardware information acquiring module of the first mobile terminal. The mobile terminal firmware update apparatus of this embodiment is disposed on the second mobile terminal, establishes a data channel with the first mobile terminal, and receives the target firmware through the data channel, and performs firmware update according to the received target firmware, so that the Other auxiliary software and auxiliary equipment can complete the update of the firmware of the mobile terminal, and the effect of the target firmware to be updated can be known in advance through the first mobile terminal before the firmware update of the mobile terminal is completed. By adopting the technical solution of the invention, the firmware of the mobile terminal can be updated quickly and conveniently, the convenience of the firmware update process of the mobile terminal is improved, and the transmission and circulation of the firmware between the mobile terminals can be effectively accelerated. The method and device for updating the firmware of the mobile terminal of the present invention will be described in detail below with reference to specific embodiments. The existing firmware update method must rely on the network and computer platform. It needs to find the appropriate target firmware before updating, and the target firmware effect cannot be predicted before the update. In view of this situation, the present invention provides a mobile terminal firmware update method and apparatus, which can copy firmware in one mobile terminal to another mobile terminal, which simplifies the process of finding the target firmware and finds a suitable mobile. The terminal finds the target firmware, does not need external environment support such as network, does not need to use the personal computer platform, and does not need to copy and dump. In addition, the method does not need other auxiliary software and auxiliary equipment, and the operation is simple and quick. Moreover, the effect of the target firmware can be known in advance by the first mobile terminal providing the target firmware before the firmware update. The technical solution of the present invention includes a first mobile terminal that provides target firmware and a second mobile terminal that receives target firmware. The first mobile terminal includes a data communication module, a firmware extraction module, a hardware information acquisition module, a compatibility detection module, and a mode switching module. The second mobile terminal includes a data communication module, a firmware receiving module, a firmware update module, and hardware information. Detection module and mode switching module. The first mobile terminal is responsible for providing the target firmware, controlling the second mobile terminal, establishing a data channel, and transmitting the built-in target firmware to the second mobile terminal through the data channel. The second mobile terminal is responsible for assisting the first mobile terminal to establish a data channel, receiving the target firmware sent by the first mobile terminal, and replacing the original built-in firmware with the received target firmware. The data channel is a bridge connecting the first mobile terminal and the second mobile terminal, and is responsible for transmitting data between the first mobile terminal and the second mobile terminal. The data includes, but is not limited to: instruction data sent by the first mobile terminal to the second mobile terminal, command response information fed back by the second mobile terminal to the first mobile terminal, target firmware data embedded in the first mobile terminal, and second Hardware information of the mobile terminal, etc. In addition, each module of the first mobile terminal and the second mobile terminal may coexist in the same mobile terminal. Thus, each mobile terminal can serve as both the first mobile terminal and the second mobile terminal. Specifically, as shown in FIG. 5, the mobile terminal firmware update method of the present invention includes the following step aal-step aal0. Step a1: The data communication modules of the first mobile terminal and the second mobile terminal cooperate to establish a second data channel. Data channel types include, but are not limited to, USB cable, WIFI, Bluetooth, and the like. Preferably, the first mobile terminal and the second mobile terminal can be connected by a USB cable. Using the OTG (On The Go) technology, the second mobile terminal is used as the USB peripheral device of the first mobile terminal, and a USB data transmission path is established between the first mobile terminal and the second mobile terminal. In addition, the step may attach a protection mechanism such as identity authentication between the first mobile terminal and the second mobile terminal, so as to initially confirm that both parties are the same-group mobile terminal supporting firmware replication. Step a2: The first mobile terminal detects whether the own target firmware is compatible with the hardware of the second mobile terminal. The hardware information acquisition module in the first mobile terminal acquires the hardware configuration information of the second mobile terminal by using the hardware information detection module in the second mobile terminal, and further determines whether the hardware of the second mobile terminal can run the target built in the first mobile terminal. firmware. Preferably, the compatibility detecting module in the first mobile terminal queries whether the model of the hardware acquired from the second mobile terminal is in the supported hardware model list according to the pre-stored hardware model list supported by the target firmware. If all hardware of the second mobile terminal is supported, it indicates that the target firmware can run on the second mobile terminal, that is, the target firmware of the first mobile terminal is compatible with the hardware of the second mobile terminal; otherwise, it indicates that the two are incompatible. Step a3: The first mobile terminal sends a mode switching instruction to the second mobile terminal by using the second data channel, and the mode switching module of the second mobile terminal switches itself to the controlled upgrade mode after receiving the mode switching instruction, and the switching result is obtained. Report to the first mobile terminal. In order to update the mobile terminal firmware, the partition in which the mobile terminal firmware is located must be written without the mobile terminal firmware being used. Therefore, there is a need for an alternate thin system for mobile terminal firmware updates, hereinafter referred to as a firmware update system. The system comprises the foregoing four modules of a data communication module, a firmware receiving module, a firmware update module and a mode switching module located on the second mobile terminal. Under the firmware update system, the firmware update module has full write permission to the storage device partition where the firmware of the mobile terminal is working normally, and can update the entire contents of the partition where the mobile terminal firmware is located. The flow of the second mobile terminal switching to the controlled upgrade mode is as shown in FIG. 6. When receiving the mode switching instruction, the second mobile terminal sets an identifier to enter the "controlled upgrade mode" (an empty file /flags/enter_upgrade_firmware_mode.flg of the firmware file name stored in the pre-agreed path). Then, the mode switching module passes It is known that the second mobile terminal is restarted. During the restart of the second mobile terminal, the mode switching module checks whether the aforementioned identifier exists, and if so, enters the firmware update system; otherwise, starts the mobile terminal normal working system. After successfully cutting into the controlled upgrade mode, the second mobile terminal reports the information about the successful mode switching to the first mobile terminal, and sends a request for establishing the data channel to the first mobile terminal. Step a4: After receiving the feedback that the second mobile terminal mode is successfully switched, the first mobile terminal switches itself to the firmware extraction and transmission mode by the mode switching module. In order to extract the firmware of the mobile terminal, it is necessary to read the storage partition where the mobile terminal firmware is located without running the working terminal of the mobile terminal. Therefore, a specialized, streamlined system for firmware extraction and transmission is required, hereinafter referred to as the firmware extraction and delivery system. The firmware extraction and delivery system is a streamlined system that provides only the essential functions of data communication, firmware extraction, firmware delivery, and mode switching. Specifically, the foregoing includes a data communication module, a firmware extraction module, and a mode switching module, which are located on the first mobile terminal. The firmware extraction and delivery system is another backup system that is completely separate from the operating system when the mobile terminal is in normal use. The two systems are stored separately in two separate partitions. Both systems can be started independently, but not simultaneously. The application in the firmware extraction and transmission system has read data permission for the partition where the mobile terminal firmware is located. The process of the first mobile terminal switching from the normal working mode to the firmware extracting and transmitting mode is as shown in FIG. First, when the first mobile terminal receives the mode switching instruction, the mode switching module sets the identifier of the "firmware extraction and transmission mode" (an empty file /flags/enter_get_firmware_mode stored in the pre-agreed path of the firmware file name). Flg ) 0 Then, the mode switching module notifies the first mobile terminal to restart. Finally, during the restart of the first mobile terminal, the mode switching module detects whether the foregoing identifier exists, and if so, enters the firmware extraction and transmission system; otherwise, starts the mobile terminal normal working system. Step a5: The first mobile terminal in the firmware extraction and transmission mode and the second mobile terminal in the controlled upgrade mode re-establish the data channel through the respective data communication module, that is, the first data channel. After the two steps a3 and a4 are completed, the first mobile terminal and the second mobile terminal respectively cut into the new mode will re-establish a connection through the USB device, the first mobile terminal is still a USB host device, and the second mobile terminal is still a USB slave device. device. Step a6: The first mobile terminal extracts its own built-in target firmware through the firmware extraction module, and sends it to the second mobile terminal. As mentioned earlier, there are multiple storage partitions on the storage device of the first mobile terminal. The firmware extraction module holds a partition information file that describes each partition information in the storage device. The file is written during the production process of the mobile terminal, and is updated by the upgrade tool when the partition information of the storage device changes. This file is stored in the root directory of the partition where the firmware extraction and sending system is located. The fixed name is: partiti 0n _t a bl e .inf. The firmware extraction module determines information such as a partition where the target firmware is located, a target firmware size, a start and end position, and the like according to the partition information file. And according to the information, the corresponding data is read from the storage device and sent to the second mobile terminal. Step a7: The first mobile terminal notifies the second mobile terminal to perform firmware upgrade after the target firmware is sent. Step a8: The firmware update module of the second mobile terminal updates its own firmware according to the received target firmware, and notifies the first mobile terminal after the update is completed. The firmware update module also holds a partition information file of the second mobile terminal, and after receiving the target firmware, writes the received target firmware to the corresponding partition corresponding to the mobile terminal firmware according to the partition information of the second mobile terminal. In the middle, the firmware update of the second mobile terminal is completed. At this time, the second mobile terminal has the target firmware (ie, the firmware to be updated) that is completely complete with the first mobile terminal, that is, the second mobile terminal clones the firmware of the first mobile terminal. The second mobile terminal sends an update completion instruction to notify the first mobile terminal that the firmware update is completed. Step a9: After the first mobile terminal receives the update completion instruction of the second mobile terminal, the sending mode switching instruction notifies the second mobile terminal to switch back to the normal working mode. Step a10: The first mobile terminal switches from the firmware extraction and transmission mode back to the normal working mode. At this point, the target firmware of the first mobile terminal is successfully cloned into the second mobile terminal, and the first mobile terminal and the second mobile terminal are all in the normal working mode, and the entire mobile terminal firmware update process ends. By adopting the technical solution of the invention, the purpose of updating the firmware of the mobile terminal quickly and conveniently is achieved, and the convenience of the firmware update process of the mobile terminal is improved. Compared with a mobile terminal that only supports the traditional firmware update mode, the firmware can be effectively accelerated in the user circle of the mobile terminal supporting the technical solution of the present invention, thereby promoting the development and growth of the user group of the mobile terminal. At the same time, enhance the brand loyalty and product recognition of such mobile terminal manufacturers. Many of the functional components described in this specification are referred to as modules to more particularly emphasize the independence of their implementation. In an embodiment of the invention, the modules may be implemented in software for execution by various types of processors. For example, an identified executable code module can comprise one or more physical or logical blocks of computer instructions, which can be constructed, for example, as an object, procedure, or function. Nonetheless, the executable code of the identified modules need not be physically located together, but may include different instructions stored in different physicalities. When these instructions are logically combined, they form a module and implement the specified purpose of the module. . In fact, the executable code module can be a single instruction or a number of instructions, and can even be distributed across multiple different code segments, distributed among different programs, and distributed across multiple memory devices. Likewise, operational data may be identified within the module and may be implemented in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed at different locations (including on different storage devices), and may at least partially exist as an electronic signal on a system or network. When the module can be implemented by software, considering the level of the existing hardware process, the module can be implemented in software. Without considering the cost, a person skilled in the art can construct a corresponding hardware circuit to implement the corresponding function. The hardware circuitry includes conventional Very Large Scale Integration (VLSI) circuits or gate arrays as well as existing semiconductors such as logic chips, transistors, or other discrete components. Modules can also be implemented with programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices, and the like. In the method embodiments of the present invention, the sequence numbers of the steps are not used to limit the sequence of the steps. For those skilled in the art, the steps of the steps are changed without any creative work. It is also within the scope of the invention. The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and retouchings without departing from the principles of the present invention. It should be considered as the scope of protection of the present invention. Industrial Applicability In the embodiment of the present invention, a data channel is established between the first mobile terminal and the second mobile terminal, and the target firmware is sent to the second mobile terminal through the data channel, and the second mobile terminal performs firmware according to the received target firmware. The update enables the update of the firmware of the mobile terminal without the aid of other auxiliary software and auxiliary devices. In addition, the effect of the target firmware to be updated can be known in advance by the first mobile terminal before the firmware update of the mobile terminal is completed. By adopting the technical solution of the invention, the firmware of the mobile terminal can be updated quickly and conveniently, the convenience of the firmware update process of the mobile terminal is improved, and the transmission and circulation of the firmware between the mobile terminals can be effectively accelerated. It has industrial applicability.

Claims

权 利 要 求 书  Claims
1 . 一种移动终端固件更新方法, 包括: 建立与第二移动终端之间的第一数据通道; A mobile terminal firmware update method, comprising: establishing a first data channel with a second mobile terminal;
通过所述第一数据通道将自身的目标固件发送给所述第二移动终端, 并通 知所述第二移动终端进行目标固件更新;  Transmitting, by the first data channel, its own target firmware to the second mobile terminal, and informing the second mobile terminal to perform target firmware update;
在接收到所述第二移动终端的更新完成指令之后, 通知所述第二移动终端 切换回正常工作模式, 并将自身切换至正常工作模式。  After receiving the update completion instruction of the second mobile terminal, the second mobile terminal is notified to switch back to the normal working mode, and switches itself to the normal working mode.
2. 根据权利要求 1所述的移动终端固件更新方法, 其中, 所述建立与第二移动终 端之间的第一数据通道之前还包括: The mobile terminal firmware update method according to claim 1, wherein before the establishing the first data channel between the second mobile terminal and the second mobile terminal, the method further comprises:
建立与所述第二移动终端之间的第二数据通道;  Establishing a second data channel with the second mobile terminal;
检测所述目标固件是否与所述第二移动终端的硬件兼容;  Detecting whether the target firmware is compatible with hardware of the second mobile terminal;
在所述目标固件与所述第二移动终端的硬件兼容时, 通知所述第二移动终 端进入受控升级模式, 并将自身切换至固件提取与发送模式。  When the target firmware is compatible with the hardware of the second mobile terminal, the second mobile terminal is notified to enter the controlled upgrade mode, and switches itself to the firmware extraction and transmission mode.
3. 根据权利要求 2所述的移动终端固件更新方法, 其中, 所述检测所述目标固件 是否与所述第二移动终端的硬件兼容包括: 获取所述第二移动终端的硬件配置信息; The mobile terminal firmware update method according to claim 2, wherein the detecting whether the target firmware is compatible with the hardware of the second mobile terminal comprises: acquiring hardware configuration information of the second mobile terminal;
根据预先存储的所述目标固件支持的硬件型号列表, 查询所述第二移动终 端的硬件是否在所述硬件型号列表中, 如果所述第二移动终端的所有硬件均在 所述硬件型号列表中, 则判断所述目标固件与所述第二移动终端的硬件兼容。  Querying, according to a pre-stored list of hardware models supported by the target firmware, whether hardware of the second mobile terminal is in the hardware model list, if all hardware of the second mobile terminal is in the hardware model list And determining that the target firmware is compatible with hardware of the second mobile terminal.
4. 一种移动终端固件更新装置, 包括: 数据通信模块, 设置为建立与第二移动终端之间的第一数据通道; 固件提取模块, 设置为通过所述第一数据通道将目标固件发送给所述第二 移动终端, 并通知所述第二移动终端进行目标固件更新; 模式切换模块, 设置为在接收到所述第二移动终端的更新完成指令之后, 通知所述第二移动终端切换回正常工作模式, 并将自身切换至正常工作模式。 根据权利要求 4所述的移动终端固件更新装置, 其中, 所述数据通信模块还设置为建立与所述第二移动终端之间的第二数据通 道; 所述装置还包括: 4. A mobile terminal firmware update apparatus, comprising: a data communication module configured to establish a first data channel with a second mobile terminal; a firmware extraction module configured to send target firmware to the first data channel And the second mobile terminal notifying the second mobile terminal to perform target firmware update; the mode switching module is configured to notify the second mobile terminal to switch back after receiving the update completion instruction of the second mobile terminal Normal mode of operation, and switch itself to normal operating mode. The mobile terminal firmware updating apparatus according to claim 4, wherein The data communication module is further configured to establish a second data channel with the second mobile terminal; the device further includes:
兼容性检测模块, 设置为检测所述目标固件是否与所述第二移动终端的硬 件兼容;  a compatibility detecting module, configured to detect whether the target firmware is compatible with hardware of the second mobile terminal;
所述模式切换模块还设置为在所述目标固件与所述第二移动终端的硬件兼 容时, 通知所述第二移动终端进入受控升级模式, 并将自身切换至固件提取与 发送模式。  The mode switching module is further configured to notify the second mobile terminal to enter a controlled upgrade mode when the target firmware is compatible with hardware of the second mobile terminal, and switch itself to a firmware extraction and transmission mode.
6. 根据权利要求 5所述的移动终端固件更新装置, 其中, 所述装置还包括: 硬件信息获取模块, 设置为获取所述第二移动终端的硬件配置信息; 所述兼容性检测模块具体设置为根据预先存储的所述目标固件支持的硬件 型号列表, 查询所述第二移动终端的硬件是否在所述硬件型号列表中, 如果所 述第二移动终端的所有硬件均在所述硬件型号列表中, 则判断所述目标固件与 所述第二移动终端的硬件兼容。 The mobile terminal firmware update device according to claim 5, wherein the device further comprises: a hardware information acquisition module, configured to acquire hardware configuration information of the second mobile terminal; Querying whether the hardware of the second mobile terminal is in the hardware model list according to a hardware model list supported by the target firmware stored in advance, if all hardware of the second mobile terminal is in the hardware model list And determining that the target firmware is compatible with hardware of the second mobile terminal.
7. 一种移动终端固件更新方法, 包括: 建立与第一移动终端之间的第一数据通道; A mobile terminal firmware update method, comprising: establishing a first data channel with a first mobile terminal;
通过所述第一数据通道接收所述第一移动终端发送的目标固件; 根据接收到的目标固件进行固件更新, 并在更新完成后发送更新完成指令 至所述第一移动终端。  Receiving, by the first data channel, the target firmware sent by the first mobile terminal; performing firmware update according to the received target firmware, and sending an update completion instruction to the first mobile terminal after the update is completed.
8. 根据权利要求 7所述的移动终端固件更新方法, 其中, 所述建立与第一移动终 端之间的第一数据通道之前还包括: The mobile terminal firmware update method according to claim 7, wherein before the establishing the first data channel between the first mobile terminal and the first mobile terminal, the method further comprises:
建立与所述第一移动终端之间的第二数据通道;  Establishing a second data channel with the first mobile terminal;
通过所述第二数据通道接收所述第一移动终端的模式切换指令; 将自身切换至受控升级模式, 并将切换结果发送给所述第一移动终端, 以 便所述第一移动终端将自身切换至固件提取与发送模式。  Receiving, by the second data channel, a mode switching instruction of the first mobile terminal; switching itself to a controlled upgrade mode, and transmitting a handover result to the first mobile terminal, so that the first mobile terminal sets itself Switch to firmware extraction and send mode.
9. 一种移动终端固件更新装置, 包括: 数据通信模块, 设置为建立与第一移动终端之间的第一数据通道; 固件接收模块, 设置为通过所述第一数据通道接收所述第一移动终端发送 的目标固件; A mobile terminal firmware update apparatus, comprising: a data communication module, configured to establish a first data channel with a first mobile terminal; a firmware receiving module, configured to receive, by using the first data channel, target firmware sent by the first mobile terminal;
固件更新模块, 设置为根据接收到的目标固件进行固件更新, 并在更新完 成后发送更新完成指令至所述第一移动终端。  The firmware update module is configured to perform firmware update according to the received target firmware, and send an update completion command to the first mobile terminal after the update is completed.
10. 根据权利要求 9所述的移动终端固件更新装置, 其中, 所述数据通信模块还设置为建立与所述第一移动终端之间的第二数据通 道; 所述装置还包括: 10. The mobile terminal firmware update apparatus according to claim 9, wherein the data communication module is further configured to establish a second data channel with the first mobile terminal;
模式切换模块, 设置为通过所述第二数据通道接收所述第一移动终端的模 式切换指令, 将自身切换至受控升级模式, 并将切换结果发送给所述第一移动 终端, 以便所述第一移动终端将自身切换至固件提取与发送模式。  a mode switching module, configured to receive a mode switching instruction of the first mobile terminal by using the second data channel, switch itself to a controlled upgrade mode, and send a handover result to the first mobile terminal, so that The first mobile terminal switches itself to the firmware extraction and transmission mode.
PCT/CN2014/082852 2013-11-21 2014-07-23 Method and apparatus for updating firmware of mobile terminal WO2015074435A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310594052.1A CN104657161A (en) 2013-11-21 2013-11-21 Method and device for updating firmware of mobile terminal
CN201310594052.1 2013-11-21

Publications (1)

Publication Number Publication Date
WO2015074435A1 true WO2015074435A1 (en) 2015-05-28

Family

ID=53178895

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/082852 WO2015074435A1 (en) 2013-11-21 2014-07-23 Method and apparatus for updating firmware of mobile terminal

Country Status (2)

Country Link
CN (1) CN104657161A (en)
WO (1) WO2015074435A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111796856A (en) * 2020-08-26 2020-10-20 北京紫光展锐通信技术有限公司 Differential upgrading method and device, storage medium and computer equipment
CN115113894A (en) * 2021-05-19 2022-09-27 深圳方位通讯科技有限公司 Equipment upgrading method, terminal equipment and computer readable storage medium
US11880315B2 (en) 2020-04-15 2024-01-23 Hewlett-Packard Development Company, L.P. Operation of an output component to produce a representation of an instruction set

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105072398B (en) * 2015-08-06 2018-07-13 浙江宇视科技有限公司 A kind of device updating method and device
CN105975303A (en) * 2016-04-29 2016-09-28 乐视控股(北京)有限公司 Upgrade control method and device
CN106227571A (en) * 2016-08-25 2016-12-14 维沃移动通信有限公司 Method for upgrading system and mobile terminal thereof
CN106951283A (en) * 2017-03-13 2017-07-14 广州视源电子科技股份有限公司 It is a kind of that the system and method that PC ends carry out software upgrading is assisted using mobile terminal
CN109002302A (en) * 2017-05-25 2018-12-14 佛山市顺德区顺达电脑厂有限公司 The firmware update of management engine
CN107526602A (en) * 2017-09-05 2017-12-29 郑州云海信息技术有限公司 A kind of cmc method for updating edition and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6754895B1 (en) * 2001-04-26 2004-06-22 Palm Source, Inc. Method and system for automatic firmware updates in a portable hand-held device
CN101184301A (en) * 2007-12-14 2008-05-21 中兴通讯股份有限公司 Mobile terminal remote firmware updating method and system
CN101414454A (en) * 2007-10-18 2009-04-22 佳世达科技股份有限公司 Method for updating display firmware
CN101452692A (en) * 2007-12-04 2009-06-10 瑞昱半导体股份有限公司 Firmware updating method and system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101711026B (en) * 2009-12-11 2013-06-05 中兴通讯股份有限公司 Inter-mobile terminal software version upgrading method and system
CN102707960B (en) * 2011-03-28 2016-01-27 联想(北京)有限公司 Firmware update, portable mobile terminal and portable equipment
EP2675110B1 (en) * 2011-05-04 2015-09-02 Huawei Device Co., Ltd. Method, system and terminal for system update between mobile communication terminals
CN102231758A (en) * 2011-07-05 2011-11-02 华为终端有限公司 Software upgrading method and device of electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6754895B1 (en) * 2001-04-26 2004-06-22 Palm Source, Inc. Method and system for automatic firmware updates in a portable hand-held device
CN101414454A (en) * 2007-10-18 2009-04-22 佳世达科技股份有限公司 Method for updating display firmware
CN101452692A (en) * 2007-12-04 2009-06-10 瑞昱半导体股份有限公司 Firmware updating method and system
CN101184301A (en) * 2007-12-14 2008-05-21 中兴通讯股份有限公司 Mobile terminal remote firmware updating method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11880315B2 (en) 2020-04-15 2024-01-23 Hewlett-Packard Development Company, L.P. Operation of an output component to produce a representation of an instruction set
CN111796856A (en) * 2020-08-26 2020-10-20 北京紫光展锐通信技术有限公司 Differential upgrading method and device, storage medium and computer equipment
CN115113894A (en) * 2021-05-19 2022-09-27 深圳方位通讯科技有限公司 Equipment upgrading method, terminal equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN104657161A (en) 2015-05-27

Similar Documents

Publication Publication Date Title
WO2015074435A1 (en) Method and apparatus for updating firmware of mobile terminal
US8539471B2 (en) Updating firmware of an electronic device
WO2017067448A1 (en) Firmware-over-the-air upgrade method, system and computer storage medium
CN102232304B (en) Method, system and terminal for system update between mobile communication terminals
US11003599B2 (en) Method, apparatus and system of managing external devices, memory and unmanned aerial vehicle
US20110283274A1 (en) Firmware image update and management
WO2019140656A1 (en) Firmware upgrade method and apparatus, electronic device and control device
US9557791B2 (en) Computer device and method for converting working mode of universal serial bus connector of the computer device
WO2017185954A1 (en) Method, host, and system for implementing usb device management
CN103826162A (en) Embedded system of intelligent set top box based on Android and recovery method of embedded system
WO2015154538A1 (en) Memory booting method and device
CN101169729A (en) Embedded type system and method for renewing application program
CN115328563B (en) System starting method and electronic equipment
CN116737214A (en) Upgrade method of operating system, electronic equipment and storage medium
CN112416411B (en) Upgrading method and device, equipment end, server and computer readable medium
WO2015196479A1 (en) Program data updating method and device
JP6404708B2 (en) Information processing apparatus, BIOS setting information changing method, and computer program
JPH11328040A (en) Memory readout control method and program readout control method
WO2014187401A1 (en) Method and device for remote base station version installation
US20050010914A1 (en) Method for upgrading firmware
WO2021012170A1 (en) Firmware booting method and device, and computer-readable storage medium
WO2012097570A1 (en) Method and device for implementing software version synchronization
CN112162794A (en) Single board starting method, device, single board and network equipment
WO2017121077A1 (en) Method and device for switching between two boot files
CN114661322B (en) Upgrade method of operating system, electronic equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14863578

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14863578

Country of ref document: EP

Kind code of ref document: A1