CN109428936B - APP upgrading method, device, system, electronic equipment and storage medium - Google Patents

APP upgrading method, device, system, electronic equipment and storage medium Download PDF

Info

Publication number
CN109428936B
CN109428936B CN201710786074.6A CN201710786074A CN109428936B CN 109428936 B CN109428936 B CN 109428936B CN 201710786074 A CN201710786074 A CN 201710786074A CN 109428936 B CN109428936 B CN 109428936B
Authority
CN
China
Prior art keywords
app
mobile terminal
upgrading
upgraded
preset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710786074.6A
Other languages
Chinese (zh)
Other versions
CN109428936A (en
Inventor
韩瑜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
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 China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN201710786074.6A priority Critical patent/CN109428936B/en
Publication of CN109428936A publication Critical patent/CN109428936A/en
Application granted granted Critical
Publication of CN109428936B publication Critical patent/CN109428936B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an APP upgrading method, device, system, electronic equipment and storage medium, wherein the system comprises: the system comprises control equipment, an FTP server and at least one mobile terminal, wherein each mobile terminal is provided with an APP to be upgraded; the control equipment is used for sending an upgrading instruction to at least one mobile terminal, wherein the upgrading instruction comprises identification information of an APP to be upgraded and address information of an FTP server; and the at least one mobile terminal is used for receiving an upgrading instruction, sending the upgrading instruction to the APP of the identification information, acquiring an apk file of the APP from the FTP server by the APP according to the address information of the FTP server, and upgrading the APP according to the apk file. In the embodiment of the invention, the user can simultaneously send the upgrading instruction to the plurality of mobile terminals through the control equipment, so that the corresponding APP in each mobile terminal is upgraded, and the upgrading efficiency of the APP is further improved.

Description

APP upgrading method, device, system, electronic equipment and storage medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, a system, an electronic device, and a storage medium for upgrading an Application (APP).
Background
With the vigorous development of the android open source system, strong power is injected for the development of the mobile internet, massive APP based on the android system floods the mobile user market like bamboo shoots in spring after rain, and the APP is continuously and iteratively upgraded at a very fast speed. Because the android system is an open source system, various customized versions are multiple, the requirements on compatibility and adaptability of APP development are high, and the upgraded APP needs to be tested by applying a large number of mobile terminals of the android systems of different versions.
When upgrading APP, the mobile terminal is connected to a personal computer (personal computer, PC) through a Universal Serial Bus (USB) line, a 360-degree mobile phone assistant or Android Debug Bridge (Android Debug Bridge, adb) debugging tool installed on the PC is operated, an Android installation package (Android package, apk) file corresponding to the APP is obtained to upgrade the APP, or a user clicks a corresponding upgrade button on an application market of the mobile terminal or a setting interface of the APP, the corresponding apk file of the APP is downloaded, and the APP is upgraded.
However, in the above method, the PC is used as an auxiliary device, when the number of the mobile terminals is large, multiple PCs need to be equipped, or each mobile terminal is connected to the PC in sequence, and it is necessary to operate each mobile terminal in sequence manually, which wastes a lot of time, and when the APP is updated through the application store or the update button of the APP setting interface, it is also necessary to operate each mobile terminal in sequence manually, which also wastes a lot of time, resulting in a problem of low time efficiency and poor user experience.
Disclosure of Invention
The invention provides an APP upgrading method, device, system, electronic equipment and storage medium, which are used for solving the problems of large time waste, low time efficiency and poor user experience in the APP upgrading process in the prior art.
The invention discloses an APP upgrading method, which comprises the following steps:
the method comprises the steps that an APP to be upgraded receives an upgrading instruction sent by control equipment, wherein the upgrading instruction comprises address information of a text transfer protocol (FTP) server;
acquiring an android installation package apk file of the APP from the FTP server according to the address information of the FTP server;
and upgrading the APP according to the apk file.
Further, the method further comprises:
starting the APP and detecting whether the APP is upgraded successfully;
and if not, sending an upgrading failure message containing the identification information of the mobile terminal where the control device is located to the control device.
Further, the upgrading the APP according to the apk file includes:
acquiring the ROOT authority of the mobile terminal where the ROOT authority is located;
and covering and installing the file corresponding to the APP in the mobile terminal by adopting the apk file.
Further, before the obtaining of the ROOT authority of the mobile terminal where the method is located, the method further includes:
and the APP starts a preset subprocess or thread, and the follow-up steps are carried out through the preset subprocess or thread.
Further, before the apk file is used to overlay and install the file corresponding to the APP in the mobile terminal through the preset sub-process or thread, the method further includes:
the preset subprocess or the thread starts a preset starting agent program;
the starting the APP and detecting whether the APP is successfully upgraded comprise:
and after the preset starting agent program is started for a set time, starting the APP and detecting whether the APP is upgraded successfully.
The invention discloses an APP upgrading system, which comprises: the system comprises control equipment, a text transfer protocol (FTP) server and at least one mobile terminal, wherein each mobile terminal is provided with an APP to be upgraded; wherein,
the control device is used for sending an upgrading instruction to the at least one mobile terminal, wherein the upgrading instruction comprises identification information of an APP to be upgraded and address information of the FTP server;
the mobile terminal is used for receiving the upgrading instruction and sending the upgrading instruction to the APP of the identification information, the APP of the identification information acquires an android installation package apk file of the APP from the FTP server according to the address information of the FTP server, and the APP is upgraded according to the apk file.
Further, the at least one mobile terminal is further configured to send an upgrade failure message to the control device, where the upgrade failure message is to start the APP after the APP is upgraded, and detect that the APP is sent when the APP is upgraded unsuccessfully.
The invention discloses an APP upgrading device, which comprises:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an upgrading instruction sent by control equipment by an APP to be upgraded, and the upgrading instruction comprises address information of a text transfer protocol (FTP) server;
the obtaining module is used for obtaining an android installation package apk file of the APP from the FTP server according to the address information of the FTP server;
and the upgrading module is used for upgrading the APP according to the apk file.
The invention discloses an electronic device, comprising: a memory, a processor, and a transceiver;
the processor is used for reading the program in the memory and executing the following processes: the method comprises the steps that an APP to be upgraded is operated, and an upgrading instruction sent by control equipment is received through a transceiver, wherein the upgrading instruction comprises address information of a text transfer protocol (FTP) server; acquiring an android installation package apk file of the APP from the FTP server according to the address information of the FTP server; and upgrading the APP according to the apk file.
Further, the processor is further configured to start the APP and detect whether the APP is successfully upgraded; if not, sending an upgrade failure message containing the identification information of the mobile terminal where the control device is located to the control device through the transceiver.
Further, the processor is specifically configured to obtain a ROOT right of the mobile terminal where the processor is located; and covering and installing the file corresponding to the APP in the mobile terminal by adopting the apk file.
Further, the processor is further configured to run the APP to start a preset subprocess or thread, and perform a subsequent step of acquiring a ROOT permission of the mobile terminal where the processor is located through the preset subprocess or thread.
And further, the processor is also used for running a preset subprocess or thread to start a preset starting agent program, and after the preset starting agent program is started for a set time length by the processor, the processor starts the APP and detects whether the APP is upgraded successfully.
The invention discloses an electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory has stored therein a computer program which, when executed by the processor, causes the processor to perform the steps of any of the methods described above.
The invention discloses a computer readable storage medium storing a computer program executable by an electronic device, the program, when run on the electronic device, causing the electronic device to perform any of the steps of the method described above.
The invention discloses an APP upgrading method, device, system, electronic equipment and storage medium, wherein the system comprises: the system comprises control equipment, an FTP server and at least one mobile terminal, wherein each mobile terminal is provided with an APP to be upgraded; the control device is configured to send an upgrade instruction to the at least one mobile terminal, where the upgrade instruction includes identification information of an APP to be upgraded and address information of the FTP server; the mobile terminal is used for receiving the upgrading instruction and sending the upgrading instruction to the APP of the identification information, the APP of the identification information acquires an android installation package apk file of the APP from the FTP server according to the address information of the FTP server, and the APP is upgraded according to the apk file. In the embodiment of the invention, the APP to be upgraded in the mobile terminal receives the upgrading instruction sent by the control equipment, the apk file of the APP is obtained from the FTP server according to the address information of the FTP server, and the APP is upgraded according to the apk file, so that a user can simultaneously send the upgrading instruction to a plurality of mobile terminals through the control equipment, and thus, the corresponding APP in each mobile terminal is upgraded, the upgrading efficiency of the APP is improved, and the user experience is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an APP upgrade system provided in embodiment 1 of the present invention;
fig. 2 is a schematic diagram of an APP upgrade process provided in embodiment 2 of the present invention;
fig. 3 is a schematic diagram illustrating a relationship between an APP and a predetermined sub-process or thread according to embodiment 5 of the present invention;
fig. 4A, fig. 4B and fig. 4C are schematic diagrams of an APP upgrade process provided in embodiment 5 of the present invention;
fig. 5 is a schematic diagram of a relationship between an APP and a preset start agent according to embodiment 6 of the present invention;
fig. 6A, fig. 6B, fig. 6C, and fig. 6D are schematic diagrams of an APP upgrade process provided in embodiment 6 of the present invention;
fig. 7 is a schematic structural diagram of an APP upgrading apparatus provided in embodiment 7 of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to embodiment 8 of the present invention;
fig. 9 is a schematic view of an electronic device according to embodiment 9 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1:
fig. 1 is a schematic structural diagram of an APP upgrading system provided in an embodiment of the present invention, where the system includes: the system comprises a control device 11, a File Transfer Protocol (FTP) Server 13 and at least one mobile terminal 12, wherein each mobile terminal 12 is provided with an APP to be upgraded; wherein,
the control device 11 is configured to send an upgrade instruction to at least one mobile terminal 12, where the upgrade instruction includes identification information of an APP to be upgraded and address information of the FTP server 13;
and the at least one mobile terminal 12 is configured to receive an upgrade instruction, send the upgrade instruction to the APP with the identification information, obtain an apk file of the APP from the FTP server 13 according to the address information of the FTP server 13, and upgrade the APP according to the apk file.
In the embodiment of the invention, the mobile terminal can be a mobile phone or a tablet computer and other equipment using the android system. The control device may be a mobile phone, a Personal Computer (PC), a server, or the like having a communication function.
Specifically, before upgrading the APP to be upgraded, the administrator or developer of the APP stores the apk file for upgrading the APP in the FTP server 13, and the address information of the FTP server 13 is stored in the control device 11. In addition, the control device may further store an information table in which information of the mobile terminal 12 in which the APP is installed is recorded, where the information table may be derived from a server corresponding to the APP, and the information table records identification information of the mobile terminal 12 in which the APP is installed.
In order to enable upgrading of the corresponding APP in at least one mobile terminal 12, the user may directly input in the control device 11 identification information of the controlling mobile terminal 12. In order to reduce the operation amount of the user and improve the user experience, the control device 11 may further provide an interface for selecting the mobile terminal 12 for each APP, where an information table corresponding to the APP is shown in the interface, and the user may select an APP to be upgraded in the interface and select at least one of the mobile terminals 12 for the information table corresponding to the APP. If the user selects at least one mobile terminal 12 for upgrading a certain APP, the control device 11 only sends an upgrade instruction to the mobile terminal 12 selected by the user, where the upgrade instruction carries identification information of the selected APP; if the user does not select a mobile terminal for the APP, the control device 11 sends an upgrade instruction to each mobile terminal 12 in the information table corresponding to the APP by default.
Mobile terminal 12 receives the upgrading instruction that control device sent, discerns the identification information of the APP that includes in the upgrading instruction, and send the upgrading instruction for this APP, after this APP received the upgrading instruction, discerns the address information of FTP server 13 that includes in the upgrading instruction, mobile terminal 12 through this APP place sends the download request that contains the identification information of this APP to FTP server 13, FTP server 13 receives this download request, send the apk file of this APP to mobile terminal 12 at this APP place, thereby make this APP obtain this apk file.
After the APP obtains the apk file for upgrading, the APP can be upgraded by installing the apk file. The process of upgrading an APP by using an apk file belongs to the prior art, and in the embodiment of the invention, the process is not described in detail.
In the embodiment of the invention, the APP to be upgraded in the mobile terminal receives the upgrading instruction sent by the control equipment, the apk file of the APP is obtained from the FTP server according to the address information of the FTP server, and the APP is upgraded according to the apk file, so that a user can simultaneously send the upgrading instruction to a plurality of mobile terminals through the control equipment, and thus, the corresponding APP in each mobile terminal is upgraded, the upgrading efficiency of the APP is improved, and the user experience is improved.
Example 2:
fig. 2 is a schematic diagram of an APP upgrading process provided by an embodiment of the present invention, where the process includes:
s201: and the APP to be upgraded receives an upgrading instruction sent by the control equipment, wherein the upgrading instruction comprises address information of the FTP server.
S202: and acquiring the apk file of the APP from the FTP server according to the address information of the FTP server.
The APP upgrading method provided by the embodiment of the invention is applied to the APP installed in the mobile terminal, and the mobile terminal can be a mobile phone or a tablet computer and other equipment using an android system. The control device may be a mobile phone, a Personal Computer (PC), a server, or the like having a communication function.
Specifically, before upgrading the APP to be upgraded, a manager or a developer of the APP stores an apk file for upgrading the APP in the FTP server, and the address information of the FTP server is stored in the control device. In addition, the control device may further store an information table in which information of the mobile terminal that installs the APP is recorded, where the information table may be derived from a server corresponding to the APP, and the information table records identification information of the mobile terminal that installs the APP.
In order to upgrade the corresponding APP in at least one mobile terminal, the user may directly input the identification information of the mobile terminal that is controlled in the control device. In order to reduce the operation amount of the user and improve the user experience, the control device may further provide an interface for selecting the mobile terminal for each APP, where an information table corresponding to each APP is displayed in the interface, and the user may select an APP to be upgraded in the interface and select at least one mobile terminal in the information table corresponding to the APP. If the user selects at least one mobile terminal for upgrading an APP, the control equipment only sends an upgrading instruction to the mobile terminal selected by the user, wherein the upgrading instruction carries the identification information of the selected APP; and if the user does not select the mobile terminal for the APP, the control equipment sends an upgrading instruction to each mobile terminal in the information table corresponding to the APP by default.
The mobile terminal receives an upgrading instruction sent by the control equipment, identifies identification information of an APP (application) included in the upgrading instruction, and sends the upgrading instruction to the APP, after the APP receives the upgrading instruction, address information of an FTP (file transfer protocol) server included in the upgrading instruction is identified, a downloading request containing the identification information of the APP is sent to the FTP server through the mobile terminal where the APP is located, the FTP server receives the downloading request, and an apk file of the APP is sent to the mobile terminal where the APP is located, so that the APP can obtain the apk file.
S203: and upgrading the APP according to the apk file.
After the APP obtains the apk file for upgrading, the APP can be upgraded by installing the apk file. The process of upgrading an APP by using an apk file belongs to the prior art, and in the embodiment of the invention, the process is not described in detail.
In the embodiment of the invention, after receiving the upgrading instruction which is sent by the control equipment and comprises the address information of the FTP server, the APP to be upgraded acquires the apk file of the APP from the FTP server, and upgrades the APP according to the apk file, so that a user can send the upgrading instruction to the corresponding APP in the plurality of mobile terminals through the control equipment at the same time, and the corresponding APP in each mobile terminal is upgraded, thereby improving the upgrading efficiency of the APP and improving the user experience.
Example 3:
in order to facilitate a user to know an update result of the APP in time, on the basis of the above embodiment, in the embodiment of the present invention, the method further includes:
starting the APP and detecting whether the APP is successfully upgraded;
if not, sending an upgrade failure message containing the identification information of the mobile terminal where the control device is located to the control device.
Specifically, after the APP to be upgraded is upgraded according to the downloaded apk file, the APP is restarted, for example: the APP can be started through a starting command 'am start-n package name/Activity name' in the android system, wherein the package name is the package name of the apk file corresponding to the APP.
After the APP is started, the corresponding sub-process or thread of the APP is operated, if the sub-process or thread with the operation error does not exist, the upgrading of the APP is determined to be successful, otherwise, the upgrading of the APP is determined to be failed, and the upgrading failure message containing the identification information of the mobile terminal where the APP is located is sent to the control equipment through the mobile terminal where the APP is located, so that the user can timely know the upgrading result of the APP through the control equipment. After a user learns that the APP installed in a certain mobile terminal fails to be upgraded through the control equipment, the upgrading instruction can be sent to the APP installed in the mobile terminal again through the control equipment, so that the APP in the mobile terminal is continuously upgraded, and the accuracy of upgrading the APP is guaranteed. In the embodiment of the present invention, detecting whether the APP has been successfully upgraded is performed in the prior art, and details thereof are not described again.
Example 4:
on the basis of the above embodiments, in the embodiment of the present invention, upgrading an APP according to an apk file includes:
acquiring the ROOT authority of the mobile terminal where the ROOT authority is located;
and covering and installing files corresponding to the APP in the mobile terminal by adopting the apk files.
The ROOT authority is one of system authorities, also called ROOT authority, in the android system, the ROOT authority corresponds to a super administrator account, and the account has high and high rights in the whole android system. And acquiring the ROOT authority, namely acquiring the highest authority of the android system, and performing operations such as searching, writing, deleting, modifying and the like on any file in the android system at this time.
In order to ensure that operations such as reading, writing, executing, deleting and the like can be performed on the apk file and the file corresponding to the APP when the APP is upgraded, the mobile terminal on which the APP for upgrading is installed in the embodiment of the invention has the ROOT permission. Specifically, the APP obtains the ROOT authority of the mobile terminal where the APP is located, and the files of the APP are installed in a covering mode according to the apk files.
Specifically, the APP acquires the ROOT authority of the mobile terminal where the APP is located by changing a su command of the user identity, and modifies the file authority of the apk into a 777 authority which can be read, written and executed after acquiring the ROOT authority.
After the ROOT authority is obtained, the apk file can be used for performing overlay installation on a file corresponding to the APP in the mobile terminal, specifically, the file corresponding to the APP is subjected to overlay installation according to the apk file through an overlay installation command 'pm install-r apk file name (with path)', wherein the 'apk file name' in the overlay installation command 'pm install-r apk file name (with path)' is the file name corresponding to the apk file, and the 'path' is the installation path of the file corresponding to the APP.
Example 5:
in order to ensure the reliability of APP update, on the basis of the foregoing embodiments, in the embodiment of the present invention, before obtaining the ROOT permission of the mobile terminal where the method is located, the method further includes:
the APP starts a preset subprocess or thread, and subsequent steps are carried out through the preset subprocess or thread.
In order to prevent that when an APP to be upgraded is upgraded, a process or a thread corresponding to the APP is terminated, which causes an upgrade failure, in an embodiment of the present invention, an independent JAR package is preset, that is, an independent sub-process or thread related to the APP is preset, the sub-process or thread may operate independently of the APP, and a relationship between the APP and the preset sub-process or thread is shown in fig. 3.
Specifically, before the ROOT authority of the mobile terminal where the APP is located is obtained, the APP starts a preset sub-process or thread, follow-up is carried out through the preset sub-process or thread, namely the ROOT authority of the mobile terminal where the APP is located is obtained through the preset sub-process or thread, the files corresponding to the APP in the mobile terminal are installed in a covering mode through the apk file, and the APP is started.
Fig. 4A, fig. 4B, and fig. 4C are schematic diagrams illustrating an upgrading process of an APP according to an embodiment of the present invention, after receiving an upgrading instruction sent by a control device, the APP downloads an apk file of the APP from an FTP server according to address information of the FTP server included in the upgrading instruction, through a mobile terminal where the APP is located, if the downloading is unsuccessful, the APP cannot be upgraded, the APP ends to operate, and if the downloading is successful, the APP ends to operate after calling an independent JAR packet, that is, after calling a preset sub-process or thread, the APP ends to operate.
The independent JAR packet executes a su command, obtains the ROOT authority of the mobile terminal where the independent JAR packet is located, executes a command chmod 777apk file name, modifies the authority of an apk file to 777, executes a command pm install-r apk file name (with a path), performs overlay installation on a file corresponding to the APP according to the apk file, executes a command am start-n packet name/Activity name, starts the upgraded APP, and finishes the operation of the independent JAR packet. And when the upgraded APP is started, whether the self upgrading installation is successful is detected, and the upgrading installation result is fed back to a control console on the control equipment through the mobile terminal where the self is located.
Example 6:
in order to ensure that whether the APP is upgraded successfully is fed back to the control device in time, before the files corresponding to the APP in the mobile terminal are installed in a covering manner by adopting the apk file through a preset sub-process or thread, the method further comprises the following steps:
enabling a preset starting agent program by a preset subprocess or thread;
starting the APP, and detecting whether the APP is successfully upgraded comprises the following steps:
after the preset starting agent program is started for a set time length, the APP is started, and whether the APP is upgraded successfully is detected.
Because the android system is an open-source system, different android systems have different process management characteristics, and the process management function corresponding to part of the android systems can forcibly terminate the sub-process or sub-thread related to the APP when the application program of the APP is terminated. In order to ensure that whether the APP is successfully upgraded is timely fed back to the control device, in the embodiment of the present invention, as shown in fig. 5, a start agent may also be preset. Specifically, after the APP acquires the apk file of the APP from the FTP server, a preset sub-process or thread is started, after the preset sub-process or thread acquires the ROOT authority of the mobile terminal where the APP is located, a preset starting agent program is started, and the file corresponding to the APP in the mobile terminal is installed in a covering mode according to the apk file. After the preset starting agent program is started for a set time length, the upgraded APP is started, and when the upgraded APP is started, whether the APP is upgraded successfully or not is detected.
Fig. 6A, fig. 6B, fig. 6C, and fig. 6D are schematic diagrams illustrating an upgrading process of an APP according to an embodiment of the present invention, after the APP receives an upgrading instruction sent by a control device, according to address information of an FTP server included in the upgrading instruction, an apk file of the APP is downloaded from the FTP server through a mobile terminal where the APP is located, if the downloading is unsuccessful, the APP cannot be upgraded, the APP ends to run, and if the downloading is successful, the APP ends to run after an independent JAR packet is called, that is, after a preset sub-process or thread is called, the APP ends to run.
The independent JAR packet executes a su command, obtains the ROOT authority of the mobile terminal where the independent JAR packet is located, executes a chmod 777apk file name, modifies the authority of an apk file to 777, executes an am start-n packet name/Activity name, starts a proxy starting program, executes a pm install-r apk file name (with a path), performs overlay installation on a file corresponding to the APP according to the apk file, and finishes the operation of the independent JAR packet.
The agent starting program is delayed for a certain time, namely after the agent starting program is started for a set time length by itself and waits for finishing the covering installation of the APP, the command 'am start-n package name/Activity name' is executed, the upgraded APP is started, and the agent starting program finishes the operation. The upgraded APP detects whether self upgrading installation is successful when the APP is started, and an upgrading installation result is fed back to a control console on the control equipment through the mobile terminal where the APP is located.
Example 7:
fig. 7 is a schematic structural diagram of an APP upgrading device provided in an embodiment of the present invention, where the APP upgrading device includes:
the receiving module 71 is configured to receive an upgrade instruction sent by the control device, where the upgrade instruction includes address information of a text transfer protocol FTP server;
an obtaining module 72, configured to obtain an android installation package apk file of the APP from the FTP server according to the address information of the FTP server;
and the upgrading module 73 is used for upgrading the APP according to the apk file.
The device further comprises:
a detection module 74, configured to start the APP and detect whether the APP is successfully updated; and if not, sending an upgrading failure message containing the identification information of the mobile terminal where the control device is located to the control device.
The upgrading module 73 is specifically configured to obtain a ROOT right of the mobile terminal where the upgrading module is located; and covering and installing the file corresponding to the APP in the mobile terminal by adopting the apk file.
The device further comprises:
and the starting module 75 is used for starting a preset subprocess or thread by the APP and triggering the upgrading module.
The starting module 75 is further configured to start a preset starting agent by the preset subprocess or thread;
the detection module 74 is specifically configured to start the APP after the preset start agent is started for a set duration, and detect whether the APP is upgraded successfully.
Example 8:
based on the same inventive concept, the embodiment of the present invention further provides an electronic device, and as the principle of the electronic device for solving the problem is similar to the method for upgrading the APP, the implementation of the electronic device may refer to the implementation of the method, and repeated details are not repeated.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where in fig. 8, the bus architecture may include any number of interconnected buses and bridges, and specifically, one or more processors 81 represented by a processor 81 and various circuits of a memory 83 represented by a memory 83 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. The bus interface provides an interface. The transceiver 82 may be a number of elements, including a transmitter and a transceiver, providing a means for communicating with various other apparatus over a transmission medium. The processor 81 is responsible for managing the bus architecture and general processing, and the memory 83 may store data used by the processor 81 in performing operations.
In the electronic device provided in the embodiment of the present invention:
the processor 81 is configured to read a program in the memory 83, and execute the following processes: running an APP to be upgraded, and receiving an upgrade instruction sent by control equipment through a transceiver 82, wherein the upgrade instruction comprises address information of a text transfer protocol (FTP) server; acquiring an android installation package apk file of the APP from the FTP server according to the address information of the FTP server; and upgrading the APP according to the apk file.
Preferably, the processor 81 is further configured to start the APP, and detect whether the APP is successfully upgraded; if not, sending an upgrade failure message containing the identification information of the mobile terminal where the mobile terminal is located to the control equipment through the transceiver 82.
Preferably, the processor 81 is specifically configured to obtain a ROOT right of the mobile terminal where the processor is located; and covering and installing the file corresponding to the APP in the mobile terminal by adopting the apk file.
Preferably, the processor 81 is further configured to run the APP to start a preset subprocess or thread, and perform a subsequent step of obtaining a ROOT permission of the mobile terminal where the processor is located through the preset subprocess or thread.
Preferably, the processor 81 is further configured to run a preset subprocess or thread to start a preset start agent, start the APP after the preset start agent is started for a set time, and detect whether the APP is upgraded successfully.
Example 9:
on the basis of the foregoing embodiments, an embodiment of the present invention further provides an electronic device, as shown in fig. 9, including: the system comprises a processor 91, a communication interface 92, a memory 93 and a communication bus 94, wherein the processor 91, the communication interface 92 and the memory 93 are communicated with each other through the communication bus 94;
the memory 93 has stored therein a computer program which, when executed by the processor 91, causes the processor 91 to perform the steps of:
the method comprises the steps that an APP to be upgraded receives an upgrading instruction sent by control equipment, wherein the upgrading instruction comprises address information of a text transfer protocol (FTP) server;
acquiring an android installation package apk file of the APP from the FTP server according to the address information of the FTP server;
and upgrading the APP according to the apk file.
Example 10:
on the basis of the foregoing embodiments, an embodiment of the present invention further provides a computer storage readable storage medium, in which a computer program executable by an electronic device is stored, and when the program is run on the electronic device, the electronic device is caused to execute the following steps:
the method comprises the steps that an APP to be upgraded receives an upgrading instruction sent by control equipment, wherein the upgrading instruction comprises address information of a text transfer protocol (FTP) server;
acquiring an android installation package apk file of the APP from the FTP server according to the address information of the FTP server;
and upgrading the APP according to the apk file.
The invention discloses an APP upgrading method, device, system, electronic equipment and storage medium, wherein the system comprises: the system comprises control equipment, an FTP server and at least one mobile terminal, wherein each mobile terminal is provided with an APP to be upgraded; the control device is configured to send an upgrade instruction to the at least one mobile terminal, where the upgrade instruction includes identification information of an APP to be upgraded and address information of the FTP server; the mobile terminal is used for receiving the upgrading instruction and sending the upgrading instruction to the APP of the identification information, the APP of the identification information acquires an android installation package apk file of the APP from the FTP server according to the address information of the FTP server, and the APP is upgraded according to the apk file. In the embodiment of the invention, the APP to be upgraded in the mobile terminal receives the upgrading instruction sent by the control equipment, the apk file of the APP is obtained from the FTP server according to the address information of the FTP server, and the APP is upgraded according to the apk file, so that a user can simultaneously send the upgrading instruction to a plurality of mobile terminals through the control equipment, and thus, the corresponding APP in each mobile terminal is upgraded, the upgrading efficiency of the APP is improved, and the user experience is improved.
For the system/apparatus embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference may be made to some descriptions of the method embodiments for relevant points.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (12)

1. An upgrading method for an application program APP, the method comprising:
the method comprises the steps that an APP to be upgraded receives an upgrading instruction sent by control equipment, wherein the upgrading instruction comprises address information of a text transfer protocol (FTP) server;
acquiring an android installation package apk file of the APP from the FTP server according to the address information of the FTP server;
upgrading the APP according to the apk file;
wherein the method further comprises:
starting the APP and detecting whether the APP is upgraded successfully;
if not, sending an upgrade failure message containing the identification information of the mobile terminal where the control equipment is located to the control equipment;
wherein, the starting the APP and detecting whether the APP is successfully upgraded comprise:
after the preset starting agent program is started for a set time length, the APP is started, whether the APP is upgraded successfully is detected, and the preset starting agent program is started by a preset sub-process or thread started by the APP.
2. The method of claim 1, wherein said upgrading said APP according to said apk file comprises:
acquiring the ROOT authority of the mobile terminal where the ROOT authority is located;
and covering and installing the file corresponding to the APP in the mobile terminal by adopting the apk file.
3. The method of claim 2, wherein before obtaining the ROOT right of the mobile terminal where the method is located, the method further comprises:
and the APP starts a preset subprocess or thread, and the follow-up steps are carried out through the preset subprocess or thread.
4. The method of claim 3, wherein before the overlay installation of the file corresponding to the APP in the mobile terminal by using the apk file through the preset sub-process or thread, the method further comprises:
and the preset subprocess or the thread starts a preset starting agent program.
5. An upgrade system for an application program (APP), the system comprising: the system comprises control equipment, a text transfer protocol (FTP) server and at least one mobile terminal, wherein each mobile terminal is provided with an APP to be upgraded; wherein,
the control device is used for sending an upgrading instruction to the at least one mobile terminal, wherein the upgrading instruction comprises identification information of an APP to be upgraded and address information of the FTP server;
the at least one mobile terminal is used for receiving the upgrading instruction, sending the upgrading instruction to the APP with the identification information, acquiring an android installation package apk file of the APP from the FTP server by the APP with the identification information according to the address information of the FTP server, and upgrading the APP according to the apk file;
wherein the mobile terminal is further configured to:
starting the APP and detecting whether the APP is upgraded successfully;
if not, sending an upgrade failure message containing the identification information of the mobile terminal where the control equipment is located to the control equipment;
wherein, the starting the APP and detecting whether the APP is successfully upgraded comprise:
after the preset starting agent program is started for a set time length, the APP is started, whether the APP is upgraded successfully is detected, and the preset starting agent program is started by a preset sub-process or thread started by the APP.
6. The system of claim 5, wherein the at least one mobile terminal is further configured to send an upgrade failure message to the control device, where the upgrade failure message is sent by the APP when the APP fails to be upgraded and is started after the APP is upgraded.
7. An apparatus for upgrading an application APP, the apparatus comprising:
the device comprises a receiving module, a processing module and a processing module, wherein the receiving module is used for receiving an upgrading instruction sent by control equipment by an APP to be upgraded, and the upgrading instruction comprises address information of a text transfer protocol (FTP) server;
the obtaining module is used for obtaining an android installation package apk file of the APP from the FTP server according to the address information of the FTP server;
the upgrading module is used for upgrading the APP according to the apk file;
wherein the apparatus further comprises:
the detection module starts the APP and detects whether the APP is successfully upgraded; if not, sending an upgrade failure message containing the identification information of the mobile terminal where the control equipment is located to the control equipment;
wherein, the starting the APP and detecting whether the APP is successfully upgraded comprise:
after the preset starting agent program is started for a set time length, the APP is started, whether the APP is upgraded successfully is detected, and the preset starting agent program is started by a preset sub-process or thread started by the APP.
8. An electronic device, comprising: a memory, a processor, and a transceiver;
the processor is used for reading the program in the memory and executing the following processes: the method comprises the steps that an APP to be upgraded is operated, and an upgrading instruction sent by control equipment is received through a transceiver, wherein the upgrading instruction comprises address information of a text transfer protocol (FTP) server; acquiring an android installation package apk file of the APP from the FTP server according to the address information of the FTP server; upgrading the APP according to the apk file;
the processor is further configured to start the APP and detect whether the APP is successfully upgraded; if not, sending an upgrade failure message containing the identification information of the mobile terminal where the control equipment is located to the control equipment through the transceiver;
the processor is further used for running a preset subprocess or thread to start a preset starting agent, and after the preset starting agent is started for a set time length, the APP is started to detect whether the APP is upgraded successfully.
9. The electronic device according to claim 8, wherein the processor is specifically configured to obtain a ROOT right of a mobile terminal where the processor is located; and covering and installing the file corresponding to the APP in the mobile terminal by adopting the apk file.
10. The electronic device of claim 9, wherein the processor is further configured to run the APP to start a preset sub-process or thread, and perform the subsequent step of obtaining the ROOT permission of the mobile terminal where the processor is located through the preset sub-process or thread.
11. An electronic device, comprising: the system comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
the memory has stored therein a computer program which, when executed by the processor, causes the processor to carry out the steps of the method of any of claims 1-4.
12. A computer-readable storage medium, having stored thereon a computer program executable by an electronic device, for causing the electronic device to perform the steps of the method of any one of claims 1-4, when the program is run on the electronic device.
CN201710786074.6A 2017-09-04 2017-09-04 APP upgrading method, device, system, electronic equipment and storage medium Active CN109428936B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710786074.6A CN109428936B (en) 2017-09-04 2017-09-04 APP upgrading method, device, system, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710786074.6A CN109428936B (en) 2017-09-04 2017-09-04 APP upgrading method, device, system, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109428936A CN109428936A (en) 2019-03-05
CN109428936B true CN109428936B (en) 2021-07-13

Family

ID=65513423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710786074.6A Active CN109428936B (en) 2017-09-04 2017-09-04 APP upgrading method, device, system, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109428936B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111158711A (en) * 2019-12-30 2020-05-15 北京讯鸟软件有限公司 Application program deployment method and device for multiple android system terminals
CN112083939A (en) * 2019-12-31 2020-12-15 蓝桥赛维科技(北京)有限公司 Batch upgrading method, device, system and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105745A (en) * 2006-07-14 2008-01-16 中兴通讯股份有限公司 Distributed type software system disposition method
CN102868558A (en) * 2012-09-17 2013-01-09 苏州迈科网络安全技术股份有限公司 Multi-device software upgrading method and multi-device software upgrading system
CN105323106A (en) * 2014-08-04 2016-02-10 中兴通讯股份有限公司 Software upgrade management method, equipment and system
CN106982445A (en) * 2016-01-19 2017-07-25 西安中兴新软件有限责任公司 A kind of transmission method, equipment and the system of abnormal information of upgrading

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10110434B2 (en) * 2015-12-01 2018-10-23 Cisco Technology, Inc. Cloud orchestrated cloud connector upgrades

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101105745A (en) * 2006-07-14 2008-01-16 中兴通讯股份有限公司 Distributed type software system disposition method
CN102868558A (en) * 2012-09-17 2013-01-09 苏州迈科网络安全技术股份有限公司 Multi-device software upgrading method and multi-device software upgrading system
CN105323106A (en) * 2014-08-04 2016-02-10 中兴通讯股份有限公司 Software upgrade management method, equipment and system
CN106982445A (en) * 2016-01-19 2017-07-25 西安中兴新软件有限责任公司 A kind of transmission method, equipment and the system of abnormal information of upgrading

Also Published As

Publication number Publication date
CN109428936A (en) 2019-03-05

Similar Documents

Publication Publication Date Title
CN102364891B (en) Method for upgrading software of embedded Ethernet equipment and embedded Ethernet equipment
US10002054B2 (en) Method and system for performing automatic system recovery
CN106325929B (en) Firmware upgrading method, firmware upgrading device, refrigerator and server
TWI533216B (en) Operating system updating method
US20140201726A1 (en) Updating firmware compatibility data
US9983790B2 (en) System management controller and method of configuration file backup and recovery
CN108874437B (en) Online cloud updating method for android application program
WO2021136200A1 (en) Bootloader loading method, storage medium, and embedded terminal
CN105468395A (en) Updating method, device and system
CN106020882A (en) Application upgrading method, intelligent terminal and upgrading system
CN109416629A (en) Firmware upgrade method, electronic equipment, camera system and unmanned vehicle
CN111104147A (en) BMC upgrading method, device, terminal and storage medium
CN109428936B (en) APP upgrading method, device, system, electronic equipment and storage medium
CN106791124B (en) Mobile terminal flashing method and device
CN114610355A (en) Upgrading method and device suitable for power chip control software
WO2018166322A1 (en) Repairing method and device for system partition
CN111782236A (en) System software upgrading method and device, storage medium and all-in-one machine equipment
CN111596964A (en) Method and device for realizing batch deployment of Windows systems based on wireless network
CN113535558A (en) Software version transmission method and device
CN106775881B (en) System upgrading method and device
CN113015156A (en) Mobile phone number batch binding changing method, terminal and computer readable storage medium
CN105867961A (en) System upgrading and degrading method and device
CN111913720A (en) Program deployment method and device
KR20140031208A (en) Systems and methods for modifying content of mobile communication devices
CN112527371B (en) Boot loader upgrading method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant