CN112395015A - Optimization method and device for accelerating startup based on Android system - Google Patents

Optimization method and device for accelerating startup based on Android system Download PDF

Info

Publication number
CN112395015A
CN112395015A CN202011292913.7A CN202011292913A CN112395015A CN 112395015 A CN112395015 A CN 112395015A CN 202011292913 A CN202011292913 A CN 202011292913A CN 112395015 A CN112395015 A CN 112395015A
Authority
CN
China
Prior art keywords
loading
optimization
preloading
starting
pull
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
Application number
CN202011292913.7A
Other languages
Chinese (zh)
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.)
Allwinner Technology Co Ltd
Original Assignee
Allwinner Technology Co Ltd
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 Allwinner Technology Co Ltd filed Critical Allwinner Technology Co Ltd
Priority to CN202011292913.7A priority Critical patent/CN112395015A/en
Publication of CN112395015A publication Critical patent/CN112395015A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses an optimization method and device for accelerating startup based on an Android system, wherein the method comprises the following steps: a preloading optimization step, namely judging whether the system is not a first-time flashing, adjusting a loading strategy flow of the Zygote according to a first judgment result, and starting system service after the Zygote loads preloading resources; a WIFI enabling optimization step, namely before the system is powered off, closing the WIFI function, and after the system service is started, starting the WIFI function; and UI loading optimization, namely judging whether the key lock and/or the pull-down status bar exist or not according to the service characteristics of the product, and cutting the system UI loading of the key lock and/or the pull-down status bar according to a second judgment result. The system Server is started in advance without waiting for Zygote to finish loading, the flow of starting the system UI loading is optimized by optimizing the moment of starting wifi, the starting time is shortened, and the starting process is accelerated.

Description

