Closed nonnonstop closed 1 year ago
com.example.testapp.MyAppComponentFactory
Run LSPatch.
java -jar jar-v0.3.1-329-debug.jar -v -f app-release5.apk
The original AppComponentFactory MyAppComponentFactory is created.
MyAppComponentFactory
The original AppComponentFactory is not created and logcat outputs Original AppComponentFactory not found: com.example.testapp.MyAppComponentFactory.
Original AppComponentFactory not found: com.example.testapp.MyAppComponentFactory
Note: Commit 5a16a34cd89729c7dc6c303868a0e6a87e3794d8 added this error message and was referenced from #35.
N/A
v0.3.1-329
Android 10.0 (x86 emulator)
collapse sections as follows.
https://github.com/LSPosed/LSPatch/commit/c956fbea510aa599fb14e0df62ec8589fa3c5a34
Steps to reproduce/复现步骤
com.example.testapp.MyAppComponentFactory
.Run LSPatch.
java -jar jar-v0.3.1-329-debug.jar -v -f app-release5.apk
Expected behaviour/预期行为
The original AppComponentFactory
MyAppComponentFactory
is created.Actual behaviour/实际行为
The original AppComponentFactory is not created and logcat outputs
Original AppComponentFactory not found: com.example.testapp.MyAppComponentFactory
.Note: Commit 5a16a34cd89729c7dc6c303868a0e6a87e3794d8 added this error message and was referenced from #35.
Xposed Module List/Xposed 模块列表
LSPatch version/LSPatch 版本
v0.3.1-329
Android version/Android 版本
Android 10.0 (x86 emulator)
Shizuku version/Shizuku 版本
N/A
Version requirement/版本要求
Logs/日志
collapse sections as follows.
Logcat
``` 2022-09-05 21:43:47.484 20040-20040/? W/example.testap: Unexpected CPU variant for X86 using defaults: x86 2022-09-05 21:43:47.537 20040-20040/com.example.testapp D/LSPosed: symbol_cache.cpp:55#void lspd::InitSymbolCache(lspd::SymbolCache *): InitSymbolCache 2022-09-05 21:43:47.537 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:261#bool SandHook::ElfImg::findModuleBase(): found: f2289000-f23be000 r--p 00000000 fb:00 261 /apex/com.android.runtime/lib/libart.so 2022-09-05 21:43:47.537 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:267#bool SandHook::ElfImg::findModuleBase(): update path: /apex/com.android.runtime/lib/libart.so 2022-09-05 21:43:47.537 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:287#bool SandHook::ElfImg::findModuleBase(): get module base /apex/com.android.runtime/lib/libart.so: -0xdd77000 2022-09-05 21:43:47.537 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art9JNIEnvExt16SetTableOverrideEPK18JNINativeInterface 0x3ef3f0 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.539 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:261#bool SandHook::ElfImg::findModuleBase(): found: f769b000-f76de000 r--p 00000000 fb:00 229 /apex/com.android.runtime/bin/linker 2022-09-05 21:43:47.539 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:267#bool SandHook::ElfImg::findModuleBase(): update path: /apex/com.android.runtime/bin/linker 2022-09-05 21:43:47.539 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:287#bool SandHook::ElfImg::findModuleBase(): get module base /apex/com.android.runtime/bin/linker: -0x8965000 2022-09-05 21:43:47.541 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:236#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found __dl__Z9do_dlopenPKciPK17android_dlextinfoPKv 0x47860 in /apex/com.android.runtime/bin/linker in symtab by linear lookup 2022-09-05 21:43:47.542 20040-20040/com.example.testapp D/LSPlant: art_method.hpp:186#static bool lsplant::art::ArtMethod::Init(JNIEnv *, const lsplant::HookHandler): ArtMethod size: 28 2022-09-05 21:43:47.542 20040-20040/com.example.testapp D/LSPlant: art_method.hpp:240#static bool lsplant::art::ArtMethod::Init(JNIEnv *, const lsplant::HookHandler): ArtMethod::declaring_class offset: 0 2022-09-05 21:43:47.542 20040-20040/com.example.testapp D/LSPlant: art_method.hpp:241#static bool lsplant::art::ArtMethod::Init(JNIEnv *, const lsplant::HookHandler): ArtMethod::entrypoint offset: 24 2022-09-05 21:43:47.542 20040-20040/com.example.testapp D/LSPlant: art_method.hpp:242#static bool lsplant::art::ArtMethod::Init(JNIEnv *, const lsplant::HookHandler): ArtMethod::data offset: 20 2022-09-05 21:43:47.542 20040-20040/com.example.testapp D/LSPlant: art_method.hpp:243#static bool lsplant::art::ArtMethod::Init(JNIEnv *, const lsplant::HookHandler): ArtMethod::access_flags offset: 4 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:236#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3artL15GetMethodShortyEP7_JNIEnvP10_jmethodID 0x492560 in /apex/com.android.runtime/lib/libart.so in symtab by linear lookup 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art9ArtMethod12PrettyMethodEPS0_b 0x14b690 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art6Thread14CurrentFromGdbEv 0x5bf950 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art11ClassLinker22FixupStaticTrampolinesENS_6ObjPtrINS_6mirror5ClassEEE 0x176e70 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: native_util.h:96#int lspd::HookFunction(void *, void *, void **): Hooking _ZN3art11ClassLinker22FixupStaticTrampolinesENS_6ObjPtrINS_6mirror5ClassEEE (0xf23ffe70) from /apex/com.android.runtime/lib/libart.so (0xf2289000) 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art9ArtMethod14RegisterNativeEPKv 0x149e70 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: native_util.h:96#int lspd::HookFunction(void *, void *, void **): Hooking _ZN3art9ArtMethod14RegisterNativeEPKv (0xf23d2e70) from /apex/com.android.runtime/lib/libart.so (0xf2289000) 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art9ArtMethod16UnregisterNativeEv 0x14a080 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: native_util.h:96#int lspd::HookFunction(void *, void *, void **): Hooking _ZN3art9ArtMethod16UnregisterNativeEv (0xf23d3080) from /apex/com.android.runtime/lib/libart.so (0xf2289000) 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZNK3art11ClassLinker27SetEntryPointsToInterpreterEPNS_9ArtMethodE 0x1945a0 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.550 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art6mirror5Class13GetDescriptorEPNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE 0x467cb0 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art6mirror5Class11GetClassDefEv 0x46efe0 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art16ScopedSuspendAllC2EPKcb 0x5d28a0 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art16ScopedSuspendAllD2Ev 0x5d28e0 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art2gc23ScopedGCCriticalSectionC2EPNS_6ThreadENS0_7GcCauseENS0_13CollectorTypeE 0x29fda0 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art2gc23ScopedGCCriticalSectionD2Ev 0x29fe00 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art3jit12JitCodeCache18MoveObsoleteMethodEPNS_9ArtMethodES3_ 0x3a9420 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art3jit12JitCodeCache19GarbageCollectCacheEPNS_6ThreadE 0x3a5d20 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: native_util.h:96#int lspd::HookFunction(void *, void *, void **): Hooking _ZN3art3jit12JitCodeCache19GarbageCollectCacheEPNS_6ThreadE (0xf262ed20) from /apex/com.android.runtime/lib/libart.so (0xf2289000) 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:236#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3artL18DexFile_setTrustedEP7_JNIEnvP7_jclassP8_jobject 0x499bf0 in /apex/com.android.runtime/lib/libart.so in symtab by linear lookup 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPlant: common.hpp:85#auto lsplant::IsJavaDebuggable(JNIEnv *)::(anonymous class)::operator()() const: java runtime debuggable false 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art7Runtime9instance_E 0x6a9578 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPlant: runtime.hpp:48#static bool lsplant::art::Runtime::Init(const lsplant::HookHandler &): runtime instance = 0xf722ca80 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art7Runtime17SetJavaDebuggableEb 0x572f60 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art12ProfileSaver20ProcessProfilingInfoEbPt 0x3b24c0 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: native_util.h:96#int lspd::HookFunction(void *, void *, void **): Hooking _ZN3art12ProfileSaver20ProcessProfilingInfoEbPt (0xf263b4c0) from /apex/com.android.runtime/lib/libart.so (0xf2289000) 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: native_util.h:96#int lspd::HookFunction(void *, void *, void **): Hooking execve (0xf5588d10) from /apex/com.android.runtime/lib/bionic/libc.so (0xf5487000) 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: elf_util.cpp:230#Elf32_Addr SandHook::ElfImg::getSymbOffset(std::string_view, uint32_t, uint32_t) const: found _ZN3art14OatFileManager25RunBackgroundVerificationERKNSt3__16vectorIPKNS_7DexFileENS1_9allocatorIS5_EEEEP8_jobjectPKc 0x4e7fc0 in /apex/com.android.runtime/lib/libart.so in dynsym by gnuhash 2022-09-05 21:43:47.551 20040-20040/com.example.testapp D/LSPosed: native_util.h:96#int lspd::HookFunction(void *, void *, void **): Hooking _ZN3art14OatFileManager25RunBackgroundVerificationERKNSt3__16vectorIPKNS_7DexFileENS1_9allocatorIS5_EEEEP8_jobjectPKc (0xf2770fc0) from /apex/com.android.runtime/lib/libart.so (0xf2289000) 2022-09-05 21:43:47.560 20040-20040/com.example.testapp D/LSPosed: oat_file_manager.h:36#static void art::(anonymous struct)::replace(void *, const std::vectorCommand log
``` > java -jar jar-v0.3.1-329-debug.jar -v -f app-release5.apk Processing C:\Users\test\Downloads\app-release5.apk -> C:\Users\test\Downloads\.\app-release5-329-lspatched.apk apk path: C:\Users\test\Downloads\app-release5.apk Parsing original apk... Register apk signer with default keystore... Original signature 308202c9308201b1a003020102020411554fa1300d06092a864886f70d01010b0500301531133011060355040a130a6e6f6e6e6f6e73746f70301e170d3231303531303037313632385a170d3436303530343037313632385a301531133011060355040a130a6e6f6e6e6f6e73746f7030820122300d06092a864886f70d01010105000382010f003082010a02820101009933dd76ead68b45bb58a697d82b678d8c1ca12a865b0994a370d0ed1f917ae86e6deb8a49e243972eebda66a1ef7a91f0251523e3336021afac20072b86a64ed4378d13534bf79fc72ea3a2c24a2b5fd432e9c92ac6b174eb0ee59de791137441c84af5aec4330eb1ab02fcadcb187b443cae81e38419a0753540f3c654703362b86db7eb433b4715ef43d21de568d46a3e7e17a33ce5c9d41ffc4a0f2bc3ddc91373cc1fe3ef4f98a28a21761b389ccc5b49cc8170145c2848d2e64bccc76c460931f5d3a740b656a075a880011101a320e6c15dd852324dc84e092d4cf01a1c667353cfd67d9ef1b2111779223d51f4d04d78c09525701222047da80c1d7d0203010001a321301f301d0603551d0e041604149c6fda24fdf0a6a8897088713fdb03f599b03269300d06092a864886f70d01010b05000382010100103b52d51353cf4767b873d151c13d4be6f0ce5151177cbfd6c99195b8955e761c8db0ea91742b96105cfdd426dd637c9a6202d947efd17ce436a638144e0f7d30e932e42cb7db9c4022dfb68e5a9d6840f98273e4be14437ae61002ece127a294550f0bd7409cf7605e978e31044b44240dc3eef851752bcaa346cf8cdca36dc12620b0df38131986d85e3ec409091fbb0f3fef271797149427a3a896ec232a0a990d8aaf3382abb55e0bd8bca2d45458f843b943477f92583e87ecdc7775c72dd381ade946a0bc4f5987bf18449e02042a905bee0e3e4a5771eda9355f503fb7062b983a3b3c66f296fb460b6aa0e066e8cdef19ba7702b8fb8f572aa27230 original appComponentFactory class: com.example.testapp.MyAppComponentFactory Patching apk... Adding native lib.. added assets/lspatch/so/x86_64/liblspatch.so added assets/lspatch/so/arm64/liblspatch.so added assets/lspatch/so/x86/liblspatch.so added assets/lspatch/so/arm/liblspatch.so Adding dex.. Search target apk library arch... Embedding modules... Creating nested apk link... Writing apk... Done. Output APK: C:\Users\test\Downloads\.\app-release5-329-lspatched.apk ```