WO2018028055A1 - 在Windows系统上运行Android应用程序的方法及装置 - Google Patents

在Windows系统上运行Android应用程序的方法及装置 Download PDF

Info

Publication number
WO2018028055A1
WO2018028055A1 PCT/CN2016/104235 CN2016104235W WO2018028055A1 WO 2018028055 A1 WO2018028055 A1 WO 2018028055A1 CN 2016104235 W CN2016104235 W CN 2016104235W WO 2018028055 A1 WO2018028055 A1 WO 2018028055A1
Authority
WO
WIPO (PCT)
Prior art keywords
android
application
dynamic link
link library
file
Prior art date
Application number
PCT/CN2016/104235
Other languages
English (en)
French (fr)
Inventor
严晗
冉欣
梁志辉
Original Assignee
北京奇虎科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京奇虎科技有限公司 filed Critical 北京奇虎科技有限公司
Priority to US15/741,179 priority Critical patent/US20180357085A1/en
Publication of WO2018028055A1 publication Critical patent/WO2018028055A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45537Provision of facilities of other operating environments, e.g. WINE
    • 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/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45504Abstract machines for programme code execution, e.g. Java virtual machine [JVM], interpreters, emulators
    • G06F9/45516Runtime code conversion or optimisation
    • G06F9/4552Involving translation to a different instruction set architecture, e.g. just-in-time translation in a JVM

