WO2017075998A1 - 终端控制方法及装置 - Google Patents

终端控制方法及装置 Download PDF

Info

Publication number
WO2017075998A1
WO2017075998A1 PCT/CN2016/085830 CN2016085830W WO2017075998A1 WO 2017075998 A1 WO2017075998 A1 WO 2017075998A1 CN 2016085830 W CN2016085830 W CN 2016085830W WO 2017075998 A1 WO2017075998 A1 WO 2017075998A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
upgrade
forced
charging mode
mode
Prior art date
Application number
PCT/CN2016/085830
Other languages
English (en)
French (fr)
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 WO2017075998A1 publication Critical patent/WO2017075998A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4411Configuring for operating with peripheral devices; Loading of device drivers
    • G06F9/4413Plug-and-play [PnP]

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a terminal control method and apparatus.
  • the upgrade is to reinstall the operating system for the terminal, upgrade the operating system with a major defect version to the new version of the operating system to eliminate major defects, so that the function of the terminal can be improved.
  • a forced upgrade method to upgrade a major defected operating system to a newer version of the operating system.
  • an over-the-air (OTA) packet carrying a mandatory upgrade identifier is usually pushed to the terminal, and the terminal enters a forced upgrade mode, and the command to perform the upgrade is written into the misc partition of the terminal.
  • OTA over-the-air
  • the terminal after the terminal has received the mandatory upgrade of the OTA packet pushed by the manufacturer, and after the shutdown, if the terminal is activated by the Universal Serial Bus (USB) charging mode, the terminal is controlled to simultaneously run the forced upgrade mode and charging.
  • USB Universal Serial Bus
  • the mode causes the startup mode of the terminal to be confusing, which causes the terminal card to die in the forced upgrade mode, so that the terminal cannot complete the upgrade.
  • the present invention provides a terminal control method and device, which can prevent a terminal from entering a charging mode when the terminal runs a forced upgrade mode, so that the terminal can complete the upgrade.
  • the application provides a terminal control method, including:
  • the terminal If it is detected that the terminal needs to perform a forced upgrade, the terminal is prevented from entering the charging mode.
  • the first control instruction corresponding to the charging mode is not written in the command line parsing library of the terminal to prevent the terminal from entering the charging mode, and the terminal is controlled to enter the forced upgrade mode.
  • detecting whether the terminal needs to perform a forced upgrade includes:
  • the method further includes:
  • the terminal does not need to be forced to upgrade.
  • the method further includes:
  • the terminal is controlled to enter the charging mode.
  • controlling the terminal to enter the charging mode includes:
  • the application also provides a terminal control device, including:
  • a detecting module configured to detect whether the terminal needs to be forcedly upgraded during the process of starting the terminal through the serial bus
  • a control module configured to prevent the terminal from entering a charging mode if it is detected that the terminal needs to perform a forced upgrade.
  • control module is specifically configured to:
  • the first control instruction corresponding to the charging mode is not written in the command line parsing library of the terminal to prevent the terminal from entering the charging mode, and the terminal is controlled to enter the forced upgrade mode.
  • the detecting module is specifically configured to:
  • the detecting module is further configured to:
  • the terminal does not need to be forced to upgrade.
  • control module is further configured to:
  • the terminal is controlled to enter the charging mode.
  • control module is specifically configured to:
  • the embodiment of the present application provides a terminal, including a memory, and one or more processors, where the terminal further includes:
  • One or more units the one or more units being stored in the memory and configured to be executed by the one or more processors, the one or more units including instructions for performing the following steps :
  • the terminal If it is detected that the terminal needs to perform a forced upgrade, the terminal is prevented from entering the charging mode.
  • the embodiment of the present application provides a computer program product for use in conjunction with a terminal, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising instructions for performing the following steps:
  • the terminal If it is detected that the terminal needs to perform a forced upgrade, the terminal is prevented from entering the charging mode.
  • the terminal control method and device of the present application detects whether the terminal needs to be forcedly upgraded during the process of starting the terminal through the USB. If it is detected that the terminal needs to perform a forced upgrade, the terminal is prevented from entering the charging mode, and the terminal is activated when the terminal is started through the USB. , control the startup mode of the terminal. With the technical solution of the present application, when the terminal is started through the USB, the control terminal only enters the forced upgrade mode, so that the USB no longer charges the terminal, thereby avoiding the terminal startup mode being confusing, and not upgrading the terminal when the upgrade is performed. Mode, so that the terminal successfully completes the upgrade.
  • FIG. 1 is a flowchart of an embodiment of a terminal control method according to the present application.
  • FIG. 2 is a flowchart of another embodiment of a terminal control method according to the present application.
  • FIG. 3 is a schematic structural diagram of an embodiment of a terminal control apparatus according to the present application.
  • FIG. 4 is a schematic structural diagram of a terminal according to the present application.
  • FIG. 1 is a flowchart of a method for controlling a terminal in the present application. As shown in FIG. 1 , the terminal control method in this embodiment may include the following steps:
  • the terminal When the terminal is started, the terminal may enter different startup modes at the same time. For example, if the user may start the terminal through USB, the terminal may enter the charging mode, and since the operating system of the terminal may have major defects, it is required. Forced upgrade of the terminal, Therefore, when the USB starts the terminal, the startup mode of the terminal may include the charging mode and the forced upgrade mode. When the charging mode and the forced upgrade mode exist at the same time, the terminal may be stuck in the forced upgrade mode, and the terminal cannot complete the upgrade. In the process of the user starting the terminal through USB, firstly, it is necessary to detect whether the terminal needs to perform a forced upgrade.
  • the terminal If it is detected that the terminal needs to perform a forced upgrade, the terminal is prevented from entering the charging mode.
  • the terminal in the process of starting the terminal through the USB, if it is detected that the terminal needs to perform the forced upgrade, the terminal can be prevented from entering the charging mode, so that the control terminal only enters the forced upgrade mode, so that the terminal can successfully complete the upgrade.
  • the control command corresponding to the charging mode is not written in the command line analysis library (cmdline) of the terminal.
  • the cmdline of the terminal is the core of each control command, and the terminal controls the terminal to enter the corresponding startup mode according to other instructions in the cmdline, such as a forced upgrade instruction.
  • the execution body of the terminal control method of the embodiment may be specifically a terminal control device, and the terminal control device may be specifically integrated by software, for example, the terminal control device may be an application program; or the terminal control device may be integrated. In the operating system of the terminal.
  • the terminal control method of the embodiment in the process of starting the terminal through the USB, by detecting whether the terminal needs to perform a forced upgrade, if detecting that the terminal needs to perform a forced upgrade, preventing the terminal from entering the charging mode, when the terminal is started through the USB, Control the startup mode of the terminal.
  • the control terminal when the terminal is started through the USB, the control terminal only enters the forced upgrade mode, so that the USB no longer charges the terminal, thereby avoiding the terminal startup mode confusion, and the terminal is not stuck when the upgrade is performed.
  • the upgrade mode enables the terminal to successfully complete the upgrade.
  • FIG. 2 is a flowchart of another embodiment of a terminal control method according to the present application.
  • the terminal control method in this embodiment further describes the technical solution of the present application in more detail on the basis of the embodiment shown in FIG. 1 .
  • the terminal control method in this embodiment may specifically include the following steps:
  • step 202 If the identifier of the forced upgrade mode exists, go to step 202; otherwise, if there is no identifier of the forced upgrade mode, go to step 205.
  • the terminal downloads the OTA packet and stores it in the MISC partition of the terminal.
  • the terminal may need to perform a forced upgrade because the OTA packet pushed by the manufacturer may be downloaded before the terminal is closed.
  • the terminal may enter the charging mode, which may cause the terminal to fail to upgrade. Therefore, in the process of starting the terminal through the USB, the user must first detect whether the terminal's MISC partition has the mandatory upgrade mode identifier, that is, the detection. Is there an OTA package with a mandatory upgrade ID?
  • the identifier of the mandatory upgrade mode exists.
  • the instruction corresponding to the forced upgrade mode can be set as a valid instruction, so that the terminal can enter the forced upgrade mode.
  • the terminal After the instruction corresponding to the forced upgrade mode is set as the valid command, the terminal cannot enter the charging mode. Therefore, it is necessary to acquire the first control command corresponding to the charging mode, and the first control command can indicate that the terminal does not enter the charging mode.
  • first, second, etc. describe the control instructions in the embodiments of the present application, these control instructions should not be limited to these terms, and these terms are only used to distinguish control instructions from each other.
  • first control command may also be referred to as a second control command
  • second control command may also be referred to as a first control command, without departing from the scope of the embodiments of the present application.
  • the first control instruction corresponding to the charging mode is not written in the cmdline of the terminal to prevent the terminal from entering the charging mode, and the terminal is controlled to enter the forced upgrade mode.
  • the first control instruction corresponding to the charging mode may not be written in the cmdline of the terminal, thereby preventing the charging mode from being written into the cmdline, and the control terminal only enters Forced upgrade mode, when the terminal completes the upgrade, the process ends.
  • the OTA of the terminal does not have the OTA of the mandatory upgrade identifier, the identifier of the mandatory upgrade mode does not exist. It is determined that the terminal does not need to be forced to upgrade, and the terminal is controlled to enter the charging mode.
  • the instruction corresponding to the forced upgrade mode may be set as an invalid instruction, so that the terminal does not enter the forced upgrade mode.
  • the terminal can be controlled to enter the charging mode. After the instruction corresponding to the forced upgrade mode is set as the invalid command, the terminal can enter the charging mode. Therefore, it is necessary to acquire a second control command corresponding to the charging mode, and the second control command can instruct the terminal to enter the charging mode.
  • the second control instruction corresponding to the charging mode needs to be written to the cmdline of the terminal, so that the control terminal can enter the charging mode.
  • the terminal control method of the embodiment in the process of starting the terminal through the USB, it is detected whether the terminal needs to perform the forced upgrade. If the terminal needs to perform the forced upgrade, the terminal is prevented from entering the charging mode, and if the terminal is detected, the terminal does not need to be forced to upgrade.
  • the control terminal enters the charging mode, and realizes the startup mode of the control terminal when the terminal is started through the USB.
  • the control terminal when the terminal is started through the USB, the control terminal only enters the forced upgrade mode or only enters the charging mode, so as to avoid causing the terminal startup mode to be confused, and the terminal is not charged when the terminal is upgraded, so that the terminal does not get the card. Death in the forced upgrade mode, the upgrade is successfully completed; the terminal can be charged when the terminal is not upgraded.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
  • FIG. 3 is a schematic structural diagram of an embodiment of a terminal control apparatus according to the present application. As shown in FIG. 3, the terminal control apparatus of this embodiment includes a detection module 10 and a control module 11.
  • the detection module 10 and the control module 11 are capable of transmitting information data and the like.
  • the detecting module 10 is configured to detect whether the terminal needs to perform a forced upgrade; The information is transmitted to the control module 11. If the detecting module 10 detects that the terminal needs to perform a forced upgrade, the control module 11 is configured to prevent the terminal from entering the charging mode.
  • control terminal of the present embodiment is the same as that of the embodiment shown in FIG. 1 .
  • details refer to the description of the embodiment shown in FIG. 1 , and details are not described herein again.
  • the terminal control device detects whether the terminal needs to perform the forced upgrade. If the terminal needs to perform the forced upgrade, the control module 11 prevents the terminal from entering the charging mode.
  • the startup mode of the terminal is controlled.
  • the detecting module 10 is specifically configured to detect whether there is an identifier of the forced upgrade mode in the recovery partition of the terminal. Specifically, if the detection module 10 detects that there is an identifier of the forced upgrade mode, it is determined that the terminal needs to be forced to upgrade; the control module 11 is specifically configured to acquire a first control instruction corresponding to the charging mode; and the charging mode is not written in the cmdline of the terminal. The first control command prevents the terminal from entering the charging mode and controls the terminal to enter the forced upgrade mode.
  • the detecting module 10 is further configured to: if the detecting module 10 does not detect the identifier of the forced upgrade mode, that is, the identifier of the forced upgrade mode does not exist, Make sure the terminal does not require a forced upgrade.
  • the control module 11 is further configured to control the terminal to enter the charging mode. Specifically, the control module 11 is specifically configured to acquire a control instruction corresponding to the charging mode; and write a control instruction corresponding to the charging mode in the cmdline of the terminal to control the terminal to enter the charging mode.
  • control terminal of the present embodiment is the same as that of the embodiment shown in FIG. 2, and the details of the implementation of the embodiment shown in FIG. 2 are not mentioned here.
  • the terminal control device of this embodiment passes the check during the process of starting the terminal through the USB.
  • the test module 10 detects whether the terminal needs to perform the forced upgrade. If the terminal needs to perform the forced upgrade, the control module 11 prevents the terminal from entering the charging mode. If it is detected that the terminal does not need to perform the forced upgrade, the control module 11 controls the terminal to enter the charging mode.
  • the startup mode of the control terminal is realized when the terminal is started by USB. With the technical solution of the embodiment, when the terminal is started through the USB, the control terminal only enters the forced upgrade mode or only enters the charging mode, so as to avoid causing the terminal startup mode to be confused, and the terminal is not charged when the terminal is upgraded, so that the terminal does not get the card. Death in the forced upgrade mode, the upgrade is successfully completed; the terminal can be charged when the terminal is not upgraded.
  • a schematic structural diagram of a terminal is provided in the embodiment of the present application, including a memory 41, and one or more processors 42.
  • the terminal further includes:
  • One or more units the one or more units being stored in the memory and configured to be executed by the one or more processors, the one or more units including instructions for performing the following steps :
  • the terminal If it is detected that the terminal needs to perform a forced upgrade, the terminal is prevented from entering the charging mode.
  • the method includes:
  • the first control instruction corresponding to the charging mode is not written in the command line parsing library of the terminal to prevent the terminal from entering the charging mode, and the terminal is controlled to enter the forced upgrade mode.
  • detecting whether the terminal needs to be forced to upgrade includes:
  • the terminal does not need to be forced to upgrade.
  • the terminal is controlled to enter the charging. mode.
  • the terminal is controlled to enter the charging mode, including:
  • the embodiment of the present application further provides a computer program product for use in conjunction with a terminal, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising instructions for performing the following steps :
  • the terminal If it is detected that the terminal needs to perform a forced upgrade, the terminal is prevented from entering the charging mode.
  • the method includes:
  • the first control instruction corresponding to the charging mode is not written in the command line parsing library of the terminal to prevent the terminal from entering the charging mode, and the terminal is controlled to enter the forced upgrade mode.
  • detecting whether the terminal needs to be forced to upgrade includes:
  • the terminal does not need to be forced to upgrade.
  • the terminal is controlled to enter the charging mode.
  • the terminal is controlled to enter the charging mode, including:
  • the device embodiments described above are merely illustrative, wherein the units illustrated as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, ie may be located in one place. Or it can be distributed to at least two network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Abstract