Optimization method and device for accelerating startup based on Android system
Technical Field
The invention relates to the technical field of Android system starting, in particular to an optimization method and device for accelerating starting based on an Android system.
Background
Along with the version iteration of Google, the Android system has more and more perfect functions, the logic added in the starting process is more and more complex, and when a user starts the computer and starts the computer in a cold mode, the starting time is longer and longer, so that the user experience is seriously influenced. Especially for vehicle-mounted and television box products, the demand for quick startup is more and more strong.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art. Therefore, the optimization method based on the Android system accelerated boot can improve the boot speed of the Android system.
The invention further provides an optimization device based on the accelerated starting of the Android system, which is provided with the optimization method based on the accelerated starting of the Android system.
The invention further provides a computer readable storage medium with the optimization method for accelerating starting based on the Android system.
According to the embodiment of the first aspect of the invention, the optimization method based on the accelerated starting of the Android system comprises the following steps: a preloading optimization step, namely judging whether the system is not a first-time flashing, adjusting a loading strategy flow of the Zygote according to a first judgment result, and starting system service after the Zygote loads preloading resources; a WIFI enabling optimization step, namely before the system is powered off, closing the WIFI function, and after the system service is started, starting the WIFI function; and UI loading optimization, namely judging whether a key lock and/or a pull-down status bar exist or not according to the service characteristics of the product, and cutting system UI loading of the key lock and/or the pull-down status bar according to a second judgment result.
The optimization method based on the Android system accelerated boot according to the embodiment of the invention at least has the following beneficial effects: the method comprises the steps of starting a SystemServer in advance without waiting for Zygote loading, optimizing the opportunity of starting WIFI, delaying the process of loading WIFI HAL, WIFI Driver, supplant and configurable chip in the starting stage, optimizing the process of starting system UI loading, and not starting or delaying the process of starting a key lock and the process of loading a pull-down status bar in the starting stage, so that the starting time is shortened, and the starting process is accelerated.
According to some embodiments of the invention, the preload optimization step comprises: if the system is bootstrapped for the first time, the first judgment result is that preloading optimization is forbidden, and the Zygote executes the original loading strategy process of the system; otherwise, the first judgment result is preloading optimization, and the system service is started after the Zygote loads the preloading resource.
According to some embodiments of the invention, the preload optimization step further comprises: and if the first judgment result is that the system service can be preloaded and optimized, loading a preloading class, preloading an application program hardware abstraction layer, preloading a display card driver and preloading a shader library through multiple threads while starting the system service.
According to some embodiments of the invention, the WIFI-enablement optimization step comprises: the system receives a SHUTDOWN instruction, closes the WIFI function by monitoring the ACTION _ SHUTDOWN broadcast and setting the WIFI enabled to false; after the system service is started, the ACTION _ LOCK is monitored, the WIFI function is started by setting the WIFI enabled to be true, and the related flow of the WIFI function is loaded.
According to some embodiments of the invention, the UI load optimization step comprises: if the key lock does not exist, the second judgment result is the cutting key lock, and the system UI loading of the key lock is not carried out; and if the pull-down status bar does not exist, the second judgment result is the cutting pull-down status bar, and the system UI loading of the pull-down status bar is not carried out.
According to some embodiments of the invention, the UI load optimization step further comprises: if the key lock exists, the second judgment result is that the key lock is loaded after being delayed, and system UI loading of the key lock is carried out after a desktop logs in; and if the pull-down status bar does not exist, the second judgment result is that the pull-down status bar is loaded later, and the system UI loading of the pull-down status bar is carried out after a desktop is logged in.
According to a second aspect of the present invention, an optimization device for accelerating booting based on an Android system includes: the preloading optimization module is used for judging whether the system is not bootstrapped for the first time, adjusting a loading strategy flow of the Zygote according to a first judgment result, and starting system service after the Zygote loads preloading resources; the WIFI enabling optimization module is used for closing the WIFI function before the system is powered off and then starting the WIFI function after the system service is started; and the UI loading optimization module is used for judging whether the key lock and/or the pull-down status bar exist or not according to the product service characteristics, and cutting the system UI loading of the key lock and/or the pull-down status bar according to a second judgment result.
The optimization device based on the Android system accelerated startup disclosed by the embodiment of the invention at least has the following beneficial effects: the method comprises the steps of starting a SystemServer in advance without waiting for Zygote loading, optimizing the opportunity of starting WIFI, delaying the process of loading WIFI HAL, WIFI Driver, supplant and configurable chip in the starting stage, optimizing the process of starting system UI loading, and not starting or delaying the process of starting a key lock and the process of loading a pull-down status bar in the starting stage, so that the starting time is shortened, and the starting process is accelerated.
A computer-readable storage medium according to an embodiment of the third aspect of the invention has stored thereon a computer program which, when executed by a processor, performs the method of the embodiment of the first aspect of the invention.
The computer-readable storage medium according to an embodiment of the present invention has at least the same advantageous effects as the embodiment of the first aspect of the present invention.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The above and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
FIG. 1 is a schematic flow chart of a method according to an embodiment of the present invention;
FIG. 2 is an original boot process of an Android system;
FIG. 3 is a flow chart illustrating pre-loading optimization in a method according to an embodiment of the present invention;
FIG. 4 is a block schematic diagram of an apparatus of an embodiment of the invention;
fig. 5 is a test result of the optimized start time of the Android system according to the embodiment of the present invention.
Reference numerals:
a preloading optimization module 100, a WIFI enabling optimization module 200, and a UI loading optimization module 300.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and more than, less than, more than, etc. are understood as excluding the present number, and more than, less than, etc. are understood as including the present number. If the first and second are described for the purpose of distinguishing technical features, they are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
Referring to fig. 1, a method of an embodiment of the present invention includes: a preloading optimization step, namely judging whether the system is not a first-time flashing, adjusting a loading strategy flow of the Zygote according to a first judgment result, and starting system service after the Zygote loads preloading resources; a WIFI enabling optimization step, namely before the system is powered off, closing the WIFI function, and after the system service is started, starting the WIFI function; and UI loading optimization, namely judging whether the key lock and/or the pull-down status bar exist or not according to the service characteristics of the product, and cutting the system UI loading of the key lock and/or the pull-down status bar according to a second judgment result.
The optimization method of the preloading optimization step is to reduce the loading amount and start the SystemServer in advance by adjusting the loading strategy of Zygote. Referring to fig. 2, it can be seen that the system service (SystemServer) must wait for the zygate to execute all the events in sequence before starting. In the embodiment of the invention, referring to fig. 3, except for the first time of system startup, the system service to be started is started only after Zygote finishes preloading resources, and the system service can be prepared in advance and enter into starting other services earlier. For non-essential preloaded items, include: the pre-loading class, the pre-loading application program hardware abstraction layer, the pre-loading display card drive and the pre-loading shader library are executed in parallel through multithreading and system service, so that the starting speed is accelerated, and the optimization effect is about 3s through testing.
In the embodiment of the invention, the WIFI enablement is optimized during startup. When an Android system running on the equipment receives a shutdown instruction, judging whether wifi is turned on or not; if the WIFI is in an open state, in the SHUTDOWN process, the wireless enabled is set to false firstly by monitoring the active _ SHUTDOWN broadcast, and the processes such as a hardware data extraction layer, a WIFI Driver, a suppernant, a configurable chip and the like related to the WIFI cannot be loaded when the next startup is carried out, and the loading is carried out when the load is low, so that the startup speed is accelerated. After the system service is started, namely after the ACTION _ LOCK is monitored, the WIFI enabled is set to true, at the moment, the flow related to the WIFI is delayed and loaded, and a user can immediately see that the WIFI is connected when entering a main interface. Through testing, the starting speed can be improved by about 2.5s by WIFI enabling optimization.
Referring to fig. 2, in an original booting process of an Android system, all system UIs are loaded into a desktop only after all system UIs are completely loaded. In the embodiment of the present invention, whether to load the key lock and pull down the menu bar is determined according to the product service characteristics, for example: the television box product does not need a screen locking function and a pull-down status bar, and the loading of the key lock and the pull-down menu bar is skipped in the loading process of the system UI, so that the time-consuming loading process of the key lock and the pull-down menu bar is omitted. If the product needs the key lock or the pull-down menu bar but has no strong real-time requirement, the loading of the key lock or the pull-down menu bar is delayed until the desktop is started, and then the product is loaded, so that the starting speed can be increased, and the starting speed can be increased by about 5s through testing.
The apparatus of the embodiment of the present invention, referring to fig. 4, includes: the preloading optimization module 100 is configured to determine whether the system is not a first-time flashing, adjust a loading policy flow of the zygate according to a first determination result, and start a system service after the zygate loads a preloading resource; the WIFI enabling optimization module 200 is used for closing the WIFI function before the system is powered off and then starting the WIFI function after the system service is started; and the UI loading optimization module 300 is configured to determine whether the key lock and/or the pull-down status bar exist according to the product service characteristics, and trim the system UI loading of the key lock and/or the pull-down status bar according to a second determination result.
According to the embodiment of the invention, the optimization effect on various Android systems is about 8-10.5 s, referring to fig. 5.
Although specific embodiments have been described herein, those of ordinary skill in the art will recognize that many other modifications or alternative embodiments are equally within the scope of this disclosure. For example, any of the functions and/or processing capabilities described in connection with a particular device or component may be performed by any other device or component. In addition, while various illustrative implementations and architectures have been described in accordance with embodiments of the present disclosure, those of ordinary skill in the art will recognize that many other modifications of the illustrative implementations and architectures described herein are also within the scope of the present disclosure.
Certain aspects of the present disclosure are described above with reference to block diagrams and flowchart illustrations of systems, methods, systems, and/or computer program products according to example embodiments. It will be understood that one or more blocks of the block diagrams and flowchart illustrations, and combinations of blocks in the block diagrams and flowchart illustrations, respectively, can be implemented by executing computer-executable program instructions. Also, according to some embodiments, some blocks of the block diagrams and flow diagrams may not necessarily be performed in the order shown, or may not necessarily be performed in their entirety. In addition, additional components and/or operations beyond those shown in the block diagrams and flow diagrams may be present in certain embodiments.
Accordingly, blocks of the block diagrams and flowchart illustrations support combinations of means for performing the specified functions, combinations of elements or steps for performing the specified functions and program instruction means for performing the specified functions. It will also be understood that each block of the block diagrams and flowchart illustrations, and combinations of blocks in the block diagrams and flowchart illustrations, can be implemented by special purpose hardware-based computer systems that perform the specified functions, elements or steps, or combinations of special purpose hardware and computer instructions.
Program modules, applications, etc. described herein may include one or more software components, including, for example, software objects, methods, data structures, etc. Each such software component may include computer-executable instructions that, in response to execution, cause at least a portion of the functionality described herein (e.g., one or more operations of the illustrative methods described herein) to be performed.
The software components may be encoded in any of a variety of programming languages. An illustrative programming language may be a low-level programming language, such as assembly language associated with a particular hardware architecture and/or operating system platform. Software components that include assembly language instructions may need to be converted by an assembler program into executable machine code prior to execution by a hardware architecture and/or platform. Another exemplary programming language may be a higher level programming language, which may be portable across a variety of architectures. Software components that include higher level programming languages may need to be converted to an intermediate representation by an interpreter or compiler before execution. Other examples of programming languages include, but are not limited to, a macro language, a shell or command language, a job control language, a scripting language, a database query or search language, or a report writing language. In one or more exemplary embodiments, a software component containing instructions of one of the above programming language examples may be executed directly by an operating system or other software component without first being converted to another form.
The software components may be stored as files or other data storage constructs. Software components of similar types or related functionality may be stored together, such as in a particular directory, folder, or library. Software components may be static (e.g., preset or fixed) or dynamic (e.g., created or modified at execution time).
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (8)