Definitions

  • the present invention relates to the field of computer technology, and in particular, to a method for running an Android application on a Windows system, a device for running an Android application on a Windows system, a computer program, and a computer readable medium.
  • a virtual machine needs to be installed on the PC end of the Windows operating system, and a virtual Android operating system is run in the virtual machine, and then the Android application is installed and run in the virtual Android operating system.
  • the full kernel-level driver of the virtual machine must be installed.
  • the process of calling each kernel driver during the running of the application is extremely complicated and consumes system resources; on the other hand, virtual
  • the running process of the machine itself requires a large amount of hard disk space and memory on the PC side, and a large amount of system resources on the PC side are occupied, which will reduce the response speed of each process running on the PC side; on the other hand, the implementation of the prior art greatly depends on the pair.
  • Embodiments of the present invention propose a method for running an Android application on a Windows system, including:
  • the Android virtual machine's dynamic link library related file is loaded by loading a predetermined format of the Linux executable file to launch the Android virtual machine;
  • Another embodiment of the present invention provides an apparatus for running an Android application on a Windows system, including:
  • a first loading module configured to load a dynamic link library related file of the Android virtual machine by loading a predetermined format of the Linux executable file to start the Android virtual machine in response to an instruction to launch the application;
  • a second loading module configured to start loading a dynamic link library related file of the application
  • a third loading module configured to load a predetermined engine file and related executable file in the application by starting the Android virtual machine
  • the fourth loading module is configured to load the dynamic link library related file of the application in the life cycle of the Activity resource to run the application.
  • Embodiments of the present invention also provide a computer program comprising computer readable code, when the readable code is run on a computing device, causing the computing device to perform according to any of the embodiments of the present invention
  • the method of running an Android application on a Windows system The method of running an Android application on a Windows system.
  • the embodiment of the invention further provides a computer readable medium, wherein the program according to the embodiment of the invention is stored.
  • a scheme for running an Android application on a Windows system is proposed.
  • a dynamic link library related file of the Android virtual machine is loaded by loading a Linux executable file of a predetermined format.
  • Start the Android virtual machine realize the normal operation of the Android virtual machine on the Windows system, and provide an important prerequisite for the Android application to run on the Windows system; start loading the application's dynamic link library related files, by launching Android
  • the virtual machine loads the predetermined engine files and related executable files in the application, and implements the Android application to occupy less system resources during the running process by running the application in the customized simplified Android system.
  • the Android application runs the card in the Windows system, slow and so on; by calling the scheduled startup process, calling the Activity resource corresponding to the application, in the life cycle of the Activity resource, completing the dynamic link library related file of the application application, completely
  • the Android application runs normally in the form of a native application on the Windows system. At the same time, the normal operation of the Android application in the Windows system can be realized without the complicated operation mode of the user, and further, the user's use is improved. Experience.
  • FIG. 1 is a flow chart of a method for running an Android application on a Windows system according to an embodiment of the present invention
  • FIG. 2 is a schematic structural diagram of an apparatus for running an Android application on a Windows system according to another embodiment of the present invention
  • FIG. 3 is a schematic structural diagram of an apparatus for running an Android application on a Windows system according to still another embodiment of the present invention.
  • FIG. 4 shows a block diagram of a computing device for performing a method of running an Android application on a Windows system in accordance with the present invention
  • FIG. 5 illustrates a storage unit for maintaining or carrying program code that implements a method of running an Android application on a Windows system in accordance with the present invention.
  • FIG. 1 is a flow chart of a method of running an Android application on a Windows system according to an embodiment of the present invention.
  • Step S110 In response to an instruction to start the application, the dynamic link library related file of the Android virtual machine is loaded by loading a Linux executable file of a predetermined format to start the Android virtual machine.
  • Step S120 start loading the dynamic link library related file of the application;
  • step S130 load the predetermined engine file and related executable file in the application by starting the Android virtual machine;
  • step S140 calling by calling a predetermined startup process The Activity resource corresponding to the application;
  • Step S150 In the life cycle of the Activity resource, complete loading the dynamic link library related file of the application to run the application.
  • a method for running an Android application on a Windows system is proposed.
  • a dynamic link library related file of an Android virtual machine is loaded by loading a Linux executable file of a predetermined format.
  • Start the Android virtual machine realize the normal operation of the Android virtual machine on the Windows system, and provide an important prerequisite for the Android application to run on the Windows system; start loading the application's dynamic link library related files, by launching Android
  • the virtual machine loads the predetermined engine files and related executable files in the application, and implements the Android application to occupy less system resources during the running process by running the application in the customized simplified Android system, and solves the Android application.
  • the program runs the card in the Windows system, slow and so on; by calling the predetermined startup process, calling the Activity resource corresponding to the application, in the life cycle of the Activity resource, completing the dynamic link library related file of the application, completely implementing Android Application in Wi
  • the ndows system runs normally in the form of a native application.
  • the normal operation of the Android application in the Windows system can be realized without the complicated operation mode of the user, and the user experience is further improved.
  • the following is a further description of the specific implementation of each step:
  • Step S110 In response to the instruction to start the application, the dynamic link library related file of the Android virtual machine is loaded by loading a Linux executable file of a predetermined format to start the Android virtual machine.
  • the application layer of the Android operating system is written in the Java language, so the Android virtual machine is shipped. In the process of the line, the relevant files of Java will be loaded.
  • the Android virtual machine first loads the necessary libraries of the Android virtual machine, such as the Java virtual machine Dalvik running the Android system. Custom CRT related libraries, including interfaces that have implemented libc.so, OpenGL ES interfaces, OpenSL ES interfaces, and some Android NDK (Native Development Kit) interfaces, etc., and then the Android virtual machine is loaded in a predetermined format.
  • Linux executable files such as ELF format related files
  • dynamic link library related files of the Android virtual machine such as the related .so file of the Java virtual machine Dalvik and the related files of the math library libm.so of the Android system. To start the Java virtual machine Dalvik for Android.
  • the step of loading the dynamic link library related file of the Android virtual machine in step S110 specifically includes step S111 (not shown); and step S111: loading the dynamic link library related file of the Android virtual machine by a predetermined startup process.
  • the dynamic link library related files for loading the Android virtual machine are started, such as the related .so file of the Java virtual machine Dalvik of the predetermined Android system.
  • Step S120 Start loading the dynamic link library related file of the application.
  • the dynamic link library related file of the application App1 such as the related .so file of the App1
  • the dynamic link library related file of the application App1 can be started.
  • Step S130 Load the predetermined engine file and related executable file in the application by starting the Android virtual machine.
  • the predetermined engine files include DEX related files of the Android system, related files of the Android system dynamic link library, and related files of the application dynamic link library.
  • the predetermined engine file and related executable files in the application App1 are loaded, such as a related .so file of a predetermined system library of the Android system, wherein the system library of the predetermined Android system is reserved.
  • the related .so file is for the simplified Android operating system.
  • the related .so file of the scheduled Android system library includes the necessary files related to the Android system, and deletes unnecessary Android system files in Windows, such as Android.
  • Related files for power management in the system DEX related files of the Android system, such as classes.dex code files for encapsulating program code for implementing various components of Android; and App1 related .so files.
  • Step S140 Call the Activity resource corresponding to the application by calling a predetermined startup process.
  • Android For example, by calling a custom Android Framework related class and other Java related class processes, call the Android system Activity resource.
  • Android all operations in the Activity are closely related to the user.
  • Off is a component responsible for interacting with the user.
  • Android provides four components for developers, specifically components such as Activity, Service, Broadcast Receiver, and Content Provider.
  • Content Provider is one of the components of Android application.
  • Activity is Android application.
  • the component responsible for interacting with the user; the Service is usually running in the background, it generally does not need to interact with the user, so the Service component does not have a graphical user interface. After a Service component is run, it will have its own independent life cycle.
  • the Service component usually Used to provide background services for other components or to monitor the running status of other components; Broadcast Receiver represents a broadcast message receiver.
  • Step S150 In the life cycle of the Activity resource, complete loading the dynamic link library related file of the application to run the application.
  • the dynamic link library related file of the loading application is completed by a predetermined startup process.
  • the Activity life cycle refers to the process from the start to the destruction of the Activity.
  • the life cycle of the Activity resource for example, by calling a custom Android Framework related class and other Java related class processes, the related .so file of the application App1 is loaded to run App1.
  • the method further includes step S160 (not shown); and step S160: receiving a Windows operation instruction of the application, and converting the Windows operation instruction into a corresponding Android operation instruction by using an Android virtual machine.
  • the Android virtual machine since the Android virtual machine has a custom CRT library and other underlying libraries, it can support running a Linux executable file by loading a predetermined format, such as an ELF format related file, to load a dynamic link library related file of the Android virtual machine. For example, if you load libdvm.so (that is, the Java virtual machine Dalvik of Android system), the user executes the related operations of the application App1 in the Windows operating system, such as the operation of clicking the mouse, and after receiving the instruction of App1 clicking the mouse, through the Android virtual The machine converts the operation command of Windows click mouse into the corresponding operation instruction of Android click mouse to realize the normal operation of App1.
  • libdvm.so that is, the Java virtual machine Dalvik of Android system
  • the method further includes step S170 (not shown) and step S180 (not shown); and step S170: sending the converted Android operation instruction to the dynamic link library of the application.
  • Step S180 The application performs a corresponding operation in the Windows system according to the received converted Android operation instruction.
  • the converted Android operation instruction is sent to the dynamic link library related file of the application, including at least one of the following situations:
  • the retrieved converted Android operation instruction is fed back to the dynamic link library related file of the application.
  • the converted Android operation instruction If the converted Android mouse click operation command is sent to the relevant .so file of App1, App1 performs the corresponding mouse click operation in the Windows system according to the operation instruction of receiving the converted Android mouse click.
  • the reflection mechanism used in this embodiment may be a Java reflection mechanism.
  • the Java reflection mechanism is in the running state.
  • all the attributes and methods of the class can be known; for any object, Can call any of its methods; this dynamic acquisition of information and the function of the method of dynamically calling the object is the reflection mechanism of the Java language.
  • the converted operation command of the Android mouse click is sent to the related .so file of the App1 through the predetermined calling interface, and the App1 receives the conversion according to the The operation command of the Android mouse clicks to perform the corresponding mouse click operation in the Windows system.
  • FIG. 2 is a schematic structural diagram of an apparatus for running an Android application on a Windows system according to another embodiment of the present invention.
  • the content executed by each module is summarized as follows: the first loading module 210 loads the dynamic link library related file of the Android virtual machine by loading a Linux executable file of a predetermined format in response to an instruction to start the application to start The Android virtual machine; the second loading module 220 starts loading the dynamic link library related file of the application; the third loading module 230 loads the predetermined engine file and the related executable file in the application by starting the Android virtual machine; the calling module 240 calls The predetermined startup process calls the Activity resource corresponding to the application; the fourth loading module 250 finishes loading the dynamic link library related file of the application in the life cycle of the Activity resource to run the application.
  • an apparatus for running an Android application on a Windows system In response to an instruction to launch an application, a dynamic link library related file of an Android virtual machine is loaded by loading a Linux executable file of a predetermined format. Start the Android virtual machine, realize the normal operation of the Android virtual machine on the Windows system, and provide an important prerequisite for the Android application to run on the Windows system; start loading the application's dynamic link library related files, by launching Android Virtual machine, load the scheduled engine files and related executable files in the application, through the simplified Android system in the customization Running the application, the Android application occupies less system resources during the running process, solves the problem that the Android application runs the card in the Windows system, and the like; by calling the predetermined startup process, calling the activity corresponding to the application Resources, in the life cycle of the Activity resource, complete the dynamic link library related files for loading the application, completely realize the Android application running normally in the form of the native application in the Windows system, and at the same time, without the complicated operation mode of the user Realize the normal and fast running
  • the first loading module 210 loads the dynamic link library related file of the Android virtual machine by loading a Linux executable file of a predetermined format in response to an instruction to launch the application to launch the Android virtual machine.
  • the application layer of the Android operating system is written in the Java language, so in the process of running the Android virtual machine, Java related files will be loaded, and when the application App1 is run in the Android virtual machine, the Android virtual machine first loads Android after running.
  • the necessary libraries for virtual machines such as the custom CRT-related library of the Java virtual machine Dalvik of Android system, to implement the interface of libc.so, OpenGL ES interface, OpenSL ES interface and some Android NDK (Native Development Kit, native development) Toolkit) interface
  • the Android virtual machine loads the Android virtual machine's dynamic link library related files by loading a predetermined format of the Linux executable file, such as ELF format related files, such as the predetermined Android system Java virtual machine Dalvik related .so file and related files of the math library libm.so, etc., to start the Java virtual machine Dalvik of the Android system.
  • FIG. 3 is a schematic structural diagram of an apparatus for running an Android application on a Windows system according to still another embodiment of the present invention.
  • the first loading module 210 includes a loading unit 2101; the loading unit 2101 loads a dynamic link library related file of the Android virtual machine by a predetermined startup process.
  • the dynamic link library related files for loading the Android virtual machine are started, such as the related .so file of the Java virtual machine Dalvik of the predetermined Android system.
  • the second loading module 220 begins loading the dynamic link library related files of the application.
  • the dynamic link library related file of the application App1 such as the related .so file of the App1
  • the dynamic link library related file of the application App1 can be started.
  • the third loading module 230 loads the predetermined engine file and related executable file in the application by launching the Android virtual machine.
  • scheduled engine files including DEX related files of Android system, Android system dynamics
  • the relevant files of the link library and related files of the application dynamic link library are mapped to DEX related files of Android system.
  • the predetermined engine file and related executable files in the application App1 are loaded, such as a related .so file of a predetermined system library of the Android system, wherein the system library of the predetermined Android system is reserved.
  • the related .so file is for the simplified Android operating system.
  • the related .so file of the scheduled Android system library includes the necessary files related to the Android system, and deletes unnecessary Android system files in Windows, such as Android.
  • Related files for power management in the system DEX related files of the Android system, such as classes.dex code files for encapsulating program code for implementing various components of Android; and App1 related .so files.
  • the calling module 240 calls the Activity resource corresponding to the application by calling a predetermined startup process.
  • Android by calling a custom Android Framework related class and other Java related class processes, call the Android system Activity resource.
  • Android all operations in the Activity are closely related to the user, and are a component responsible for interacting with the user.
  • Android provides four components for developers, specifically components such as Activity, Service, Broadcast Receiver, and Content Provider.
  • Content Provider is one of the components of Android application.
  • Activity is Android application.
  • the component responsible for interacting with the user; the Service is usually running in the background, it generally does not need to interact with the user, so the Service component does not have a graphical user interface. After a Service component is run, it will have its own independent life cycle.
  • the Service component usually Used to provide background services for other components or to monitor the running status of other components; Broadcast Receiver represents a broadcast message receiver.
  • the fourth loading module 250 finishes loading the dynamic link library related files of the application in the life cycle of the Activity resource to run the application.
  • the dynamic link library related file of the loading application is completed by a predetermined startup process.
  • the Activity life cycle refers to the process from the start to the destruction of the Activity.
  • the life cycle of the Activity resource for example, by calling a custom Android Framework related class and other Java related class processes, the related .so file of the application App1 is loaded to run App1.
  • the apparatus further includes a conversion module 260; the conversion module 260 receives the Windows operation instruction of the application, and converts the Windows operation instruction into a corresponding Android operation instruction through the Android virtual machine.
  • the Android virtual machine since the Android virtual machine has a custom CRT library and other underlying libraries, it can support running. Load the Android virtual machine's dynamic link library related files by loading a predetermined format of the Linux executable file, such as the ELF format related file, such as loading libdvm.so (ie the Android system's Java virtual machine Dalvik), so the user operates in Windows
  • the system performs the related operations of the application App1, such as clicking the mouse operation, and after receiving the instruction of the App1 clicking the mouse, converting the operation command of the Windows click mouse to the corresponding Android click mouse operation instruction through the Android virtual machine, The normal operation of App1.
  • the apparatus further includes a sending module 270 and an executing module 280; the sending module 270 sends the converted Android operating instruction to the dynamic link library related file of the application; the executing module 280 is configured to receive the application according to the receiving The converted Android operation instructions perform the corresponding operations on the Windows system.
  • the converted Android operation instruction is sent to the dynamic link library related file of the application, including at least one of the following situations:
  • the retrieved converted Android operation instruction is fed back to the dynamic link library related file of the application.
  • the converted Android operation instruction If the converted Android mouse click operation command is sent to the relevant .so file of App1, App1 performs the corresponding mouse click operation in the Windows system according to the operation instruction of receiving the converted Android mouse click.
  • the reflection mechanism used in this embodiment may be a Java reflection mechanism.
  • the Java reflection mechanism is in the running state.
  • all the attributes and methods of the class can be known; for any object, Can call any of its methods; this dynamic acquisition of information and the function of the method of dynamically calling the object is the reflection mechanism of the Java language.
  • the converted operation command of the Android mouse click is sent to the related .so file of the App1 through the predetermined calling interface, and the App1 receives the conversion according to the The operation command of the Android mouse clicks to perform the corresponding mouse click operation in the Windows system.
  • the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
  • modules in the devices of the embodiments can be adaptively changed and placed in one or more devices different from the embodiment.
  • the modules or units or components of the embodiments may be combined into one module or unit or component, and further they may be divided into a plurality of sub-modules or sub-units or sub-components.
  • any combination of the features disclosed in the specification, including the accompanying claims, the abstract and the drawings, and any methods so disclosed, or All processes or units of the device are combined.
  • Each feature disclosed in this specification (including the accompanying claims, the abstract and the drawings) may be replaced by alternative features that provide the same, equivalent or similar purpose.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of some or all of the components of the background operation method and apparatus of the application in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • Such a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals can be downloaded from the Internet website. Either provided on the carrier signal or provided in any other form.
  • Figure 4 illustrates a computing device that can implement a method of running an Android application on a Windows system in accordance with the present invention.
  • the computing device conventionally includes a processor 410 and a program product or computer readable medium in the form of a memory 420.
  • Memory 420 can be an electronic memory such as a flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, or ROM.
  • Memory 420 has a memory space 430 for program code 431 for performing any of the method steps described above.
  • storage space 430 for program code may include various program code 431 for implementing various steps in the above methods, respectively.
  • These program codes can be read from or written to one or more program products.
  • These program products include program code carriers such as memory cards.
  • Such a program product is typically a portable or fixed storage unit as described with reference to FIG.
  • the storage unit may have storage segments, storage spaces, and the like that are similarly arranged to memory 420 in the computing device of FIG.
  • the program code can be compressed, for example, in an appropriate form.
  • the storage unit includes readable code 431', ie, code that can be read by a processor, such as 410, which, when executed by a computing device, causes the computing device to perform various steps in the methods described above. .
  • the present invention includes apparatus related to performing one or more of the operations described herein. These devices may be specially designed and manufactured for the required purposes, or may also include known devices in a general purpose computer. These devices have computer programs stored therein that are selectively activated or reconfigured.
  • Such computer programs may be stored in a device (eg, computer) readable medium or in any type of medium suitable for storing electronic instructions and coupled to a bus, respectively, including but not limited to any Types of disks (including floppy disks, hard disks, optical disks, CD-ROMs, and magneto-optical disks), ROM (Read-Only Memory), RAM (Random Access Memory), EPROM (Erasable Programmable Read-Only Memory) , EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, magnetic card or light card.
  • a readable medium includes any medium that is stored or transmitted by a device (eg, a computer) in a readable form.
  • each block of the block diagrams and/or block diagrams and/or flow diagrams and combinations of blocks in the block diagrams and/or block diagrams and/or flow diagrams can be implemented by computer program instructions. .
  • these computer program instructions can be implemented by a general purpose computer, a professional computer, or a processor of other programmable data processing methods, such that the processor is executed by a computer or other programmable data processing method.