本申请提供一种终端控制方法及装置,本申请的终端控制方法包括:在通过串行总线启动终端的过程中,检测终端是否需要进行强制升级;若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式。采用本申请的技术方案,能够在通过USB启动终端时,控制终端只进入强制升级模式,使USB不再对终端充电,避免造成终端启动模式混乱,对终端进行升级时不会卡死在强制升级模式,使终端顺利完成升级。

Description

终端控制方法及装置
本专利申请要求申请日为2015年11月6日、申请号为2015107570119的中国专利申请的优先权,并将上述专利申请以引用的方式全文引入本文中。
技术领域
本申请涉及通信技术领域,尤其涉及一种终端控制方法及装置。
背景技术
升级就是给终端重装操作系统,使存在重大缺陷版本的操作系统升级到新版本的操作系统来消除重大缺陷,从而可以使终端的功能更加完善。
通常情况下,大多数终端厂商会使用强制升级方法,将存在重大缺陷版本的操作系统升级到新版本的操作系统。现有技术中,强制升级时,通常向终端推送携带强制升级标识的空间下载(Over-the-Air,OTA)包,终端进入强制升级模式,将执行升级的命令写入终端的misc分区,当终端关机并再次开机时,先进行强制升级,使终端完成升级,再进行正常开机。
但是在实现本申请过程中,发明人发现现有技术中至少存在如下问题:
现有技术中,在终端在已接收厂商推送的强制升级OTA包,且关机后,如果通过通用串行总线(Universal Serial Bus,USB)充电方式启动终端,会控制终端同时运行强制升级模式和充电模式,造成终端的启动模式混乱,从而导致终端卡死在强制升级模式,使终端无法完成升级。
发明内容
本申请提供一种终端控制方法及装置,实现了终端运行强制升级模式时,阻止终端进入充电模式,使终端能够完成升级。
本申请提供一种终端控制方法,包括:
在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级;
若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式。
进一步地,上述所述的方法中,所述若检测到所述终端需要进行强制 升级,阻止所述终端进入充电模式,包括:
获取所述充电模式对应的第一控制指令;
在终端的命令行解析库中不写入所述充电模式对应的所述第一控制指令,以阻止所述终端进入所述充电模式,并控制所述终端进入强制升级模式。
进一步地,上述所述的方法中,所述在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级,包括:
检测终端的misc分区内是否存在所述强制升级模式的标识;
若存在所述强制升级模式的标识,确定所述终端需要强制升级。
进一步地,上述所述的方法中,所述方法还包括:
若不存在所述强制升级模式的标识,确定所述终端不需要强制升级。
进一步地,上述所述的方法中,所述方法还包括:
若确定所述终端不需要强制升级,控制所述终端进入所述充电模式。
进一步地,上述所述的方法中,若确定所述终端不需要强制升级,控制所述终端进入所述充电模式,包括:
获取所述充电模式对应的第二控制指令;
在所述终端的命令行解析库中写入所述充电模式对应的所述第二控制指令,以控制所述终端进入所述充电模式。
本申请还提供一种终端控制装置,包括:
检测模块,用于在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级;
控制模块,用于若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式。
进一步地,上述所述的装置中,所述控制模块,具体用于:
获取所述充电模式对应的第一控制指令;
在终端的命令行解析库中不写入所述充电模式对应的所述第一控制指令,以阻止所述终端进入所述充电模式,并控制所述终端进入强制升级模式。
进一步地,上述所述的装置中,所述检测模块,具体用于:
检测终端的misc分区内是否存在所述强制升级模式的标识;
若存在所述强制升级模式的所述标识,确定所述终端需要强制升级。
进一步地,上述所述的装置中,所述检测模块,还用于:
若不存在所述强制升级模式的所述标识,确定所述终端不需要强制升级。
进一步地,上述所述的装置中,所述控制模块,还用于:
若确定所述终端不需要强制升级,控制所述终端进入所述充电模式。
进一步地,上述所述的装置中,所述控制模块,具体用于:
获取所述充电模式对应的第二控制指令;
在所述终端的命令行解析库中写入所述充电模式对应的所述第二控制指令,以控制所述终端进入所述充电模式。
本申请实施例提供一种终端,包括存储器,以及一个或者多个处理器,其中,终端还包括:
一个或多个单元,所述一个或多个单元被存储在所述存储器中并被配置成由所述一个或多个处理器执行,所述一个或多个单元包括用于执行以下步骤的指令:
在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级;
若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式。
本申请实施例提供一种与终端结合使用的计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括执行以下步骤的指令:
在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级;
若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式。
本申请的终端控制方法及装置,在通过USB启动终端的过程中,通过检测终端是否需要进行强制升级,若检测到终端需要进行强制升级,阻止终端进入充电模式,实现了在通过USB启动终端时,控制终端的启动模式。采用本申请的技术方案,能够在通过USB启动终端时,控制终端只进入强制升级模式,使USB不再对终端充电,避免造成终端启动模式混乱,对终端进行升级时不会卡死在强制升级模式,使终端顺利完成升级。
附图说明
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请终端控制方法一实施例的流程图;
图2为本申请终端控制方法另一实施例的流程图;
图3为本申请终端控制装置实施例的结构示意图;
图4为本申请终端的结构示意图。
附图标记;
10-检测模块
11-控制模块
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
实施例一
图1为本申请终端控制方法一实施例的流程图,如图1所示,本实施例的终端控制方法,可以包括如下步骤:
100、在通过USB启动终端的过程中,检测终端是否需要进行强制升级;
在启动终端的时候,终端可能会存在同时进入不同的启动模式的情况,例如,若用户可能会通过USB启动终端,此时终端可以进入充电模式,而由于终端的操作系统可能存在重大缺陷,需要对终端进行强制升级, 因此在USB启动终端的同时终端的启动模式可能包括充电模式和强制升级模式,而当充电模式和强制升级模式同时存在时,可能会导致终端卡死在强制升级模式,导致终端无法完成升级,因此在用户通过USB启动终端的过程中,首先要检测终端是否需要进行强制升级。
101、若检测到终端需要进行强制升级,阻止终端进入充电模式。
例如,在通过USB启动终端的过程中,若检测到终端需要进行强制升级,可以通过阻止终端进入充电模式,从而控制终端只进入强制升级模式,使终端能够顺利完成升级。
具体地,若检测到终端需要进行强制升级,在终端的命令行解析库(cmdline)中不再写入充电模式对应的控制指令。终端的cmdline是各控制指令的核心,终端根据cmdline中的其它指令,控制终端进入对应的启动模式,如强制升级指令。
本实施例的终端控制方法的执行主体具体可以为终端控制装置,该终端控制装置具体可以通过软件来集成,例如该终端控制装置具体可以为一个应用程序;或者,也可以将该终端控制装置集成在终端的操作系统中。
本实施例的终端控制方法,在通过USB启动终端的过程中,通过检测终端是否需要进行强制升级,若检测到终端需要进行强制升级,阻止终端进入充电模式,实现了在通过USB启动终端时,控制终端的启动模式。采用本实施例的技术方案,能够在通过USB启动终端时,控制终端只进入强制升级模式,使USB不再对终端充电,避免造成终端启动模式混乱,对终端进行升级时不会卡死在强制升级模式,使终端顺利完成升级。
实施例二
图2为本申请终端控制方法另一实施例的流程图,本实施例的终端控制方法在图1所示实施例的基础上进一步更加详细地对本申请的技术方案进行描述。
如图2所示,本实施例的终端控制方法,具体可以包括如下步骤:
200、通过USB启动终端。
201、检测终端的MISC分区内是否存在强制升级模式的标识;若存在强制升级模式的标识,执行步骤202;否则,若不存在强制升级模式的标识,执行步骤205。
例如,大多数厂商会通过系统后台向终端推带有强制升级标识的OTA包,并当用户在无线环境下使用终端过程中,终端会下载该OTA包,并存储在终端的MISC分区内。而用户在关闭终端,并再次启动终端时,由于在关闭终端前可能会已下载厂商推送的OTA包,导致终端需要进行强制升级。若用户通过USB启动终端,可能会到至终端进入充电模式,易导致终端升级失败,因此在用户通过USB启动终端的过程中,首先要检测终端的MISC分区是否存在强制升级模式的标识,即检测是否存在推带有强制升级标识的OTA包。
202、确定终端需要强制升级。
若终端的MISC分区存在强制升级标识的OTA包,则表示存在强制升级模式的标识,确定终端需要强制升级。具体地,可以将强制升级模式对应的指令置为有效指令,使终端能够进入强制升级模式。
203、获取充电模式对应的第一控制指令。
将强制升级模式对应的指令置为有效指令之后,则说明终端不能够进入充电模式,因此需要获取充电模式对应的第一控制指令,该第一控制指令能够指示终端不进入充电模式。
应当理解的是,尽管在本申请实施例中可能采用术语第一、第二等描述控制指令,但这些控制指令不应限于这些术语,这些术语仅用来将控制指令彼此区分开。例如在不脱离本申请实施例范围的情况下,第一控制指令也可以被称为第二控制指令,同理第二控制指令也可以被称为第一控制指令。
204、在终端的cmdline中不写入充电模式对应的第一控制指令,以阻止终端进入充电模式,并控制终端进入强制升级模式。
具体地,在获取到充电模式对应的第一指令之后,可以将充电模式对应的第一控制指令不再写入在终端的cmdline中,进而阻止充电模式写入cmdline中,此时控制终端只进入强制升级模式,当终端完成升级后,结束流程。
205、确定终端不需要强制升级。
若终端的MISC分区不存在强制升级标识的OTA,则表示不存在强制升级模式的标识,确定终端不需要强制升级,并控制终端进入充电模式。
具体地,可以将强制升级模式对应的指令置为无效指令,使终端不会进入强制升级模式。
206、获取充电模式对应的第二控制指令。
例如,若确定终端不需要强制升级,可以控制终端进入充电模式。将强制升级模式对应的指令置为无效指令之后,则说明终端能够进入充电模式,因此需要获取充电模式对应的第二控制指令,该第二控制指令能够指示终端进入充电模式。
207、在终端的cmdline中写入充电模式对应的控制指令,以控制终端进入充电模式。
具体地,在获取到充电模式对应的第二控制指令之后,需要将充电模式对应的第二控制指令写入到终端的cmdline,从而控制终端能够进入充电模式。
本实施例的终端控制方法,在通过USB启动终端的过程中,通过检测终端是否需要进行强制升级,若检测到终端需要进行强制升级,阻止终端进入充电模式,若检测到终端不需要进行强制升级,控制终端进入充电模式,实现了在通过USB启动终端时,控制终端的启动模式。采用本实施例的技术方案,能够在通过USB启动终端时,控制终端只进入强制升级模式或者只进入充电模式,避免造成终端启动模式混乱,对终端进行升级时不对终端充电,使终端不会卡死在强制升级模式,顺利完成升级;不对终端进行升级时,能够对终端进行充电。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
实施例三
图3为本申请终端控制装置实施例的结构示意图,如图3所示,本实施例的终端控制装置包括检测模块10和控制模块11。
在一个具体的实现过程中,检测模块10和控制模块11能够传递信息数据等。检测模块10用于检测终端是否需要进行强制升级;并将检测信 息传输给控制模块11。若检测模块10检测到终端需要进行强制升级,控制模块11用于阻止终端进入充电模式。
本实施例的终端控制装置,通过采用上述模块实现控制终端的实现机制与上述图1所示实施例的实现机制相同,详细可以参考上述图1所示实施例的记载,在此不再赘述。
本实施例的终端控制装置,在通过USB启动终端的过程中,通过检测模块10检测终端是否需要进行强制升级,若检测到终端需要进行强制升级,有控制模块11阻止终端进入充电模式,实现了在通过USB启动终端时,控制终端的启动模式。采用本实施例的技术方案,能够在通过USB启动终端时,控制终端只进入强制升级模式,使USB不再对终端充电,避免造成终端启动模式混乱,对终端进行升级时不会卡死在强制升级模式,使终端顺利完成升级。
进一步地,在一个具体的实现过程中,上述实施例所示的终端控制装置中,检测模块10具体用于检测终端的恢复分区内是否存在强制升级模式的标识。具体地,若检测模块10检测到存在强制升级模式的标识,确定终端需要强制升级;控制模块11具体用于获取充电模式对应的第一控制指令;在终端的cmdline中不写入充电模式对应的第一控制指令,以阻止终端进入充电模式,并控制终端进入强制升级模式。
进一步地,在一个具体的实现过程中,上述实施例所示的终端控制装置中,检测模块10还用于若检测模块10未检测到强制升级模式的标识,即不存在强制升级模式的标识,确定终端不需要强制升级。
进一步地,在一个具体的实现过程中,上述实施例所示的终端控制装置中,若检测模块10确定终端不需要强制升级,控制模块11还用于控制终端进入充电模式。具体地,控制模块11具体用于获取充电模式对应的控制指令;并在终端的cmdline中写入充电模式对应的控制指令,以控制终端进入充电模式。
本实施例的终端控制装置,通过采用上述模块实现控制终端的实现机制与上述图2所示实施例的实现机制相同,详细可以参考上述图2所示实施例的记载,在此不再赘述。
本实施例的终端控制装置,在通过USB启动终端的过程中,通过检 测模块10检测终端是否需要进行强制升级,若检测到终端需要进行强制升级,由控制模块11阻止终端进入充电模式,若检测到终端不需要进行强制升级,由控制模块11控制终端进入充电模式,实现了在通过USB启动终端时,控制终端的启动模式。采用本实施例的技术方案,能够在通过USB启动终端时,控制终端只进入强制升级模式或者只进入充电模式,避免造成终端启动模式混乱,对终端进行升级时不对终端充电,使终端不会卡死在强制升级模式,顺利完成升级;不对终端进行升级时,能够对终端进行充电。
实施例四
如图4所示,为本申请实施例提供一种终端的结构图示意图,包括存储器41,以及一个或者多个处理器42,其中,终端还包括:
一个或多个单元,所述一个或多个单元被存储在所述存储器中并被配置成由所述一个或多个处理器执行,所述一个或多个单元包括用于执行以下步骤的指令:
在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级;
若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式。
其中,所述若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式,包括:
获取所述充电模式对应的第一控制指令;
在终端的命令行解析库中不写入所述充电模式对应的所述第一控制指令,以阻止所述终端进入所述充电模式,并控制所述终端进入强制升级模式。
其中,所述在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级,包括:
检测终端的misc分区内是否存在所述强制升级模式的标识;
若存在所述强制升级模式的标识,确定所述终端需要强制升级。
其中,若不存在所述强制升级模式的标识,确定所述终端不需要强制升级。
其中,若确定所述终端不需要强制升级,控制所述终端进入所述充电 模式。
其中若确定所述终端不需要强制升级,控制所述终端进入所述充电模式,包括:
获取所述充电模式对应的第二控制指令;
在所述终端的命令行解析库中写入所述充电模式对应的所述第二控制指令,以控制所述终端进入所述充电模式。
实施例五
本申请实施例还提供一种与终端结合使用的计算机程序产品,所述计算机程序产品包括计算机可读的存储介质和内嵌于其中的计算机程序机制,所述计算机程序机制包括执行以下步骤的指令:
在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级;
若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式。
其中,所述若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式,包括:
获取所述充电模式对应的第一控制指令;
在终端的命令行解析库中不写入所述充电模式对应的所述第一控制指令,以阻止所述终端进入所述充电模式,并控制所述终端进入强制升级模式。
其中,所述在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级,包括:
检测终端的misc分区内是否存在所述强制升级模式的标识;
若存在所述强制升级模式的标识,确定所述终端需要强制升级。
其中,若不存在所述强制升级模式的标识,确定所述终端不需要强制升级。
其中,若确定所述终端不需要强制升级,控制所述终端进入所述充电模式。
其中若确定所述终端不需要强制升级,控制所述终端进入所述充电模式,包括:
获取所述充电模式对应的第二控制指令;
在所述终端的命令行解析库中写入所述充电模式对应的所述第二控制指令,以控制所述终端进入所述充电模式。
以上所描述的装置实施例仅仅是示意性的,其中作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到至少两个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
最后应说明的是:以上各实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述各实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (12)

  1. 一种终端控制方法,其特征在于,包括:
    在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级;
    若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式。
  2. 根据权利要求1所述的方法,其特征在于,所述若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式,包括:
    获取所述充电模式对应的第一控制指令;
    在终端的命令行解析库中不写入所述充电模式对应的所述第一控制指令,以阻止所述终端进入所述充电模式,并控制所述终端进入强制升级模式。
  3. 根据权利要求2所述的方法,其特征在于,所述在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级,包括:
    检测终端的misc分区内是否存在所述强制升级模式的标识;
    若存在所述强制升级模式的标识,确定所述终端需要强制升级。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    若不存在所述强制升级模式的标识,确定所述终端不需要强制升级。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    若确定所述终端不需要强制升级,控制所述终端进入所述充电模式。
  6. 根据权利要求5所述的方法,其特征在于,若确定所述终端不需要强制升级,控制所述终端进入所述充电模式,包括:
    获取所述充电模式对应的第二控制指令;
    在所述终端的命令行解析库中写入所述充电模式对应的所述第二控制指令,以控制所述终端进入所述充电模式。
  7. 一种终端控制装置,其特征在于,包括:
    检测模块,用于在通过串行总线启动终端的过程中,检测所述终端是否需要进行强制升级;
    控制模块,用于若检测到所述终端需要进行强制升级,阻止所述终端进入充电模式。
  8. 根据权利要求7所述的装置,其特征在于,所述控制模块,具体用于:
    获取所述充电模式对应的第一控制指令;
    在终端的命令行解析库中不写入所述充电模式对应的所述第一控制指令,以阻止所述终端进入所述充电模式,并控制所述终端进入强制升级模式。
  9. 根据权利要求8所述的装置,其特征在于,所述检测模块,具体用于:
    检测终端的misc分区内是否存在所述强制升级模式的标识;
    若存在所述强制升级模式的所述标识,确定所述终端需要强制升级。
  10. 根据权利要求9所述的装置,其特征在于,所述检测模块,还用于:
    若不存在所述强制升级模式的所述标识,确定所述终端不需要强制升级。
  11. 根据权利要求10所述的装置,其特征在于,所述控制模块,还用于:
    若确定所述终端不需要强制升级,控制所述终端进入所述充电模式。
  12. 根据权利要求11所述的装置,其特征在于,所述控制模块,具体用于:
    获取所述充电模式对应的第二控制指令;
    在所述终端的命令行解析库中写入所述充电模式对应的所述第二控制指令,以控制所述终端进入所述充电模式。
