WO2021097683A1 - Android system starting method and apparatus, device, and storage medium - Google Patents

Android system starting method and apparatus, device, and storage medium Download PDF

Info

Publication number
WO2021097683A1
WO2021097683A1 PCT/CN2019/119522 CN2019119522W WO2021097683A1 WO 2021097683 A1 WO2021097683 A1 WO 2021097683A1 CN 2019119522 W CN2019119522 W CN 2019119522W WO 2021097683 A1 WO2021097683 A1 WO 2021097683A1
Authority
WO
WIPO (PCT)
Prior art keywords
service
init
java
loading
lazy
Prior art date
Application number
PCT/CN2019/119522
Other languages
French (fr)
Chinese (zh)
Inventor
王群峰
王孙黎
司磊
Original Assignee
深圳市大疆创新科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市大疆创新科技有限公司 filed Critical 深圳市大疆创新科技有限公司
Priority to CN201980040209.1A priority Critical patent/CN112313620A/en
Priority to PCT/CN2019/119522 priority patent/WO2021097683A1/en
Publication of WO2021097683A1 publication Critical patent/WO2021097683A1/en

Links

Images

Classifications

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

Definitions

  • This application relates to the technical field of operating systems, and in particular to a method, device, terminal device, photographing device, and storage medium for starting an Android system.
  • the Android system has the problem of slow booting. This problem is a common problem in devices using the Android system.
  • delayed loading application (APP, Application) technology (that is, the delayed start of APP that does not need to be started)
  • asynchronous loading framework that is, asynchronous loading of modules that are not dependent on each other in the framework layer
  • the delayed loading APP technology is not suitable for device software systems with only a few APPs (such as camera software systems), and the system startup optimization cannot be performed from a lower level; the asynchronous loading framework technology is limited by the number of CPUs.
  • this application provides a method, a device, a terminal device, a photographing device, and a storage medium for starting the Android system.
  • this application provides a method for starting an Android system.
  • the init service in the Android system includes a first init service and a second init service;
  • the java service of the Android system includes a first java service and a second init service.
  • Java service the method includes:
  • the kernel layer of the Android system After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
  • the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
  • this application provides a device for starting an Android system.
  • the init service in the Android system includes a first init service and a second init service;
  • the java service of the Android system includes a first java service and a second init service.
  • java service, the device includes: a memory and a processor;
  • the memory is used to store a computer program
  • the processor is used to execute the computer program and when executing the computer program, implement the following steps:
  • the kernel layer of the Android system After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
  • the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
  • this application provides a terminal device, the operating system of the terminal device includes an Android system, the init service in the Android system includes a first init service and a second init service; the java service of the Android system Including a first java service and a second java service, the terminal device includes a processor, and a memory connected to the processor, an input/output device, and a communication circuit;
  • the memory is used to store a computer program
  • the processor is used to execute the computer program and when executing the computer program, implement the following steps:
  • the kernel layer of the Android system After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
  • the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
  • the present application provides a photographing device, the operating system of the photographing device includes an Android system, the init service in the Android system includes a first init service and a second init service; the java service of the Android system Including a first java service and a second java service, the photographing device includes a processor and a memory;
  • the memory is used to store a computer program
  • the processor is used to execute the computer program and when executing the computer program, implement the following steps:
  • the kernel layer of the Android system After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
  • the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
  • this application provides a computer-readable storage medium that stores a computer program that, when executed by a processor, causes the processor to start the Android system as described above Methods.
  • the embodiments of the application provide a method, device, terminal device, photographing device, and storage medium for starting an Android system.
  • the init service in the Android system includes a first init service and a second init service; the java service of the Android system includes the first init service. The java service and the second java service.
  • the kernel layer of the Android system is started, the first init service recorded by the first init script is parsed and loaded, where the first init service includes the java startup service; after the java startup service is loaded, Load the first java service; after loading the first java service, start the desktop launcher to complete the startup of the Android system; wherein, the second init service and the second java service can be loaded after the Android system is started.
  • the startup method of the embodiment of this application is from the lower layer (framework layer) (And local library/runtime) to optimize the startup of the system.
  • the startup process has nothing to do with the number of APPs in the device software system.
  • a customized Android system such as a camera
  • this application can achieve more prominent Startup optimization effect; the startup process has nothing to do with the number of CPUs, so it is not limited by the number of APPs, nor is it limited by the number of CPUs.
  • Figure 1 is a schematic diagram of an architecture-division method of the Android system
  • Figure 2 is a schematic diagram of the normal startup process of the Android system
  • Figure 3 is a schematic diagram of the scattered loading of init scripts in the normal startup process of the Android system
  • FIG. 4 is a schematic flowchart of an embodiment of a method for starting an Android system according to the present application
  • FIG. 5 is a schematic flowchart of another embodiment of the method for starting the Android system according to the present application.
  • FIG. 6 is a schematic flowchart of another embodiment of the method for starting the Android system according to the present application.
  • FIG. 7 is a schematic flowchart of another embodiment of the method for starting the Android system according to the present application.
  • FIG. 8 is a schematic flowchart of another embodiment of the method for starting the Android system according to the present application.
  • FIG. 9 is a schematic flowchart of another embodiment of the method for starting the Android system according to the present application.
  • FIG. 10 is a schematic structural diagram of an embodiment of a device for starting an Android system according to the present application.
  • Slow booting of Android system is a common problem of devices using Android system.
  • the methods that can speed up the startup speed of the Android system now include: delayed loading APP technology and asynchronous loading framework technology.
  • delayed-loading APP technology is not suitable for device software systems with only a small number of APPs, and the system startup optimization cannot be performed from the lower level; the asynchronous loading framework technology is limited by the number of CPUs.
  • FIG. 1 is a schematic diagram of an architecture-division method of the Android system.
  • the Android system is divided into 5 levels from top to bottom: application layer 1, framework layer 2, local library/runtime 3, hardware abstraction layer 4, and kernel layer 5.
  • Framework layer 2 and native library/runtime 3 are the core parts of the Android system, and every Android application developer develops applications on this basis.
  • Application layer 1 refers to various applications APP installed and running on the Android system, which is the part of the Android system directly facing users. It includes not only system applications such as calls, text messages, contacts, etc. (pre-installed on Android devices along with the Android system), but also other third-party applications that are subsequently installed on the device.
  • Framework layer 2 the application framework layer, is the core part of the Android system. It mainly consists of two parts: android SDK and Android system's Java service. The two interact with each other through the Binder communication mechanism.
  • Android SDK is used to provide various APIs (Application Programming Interface) that may be used to build applications. Some core applications that come with Android and applications built by developers are completed using these APIs to support applications
  • the operation of the program in layer 1; the Java service of the Android system refers to the relatively complete system service that the framework layer 2 of the Android system can provide to the application layer 1.
  • the Java service of the Android system includes the system service (usually relatively complete) that the framework layer 2 of the Android system can provide to the application layer 1 officially provided by the Android system.
  • Android Java services include: Activity Manager, Window Manager, Content Providers, View System, Notification Manager, Installation Package Management Service (Package Manager), Telephony Manager, Resource Manager, Location Manager, Power Management Service, Call Management Service, Wifi Management Service, Account Management Service, Status Bar Notification Management Service , Hardware services, etc. They have their own functions, for example: Activity Manager is used to manage the life cycle of the program, jump back and other functions; such as the resources required to open the application, and release the resources required when the application is exited. Window Manager is mainly used to manage all open window programs. Content Providers allow applications to access another application's data (such as a contact database) or share their data.
  • the View System can be used to build applications, including list view, grid view, text box, button, graphic drawing, etc., as well as embeddable web browsers.
  • the local library/runtime 3 includes the initial init service of the Android system, the basic runtime library required for system operation, and the ART virtual machine required for running Java programs.
  • the init service of the Android system refers to the service recorded in the relatively complete init script (that is, the *.rc configuration file) that the Android system can provide.
  • the init service of the Android system includes the services recorded in the init script (that is, the *.rc configuration file, which is usually relatively complete) that the official Android system can provide.
  • the init service of Android system includes: core service (including: ueventd, logd, healthd, adbd (disabled), lmkd (LowMemoryKiller), servicemanager, vold, debuggerd, surfaceflinger, bootanim (disabled), etc.), main service, zygote service, etc.
  • core service including: ueventd, logd, healthd, adbd (disabled), lmkd (LowMemoryKiller), servicemanager, vold, debuggerd, surfaceflinger, bootanim (disabled), etc.
  • main service including: ueventd, logd, healthd, adbd (disabled), lmkd (LowMemoryKiller), servicemanager, vold, debuggerd, surfaceflinger, bootanim (disabled), etc.
  • main service including: ueventd, logd, healthd, adbd (disable
  • the hardware abstraction layer 4 mainly includes some user-level encapsulation of drivers, and provides a hardware abstraction layer interface that conforms to the Android specification. It is also considered to be the same layer as "local library/runtime 3" in some materials.
  • Kernel layer 5 contains a Linux kernel, which provides basic process management, memory management, process scheduling and other operating system functions.
  • the user interacts with the APP through touch screen, buttons, voice, etc., while the APP accesses the java service or init service through the android SDK of the framework layer 2, and the java service or init service continues through Binder or Socket or other methods Interact with the lower layer of the device, so as to realize the purpose of APP accessing system resources.
  • FIG. 2 is a schematic diagram of the normal startup process of the Android system.
  • the startup process of the Android system mainly involves three levels, which are in order of startup: local library/runtime, framework layer, and application layer.
  • the first process init is started first. It parses various init scripts (*.rc files) in the system and loads the init services recorded in these *.rc files.
  • incubation (zygote)
  • app_process64 an executable program
  • it will load the ART virtual machine and enter the java world. From then on, the system enters the framework layer and continues to boot.
  • app_process64 renames its own process to a zygote process, copies a copy of its own process, and executes the initialization process of the system server (SystemServer) process.
  • the zygote process itself waits for other processes to connect to determine whether to copy a new child process to execute the APP startup process.
  • the SystemServer process is the process where many java services run in the Android system. Many java services will be started in SystemServer, such as network service, telephone service, Bluetooth service, etc. These many java services and some init services jointly build the rich functions of the Android system.
  • the SystemServer process loads the java service, it will start the first APP of the application layer in the system, that is, the desktop launcher launcher. After the launcher starts the first activity, the entire Android system is started.
  • FIG. 3 is a schematic diagram of the scattered loading of init scripts in the normal startup process of the Android system.
  • the init process of the Android system is a very special process: it is the first process started in the system, and it is also the parent process of many system processes. As shown in the figure, during the startup phase of the init process, it will read multiple *.rc files such as /init.rc, /system/etc/init/*.rc, /vendor/etc/init/*.rc, and Load the init service recorded in these *.rc files.
  • the startup method of the embodiment of this application is from the lower layer (framework layer) (And local library/runtime) to optimize the startup of the system.
  • the startup process has nothing to do with the number of APPs in the device software system.
  • a customized Android system such as a camera
  • this application can achieve more prominent Start-up optimization effect; its startup process has nothing to do with the number of CPUs, so it is not limited by the number of APPs, nor is it limited by the number of CPUs.
  • the init service in the Android system includes a first init service and a second init service;
  • the java service of the Android system includes For the first java service and the second java service, during the startup process of the Android system, only the first init service in the init service and the first java service in the java service are loaded.
  • the method includes:
  • Step S101 After the kernel layer of the Android system is started up, the first init service recorded by the first init script is parsed and loaded, where the first init service includes a java startup service.
  • Step S102 After loading java to start the service, load the first java service.
  • Step S103 After the loading of the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
  • the embodiment of this application divides the init service in the Android system into two parts.
  • a part of the init service ie, the first init service
  • the corresponding script is the first init script
  • the other part of the init service ie, the first init service 2.
  • the init service is not loaded along with the Android system, and can be loaded after the Android system is started.
  • the embodiment of the application divides the java service in the Android system into two parts, one part of the java service (i.e. the first java service) is loaded together with the Android system, and the other part of the java service (i.e. the second java service) is not loaded together with the Android system. It can be loaded after the Android system is started.
  • the first init service includes the java startup service.
  • the java startup service is usually an init service called zygote.
  • the second init service and the second java service can be loaded after the Android system is started.
  • the Android system can automatically trigger the loading of the second init service and the second java service in idle time.
  • the Android system when the system detects that the new application is started, it triggers the second init service and the second java service that may need to be used to load the new application.
  • the instructions of the application program can be implemented in the following ways: develop an application program specifically, the application
  • the program may include buttons to trigger each of the second init service and the second java service, the number of buttons is equal to the total number of the second init service and the second java service, and each second init service or second java service corresponds to a button, When the user clicks the button, the corresponding second init service or second java service is triggered to load; or, the application may include a check box, and each check box corresponds to a second init service or second java service, and the user Multiple second init services and second java services can be selected at one time, so that multiple second init services and second java services can be loaded at one time, and so on.
  • the basis for dividing the init service into two parts and the basis for dividing the java service into two parts are determined by the developer, and the developer usually decides according to the requirements and functions of the specific application.
  • the init service and java service that are not needed by the developed application can be divided into the second init service and the second java service; and the init service and the java service that the developed application need to use are divided into the first init.
  • Service and the first java service for example, for a device that does not have a camera function, its Android system can divide the camera-related services into services that are not loaded with the Android system (ie, the second java service); for a camera that only takes pictures
  • the Android system of the device can classify the phone-related services into services that are not loaded along with the Android system (ie, the second java service).
  • the init service and java service that all applications need to use can be divided into the first init service and the first java service, and the init service and java service that are only used by some and specific applications can be divided into the first init service and the first java service. Divided into the second init service and the second java service; and so on.
  • activity management services can be used by all applications.
  • These java services are divided into the first java service loaded with the Android system, while the phone management service and view The system is only used by some and specific applications, and these java services are divided into second java services that are not loaded along with the Android system.
  • the init process is the first to start, and the init process is responsible for parsing and loading the first init service recorded by the first init script.
  • the developer can mark the second init script (the script corresponding to the second init service that is not loaded with the Android system) and mark it as LOCAL_LAZY_INIT_RC.
  • the init service recorded by the marked script is The second init service
  • the init service recorded by the unmarked first init script is the first init service, so that the second init script and the first init are combined at the machine level.
  • the scripts are distinguished. After the kernel layer of the Android system is started, the init process needs to be identified and distinguished, and only the first init service recorded by the first init script is parsed and loaded.
  • parsing and loading the first init service recorded by the first ini script may include: automatically parsing and loading the default path The first init service recorded by the first init script. That is, only the files corresponding to the first init script are stored in the default path that the init process can automatically parse and load, for example: store the *.rc file corresponding to the first init script in /init.rc, /system/etc/ At least one of the default paths in init/*.rc, /vendor/etc/init/*.rc, etc.
  • the file corresponding to the second ini script can be stored in a space other than the default path, or can be placed in a location where the second init service recorded by the second ini script can be parsed and loaded separately.
  • the second init service recorded by the second ini script stored in other places can be parsed and loaded through the init process, or parsed and loaded in other ways, for example, directly called and executed temporarily by the application.
  • the second init service recorded by the second ini script is parsed and loaded in other ways, which is usually difficult to ensure the security of the system.
  • the second init service recorded by the second ini script can be parsed and loaded through the init process to ensure the security of the system. Therefore,
  • the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
  • step S102 there are many implementation ways of loading the first java service, which usually need to be prepared in advance during the compilation phase.
  • the second java service is not loaded; or, a special java service is added, and the java service specifically manages the second java service that does not follow the startup and loading of the Android system; and so on.
  • app_process64 Under normal circumstances, java starts the service, that is, after the zygote service is loaded, it will start an executable program called app_process64. After app_process64 starts running, it will load the ART virtual machine and enter the java world. app_process64 renames its own process to a zygote process, copies its own process, and executes the initialization process of the SystemServer process.
  • the SystemServer process is the process where many java services run in the Android system.
  • the number of second init services in this embodiment of the application can be zero or the number of second java services can be zero, the sum of the number of second init services and the number of second java services is greater than zero, and the first The sum of the number of init services and the number of first java services is less than the sum of the number of init services and the number of java services in the Android system.
  • the init service in the Android system in the embodiment of the application includes a first init service and a second init service; the java service of the Android system includes a first java service and a second java service.
  • the kernel layer of the Android system is started, it is analyzed and combined.
  • Load the first init service recorded by the first init script where the first init service includes the java startup service; after the java startup service is loaded, the first java service is loaded; after the first java service is loaded, the desktop launcher is started, thereby The startup of the Android system is completed; wherein the second init service and the second java service can be loaded after the startup of the Android system is completed.
  • the startup method of the embodiment of this application is from the lower layer (framework layer) (And local library/runtime) to optimize the startup of the system.
  • the startup process has nothing to do with the number of APPs in the device software system.
  • a customized Android system such as a camera
  • this application can achieve more prominent Startup optimization effect; the startup process has nothing to do with the number of CPUs, so it is not limited by the number of APPs, nor is it limited by the number of CPUs.
  • the special java service is loaded following the startup of the Android system, and provides special services for the subsequent loading of the second init service and the second java service.
  • step S102 loading the first java service may specifically include: enabling the SystemServer process to load the first java service.
  • the first java service includes the lazy loading service manager and other first java services.
  • the java service, the second init service and the second java service can be loaded through the lazy loading service manager after the Android system is started.
  • the second init service and the second java service can be loaded through the lazy loading service manager after the Android system is started, in this way, on the one hand, it can ensure the security of the Android system, simplify the development steps, and ensure the Android system's security. Integrity provides support. On the other hand, it can also provide support for improving the loading speed of the second init service and the second java service when the second init service and the second java service need to be loaded.
  • step S102 enabling the SystemServer process to load the first java service may further include: sub-step S1021 and sub-step S1022.
  • Sub-step S1021 Make the SystemServer process load the lazy loading service manager.
  • Sub-step S1022 mark the java service that needs to be lazy loaded by the lazy loading service manager to obtain the marked second java service, mark the init service that needs to be lazy loaded, and obtain the marked second init service.
  • the second java service includes a java service that performs lazy loading
  • the second init service includes an init service that requires lazy loading.
  • the SystemServer process loads the first java service, it loads the newly added lazy loading service manager at the same time.
  • the lazy loading service manager After the lazy loading service manager is loaded, the lazy loading service manager will mark the java services that need to be lazy loaded and get the mark For the second java service, mark the init service that needs lazy loading to obtain the marked second init service. In this way, when the user needs to load, the second init service and the second java service required by the user can be loaded in time through the lazy loading service manager.
  • the following two situations illustrate the specific details of the user request to load the second java service and the second init service after the Android system has been started up.
  • the method further includes: step S201 and step S202.
  • Step S201 After the Android system is started, the first request for loading the specified java service is received through the lazy loading service manager.
  • the lazy loading service manager can communicate with the application program, and can communicate with the application program directly through the software development kit provided by the Android system. In this way, the development complexity can be reduced.
  • the first request comes from the application.
  • Step S202 According to the first request, load the specified java service.
  • the second java service marked above includes the correspondence between the lazy loading java service name and the loading code corresponding to the lazy loading java service name. In this way, when the first request is received, the specified java service can be quickly responded to and loaded quickly.
  • step S202 may specifically include: sub-step S2021 and sub-step S2022.
  • Sub-step S2021 According to the name of the specified java service carried in the first request, determine the corresponding lazy-loaded java service name and the loading code corresponding to the lazy-loaded java service name.
  • Sub-step S2022 Load the loading code corresponding to the lazy loading java service name.
  • the name of the specified java service carried in the first request is usually user-oriented, concise and intuitive
  • the lazy loading java service name is usually the name of the java service in the Android system that the machine can recognize. According to the established relationship between the name of the specified java service and the name of the lazy-loaded java service, and then according to the correspondence between the name of the lazy-loaded java service and the loading code corresponding to the lazy-loaded java service name, the specified java service can be quickly loaded .
  • the lazy loading service manager can communicate with the init process, in this way, it provides support for the init process to load the second init service.
  • the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process can load the second init initialization script among the parameters carried by the attributes of the ctrl.loadrc attribute interface.
  • a new attribute interface ctrl.loadrc is added to the init process in advance, and the lazy loading service manager sends the relevant parameters requesting to load the specified second init service to the attribute interface ctrl.loadrc, and the attribute interface ctrl.loadrc combines these
  • the relevant parameters are attached to the properties, and the init process can load the corresponding second init service according to the parameters carried by the properties of the ctrl.loadrc property interface.
  • the method further includes: step S301 and step S302.
  • Step S301 After the Android system is started, the second request for loading the specified init service is received through the lazy loading service manager.
  • the lazy loading service manager can communicate with the application program, and can communicate with the application program directly through the software development kit provided by the Android system. In this way, the development complexity can be reduced.
  • the second request comes from the application.
  • Step S302 According to the second request, the init process parses and loads the specified init service recorded by the corresponding second init script through the lazy loading service manager.
  • the second init service marked above includes the corresponding relationship between the lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; in this way, When receiving the second request, it can quickly respond to quickly load the specified init service.
  • step S302 may specifically include: sub-step S3021 and sub-step S3022.
  • Sub-step S3021 According to the name of the designated init service carried in the second request, determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script.
  • Sub-step S3022 using the lazy loading service manager to make the init process parse and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
  • the name of the specified init service carried in the second request is usually user-oriented, concise and intuitive
  • the lazy loading init service name is usually the name of the init service in the Android system that can be recognized by the machine.
  • the lazy-loaded init script corresponding to the lazy-loaded init service name according to the name of the lazy-loaded init service, the lazy-loaded init script corresponding to the lazy-loaded init service name, and the lazy-loaded path corresponding to the lazy-loaded init script
  • the corresponding relationship between the two you can quickly obtain the lazy loading path of the specified init service name, and send the lazy loading path (parameter) of the specified init service name to the attribute interface ctrl.loadrc, and the attribute interface ctrl.loadrc will specify the init service
  • the lazy loading path of the name is carried as an attribute, and the init process can quickly resolve and load the lazy loading init service recorded by the corresponding lazy loading init script according to the lazy loading path.
  • a faster system startup speed can be obtained without compromising the integrity of the android system, specifically: on the reference development board hikey960, based on the A53 1.8GHz ⁇ 3 processor configuration, through the network After the service and Wifi service (network/wifi) related framework layer services are delayed to start, the start time is reduced from 4.6s to 4.4s.
  • FIG. 10 is a schematic structural diagram of an embodiment of the device for starting the Android system of the present application. It should be noted that the device of this embodiment can implement the above method for starting the Android system. For a detailed description of related content, please refer to the above-mentioned Android system. The method of system startup will not be repeated here.
  • the init service in the Android system includes the first init service and the second init service; the java service of the Android system includes the first java service and the second java service.
  • the device 10 started by the Android system includes: a memory 11 and a processor 12; and a memory 11 And the processor 12 is connected through a bus 13.
  • the processor 12 may be a micro control unit, a central processing unit, or a digital signal processor, and so on.
  • the memory 11 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a U disk or a mobile hard disk, etc.
  • the memory 11 is used to store a computer program; the processor 12 is used to execute the computer program and when the computer program is executed, the following steps are implemented:
  • the first init service recorded by the first init script is parsed and loaded, where the first init service includes the java startup service; after the java startup service is loaded, the first java service is loaded; After the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein, the second init service and the second java service can be loaded after the Android system is started.
  • the processor when the processor executes the computer program, it implements the following steps: automatically parse and load the first init service recorded by the first init script in the default path.
  • the file corresponding to the second init script of the second init service is placed in the non-default path.
  • the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
  • the SystemServer process loads the first java service
  • the first java service includes the lazy loading service manager and other first java services
  • the second init service and the second java service can After the Android system is started, it is loaded through the lazy loading service manager.
  • the processor executes the computer program, the following steps are implemented: make the SystemServer process load the lazy-loading service manager; mark the java services that need to be lazy-loaded through the lazy-loading service manager, and get the marked second java service.
  • the init service that needs to be lazy loaded is marked, and the marked second init service is obtained.
  • the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a first request for loading a specified java service through the lazy loading service manager; according to the first request, loads the specified java service.
  • the marked second java service includes the corresponding relationship between the lazy loading java service name and the loading code corresponding to the lazy loading java service name; when the processor executes the computer program, the following steps are implemented: according to the specification carried in the first request For the name of the java service, determine the corresponding lazy-loaded java service name and the load code corresponding to the lazy-loaded java service name; load the load code corresponding to the lazy-loaded java service name.
  • the lazy loading service manager can communicate with the init process.
  • the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a second request to load the specified init service through the lazy loading service manager; according to the second request, the init process is made through the lazy loading service manager Parse and load the specified init service recorded by the corresponding second init script.
  • the marked second init service includes the correspondence between the lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; when the processor executes the computer program, The following steps are implemented: according to the name of the specified init service carried in the second request, determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; The loading service manager enables the init process to parse and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
  • the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process can load the second init initialization script among the parameters carried by the attributes of the ctrl.loadrc attribute interface.
  • the lazy loading service manager can communicate with the application.
  • the first request or the second request comes from the application.
  • the lazy loading service manager can communicate with the application through the software development kit.
  • This application also provides a terminal device, the operating system of the terminal device includes the Android system, and the terminal device can implement the above-mentioned Android system startup method.
  • the terminal devices in the embodiments of the present application include, but are not limited to: digital cameras, mobile devices, smart terminals, and so on.
  • the init service in the Android system includes a first init service and a second init service;
  • the java service of the Android system includes a first java service and a second java service.
  • the terminal device includes a processor, a memory connected to the processor, and an input Output device and communication circuit; the memory is used to store the computer program; the processor is used to execute the computer program and when the computer program is executed, the following steps are implemented:
  • the first init service recorded by the first init script is parsed and loaded, where the first init service includes the java startup service; after the java startup service is loaded, the first java service is loaded; After the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein, the second init service and the second java service can be loaded after the Android system is started.
  • the input and output devices include a display screen, a keyboard, a USB interface, a headphone interface, a camera, a speaker, and a receiver.
  • the processor when the processor executes the computer program, it implements the following steps: automatically parse and load the first init service recorded by the first init script in the default path.
  • the file corresponding to the second init script of the second init service is placed in the non-default path.
  • the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
  • the SystemServer process loads the first java service
  • the first java service includes the lazy loading service manager and other first java services
  • the second init service and the second java service can After the Android system is started, it is loaded through the lazy loading service manager.
  • the processor executes the computer program, the following steps are implemented: make the SystemServer process load the lazy-loading service manager; mark the java services that need to be lazy-loaded through the lazy-loading service manager, and get the marked second java service.
  • the init service that needs to be lazy loaded is marked, and the marked second init service is obtained.
  • the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a first request for loading a specified java service through the lazy loading service manager; according to the first request, loads the specified java service.
  • the marked second java service includes the corresponding relationship between the lazy loading java service name and the loading code corresponding to the lazy loading java service name; when the processor executes the computer program, the following steps are implemented: according to the specification carried in the first request For the name of the java service, determine the corresponding lazy-loaded java service name and the load code corresponding to the lazy-loaded java service name; load the load code corresponding to the lazy-loaded java service name.
  • the lazy loading service manager can communicate with the init process.
  • the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a second request to load the specified init service through the lazy loading service manager; according to the second request, the init process is made through the lazy loading service manager Parse and load the specified init service recorded by the corresponding second init script.
  • the marked second init service includes the correspondence between the lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; when the processor executes the computer program, The following steps are implemented: according to the name of the specified init service carried in the second request, determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; The loading service manager enables the init process to parse and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
  • the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process can load the second init initialization script among the parameters carried by the attributes of the ctrl.loadrc attribute interface.
  • the lazy loading service manager can communicate with the application.
  • the first request or the second request comes from the application.
  • the lazy loading service manager can communicate with the application through the software development kit.
  • This application also provides a photographing device, the operating system of the photographing device includes the Android system, and the terminal device can implement the above-mentioned method for starting the Android system.
  • the terminal device can implement the above-mentioned method for starting the Android system.
  • the init service in the Android system includes a first init service and a second init service; the java service of the Android system includes a first java service and a second java service.
  • the camera includes a processor and a memory; the memory is used to store computer programs ; The processor is used to execute the computer program and when the computer program is executed, the following steps are implemented:
  • the first init service recorded by the first init script is parsed and loaded, where the first init service includes the java startup service; after the java startup service is loaded, the first java service is loaded; After the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein, the second init service and the second java service can be loaded after the Android system is started.
  • the processor when the processor executes the computer program, it implements the following steps: automatically parse and load the first init service recorded by the first init script in the default path.
  • the file corresponding to the second init script of the second init service is placed in the non-default path.
  • the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
  • the SystemServer process loads the first java service
  • the first java service includes the lazy loading service manager and other first java services
  • the second init service and the second java service can After the Android system is started, it is loaded through the lazy loading service manager.
  • the processor executes the computer program, the following steps are implemented: make the SystemServer process load the lazy-loading service manager; mark the java services that need to be lazy-loaded through the lazy-loading service manager, and get the marked second java service.
  • the init service that needs to be lazy loaded is marked, and the marked second init service is obtained.
  • the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a first request for loading a specified java service through the lazy loading service manager; according to the first request, loads the specified java service.
  • the marked second java service includes the corresponding relationship between the lazy loading java service name and the loading code corresponding to the lazy loading java service name; when the processor executes the computer program, the following steps are implemented: according to the specification carried in the first request For the name of the java service, determine the corresponding lazy-loaded java service name and the load code corresponding to the lazy-loaded java service name; load the load code corresponding to the lazy-loaded java service name.
  • the lazy loading service manager can communicate with the init process.
  • the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a second request to load the specified init service through the lazy loading service manager; according to the second request, the init process is made through the lazy loading service manager Parse and load the specified init service recorded by the corresponding second init script.
  • the marked second init service includes the correspondence between the lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; when the processor executes the computer program, The following steps are implemented: according to the name of the specified init service carried in the second request, determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; The loading service manager enables the init process to parse and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
  • the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process can load the second init initialization script among the parameters carried by the attributes of the ctrl.loadrc attribute interface.
  • the lazy loading service manager can communicate with the application.
  • the first request or the second request comes from the application.
  • the lazy loading service manager can communicate with the application through the software development kit.
  • the present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the processor realizes the method for starting the Android system as described above.
  • the processor realizes the method for starting the Android system as described above.
  • the computer-readable storage medium may be an internal storage unit of any of the above-mentioned devices or equipment, such as the hard disk or memory of the device or equipment.
  • the computer-readable storage medium may also be an external storage device of the device or the device, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. equipped on the device or the device.

Abstract

An Android system starting method and apparatus, a terminal device, a photographing apparatus, and a storage medium. The method comprises: after starting of a kernel layer of an Android system is completed, parsing and loading a first init service of a first init script log, the first init service comprising a java starting service (S101); after the java starting service is loaded, loading a first java service (S102); and after the loading of the first java service is completed, starting a desktop launcher to complete starting of the Android system, a second init service and a second java service being loaded after the starting of the Android system is completed (S103).

Description

安卓系统启动的方法、装置、设备及存储介质Method, device, equipment and storage medium for starting Android system 技术领域Technical field
本申请涉及操作系统技术领域,尤其涉及一种安卓系统启动的方法、装置、终端设备、拍摄装置及存储介质。This application relates to the technical field of operating systems, and in particular to a method, device, terminal device, photographing device, and storage medium for starting an Android system.
背景技术Background technique
安卓(Android)系统具有开机慢的问题。该问题在使用Android系统的设备中是常见问题。The Android system has the problem of slow booting. This problem is a common problem in devices using the Android system.
现在已经有一些相近的技术可以加快Android系统启动速度。例如:延迟加载应用程序(APP,Application)技术(即将不必开机启动的APP延迟启动),异步加载框架(即将框架层中相互无依赖关系的模块异步加载)技术。There are already some similar technologies that can speed up the startup speed of the Android system. For example: delayed loading application (APP, Application) technology (that is, the delayed start of APP that does not need to be started), asynchronous loading framework (that is, asynchronous loading of modules that are not dependent on each other in the framework layer) technology.
但是,延迟加载APP技术不适用于只具备极少数APP的设备软件系统(例如相机软件系统),无法从更底层对系统进行启动优化;异步加载框架技术受限于CPU个数。However, the delayed loading APP technology is not suitable for device software systems with only a few APPs (such as camera software systems), and the system startup optimization cannot be performed from a lower level; the asynchronous loading framework technology is limited by the number of CPUs.
发明内容Summary of the invention
基于此,本申请提供一种安卓系统启动的方法、装置、终端设备、拍摄装置及存储介质。Based on this, this application provides a method, a device, a terminal device, a photographing device, and a storage medium for starting the Android system.
第一方面,本申请提供了一种安卓系统启动的方法,所述安卓系统中的init服务包括第一init服务和第二init服务;所述安卓系统的java服务包括第一java服务和第二java服务,所述方法包括:In the first aspect, this application provides a method for starting an Android system. The init service in the Android system includes a first init service and a second init service; the java service of the Android system includes a first java service and a second init service. Java service, the method includes:
所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中所述第一init服务包括java启动服务;After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
在加载所述java启动服务后,加载第一java服务;After loading the java startup service, load the first java service;
在加载第一java服务完成后,启动桌面启动器,从而完成所述安卓系统 的启动;其中,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后被加载。After the loading of the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
第二方面,本申请提供了一种安卓系统启动的装置,所述安卓系统中的init服务包括第一init服务和第二init服务;所述安卓系统的java服务包括第一java服务和第二java服务,所述装置包括:存储器和处理器;In a second aspect, this application provides a device for starting an Android system. The init service in the Android system includes a first init service and a second init service; the java service of the Android system includes a first java service and a second init service. java service, the device includes: a memory and a processor;
所述存储器用于存储计算机程序;The memory is used to store a computer program;
所述处理器用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is used to execute the computer program and when executing the computer program, implement the following steps:
所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中所述第一init服务包括java启动服务;After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
在加载所述java启动服务后,加载第一java服务;After loading the java startup service, load the first java service;
在加载第一java服务完成后,启动桌面启动器,从而完成所述安卓系统的启动;其中,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后被加载。After the loading of the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
第三方面,本申请提供了一种终端设备,所述终端设备的操作系统包括安卓系统,所述安卓系统中的init服务包括第一init服务和第二init服务;所述安卓系统的java服务包括第一java服务和第二java服务,所述终端设备包括:处理器、和与所述处理器连接的存储器、输入输出设备及通信电路;In a third aspect, this application provides a terminal device, the operating system of the terminal device includes an Android system, the init service in the Android system includes a first init service and a second init service; the java service of the Android system Including a first java service and a second java service, the terminal device includes a processor, and a memory connected to the processor, an input/output device, and a communication circuit;
所述存储器用于存储计算机程序;The memory is used to store a computer program;
所述处理器用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is used to execute the computer program and when executing the computer program, implement the following steps:
所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中所述第一init服务包括java启动服务;After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
在加载所述java启动服务后,加载第一java服务;After loading the java startup service, load the first java service;
在加载第一java服务完成后,启动桌面启动器,从而完成所述安卓系统的启动;其中,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后被加载。After the loading of the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
第四方面,本申请提供了一种拍摄装置,所述拍摄装置的操作系统包括安卓系统,所述安卓系统中的init服务包括第一init服务和第二init服务;所述 安卓系统的java服务包括第一java服务和第二java服务,所述拍摄装置包括:处理器、和存储器;In a fourth aspect, the present application provides a photographing device, the operating system of the photographing device includes an Android system, the init service in the Android system includes a first init service and a second init service; the java service of the Android system Including a first java service and a second java service, the photographing device includes a processor and a memory;
所述存储器用于存储计算机程序;The memory is used to store a computer program;
所述处理器用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is used to execute the computer program and when executing the computer program, implement the following steps:
所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中所述第一init服务包括java启动服务;After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
在加载所述java启动服务后,加载第一java服务;After loading the java startup service, load the first java service;
在加载第一java服务完成后,启动桌面启动器,从而完成所述安卓系统的启动;其中,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后被加载。After the loading of the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
第五方面,本申请提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如上所述的安卓系统启动的方法。In a fifth aspect, this application provides a computer-readable storage medium that stores a computer program that, when executed by a processor, causes the processor to start the Android system as described above Methods.
本申请实施例提供了一种安卓系统启动的方法、装置、终端设备、拍摄装置及存储介质,安卓系统中的init服务包括第一init服务和第二init服务;安卓系统的java服务包括第一java服务和第二java服务,所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中第一init服务包括java启动服务;在加载java启动服务后,加载第一java服务;在加载第一java服务完成后,启动桌面启动器,从而完成所述安卓系统的启动;其中,第二init服务和第二java服务能够在安卓系统启动完成后被加载。相比较于安卓系统的正常启动流程,由于本申请实施例的安卓系统启动时,仅加载init服务中的第一init服务和java服务中的第一java服务,并没有加载全部的init服务和java服务,在加载第一java服务完成后启动桌面启动器,即完成安卓系统的启动,通过这种方式,能够大幅度加快安卓系统的启动速度,同时没有增加系统启动阶段内的进程/线程切换开销;由于另一部分第二init服务和第二java服务能够在安卓系统启动完成后被加载,通过这种方式,能够保障安卓系统的完整性;本申请实施例的启动方法是从更底层(框架层和本地库/运行时)对系统进行启动优化,其启动过程与设备软件系统具有的APP数量没 有关系,特别是对仅包含少量APP的定制安卓系统(例如相机),本申请能够达到更加突出的启动优化效果;其启动过程与CPU个数没有关系,因此不受APP数量的限制,也不受限于CPU个数。The embodiments of the application provide a method, device, terminal device, photographing device, and storage medium for starting an Android system. The init service in the Android system includes a first init service and a second init service; the java service of the Android system includes the first init service. The java service and the second java service. After the kernel layer of the Android system is started, the first init service recorded by the first init script is parsed and loaded, where the first init service includes the java startup service; after the java startup service is loaded, Load the first java service; after loading the first java service, start the desktop launcher to complete the startup of the Android system; wherein, the second init service and the second java service can be loaded after the Android system is started. Compared with the normal startup process of the Android system, when the Android system in the embodiment of the present application starts, only the first init service in the init service and the first java service in the java service are loaded, but not all the init services and java are loaded. Service, start the desktop launcher after loading the first java service to complete the startup of the Android system. In this way, the startup speed of the Android system can be greatly accelerated without increasing the process/thread switching overhead during the system startup phase. ; Because another part of the second init service and the second java service can be loaded after the Android system is started, in this way, the integrity of the Android system can be guaranteed; the startup method of the embodiment of this application is from the lower layer (framework layer) (And local library/runtime) to optimize the startup of the system. The startup process has nothing to do with the number of APPs in the device software system. Especially for a customized Android system (such as a camera) that contains only a small number of APPs, this application can achieve more prominent Startup optimization effect; the startup process has nothing to do with the number of CPUs, so it is not limited by the number of APPs, nor is it limited by the number of CPUs.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the application.
附图说明Description of the drawings
为了更清楚地说明本申请实施例技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present application more clearly, the following will briefly introduce the drawings used in the description of the embodiments. Obviously, the drawings in the following description are some embodiments of the present application. Ordinary technicians can obtain other drawings based on these drawings without creative work.
图1是安卓系统的架构一划分方式的示意图;Figure 1 is a schematic diagram of an architecture-division method of the Android system;
图2是安卓系统的正常启动流程示意图;Figure 2 is a schematic diagram of the normal startup process of the Android system;
图3是安卓系统正常启动流程中init脚本分散加载示意图;Figure 3 is a schematic diagram of the scattered loading of init scripts in the normal startup process of the Android system;
图4是本申请安卓系统启动的方法一实施例的流程示意图;FIG. 4 is a schematic flowchart of an embodiment of a method for starting an Android system according to the present application;
图5是本申请安卓系统启动的方法另一实施例的流程示意图;FIG. 5 is a schematic flowchart of another embodiment of the method for starting the Android system according to the present application;
图6是本申请安卓系统启动的方法又一实施例的流程示意图;FIG. 6 is a schematic flowchart of another embodiment of the method for starting the Android system according to the present application;
图7是本申请安卓系统启动的方法又一实施例的流程示意图;FIG. 7 is a schematic flowchart of another embodiment of the method for starting the Android system according to the present application;
图8是本申请安卓系统启动的方法又一实施例的流程示意图;FIG. 8 is a schematic flowchart of another embodiment of the method for starting the Android system according to the present application;
图9是本申请安卓系统启动的方法又一实施例的流程示意图;FIG. 9 is a schematic flowchart of another embodiment of the method for starting the Android system according to the present application;
图10是本申请安卓系统启动的装置一实施例的结构示意图。FIG. 10 is a schematic structural diagram of an embodiment of a device for starting an Android system according to the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组 合或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flowchart shown in the drawings is only an example, and does not necessarily include all contents and operations/steps, nor does it have to be executed in the described order. For example, some operations/steps can also be decomposed, combined or partially combined, so the actual execution order may be changed according to actual conditions.
安卓(Android)系统开机慢是使用Android系统的设备的常见问题。现在可以加快Android系统启动速度的方法包括:延迟加载APP技术和异步加载框架技术。但是,延迟加载APP技术不适用于只具备极少数APP的设备软件系统,无法从更底层对系统进行启动优化;异步加载框架技术受限于CPU个数。Slow booting of Android system is a common problem of devices using Android system. The methods that can speed up the startup speed of the Android system now include: delayed loading APP technology and asynchronous loading framework technology. However, the delayed-loading APP technology is not suitable for device software systems with only a small number of APPs, and the system startup optimization cannot be performed from the lower level; the asynchronous loading framework technology is limited by the number of CPUs.
为了更好地说明和理解本申请实施例的相关内容,先介绍一下有关安卓系统的架构、安卓系统的正常启动流程等相关内容。In order to better explain and understand the related content of the embodiments of the present application, first introduce related content such as the architecture of the Android system and the normal startup process of the Android system.
参见图1,图1是安卓系统的架构一划分方式的示意图。在本实施例划分方式的架构模型中,Android系统自上而下分为5个层次:应用层1、框架层2、本地库/运行时3、硬件抽象层4以及内核层5。框架层2和本地库/运行时3是安卓系统的核心部分,每个安卓应用的开发者都是在此基础上进行应用开发的。Refer to FIG. 1, which is a schematic diagram of an architecture-division method of the Android system. In the architecture model of the division method of this embodiment, the Android system is divided into 5 levels from top to bottom: application layer 1, framework layer 2, local library/runtime 3, hardware abstraction layer 4, and kernel layer 5. Framework layer 2 and native library/runtime 3 are the core parts of the Android system, and every Android application developer develops applications on this basis.
应用层1指在Android系统上安装并运行的各类应用程序APP,是安卓系统直接面向用户的部分。它不仅包括通话、短信、联系人等系统应用(随安卓系统一起预装在安卓的设备上),还包括其他后续安装到设备中的第三方应用。 Application layer 1 refers to various applications APP installed and running on the Android system, which is the part of the Android system directly facing users. It includes not only system applications such as calls, text messages, contacts, etc. (pre-installed on Android devices along with the Android system), but also other third-party applications that are subsequently installed on the device.
框架层2,即应用程序框架层,是安卓系统中最核心的部分。主要包含两部分:android SDK和安卓系统的Java服务,二者之间通过Binder通信机制进行跨进程交互。android SDK用于提供构建应用程序可能用到的各种API(Application Programming Interface,应用程序接口),Android自带的一些核心应用和开发者构建的应用程序就是使用这些API完成的,用来支持应用层1中的程序的运行;安卓系统的Java服务是指安卓系统的框架层2向应用层1所能够提供的相对完整的系统服务。通常情况下,安卓系统的Java服务包括官方提供的安卓系统的框架层2向应用层1所能够提供的系统服务(通常也是较为完整的)。安卓系统的Java服务包括:活动管理服务(Activity Manager)、窗口管理服务(Window Manager)、内容提供服务(Content Providers)、视图系统(View System)、通知管理服务(Notification Manager)、安装包管理服务(Package Manager)、电话管理服务(Telephony Manager)、资源管理服务(Resource Manager)、位置管理服务(Location Manager)、电源管理服 务、通话管理服务、Wifi管理服务、账号管理服务、状态栏通知管理服务、硬件服务等。它们有各自的功能,例如:活动管理服务(Activity Manager)用来管理程序的生命周期,跳转回退等功能;比如开启应用程序需要的资源、退出应用程序时所需要的释放资源。窗口管理服务(Window Manager)主要用来管理所有开启的窗口程序。内容提供服务(Content Providers)使应用程序可以访问另一个应用程序的数据(如联系人数据库),或者共享它们的数据。视图系统(View System)可以用来构建应用程序,包括列表显示listview、网格显示gridview、文本框textbox、按钮button、图形绘制等,以及可嵌入的web浏览器。 Framework layer 2, the application framework layer, is the core part of the Android system. It mainly consists of two parts: android SDK and Android system's Java service. The two interact with each other through the Binder communication mechanism. Android SDK is used to provide various APIs (Application Programming Interface) that may be used to build applications. Some core applications that come with Android and applications built by developers are completed using these APIs to support applications The operation of the program in layer 1; the Java service of the Android system refers to the relatively complete system service that the framework layer 2 of the Android system can provide to the application layer 1. Generally, the Java service of the Android system includes the system service (usually relatively complete) that the framework layer 2 of the Android system can provide to the application layer 1 officially provided by the Android system. Android Java services include: Activity Manager, Window Manager, Content Providers, View System, Notification Manager, Installation Package Management Service (Package Manager), Telephony Manager, Resource Manager, Location Manager, Power Management Service, Call Management Service, Wifi Management Service, Account Management Service, Status Bar Notification Management Service , Hardware services, etc. They have their own functions, for example: Activity Manager is used to manage the life cycle of the program, jump back and other functions; such as the resources required to open the application, and release the resources required when the application is exited. Window Manager is mainly used to manage all open window programs. Content Providers allow applications to access another application's data (such as a contact database) or share their data. The View System can be used to build applications, including list view, grid view, text box, button, graphic drawing, etc., as well as embeddable web browsers.
本地库/运行时3包含安卓系统的初始化init服务、系统运行所需的基础运行库,以及运行Java程序所需的ART虚拟机。安卓系统的init服务是指安卓系统所能够提供的相对完整的init脚本(即*.rc配置文件)中记录的服务。通常情况下,安卓系统的init服务包括官方提供的安卓系统所能够提供的init脚本(即*.rc配置文件,通常也是较为完整的)中记录的服务。安卓系统的init服务包括:core服务(包括:ueventd、logd、healthd、adbd(disabled)、lmkd(LowMemoryKiller)、servicemanager、vold、debuggerd、surfaceflinger、bootanim(disabled)等)、main服务、zygote服务等。The local library/runtime 3 includes the initial init service of the Android system, the basic runtime library required for system operation, and the ART virtual machine required for running Java programs. The init service of the Android system refers to the service recorded in the relatively complete init script (that is, the *.rc configuration file) that the Android system can provide. Generally, the init service of the Android system includes the services recorded in the init script (that is, the *.rc configuration file, which is usually relatively complete) that the official Android system can provide. The init service of Android system includes: core service (including: ueventd, logd, healthd, adbd (disabled), lmkd (LowMemoryKiller), servicemanager, vold, debuggerd, surfaceflinger, bootanim (disabled), etc.), main service, zygote service, etc.
硬件抽象层4主要包含一些驱动程序的用户层封装,向上提供符合Android规范的硬件抽象层接口,在一些资料中也被认为和“本地库/运行时3”为同一层。The hardware abstraction layer 4 mainly includes some user-level encapsulation of drivers, and provides a hardware abstraction layer interface that conforms to the Android specification. It is also considered to be the same layer as "local library/runtime 3" in some materials.
内核层5包含一个Linux内核,提供基本的进程管理、内存管理、进程调度等操作系统功能。 Kernel layer 5 contains a Linux kernel, which provides basic process management, memory management, process scheduling and other operating system functions.
在Android系统中,用户通过触摸屏、按键、语音等方式与APP交互,而APP则通过框架层2的android SDK访问java服务或init服务,而java服务或init服务则继续通过Binder或Socket或其他方式与设备更底层进行交互,从而实现APP访问系统资源的目的。In the Android system, the user interacts with the APP through touch screen, buttons, voice, etc., while the APP accesses the java service or init service through the android SDK of the framework layer 2, and the java service or init service continues through Binder or Socket or other methods Interact with the lower layer of the device, so as to realize the purpose of APP accessing system resources.
结合参见图2,图2是安卓系统的正常启动流程示意图。如图所示,在所述安卓系统的内核层启动完成后,Android系统的启动流程主要涉及三个层面,按照启动顺序依次是:本地库/运行时、框架层以及应用层。Refer to Figure 2 in combination, which is a schematic diagram of the normal startup process of the Android system. As shown in the figure, after the kernel layer of the Android system is started, the startup process of the Android system mainly involves three levels, which are in order of startup: local library/runtime, framework layer, and application layer.
本地库/运行时,第一个进程init最先启动,它解析系统中的各类init脚本(*.rc文件),并加载记录在这些*.rc文件中的init服务。In the local library/runtime, the first process init is started first. It parses various init scripts (*.rc files) in the system and loads the init services recorded in these *.rc files.
在init进程启动阶段的中后期,会启动一个名为孵化(zygote)的init服务,它会启动一个名为app_process64的可执行程序。app_process64开始运行后,会加载ART虚拟机,进入java的世界。从此系统进入框架层继续启动。In the middle and late stages of the init process startup phase, an init service called incubation (zygote) will be started, which will start an executable program called app_process64. After app_process64 starts running, it will load the ART virtual machine and enter the java world. From then on, the system enters the framework layer and continues to boot.
在框架层中,app_process64将自身进程改名为zygote进程,并复制出一份自身进程,执行系统服务器(SystemServer)进程的初始化流程。而zygote进程本身,则等待其他进程连接,确定是否复制出新的子进程去执行APP的启动过程。SystemServer进程是Android系统中众多java服务运行所在的进程。SystemServer中会启动许多java服务,比如:网络服务、电话服务、蓝牙服务等。这些诸多java服务和一些init服务共同构建Android系统丰富的功能。In the framework layer, app_process64 renames its own process to a zygote process, copies a copy of its own process, and executes the initialization process of the system server (SystemServer) process. The zygote process itself waits for other processes to connect to determine whether to copy a new child process to execute the APP startup process. The SystemServer process is the process where many java services run in the Android system. Many java services will be started in SystemServer, such as network service, telephone service, Bluetooth service, etc. These many java services and some init services jointly build the rich functions of the Android system.
在SystemServer进程加载java服务结束后,会启动系统中应用层的第一个APP,即桌面启动器launcher。Launcher启动第一个activity启动完成后,整个Android系统启动完成。After the SystemServer process loads the java service, it will start the first APP of the application layer in the system, that is, the desktop launcher launcher. After the launcher starts the first activity, the entire Android system is started.
结合参见图3,图3是安卓系统正常启动流程中init脚本分散加载示意图。Android系统的init进程是个极特殊的进程:它是系统中第一个被启动的进程,同时也是很多系统进程的父进程。如图所示,init进程在启动阶段,会依次读取/init.rc、/system/etc/init/*.rc、/vendor/etc/init/*.rc等多个*.rc文件,并加载记录在这些*.rc文件中的init服务。Refer to Figure 3 in combination, which is a schematic diagram of the scattered loading of init scripts in the normal startup process of the Android system. The init process of the Android system is a very special process: it is the first process started in the system, and it is also the parent process of many system processes. As shown in the figure, during the startup phase of the init process, it will read multiple *.rc files such as /init.rc, /system/etc/init/*.rc, /vendor/etc/init/*.rc, and Load the init service recorded in these *.rc files.
相比较于安卓系统的正常启动流程,由于本申请实施例的安卓系统启动时,仅加载init服务中的第一init服务和java服务中的第一java服务,并没有加载全部的init服务和java服务,在加载第一java服务完成后启动桌面启动器,即完成安卓系统的启动,通过这种方式,能够大幅度加快安卓系统的启动速度,同时没有增加系统启动阶段内的进程/线程切换开销;由于另一部分第二init服务和第二java服务能够在安卓系统启动完成后被加载,通过这种方式,能够保障安卓系统的完整性;本申请实施例的启动方法是从更底层(框架层和本地库/运行时)对系统进行启动优化,其启动过程与设备软件系统具有的APP数量没有关系,特别是对仅包含少量APP的定制安卓系统(例如相机),本申请能够达到更加突出的启动优化效果;其启动过程与CPU个数没有关系, 因此不受APP数量的限制,也不受限于CPU个数。Compared with the normal startup process of the Android system, when the Android system in the embodiment of the present application starts, only the first init service in the init service and the first java service in the java service are loaded, but not all the init services and java are loaded. Service, start the desktop launcher after loading the first java service to complete the startup of the Android system. In this way, the startup speed of the Android system can be greatly accelerated without increasing the process/thread switching overhead during the system startup phase. ; Because another part of the second init service and the second java service can be loaded after the Android system is started, in this way, the integrity of the Android system can be guaranteed; the startup method of the embodiment of this application is from the lower layer (framework layer) (And local library/runtime) to optimize the startup of the system. The startup process has nothing to do with the number of APPs in the device software system. Especially for a customized Android system (such as a camera) that contains only a small number of APPs, this application can achieve more prominent Start-up optimization effect; its startup process has nothing to do with the number of CPUs, so it is not limited by the number of APPs, nor is it limited by the number of CPUs.
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Hereinafter, some embodiments of the present application will be described in detail with reference to the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
参见图4,图4是本申请安卓系统启动的方法一实施例的流程示意图,在本实施例中,安卓系统中的init服务包括第一init服务和第二init服务;安卓系统的java服务包括第一java服务和第二java服务,安卓系统启动过程中,仅加载init服务中的第一init服务和java服务中的第一java服务。Refer to FIG. 4, which is a schematic flowchart of an embodiment of the method for starting the Android system of the present application. In this embodiment, the init service in the Android system includes a first init service and a second init service; the java service of the Android system includes For the first java service and the second java service, during the startup process of the Android system, only the first init service in the init service and the first java service in the java service are loaded.
该方法包括:The method includes:
步骤S101:所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中第一init服务包括java启动服务。Step S101: After the kernel layer of the Android system is started up, the first init service recorded by the first init script is parsed and loaded, where the first init service includes a java startup service.
步骤S102:在加载java启动服务后,加载第一java服务。Step S102: After loading java to start the service, load the first java service.
步骤S103:在加载第一java服务完成后,启动桌面启动器,从而完成安卓系统的启动;其中,第二init服务和第二java服务能够在安卓系统启动完成后被加载。Step S103: After the loading of the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
本申请实施例将安卓系统中的init服务划分为两部分,一部分init服务(即第一init服务)跟随安卓系统一起加载,其对应的脚本即为第一init脚本;另一部分init服务(即第二init服务)不跟随安卓系统一起加载,其能够在安卓系统启动完成后被加载。本申请实施例将安卓系统中的java服务划分为两部分,一部分java服务(即第一java服务)跟随安卓系统一起加载,另一部分java服务(即第二java服务)不跟随安卓系统一起加载,其能够在安卓系统启动完成后被加载。由于java启动服务属于init服务,由于java启动服务启动后,才能加载跟随安卓系统一起加载的第一java服务,因此,第一init服务包括java启动服务。java启动服务通常是名为zygote的init服务。The embodiment of this application divides the init service in the Android system into two parts. A part of the init service (ie, the first init service) is loaded together with the Android system, and the corresponding script is the first init script; the other part of the init service (ie, the first init service) 2. The init service) is not loaded along with the Android system, and can be loaded after the Android system is started. The embodiment of the application divides the java service in the Android system into two parts, one part of the java service (i.e. the first java service) is loaded together with the Android system, and the other part of the java service (i.e. the second java service) is not loaded together with the Android system. It can be loaded after the Android system is started. Since the java startup service belongs to the init service, the first java service loaded along with the Android system can be loaded only after the java startup service is started. Therefore, the first init service includes the java startup service. The java startup service is usually an init service called zygote.
其中,第二init服务和第二java服务能够在安卓系统启动完成后被加载的时机可以有很多种方式。例如:安卓系统启动完成后,可以在空闲时间自动触发加载第二init服务和第二java服务。或者,安卓系统启动完成后,在系统检测到新应用程序被启动时,触发加载新应用程序可能需要使用的第二init服务和第二java服务。或者,安卓系统启动完成后,根据来自应用程序的指令触发加载指定的第二init服务和第二java服务,等等;其中应用程序的指令可以 有以下实现方式:专门开发一个应用程序,该应用程序可以包括分别触发各个第二init服务和第二java服务的按钮,按钮的数量等于第二init服务和第二java服务的总数量,每个第二init服务或第二java服务对应一个按钮,当用户点击按钮时触发对应的第二init服务或第二java服务进行加载;或者,该应用程序可以包括一个复选框,每个复选框对应一个第二init服务或第二java服务,用户可以一次性选择多个第二init服务和第二java服务,从而可以一次性加载多个第二init服务和第二java服务,等等。Among them, there may be many ways in which the second init service and the second java service can be loaded after the Android system is started. For example, after the Android system is started, it can automatically trigger the loading of the second init service and the second java service in idle time. Or, after the Android system is started, when the system detects that the new application is started, it triggers the second init service and the second java service that may need to be used to load the new application. Or, after the Android system is started, the specified second init service and the second java service are triggered to load according to the instructions from the application program, etc.; the instructions of the application program can be implemented in the following ways: develop an application program specifically, the application The program may include buttons to trigger each of the second init service and the second java service, the number of buttons is equal to the total number of the second init service and the second java service, and each second init service or second java service corresponds to a button, When the user clicks the button, the corresponding second init service or second java service is triggered to load; or, the application may include a check box, and each check box corresponds to a second init service or second java service, and the user Multiple second init services and second java services can be selected at one time, so that multiple second init services and second java services can be loaded at one time, and so on.
至于划分init服务为两部分的依据、划分java服务为两部分的依据是由开发者决定的,而开发者通常是根据具体的应用程序的要求和功能来决定的。通常可以将开发的应用程序不需要用到的init服务和java服务分别划分为第二init服务和第二java服务;而开发的应用程序需要用到的init服务和java服务分别划分为第一init服务和第一java服务;例如,对于一个没有拍照功能的设备,其安卓系统可以将相机相关服务划分为不跟随安卓系统一起加载的服务(即第二java服务);对于一个仅仅是拍照的相机设备,其安卓系统可以将电话相关服务划分为不跟随安卓系统一起加载的服务(即第二java服务)。又如,可以将所有应用程序都需要用到的init服务和java服务分别划分为第一init服务和第一java服务,而将只有部分、特定的应用程序才用到的init服务和java服务分别划分为第二init服务和第二java服务;等等。例如,活动管理服务、窗口管理服务、资源管理服务、电源管理服务等能够为所有应用程序所使用,将这些java服务分别划分为跟随安卓系统一起加载的第一java服务,而电话管理服务、视图系统等只为部分、特定的应用程序所使用,将这些java服务分别划分为不跟随安卓系统一起加载的第二java服务。The basis for dividing the init service into two parts and the basis for dividing the java service into two parts are determined by the developer, and the developer usually decides according to the requirements and functions of the specific application. Generally, the init service and java service that are not needed by the developed application can be divided into the second init service and the second java service; and the init service and the java service that the developed application need to use are divided into the first init. Service and the first java service; for example, for a device that does not have a camera function, its Android system can divide the camera-related services into services that are not loaded with the Android system (ie, the second java service); for a camera that only takes pictures The Android system of the device can classify the phone-related services into services that are not loaded along with the Android system (ie, the second java service). For another example, the init service and java service that all applications need to use can be divided into the first init service and the first java service, and the init service and java service that are only used by some and specific applications can be divided into the first init service and the first java service. Divided into the second init service and the second java service; and so on. For example, activity management services, window management services, resource management services, power management services, etc. can be used by all applications. These java services are divided into the first java service loaded with the Android system, while the phone management service and view The system is only used by some and specific applications, and these java services are divided into second java services that are not loaded along with the Android system.
其中,步骤S101中所述安卓系统的内核层启动完成后解析并加载第一init脚本记录的第一init服务的实现方式很多,通常需要在编译阶段预先准备。通常情况下,所述安卓系统的内核层启动完成后,init进程是第一个启动的进程,init进程负责解析并加载第一init脚本记录的第一init服务。Among them, there are many implementation methods for parsing and loading the first init service recorded by the first init script after the kernel layer of the Android system in step S101 is started, and it usually needs to be prepared in advance during the compilation phase. Generally, after the kernel layer of the Android system is started, the init process is the first to start, and the init process is responsible for parsing and loading the first init service recorded by the first init script.
例如:在android系统源码的编译阶段,开发者可以将第二init脚本(不跟随安卓系统一起加载的第二init服务对应的脚本)进行标记,标记成LOCAL_LAZY_INIT_RC,该标记的脚本记录的init服务为第二init服务,没 有标记的第一init脚本(跟随安卓系统一起加载的第一init服务对应的脚本)记录的init服务为第一init服务,从而在机器层面将第二init脚本和第一init脚本区分开来,所述安卓系统的内核层启动完成后,需要init进程识别和区分,只解析并加载第一init脚本记录的第一init服务。For example: in the compilation stage of the android system source code, the developer can mark the second init script (the script corresponding to the second init service that is not loaded with the Android system) and mark it as LOCAL_LAZY_INIT_RC. The init service recorded by the marked script is The second init service, the init service recorded by the unmarked first init script (the script corresponding to the first init service loaded with the Android system) is the first init service, so that the second init script and the first init are combined at the machine level. The scripts are distinguished. After the kernel layer of the Android system is started, the init process needs to be identified and distinguished, and only the first init service recorded by the first init script is parsed and loaded.
由于init进程识别和区分需要花费时间,在一实施例中,为了进一步加快启动时间,步骤S101中,解析并加载第一ini脚本记录的第一init服务,可以包括:自动解析并加载默认路径中的第一init脚本记录的第一init服务。即,仅将第一init脚本对应的文件存放在init进程能够自动解析并加载的默认路径中,例如:将第一init脚本对应的*.rc文件存放在/init.rc、/system/etc/init/*.rc、/vendor/etc/init/*.rc等中的至少一个默认路径中。Since it takes time to identify and distinguish the init process, in one embodiment, in order to further speed up the startup time, in step S101, parsing and loading the first init service recorded by the first ini script may include: automatically parsing and loading the default path The first init service recorded by the first init script. That is, only the files corresponding to the first init script are stored in the default path that the init process can automatically parse and load, for example: store the *.rc file corresponding to the first init script in /init.rc, /system/etc/ At least one of the default paths in init/*.rc, /vendor/etc/init/*.rc, etc.
第二ini脚本对应的文件可以存放在另外非默认路径的空间中,也可以放在第二ini脚本记录的第二init服务可以被单独解析并加载的位置。存放在其它地方的第二ini脚本记录的第二init服务可以通过init进程进行解析和加载,也可以通过其它方式解析和加载,例如直接由应用程序临时调用并执行。The file corresponding to the second ini script can be stored in a space other than the default path, or can be placed in a location where the second init service recorded by the second ini script can be parsed and loaded separately. The second init service recorded by the second ini script stored in other places can be parsed and loaded through the init process, or parsed and loaded in other ways, for example, directly called and executed temporarily by the application.
第二ini脚本记录的第二init服务通过其它方式解析和加载,通常难以保证系统的安全性,通过init进程解析和加载第二ini脚本记录的第二init服务能够保证系统的安全性,因此,在一实施例中,第二init脚本对应的文件放置在init进程能够解析并加载的非默认路径中。The second init service recorded by the second ini script is parsed and loaded in other ways, which is usually difficult to ensure the security of the system. The second init service recorded by the second ini script can be parsed and loaded through the init process to ensure the security of the system. Therefore, In one embodiment, the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
例如:修改编译系统源码,对于带有前述标记的第二init脚本,可以将其对应的*.rc文件打包到/[system|vendor]/etc/lazy_init/目录,一方面可以避免在系统启动过程中init进程自动加载它们,另一方面,由于保存在系统目录中,可以在需要加载的时候,向init进程指定加载路径,init进程也能够解析并加载的这些第二ini脚本记录的第二init服务。For example: modify the source code of the compilation system, for the second init script with the aforementioned mark, you can package its corresponding *.rc file to the /[system|vendor]/etc/lazy_init/ directory, which can avoid the system startup process on the one hand The init process automatically loads them. On the other hand, because they are stored in the system directory, you can specify the loading path to the init process when you need to load them. The init process can also parse and load the second init recorded by these second ini scripts. service.
其中,步骤S102中,加载第一java服务的实现方式很多,通常需要在编译阶段预先准备。Among them, in step S102, there are many implementation ways of loading the first java service, which usually need to be prepared in advance during the compilation phase.
例如:将第二java服务转移至其它位置;或者,不转移第二java服务,对不跟随安卓系统启动加载的第二java服务进行标记,以示与第一java服务区别,加载第一java服务而不加载第二java服务;或者,添加一个专门java服务,由该java服务专门管理不跟随安卓系统启动加载的第二java服务;等 等。For example: transfer the second java service to another location; or, do not transfer the second java service, mark the second java service that does not follow the startup of the Android system to show the difference from the first java service, and load the first java service The second java service is not loaded; or, a special java service is added, and the java service specifically manages the second java service that does not follow the startup and loading of the Android system; and so on.
通常情况下,java启动服务,即zygote服务加载后,它会启动一个名为app_process64的可执行程序。app_process64开始运行后,会加载ART虚拟机,进入java的世界。app_process64将自身进程改名为zygote进程,并复制出一份自身进程,执行SystemServer进程的初始化流程。SystemServer进程是Android系统中众多java服务运行所在的进程。Under normal circumstances, java starts the service, that is, after the zygote service is loaded, it will start an executable program called app_process64. After app_process64 starts running, it will load the ART virtual machine and enter the java world. app_process64 renames its own process to a zygote process, copies its own process, and executes the initialization process of the SystemServer process. The SystemServer process is the process where many java services run in the Android system.
需要说明的是,本申请实施例中第二init服务的数量可以为零或者第二java服务的数量可以为零,第二init服务的数量与第二java服务的数量之和大于零,第一init服务的数量与第一java服务的数量之和小于安卓系统中的init服务的数量与java服务的数量之和。It should be noted that the number of second init services in this embodiment of the application can be zero or the number of second java services can be zero, the sum of the number of second init services and the number of second java services is greater than zero, and the first The sum of the number of init services and the number of first java services is less than the sum of the number of init services and the number of java services in the Android system.
本申请实施例安卓系统中的init服务包括第一init服务和第二init服务;安卓系统的java服务包括第一java服务和第二java服务,所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中第一init服务包括java启动服务;在加载java启动服务后,加载第一java服务;在加载第一java服务完成后,启动桌面启动器,从而完成所述安卓系统的启动;其中,第二init服务和第二java服务能够在安卓系统启动完成后被加载。相比较于安卓系统的正常启动流程,由于本申请实施例的安卓系统启动时,仅加载init服务中的第一init服务和java服务中的第一java服务,并没有加载全部的init服务和java服务,在加载第一java服务完成后启动桌面启动器,即完成安卓系统的启动,通过这种方式,能够大幅度加快安卓系统的启动速度,同时没有增加系统启动阶段内的进程/线程切换开销;由于另一部分第二init服务和第二java服务能够在安卓系统启动完成后被加载,通过这种方式,能够保障安卓系统的完整性;本申请实施例的启动方法是从更底层(框架层和本地库/运行时)对系统进行启动优化,其启动过程与设备软件系统具有的APP数量没有关系,特别是对仅包含少量APP的定制安卓系统(例如相机),本申请能够达到更加突出的启动优化效果;其启动过程与CPU个数没有关系,因此不受APP数量的限制,也不受限于CPU个数。The init service in the Android system in the embodiment of the application includes a first init service and a second init service; the java service of the Android system includes a first java service and a second java service. After the kernel layer of the Android system is started, it is analyzed and combined. Load the first init service recorded by the first init script, where the first init service includes the java startup service; after the java startup service is loaded, the first java service is loaded; after the first java service is loaded, the desktop launcher is started, thereby The startup of the Android system is completed; wherein the second init service and the second java service can be loaded after the startup of the Android system is completed. Compared with the normal startup process of the Android system, when the Android system in the embodiment of the present application starts, only the first init service in the init service and the first java service in the java service are loaded, but not all the init services and java are loaded. Service, start the desktop launcher after loading the first java service to complete the startup of the Android system. In this way, the startup speed of the Android system can be greatly accelerated without increasing the process/thread switching overhead during the system startup phase. ; Because another part of the second init service and the second java service can be loaded after the Android system is started, in this way, the integrity of the Android system can be guaranteed; the startup method of the embodiment of this application is from the lower layer (framework layer) (And local library/runtime) to optimize the startup of the system. The startup process has nothing to do with the number of APPs in the device software system. Especially for a customized Android system (such as a camera) that contains only a small number of APPs, this application can achieve more prominent Startup optimization effect; the startup process has nothing to do with the number of CPUs, so it is not limited by the number of APPs, nor is it limited by the number of CPUs.
为了保证安卓系统中的第二init服务和第二java服务在安卓系统启动完成后被加载的安全性问题,也为了最大限度简化开发步骤、最大限度保证安卓系 统的完整性,在一实施例中,在编译阶段添加一个专门java服务,该专门java服务跟随安卓系统的启动而加载,为后续加载第二init服务和第二java服务提供专门服务,具体相关内容说明如下。In order to ensure the security of the second init service and the second java service in the Android system that are loaded after the Android system is started, to simplify the development steps to the greatest extent and to ensure the integrity of the Android system to the greatest extent, in one embodiment , Add a special java service in the compilation stage, the special java service is loaded following the startup of the Android system, and provides special services for the subsequent loading of the second init service and the second java service. The specific content is explained as follows.
该专门java服务称为懒加载服务管理器,在步骤S102中,加载第一java服务,具体可以包括:使SystemServer进程加载第一java服务,第一java服务包括懒加载服务管理器和其它第一java服务,第二init服务和第二java服务能够在安卓系统启动完成后通过懒加载服务管理器被加载。This specialized java service is called a lazy loading service manager. In step S102, loading the first java service may specifically include: enabling the SystemServer process to load the first java service. The first java service includes the lazy loading service manager and other first java services. The java service, the second init service and the second java service can be loaded through the lazy loading service manager after the Android system is started.
由于第二init服务和第二java服务能够在安卓系统启动完成后通过懒加载服务管理器被加载,通过这种方式,一方面可以为保证安卓系统的安全性,简化开发步骤、保证安卓系统的完整性提供支持,另一方面也可以为需要加载第二init服务和第二java服务时,提高第二init服务和第二java服务的加载速度提供支持。Since the second init service and the second java service can be loaded through the lazy loading service manager after the Android system is started, in this way, on the one hand, it can ensure the security of the Android system, simplify the development steps, and ensure the Android system's security. Integrity provides support. On the other hand, it can also provide support for improving the loading speed of the second init service and the second java service when the second init service and the second java service need to be loaded.
参见图5,一具体应用中,在步骤S102中,使SystemServer进程加载第一java服务,还可以包括:子步骤S1021和子步骤S1022。Referring to Fig. 5, in a specific application, in step S102, enabling the SystemServer process to load the first java service may further include: sub-step S1021 and sub-step S1022.
子步骤S1021:使SystemServer进程加载懒加载服务管理器。Sub-step S1021: Make the SystemServer process load the lazy loading service manager.
子步骤S1022:通过懒加载服务管理器将需要进行懒加载的java服务进行标记,得到标记的第二java服务,将需要进行懒加载的init服务进行标记,得到标记的第二init服务。Sub-step S1022: mark the java service that needs to be lazy loaded by the lazy loading service manager to obtain the marked second java service, mark the init service that needs to be lazy loaded, and obtain the marked second init service.
在本实施例中,第二java服务包括进行懒加载的java服务,第二init服务包括需要进行懒加载的init服务。SystemServer进程加载第一java服务时,同时加载新添加的载懒加载服务管理器,载懒加载服务管理器加载完成后,载懒加载服务管理器将需要进行懒加载的java服务进行标记,得到标记的第二java服务,将需要进行懒加载的init服务进行标记,得到标记的第二init服务。通过这种方式,能够在用户需要加载的时候,及时通过载懒加载服务管理器加载用户需要的第二init服务和第二java服务。In this embodiment, the second java service includes a java service that performs lazy loading, and the second init service includes an init service that requires lazy loading. When the SystemServer process loads the first java service, it loads the newly added lazy loading service manager at the same time. After the lazy loading service manager is loaded, the lazy loading service manager will mark the java services that need to be lazy loaded and get the mark For the second java service, mark the init service that needs lazy loading to obtain the marked second init service. In this way, when the user needs to load, the second init service and the second java service required by the user can be loaded in time through the lazy loading service manager.
下面分两种情况说明在完成安卓系统的启动后,用户请求加载第二java服务和第二init服务的具体细节。The following two situations illustrate the specific details of the user request to load the second java service and the second init service after the Android system has been started up.
参见图6,在一实施例中,该方法还包括:步骤S201和步骤S202。Referring to FIG. 6, in an embodiment, the method further includes: step S201 and step S202.
步骤S201:安卓系统启动完成后,通过懒加载服务管理器接收加载指定 java服务的第一请求。Step S201: After the Android system is started, the first request for loading the specified java service is received through the lazy loading service manager.
其中,懒加载服务管理器能够与应用程序通信,可以直接通过安卓系统提供的软件开发包与应用程序进行通信。通过这种方式,能够减小开发复杂度。在一应用中,第一请求来自应用程序。Among them, the lazy loading service manager can communicate with the application program, and can communicate with the application program directly through the software development kit provided by the Android system. In this way, the development complexity can be reduced. In an application, the first request comes from the application.
步骤S202:根据第一请求,加载指定java服务。Step S202: According to the first request, load the specified java service.
具体地,上述标记的第二java服务包括懒加载java服务名称以及懒加载java服务名称对应的加载代码之间的对应关系。通过这种方式,在接到第一请求时,能够快速响应快速加载指定java服务。Specifically, the second java service marked above includes the correspondence between the lazy loading java service name and the loading code corresponding to the lazy loading java service name. In this way, when the first request is received, the specified java service can be quickly responded to and loaded quickly.
参见图7,此时步骤S202具体可以包括:子步骤S2021和子步骤S2022。Referring to FIG. 7, at this time, step S202 may specifically include: sub-step S2021 and sub-step S2022.
子步骤S2021:根据第一请求中携带的指定java服务的名称,确定对应的懒加载java服务名称以及懒加载java服务名称对应的加载代码。Sub-step S2021: According to the name of the specified java service carried in the first request, determine the corresponding lazy-loaded java service name and the loading code corresponding to the lazy-loaded java service name.
子步骤S2022:加载懒加载java服务名称对应的加载代码。Sub-step S2022: Load the loading code corresponding to the lazy loading java service name.
在本实施例中,第一请求中携带的指定java服务的名称通常是面向用户的,简洁直观,而懒加载java服务名称通常是机器可以识别安卓系统中的java服务名称。根据已建立的指定java服务的名称与懒加载java服务名称之间的关系,再根据懒加载java服务名称以及懒加载java服务名称对应的加载代码之间的对应关系,即可快速加载指定java服务。In this embodiment, the name of the specified java service carried in the first request is usually user-oriented, concise and intuitive, and the lazy loading java service name is usually the name of the java service in the Android system that the machine can recognize. According to the established relationship between the name of the specified java service and the name of the lazy-loaded java service, and then according to the correspondence between the name of the lazy-loaded java service and the loading code corresponding to the lazy-loaded java service name, the specified java service can be quickly loaded .
在另一实施例中,懒加载服务管理器能够与init进程进行通信,通过这种方式,为使init进程加载第二init服务提供支持。In another embodiment, the lazy loading service manager can communicate with the init process, in this way, it provides support for the init process to load the second init service.
在一应用中,懒加载服务管理器能够通过init进程的ctrl.loadrc属性接口与init进程进行通信,init进程能够加载ctrl.loadrc属性接口的属性携带的参数中的第二init初始化脚本。在本实施例中,预先给init进程增加一个新属性接口ctrl.loadrc,懒加载服务管理器将请求加载指定第二init服务的相关参数发给属性接口ctrl.loadrc,属性接口ctrl.loadrc将这些相关参数附在属性中,init进程根据ctrl.loadrc属性接口的属性携带的参数,即可加载对应的第二init服务。In an application, the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process can load the second init initialization script among the parameters carried by the attributes of the ctrl.loadrc attribute interface. In this embodiment, a new attribute interface ctrl.loadrc is added to the init process in advance, and the lazy loading service manager sends the relevant parameters requesting to load the specified second init service to the attribute interface ctrl.loadrc, and the attribute interface ctrl.loadrc combines these The relevant parameters are attached to the properties, and the init process can load the corresponding second init service according to the parameters carried by the properties of the ctrl.loadrc property interface.
其中,参见图8,该方法还包括:步骤S301和步骤S302。Wherein, referring to FIG. 8, the method further includes: step S301 and step S302.
步骤S301:安卓系统启动完成后,通过懒加载服务管理器接收加载指定init服务的第二请求。Step S301: After the Android system is started, the second request for loading the specified init service is received through the lazy loading service manager.
其中,懒加载服务管理器能够与应用程序通信,可以直接通过安卓系统提供的软件开发包与应用程序进行通信。通过这种方式,能够减小开发复杂度。在一应用中,第二请求来自应用程序。Among them, the lazy loading service manager can communicate with the application program, and can communicate with the application program directly through the software development kit provided by the Android system. In this way, the development complexity can be reduced. In an application, the second request comes from the application.
步骤S302:根据第二请求,通过懒加载服务管理器使init进程解析并加载对应的第二init脚本记录的指定init服务。Step S302: According to the second request, the init process parses and loads the specified init service recorded by the corresponding second init script through the lazy loading service manager.
具体地,上述标记的第二init服务包括懒加载init服务名称、懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径之间的对应关系;通过这种方式,在接到第二请求时,能够快速响应快速加载指定init服务。Specifically, the second init service marked above includes the corresponding relationship between the lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; in this way, When receiving the second request, it can quickly respond to quickly load the specified init service.
参见图9,此时步骤S302具体可以包括:子步骤S3021和子步骤S3022。Referring to FIG. 9, at this time, step S302 may specifically include: sub-step S3021 and sub-step S3022.
子步骤S3021:根据第二请求中携带的指定init服务的名称,确定对应的懒加载init服务名称、懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径。Sub-step S3021: According to the name of the designated init service carried in the second request, determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script.
子步骤S3022:通过懒加载服务管理器使init进程按照懒加载路径解析并加载懒加载init脚本记录的懒加载init服务。Sub-step S3022: using the lazy loading service manager to make the init process parse and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
在本实施例中,第二请求中携带的指定init服务的名称通常是面向用户的,简洁直观,而懒加载init服务名称通常是机器可以识别安卓系统中的init服务名称。根据已建立的指定init服务的名称与懒加载init服务名称之间的关系,再根据懒加载init服务名称、懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径之间的对应关系,即可快速获得指定init服务的名称的懒加载路径,将指定init服务的名称的懒加载路径(参数)发送给属性接口ctrl.loadrc,属性接口ctrl.loadrc将指定init服务的名称的懒加载路径作为属性携带,init进程即可快速按照懒加载路径解析并加载对应的懒加载init脚本记录的懒加载init服务。In this embodiment, the name of the specified init service carried in the second request is usually user-oriented, concise and intuitive, and the lazy loading init service name is usually the name of the init service in the Android system that can be recognized by the machine. According to the established relationship between the name of the specified init service and the name of the lazy-loaded init service, according to the name of the lazy-loaded init service, the lazy-loaded init script corresponding to the lazy-loaded init service name, and the lazy-loaded path corresponding to the lazy-loaded init script The corresponding relationship between the two, you can quickly obtain the lazy loading path of the specified init service name, and send the lazy loading path (parameter) of the specified init service name to the attribute interface ctrl.loadrc, and the attribute interface ctrl.loadrc will specify the init service The lazy loading path of the name is carried as an attribute, and the init process can quickly resolve and load the lazy loading init service recorded by the corresponding lazy loading init script according to the lazy loading path.
在一具体实际应用中,在无损android系统完整性的前提下,能够获得更快的系统启动速度,具体是:在参考开发板hikey960上,基于A53 1.8GHz×3的处理器配置,通过将网络服务和Wifi服务(network/wifi)相关框架层服务延迟启动后,启动时间从4.6s降到了4.4s。In a specific practical application, a faster system startup speed can be obtained without compromising the integrity of the android system, specifically: on the reference development board hikey960, based on the A53 1.8GHz×3 processor configuration, through the network After the service and Wifi service (network/wifi) related framework layer services are delayed to start, the start time is reduced from 4.6s to 4.4s.
参见图10,图10是本申请安卓系统启动的装置一实施例的结构示意图, 需要说明的是,本实施例的装置能够实现上述安卓系统启动的方法,相关内容的详细说明,请参见上述安卓系统启动的方法部分,在此不再赘叙。Refer to FIG. 10, which is a schematic structural diagram of an embodiment of the device for starting the Android system of the present application. It should be noted that the device of this embodiment can implement the above method for starting the Android system. For a detailed description of related content, please refer to the above-mentioned Android system. The method of system startup will not be repeated here.
安卓系统中的init服务包括第一init服务和第二init服务;安卓系统的java服务包括第一java服务和第二java服务,安卓系统启动的装置10包括:存储器11和处理器12;存储器11和处理器12通过总线13连接。The init service in the Android system includes the first init service and the second init service; the java service of the Android system includes the first java service and the second java service. The device 10 started by the Android system includes: a memory 11 and a processor 12; and a memory 11 And the processor 12 is connected through a bus 13.
其中,处理器12可以是微控制单元、中央处理单元或数字信号处理器,等等。Among them, the processor 12 may be a micro control unit, a central processing unit, or a digital signal processor, and so on.
其中,存储器11可以是Flash芯片、只读存储器、磁盘、光盘、U盘或者移动硬盘等等。Among them, the memory 11 may be a Flash chip, a read-only memory, a magnetic disk, an optical disk, a U disk or a mobile hard disk, etc.
存储器11用于存储计算机程序;处理器12用于执行计算机程序并在执行计算机程序时,实现如下步骤:The memory 11 is used to store a computer program; the processor 12 is used to execute the computer program and when the computer program is executed, the following steps are implemented:
所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中第一init服务包括java启动服务;在加载java启动服务后,加载第一java服务;在加载第一java服务完成后,启动桌面启动器,从而完成安卓系统的启动;其中,第二init服务和第二java服务能够在安卓系统启动完成后被加载。After the kernel layer of the Android system is started, the first init service recorded by the first init script is parsed and loaded, where the first init service includes the java startup service; after the java startup service is loaded, the first java service is loaded; After the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein, the second init service and the second java service can be loaded after the Android system is started.
其中,处理器在执行计算机程序时,实现如下步骤:自动解析并加载默认路径中的第一init脚本记录的第一init服务。Wherein, when the processor executes the computer program, it implements the following steps: automatically parse and load the first init service recorded by the first init script in the default path.
其中,第二init服务的第二init脚本对应的文件放置在非默认路径中。Wherein, the file corresponding to the second init script of the second init service is placed in the non-default path.
其中,第二init脚本对应的文件放置在init进程能够解析并加载的非默认路径中。Among them, the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
其中,处理器在执行计算机程序时,实现如下步骤:使SystemServer进程加载第一java服务,第一java服务包括懒加载服务管理器和其它第一java服务,第二init服务和第二java服务能够在安卓系统启动完成后通过懒加载服务管理器被加载。Wherein, when the processor executes the computer program, the following steps are implemented: the SystemServer process loads the first java service, the first java service includes the lazy loading service manager and other first java services, the second init service and the second java service can After the Android system is started, it is loaded through the lazy loading service manager.
其中,处理器在执行计算机程序时,实现如下步骤:使SystemServer进程加载懒加载服务管理器;通过懒加载服务管理器将需要进行懒加载的java服务进行标记,得到标记的第二java服务,将需要进行懒加载的init服务进行标记,得到标记的第二init服务。Among them, when the processor executes the computer program, the following steps are implemented: make the SystemServer process load the lazy-loading service manager; mark the java services that need to be lazy-loaded through the lazy-loading service manager, and get the marked second java service. The init service that needs to be lazy loaded is marked, and the marked second init service is obtained.
其中,处理器在执行计算机程序时,实现如下步骤:安卓系统启动完成后,通过懒加载服务管理器接收加载指定java服务的第一请求;根据第一请求,加载指定java服务。Wherein, when the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a first request for loading a specified java service through the lazy loading service manager; according to the first request, loads the specified java service.
其中,标记的第二java服务包括懒加载java服务名称以及懒加载java服务名称对应的加载代码之间的对应关系;处理器在执行计算机程序时,实现如下步骤:根据第一请求中携带的指定java服务的名称,确定对应的懒加载java服务名称以及懒加载java服务名称对应的加载代码;加载懒加载java服务名称对应的加载代码。Wherein, the marked second java service includes the corresponding relationship between the lazy loading java service name and the loading code corresponding to the lazy loading java service name; when the processor executes the computer program, the following steps are implemented: according to the specification carried in the first request For the name of the java service, determine the corresponding lazy-loaded java service name and the load code corresponding to the lazy-loaded java service name; load the load code corresponding to the lazy-loaded java service name.
其中,懒加载服务管理器能够与init进程进行通信。Among them, the lazy loading service manager can communicate with the init process.
其中,处理器在执行计算机程序时,实现如下步骤:安卓系统启动完成后,通过懒加载服务管理器接收加载指定init服务的第二请求;根据第二请求,通过懒加载服务管理器使init进程解析并加载对应的第二init脚本记录的指定init服务。Wherein, when the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a second request to load the specified init service through the lazy loading service manager; according to the second request, the init process is made through the lazy loading service manager Parse and load the specified init service recorded by the corresponding second init script.
其中,标记的第二init服务包括懒加载init服务名称、懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径之间的对应关系;处理器在执行计算机程序时,实现如下步骤:根据第二请求中携带的指定init服务的名称,确定对应的懒加载init服务名称、懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径;通过懒加载服务管理器使init进程按照懒加载路径解析并加载懒加载init脚本记录的懒加载init服务。Wherein, the marked second init service includes the correspondence between the lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; when the processor executes the computer program, The following steps are implemented: according to the name of the specified init service carried in the second request, determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; The loading service manager enables the init process to parse and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
其中,懒加载服务管理器能够通过init进程的ctrl.loadrc属性接口与init进程进行通信,init进程能够加载ctrl.loadrc属性接口的属性携带的参数中的第二init初始化脚本。Among them, the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process can load the second init initialization script among the parameters carried by the attributes of the ctrl.loadrc attribute interface.
其中,懒加载服务管理器能够与应用程序通信。Among them, the lazy loading service manager can communicate with the application.
其中,第一请求或第二请求来自应用程序。Among them, the first request or the second request comes from the application.
其中,懒加载服务管理器能够通过软件开发包与应用程序进行通信。Among them, the lazy loading service manager can communicate with the application through the software development kit.
本申请还提供一种终端设备,该终端设备的操作系统包括安卓系统,该终端设备能够实现上述安卓系统启动的方法,相关内容的详细说明,请参见上述安卓系统启动的方法部分,在此不再赘叙。本申请实施例的终端设备包括但不 限于:数码相机、移动设备、智能终端,等等。This application also provides a terminal device, the operating system of the terminal device includes the Android system, and the terminal device can implement the above-mentioned Android system startup method. For detailed descriptions of related content, please refer to the above-mentioned Android system startup method section. Repeat it again. The terminal devices in the embodiments of the present application include, but are not limited to: digital cameras, mobile devices, smart terminals, and so on.
安卓系统中的init服务包括第一init服务和第二init服务;安卓系统的java服务包括第一java服务和第二java服务,该终端设备包括:处理器、和与处理器连接的存储器、输入输出设备及通信电路;存储器用于存储计算机程序;处理器用于执行计算机程序并在执行计算机程序时,实现如下步骤:The init service in the Android system includes a first init service and a second init service; the java service of the Android system includes a first java service and a second java service. The terminal device includes a processor, a memory connected to the processor, and an input Output device and communication circuit; the memory is used to store the computer program; the processor is used to execute the computer program and when the computer program is executed, the following steps are implemented:
所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中第一init服务包括java启动服务;在加载java启动服务后,加载第一java服务;在加载第一java服务完成后,启动桌面启动器,从而完成安卓系统的启动;其中,第二init服务和第二java服务能够在安卓系统启动完成后被加载。After the kernel layer of the Android system is started, the first init service recorded by the first init script is parsed and loaded, where the first init service includes the java startup service; after the java startup service is loaded, the first java service is loaded; After the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein, the second init service and the second java service can be loaded after the Android system is started.
其中,输入输出设备包括显示屏、键盘、USB接口、耳机接口、摄像头、扬声器以及听筒。Among them, the input and output devices include a display screen, a keyboard, a USB interface, a headphone interface, a camera, a speaker, and a receiver.
其中,处理器在执行计算机程序时,实现如下步骤:自动解析并加载默认路径中的第一init脚本记录的第一init服务。Wherein, when the processor executes the computer program, it implements the following steps: automatically parse and load the first init service recorded by the first init script in the default path.
其中,第二init服务的第二init脚本对应的文件放置在非默认路径中。Wherein, the file corresponding to the second init script of the second init service is placed in the non-default path.
其中,第二init脚本对应的文件放置在init进程能够解析并加载的非默认路径中。Among them, the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
其中,处理器在执行计算机程序时,实现如下步骤:使SystemServer进程加载第一java服务,第一java服务包括懒加载服务管理器和其它第一java服务,第二init服务和第二java服务能够在安卓系统启动完成后通过懒加载服务管理器被加载。Wherein, when the processor executes the computer program, the following steps are implemented: the SystemServer process loads the first java service, the first java service includes the lazy loading service manager and other first java services, the second init service and the second java service can After the Android system is started, it is loaded through the lazy loading service manager.
其中,处理器在执行计算机程序时,实现如下步骤:使SystemServer进程加载懒加载服务管理器;通过懒加载服务管理器将需要进行懒加载的java服务进行标记,得到标记的第二java服务,将需要进行懒加载的init服务进行标记,得到标记的第二init服务。Among them, when the processor executes the computer program, the following steps are implemented: make the SystemServer process load the lazy-loading service manager; mark the java services that need to be lazy-loaded through the lazy-loading service manager, and get the marked second java service. The init service that needs to be lazy loaded is marked, and the marked second init service is obtained.
其中,处理器在执行计算机程序时,实现如下步骤:安卓系统启动完成后,通过懒加载服务管理器接收加载指定java服务的第一请求;根据第一请求,加载指定java服务。Wherein, when the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a first request for loading a specified java service through the lazy loading service manager; according to the first request, loads the specified java service.
其中,标记的第二java服务包括懒加载java服务名称以及懒加载java服 务名称对应的加载代码之间的对应关系;处理器在执行计算机程序时,实现如下步骤:根据第一请求中携带的指定java服务的名称,确定对应的懒加载java服务名称以及懒加载java服务名称对应的加载代码;加载懒加载java服务名称对应的加载代码。Wherein, the marked second java service includes the corresponding relationship between the lazy loading java service name and the loading code corresponding to the lazy loading java service name; when the processor executes the computer program, the following steps are implemented: according to the specification carried in the first request For the name of the java service, determine the corresponding lazy-loaded java service name and the load code corresponding to the lazy-loaded java service name; load the load code corresponding to the lazy-loaded java service name.
其中,懒加载服务管理器能够与init进程进行通信。Among them, the lazy loading service manager can communicate with the init process.
其中,处理器在执行计算机程序时,实现如下步骤:安卓系统启动完成后,通过懒加载服务管理器接收加载指定init服务的第二请求;根据第二请求,通过懒加载服务管理器使init进程解析并加载对应的第二init脚本记录的指定init服务。Wherein, when the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a second request to load the specified init service through the lazy loading service manager; according to the second request, the init process is made through the lazy loading service manager Parse and load the specified init service recorded by the corresponding second init script.
其中,标记的第二init服务包括懒加载init服务名称、懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径之间的对应关系;处理器在执行计算机程序时,实现如下步骤:根据第二请求中携带的指定init服务的名称,确定对应的懒加载init服务名称、懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径;通过懒加载服务管理器使init进程按照懒加载路径解析并加载懒加载init脚本记录的懒加载init服务。Wherein, the marked second init service includes the correspondence between the lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; when the processor executes the computer program, The following steps are implemented: according to the name of the specified init service carried in the second request, determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; The loading service manager enables the init process to parse and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
其中,懒加载服务管理器能够通过init进程的ctrl.loadrc属性接口与init进程进行通信,init进程能够加载ctrl.loadrc属性接口的属性携带的参数中的第二init初始化脚本。Among them, the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process can load the second init initialization script among the parameters carried by the attributes of the ctrl.loadrc attribute interface.
其中,懒加载服务管理器能够与应用程序通信。Among them, the lazy loading service manager can communicate with the application.
其中,第一请求或第二请求来自应用程序。Among them, the first request or the second request comes from the application.
其中,懒加载服务管理器能够通过软件开发包与应用程序进行通信。Among them, the lazy loading service manager can communicate with the application through the software development kit.
本申请还提供一种拍摄装置,该拍摄装置的操作系统包括安卓系统,该终端设备能够实现上述安卓系统启动的方法,相关内容的详细说明,请参见上述安卓系统启动的方法部分,在此不再赘叙。This application also provides a photographing device, the operating system of the photographing device includes the Android system, and the terminal device can implement the above-mentioned method for starting the Android system. For a detailed description of the relevant content, please refer to the above-mentioned method of starting the Android system. Repeat it again.
安卓系统中的init服务包括第一init服务和第二init服务;安卓系统的java服务包括第一java服务和第二java服务,该拍摄装置包括:处理器、和存储器;存储器用于存储计算机程序;处理器用于执行计算机程序并在执行计算机程序时,实现如下步骤:The init service in the Android system includes a first init service and a second init service; the java service of the Android system includes a first java service and a second java service. The camera includes a processor and a memory; the memory is used to store computer programs ; The processor is used to execute the computer program and when the computer program is executed, the following steps are implemented:
所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中第一init服务包括java启动服务;在加载java启动服务后,加载第一java服务;在加载第一java服务完成后,启动桌面启动器,从而完成安卓系统的启动;其中,第二init服务和第二java服务能够在安卓系统启动完成后被加载。After the kernel layer of the Android system is started, the first init service recorded by the first init script is parsed and loaded, where the first init service includes the java startup service; after the java startup service is loaded, the first java service is loaded; After the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein, the second init service and the second java service can be loaded after the Android system is started.
其中,处理器在执行计算机程序时,实现如下步骤:自动解析并加载默认路径中的第一init脚本记录的第一init服务。Wherein, when the processor executes the computer program, it implements the following steps: automatically parse and load the first init service recorded by the first init script in the default path.
其中,第二init服务的第二init脚本对应的文件放置在非默认路径中。Wherein, the file corresponding to the second init script of the second init service is placed in the non-default path.
其中,第二init脚本对应的文件放置在init进程能够解析并加载的非默认路径中。Among them, the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
其中,处理器在执行计算机程序时,实现如下步骤:使SystemServer进程加载第一java服务,第一java服务包括懒加载服务管理器和其它第一java服务,第二init服务和第二java服务能够在安卓系统启动完成后通过懒加载服务管理器被加载。Wherein, when the processor executes the computer program, the following steps are implemented: the SystemServer process loads the first java service, the first java service includes the lazy loading service manager and other first java services, the second init service and the second java service can After the Android system is started, it is loaded through the lazy loading service manager.
其中,处理器在执行计算机程序时,实现如下步骤:使SystemServer进程加载懒加载服务管理器;通过懒加载服务管理器将需要进行懒加载的java服务进行标记,得到标记的第二java服务,将需要进行懒加载的init服务进行标记,得到标记的第二init服务。Among them, when the processor executes the computer program, the following steps are implemented: make the SystemServer process load the lazy-loading service manager; mark the java services that need to be lazy-loaded through the lazy-loading service manager, and get the marked second java service. The init service that needs to be lazy loaded is marked, and the marked second init service is obtained.
其中,处理器在执行计算机程序时,实现如下步骤:安卓系统启动完成后,通过懒加载服务管理器接收加载指定java服务的第一请求;根据第一请求,加载指定java服务。Wherein, when the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a first request for loading a specified java service through the lazy loading service manager; according to the first request, loads the specified java service.
其中,标记的第二java服务包括懒加载java服务名称以及懒加载java服务名称对应的加载代码之间的对应关系;处理器在执行计算机程序时,实现如下步骤:根据第一请求中携带的指定java服务的名称,确定对应的懒加载java服务名称以及懒加载java服务名称对应的加载代码;加载懒加载java服务名称对应的加载代码。Wherein, the marked second java service includes the corresponding relationship between the lazy loading java service name and the loading code corresponding to the lazy loading java service name; when the processor executes the computer program, the following steps are implemented: according to the specification carried in the first request For the name of the java service, determine the corresponding lazy-loaded java service name and the load code corresponding to the lazy-loaded java service name; load the load code corresponding to the lazy-loaded java service name.
其中,懒加载服务管理器能够与init进程进行通信。Among them, the lazy loading service manager can communicate with the init process.
其中,处理器在执行计算机程序时,实现如下步骤:安卓系统启动完成后,通过懒加载服务管理器接收加载指定init服务的第二请求;根据第二请求,通 过懒加载服务管理器使init进程解析并加载对应的第二init脚本记录的指定init服务。Wherein, when the processor executes the computer program, the following steps are implemented: after the Android system is started, it receives a second request to load the specified init service through the lazy loading service manager; according to the second request, the init process is made through the lazy loading service manager Parse and load the specified init service recorded by the corresponding second init script.
其中,标记的第二init服务包括懒加载init服务名称、懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径之间的对应关系;处理器在执行计算机程序时,实现如下步骤:根据第二请求中携带的指定init服务的名称,确定对应的懒加载init服务名称、懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径;通过懒加载服务管理器使init进程按照懒加载路径解析并加载懒加载init脚本记录的懒加载init服务。Wherein, the marked second init service includes the correspondence between the lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; when the processor executes the computer program, The following steps are implemented: according to the name of the specified init service carried in the second request, determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script; The loading service manager enables the init process to parse and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
其中,懒加载服务管理器能够通过init进程的ctrl.loadrc属性接口与init进程进行通信,init进程能够加载ctrl.loadrc属性接口的属性携带的参数中的第二init初始化脚本。Among them, the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process can load the second init initialization script among the parameters carried by the attributes of the ctrl.loadrc attribute interface.
其中,懒加载服务管理器能够与应用程序通信。Among them, the lazy loading service manager can communicate with the application.
其中,第一请求或第二请求来自应用程序。Among them, the first request or the second request comes from the application.
其中,懒加载服务管理器能够通过软件开发包与应用程序进行通信。Among them, the lazy loading service manager can communicate with the application through the software development kit.
本申请还提供一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时使处理器实现如上任一项的安卓系统启动的方法。相关内容的详细说明请参见上述安卓系统启动的方法部分,在此不再赘叙。The present application also provides a computer-readable storage medium that stores a computer program, and when the computer program is executed by a processor, the processor realizes the method for starting the Android system as described above. For a detailed description of the relevant content, please refer to the above section of the Android system startup method, which is not repeated here.
其中,该计算机可读存储介质可以是上述任一装置、设备的内部存储单元,例如装置、设备的硬盘或内存。该计算机可读存储介质也可以是装置、设备的外部存储设备,例如装置、设备上配备的插接式硬盘、智能存储卡、安全数字卡、闪存卡,等等。Wherein, the computer-readable storage medium may be an internal storage unit of any of the above-mentioned devices or equipment, such as the hard disk or memory of the device or equipment. The computer-readable storage medium may also be an external storage device of the device or the device, such as a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, etc. equipped on the device or the device.
应当理解,在本申请说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本申请。It should be understood that the terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit the application.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be understood that the term "and/or" used in the specification and appended claims of this application refers to any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
以上所述,仅为本申请的具体实施例,但本申请的保护范围并不局限于此, 任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。The above are only specific embodiments of this application, but the protection scope of this application is not limited to this. Anyone familiar with the technical field can easily think of various equivalents within the technical scope disclosed in this application. Modifications or replacements, these modifications or replacements shall be covered within the scope of protection of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.

Claims (62)

  1. 一种安卓系统启动的方法,其特征在于,所述安卓系统中的init服务包括第一init服务和第二init服务;所述安卓系统的java服务包括第一java服务和第二java服务,所述方法包括:A method for starting an Android system, wherein the init service in the Android system includes a first init service and a second init service; the java service of the Android system includes a first java service and a second java service, so The methods include:
    所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中所述第一init服务包括java启动服务;After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
    在加载所述java启动服务后,加载第一java服务;After loading the java startup service, load the first java service;
    在加载第一java服务完成后,启动桌面启动器,从而完成所述安卓系统的启动;其中,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后被加载。After the loading of the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
  2. 根据权利要求1所述的方法,其特征在于,所述解析并加载第一ini脚本记录的第一init服务,包括:The method according to claim 1, wherein the parsing and loading the first init service recorded by the first ini script comprises:
    自动解析并加载默认路径中的第一init脚本记录的第一init服务。Automatically parse and load the first init service recorded by the first init script in the default path.
  3. 根据权利要求2所述的方法,其特征在于,所述第二init服务的第二init脚本对应的文件放置在非默认路径中。The method according to claim 2, wherein the file corresponding to the second init script of the second init service is placed in a non-default path.
  4. 根据权利要求3所述的方法,其特征在于,所述第二init脚本对应的文件放置在init进程能够解析并加载的非默认路径中。The method according to claim 3, wherein the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
  5. 根据权利要求1所述的方法,其特征在于,所述加载第一java服务,包括:The method according to claim 1, wherein said loading the first java service comprises:
    使SystemServer进程加载第一java服务,所述第一java服务包括懒加载服务管理器和其它第一java服务,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后通过所述懒加载服务管理器被加载。Make the SystemServer process load the first java service. The first java service includes a lazy loading service manager and other first java services. The second init service and the second java service can be completed after the Android system is started. It is loaded by the lazy loading service manager.
  6. 根据权利要求5所述的方法,其特征在于,所述使SystemServer进程加载第一java服务,包括:The method according to claim 5, wherein said causing the SystemServer process to load the first java service comprises:
    使SystemServer进程加载所述懒加载服务管理器;Enabling the SystemServer process to load the lazy loading service manager;
    通过所述懒加载服务管理器将需要进行懒加载的java服务进行标记,得到标记的第二java服务,将需要进行懒加载的init服务进行标记,得到标记的第二init服务。Through the lazy loading service manager, the java services that need to be lazy loaded are marked to obtain the marked second java service, and the init services that need to be lazy loaded are marked to obtain the marked second init service.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method according to claim 6, wherein the method further comprises:
    所述安卓系统启动完成后,通过所述懒加载服务管理器接收加载指定java服务的第一请求;After the Android system is started, receiving a first request for loading a specified java service through the lazy loading service manager;
    根据所述第一请求,加载所述指定java服务。According to the first request, the specified java service is loaded.
  8. 根据权利要求7所述的方法,其特征在于,所述标记的第二java服务包括懒加载java服务名称以及懒加载java服务名称对应的加载代码之间的对应关系;The method according to claim 7, wherein the marked second java service includes a correspondence between a lazy loading java service name and the loading code corresponding to the lazy loading java service name;
    所述根据所述第一请求,加载所述指定java服务,包括:The loading the specified java service according to the first request includes:
    根据所述第一请求中携带的指定java服务的名称,确定对应的懒加载java服务名称以及所述懒加载java服务名称对应的加载代码;Determining the corresponding lazy loading java service name and the loading code corresponding to the lazy loading java service name according to the name of the specified java service carried in the first request;
    加载所述懒加载java服务名称对应的加载代码。Load the loading code corresponding to the lazy loading java service name.
  9. 根据权利要求6所述的方法,其特征在于,所述懒加载服务管理器能够与init进程进行通信。The method according to claim 6, wherein the lazy loading service manager can communicate with the init process.
  10. 根据权利要求9所述的方法,其特征在于,所述方法还包括:The method according to claim 9, wherein the method further comprises:
    所述安卓系统启动完成后,通过所述懒加载服务管理器接收加载指定init服务的第二请求;After the Android system is started, receiving a second request for loading a specified init service through the lazy loading service manager;
    根据所述第二请求,通过所述懒加载服务管理器使所述init进程解析并加载对应的第二init脚本记录的指定init服务。According to the second request, the lazy loading service manager enables the init process to parse and load the specified init service recorded by the corresponding second init script.
  11. 根据权利要求10所述的方法,其特征在于,所述标记的第二init服务包括懒加载init服务名称、所述懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径之间的对应关系;The method according to claim 10, wherein the marked second init service includes a lazy-loaded init service name, a lazy-loaded init script corresponding to the lazy-loaded init service name, and a lazy-loaded init script corresponding to the lazy-loaded init script Correspondence between paths;
    所述根据所述第二请求,通过所述懒加载服务管理器使所述init进程解析并加载对应的第二init脚本记录的指定init服务,包括:According to the second request, enabling the init process to parse and load the specified init service recorded by the corresponding second init script through the lazy loading service manager includes:
    根据所述第二请求中携带的指定init服务的名称,确定对应的懒加载init服务名称、所述懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径;Determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script according to the name of the designated init service carried in the second request;
    通过所述懒加载服务管理器使所述init进程按照所述懒加载路径解析并加载懒加载init脚本记录的懒加载init服务。The lazy loading service manager enables the init process to analyze and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
  12. 根据权利要求9-11任一项所述的方法,其特征在于,所述懒加载服 务管理器能够通过所述init进程的ctrl.loadrc属性接口与所述init进程进行通信,所述init进程能够加载所述ctrl.loadrc属性接口的属性携带的参数中的第二init初始化脚本。The method according to any one of claims 9-11, wherein the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process can Load the second init initialization script in the parameters carried by the attributes of the ctrl.loadrc attribute interface.
  13. 根据权利要求7或10所述的方法,其特征在于,所述懒加载服务管理器能够与应用程序通信。The method according to claim 7 or 10, wherein the lazy loading service manager can communicate with an application program.
  14. 根据权利要求13所述的方法,其特征在于,所述第一请求或所述第二请求来自所述应用程序。The method according to claim 13, wherein the first request or the second request comes from the application program.
  15. 根据权利要求13所述的方法,其特征在于,所述懒加载服务管理器能够通过软件开发包与所述应用程序进行通信。The method according to claim 13, wherein the lazy loading service manager can communicate with the application program through a software development kit.
  16. 一种安卓系统启动的装置,其特征在于,所述安卓系统中的init服务包括第一init服务和第二init服务;所述安卓系统的java服务包括第一java服务和第二java服务,所述装置包括:存储器和处理器;An Android system startup device, characterized in that the init service in the Android system includes a first init service and a second init service; the java service in the Android system includes a first java service and a second java service, so The device includes: a memory and a processor;
    所述存储器用于存储计算机程序;The memory is used to store a computer program;
    所述处理器用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is used to execute the computer program and when executing the computer program, implement the following steps:
    所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中所述第一init服务包括java启动服务;After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
    在加载所述java启动服务后,加载第一java服务;After loading the java startup service, load the first java service;
    在加载第一java服务完成后,启动桌面启动器,从而完成所述安卓系统的启动;其中,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后被加载。After the loading of the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
  17. 根据权利要求16所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 16, wherein the processor implements the following steps when executing the computer program:
    自动解析并加载默认路径中的第一init脚本记录的第一init服务。Automatically parse and load the first init service recorded by the first init script in the default path.
  18. 根据权利要求17所述的装置,其特征在于,所述第二init服务的第二init脚本对应的文件放置在非默认路径中。18. The device according to claim 17, wherein the file corresponding to the second init script of the second init service is placed in a non-default path.
  19. 根据权利要求18所述的装置,其特征在于,所述第二init脚本对应的文件放置在init进程能够解析并加载的非默认路径中。The device according to claim 18, wherein the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
  20. 根据权利要求16所述的装置,其特征在于,所述处理器在执行所述 计算机程序时,实现如下步骤:The device according to claim 16, wherein the processor implements the following steps when executing the computer program:
    使SystemServer进程加载第一java服务,所述第一java服务包括懒加载服务管理器和其它第一java服务,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后通过所述懒加载服务管理器被加载。Make the SystemServer process load the first java service. The first java service includes a lazy loading service manager and other first java services. The second init service and the second java service can be completed after the Android system is started. It is loaded by the lazy loading service manager.
  21. 根据权利要求20所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 20, wherein the processor implements the following steps when executing the computer program:
    使SystemServer进程加载所述懒加载服务管理器;Enabling the SystemServer process to load the lazy loading service manager;
    通过所述懒加载服务管理器将需要进行懒加载的java服务进行标记,得到标记的第二java服务,将需要进行懒加载的init服务进行标记,得到标记的第二init服务。Through the lazy loading service manager, the java services that need to be lazy loaded are marked to obtain the marked second java service, and the init services that need to be lazy loaded are marked to obtain the marked second init service.
  22. 根据权利要求21所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 21, wherein the processor implements the following steps when executing the computer program:
    所述安卓系统启动完成后,通过所述懒加载服务管理器接收加载指定java服务的第一请求;After the Android system is started, receiving a first request for loading a specified java service through the lazy loading service manager;
    根据所述第一请求,加载所述指定java服务。According to the first request, the specified java service is loaded.
  23. 根据权利要求22所述的装置,其特征在于,所述标记的第二java服务包括懒加载java服务名称以及懒加载java服务名称对应的加载代码之间的对应关系;The apparatus according to claim 22, wherein the marked second java service includes a correspondence between a lazy-loaded java service name and the loading code corresponding to the lazy-loaded java service name;
    所述处理器在执行所述计算机程序时,实现如下步骤:When the processor executes the computer program, the following steps are implemented:
    根据所述第一请求中携带的指定java服务的名称,确定对应的懒加载java服务名称以及所述懒加载java服务名称对应的加载代码;Determining the corresponding lazy loading java service name and the loading code corresponding to the lazy loading java service name according to the name of the specified java service carried in the first request;
    加载所述懒加载java服务名称对应的加载代码。Load the loading code corresponding to the lazy loading java service name.
  24. 根据权利要求21所述的装置,其特征在于,所述懒加载服务管理器能够与init进程进行通信。The apparatus according to claim 21, wherein the lazy loading service manager can communicate with the init process.
  25. 根据权利要求24所述的装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The device according to claim 24, wherein the processor implements the following steps when executing the computer program:
    所述安卓系统启动完成后,通过所述懒加载服务管理器接收加载指定init服务的第二请求;After the Android system is started, receiving a second request for loading a specified init service through the lazy loading service manager;
    根据所述第二请求,通过所述懒加载服务管理器使所述init进程解析并加 载对应的第二init脚本记录的指定init服务。According to the second request, the lazy loading service manager enables the init process to parse and load the specified init service recorded by the corresponding second init script.
  26. 根据权利要求25所述的装置,其特征在于,所述标记的第二init服务包括懒加载init服务名称、所述懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径之间的对应关系;The device according to claim 25, wherein the marked second init service includes a lazy-loaded init service name, a lazy-loaded init script corresponding to the lazy-loaded init service name, and a lazy-loaded init script corresponding to the lazy-loaded init script Correspondence between paths;
    所述处理器在执行所述计算机程序时,实现如下步骤:When the processor executes the computer program, the following steps are implemented:
    根据所述第二请求中携带的指定init服务的名称,确定对应的懒加载init服务名称、所述懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径;Determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script according to the name of the designated init service carried in the second request;
    通过所述懒加载服务管理器使所述init进程按照所述懒加载路径解析并加载懒加载init脚本记录的懒加载init服务。The lazy loading service manager enables the init process to analyze and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
  27. 根据权利要求24-26任一项所述的装置,其特征在于,所述懒加载服务管理器能够通过所述init进程的ctrl.loadrc属性接口与所述init进程进行通信,所述init进程能够加载所述ctrl.loadrc属性接口的属性携带的参数中的第二init初始化脚本。The device according to any one of claims 24-26, wherein the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process can Load the second init initialization script in the parameters carried by the attributes of the ctrl.loadrc attribute interface.
  28. 根据权利要求22或25所述的装置,其特征在于,所述懒加载服务管理器能够与应用程序通信。The device according to claim 22 or 25, wherein the lazy loading service manager can communicate with an application program.
  29. 根据权利要求28所述的装置,其特征在于,所述第一请求或所述第二请求来自所述应用程序。The device according to claim 28, wherein the first request or the second request comes from the application program.
  30. 根据权利要求28所述的装置,其特征在于,所述懒加载服务管理器能够通过软件开发包与所述应用程序进行通信。The device according to claim 28, wherein the lazy loading service manager can communicate with the application program through a software development kit.
  31. 一种终端设备,其特征在于,所述终端设备的操作系统包括安卓系统,所述安卓系统中的init服务包括第一init服务和第二init服务;所述安卓系统的java服务包括第一java服务和第二java服务,所述终端设备包括:处理器、和与所述处理器连接的存储器、输入输出设备及通信电路;A terminal device, characterized in that the operating system of the terminal device includes an Android system, the init service in the Android system includes a first init service and a second init service; the java service of the Android system includes a first java Service and a second java service, the terminal device includes: a processor, and a memory connected to the processor, an input/output device, and a communication circuit;
    所述存储器用于存储计算机程序;The memory is used to store a computer program;
    所述处理器用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is used to execute the computer program and when executing the computer program, implement the following steps:
    所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中所述第一init服务包括java启动服务;After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
    在加载所述java启动服务后,加载第一java服务;After loading the java startup service, load the first java service;
    在加载第一java服务完成后,启动桌面启动器,从而完成所述安卓系统的启动;其中,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后被加载。After the loading of the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
  32. 根据权利要求31所述的终端设备,其特征在于,所述输入输出设备包括显示屏、键盘、USB接口、耳机接口、摄像头、扬声器以及听筒。The terminal device according to claim 31, wherein the input and output devices comprise a display screen, a keyboard, a USB interface, a headphone interface, a camera, a speaker, and a receiver.
  33. 根据权利要求31所述的终端设备,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The terminal device according to claim 31, wherein the processor implements the following steps when executing the computer program:
    自动解析并加载默认路径中的第一init脚本记录的第一init服务。Automatically parse and load the first init service recorded by the first init script in the default path.
  34. 根据权利要求33所述的终端设备,其特征在于,所述第二init服务的第二init脚本对应的文件放置在非默认路径中。The terminal device according to claim 33, wherein the file corresponding to the second init script of the second init service is placed in a non-default path.
  35. 根据权利要求34所述的终端设备,其特征在于,所述第二init脚本对应的文件放置在init进程能够解析并加载的非默认路径中。The terminal device according to claim 34, wherein the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
  36. 根据权利要求31所述的终端设备,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The terminal device according to claim 31, wherein the processor implements the following steps when executing the computer program:
    使SystemServer进程加载第一java服务,所述第一java服务包括懒加载服务管理器和其它第一java服务,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后通过所述懒加载服务管理器被加载。Make the SystemServer process load the first java service. The first java service includes a lazy loading service manager and other first java services. The second init service and the second java service can be completed after the Android system is started. It is loaded by the lazy loading service manager.
  37. 根据权利要求36所述的终端设备,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The terminal device according to claim 36, wherein the processor implements the following steps when executing the computer program:
    使SystemServer进程加载所述懒加载服务管理器;Enabling the SystemServer process to load the lazy loading service manager;
    通过所述懒加载服务管理器将需要进行懒加载的java服务进行标记,得到标记的第二java服务,将需要进行懒加载的init服务进行标记,得到标记的第二init服务。Through the lazy loading service manager, the java services that need to be lazy loaded are marked to obtain the marked second java service, and the init services that need to be lazy loaded are marked to obtain the marked second init service.
  38. 根据权利要求37所述的终端设备,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The terminal device according to claim 37, wherein the processor implements the following steps when executing the computer program:
    所述安卓系统启动完成后,通过所述懒加载服务管理器接收加载指定java服务的第一请求;After the Android system is started, receiving a first request for loading a specified java service through the lazy loading service manager;
    根据所述第一请求,加载所述指定java服务。According to the first request, the specified java service is loaded.
  39. 根据权利要求38所述的终端设备,其特征在于,所述标记的第二java服务包括懒加载java服务名称以及懒加载java服务名称对应的加载代码之间的对应关系;The terminal device according to claim 38, wherein the marked second java service includes a correspondence between a lazy loading java service name and a loading code corresponding to the lazy loading java service name;
    所述处理器在执行所述计算机程序时,实现如下步骤:When the processor executes the computer program, the following steps are implemented:
    根据所述第一请求中携带的指定java服务的名称,确定对应的懒加载java服务名称以及所述懒加载java服务名称对应的加载代码;Determining the corresponding lazy loading java service name and the loading code corresponding to the lazy loading java service name according to the name of the specified java service carried in the first request;
    加载所述懒加载java服务名称对应的加载代码。Load the loading code corresponding to the lazy loading java service name.
  40. 根据权利要求37所述的终端设备,其特征在于,所述懒加载服务管理器能够与init进程进行通信。The terminal device according to claim 37, wherein the lazy loading service manager can communicate with the init process.
  41. 根据权利要求40所述的终端设备,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The terminal device according to claim 40, wherein the processor implements the following steps when executing the computer program:
    所述安卓系统启动完成后,通过所述懒加载服务管理器接收加载指定init服务的第二请求;After the Android system is started, receiving a second request for loading a specified init service through the lazy loading service manager;
    根据所述第二请求,通过所述懒加载服务管理器使所述init进程解析并加载对应的第二init脚本记录的指定init服务。According to the second request, the lazy loading service manager enables the init process to parse and load the specified init service recorded by the corresponding second init script.
  42. 根据权利要求41所述的终端设备,其特征在于,所述标记的第二init服务包括懒加载init服务名称、所述懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径之间的对应关系;The terminal device according to claim 41, wherein the marked second init service includes a lazy loading init service name, a lazy loading init script corresponding to the lazy loading init service name, and a lazy loading init script corresponding to the lazy loading init script. Correspondence between loading paths;
    所述处理器在执行所述计算机程序时,实现如下步骤:When the processor executes the computer program, the following steps are implemented:
    根据所述第二请求中携带的指定init服务的名称,确定对应的懒加载init服务名称、所述懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径;Determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script according to the name of the designated init service carried in the second request;
    通过所述懒加载服务管理器使所述init进程按照所述懒加载路径解析并加载懒加载init脚本记录的懒加载init服务。The lazy loading service manager enables the init process to analyze and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
  43. 根据权利要求40-42任一项所述的终端设备,其特征在于,所述懒加载服务管理器能够通过所述init进程的ctrl.loadrc属性接口与所述init进程进行通信,所述init进程能够加载所述ctrl.loadrc属性接口的属性携带的参数中的第二init初始化脚本。The terminal device according to any one of claims 40-42, wherein the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process The second init initialization script in the parameters carried by the attributes of the ctrl.loadrc attribute interface can be loaded.
  44. 根据权利要求38或41所述的终端设备,其特征在于,所述懒加载服 务管理器能够与应用程序通信。The terminal device according to claim 38 or 41, wherein the lazy loading service manager can communicate with an application program.
  45. 根据权利要求44所述的终端设备,其特征在于,所述第一请求或所述第二请求来自所述应用程序。The terminal device according to claim 44, wherein the first request or the second request comes from the application program.
  46. 根据权利要求44所述的终端设备,其特征在于,所述懒加载服务管理器能够通过软件开发包与所述应用程序进行通信。The terminal device according to claim 44, wherein the lazy loading service manager can communicate with the application program through a software development kit.
  47. 一种拍摄装置,其特征在于,所述拍摄装置的操作系统包括安卓系统,所述安卓系统中的init服务包括第一init服务和第二init服务;所述安卓系统的java服务包括第一java服务和第二java服务,所述拍摄装置包括:处理器、和存储器;A photographing device, characterized in that the operating system of the photographing device includes an Android system, the init service in the Android system includes a first init service and a second init service; the java service of the Android system includes the first java Service and a second java service, the photographing device includes: a processor and a memory;
    所述存储器用于存储计算机程序;The memory is used to store a computer program;
    所述处理器用于执行所述计算机程序并在执行所述计算机程序时,实现如下步骤:The processor is used to execute the computer program and when executing the computer program, implement the following steps:
    所述安卓系统的内核层启动完成后,解析并加载第一init脚本记录的第一init服务,其中所述第一init服务包括java启动服务;After the kernel layer of the Android system is started up, parse and load the first init service recorded by the first init script, where the first init service includes a java startup service;
    在加载所述java启动服务后,加载第一java服务;After loading the java startup service, load the first java service;
    在加载第一java服务完成后,启动桌面启动器,从而完成所述安卓系统的启动;其中,所述第二init服务和所述第二java服务能够在所述安卓系统启动完成后被加载。After the loading of the first java service is completed, the desktop launcher is started to complete the startup of the Android system; wherein the second init service and the second java service can be loaded after the Android system is started.
  48. 根据权利要求47所述的拍摄装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The photographing device according to claim 47, wherein the processor implements the following steps when executing the computer program:
    自动解析并加载默认路径中的第一init脚本记录的第一init服务。Automatically parse and load the first init service recorded by the first init script in the default path.
  49. 根据权利要求48所述的拍摄装置,其特征在于,所述第二init服务的第二init脚本对应的文件放置在非默认路径中。The photographing device according to claim 48, wherein the file corresponding to the second init script of the second init service is placed in a non-default path.
  50. 根据权利要求49所述的拍摄装置,其特征在于,所述第二init脚本对应的文件放置在init进程能够解析并加载的非默认路径中。The photographing device according to claim 49, wherein the file corresponding to the second init script is placed in a non-default path that can be parsed and loaded by the init process.
  51. 根据权利要求47所述的拍摄装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The photographing device according to claim 47, wherein the processor implements the following steps when executing the computer program:
    使SystemServer进程加载第一java服务,所述第一java服务包括懒加载服务管理器和其它第一java服务,所述第二init服务和所述第二java服务能 够在所述安卓系统启动完成后通过所述懒加载服务管理器被加载。Make the SystemServer process load the first java service. The first java service includes a lazy loading service manager and other first java services. The second init service and the second java service can be completed after the Android system is started. It is loaded by the lazy loading service manager.
  52. 根据权利要求51所述的拍摄装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The photographing device according to claim 51, wherein the processor implements the following steps when executing the computer program:
    使SystemServer进程加载所述懒加载服务管理器;Enabling the SystemServer process to load the lazy loading service manager;
    通过所述懒加载服务管理器将需要进行懒加载的java服务进行标记,得到标记的第二java服务,将需要进行懒加载的init服务进行标记,得到标记的第二init服务。Through the lazy loading service manager, the java services that need to be lazy loaded are marked to obtain the marked second java service, and the init services that need to be lazy loaded are marked to obtain the marked second init service.
  53. 根据权利要求52所述的拍摄装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The photographing device according to claim 52, wherein the processor implements the following steps when executing the computer program:
    所述安卓系统启动完成后,通过所述懒加载服务管理器接收加载指定java服务的第一请求;After the Android system is started, receiving a first request for loading a specified java service through the lazy loading service manager;
    根据所述第一请求,加载所述指定java服务。According to the first request, the specified java service is loaded.
  54. 根据权利要求53所述的拍摄装置,其特征在于,所述标记的第二java服务包括懒加载java服务名称以及懒加载java服务名称对应的加载代码之间的对应关系;The photographing device according to claim 53, wherein the marked second java service includes a correspondence between a lazy loading java service name and the loading code corresponding to the lazy loading java service name;
    所述处理器在执行所述计算机程序时,实现如下步骤:When the processor executes the computer program, the following steps are implemented:
    根据所述第一请求中携带的指定java服务的名称,确定对应的懒加载java服务名称以及所述懒加载java服务名称对应的加载代码;Determining the corresponding lazy loading java service name and the loading code corresponding to the lazy loading java service name according to the name of the specified java service carried in the first request;
    加载所述懒加载java服务名称对应的加载代码。Load the loading code corresponding to the lazy loading java service name.
  55. 根据权利要求52所述的拍摄装置,其特征在于,所述懒加载服务管理器能够与init进程进行通信。The photographing device according to claim 52, wherein the lazy loading service manager can communicate with the init process.
  56. 根据权利要求55所述的拍摄装置,其特征在于,所述处理器在执行所述计算机程序时,实现如下步骤:The photographing device according to claim 55, wherein the processor implements the following steps when executing the computer program:
    所述安卓系统启动完成后,通过所述懒加载服务管理器接收加载指定init服务的第二请求;After the Android system is started, receiving a second request for loading a specified init service through the lazy loading service manager;
    根据所述第二请求,通过所述懒加载服务管理器使所述init进程解析并加载对应的第二init脚本记录的指定init服务。According to the second request, the lazy loading service manager enables the init process to parse and load the specified init service recorded by the corresponding second init script.
  57. 根据权利要求56所述的拍摄装置,其特征在于,所述标记的第二init服务包括懒加载init服务名称、所述懒加载init服务名称对应的懒加载init脚 本以及懒加载init脚本对应的懒加载路径之间的对应关系;The photographing device according to claim 56, wherein the marked second init service includes a lazy loading init service name, a lazy loading init script corresponding to the lazy loading init service name, and a lazy loading init script corresponding to the lazy loading init script. Correspondence between loading paths;
    所述处理器在执行所述计算机程序时,实现如下步骤:When the processor executes the computer program, the following steps are implemented:
    根据所述第二请求中携带的指定init服务的名称,确定对应的懒加载init服务名称、所述懒加载init服务名称对应的懒加载init脚本以及懒加载init脚本对应的懒加载路径;Determine the corresponding lazy loading init service name, the lazy loading init script corresponding to the lazy loading init service name, and the lazy loading path corresponding to the lazy loading init script according to the name of the designated init service carried in the second request;
    通过所述懒加载服务管理器使所述init进程按照所述懒加载路径解析并加载懒加载init脚本记录的懒加载init服务。The lazy loading service manager enables the init process to analyze and load the lazy loading init service recorded by the lazy loading init script according to the lazy loading path.
  58. 根据权利要求55-57任一项所述的拍摄装置,其特征在于,所述懒加载服务管理器能够通过所述init进程的ctrl.loadrc属性接口与所述init进程进行通信,所述init进程能够加载所述ctrl.loadrc属性接口的属性携带的参数中的第二init初始化脚本。The photographing device according to any one of claims 55-57, wherein the lazy loading service manager can communicate with the init process through the ctrl.loadrc attribute interface of the init process, and the init process The second init initialization script in the parameters carried by the attributes of the ctrl.loadrc attribute interface can be loaded.
  59. 根据权利要求53或56所述的拍摄装置,其特征在于,所述懒加载服务管理器能够与应用程序通信。The photographing device according to claim 53 or 56, wherein the lazy loading service manager can communicate with an application program.
  60. 根据权利要求59所述的拍摄装置,其特征在于,所述第一请求或所述第二请求来自所述应用程序。The photographing device according to claim 59, wherein the first request or the second request comes from the application program.
  61. 根据权利要求59所述的拍摄装置,其特征在于,所述懒加载服务管理器能够通过软件开发包与所述应用程序进行通信。The photographing device according to claim 59, wherein the lazy loading service manager can communicate with the application through a software development kit.
  62. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时使所述处理器实现如权利要求1-15任一项所述的安卓系统启动的方法。A computer-readable storage medium, characterized in that, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor realizes any one of claims 1-15. The method to start the Android system.
PCT/CN2019/119522 2019-11-19 2019-11-19 Android system starting method and apparatus, device, and storage medium WO2021097683A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201980040209.1A CN112313620A (en) 2019-11-19 2019-11-19 Android system starting method, device, equipment and storage medium
PCT/CN2019/119522 WO2021097683A1 (en) 2019-11-19 2019-11-19 Android system starting method and apparatus, device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/119522 WO2021097683A1 (en) 2019-11-19 2019-11-19 Android system starting method and apparatus, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2021097683A1 true WO2021097683A1 (en) 2021-05-27

Family

ID=74336508

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119522 WO2021097683A1 (en) 2019-11-19 2019-11-19 Android system starting method and apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN112313620A (en)
WO (1) WO2021097683A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114047961A (en) * 2021-11-15 2022-02-15 合众新能源汽车有限公司 Android system starting optimization method, intelligent terminal and computer readable medium
CN116048629B (en) * 2022-08-22 2024-04-05 荣耀终端有限公司 System service switching method, control device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050001A (en) * 2014-06-24 2014-09-17 中科创达软件股份有限公司 Resource processing method, device and equipment based on Android system
CN104598254A (en) * 2015-02-17 2015-05-06 福州瑞芯微电子有限公司 Method and device for rapidly powering on Android system
KR20170005536A (en) * 2015-07-06 2017-01-16 주식회사 인프라웨어테크놀러지 Method, computing device and computer program stored on conputer-readable medium for improving bootup performance of android system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104050001A (en) * 2014-06-24 2014-09-17 中科创达软件股份有限公司 Resource processing method, device and equipment based on Android system
CN104598254A (en) * 2015-02-17 2015-05-06 福州瑞芯微电子有限公司 Method and device for rapidly powering on Android system
KR20170005536A (en) * 2015-07-06 2017-01-16 주식회사 인프라웨어테크놀러지 Method, computing device and computer program stored on conputer-readable medium for improving bootup performance of android system

Also Published As

Publication number Publication date
CN112313620A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
US11829787B2 (en) Multi-process model for cross-platform applications
US9798555B2 (en) Application implementation method and apparatus
US8555280B2 (en) Terminal device of non-android platform for executing android applications, and computer readable recording medium for storing program of executing android applications on non-android platform
CN111158818A (en) Page rendering method and device
US10019298B2 (en) Middleware interface and middleware interface generator
US11853820B2 (en) Cross-process communication method, apparatus, and device
US20140033208A1 (en) Method and device for loading application program
TW202006538A (en) Method and device for running program, calculating apparatus and storage medium
WO2019090994A1 (en) Script testing automated execution method, apparatus, equipment and storage medium
US10908948B2 (en) Multiple application instances in operating systems that utilize a single process for application execution
JP7100154B6 (en) Processor core scheduling method, device, terminal and storage medium
CN109933381B (en) Kernel loading method and device
CN111767090A (en) Method and device for starting small program, electronic equipment and storage medium
WO2021097683A1 (en) Android system starting method and apparatus, device, and storage medium
CN111427594A (en) Application program running method and device
CN114816676A (en) System and method for realizing multi-tenant deployment of low code development platform
CN113448650A (en) Live broadcast function plug-in loading method, device, equipment and storage medium
WO2023124657A1 (en) Micro-application running method and apparatus, device, storage medium, and program product
US20220326939A1 (en) Mobile service upgrade method and apparatus, and terminal
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
WO2012055176A1 (en) Processing method for mobile terminal and mobile terminal
CN108804236B (en) AIDL file sharing method and system
US11811878B1 (en) Session manager providing bidirectional data transport
CN110389791B (en) Component scheduling method, device, equipment and storage medium
WO2022104883A1 (en) Adding method and apparatus for coexistence of multiple types of scenarios, terminal and storage medium

Legal Events

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

Ref document number: 19953222

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19953222

Country of ref document: EP

Kind code of ref document: A1