1. An optimization method for accelerating startup based on an Android system is characterized by comprising the following steps:
a preloading optimization step, namely judging whether the system is not a first-time flashing, adjusting a loading strategy flow of the Zygote according to a first judgment result, and starting system service after the Zygote loads preloading resources;
a WIFI enabling optimization step, namely before the system is powered off, closing the WIFI function, and after the system service is started, starting the WIFI function;
and UI loading optimization, namely judging whether a key lock and/or a pull-down status bar exist or not according to the service characteristics of the product, and cutting system UI loading of the key lock and/or the pull-down status bar according to a second judgment result.
2. The optimization method based on the Android system accelerated boot of claim 1, wherein the preloading optimization step comprises:
if the system is bootstrapped for the first time, the first judgment result is that preloading optimization is forbidden, and the Zygote executes the original loading strategy process of the system;
otherwise, the first judgment result is preloading optimization, and the system service is started after the Zygote loads the preloading resource.
3. The optimization method based on Android system accelerated boot of claim 2, wherein the preloading optimization step further comprises:
and if the first judgment result is that the system service can be preloaded and optimized, loading a preloading class, preloading an application program hardware abstraction layer, preloading a display card driver and preloading a shader library through multiple threads while starting the system service.
4. The optimization method based on Android system accelerated boot of claim 1, wherein the WIFI enabling optimization step comprises:
the system receives a SHUTDOWN instruction, closes the WIFI function by monitoring the ACTION _ SHUTDOWN broadcast and setting the WIFI enabled to false;
after the system service is started, the ACTION _ LOCK is monitored, the WIFI function is started by setting the WIFI enabled to be true, and the related flow of the WIFI function is loaded.
5. The optimization method based on the Android system accelerated boot of claim 1, wherein the UI loading optimization step comprises:
if the key lock does not exist, the second judgment result is the cutting key lock, and the system UI loading of the key lock is not carried out;
and if the pull-down status bar does not exist, the second judgment result is the cutting pull-down status bar, and the system UI loading of the pull-down status bar is not carried out.
6. The optimization method based on Android system accelerated boot of claim 5, wherein the UI loading optimization step further comprises:
if the key lock exists, the second judgment result is that the key lock is loaded after being delayed, and system UI loading of the key lock is carried out after a desktop logs in;
and if the pull-down status bar does not exist, the second judgment result is that the pull-down status bar is loaded later, and the system UI loading of the pull-down status bar is carried out after a desktop is logged in.
7. An optimization device based on accelerated boot of an Android system, using the method of any one of claims 1 to 6, comprising:
the preloading optimization module is used for judging whether the system is not bootstrapped for the first time, adjusting a loading strategy flow of the Zygote according to a first judgment result, and starting system service after the Zygote loads preloading resources;
the WIFI enabling optimization module is used for closing the WIFI function before the system is powered off and then starting the WIFI function after the system service is started;
and the UI loading optimization module is used for judging whether the key lock and/or the pull-down status bar exist or not according to the product service characteristics, and cutting the system UI loading of the key lock and/or the pull-down status bar according to a second judgment result.
8. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN202011292913.7A 2020-11-18 2020-11-18 Optimization method and device for accelerating startup based on Android system Pending CN112395015A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011292913.7A CN112395015A (en) 2020-11-18 2020-11-18 Optimization method and device for accelerating startup based on Android system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011292913.7A CN112395015A (en) 2020-11-18 2020-11-18 Optimization method and device for accelerating startup based on Android system