PCT/CN2016/085830 2015-11-06 2016-06-15 终端控制方法及装置 WO2017075998A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510757011.9A CN105867957A (zh) 2015-11-06 2015-11-06 终端控制方法及装置
CN201510757011.9 2015-11-06

Publications (1)

Publication Number Publication Date
WO2017075998A1 true WO2017075998A1 (zh) 2017-05-11

Family

ID=56624254

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/085830 WO2017075998A1 (zh) 2015-11-06 2016-06-15 终端控制方法及装置

Country Status (2)

Country Link
CN (1) CN105867957A (zh)
WO (1) WO2017075998A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106534405B (zh) * 2016-09-21 2021-02-23 青岛海信移动通信技术股份有限公司 一种引脚控制方法及智能终端
CN109747473B (zh) * 2019-02-15 2022-06-03 上海蔚来汽车有限公司 充电控制方法、充电控制系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185972A (zh) * 2011-04-25 2011-09-14 惠州Tcl移动通信有限公司 一种新型的移动终端软件升级系统及方法及移动终端
CN102333240A (zh) * 2011-08-04 2012-01-25 深圳创维数字技术股份有限公司 一种机顶盒及其在线升级方法
CN102650947A (zh) * 2012-04-01 2012-08-29 广东欧珀移动通信有限公司 一种Android手持设备连续增量的空中升级方法
CN104123154A (zh) * 2013-04-26 2014-10-29 韩国科亚电子股份有限公司 用于升级启动模式的自动进入装置和方法
CN104980564A (zh) * 2014-04-09 2015-10-14 腾讯科技(深圳)有限公司 充电插座以及基于充电插座的移动终端处理方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102883017B (zh) * 2012-09-03 2016-01-06 深圳中兴网信科技有限公司 终端和终端管理方法
CN103716695A (zh) * 2013-12-16 2014-04-09 乐视致新电子科技(天津)有限公司 一种升级系统软件的方法及智能电视
CN103634668A (zh) * 2013-12-20 2014-03-12 乐视致新电子科技(天津)有限公司 智能电视中的系统升级方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102185972A (zh) * 2011-04-25 2011-09-14 惠州Tcl移动通信有限公司 一种新型的移动终端软件升级系统及方法及移动终端
CN102333240A (zh) * 2011-08-04 2012-01-25 深圳创维数字技术股份有限公司 一种机顶盒及其在线升级方法
CN102650947A (zh) * 2012-04-01 2012-08-29 广东欧珀移动通信有限公司 一种Android手持设备连续增量的空中升级方法
CN104123154A (zh) * 2013-04-26 2014-10-29 韩国科亚电子股份有限公司 用于升级启动模式的自动进入装置和方法
CN104980564A (zh) * 2014-04-09 2015-10-14 腾讯科技(深圳)有限公司 充电插座以及基于充电插座的移动终端处理方法

