摘要 |
<p>Method and System for injecting Java bytecode into a target process of an application program are disclosed. The method includes: at a device having one or more processors and memory: during execution of the target process of the application program, detecting a call to load a predetermined code injection function; in response to the detected call to load the predetermined code injection function, loading Java bytecode referenced by the code injection function into a virtual machine; in accordance with a pre-stored Java native interface corresponding to the loaded Java bytecode, calling an entrypoint function in the Java bytecode, wherein the entrypoint function is configured to perform one or more extended tasks for the application program; and executing the entrypoint function in the virtual machine to accomplish the one or more extended tasks of the application program.</p> |