CN115208945A - Android system upgrading method and related equipment thereof - Google Patents
Android system upgrading method and related equipment thereof Download PDFInfo
- Publication number
- CN115208945A CN115208945A CN202210656655.9A CN202210656655A CN115208945A CN 115208945 A CN115208945 A CN 115208945A CN 202210656655 A CN202210656655 A CN 202210656655A CN 115208945 A CN115208945 A CN 115208945A
- Authority
- CN
- China
- Prior art keywords
- upgrade
- target
- instruction
- upgrading
- android system
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/141—Setup of application sessions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Stored Programmes (AREA)
Abstract
本申请实施例公开了一种安卓系统升级方法,应用于搭载了安卓系统的设备。本申请实施例方法包括:确定第一存储空间内是否存在升级指示指令;若第一存储空间内存在升级指示指令,则进入恢复模式;依据升级指示指令获取目标IP地址;基于目标IP地址建立与目标服务器间的数据连接;接收目标服务器发送的升级数据包;在恢复模式下基于升级数据包完成升级过程。基于本申请所提供的升级方法,使得设备可以在安卓系统未正常启动的恢复模式下下载得到升级所用的数据包,并在恢复模式下完成安卓系统的升级过程,使得设备可以在安卓系统无法正常启动的情况下顺利完成升级过程,保证了安卓系统升级过程的可实施性。
The embodiment of the present application discloses an Android system upgrade method, which is applied to a device equipped with the Android system. The method of the embodiment of the present application includes: determining whether an upgrade instruction instruction exists in the first storage space; if an upgrade instruction instruction exists in the first storage space, entering a recovery mode; obtaining a target IP address according to the upgrade instruction instruction; Data connection between target servers; receive the upgrade data package sent by the target server; complete the upgrade process based on the upgrade data package in recovery mode. Based on the upgrade method provided by the present application, the device can download the data package used for the upgrade in the recovery mode where the Android system is not started normally, and complete the upgrade process of the Android system in the recovery mode, so that the device can be used in the recovery mode. In the case of startup, the upgrade process is successfully completed, which ensures the practicability of the Android system upgrade process.
Description
技术领域technical field
本申请属于互联网领域,尤其涉及一种安卓系统升级方法及其相关设备。The present application belongs to the field of the Internet, and in particular relates to an Android system upgrade method and related equipment.
背景技术Background technique
安卓(Android)系统是一种基于Linux的自由及开放源代码的操作系统,主要使用于移动设备,如智能手机、平板电脑、电视、机顶盒、游戏设备等。Android (Android) system is a free and open source operating system based on Linux, mainly used in mobile devices, such as smart phones, tablet computers, TVs, set-top boxes, game devices, etc.
由于安卓系统软件的开发和发布往往不是一次性的过程,安卓系统需要根据实际应用的要求不断地更新和升级,因此,在使用安卓系统的设备的生命周期中会有多次的系统软件升级。通常,安卓系统软件升级通过OTA(Over-the-Air Technology,空中下载技术)技术实现。OTA系统升级是指安卓系统提供的标准软件升级方式,可以无损失升级系统,主要手段是通过网络(包括WIFI、3G)与提供升级服务的谷歌服务器建立连接后自动下载OTA升级包并完成升级。Since the development and release of Android system software is often not a one-time process, the Android system needs to be continuously updated and upgraded according to the requirements of actual applications. Therefore, there will be multiple system software upgrades in the life cycle of devices using the Android system. Usually, the software upgrade of the Android system is implemented by OTA (Over-the-Air Technology, over-the-air technology) technology. OTA system upgrade refers to the standard software upgrade method provided by the Android system, which can upgrade the system without loss.
然而这一升级过程需要安卓系统正常启动,并与为安卓系统提供升级服务的谷歌服务器间顺利建立连接,对于某些特殊的安卓系统不能正常启动的情况或无法与谷歌服务器间建立网络连接的情况则无法应对,存在一定问题。However, this upgrade process requires the Android system to start normally and establish a smooth connection with the Google server that provides upgrade services for the Android system. It cannot be dealt with, there are certain problems.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于提供一种安卓系统升级方法,旨在解决现有的安卓系统不能正常启动的情况或无法与谷歌服务器间建立网络连接的情况下无法正常升级的问题,本申请提供的包括:The object of the present invention is to provide a kind of Android system upgrade method, aims to solve the problem that the existing Android system cannot be started normally or cannot be upgraded normally under the situation that a network connection cannot be established with the Google server, the application provides include:
本申请实施例第一方面提供了一种安卓系统升级方法,所述方法应用于安装有安卓系统的设备,包括:A first aspect of the embodiments of the present application provides a method for upgrading an Android system, and the method is applied to a device installed with an Android system, including:
确定第一存储空间内是否存在升级指示指令;determining whether an upgrade instruction instruction exists in the first storage space;
若所述第一存储空间内存在所述升级指示指令,则进入恢复模式;If the upgrade instruction instruction exists in the first storage space, enter a recovery mode;
依据所述升级指示指令获取目标IP地址;Obtain the target IP address according to the upgrade instruction;
基于所述目标IP地址建立与目标服务器间的数据连接;establishing a data connection with the target server based on the target IP address;
接收所述目标服务器发送的升级数据包;receiving the upgrade data package sent by the target server;
在所述恢复模式下基于所述升级数据包完成所述安卓系统的升级过程。In the recovery mode, the upgrade process of the Android system is completed based on the upgrade data package.
基于本申请实施例第一方面所提供的安卓系统升级方法,可选的,所述方法还包括:Based on the Android system upgrade method provided by the first aspect of the embodiment of the present application, optionally, the method further includes:
若所述第一存储空间内不存在所述升级指示指令,则判断用户是否输入预设指令;If the upgrade instruction instruction does not exist in the first storage space, determine whether the user inputs a preset instruction;
若所述用户输入所述预设指令,则在所述第一存储空间内写入所述升级指示指令,并重新执行所述确定第一存储空间内是否存在升级指示指令步骤。If the user inputs the preset instruction, write the upgrade instruction instruction in the first storage space, and re-execute the step of determining whether there is an upgrade instruction instruction in the first storage space.
基于本申请实施例第一方面所提供的安卓系统升级方法,可选的,所述确定第一存储空间内是否存在升级指示指令,包括:Based on the Android system upgrade method provided in the first aspect of the embodiment of the present application, optionally, the determining whether an upgrade instruction instruction exists in the first storage space includes:
在引导加载模式下确定第一存储空间内是否存在升级指示指令。In the boot loading mode, it is determined whether there is an upgrade instruction instruction in the first storage space.
基于本申请实施例第一方面所提供的安卓系统升级方法,可选的,所述依据所述升级指示指令获取目标IP地址,包括:Based on the Android system upgrade method provided by the first aspect of the embodiment of the present application, optionally, the obtaining the target IP address according to the upgrade instruction instruction includes:
基于第一预设协议获得所述目标IP地址,所述第一预设协议包括:动态主机配置协议、基于以太网的点对点通讯协议或静态IP中的任意一种The target IP address is obtained based on a first preset protocol, where the first preset protocol includes: any one of dynamic host configuration protocol, Ethernet-based point-to-point communication protocol or static IP
基于本申请实施例第一方面所提供的安卓系统升级方法,可选的,所述基于所述目标IP地址建立与目标服务器间的数据连接包括:Based on the Android system upgrade method provided by the first aspect of the embodiment of the present application, optionally, establishing a data connection with the target server based on the target IP address includes:
基于所述目标IP地址设置域名信息;Setting domain name information based on the target IP address;
基于所述域名信息建立与目标服务器间的数据连接。A data connection with the target server is established based on the domain name information.
基于本申请实施例第一方面所提供的安卓系统升级方法,可选的,所述基于所述目标IP地址建立与目标服务器间的数据连接,包括:Based on the Android system upgrade method provided in the first aspect of the embodiment of the present application, optionally, establishing a data connection with the target server based on the target IP address includes:
依据所述升级指示指令确定目标通信协议;determining a target communication protocol according to the upgrade instruction;
基于所述目标通信协议建立与目标服务器间的数据连接,所述目标通信协议为文件传输协议、支持传输层安全性的文件传输协议、超文本传输协议、超文本传输安全协议或SSH文件传输协议中的任意一种。A data connection with the target server is established based on the target communication protocol, where the target communication protocol is a file transfer protocol, a file transfer protocol supporting transport layer security, a hypertext transfer protocol, a hypertext transfer security protocol or an SSH file transfer protocol any of the .
本申请实施例第二方面提供了一种安卓系统升级方法,所述方法应用于服务器,包括:A second aspect of the embodiments of the present application provides a method for upgrading an Android system, where the method is applied to a server, including:
基于目标IP地址建立目标设备间的数据连接,所述目标IP地址为所述目标设备确定第一存储空间内是否存在升级指示指令,若所述第一存储空间内存在所述升级指示指令,则进入恢复模式并依据所述升级指示指令获得,所述目标设备安装有所述安卓系统;A data connection between target devices is established based on the target IP address, where the target IP address is used by the target device to determine whether there is an upgrade instruction instruction in the first storage space, and if the upgrade instruction instruction exists in the first storage space, then Enter the recovery mode and obtain according to the upgrade instruction instruction, the target device is installed with the Android system;
发送升级数据包至所述目标设备,以使得所述目标升级设备在所述恢复模式下基于所述升级数据包完成升级过程。Sending an upgrade data package to the target device, so that the target upgrade device completes the upgrade process based on the upgrade data package in the recovery mode.
本申请实施例第三方面提供了一种安卓设备,包括:A third aspect of the embodiments of the present application provides an Android device, including:
确定单元,用于确定第一存储空间内是否存在升级指示指令,若所述第一存储空间内存在所述升级指示指令,则触发进入单元,a determining unit, configured to determine whether an upgrade instruction instruction exists in the first storage space, and if the upgrade instruction instruction exists in the first storage space, trigger the entry unit,
进入单元,用于进入恢复模式;Enter the unit, used to enter recovery mode;
获取单元,用于依据所述升级指示指令获取目标IP地址;an obtaining unit, configured to obtain the target IP address according to the upgrade instruction;
建立单元,用于基于所述目标IP地址建立与目标服务器间的数据连接;establishing unit, for establishing a data connection with the target server based on the target IP address;
接收单元,用于接收所述目标服务器发送的升级数据包;a receiving unit, configured to receive an upgrade data packet sent by the target server;
升级单元,用于在所述恢复模式下基于所述升级数据包完成安卓系统的升级过程。An upgrade unit, configured to complete the upgrade process of the Android system based on the upgrade data package in the recovery mode.
基于本申请实施例第三方面所提供的安卓设备,可选的,所述设备还包括:Based on the Android device provided by the third aspect of the embodiment of the present application, optionally, the device further includes:
判断单元,所述判断单元用于:若所述第一存储空间内不存在所述升级指示指令,则判断用户是否输入预设指令;a judging unit, the judging unit is configured to: if the upgrade instruction instruction does not exist in the first storage space, judging whether the user inputs a preset instruction;
若所述用户输入所述预设指令,则在所述第一存储空间内写入所述升级指示指令,并触发确定单元。If the user inputs the preset instruction, the upgrade instruction instruction is written in the first storage space, and the determination unit is triggered.
基于本申请实施例第三方面所提供的安卓设备,可选的,所述确定单元具体用于:Based on the Android device provided by the third aspect of the embodiment of the present application, optionally, the determining unit is specifically configured to:
在引导加载模式下确定第一存储空间内是否存在升级指示指令Determining whether an upgrade instruction instruction exists in the first storage space in the bootloader mode
基于本申请实施例第三方面所提供的安卓设备,可选的,所述获取单元具体用于:Based on the Android device provided by the third aspect of the embodiment of the present application, optionally, the obtaining unit is specifically used for:
基于第一预设协议获得所述目标IP地址,所述第一预设协议包括:动态主机配置协议、基于以太网的点对点通讯协议或静态IP中的任意一种。The target IP address is obtained based on a first preset protocol, where the first preset protocol includes any one of a dynamic host configuration protocol, an Ethernet-based point-to-point communication protocol, or a static IP.
基于本申请实施例第三方面所提供的安卓设备,可选的,所述建立单元具体用于:Based on the Android device provided by the third aspect of the embodiment of the present application, optionally, the establishment unit is specifically used for:
基于所述目标IP地址设置域名信息;Setting domain name information based on the target IP address;
基于所述域名信息建立与目标服务器间的数据连接。A data connection with the target server is established based on the domain name information.
基于本申请实施例第三方面所提供的安卓设备,可选的,所述建立单元具体用于:Based on the Android device provided by the third aspect of the embodiment of the present application, optionally, the establishment unit is specifically used for:
依据所述升级指示指令确定目标通信协议;determining a target communication protocol according to the upgrade instruction;
基于所述目标通信协议建立与目标服务器间的数据连接,所述目标通信协议为文件传输协议、支持传输层安全性的文件传输协议、超文本传输协议、超文本传输安全协议或SSH文件传输协议中的任意一种。A data connection with the target server is established based on the target communication protocol, where the target communication protocol is a file transfer protocol, a file transfer protocol supporting transport layer security, a hypertext transfer protocol, a hypertext transfer security protocol or an SSH file transfer protocol any of the .
本申请实施例第四方面提供了一种服务器,包括:A fourth aspect of the embodiments of the present application provides a server, including:
建立单元,用于基于目标IP地址建立目标设备间的数据连接,所述目标IP地址为所述目标设备确定第一存储空间内是否存在升级指示指令,若所述第一存储空间内存在所述升级指示指令,则进入恢复模式并依据所述升级指示指令获得,所述目标设备安装有所述安卓系统;The establishment unit is configured to establish a data connection between target devices based on a target IP address, where the target IP address determines whether there is an upgrade instruction instruction in the first storage space for the target device, if the first storage space has the upgrade instruction instruction, enter the recovery mode and obtain according to the upgrade instruction instruction, the target device is installed with the Android system;
发送单元,用于发送升级数据包至所述目标设备,以使得所述目标升级设备在所述恢复模式下基于所述升级数据包完成升级过程。A sending unit, configured to send an upgrade data package to the target device, so that the target upgrade device completes an upgrade process based on the upgrade data package in the recovery mode.
本申请实施例第五方面提供了一种安卓设备,包括:A fifth aspect of the embodiments of the present application provides an Android device, including:
中央处理器,存储器;central processing unit, memory;
所述中央处理器配置为与所述存储器通信,在所述安卓设备上执行所述存储器中的指令操作以执行如本申请实施例第一方面中任意一项所述的方法。The central processing unit is configured to communicate with the memory, and execute the instruction operation in the memory on the Android device to execute the method according to any one of the first aspect of the embodiments of this application.
本申请实施例第六方面提供了一种服务器,包括:A sixth aspect of the embodiments of the present application provides a server, including:
中央处理器,存储器;central processing unit, memory;
所述中央处理器配置为与所述存储器通信,在所述服务器上执行所述存储器中的指令操作以执行如本申请实施例第二方面中所述的方法。The central processing unit is configured to communicate with the memory, and execute the instruction operation in the memory on the server to execute the method described in the second aspect of the embodiments of the present application.
本申请实施例第七方面提供了一种计算机可读存储介质,包括指令,当所述指令在计算机上运行时,使得计算机执行如本申请实施例第一方面或第二方面中任意一项所述的方法。A seventh aspect of the embodiments of the present application provides a computer-readable storage medium, including instructions, when the instructions are run on a computer, the computer is made to execute any one of the first aspect or the second aspect of the embodiments of the present application. method described.
从以上技术方案可以看出,本申请实施例具有以下优点:本申请提供了一种安卓系统升级方法,包括:确定第一存储空间内是否存在升级指示指令;若所述第一存储空间内存在所述升级指示指令,则进入恢复模式;依据所述升级指示指令获取目标IP地址;基于所述目标IP地址建立与目标服务器间的数据连接;接收所述目标服务器发送的升级数据包;在所述恢复模式下基于所述升级数据包完成升级过程。基于本申请所提供的升级方法,使得设备可以在安卓系统未正常启动的恢复模式下下载得到升级所用的数据包,并在恢复模式下完成安卓系统的升级过程,使得设备可以在安卓系统无法正常启动的情况下顺利完成升级过程,保证了安卓系统升级过程的可实施性。It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: the present application provides an Android system upgrade method, comprising: determining whether an upgrade instruction instruction exists in the first storage space; if there is an upgrade instruction in the first storage space; the upgrade instruction instruction, then enter the recovery mode; obtain the target IP address according to the upgrade instruction instruction; establish a data connection with the target server based on the target IP address; receive the upgrade data packet sent by the target server; The upgrade process is completed based on the upgrade data package in the recovery mode. Based on the upgrade method provided by this application, the device can download the data package used for the upgrade in the recovery mode where the Android system is not started normally, and complete the upgrade process of the Android system in the recovery mode, so that the device can be used in the recovery mode when the Android system fails to work normally. In the case of startup, the upgrade process is successfully completed, which ensures the practicability of the Android system upgrade process.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据提供的附图获得其他的附图。可以理解的是,本部分所提供的附图仅用于更好地理解本方案,不构成对本申请的限定。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only It is an embodiment of the present application. For those of ordinary skill in the art, other drawings can also be obtained according to the provided drawings without any creative effort. It can be understood that the drawings provided in this section are only for better understanding of the solution, and do not constitute a limitation to the present application.
图1为本申请所提供的安卓系统升级方法实施例的一个流程示意图;1 is a schematic flowchart of an embodiment of an Android system upgrade method provided by the application;
图2为本申请所提供的安卓系统升级方法实施例的另一个流程示意图;2 is another schematic flowchart of an embodiment of an Android system upgrading method provided by the present application;
图3为本申请所提供的升级指示指令字段的一个示意图;3 is a schematic diagram of an upgrade instruction instruction field provided by the present application;
图4为本申请所提供的安卓系统升级方法实施例的另一个流程示意图;4 is another schematic flowchart of an embodiment of an Android system upgrade method provided by the present application;
图5为本申请所提供的安卓设备实施例的一个结构示意图;5 is a schematic structural diagram of an embodiment of an Android device provided by the application;
图6为本申请所提供的服务器实施例的一个结构示意图;FIG. 6 is a schematic structural diagram of a server embodiment provided by this application;
图7为本申请所提供的安卓设备实施例的另一个结构示意图;7 is another schematic structural diagram of an embodiment of an Android device provided by the application;
图8为本申请所提供的服务器实施例的另一个结构示意图。FIG. 8 is another schematic structural diagram of a server embodiment provided by this application.
具体实施方式Detailed ways
为了使本技术领域的人员更好地理解本申请方案,下面对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。同时,为了描述清楚和简明,以下的描述中省略了对公知的功能和结构的描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of them. example. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the scope of protection of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness of description.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "first", "second", "third", "fourth", etc. (if any) in the description and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those illustrated or described herein. Furthermore, the terms "comprising" and "having", and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, product or apparatus comprising a series of steps or units is not necessarily limited to those steps expressly listed or units, but may include other steps or units not expressly listed or inherent to these processes, methods, products or devices.
安卓(Android)系统是一种基于Linux的自由及开放源代码的操作系统,主要使用于移动设备,如智能手机、平板电脑、电视、机顶盒、游戏设备等。使用安卓系统的手机在市场上占有相当大的份额。Android (Android) system is a free and open source operating system based on Linux, mainly used in mobile devices, such as smart phones, tablet computers, TVs, set-top boxes, game devices, etc. Mobile phones using the Android operating system have a considerable share in the market.
由于安卓系统软件的开发和发布往往不是个一次性的过程,安卓系统需要根据实际应用的要求不断地更新和升级,因此,在使用安卓系统的设备的生命周期中会有多次的系统软件升级。通常,安卓系统通过网络(包括WIFI、3G)与用于提供安卓系统升级服务间建立连接下载升级包并完成升级过程。Since the development and release of Android system software is often not a one-time process, the Android system needs to be continuously updated and upgraded according to the requirements of actual applications. Therefore, there will be multiple system software upgrades in the life cycle of devices using the Android system. . Usually, the Android system establishes a connection with the service for providing the Android system upgrade through the network (including WIFI and 3G) to download the upgrade package and complete the upgrade process.
然而这一升级过程需要安卓系统正常启动,并与为安卓系统提供升级服务的谷歌服务器间顺利建立连接,对于安卓系统不能正常启动的情况则无法应对,存在一定问题,对于安卓系统无法正常启动的情况,常用的手段为人工在设备内添加升级包,并在恢复模式下进行本地升级,然而这种升级方式对于批量设备(如机顶盒)的升级所消耗的人力物力较大,不便于实施。However, this upgrade process requires the Android system to start normally, and to establish a smooth connection with the Google server that provides upgrade services for the Android system. It cannot be dealt with when the Android system cannot be started normally. There are certain problems. In some cases, the common method is to manually add an upgrade package to the device and perform local upgrade in recovery mode. However, this upgrade method consumes a lot of manpower and material resources for the upgrade of batch devices (such as set-top boxes), which is inconvenient to implement.
为解决上述问题,本申请提供了一种新的安卓系统升级方法,请参阅图1,本申请所提供安卓系统升级方法的一个实施例包括:步骤101-步骤106。In order to solve the above problems, the present application provides a new Android system upgrade method. Please refer to FIG. 1 . An embodiment of the Android system upgrade method provided by the present application includes steps 101 to 106 .
101、确定第一存储空间内是否存在升级指示指令。101. Determine whether an upgrade instruction instruction exists in the first storage space.
具体的,本方案应用于搭载了安卓系统的设备,具体的设备类型可为智能手机、平板电脑、电视、机顶盒、游戏设备等,具体此处不做限定。确定第一存储空间内是否存在升级指示指令,其中第一存储空间可为内存内某一特定区域,举例而言,升级指示指令可存储于MISC分区,MISC分区可用于存储与系统升级相关的部分信息,以便恢复模式(recovery模式)使用,在设备处于引导加载模式(Bootloader模式)时会读取该分区内的数据,以决定系统进回复模式或安卓系统的主要模式,具体的,抵预存簇控件的设置可依据实际需求而定,此处不做限定。Specifically, this solution is applied to a device equipped with an Android system, and the specific device type may be a smart phone, a tablet computer, a TV, a set-top box, a game device, etc., which is not specifically limited here. Determine whether there is an upgrade instruction instruction in the first storage space, wherein the first storage space can be a specific area in the memory, for example, the upgrade instruction instruction can be stored in the MISC partition, and the MISC partition can be used to store parts related to system upgrades This information is used in recovery mode (recovery mode). When the device is in bootloader mode (Bootloader mode), the data in the partition will be read to determine whether the system enters recovery mode or the main mode of Android system. The settings of the controls can be determined according to the actual needs, which are not limited here.
升级指示指令用于指示系统是否进入升级,具体的升级指示指令还可包括升级所指向的服务器地址、所采用的文件传输协议、以及所下载的文件存储地址等信息,具体此处不做限定。升级指示指令可由工作人员预先编辑在第一存储空间内,并在安卓系统正常运行时激活升级指示指令的使用,以便在系统重启时进行升级,或在引导加载模式时由用户触发特定按键激活升级指示指令,进行后续的升级过程,具体此处不做限定。The upgrade instruction instruction is used to indicate whether the system enters the upgrade. The specific upgrade instruction instruction may also include information such as the server address pointed to by the upgrade, the file transfer protocol used, and the downloaded file storage address, etc., which are not limited here. The upgrade instruction instruction can be pre-edited in the first storage space by the staff, and the use of the upgrade instruction instruction can be activated when the Android system is running normally, so that the upgrade can be performed when the system is restarted, or the user can activate the upgrade by triggering a specific button in the boot loading mode. Indicates an instruction to perform the subsequent upgrade process, which is not limited here.
102、进入恢复模式。102. Enter the recovery mode.
具体的,若第一存储空间内存在升级指示指令,则系统进入恢复模式(recovery模式),恢复模式是安卓系统的备份功能,指的是一种可以对安卓系统内部的数据或系统进行修改的模式(类似于windows PE或DOS)。在这个模式下可以对已有的系统进行备份或升级,也可以在此恢复出厂设置。在恢复模式下执行后续流程,以便完成升级过程。Specifically, if there is an upgrade instruction instruction in the first storage space, the system enters a recovery mode (recovery mode). The recovery mode is the backup function of the Android system, which refers to a method that can modify the data or system inside the Android system. mode (similar to windows PE or DOS). In this mode, the existing system can be backed up or upgraded, and the factory settings can also be restored here. Perform subsequent procedures in recovery mode to complete the upgrade process.
103、依据升级指示指令获取目标IP地址。103. Acquire the target IP address according to the upgrade instruction.
具体的,依据升级指示指令获取目标IP地址。其中目标IP地址为用于升级所使用为本系统所申请的IP地址,具体的,目标IP地址的获取方式可为基于动态主机配置协议(DHCP,Dynamic Host Configuration Protocol)、基于以太网的点对点通讯协议(PPPOE,Point-to-Point Protocol Over Ethernet)或基于静态IP中的任意一种方式获取,具体获取方式可预先写入升级指示指令,并通过相应流程获得可用于与外界进行数据传输的目标IP地址,此处不做赘述。Specifically, the target IP address is acquired according to the upgrade instruction instruction. The target IP address is the IP address applied for by the system used for the upgrade. Specifically, the acquisition method of the target IP address can be based on Dynamic Host Configuration Protocol (DHCP, Dynamic Host Configuration Protocol), Ethernet-based point-to-point communication Protocol (PPPOE, Point-to-Point Protocol Over Ethernet) or any method based on static IP. The specific acquisition method can be pre-written with the upgrade instruction instruction, and the target that can be used for data transmission with the outside world can be obtained through the corresponding process. The IP address will not be repeated here.
104、基于目标IP地址建立与目标服务器间的数据连接。104. Establish a data connection with the target server based on the target IP address.
具体的,基于所述目标IP地址建立与目标服务器间的数据连接。其中目标服务器为用于提供升级数据包的服务器,目标服务器可为运营人员自行设置,由于支持安卓系统的某一次特定升级,即用于应对某些特殊情况,具体此处不做限定。目标服务器的网络地址也可预先写入升级指示指令,具体此处不做限定。在基于目标IP地址建立与目标服务器间的数据连接过程中,还可基于目标IP地址设置相应的域名系统(DNS,Domain Name System)信息,将域名和IP地址相互映射的一个分布式系统,使得网络访问过程顺利进行。Specifically, a data connection with the target server is established based on the target IP address. The target server is the server used to provide the upgrade data package, and the target server can be set by the operator. Since it supports a specific upgrade of the Android system, it is used to deal with some special situations, which is not limited here. The network address of the target server may also be pre-written with an upgrade instruction, which is not specifically limited here. In the process of establishing a data connection with the target server based on the target IP address, the corresponding Domain Name System (DNS, Domain Name System) information can also be set based on the target IP address, and a distributed system that maps domain names and IP addresses to each other, so that The network access process went smoothly.
105、接收目标服务器发送的升级数据包。105. Receive an upgrade data packet sent by the target server.
具体的,在目标服务器与待升级的安卓系统间建立数据连接后,接收目标服务器发送的升级数据包,其中升级数据包的数据依据当前安卓系统的系统版本而定,可以理解的是,在接收目标服务器发送的升级数据包前,目标服务器与安卓系统间还可通信确定所需的升级数据包版本,以便升级过程顺利进行,具体可依据实际情况而定,此处不做限定。升级数据包可存储于安卓系统内特定的升级包存储路径处,以便支持升级过程顺利进行。Specifically, after the data connection is established between the target server and the Android system to be upgraded, the upgrade data package sent by the target server is received, wherein the data of the upgrade data package is determined according to the system version of the current Android system. Before the upgrade data package sent by the target server, the target server and the Android system can also communicate to determine the required upgrade data package version, so that the upgrade process can be carried out smoothly, which can be determined according to the actual situation, which is not limited here. The upgrade data package can be stored in a specific upgrade package storage path in the Android system to support the smooth progress of the upgrade process.
106、在恢复模式下基于升级数据包完成安卓系统升级过程。106. Complete the Android system upgrade process based on the upgrade data package in the recovery mode.
具体的,系统接收升级数据包后,则在所述恢复模式下基于所述升级数据包完成所述安卓系统的升级过程。具体升级过程可参照现有技术中安卓系统恢复模式下的升级过程,此处不做赘述。Specifically, after receiving the upgrade data package, the system completes the upgrade process of the Android system based on the upgrade data package in the recovery mode. For the specific upgrade process, reference may be made to the upgrade process in the Android system recovery mode in the prior art, which will not be repeated here.
从以上技术方案可以看出,本申请实施例具有以下优点:本申请提供了一种安卓系统升级方法,包括:确定第一存储空间内是否存在升级指示指令;若所述第一存储空间内存在所述升级指示指令,则进入恢复模式;依据所述升级指示指令获取目标IP地址;基于所述目标IP地址建立与目标服务器间的数据连接;接收所述目标服务器发送的升级数据包;在所述恢复模式下基于所述升级数据包完成升级过程。基于本申请所提供的升级方法,使得设备可以在安卓系统未正常启动的恢复模式下下载得到升级所用的数据包,并在恢复模式下完成安卓系统的升级过程,使得设备可以在安卓系统无法正常启动的情况下顺利完成升级过程,保证了安卓系统升级过程的可实施性。It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: the present application provides an Android system upgrade method, comprising: determining whether an upgrade instruction instruction exists in the first storage space; if there is an upgrade instruction in the first storage space; the upgrade instruction instruction, then enter the recovery mode; obtain the target IP address according to the upgrade instruction instruction; establish a data connection with the target server based on the target IP address; receive the upgrade data packet sent by the target server; The upgrade process is completed based on the upgrade data package in the recovery mode. Based on the upgrade method provided by this application, the device can download the data package used for the upgrade in the recovery mode where the Android system is not started normally, and complete the upgrade process of the Android system in the recovery mode, so that the device can be used in the recovery mode when the Android system fails to work normally. In the case of startup, the upgrade process is successfully completed, which ensures the practicability of the Android system upgrade process.
为便于在实际升级过程中使用本方法,本申请还提供了一种可选择实施的更为详细的实施例,请参阅图2,本申请所提供的安卓系统升级方法的一个实施例包括:步骤201-步骤209。In order to facilitate the use of this method in the actual upgrade process, the present application also provides a more detailed embodiment that can be selectively implemented. Please refer to FIG. 2. An embodiment of the Android system upgrade method provided by the present application includes the following steps: 201-step 209.
201.在引导加载模式下确定第一存储空间内是否存在升级指示指令。201. In the boot loading mode, determine whether an upgrade instruction instruction exists in the first storage space.
具体的,在引导加载模式下确定所述第一存储空间内是否存在升级指示指令,其中引导加载模式(boot loader)用以初始化以访问随机存取存储器以访问非易失性设备或可以将操作系统程序和数据加载到随机存取存储器中的程序。即在设备开机时最初所处于的模式,在该模式下对第一存储空间内是否存在升级指示指令进行判定,为支持这一过程的执行,第一存储空间可设置为与引导加载模式相关的存储位置,举例而言,第一存储空间可为MISC分区下的BCB数据(Bootloader Control Block)引导加载模式启动的时候,会读取这个分区里面的相应数据,以决定系统进入安卓主系统模式或恢复模式。升级指示指令的具体形式可参照图3,图3即为BCB数据中表示升级指示指令部分字段的一个示例,可以理解的是,在实际实施过程中可对升级指示指令的各个字段进行调整,以使得升级指示指令字段发挥相应作用,指示系统进行升级,具体此处不做限定。升级指示指令可为系统处于联网状态下由服务器发送指令修改,也可为用户通过特定按键的方式手动修改,具体可依据实际情况而定,此处不做限定。若第一存储空间内不存在升级指示指令,则执行步骤202,判断用户是否输入预设指令。若第一存储空间内存在升级指示指令,则执行步骤203,进入恢复模式。Specifically, it is determined whether there is an upgrade instruction instruction in the first storage space in a boot loader mode, wherein the boot loader mode is used to initialize to access random access memory to access non-volatile devices or to operate A program that loads system programs and data into random access memory. That is, the mode that the device is initially in when it is powered on. In this mode, it is determined whether there is an upgrade instruction instruction in the first storage space. In order to support the execution of this process, the first storage space can be set to be related to the boot loading mode. The storage location, for example, the first storage space can be the BCB data (Bootloader Control Block) under the MISC partition. When the bootloader mode starts, the corresponding data in this partition will be read to determine whether the system enters the Android main system mode or recovery mode. For the specific form of the upgrade instruction instruction, please refer to FIG. 3, which is an example of some fields representing the upgrade instruction instruction in the BCB data. It can be understood that in the actual implementation process, each field of the upgrade instruction instruction can be adjusted to Make the upgrade instruction instruction field play a corresponding role and instruct the system to upgrade, which is not specifically limited here. The upgrade instruction instruction can be modified by an instruction sent by the server when the system is connected to the Internet, or can be modified manually by the user through a specific button, which can be determined according to the actual situation, and is not limited here. If there is no upgrade instruction instruction in the first storage space, step 202 is executed to determine whether the user inputs a preset instruction. If there is an upgrade instruction instruction in the first storage space, step 203 is executed to enter the recovery mode.
202.判断用户是否输入预设指令。202. Determine whether the user inputs a preset instruction.
具体的,判断用户是否输入预设指令,其中预设指令用于指示系统进行升级,对于由于系统升级原因等其他特殊情况使得系统无法与服务器建立正常连接的情形,此时系统无法通过网络途径获得升级指示指令,因此需相应设置手动触发升级指示指令的方式,即预设指令,当用户输入了预设指令(如按键:2486)此时可触发第一存储空间内的相应数据进行更改,激活升级指示指令,以便在系统无法正常启动或系统启动后无法与服务器间建立连接的情况下完成升级,具体的,升级指示指令的激活规则可预先编写在第一存储空间及其相应的文档中,具体此处不做限定。若用户在引导加载模式下未输入升级指示指令,则说明无需进行升级,设备进入安卓主系统。若用户输入了预设操作,则说明设备需要升级,激活预先编写于第一存储空间内的升级指示指令,并重新执行步骤201,以便识别激活的的升级指示指令,进而进入步骤203,系统进入恢复模式,具体的,在用户输入预设操作后,可使得设备重启以便重新读取升级指示指令,进而支持升级过程的进行,具体可依据实际情况而定,此处不做限定。Specifically, it is determined whether the user has input a preset command, wherein the preset command is used to instruct the system to upgrade. For the situation where the system cannot establish a normal connection with the server due to other special circumstances such as system upgrade, the system cannot obtain it through the network. Upgrade instruction instruction, so it is necessary to set the method of manually triggering the upgrade instruction instruction, that is, the preset instruction. When the user enters the preset instruction (such as button: 2486), the corresponding data in the first storage space can be triggered to change and activate. The upgrade instruction instruction is used to complete the upgrade when the system cannot be started normally or a connection cannot be established with the server after the system is started. Specifically, the activation rule of the upgrade instruction instruction can be pre-written in the first storage space and its corresponding document. There is no specific limitation here. If the user does not enter an upgrade instruction in the bootloader mode, it means that no upgrade is required, and the device enters the Android main system. If the user enters the preset operation, it means that the device needs to be upgraded, activate the upgrade instruction pre-written in the first storage space, and re-execute step 201 to identify the activated upgrade instruction, and then proceed to step 203, the system enters The recovery mode, specifically, after the user inputs a preset operation, the device can be restarted so as to re-read the upgrade instruction instruction, thereby supporting the progress of the upgrade process, which can be determined according to the actual situation, and is not limited here.
203.进入恢复模式。203. Enter recovery mode.
具体的,系统进入恢复模式,以便进行后续升级步骤,本步骤与前述图1对应实施例中步骤102近似,此处不做赘述。Specifically, the system enters the recovery mode so as to perform subsequent upgrade steps. This step is similar to step 102 in the aforementioned embodiment corresponding to FIG. 1 , and will not be repeated here.
204.依据升级指示指令获取目标IP地址。204. Acquire the target IP address according to the upgrade instruction instruction.
具体的,基于第一预设协议获得所述目标IP地址,所述第一预设协议包括:动态主机配置协议、基于以太网的点对点通讯协议或静态IP中的任意一种,其中动态主机配置协议(DHCP,Dynamic Host Configuration Protocol)是一个局域网网络协议.主要作用是集中管理、分配IP地址.使当前局域网环境下的网络设备获得IP地址、Gateway地址、DNS服务器地址等信息.从而使设备能正常网络通信。基于以太网的点对点通讯协议(PPPoE,Point-to-Point Protocol Over Ethernet)是将点对点协议封装在以太网框架中的一种网络隧道协议。由于协议中集成点对点协议,所以实现出传统以太网不能提供的身份验证、加密以及压缩等功能,也可用于缆线调制解调器和数字用户线路等以以太网协议向用户提供接入服务的协议体系。具体的,本方案以采用DHCP为例进行说明,值得注意的是,在实际实施过程中,本方案也可采用其他任意方式获得IP地址,此处不做限定。Specifically, the target IP address is obtained based on a first preset protocol, and the first preset protocol includes: any one of a dynamic host configuration protocol, an Ethernet-based point-to-point communication protocol, or a static IP, wherein the dynamic host configuration Protocol (DHCP, Dynamic Host Configuration Protocol) is a LAN network protocol. Its main function is to centrally manage and assign IP addresses. It enables network devices in the current LAN environment to obtain IP addresses, Gateway addresses, DNS server addresses and other information. Normal network communication. Point-to-Point Protocol Over Ethernet (PPPoE) is a network tunneling protocol that encapsulates the point-to-point protocol in an Ethernet frame. Because the point-to-point protocol is integrated in the protocol, the functions of authentication, encryption and compression that cannot be provided by traditional Ethernet can be realized, and it can also be used in the protocol system such as cable modem and digital subscriber line that provide access services to users with the Ethernet protocol. Specifically, this solution is described by using DHCP as an example. It is worth noting that in the actual implementation process, this solution can also obtain an IP address in any other manner, which is not limited here.
在本方案中实现简版的DHCP client功能.设备向DHCP服务器发出申请,服务器向设备提供DHCP报文,DHCP报文中可以拿到分配的IP地址,主机地址(网关地址),DNS服务器地址,子网掩码,续租时间等信息。续租时间(lease time)即该IP地址不是永久被此设备使用,在50%lease time设备需要要主动发送Request报文进行续租,DHCP服务器回复ACK报文后,才能继续使用该IP地址.如果50%续租时间时发送续租请求,若DHCP服务器没有回复,则设备就会在时间到达67.5%续租时间时再次发送……直到100%lease time没有收到服务器ACK报文,设备就会放弃该IP地址,重新发送发现请求进行地址申请,具体可参照现有技术,此处不做赘述。In this solution, a simplified version of the DHCP client function is implemented. The device sends an application to the DHCP server, and the server provides a DHCP message to the device. In the DHCP message, the assigned IP address, host address (gateway address), DNS server address, Subnet mask, lease renewal time and other information. The lease time (lease time) means that the IP address is not permanently used by this device. At 50% lease time, the device needs to actively send a Request message to renew the lease. After the DHCP server replies with an ACK message, the IP address can continue to be used. If the lease renewal request is sent at 50% of the lease time, if the DHCP server does not reply, the device will send it again when the time reaches 67.5% of the lease renewal time... Until the 100% lease time does not receive an ACK message from the server, the device will The IP address will be discarded, and the discovery request will be resent to apply for the address. For details, refer to the prior art, which will not be repeated here.
205.基于目标IP地址设置域名信息。205. Set domain name information based on the target IP address.
具体的,基于目标IP地址设置域名信息,以便与服务器建立连接,具体的,通过DHCP报文中携带的DNS地址信息,将其配置到DNSmasq模块即可,DNSmasq支持DNS配置以及DHCP服务器,本步骤可参照现有技术,具体此处不做赘述。Specifically, the domain name information is set based on the target IP address, so as to establish a connection with the server. Specifically, the DNS address information carried in the DHCP message can be configured to the DNSmasq module. DNSmasq supports DNS configuration and DHCP server. This step Reference may be made to the prior art, and details are not repeated here.
206.依据升级指示指令确定目标通信协议。206. Determine the target communication protocol according to the upgrade instruction instruction.
具体的,依据升级指示指令确定目标通信协议。其中目标通信协议为文件传输协议(FTP,File Transfer Protocol)、支持传输层安全性的文件传输协议(FTPS)、超文本传输协议(HTTP,Hyper Text Transfer Protocol)、超文本传输安全协议(Hyper TextTransfer Protocol over SecureSocket Layer)或SSH文件传输协议(SFTP,SSH FileTransfer Protocol)中的任意一种。具体的通信协议设置可依据设备情况而定,此处不做限定。Specifically, the target communication protocol is determined according to the upgrade instruction instruction. The target communication protocols are File Transfer Protocol (FTP, File Transfer Protocol), File Transfer Protocol (FTPS) supporting Transport Layer Security, Hyper Text Transfer Protocol (HTTP, Hyper Text Transfer Protocol), Hyper Text Transfer Protocol (Hyper Text Transfer Protocol) Protocol over SecureSocket Layer) or SSH File Transfer Protocol (SFTP, SSH FileTransfer Protocol). The specific communication protocol settings can be determined according to the device conditions, which are not limited here.
值得注意的是,为支持SFTP协议在设备上的顺利运行,可对安卓系统进行一定调整,具体的,可在系统中移植配套的软件库包及函数库,具体此处不做赘述。It is worth noting that in order to support the smooth operation of the SFTP protocol on the device, certain adjustments can be made to the Android system. Specifically, the supporting software library package and function library can be transplanted into the system, which will not be repeated here.
207.基于目标通信协议和域名信息建立与目标服务器间的数据连接。207. Establish a data connection with the target server based on the target communication protocol and domain name information.
具体的,基于目标通信协议和域名信息建立与目标服务器间的数据连接。目标服务器可为运营人员自行设置,由于支持安卓系统的某一次特定升级,即用于应对某些特殊情况,具体此处不做限定。目标服务器的网络地址也可预先写入升级指示指令,具体此处不做限定。Specifically, a data connection with the target server is established based on the target communication protocol and domain name information. The target server can be set by the operator. Since it supports a specific upgrade of the Android system, it is used to deal with some special situations, which is not limited here. The network address of the target server may also be pre-written with an upgrade instruction, which is not specifically limited here.
208.接收目标服务器发送的升级数据包。208. Receive an upgrade data packet sent by the target server.
具体的,在目标服务器与待升级的安卓系统间建立数据连接后,接收目标服务器发送的升级数据包,其中升级数据包的数据依据当前安卓系统的系统版本而定,可以理解的是,在接收目标服务器发送的升级数据包前,目标服务器与安卓系统间还可通信确定所需的升级数据包版本,以便升级过程顺利进行,具体可依据实际情况而定,此处不做限定。升级数据包可存储于安卓系统内特定的升级包存储路径处,以便支持升级过程顺利进行。Specifically, after the data connection is established between the target server and the Android system to be upgraded, the upgrade data package sent by the target server is received, wherein the data of the upgrade data package is determined according to the system version of the current Android system. Before the upgrade data package sent by the target server, the target server and the Android system can also communicate to determine the required upgrade data package version, so that the upgrade process can be carried out smoothly, which can be determined according to the actual situation, which is not limited here. The upgrade data package can be stored in a specific upgrade package storage path in the Android system to support the smooth progress of the upgrade process.
209.在恢复模式下基于升级数据包完成安卓系统的升级过程。209. Complete the Android system upgrade process based on the upgrade data package in the recovery mode.
具体的,系统接收升级数据包后,则在所述恢复模式下基于所述升级数据包完成所述安卓系统升级过程。具体升级过程可参照现有技术中安卓系统恢复模式下的升级过程,此处不做赘述。Specifically, after receiving the upgrade data package, the system completes the Android system upgrade process based on the upgrade data package in the recovery mode. For the specific upgrade process, reference may be made to the upgrade process in the Android system recovery mode in the prior art, which will not be repeated here.
从以上技术方案可以看出,本申请实施例具有以下优点:本申请提供了一种安卓系统升级方法,包括:确定第一存储空间内是否存在升级指示指令;若所述第一存储空间内存在所述升级指示指令,则进入恢复模式;依据所述升级指示指令获取目标IP地址;基于所述目标IP地址建立与目标服务器间的数据连接;接收所述目标服务器发送的升级数据包;在所述恢复模式下基于所述升级数据包完成升级过程。基于本申请所提供的升级方法,使得设备可以在安卓系统未正常启动的恢复模式下下载得到升级所用的数据包,并在恢复模式下完成安卓系统的升级过程,使得设备可以在安卓系统无法正常启动的情况下顺利完成升级过程,保证了安卓系统升级过程的可实施性。It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: the present application provides an Android system upgrade method, comprising: determining whether an upgrade instruction instruction exists in the first storage space; if there is an upgrade instruction in the first storage space; the upgrade instruction instruction, then enter the recovery mode; obtain the target IP address according to the upgrade instruction instruction; establish a data connection with the target server based on the target IP address; receive the upgrade data packet sent by the target server; The upgrade process is completed based on the upgrade data package in the recovery mode. Based on the upgrade method provided by this application, the device can download the data package used for the upgrade in the recovery mode where the Android system is not started normally, and complete the upgrade process of the Android system in the recovery mode, so that the device can be used in the recovery mode when the Android system fails to work normally. In the case of startup, the upgrade process is successfully completed, which ensures the practicability of the Android system upgrade process.
上述内容对本方法应用于安卓设备侧进行描述,下面对本方法应用于服务器的情况进行描述。The above content describes the application of the method to the Android device side, and the following describes the application of the method to the server.
401.基于目标IP地址建立目标设备间的数据连接。401. Establish a data connection between target devices based on the target IP address.
具体的,基于目标IP地址建立目标设备间的数据连接,所述目标IP地址为所述目标设备确定第一存储空间内是否存在升级指示指令,若所述第一存储空间内存在所述升级指示指令,则进入恢复模式并依据所述升级指示指令获得,所述目标设备安装有所述安卓系统。具体的,目标IP地址的获取过程可参照前述图1和图2对应实施例中的相应步骤,此处不做赘述。Specifically, a data connection between target devices is established based on a target IP address, where the target IP address is used by the target device to determine whether an upgrade instruction exists in the first storage space, and if the upgrade instruction exists in the first storage space instruction, enter the recovery mode and obtain according to the upgrade instruction instruction, the target device is installed with the Android system. Specifically, for the acquisition process of the target IP address, reference may be made to the corresponding steps in the foregoing embodiments corresponding to FIG. 1 and FIG. 2 , which will not be repeated here.
302.发送升级数据包至所述目标设备。302. Send an upgrade data packet to the target device.
具体的,发送升级数据包至所述目标设备,以使得所述目标升级设备在所述恢复模式下基于所述升级数据包完成升级过程。可以理解的是,在发送升级数据包前,服务器还可与安卓系统间还可通信进而确定所需的升级数据包版本,以便升级过程顺利进行,具体可依据实际情况而定,此处不做限定。目标设备的升级过程可参照前述图1和图2对应实施例中的相应步骤,此处不做赘述。Specifically, an upgrade data package is sent to the target device, so that the target upgrade device completes the upgrade process based on the upgrade data package in the recovery mode. It can be understood that before sending the upgrade data package, the server can also communicate with the Android system to determine the required upgrade data package version, so that the upgrade process can be carried out smoothly, which can be determined according to the actual situation. limited. For the upgrade process of the target device, reference may be made to the corresponding steps in the embodiments corresponding to FIG. 1 and FIG. 2 , which will not be repeated here.
从以上技术方案可以看出,本申请实施例具有以下优点:本申请提供了一种安卓系统升级方法,包括:基于目标IP地址建立目标设备间的数据连接,发送升级数据包至所述目标设备,以使得所述目标升级设备在所述恢复模式下基于所述升级数据包完成升级过程。基于本申请所提供的升级方法,使得服务器可以支持设备可以在安卓系统未正常启动的恢复模式下下载得到升级所用的数据包,并在恢复模式下完成安卓系统的升级过程,使得设备可以在安卓系统无法正常启动的情况下顺利完成升级过程,保证了安卓系统升级过程的可实施性。It can be seen from the above technical solutions that the embodiments of the present application have the following advantages: the present application provides an Android system upgrade method, including: establishing a data connection between target devices based on a target IP address, and sending an upgrade data packet to the target device , so that the target upgrade device completes the upgrade process based on the upgrade data package in the recovery mode. Based on the upgrade method provided by the present application, the server can support the device to download and obtain the data package used for the upgrade in the recovery mode where the Android system is not normally started, and complete the upgrade process of the Android system in the recovery mode, so that the device can be used in the Android system. When the system cannot be started normally, the upgrade process is successfully completed, which ensures the practicability of the Android system upgrade process.
上述内容对本申请所提供的方法进行了描述,为支持上述实施例的实施,本申请还提供了一种安卓设备,请参阅图5,本申请安卓设备的一个实施例包括:The above content describes the method provided by the present application. In order to support the implementation of the above embodiments, the present application also provides an Android device. Please refer to FIG. 5. An embodiment of the Android device of the present application includes:
确定单元501,用于确定第一存储空间内是否存在升级指示指令,若所述第一存储空间内存在所述升级指示指令,则触发进入单元502,The determining
进入单元502,用于进入恢复模式;Entering
获取单元503,用于依据所述升级指示指令获取目标IP地址;an obtaining
建立单元504,用于基于所述目标IP地址建立与目标服务器间的数据连接;establishing
接收单元505,用于接收所述目标服务器发送的升级数据包;a receiving
升级单元506,用于在所述恢复模式下基于所述升级数据包完成安卓系统的升级过程。An
本实施例中,安卓设备中各单元所执行的流程与前述图1或图2所对应的实施例中描述的方法流程类似,此处不再赘述。In this embodiment, the process performed by each unit in the Android device is similar to the method process described in the embodiment corresponding to FIG. 1 or FIG. 2 , which is not repeated here.
可选的,所述设备还包括:Optionally, the device further includes:
判断单元,所述判断单元用于:若所述第一存储空间内不存在所述升级指示指令,则判断用户是否输入预设指令;a judging unit, the judging unit is configured to: if the upgrade instruction instruction does not exist in the first storage space, judging whether the user inputs a preset instruction;
若所述用户输入所述预设指令,则在所述第一存储空间内写入所述升级指示指令,并触发确定单元。If the user inputs the preset instruction, the upgrade instruction instruction is written in the first storage space, and the determination unit is triggered.
可选的,所述确定单元具体用于:Optionally, the determining unit is specifically used for:
在引导加载模式下确定第一存储空间内是否存在升级指示指令Determining whether an upgrade instruction instruction exists in the first storage space in the bootloader mode
可选的,所述获取单元具体用于:Optionally, the obtaining unit is specifically used for:
基于第一预设协议获得所述目标IP地址,所述第一预设协议包括:动态主机配置协议、基于以太网的点对点通讯协议或静态IP中的任意一种。The target IP address is obtained based on a first preset protocol, where the first preset protocol includes any one of a dynamic host configuration protocol, an Ethernet-based point-to-point communication protocol, or a static IP.
可选的,所述建立单元具体用于:Optionally, the establishment unit is specifically used for:
基于所述目标IP地址设置域名信息;Setting domain name information based on the target IP address;
基于所述域名信息建立与目标服务器间的数据连接。A data connection with the target server is established based on the domain name information.
可选的,所述建立单元具体用于:Optionally, the establishment unit is specifically used for:
依据所述升级指示指令确定目标通信协议;determining a target communication protocol according to the upgrade instruction;
基于所述目标通信协议建立与目标服务器间的数据连接,所述目标通信协议为文件传输协议、支持传输层安全性的文件传输协议、超文本传输协议、超文本传输安全协议或SSH文件传输协议中的任意一种。A data connection with the target server is established based on the target communication protocol, where the target communication protocol is a file transfer protocol, a file transfer protocol supporting transport layer security, a hypertext transfer protocol, a hypertext transfer security protocol or an SSH file transfer protocol any of the .
本申请还提供了一种服务器,请参阅图6,本申请服务器的一个实施例包括:The present application also provides a server, please refer to FIG. 6 , an embodiment of the server of the present application includes:
建立单元601,用于基于目标IP地址建立目标设备间的数据连接,所述目标IP地址为所述目标设备确定第一存储空间内是否存在升级指示指令,若所述第一存储空间内存在所述升级指示指令,则进入恢复模式并依据所述升级指示指令获得,所述目标设备安装有所述安卓系统;The
发送单元602,用于发送升级数据包至所述目标设备,以使得所述目标升级设备在所述恢复模式下基于所述升级数据包完成升级过程。A sending
图7是本申请实施例提供的一种安卓设备的结构示意图,该安卓设备700可以包括一个或一个以上中央处理器(central processing units,CPU)701和存储器705,该存储器705中存储有一个或一个以上的应用程序或数据。7 is a schematic structural diagram of an Android device provided by an embodiment of the present application, the
本实施例中,中央处理器701中的具体功能模块划分可以与前述图5中所描述的各单元的功能模块划分方式类似,此处不再赘述。In this embodiment, the specific functional module division in the
其中,存储器705可以是易失性存储或持久存储。存储在存储器705的程序可以包括一个或一个以上模块,每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器701可以设置为与存储器705通信,在安卓设备700上执行存储器705中的一系列指令操作。Among them, the
安卓设备700还可以包括一个或一个以上电源702,一个或一个以上有线或无线网络接口703,一个或一个以上输入输出接口704,和任意版本的安卓操作系统。
该中央处理器701可以执行前述图1或图2所示实施例中安卓系统升级方法所执行的操作,具体此处不再赘述。The
图8是本申请实施例提供的一种服务器的结构示意图,该服务器800可以包括一个或一个以上中央处理器(central processing units,CPU)801和存储器805,该存储器805中存储有一个或一个以上的应用程序或数据。8 is a schematic structural diagram of a server provided by an embodiment of the present application, the
本实施例中,中央处理器801中的具体功能模块划分可以与前述图6中所描述的各单元的功能模块划分方式类似,此处不再赘述。In this embodiment, the specific functional module division in the
其中,存储器805可以是易失性存储或持久存储。存储在存储器805的程序可以包括一个或一个以上模块,每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器801可以设置为与存储器805通信,在服务器800上执行存储器805中的一系列指令操作。Among them, the
服务器800还可以包括一个或一个以上电源802,一个或一个以上有线或无线网络接口803,一个或一个以上输入输出接口804,和一个或一个以上的操作系统,例如WindowsServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等。The
该中央处理器801可以执行前述图4所示实施例中安卓系统升级方法所执行的操作,具体此处不再赘述。The
本申请实施例还提供了一种计算机存储介质,该计算机存储介质用于储存为上述安卓系统升级方法所用的计算机软件指令,其包括用于执行为安卓系统升级方法所设计的程序。Embodiments of the present application also provide a computer storage medium, where the computer storage medium is used to store computer software instructions used in the above Android system upgrade method, which includes a program for executing a program designed for the Android system upgrade method.
该安卓系统升级方法可以如前述图1、图2或图4任意图所对应的实施例中所描述的安卓系统升级方法。The Android system upgrade method may be the Android system upgrade method described in the embodiment corresponding to any of the foregoing FIG. 1 , FIG. 2 or FIG. 4 .
本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括计算机软件指令,该计算机软件指令可通过处理器进行加载来实现上述图1图2或图3中任意一项的安卓系统升级方法的流程。An embodiment of the present application further provides a computer program product, where the computer program product includes computer software instructions, and the computer software instructions can be loaded by a processor to implement the Android system upgrade of any one of the above-mentioned FIG. 1 , FIG. 2 or FIG. 3 . method flow.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,电路的等效变换,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative, for example, the equivalent transformation of the circuit and the division of units are only a logical function division. In actual implementation, there may be other division methods, such as multiple units or Components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换或改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements or improvements made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.
Claims (12)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210656655.9A CN115208945A (en) | 2022-06-10 | 2022-06-10 | Android system upgrading method and related equipment thereof |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210656655.9A CN115208945A (en) | 2022-06-10 | 2022-06-10 | Android system upgrading method and related equipment thereof |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN115208945A true CN115208945A (en) | 2022-10-18 |
Family
ID=83577202
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210656655.9A Pending CN115208945A (en) | 2022-06-10 | 2022-06-10 | Android system upgrading method and related equipment thereof |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN115208945A (en) |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100313105A1 (en) * | 2009-06-04 | 2010-12-09 | Abbott Diabetes Care Inc. | Method and System for Updating a Medical Device |
| CN105094933A (en) * | 2015-09-18 | 2015-11-25 | Tcl集团股份有限公司 | Method and device for handling abnormity after Android TV system is upgraded |
| CN109358894A (en) * | 2018-12-18 | 2019-02-19 | 北京四达时代软件技术股份有限公司 | A kind of Android device upgrade method and system supporting DVB |
| CN109542480A (en) * | 2018-11-16 | 2019-03-29 | 深圳市邻友通科技发展有限公司 | The operating system update method, apparatus and medium of nail print apparatus |
| CN111538538A (en) * | 2020-04-08 | 2020-08-14 | 成都千立网络科技有限公司 | Method for restoring system under uboot |
| CN113656051A (en) * | 2021-04-27 | 2021-11-16 | 苏州佳世达电通有限公司 | A method for automatic upgrade of Android system equipment |
-
2022
- 2022-06-10 CN CN202210656655.9A patent/CN115208945A/en active Pending
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100313105A1 (en) * | 2009-06-04 | 2010-12-09 | Abbott Diabetes Care Inc. | Method and System for Updating a Medical Device |
| CN105094933A (en) * | 2015-09-18 | 2015-11-25 | Tcl集团股份有限公司 | Method and device for handling abnormity after Android TV system is upgraded |
| CN109542480A (en) * | 2018-11-16 | 2019-03-29 | 深圳市邻友通科技发展有限公司 | The operating system update method, apparatus and medium of nail print apparatus |
| CN109358894A (en) * | 2018-12-18 | 2019-02-19 | 北京四达时代软件技术股份有限公司 | A kind of Android device upgrade method and system supporting DVB |
| CN111538538A (en) * | 2020-04-08 | 2020-08-14 | 成都千立网络科技有限公司 | Method for restoring system under uboot |
| CN113656051A (en) * | 2021-04-27 | 2021-11-16 | 苏州佳世达电通有限公司 | A method for automatic upgrade of Android system equipment |
Non-Patent Citations (2)
| Title |
|---|
| 张宇杰;: "基于Android平台智能手机在线升级技术的改进与实现", 电子质量 * |
| 曾浩;吴小朋;王敏;: "基于HTTP的IPTV机顶盒自修复机制的改良", 中国新通信 * |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11922177B2 (en) | Securely and reliably transferring startup script | |
| TWI601068B (en) | Apparatus and method to access a network, and computer readable medium | |
| US8332490B2 (en) | Method, apparatus and program product for provisioning a computer system | |
| US20060242395A1 (en) | Operating system boot from network location | |
| US20100132042A1 (en) | Method for upgrading antivirus software and terminal and system thereof | |
| US10185575B2 (en) | Computing device for operating a machine session with persistent read cache and non-persistent write cache and related methods | |
| KR101587994B1 (en) | Cloud computing service system with virtual hard disk | |
| CN106572200A (en) | IP address configuration method and IP address configuration device for baseboard management controller BMC | |
| CN102262546A (en) | Method for booting operating system in diskless way, electronic device and server | |
| CN106126273A (en) | A kind of method of upgrading BIOS | |
| CN114115917A (en) | Operating system installation method and device | |
| CN102316003A (en) | Router and method for remotely starting operating system by router | |
| CN104935468A (en) | PXE technology-based interactive system and method for realizing operation of operating system thereof | |
| CN103888491A (en) | Diskless workstation start system and method | |
| CN105183528A (en) | Server bios upgrading method and system | |
| CN105183529A (en) | Method for refreshing server firmware, target server, source server and system | |
| CN108271054A (en) | A kind of firmware upgrade backup method and device | |
| CN111459524A (en) | Software upgrading method, device and system | |
| CN107526595B (en) | A Method for Supporting Remote Loading of Multiple Operating Systems | |
| CN108881504A (en) | A kind of hardware information automatic acquiring method and device | |
| CN106547602B (en) | Method for manufacturing operating system mirror image suitable for iSCSI protocol remote wireless loading | |
| CN115004151B (en) | System and method for updating add-in card firmware and collecting hardware information on any server or bare metal server with any OS installed | |
| CN111752576A (en) | A 5G data-based forwarding system deployment method, terminal and storage medium | |
| CN115208945A (en) | Android system upgrading method and related equipment thereof | |
| US20210336853A1 (en) | Control system, electronic device, and control method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20221018 |