Also Published As

Publication number Publication date
CN105867957A (zh) 2016-08-17

Similar Documents

Publication Publication Date Title
EP3109762B1 (en) Electronic device having external memory and method for operating the same
CN106020865B (zh) 一种系统升级方法和装置
CN109710295B (zh) 一种安全可靠的fpga远程升级方法
CN109960523B (zh) 一种嵌入式设备的固件升级方法及装置
US9983791B2 (en) System management controller and method of configuration file backup and recovery
WO2016206514A1 (zh) 启动处理方法及装置
CN104123153A (zh) 用于使用usb升级固件的装置与方法
CN103970557B (zh) 存储设备启动系统的方法及存储设备
CN103412561A (zh) 一种汽车控制器的刷新方法及装置
CN102779050A (zh) 提供加速的引导性能的系统和方法
US20130339718A1 (en) Information processing device and method for controlling information processing device
CN103136002B (zh) 一种基于UBoot的自动升级的控制方法及系统
TW201333684A (zh) 於裝置初始化期間備份韌體之技術
US9891862B2 (en) Forensic data acquisition apparatus and method for guaranteeing integrity of flash memory in smart device
US20170039053A1 (en) Field update of boot loader using regular device firmware update procedure
WO2015154538A1 (zh) 存储器的启动方法及装置
TWI498822B (zh) 可更新基本輸入輸出系統的電子裝置及其基本輸入輸出系統的更新方法
CN102609290B (zh) 电子产品的软件升级方法
CN104424140A (zh) 统一可扩展固件接口驱动器
CN112269584A (zh) 一种PCIe Switch固件更新方法、装置、电子设备及介质
US10491736B2 (en) Computer system and method thereof for bluetooth data sharing between UEFI firmware and OS
WO2017075998A1 (zh) 终端控制方法及装置
US8949588B1 (en) Mobile telephone as bootstrap device
US20160103688A1 (en) Method of Starting Computing System
CN106935272B (zh) 开启eMMC后门调试的方法和装置

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: 16861268

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: 16861268

Country of ref document: EP

Kind code of ref document: A1