Landscapes

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

Abstract

在Windows系统上运行Android应用程序方法及装置,该方法包括:响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机(S110);开始加载应用程序的动态链接库相关文件(S120);通过启动Android虚拟机,加载应用程序中预定的引擎文件和相关可执行文件(S130);通过调用预定的启动进程,调用应用程序对应的Activity资源(S140);在Activity资源的生命周期中,完成加载应用程序的动态链接库相关文件,以运行应用程序(S150)。从而彻底实现了Android应用程序在Windows系统中以原生应用程序的形式正常运行,同时,无需用户的复杂操作方式即可实现Android应用程序在Windows系统中的正常、快速运行,进一步地,提高了用户的使用体验。

Description

在Windows系统上运行Android应用程序的方法及装置 技术领域
本发明涉及计算机技术领域,具体而言,本发明涉及一种在Windows系统上运行Android应用程序的方法、一种在Windows系统上运行Android应用程序的装置、一种计算机程序及一种计算机可读介质。
背景技术
随着计算机技术的不断发展,人们的生活越来越依赖于各种应用程序,人们对应用程序的使用需求也越来越多样化,用户在Android操作系统的移动终端上使用的游戏类应用程序时,用户希望在Windows操作系统的PC(Personal Computer,个人电脑)端也能实现对该应用程序的操作体验,使得用户能够在更大的显示屏中感受更加便捷、流畅的操作体验,从而解决由于移动终端屏幕较小而带来的视觉体验度不高的问题;同时,可以避免移动终端的处理器的因发热等原因导致的游戏卡死的情况,以及避免移动终端网络信号不稳定导致用户在操作游戏的过程中发生中断等情况。
现有技术中,首先需要在Windows操作系统的PC端安装虚拟机,通过在该虚拟机中运行虚拟的Android操作系统,随后在该虚拟的Android操作系统中安装并运行Android应用程序。一方面,在安装虚拟机的过程中,必须安装该虚拟机的全套内核级的驱动程序,在应用程序的运行过程中调用各内核驱动的过程极为复杂,且耗费系统资源;另一方面,虚拟机的运行过程本身需要耗费PC端的大量硬盘空间和内存,PC端大量的系统资源被占用,将导致降低PC端各进程运行的响应速度;再一方面,现有技术的实现极大地依赖于对PC端的CPU(Central Processing Unit,中央处理器)的虚拟化硬件加速技术,在过去的几十年里,即使硬件虚拟化技术快速的普及,使得计算机的性能越来越好,但是为了避免各种存在的安全隐患发生,超过70%的主板在制造完成时,在BIOS(Basic Input Output System,基本输入输出系统)上禁止了硬件虚拟化技术的实现,因此导致大量用户的需求无法被满足,降低了用户体验;进一步地,虚拟机本质上是涉及给具备专业知识的商业用户和极客用户使用,将给普通用户在使用过程中带来极大的操作困难,从而限制了用户群体的拓展。
发明内容
为克服上述技术问题或者至少部分地解决上述技术问题,特提出以下技术方案:
本发明的实施例提出了一种在Windows系统上运行Android应用程序的方法,包括:
响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机;
开始加载应用程序的动态链接库相关文件;
通过启动Android虚拟机,加载应用程序中预定的引擎文件和相关可执行文件;
通过调用预定的启动进程,调用应用程序对应的Activity资源;
在Activity资源的生命周期中,完成加载应用程序的动态链接库相关文件,以运行应用程序。
本发明的另一实施例提出了一种在Windows系统上运行Android应用程序的装置,包括:
第一加载模块,用于响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机;
第二加载模块,用于开始加载应用程序的动态链接库相关文件;
第三加载模块,用于通过启动Android虚拟机,加载应用程序中预定的引擎文件和相关可执行文件;
调用模块,用于通过调用预定的启动进程,调用应用程序对应的Activity资源;
第四加载模块,用于在Activity资源的生命周期中,完成加载应用程序的动态链接库相关文件,以运行应用程序。
本发明实施例还提供了一种计算机程序,包括计算机可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据本发明实施例中的任一个所述的在Windows系统上运行Android应用程序的方法。
本发明实施例还提供了一种计算机可读介质,其中存储了如本发明实施例所述的程序。
本发明的实施例中,提出了一种在Windows系统上运行Android应用程序的方案,响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机,实现了Android虚拟机在Windows系统上的正常运行,并为实现Android应用程序在Windows系统上运行提供了重要的前提保障;开始加载应用程序的动态链接库相关文件,通过启动Android虚拟机,加载应用程序中预定的引擎文件和相关可执行文件,通过在自定义简化的Android系统中运行应用程序,实现了Android应用程序在运行过程中占用较少的系统资源,解决 了Android应用程序在Windows系统中运行卡、慢等问题;通过调用预定的启动进程,调用应用程序对应的Activity资源,在Activity资源的生命周期中,完成加载应用程序的动态链接库相关文件,彻底实现了Android应用程序在Windows系统中以原生应用程序的形式正常运行,同时,无需用户的复杂操作方式即可实现Android应用程序在Windows系统中的正常、快速运行,进一步地,提高了用户的使用体验。
本发明附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本发明的实践了解到。
附图说明
本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:
图1为本发明中一个实施例的在Windows系统上运行Android应用程序的方法的流程图;
图2为本发明中另一实施例的在Windows系统上运行Android应用程序的装置的结构示意图;
图3为本发明中又一个实施例的在Windows系统上运行Android应用程序的装置的结构示意图;
图4示出了用于执行根据本发明的在Windows系统上运行Android应用程序的方法的计算设备的框图;
图5示出了用于保持或者携带实现根据本发明的在Windows系统上运行Android应用程序的方法的程序代码的存储单元。
具体实施方式
下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本发明,而不能解释为对本发明的限制。
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本发明的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无 线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。
图1为本发明中一个实施例的在Windows系统上运行Android应用程序的方法的流程图。
本发明的实施例中,各步骤所执行的内容概述如下:步骤S110:响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机;步骤S120:开始加载应用程序的动态链接库相关文件;步骤S130:通过启动Android虚拟机,加载应用程序中预定的引擎文件和相关可执行文件;步骤S140:通过调用预定的启动进程,调用应用程序对应的Activity资源;步骤S150:在Activity资源的生命周期中,完成加载应用程序的动态链接库相关文件,以运行应用程序。
本发明的实施例中,提出了一种在Windows系统上运行Android应用程序的方法,响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机,实现了Android虚拟机在Windows系统上的正常运行,并为实现Android应用程序在Windows系统上运行提供了重要的前提保障;开始加载应用程序的动态链接库相关文件,通过启动Android虚拟机,加载应用程序中预定的引擎文件和相关可执行文件,通过在自定义简化的Android系统中运行应用程序,实现了Android应用程序在运行过程中占用较少的系统资源,解决了Android应用程序在Windows系统中运行卡、慢等问题;通过调用预定的启动进程,调用应用程序对应的Activity资源,在Activity资源的生命周期中,完成加载应用程序的动态链接库相关文件,彻底实现了Android应用程序在Windows系统中以原生应用程序的形式正常运行,同时,无需用户的复杂操作方式即可实现Android应用程序在Windows系统中的正常、快速运行,进一步地,提高了用户的使用体验。以下针对各个步骤的具体实现做进一步的说明:
步骤S110:响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机。
例如,Android操作系统的应用层是用Java语言编写的,因此Android虚拟机运 行的过程中,将加载Java的相关文件,在Android虚拟机中运行应用程序App1时,Android虚拟机运行之后首先加载Android虚拟机的相关必备库,如运行Android系统的Java虚拟机Dalvik所必需的自定义的CRT相关库,包括已实现libc.so的接口、OpenGL ES接口、OpenSL ES接口以及一部分Android NDK(Native Development Kit,原生开发工具包)接口等,随后Android虚拟机通过加载预定格式的Linux可执行文件,如ELF格式的相关文件,以加载Android虚拟机的动态链接库相关文件,如预定的Android系统的Java虚拟机Dalvik的相关.so文件和数学库libm.so的相关文件等,以启动Android系统的Java虚拟机Dalvik。
优选地,步骤S110中加载Android虚拟机的动态链接库相关文件的步骤,具体包括步骤S111(图中未示出);步骤S111:通过预定启动进程加载Android虚拟机的动态链接库相关文件。
例如,通过调用自定义的Android Framework的相关类和其他Java相关类的进程,来启动加载Android虚拟机的动态链接库相关文件,如预定的Android系统的Java虚拟机Dalvik的相关.so文件。
步骤S120:开始加载应用程序的动态链接库相关文件。
例如,在Android虚拟机中运行应用程序App1时,Android虚拟机运行之后加载Android虚拟机的相关必备库之后,可开始加载应用程序App1的动态链接库相关文件,如App1的相关.so文件。
步骤S130:通过启动Android虚拟机,加载应用程序中预定的引擎文件和相关可执行文件。
其中,预定的引擎文件,包括Android系统的DEX相关文件、Android系统动态链接库的相关文件和应用程序动态链接库的相关文件。
例如,启动Android系统的Java虚拟机Dalvik后,加载应用程序App1中预定的引擎文件和相关可执行文件,如预定的Android系统的系统库的相关.so文件,其中,预定的Android系统的系统库的相关.so文件为简化的Android操作系统,该预定的Android系统的系统库的相关.so文件中包括了Android系统的必备相关文件,删除了在Windows中不必要的Android系统文件,如Android系统中电源管理的相关文件等;Android系统的DEX相关文件,如用于封装实现Android各个组件的程序代码的classes.dex代码文件;以及App1相关.so文件。
步骤S140:通过调用预定的启动进程,调用应用程序对应的Activity资源。
例如,通过调用自定义的Android Framework的相关类和其他Java相关类的进程,调用Android系统Activity资源。在Android中,Activity中所有操作都与用户密切相 关,是一个负责与用户交互的组件。
需要说明的是,本领域技术人员可以了解到,Android操作系统有其不同于其他操作系统的原理,Android为开发者提供四大组件,具体指Activity、Service、Broadcast Receiver以及Content Provider等组件。其中,Content Provider属于Android应用程序的组件之一,作为应用程序之间唯一的共享数据的途径,Content Provider主要的功能就是存储并检索数据以及向其他应用程序提供访问数据的接口;Activity是Android应用中负责与用户交互的组件;Service通常位于后台运行,它一般不需要与用户交互,因此Service组件没有图形用户界面,一个Service组件被运行起来之后,它将拥有自己独立的生命周期,Service组件通常用于为其他组件提供后台服务或监控其他组件的运行状态;Broadcast Receiver代表广播消息接收器。
步骤S150:在Activity资源的生命周期中,完成加载应用程序的动态链接库相关文件,以运行应用程序。
优选地,在Activity的生命周期中,通过预定启动进程完成加载应用程序的动态链接库相关文件。
在Android中,Activity生命周期是指Activity从启动到销毁的过程。在Activity资源的生命周期中,例如,通过调用自定义的Android Framework的相关类和其他Java相关类的进程,完成加载应用程序App1的相关.so文件,以运行App1。
在一优选实施例中,该方法还包括步骤S160(图中未示出);步骤S160:接收应用程序的Windows操作指令,通过Android虚拟机将Windows操作指令转换为相应的Android操作指令。
例如,由于Android虚拟机里有自定义的CRT库以及其它底层库,可以支持运行通过加载预定格式的Linux可执行文件,如ELF格式的相关文件,以加载Android虚拟机的动态链接库相关文件,如加载libdvm.so(即Android系统的Java虚拟机Dalvik),因此用户在Windows操作系统中执行应用程序App1的相关操作,如点击鼠标的操作,当接收到App1点击鼠标的指令后,通过Android虚拟机将Windows点击鼠标的操作指令转换为相应的Android点击鼠标的操作指令,以实现App1的正常运行。
在一优选实施例中,该方法还包括步骤S170(图中未示出)和步骤S180(图中未示出);步骤S170:将转换后的Android操作指令发送至应用程序的动态链接库相关文件;步骤S180:应用程序根据接收到的转换后的Android操作指令,在Windows系统中执行相应的操作。
优选地,将转换后的Android操作指令发送至应用程序的动态链接库相关文件,包括以下至少一种情形:
根据Android虚拟机的通知消息,将转换后的Android操作指令发送至应用程序的动态链接库相关文件;
根据应用程序的调用指令,将调用获取到的转换后的Android操作指令反馈至应用程序的动态链接库相关文件。
例如,根据Android系统的Java虚拟机Dalvik的中的反射机制及JNI(Java Native Interface,Java本地接口),其中,JNI用于让Java和其他语言编写的代码进行交互,将转换后的Android操作指令,如转换后的Android鼠标点击的操作指令发送至App1的相关.so文件,App1根据接收到转换后的Android鼠标点击的操作指令,在Windows系统中执行相应鼠标点击的操作。
需要说明的是,本实施例所采用的反射机制可以为Java反射机制,Java反射机制是在运行状态中,对于任意一个类,都能够知道这个类的所有属性和方法;对于任意一个对象,都能够调用它的任意一个方法;这种动态获取信息以及动态调用对象的方法的功能即为Java语言的反射机制。
又例如,据应用程序App1调用Windows操作系统中鼠标点击的操作指令,将转换后的Android鼠标点击的操作指令,通过预定的调用接口,发送至App1的相关.so文件,App1根据接收到转换后的Android鼠标点击的操作指令,在Windows系统中执行相应鼠标点击的操作。
图2为本发明中另一实施例的在Windows系统上运行Android应用程序的装置的结构示意图。
本发明的实施例中,各模块所执行的内容概述如下:第一加载模块210响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机;第二加载模块220开始加载应用程序的动态链接库相关文件;第三加载模块230通过启动Android虚拟机,加载应用程序中预定的引擎文件和相关可执行文件;调用模块240通过调用预定的启动进程,调用应用程序对应的Activity资源;第四加载模块250在Activity资源的生命周期中,完成加载应用程序的动态链接库相关文件,以运行应用程序。
本发明的实施例中,提出了一种在Windows系统上运行Android应用程序的装置,响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机,实现了Android虚拟机在Windows系统上的正常运行,并为实现Android应用程序在Windows系统上运行提供了重要的前提保障;开始加载应用程序的动态链接库相关文件,通过启动Android虚拟机,加载应用程序中预定的引擎文件和相关可执行文件,通过在自定义简化的Android系统 中运行应用程序,实现了Android应用程序在运行过程中占用较少的系统资源,解决了Android应用程序在Windows系统中运行卡、慢等问题;通过调用预定的启动进程,调用应用程序对应的Activity资源,在Activity资源的生命周期中,完成加载应用程序的动态链接库相关文件,彻底实现了Android应用程序在Windows系统中以原生应用程序的形式正常运行,同时,无需用户的复杂操作方式即可实现Android应用程序在Windows系统中的正常、快速运行,进一步地,提高了用户的使用体验。以下针对各个模块的具体实现做进一步的说明:
第一加载模块210响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机。
例如,Android操作系统的应用层是用Java语言编写的,因此Android虚拟机运行的过程中,将加载Java的相关文件,在Android虚拟机中运行应用程序App1时,Android虚拟机运行之后首先加载Android虚拟机的相关必备库,如Android系统的Java虚拟机Dalvik的自定义的CRT相关库,以实现libc.so的接口、OpenGL ES接口、OpenSL ES接口以及一部分Android NDK(Native Development Kit,原生开发工具包)接口,随后Android虚拟机通过加载预定格式的Linux可执行文件,如ELF格式的相关文件,以加载Android虚拟机的动态链接库相关文件,如预定的Android系统的Java虚拟机Dalvik的相关.so文件和数学库libm.so的相关文件等,以启动Android系统的Java虚拟机Dalvik。
图3为本发明中又一实施例的在Windows系统上运行Android应用程序的装置的结构示意图。
优选地,第一加载模块210包括加载单元2101;加载单元2101通过预定启动进程加载Android虚拟机的动态链接库相关文件。
例如,通过调用自定义的Android Framework的相关类和其他Java相关类的进程,来启动加载Android虚拟机的动态链接库相关文件,如预定的Android系统的Java虚拟机Dalvik的相关.so文件。
第二加载模块220开始加载应用程序的动态链接库相关文件。
例如,在Android虚拟机中运行应用程序App1时,Android虚拟机运行之后加载Android虚拟机的相关必备库之后,可开始加载应用程序App1的动态链接库相关文件,如App1的相关.so文件。
第三加载模块230通过启动Android虚拟机,加载应用程序中预定的引擎文件和相关可执行文件。
其中,预定的引擎文件,包括Android系统的DEX相关文件、Android系统动态 链接库的相关文件和应用程序动态链接库的相关文件。
例如,启动Android系统的Java虚拟机Dalvik后,加载应用程序App1中预定的引擎文件和相关可执行文件,如预定的Android系统的系统库的相关.so文件,其中,预定的Android系统的系统库的相关.so文件为简化的Android操作系统,该预定的Android系统的系统库的相关.so文件中包括了Android系统的必备相关文件,删除了在Windows中不必要的Android系统文件,如Android系统中电源管理的相关文件等;Android系统的DEX相关文件,如用于封装实现Android各个组件的程序代码的classes.dex代码文件;以及App1相关.so文件。
调用模块240通过调用预定的启动进程,调用应用程序对应的Activity资源。
例如,通过调用自定义的Android Framework的相关类和其他Java相关类的进程,调用Android系统Activity资源。在Android中,Activity中所有操作都与用户密切相关,是一个负责与用户交互的组件。
需要说明的是,本领域技术人员可以了解到,Android操作系统有其不同于其他操作系统的原理,Android为开发者提供四大组件,具体指Activity、Service、Broadcast Receiver以及Content Provider等组件。其中,Content Provider属于Android应用程序的组件之一,作为应用程序之间唯一的共享数据的途径,Content Provider主要的功能就是存储并检索数据以及向其他应用程序提供访问数据的接口;Activity是Android应用中负责与用户交互的组件;Service通常位于后台运行,它一般不需要与用户交互,因此Service组件没有图形用户界面,一个Service组件被运行起来之后,它将拥有自己独立的生命周期,Service组件通常用于为其他组件提供后台服务或监控其他组件的运行状态;Broadcast Receiver代表广播消息接收器。
第四加载模块250在Activity资源的生命周期中,完成加载应用程序的动态链接库相关文件,以运行应用程序。
优选地,在Activity的生命周期中,通过预定启动进程完成加载应用程序的动态链接库相关文件。
在Android中,Activity生命周期是指Activity从启动到销毁的过程。在Activity资源的生命周期中,例如,通过调用自定义的Android Framework的相关类和其他Java相关类的进程,完成加载应用程序App1的相关.so文件,以运行App1。
在一优选实施例中,该装置还包括转换模块260;转换模块260接收应用程序的Windows操作指令,通过Android虚拟机将Windows操作指令转换为相应的Android操作指令。
例如,由于Android虚拟机里有自定义的CRT库以及其它底层库,可以支持运行 通过加载预定格式的Linux可执行文件,如ELF格式的相关文件,以加载Android虚拟机的动态链接库相关文件,如加载libdvm.so(即Android系统的Java虚拟机Dalvik),因此用户在Windows操作系统中执行应用程序App1的相关操作,如点击鼠标的操作,当接收到App1点击鼠标的指令后,通过Android虚拟机将Windows点击鼠标的操作指令转换为相应的Android点击鼠标的操作指令,以实现App1的正常运行。
在一优选实施例中,该装置还包括发送模块270和执行模块280;发送模块270将转换后的Android操作指令发送至应用程序的动态链接库相关文件;执行模块280配置为应用程序根据接收到的转换后的Android操作指令,在Windows系统中执行相应的操作。
优选地,将转换后的Android操作指令发送至应用程序的动态链接库相关文件,包括以下至少一种情形:
根据Android虚拟机的通知消息,将转换后的Android操作指令发送至应用程序的动态链接库相关文件;
根据应用程序的调用指令,将调用获取到的转换后的Android操作指令反馈至应用程序的动态链接库相关文件。
例如,根据Android系统的Java虚拟机Dalvik的中的反射机制及JNI(Java Native Interface,Java本地接口),其中,JNI用于让Java和其他语言编写的代码进行交互,将转换后的Android操作指令,如转换后的Android鼠标点击的操作指令发送至App1的相关.so文件,App1根据接收到转换后的Android鼠标点击的操作指令,在Windows系统中执行相应鼠标点击的操作。
需要说明的是,本实施例所采用的反射机制可以为Java反射机制,Java反射机制是在运行状态中,对于任意一个类,都能够知道这个类的所有属性和方法;对于任意一个对象,都能够调用它的任意一个方法;这种动态获取信息以及动态调用对象的方法的功能即为Java语言的反射机制。
又例如,据应用程序App1调用Windows操作系统中鼠标点击的操作指令,将转换后的Android鼠标点击的操作指令,通过预定的调用接口,发送至App1的相关.so文件,App1根据接收到转换后的Android鼠标点击的操作指令,在Windows系统中执行相应鼠标点击的操作。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所 要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的应用的后台运行方法及装置设备中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到, 或者在载体信号上提供,或者以任何其他形式提供。
例如,图4示出了可以实现根据本发明的在Windows系统上运行Android应用程序的方法的计算设备。该计算设备传统上包括处理器410和以存储器420形式的程序产品或者计算机可读介质。存储器420可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM或者ROM之类的电子存储器。存储器420具有用于执行上述方法中的任何方法步骤的程序代码431的存储空间430。例如,用于程序代码的存储空间430可以包括分别用于实现上面的方法中的各种步骤的各个程序代码431。这些程序代码可以从一个或者多个程序产品中读出或者写入到这一个或者多个程序产品中。这些程序产品包括诸如存储卡之类的程序代码载体。这样的程序产品通常为如参考图5所述的便携式或者固定存储单元。该存储单元可以具有与图4的计算设备中的存储器420类似布置的存储段、存储空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括可读代码431’,即可以由例如诸如410之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
本技术领域技术人员可以理解,本发明包括涉及用于执行本申请中所述操作中的一项或多项的设备。这些设备可以为所需的目的而专门设计和制造,或者也可以包括通用计算机中的已知设备。这些设备具有存储在其内的计算机程序,这些计算机程序选择性地激活或重构。这样的计算机程序可以被存储在设备(例如,计算机)可读介质中或者存储在适于存储电子指令并分别耦联到总线的任何类型的介质中,所述计算机可读介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random Access Memory,随即存储器)、EPROM(Erasable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically Erasable Programmable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,可读介质包括由设备(例如,计算机)以能够读的形式存储或传输信息的任何介质。
本技术领域技术人员可以理解,可以用计算机程序指令来实现这些结构图和/或框图和/或流图中的每个框以及这些结构图和/或框图和/或流图中的框的组合。本技术领域技术人员可以理解,可以将这些计算机程序指令提供给通用计算机、专业计算机或其他可编程数据处理方法的处理器来实现,从而通过计算机或其他可编程数据处理方法的处理器来执行本发明公开的结构图和/或框图和/或流图的框或多个框中指定的方案。
本技术领域技术人员可以理解,本发明中已经讨论过的各种操作、方法、流程中 的步骤、措施、方案可以被交替、更改、组合或删除。进一步地,具有本发明中已经讨论过的各种操作、方法、流程中的其他步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。进一步地,现有技术中的具有与本发明中公开的各种操作、方法、流程中的步骤、措施、方案也可以被交替、更改、重排、分解、组合或删除。
以上所述仅是本发明的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。

Claims (14)

  1. 一种在Windows系统上运行Android应用程序的方法,包括:
    响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机;
    开始加载所述应用程序的动态链接库相关文件;
    通过启动Android虚拟机,加载所述应用程序中预定的引擎文件和相关可执行文件;
    通过调用预定的启动进程,调用所述应用程序对应的Activity资源;
    在所述Activity资源的生命周期中,完成加载所述应用程序的动态链接库相关文件,以运行所述应用程序。
  2. 根据权利要求1所述的方法,其特征在于,所述加载Android虚拟机的动态链接库相关文件,包括:
    通过预定启动进程加载所述Android虚拟机的动态链接库相关文件;
    其中,在所述Activity的生命周期中,完成加载所述应用程序的动态链接库相关文件,包括:
    在所述Activity的生命周期中,通过预定启动进程完成加载所述应用程序的动态链接库相关文件。
  3. 根据权利要求1所述的方法,其特征在于,所述预定的引擎文件,包括Android系统的DEX相关文件、Android系统动态链接库的相关文件和应用程序动态链接库的相关文件。
  4. 根据权利要求1-3任一项所述的方法,还包括:
    接收所述应用程序的Windows操作指令,通过所述Android虚拟机将所述Windows操作指令转换为相应的Android操作指令。
  5. 根据权利要求4所述的方法,还包括:
    将转换后的Android操作指令发送至所述应用程序的动态链接库相关文件;
    所述应用程序根据接收到的转换后的Android操作指令,在Windows系统中执行相应的操作。
  6. 根据权利要求5所述的方法,其特征在于,所述将转换后的Android操作指令发送至所述应用程序的动态链接库相关文件,包括以下至少一种情形:
    根据所述Android虚拟机的通知消息,将转换后的Android操作指令发送至所述应用程序的动态链接库相关文件;
    根据所述应用程序的调用指令,将调用获取到的转换后的Android操作指令反馈 至所述应用程序的动态链接库相关文件。
  7. 一种在Windows系统上运行Android应用程序的装置,包括:
    第一加载模块,用于响应启动应用程序的指令,通过加载预定格式的Linux可执行文件来加载Android虚拟机的动态链接库相关文件以启动Android虚拟机;
    第二加载模块,用于开始加载所述应用程序的动态链接库相关文件;
    第三加载模块,用于通过启动Android虚拟机,加载所述应用程序中预定的引擎文件和相关可执行文件;
    调用模块,用于通过调用预定的启动进程,调用所述应用程序对应的Activity资源;
    第四加载模块,用于在所述Activity资源的生命周期中,完成加载所述应用程序的动态链接库相关文件,以运行所述应用程序。
  8. 根据权利要求7所述的装置,其特征在于,所述第一加载模块,包括:
    加载单元,用于通过预定启动进程加载所述Android虚拟机的动态链接库相关文件;
    其中,所述第四加载模块用于在所述Activity的生命周期中,通过预定启动进程完成加载所述应用程序的动态链接库相关文件。
  9. 根据权利要求7所述的装置,其特征在于,所述预定的引擎文件,包括Android系统的DEX相关文件、Android系统动态链接库的相关文件和应用程序动态链接库的相关文件。
  10. 根据权利要求7-10任一项所述的装置,还包括:
    转换模块,用于接收所述应用程序的Windows操作指令,通过所述Android虚拟机将所述Windows操作指令转换为相应的Android操作指令。
  11. 根据权利要求10所述的装置,还包括:
    发送模块,用于将转换后的Android操作指令发送至所述应用程序的动态链接库相关文件;
    执行模块,用于所述应用程序根据接收到的转换后的Android操作指令,在Windows系统中执行相应的操作。
  12. 根据权利要求11所述的装置,其特征在于,所述发送模块用于根据所述Android虚拟机的通知消息,将转换后的Android操作指令发送至所述应用程序的动态链接库相关文件;或
    根据所述应用程序的调用指令,将调用获取到的转换后的Android操作指令反馈至所述应用程序的动态链接库相关文件。
  13. 一种计算机程序,包括计算机可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1-6中的任一个所述的在Windows系统上运行Android应用程序的方法。
  14. 一种计算机可读介质,其中存储了如权利要求13所述的程序。
PCT/CN2016/104235 2016-08-10 2016-11-01 在Windows系统上运行Android应用程序的方法及装置 WO2018028055A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/741,179 US20180357085A1 (en) 2016-08-10 2016-11-01 Method and apparatus for running android application on windows system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610652849.6 2016-08-10
CN201610652849.6A CN106293880B (zh) 2016-08-10 2016-08-10 在Windows系统上运行Android应用程序的方法及装置

Publications (1)

Publication Number Publication Date
WO2018028055A1 true WO2018028055A1 (zh) 2018-02-15

Family

ID=57667898

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/104235 WO2018028055A1 (zh) 2016-08-10 2016-11-01 在Windows系统上运行Android应用程序的方法及装置

Country Status (3)

Country Link
US (1) US20180357085A1 (zh)
CN (1) CN106293880B (zh)
WO (1) WO2018028055A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596821A (zh) * 2021-01-24 2021-04-02 南京金盾公共安全技术研究院有限公司 一种安卓应用中动态加载算法的方法
CN114020414A (zh) * 2021-11-09 2022-02-08 成都阿加犀智能科技有限公司 Android系统与底层Linux共生方法、装置、电子设备及存储介质

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10983802B2 (en) * 2016-10-26 2021-04-20 Nec Corporation Relation among states appending device, relation among states appending method, and relation among states appending program
CN106970828A (zh) * 2017-03-28 2017-07-21 北京奇虎科技有限公司 一种用于对指令进行自适应的方法及设备
CN106951337B (zh) * 2017-03-28 2020-09-11 北京奇虎科技有限公司 一种基于异常处理实现应用的跨系统运行的方法及设备
CN106951294B (zh) * 2017-03-28 2020-07-10 北京奇虎科技有限公司 一种用于为跨系统应用提供服务的方法及设备
CN107193748A (zh) * 2017-06-01 2017-09-22 网易(杭州)网络有限公司 程序文件执行方法、装置、存储介质和处理器
CN108170503B (zh) * 2018-01-24 2022-04-12 腾讯科技(深圳)有限公司 一种跨系统运行安卓应用的方法、终端及存储介质
CN108654090B (zh) * 2018-05-17 2022-03-11 北京奇虎科技有限公司 操作系统与游戏应用交互的方法及装置
CN109445772B (zh) * 2018-12-29 2022-05-24 山东劳动职业技术学院(山东劳动技师学院) 一种面向智能手机的软件应用框架及其开发系统
CN110443876A (zh) * 2019-07-31 2019-11-12 新华三大数据技术有限公司 3d图像渲染方法及装置
CN113064601B (zh) * 2019-12-30 2024-06-25 Oppo广东移动通信有限公司 动态加载文件的确定方法、装置、终端及存储介质
CN113204377B (zh) 2020-01-31 2022-12-06 华为技术有限公司 一种动态链接库的加载方法及装置
CN111857971B (zh) * 2020-07-29 2024-03-15 福建多多云科技有限公司 一种安卓虚拟机系统下运行可执行文件的方法及存储介质
CN112214253B (zh) * 2020-09-11 2024-02-02 拓尔思信息技术股份有限公司 Java程序的启动方法及装置、电子装置、非易失性存储介质
CN112363734A (zh) * 2020-11-03 2021-02-12 北京麟卓信息科技有限公司 一种Android应用安装时采用本地库的方法和装置
CN113157377B (zh) * 2021-05-20 2023-06-27 读书郎教育科技有限公司 一种Android系统实现对应用部分管控的方法及设备
WO2024036745A1 (en) * 2022-08-17 2024-02-22 Ng Yat Fai Android system development method and apparatus, related device and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1645339A (zh) * 2005-01-31 2005-07-27 浙江大学 在嵌入式系统模拟器上调试应用程序的方法
CN103246525A (zh) * 2012-02-06 2013-08-14 腾讯科技(深圳)有限公司 一种实现应用运行的方法及客户端
CN104021063A (zh) * 2014-05-14 2014-09-03 南京大学 一种基于硬件虚拟化的模块化计算机取证系统及其方法
CN105824623A (zh) * 2016-03-14 2016-08-03 广州趣丸网络科技有限公司 一种Android应用热修复的方法和装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364436A (zh) * 2011-06-24 2012-02-29 浙大网新科技股份有限公司 实现WinCE/Android混合API调试的方法及系统
CN103019764B (zh) * 2012-11-15 2016-02-10 深圳市宜搜科技发展有限公司 Andriod资源包可安装性的检测方法及系统
CN104216726B (zh) * 2013-06-04 2016-08-10 腾讯科技(深圳)有限公司 Android虚拟机加载方法及装置
CN105094839A (zh) * 2015-08-14 2015-11-25 深圳市众联悠游科技有限公司 基于PC机实现运行Android系统应用的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1645339A (zh) * 2005-01-31 2005-07-27 浙江大学 在嵌入式系统模拟器上调试应用程序的方法
CN103246525A (zh) * 2012-02-06 2013-08-14 腾讯科技(深圳)有限公司 一种实现应用运行的方法及客户端
CN104021063A (zh) * 2014-05-14 2014-09-03 南京大学 一种基于硬件虚拟化的模块化计算机取证系统及其方法
CN105824623A (zh) * 2016-03-14 2016-08-03 广州趣丸网络科技有限公司 一种Android应用热修复的方法和装置

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112596821A (zh) * 2021-01-24 2021-04-02 南京金盾公共安全技术研究院有限公司 一种安卓应用中动态加载算法的方法
CN114020414A (zh) * 2021-11-09 2022-02-08 成都阿加犀智能科技有限公司 Android系统与底层Linux共生方法、装置、电子设备及存储介质
CN114020414B (zh) * 2021-11-09 2024-03-19 成都阿加犀智能科技有限公司 Android系统与底层Linux共生方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
CN106293880A (zh) 2017-01-04
CN106293880B (zh) 2019-12-13
US20180357085A1 (en) 2018-12-13

Similar Documents

Publication Publication Date Title
WO2018028055A1 (zh) 在Windows系统上运行Android应用程序的方法及装置
WO2018028056A1 (zh) Android模拟器及实现Android模拟器的方法
CN108170503B (zh) 一种跨系统运行安卓应用的方法、终端及存储介质
EP3270285B1 (en) Operating-system-friendly bootloader
US7673131B2 (en) Booting an operating system in discrete stages
RU2435200C2 (ru) Быстрая загрузка операционной системы из выключенного состояния
TWI573075B (zh) 持續及有彈性之工作處理
US9678767B2 (en) Unified extensible firmware interface (UEFI) driver and protocol
EP2883135A1 (en) Background application page architecture for web applications
JP2009514122A (ja) ディスプレイドライバをリブートすることなくアップグレードする方法
US8661236B2 (en) Partial initialization of divided programs in response to pre-boot and post-boot activation events to rapidly boot a computer system
CN109150956B (zh) 一种推送sdk的实现方法、装置、设备和计算机存储介质
KR101249735B1 (ko) 범용 운영체제 상에서 안드로이드 어플리케이션을 실행하기 위한 단말장치 및 방법, 그리고 이를 위한 컴퓨터로 판독가능한 기록매체
CN111625290B (zh) 一种Android平台下布局文件预加载方法、装置及电子设备
CN108563472B (zh) 基于多开应用的服务插件加载方法及装置
CN113821220A (zh) 一种linux操作系统的安装方法和装置
US7412597B2 (en) Computer system and booting method thereof
US20150212866A1 (en) Management system for service of multiple operating environments, and methods thereof
CN109254856A (zh) 智能pos服务端提供接口给客户端的方法
US7114066B1 (en) Method, apparatus, and computer-readable medium for ensuring compatibility between an operating system and a BIOS redirection component
US9317324B2 (en) Automatic service lifecycle management
CN113515299A (zh) 软件开发工具包sdk热升级方法、装置、设备及存储介质
KR102292211B1 (ko) 전자기기
WO2023202406A1 (zh) 显示方法及电子设备
CN117421057A (zh) Dpu控制器的操作系统安装方法、系统、服务器、控制器及介质

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

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

Country of ref document: EP

Kind code of ref document: A1