Modules loaded multiple times #1348
-
Hi I need some clarification regarding the way Lsposed loads modules, indeed I see on multiple devices that various modules (including mine) are loaded multiple times but not fully... To clarify: my module is loaded when the launcher starts and print in the log an info line regarding the installed launcher version, but I see it gets loaded multiple times without even printing this line! I think this should not happen, obviously the scope is restricted to the launcher only Thank yoy |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There are two entry points (basically three but just ignore resource hook). One is The other is I don't know what exactly your scenario is. But pay attention to:
For other scenarios, you may need to submit a full log. |
Beta Was this translation helpful? Give feedback.
There are two entry points (basically three but just ignore resource hook).
One is
initZygote
, which is called as soon as Zygote forked this process. So for one process of one application,initZygote
will be and only be called once. At that time, no classloader (except for the one from the system) is available.The other is
handleLoadedPackage
, which is called whenever a single LoadedApk is calledgetClassloader
, which means the classloader of a package is constructed. You might think there can only be only one package in one process, but this is false. There are many scenarios in which more than one packages can be loaded into one process: i) packages sharing the same UID and process nam…