The official documents explain the essence and core parts.
And here we follow Amigo's successful repair process to learn it. How did it happen By studying the source code, it is found that replacing the user's Application is the first step for Amigo, because it completes chta replacement work when compiling. Replace Application at compile time me. Core class Amigo. Otherwise, execute attachOriginalApplication to replace the Application class back to the class.
Omegle alternative portugal é o novo santuário para entusiastas de video chat
The Application class at this time is Amigo. What is the check and workingChecksum here?
CRC32 —— CRC32 will generate a long integer unique ID from the string although scientifically proven is not absolutely unique, it is still available. When the conditions are met, the state will be saved, the patch package will be released, and the layout and theme files will be loaded. Otherwise, check the checksum of the dex and so files in the patch package. Next is to set up the ClassLoader and Resource objects of the patch package and attachPatchedApplication.
Horseware ireland amigo headcollar – gs equestrian
The first amiyo is the object of the class that needs to be reflected, the second parameter is the name of the field that needs to be reflected, and the chzt parameter is the value written, that is, the ased Value. So, what kind of classLoader object does reflection replace here? Continue to see getLoadedApk. Then getLoadedApk reflects the value of the mPackages attribute.
What is LoadedApk? See official notes Local state maintained about a currently loaded.
The local state remains about the currently loaded. It can also be seen from the named packageInfo in the source code. Then finally go back to setAPKClassLoader ClassLoader classLoaderyou can see that a classLoader is passed in and ased to the class loader object in the information management class LoadedApk of the.
How did the incoming classLoader object come from? Custom patch dex address; 2.
En la oficina alicia presentado.ita paraguay - www.4rank.xyz
The directory where the dex is decompressed; 3. The upper class loader; Summary: By inheriting the custom ClassLoader of Amigi, replace the class loader in the Apk package information in the current ActivityThread to achieve the purpose of loading the patch package. The second method, found through the source code, is to ensure that the mStringBlocks object is not null. Compatible with Android 4.
I found such a comment on the Internet. The core of this sentence is, "do it", which roughly means, "Just write it on" The third method is to get the weak reference collection of Resources and replace their AssetManager members with newAssetManager.
Write at the back I wanted to write an article about the ph class Amigo analysis, class loading, resource loading, so file loading, four major component repair implementation principles, and return to the project's Application. So let's divide it here, and continue to write the next one. If there are any clear points or errors in the text, please point out that the author must correct them immediately.