Publications (1)

Publication Number Publication Date
CN112395015A true CN112395015A (en) 2021-02-23

Family

ID=74607363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011292913.7A Pending CN112395015A (en) 2020-11-18 2020-11-18 Optimization method and device for accelerating startup based on Android system

Country Status (1)

Country Link
CN (1) CN112395015A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327652A (en) * 2021-12-24 2022-04-12 杭州荣旗科技有限公司 Rapid starting method based on Android industrial application

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114327652A (en) * 2021-12-24 2022-04-12 杭州荣旗科技有限公司 Rapid starting method based on Android industrial application
CN114327652B (en) * 2021-12-24 2023-11-10 杭州荣旗科技有限公司 Quick starting method based on Android industrial application

Similar Documents

Publication Publication Date Title
US8683440B2 (en) Performing dynamic software testing based on test result information retrieved in runtime using test result entity
US9009668B2 (en) Software testing using test entity
US8347296B2 (en) Priority control apparatus and priority control method
CN106843936B (en) Method for automatically deploying Web application environment
CN107368343B (en) Terminal starting method based on android system, terminal and storage medium
CN107291510B (en) Rapid starting method for Linux vehicle-mounted information system
US11714663B2 (en) Application environment that implements native code functionality in progressive web applications
CN103699398A (en) Terminal equipment and starting control method thereof
US20040107179A1 (en) Method and system for controlling software execution in an event-driven operating system environment
US20110113229A1 (en) Method for Shortening the Boot Time of a Computer System
TWI450090B (en) Method and system of changing a startup list of programs to determine whether computer system performance increases
CN106095439A (en) A kind of information processing method and electronic equipment
US20190303172A1 (en) Information processing apparatus, device assignment method, and computer readable medium
CN110750284B (en) Application quick starting method, terminal and computer readable storage medium
CN108563472B (en) Service plug-in loading method and device based on multi-open application
US20100037094A1 (en) Application Failure Recovery
US10915624B2 (en) Method and apparatus for determining behavior information corresponding to a dangerous file
CN112395015A (en) Optimization method and device for accelerating startup based on Android system
US9146757B1 (en) Dynamically loaded plug-ins to provide an integrated graphical user interface
CN111930429A (en) Method for quickly starting Android operating system and electronic equipment
CN115145605A (en) Vehicle-mounted application software upgrading method and system, electronic equipment and storage medium
US20030149967A1 (en) Information processing method and system
US9785560B2 (en) Scene-isolated internet application
CN108563320B (en) Processing method and processing system
CN111090458B (en) Gray release system and application release method based on gray release system

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