├── app ├── .gitignore ├── src │ ├── main │ │ ├── cpp │ │ │ └── lspc │ │ │ │ ├── Dobby │ │ │ │ ├── source │ │ │ │ │ ├── core │ │ │ │ │ │ ├── emulator │ │ │ │ │ │ │ └── dummy.cc │ │ │ │ │ │ ├── arch │ │ │ │ │ │ │ ├── Cpu.cc │ │ │ │ │ │ │ ├── Cpu.h │ │ │ │ │ │ │ ├── CpuFeature.cc │ │ │ │ │ │ │ ├── x86 │ │ │ │ │ │ │ │ ├── cpu-x86.cc │ │ │ │ │ │ │ │ └── constants-x86.h │ │ │ │ │ │ │ ├── CpuRegister.cc │ │ │ │ │ │ │ ├── CpuFeature.h │ │ │ │ │ │ │ ├── x64 │ │ │ │ │ │ │ │ └── constants-x64.h │ │ │ │ │ │ │ ├── CpuRegister.h │ │ │ │ │ │ │ ├── CpuUtils.h │ │ │ │ │ │ │ └── arm │ │ │ │ │ │ │ │ └── registers-arm.h │ │ │ │ │ │ ├── codegen │ │ │ │ │ │ │ ├── codegen.h │ │ │ │ │ │ │ ├── codegen-ia32.h │ │ │ │ │ │ │ ├── codegen-arm.h │ │ │ │ │ │ │ ├── codegen-arm64.h │ │ │ │ │ │ │ ├── codegen-x64.h │ │ │ │ │ │ │ ├── codegen-arm.cc │ │ │ │ │ │ │ ├── codegen-ia32.cc │ │ │ │ │ │ │ ├── codegen-arm64.cc │ │ │ │ │ │ │ └── codegen-x64.cc │ │ │ │ │ │ └── assembler │ │ │ │ │ │ │ ├── assembler-x86-shared.cc │ │ │ │ │ │ │ ├── assembler-arch.h │ │ │ │ │ │ │ ├── assembler-arm64.cc │ │ │ │ │ │ │ ├── assembler-ia32.cc │ │ │ │ │ │ │ ├── assembler-x64.cc │ │ │ │ │ │ │ └── assembler-arm.cc │ │ │ │ │ ├── Backend │ │ │ │ │ │ ├── KernelMode │ │ │ │ │ │ │ ├── ExecMemory │ │ │ │ │ │ │ │ └── clear-cache-tool-all.c │ │ │ │ │ │ │ ├── UnifiedInterface │ │ │ │ │ │ │ │ ├── exec_mem_placeholder.asm │ │ │ │ │ │ │ │ └── platform.h │ │ │ │ │ │ │ └── PlatformUtil │ │ │ │ │ │ │ │ └── ProcessRuntimeUtility.h │ │ │ │ │ │ └── UserMode │ │ │ │ │ │ │ ├── Thread │ │ │ │ │ │ │ ├── platform-thread-windows.cc │ │ │ │ │ │ │ ├── PlatformThread.cc │ │ │ │ │ │ │ └── PlatformThread.h │ │ │ │ │ │ │ ├── PlatformUtil │ │ │ │ │ │ │ └── ProcessRuntimeUtility.h │ │ │ │ │ │ │ ├── MultiThreadSupport │ │ │ │ │ │ │ └── ThreadSupport.cpp │ │ │ │ │ │ │ └── ExecMemory │ │ │ │ │ │ │ ├── code-patch-tool-windows.cc │ │ │ │ │ │ │ ├── substrated │ │ │ │ │ │ │ └── mach_interface_support │ │ │ │ │ │ │ │ └── substrated.defs │ │ │ │ │ │ │ └── code-patch-tool-posix.cc │ │ │ │ │ ├── PlatformUnifiedInterface │ │ │ │ │ │ └── ExecMemory │ │ │ │ │ │ │ ├── CodePatchTool.h │ │ │ │ │ │ │ └── ClearCacheTool.h │ │ │ │ │ ├── TrampolineBridge │ │ │ │ │ │ ├── Trampoline │ │ │ │ │ │ │ ├── Trampoline.h │ │ │ │ │ │ │ ├── x86 │ │ │ │ │ │ │ │ └── trampoline_x86.cc │ │ │ │ │ │ │ └── arm64 │ │ │ │ │ │ │ │ └── trampoline_arm64.cc │ │ │ │ │ │ └── ClosureTrampolineBridge │ │ │ │ │ │ │ ├── arm │ │ │ │ │ │ │ ├── helper_arm.cc │ │ │ │ │ │ │ └── dummy │ │ │ │ │ │ │ │ └── closure-trampoline-template-arm.S │ │ │ │ │ │ │ ├── x86 │ │ │ │ │ │ │ └── helper_x86.cc │ │ │ │ │ │ │ ├── arm64 │ │ │ │ │ │ │ ├── helper_arm64.cc │ │ │ │ │ │ │ └── dummy │ │ │ │ │ │ │ │ ├── dynamic-closure-trampoline-template-arm64.S │ │ │ │ │ │ │ │ └── closure-trampoline-template-arm64.S │ │ │ │ │ │ │ ├── x64 │ │ │ │ │ │ │ ├── helper_x64.cc │ │ │ │ │ │ │ └── dummy │ │ │ │ │ │ │ │ └── closure-trampoline-template-x64.S │ │ │ │ │ │ │ ├── common_bridge_handler.h │ │ │ │ │ │ │ ├── ClosureTrampoline.h │ │ │ │ │ │ │ └── common_bridge_handler.cc │ │ │ │ │ ├── dobby │ │ │ │ │ │ ├── types.h │ │ │ │ │ │ ├── common.h │ │ │ │ │ │ ├── dobby_internal.h │ │ │ │ │ │ ├── platform_detect_macro.h │ │ │ │ │ │ ├── pac_kit.h │ │ │ │ │ │ ├── kernel_mode_header.h │ │ │ │ │ │ └── platform_features.h │ │ │ │ │ ├── InterceptRouting │ │ │ │ │ │ ├── Routing │ │ │ │ │ │ │ ├── InstructionInstrument │ │ │ │ │ │ │ │ ├── instrument_routing_handler.h │ │ │ │ │ │ │ │ ├── InstructionInstrumentRouting.h │ │ │ │ │ │ │ │ ├── instrument_routing_handler.cc │ │ │ │ │ │ │ │ └── InstructionInstrument.cc │ │ │ │ │ │ │ ├── FunctionInlineHook │ │ │ │ │ │ │ │ ├── FunctionInlineHookRouting.h │ │ │ │ │ │ │ │ └── RoutingImpl.cc │ │ │ │ │ │ │ └── FunctionWrapper │ │ │ │ │ │ │ │ ├── FunctionWrapperExport.cc │ │ │ │ │ │ │ │ ├── intercept_routing_handler.h │ │ │ │ │ │ │ │ └── function-wrapper.h │ │ │ │ │ │ └── RoutingPlugin │ │ │ │ │ │ │ ├── RoutingPlugin.cc │ │ │ │ │ │ │ ├── NearBranchTrampoline │ │ │ │ │ │ │ └── NearBranchTrampoline.h │ │ │ │ │ │ │ └── RoutingPlugin.h │ │ │ │ │ ├── InstructionRelocation │ │ │ │ │ │ ├── InstructionRelocation.h │ │ │ │ │ │ ├── x64 │ │ │ │ │ │ │ └── InstructionRelocationX64.h │ │ │ │ │ │ ├── x86 │ │ │ │ │ │ │ ├── InstructionRelocationX86.h │ │ │ │ │ │ │ └── InstructionRelocationX86Shared.h │ │ │ │ │ │ └── arm64 │ │ │ │ │ │ │ ├── InstructionRelocationARM64.h │ │ │ │ │ │ │ └── inst_constants.h │ │ │ │ │ ├── MemoryAllocator │ │ │ │ │ │ ├── CodeBuffer │ │ │ │ │ │ │ ├── code-buffer-x86.h │ │ │ │ │ │ │ ├── code_buffer_x64.h │ │ │ │ │ │ │ ├── code_buffer_x86.h │ │ │ │ │ │ │ ├── code-buffer-x64.h │ │ │ │ │ │ │ ├── code-buffer-x86.cc │ │ │ │ │ │ │ ├── code_buffer_arm64.h │ │ │ │ │ │ │ ├── code-buffer-arm64.h │ │ │ │ │ │ │ └── CodeBufferBase.h │ │ │ │ │ │ ├── AssemblyCodeBuilder.h │ │ │ │ │ │ ├── NearMemoryAllocator.h │ │ │ │ │ │ └── AssemblyCodeBuilder.cc │ │ │ │ │ ├── InterceptEntry.cpp │ │ │ │ │ ├── Interceptor.h │ │ │ │ │ ├── InterceptEntry.h │ │ │ │ │ ├── dobby.cpp │ │ │ │ │ └── Interceptor.cpp │ │ │ │ ├── README_zh-cn.md │ │ │ │ ├── external │ │ │ │ │ ├── TINYSTL │ │ │ │ │ │ ├── algorithm.h │ │ │ │ │ │ └── README │ │ │ │ │ ├── deprecated │ │ │ │ │ │ └── misc-helper │ │ │ │ │ │ │ ├── misc-helper │ │ │ │ │ │ │ ├── format_printer.h │ │ │ │ │ │ │ ├── async_logger.h │ │ │ │ │ │ │ └── variable_cache.h │ │ │ │ │ │ │ ├── format_printer.cc │ │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ │ └── deprecated │ │ │ │ │ │ │ └── unistd_helper.h │ │ │ │ │ ├── osbase │ │ │ │ │ │ └── CMakeLists.txt │ │ │ │ │ └── logging │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── kernel_logging.cc │ │ │ │ ├── builtin-plugin │ │ │ │ │ ├── SupervisorCallMonitor │ │ │ │ │ │ ├── README │ │ │ │ │ │ ├── test_supervisor_call_monitor.cc │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ ├── supervisor_call_monitor.h │ │ │ │ │ │ ├── misc_utility.h │ │ │ │ │ │ └── misc_utility.cc │ │ │ │ │ ├── ImportTableReplace │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── dobby_import_replace.h │ │ │ │ │ ├── SymbolResolver │ │ │ │ │ │ ├── macho │ │ │ │ │ │ │ └── dobby_symbol_resolver_priv.h │ │ │ │ │ │ ├── dobby_symbol_resolver.h │ │ │ │ │ │ └── pe │ │ │ │ │ │ │ └── dobby_symbol_resolver.cc │ │ │ │ │ ├── ObjcRuntimeReplace │ │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ │ └── dobby_objc_runtime_repalce.h │ │ │ │ │ ├── BionicLinkerUtil │ │ │ │ │ │ ├── bionic_linker_util.h │ │ │ │ │ │ └── bionic_linker_demo.cc │ │ │ │ │ ├── CMakeLists.txt │ │ │ │ │ └── ApplicationEventMonitor │ │ │ │ │ │ └── MGCopyAnswerMonitor.cc │ │ │ │ ├── cmake │ │ │ │ │ ├── Macros.cmake │ │ │ │ │ ├── xcode_generator_helper.cmake │ │ │ │ │ ├── Util.cmake │ │ │ │ │ ├── platform │ │ │ │ │ │ └── platform-darwin.cmake │ │ │ │ │ └── auto_source_group.cmake │ │ │ │ ├── .clang-format │ │ │ │ ├── scripts │ │ │ │ │ ├── Dockerfile │ │ │ │ │ └── setup_macos_cross_compile.sh │ │ │ │ ├── .vscode │ │ │ │ │ ├── launch.json │ │ │ │ │ └── tags │ │ │ │ ├── README.md │ │ │ │ └── .gitignore │ │ │ │ ├── lsp │ │ │ │ ├── external │ │ │ │ │ └── dex_builder │ │ │ │ │ │ ├── external │ │ │ │ │ │ └── parallel_hashmap │ │ │ │ │ │ │ ├── .github │ │ │ │ │ │ │ ├── FUNDING.yml │ │ │ │ │ │ │ └── workflows │ │ │ │ │ │ │ │ ├── linux.yml │ │ │ │ │ │ │ │ ├── macos.yml │ │ │ │ │ │ │ │ └── windows.yml │ │ │ │ │ │ │ ├── .gitattributes │ │ │ │ │ │ │ ├── examples │ │ │ │ │ │ │ ├── btree_fwd.h │ │ │ │ │ │ │ ├── f1.cc │ │ │ │ │ │ │ ├── f2.cc │ │ │ │ │ │ │ ├── hash_std.cc │ │ │ │ │ │ │ ├── hash_value.cc │ │ │ │ │ │ │ ├── basic.cc │ │ │ │ │ │ │ ├── hash_value.h │ │ │ │ │ │ │ ├── pmr.cc │ │ │ │ │ │ │ ├── hash_std.h │ │ │ │ │ │ │ └── hash.cc │ │ │ │ │ │ │ ├── html │ │ │ │ │ │ │ ├── img │ │ │ │ │ │ │ │ ├── phash.png │ │ │ │ │ │ │ │ ├── flat_peak.gif │ │ │ │ │ │ │ │ ├── flat_peak.png │ │ │ │ │ │ │ │ ├── node_peak.gif │ │ │ │ │ │ │ │ ├── node_peak.png │ │ │ │ │ │ │ │ ├── phmap_logo.png │ │ │ │ │ │ │ │ ├── par_mt_speed.PNG │ │ │ │ │ │ │ │ ├── stl_flat_mem.PNG │ │ │ │ │ │ │ │ ├── closed_hashing.png │ │ │ │ │ │ │ │ ├── flat_mem_usage.gif │ │ │ │ │ │ │ │ ├── flat_mem_usage.png │ │ │ │ │ │ │ │ ├── flat_par_speed.PNG │ │ │ │ │ │ │ │ ├── no_preselection.PNG │ │ │ │ │ │ │ │ ├── node_mem_usage.gif │ │ │ │ │ │ │ │ ├── node_mem_usage.png │ │ │ │ │ │ │ │ ├── par_align_test.png │ │ │ │ │ │ │ │ ├── par_mt_memory.PNG │ │ │ │ │ │ │ │ ├── stl_flat_both.PNG │ │ │ │ │ │ │ │ ├── stl_flat_speed.PNG │ │ │ │ │ │ │ │ ├── flat_par_mutex_4.PNG │ │ │ │ │ │ │ │ ├── flat_par_mutex_5.PNG │ │ │ │ │ │ │ │ ├── index_computation.png │ │ │ │ │ │ │ │ ├── spp_flat_par_both.png │ │ │ │ │ │ │ │ ├── stl_flat_par_both.PNG │ │ │ │ │ │ │ │ ├── stl_flat_par_mem.PNG │ │ │ │ │ │ │ │ ├── hashtable_benchmarks.PNG │ │ │ │ │ │ │ │ ├── idx_computation_cost.PNG │ │ │ │ │ │ │ │ ├── lock_various_sizes.PNG │ │ │ │ │ │ │ │ ├── mt_stl_flat_par_both.PNG │ │ │ │ │ │ │ │ ├── mt_stl_flat_par_mem.PNG │ │ │ │ │ │ │ │ ├── parallel_flat_peak.gif │ │ │ │ │ │ │ │ ├── parallel_flat_peak.png │ │ │ │ │ │ │ │ ├── parallel_node_peak.gif │ │ │ │ │ │ │ │ ├── parallel_node_peak.png │ │ │ │ │ │ │ │ ├── stl_flat_par_speed.PNG │ │ │ │ │ │ │ │ ├── flat_par_mutex_5_speed.PNG │ │ │ │ │ │ │ │ ├── flat_par_mutex_6_speed.PNG │ │ │ │ │ │ │ │ ├── mt_stl_flat_par_speed.PNG │ │ │ │ │ │ │ │ ├── mt_stl_flat_par_both_run2.PNG │ │ │ │ │ │ │ │ ├── mt_stl_flat_par_mem_run2.PNG │ │ │ │ │ │ │ │ ├── stl_flat_par_mem_zoomed.PNG │ │ │ │ │ │ │ │ ├── mt_stl_flat_par_mem_zoomed.PNG │ │ │ │ │ │ │ │ ├── mt_stl_flat_par_speed_run2.PNG │ │ │ │ │ │ │ │ └── mt_stl_flat_par_mem_run2_zoomed.PNG │ │ │ │ │ │ │ ├── parallel_hashmap.pdf │ │ │ │ │ │ │ ├── bench_results │ │ │ │ │ │ │ │ └── martinus_mod │ │ │ │ │ │ │ │ │ └── index2.html │ │ │ │ │ │ │ ├── latex_macros │ │ │ │ │ │ │ └── template.html │ │ │ │ │ │ │ ├── tests │ │ │ │ │ │ │ ├── parallel_node_hash_set_test.cc │ │ │ │ │ │ │ ├── parallel_flat_hash_map_test.cc │ │ │ │ │ │ │ ├── parallel_node_hash_map_test.cc │ │ │ │ │ │ │ ├── parallel_flat_hash_set_test.cc │ │ │ │ │ │ │ ├── parallel_flat_hash_map_mutex_test.cc │ │ │ │ │ │ │ └── hash_policy_testing_test.cc │ │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ │ ├── benchmark │ │ │ │ │ │ │ ├── js │ │ │ │ │ │ │ │ ├── jquery.flot.uiConstants.js │ │ │ │ │ │ │ │ └── jquery.flot.saturated.js │ │ │ │ │ │ │ └── BENCHMARK.md │ │ │ │ │ │ │ └── cmake │ │ │ │ │ │ │ ├── CMakeLists.txt.in │ │ │ │ │ │ │ └── DetectVersion.cmake │ │ │ │ │ │ ├── .gitmodules │ │ │ │ │ │ ├── include │ │ │ │ │ │ ├── dex_helper.ixx │ │ │ │ │ │ └── slicer │ │ │ │ │ │ │ ├── sha1.h │ │ │ │ │ │ │ ├── dex_utf8.h │ │ │ │ │ │ │ └── memview.h │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ └── Android.mk │ │ │ │ ├── art │ │ │ │ │ └── runtime │ │ │ │ │ │ ├── value_object.hpp │ │ │ │ │ │ ├── obj_ptr.hpp │ │ │ │ │ │ ├── reflective_reference.hpp │ │ │ │ │ │ ├── reflective_handle.hpp │ │ │ │ │ │ ├── thread.hpp │ │ │ │ │ │ ├── object_reference.hpp │ │ │ │ │ │ ├── jni │ │ │ │ │ │ └── jni_id_manager.h │ │ │ │ │ │ └── handle.hpp │ │ │ │ ├── .clang-format │ │ │ │ ├── Application.mk │ │ │ │ └── Android.mk │ │ │ │ ├── xz │ │ │ │ ├── linux │ │ │ │ │ ├── lib │ │ │ │ │ │ └── xz │ │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ │ ├── xz_dec_syms.c │ │ │ │ │ │ │ ├── xz_crc64.c │ │ │ │ │ │ │ └── xz_crc32.c │ │ │ │ │ ├── include │ │ │ │ │ │ └── linux │ │ │ │ │ │ │ └── decompress │ │ │ │ │ │ │ └── unxz.h │ │ │ │ │ └── scripts │ │ │ │ │ │ └── xz_wrap.sh │ │ │ │ └── userspace │ │ │ │ │ └── buftest.c │ │ │ │ ├── native-lib.cpp │ │ │ │ ├── profile_saver.h │ │ │ │ ├── hidden_api.h │ │ │ │ ├── aliuhook.h │ │ │ │ ├── invoke_constructor.h │ │ │ │ ├── log.h │ │ │ │ └── hidden_api.cpp │ │ ├── res │ │ │ ├── values-land │ │ │ │ └── dimens.xml │ │ │ ├── values-w1240dp │ │ │ │ └── dimens.xml │ │ │ ├── values-w600dp │ │ │ │ └── dimens.xml │ │ │ ├── drawable │ │ │ │ ├── ic_add.png │ │ │ │ ├── ic_menu_slideshow.xml │ │ │ │ ├── ic_menu_gallery.xml │ │ │ │ └── ic_menu_camera.xml │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ └── ic_launcher_foreground.webp │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ └── ic_launcher_foreground.webp │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ └── ic_launcher_foreground.webp │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ └── ic_launcher_foreground.webp │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.webp │ │ │ │ ├── ic_launcher_round.webp │ │ │ │ └── ic_launcher_foreground.webp │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── menu │ │ │ │ ├── home.xml │ │ │ │ └── activity_main_drawer.xml │ │ │ ├── values │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ └── themes.xml │ │ │ ├── xml │ │ │ │ ├── backup_rules.xml │ │ │ │ └── data_extraction_rules.xml │ │ │ ├── layout │ │ │ │ ├── activity_add_app.xml │ │ │ │ ├── item_app.xml │ │ │ │ ├── item_app_add.xml │ │ │ │ └── activity_home.xml │ │ │ ├── values-night │ │ │ │ └── themes.xml │ │ │ └── navigation │ │ │ │ └── mobile_navigation.xml │ │ ├── ic_launcher-playstore.png │ │ └── java │ │ │ ├── com │ │ │ └── crack │ │ │ │ └── vapp │ │ │ │ ├── core │ │ │ │ ├── HookContentProvider.java │ │ │ │ ├── HookBroadcastReceiver.java │ │ │ │ └── InstallApp.java │ │ │ │ ├── ui │ │ │ │ ├── ProxyActivity.java │ │ │ │ └── AddAppActivity.java │ │ │ │ ├── Utils │ │ │ │ └── lg.java │ │ │ │ ├── test │ │ │ │ ├── testService.java │ │ │ │ └── testActivity.java │ │ │ │ ├── service │ │ │ │ └── ProxyService.java │ │ │ │ └── BaseData.java │ │ │ └── de │ │ │ └── robv │ │ │ └── android │ │ │ └── xposed │ │ │ └── callbacks │ │ │ └── IXUnhook.java │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── crack │ │ │ └── vapp │ │ │ └── ExampleUnitTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── crack │ │ └── vapp │ │ └── ExampleInstrumentedTest.java └── proguard-rules.pro ├── .idea ├── .gitignore ├── vcs.xml ├── compiler.xml ├── AndroidProjectSystem.xml ├── migrations.xml ├── deploymentTargetSelector.xml ├── misc.xml ├── gradle.xml └── runConfigurations.xml ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle ├── README.md └── gradle.properties /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/emulator/dummy.cc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/README_zh-cn.md: -------------------------------------------------------------------------------- 1 | ## Dobby 2 | 3 | **待更新** -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/TINYSTL/algorithm.h: -------------------------------------------------------------------------------- 1 | #pragma once -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/TINYSTL/README: -------------------------------------------------------------------------------- 1 | ref: https://github.com/mendsley/tinystl -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/SupervisorCallMonitor/README: -------------------------------------------------------------------------------- 1 | Monitor all supervisor call -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: greg7mdp 2 | -------------------------------------------------------------------------------- /app/src/main/res/values-land/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 48dp 3 | -------------------------------------------------------------------------------- /app/src/main/res/values-w1240dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 200dp 3 | -------------------------------------------------------------------------------- /app/src/main/res/values-w600dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 48dp 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/drawable/ic_add.png -------------------------------------------------------------------------------- /app/src/main/ic_launcher-playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/ic_launcher-playstore.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/cmake/Macros.cmake: -------------------------------------------------------------------------------- 1 | macro(SET_OPTION option value) 2 | set(${option} ${value} CACHE INTERNAL "" FORCE) 3 | endmacro() -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/.gitattributes: -------------------------------------------------------------------------------- 1 | * linguist-vendored 2 | *.cc linguist-vendored=false 3 | -------------------------------------------------------------------------------- /app/src/main/java/com/crack/vapp/core/HookContentProvider.java: -------------------------------------------------------------------------------- 1 | package com.crack.vapp.core; 2 | 3 | public class HookContentProvider { 4 | } 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/KernelMode/ExecMemory/clear-cache-tool-all.c: -------------------------------------------------------------------------------- 1 | void ClearCache(void *start, void *end) { 2 | return; 3 | } 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/ImportTableReplace/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(dobby_import_replace INTERFACE 2 | dobby_import_replace.cc 3 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/crack/vapp/ui/ProxyActivity.java: -------------------------------------------------------------------------------- 1 | package com.crack.vapp.ui; 2 | 3 | public class ProxyActivity extends android.app.Activity{ 4 | } 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/arch/Cpu.cc: -------------------------------------------------------------------------------- 1 | 2 | #include "core/arch/Cpu.h" 3 | #include "core/arch/CpuUtils.h" 4 | 5 | #include "xnucxx/LiteMemOpt.h" 6 | -------------------------------------------------------------------------------- /app/src/main/java/com/crack/vapp/core/HookBroadcastReceiver.java: -------------------------------------------------------------------------------- 1 | package com.crack.vapp.core; 2 | 3 | public class HookBroadcastReceiver { 4 | 5 | 6 | } 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/art/runtime/value_object.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace lsplant::art { 4 | class ValueObject {}; 5 | } // namespace lsplant::art 6 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/deprecated/misc-helper/misc-helper/format_printer.h: -------------------------------------------------------------------------------- 1 | #include "dobby/common.h" 2 | 3 | void hexdump(const uint8_t *bytes, size_t len); -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/osbase/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(osbase STATIC 2 | ${PROJECT_SOURCE_DIR}/source/Backend/UserMode/UnifiedInterface/platform-posix.cc 3 | ) -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.webp -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/PlatformUnifiedInterface/ExecMemory/CodePatchTool.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | int DobbyCodePatch(void *address, uint8_t *buffer, uint32_t buffer_size); -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/arch/Cpu.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_ARCH_CPU_H 2 | #define CORE_ARCH_CPU_H 3 | 4 | #include "CpuRegister.h" 5 | #include "CpuFeature.h" 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "external/parallel_hashmap"] 2 | path = external/parallel_hashmap 3 | url = https://github.com/greg7mdp/parallel-hashmap.git 4 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/SymbolResolver/macho/dobby_symbol_resolver_priv.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "macho_ctx.h" 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/include/dex_helper.ixx: -------------------------------------------------------------------------------- 1 | module; 2 | 3 | #include "dex_helper.h" 4 | 5 | export module dex_helper; 6 | 7 | export import dex_builder; 8 | export using ::DexHelper; 9 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/arch/CpuFeature.cc: -------------------------------------------------------------------------------- 1 | 2 | #include "core/arch/CpuFeature.h" 3 | #include "logging/logging.h" 4 | 5 | void CpuFeatures::ClearCache(void *start, void *end) { 6 | UNIMPLEMENTED(); 7 | } -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/Trampoline/Trampoline.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MemoryAllocator/AssemblyCodeBuilder.h" 4 | 5 | CodeBufferBase *GenerateNormalTrampolineBuffer(addr_t from, addr_t to); -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/dobby/types.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | typedef unsigned char byte_t; 6 | typedef unsigned int uint; 7 | 8 | #ifndef NULL 9 | #define NULL 0 10 | #endif 11 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/examples/btree_fwd.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | using IntString = phmap::btree_map; 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/phash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/phash.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/ObjcRuntimeReplace/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(objc_runtime_replace 2 | dobby_objc_runtime_replace.mm 3 | ) 4 | 5 | target_link_libraries(objc_runtime_replace 6 | "-framework Foundation" 7 | ) -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/deprecated/misc-helper/misc-helper/async_logger.h: -------------------------------------------------------------------------------- 1 | #ifndef ASYNC_LOGGER_H 2 | #define ASYNC_LOGGER_H 3 | 4 | void async_logger_print(char *str); 5 | 6 | void async_logger_init(char *logger_path); 7 | 8 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_peak.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_peak.gif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_peak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_peak.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/node_peak.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/node_peak.gif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/node_peak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/node_peak.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/phmap_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/phmap_logo.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/tests/parallel_node_hash_set_test.cc: -------------------------------------------------------------------------------- 1 | #define THIS_HASH_SET parallel_node_hash_set 2 | #define THIS_TEST_NAME ParallelNodeHashSet 3 | 4 | #include "node_hash_set_test.cc" 5 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/xz/linux/lib/xz/Makefile: -------------------------------------------------------------------------------- 1 | obj-$(CONFIG_XZ_DEC) += xz_dec.o 2 | xz_dec-y := xz_dec_syms.o xz_dec_stream.o xz_dec_lzma2.o 3 | xz_dec-$(CONFIG_XZ_DEC_BCJ) += xz_dec_bcj.o 4 | 5 | obj-$(CONFIG_XZ_DEC_TEST) += xz_dec_test.o 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/par_mt_speed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/par_mt_speed.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_mem.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_mem.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/parallel_hashmap.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/parallel_hashmap.pdf -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/tests/parallel_flat_hash_map_test.cc: -------------------------------------------------------------------------------- 1 | #define THIS_HASH_MAP parallel_flat_hash_map 2 | #define THIS_TEST_NAME ParallelFlatHashMap 3 | 4 | #include "parallel_hash_map_test.cc" 5 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/tests/parallel_node_hash_map_test.cc: -------------------------------------------------------------------------------- 1 | #define THIS_HASH_MAP parallel_node_hash_map 2 | #define THIS_TEST_NAME ParallelNodeHashMap 3 | 4 | #include "parallel_hash_map_test.cc" 5 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/arch/x86/cpu-x86.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 3 | 4 | #include "cpu-x86.h" 5 | 6 | X86CpuInfo::X86CpuInfo() { 7 | 8 | } 9 | 10 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/closed_hashing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/closed_hashing.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_mem_usage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_mem_usage.gif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_mem_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_mem_usage.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_par_speed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_par_speed.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/no_preselection.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/no_preselection.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/node_mem_usage.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/node_mem_usage.gif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/node_mem_usage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/node_mem_usage.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/par_align_test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/par_align_test.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/par_mt_memory.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/par_mt_memory.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_both.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_both.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_speed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_speed.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/tests/parallel_flat_hash_set_test.cc: -------------------------------------------------------------------------------- 1 | #define THIS_HASH_SET parallel_flat_hash_set 2 | #define THIS_TEST_NAME ParallelFlatHashSet 3 | 4 | #include "parallel_hash_set_test.cc" 5 | 6 | -------------------------------------------------------------------------------- /.idea/AndroidProjectSystem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/PlatformUnifiedInterface/ExecMemory/ClearCacheTool.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | void ClearCache(void *start, void *end); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_par_mutex_4.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_par_mutex_4.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_par_mutex_5.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_par_mutex_5.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/index_computation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/index_computation.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/spp_flat_par_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/spp_flat_par_both.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_par_both.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_par_both.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_par_mem.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_par_mem.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/hashtable_benchmarks.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/hashtable_benchmarks.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/idx_computation_cost.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/idx_computation_cost.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/lock_various_sizes.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/lock_various_sizes.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_both.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_both.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_mem.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_mem.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/parallel_flat_peak.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/parallel_flat_peak.gif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/parallel_flat_peak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/parallel_flat_peak.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/parallel_node_peak.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/parallel_node_peak.gif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/parallel_node_peak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/parallel_node_peak.png -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_par_speed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_par_speed.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_par_mutex_5_speed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_par_mutex_5_speed.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_par_mutex_6_speed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/flat_par_mutex_6_speed.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_speed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_speed.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_both_run2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_both_run2.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_mem_run2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_mem_run2.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_par_mem_zoomed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/stl_flat_par_mem_zoomed.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/Routing/InstructionInstrument/instrument_routing_handler.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/dobby_internal.h" 4 | 5 | extern "C" { 6 | void instrument_routing_dispatch(InterceptEntry *entry, DobbyRegisterContext *ctx); 7 | } -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/.gitignore: -------------------------------------------------------------------------------- 1 | VagrantFile 2 | benchmark/build 3 | benchmark/output 4 | benchmark/charts.html 5 | build* 6 | .vagrant 7 | .cache 8 | .gdb_history 9 | compile_commands.json 10 | **/.vscode 11 | TAGS 12 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_mem_zoomed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_mem_zoomed.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_speed_run2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_speed_run2.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_mem_run2_zoomed.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NiTianErXing666/Vapp/HEAD/app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/img/mt_stl_flat_par_mem_run2_zoomed.PNG -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/arch/CpuRegister.cc: -------------------------------------------------------------------------------- 1 | 2 | #include "CpuRegister.h" 3 | 4 | constexpr RegisterBase RegisterBase::from_code(int code) { 5 | return RegisterBase{code}; 6 | } 7 | 8 | constexpr RegisterBase RegisterBase::no_reg() { 9 | return RegisterBase{0}; 10 | } -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Apr 22 18:12:25 CST 2025 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip 5 | zipStoreBase=GRADLE_USER_HOME 6 | zipStorePath=wrapper/dists 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /.idea/migrations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/ImportTableReplace/dobby_import_replace.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | // int DobbyImportTableReplace(char *image_name, char *symbol_name, void *fake_func, void **orig_func); 8 | 9 | #ifdef __cplusplus 10 | } 11 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InstructionRelocation/InstructionRelocation.h: -------------------------------------------------------------------------------- 1 | #include "dobby/dobby_internal.h" 2 | 3 | void GenRelocateCode(void *buffer, CodeMemBlock *origin, CodeMemBlock *relocated, bool branch); 4 | 5 | void GenRelocateCodeAndBranch(void *buffer, CodeMemBlock *origin, CodeMemBlock *relocated); 6 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InstructionRelocation/x64/InstructionRelocationX64.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/common.h" 4 | 5 | #include "core/arch/x64/constants-x64.h" 6 | 7 | #include "MemoryAllocator/AssemblyCodeBuilder.h" 8 | 9 | #include "InstructionRelocation/x86/InstructionRelocationX86Shared.h" 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InstructionRelocation/x86/InstructionRelocationX86.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/common.h" 4 | 5 | #include "core/arch/x86/constants-x86.h" 6 | 7 | #include "MemoryAllocator/AssemblyCodeBuilder.h" 8 | 9 | #include "InstructionRelocation/x86/InstructionRelocationX86Shared.h" 10 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/native-lib.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern "C" JNIEXPORT jstring JNICALL 5 | Java_com_crack_lspc_MainActivity_stringFromJNI( 6 | JNIEnv* env, 7 | jobject /* this */) { 8 | std::string hello = "Hello from C++"; 9 | return env->NewStringUTF(hello.c_str()); 10 | } -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/KernelMode/UnifiedInterface/exec_mem_placeholder.asm: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define PAGE_SHIFT 14 4 | .align PAGE_SHIFT 5 | 6 | .globl EXT(kernel_executable_memory_placeholder) 7 | EXT(kernel_executable_memory_placeholder): 8 | .rept 0x4000/4 9 | .long 0x41414141 10 | .endr -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/MemoryAllocator/CodeBuffer/code-buffer-x86.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MemoryAllocator/CodeBuffer/CodeBufferBase.h" 4 | 5 | class CodeBuffer : public CodeBufferBase { 6 | public: 7 | CodeBuffer() : CodeBufferBase() { 8 | } 9 | 10 | public: 11 | void FixBindLabel(int offset, int32_t disp); 12 | }; -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/dobby/common.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby.h" 4 | #include "dobby/types.h" 5 | #include "dobby/platform_features.h" 6 | #include "dobby/platform_detect_macro.h" 7 | #include "dobby/utility_macro.h" 8 | #include "dobby/pac_kit.h" 9 | 10 | #include "logging/logging.h" 11 | #include "logging/check_logging.h" -------------------------------------------------------------------------------- /.idea/deploymentTargetSelector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/SymbolResolver/dobby_symbol_resolver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if defined(BUILDING_INTERNAL) 4 | #include "macho/dobby_symbol_resolver_priv.h" 5 | #endif 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | void *DobbySymbolResolver(const char *image_name, const char *symbol_name); 12 | 13 | #ifdef __cplusplus 14 | } 15 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/MemoryAllocator/CodeBuffer/code_buffer_x64.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MemoryAllocator/CodeBuffer/CodeBufferBase.h" 4 | 5 | class CodeBuffer : public CodeBufferBase { 6 | public: 7 | CodeBuffer() : CodeBufferBase() { 8 | } 9 | 10 | public: 11 | void FixBindLabel(int offset, int32_t disp) { 12 | Store(offset, disp); 13 | } 14 | }; -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/MemoryAllocator/CodeBuffer/code_buffer_x86.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MemoryAllocator/CodeBuffer/CodeBufferBase.h" 4 | 5 | class CodeBuffer : public CodeBufferBase { 6 | public: 7 | CodeBuffer() : CodeBufferBase() { 8 | } 9 | 10 | public: 11 | void FixBindLabel(int offset, int32_t disp) { 12 | Store(offset, disp); 13 | } 14 | }; -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/codegen/codegen.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_CODEGEN_H 2 | #define CORE_CODEGEN_H 3 | 4 | #include "core/assembler/assembler.h" 5 | 6 | using namespace zz; 7 | 8 | class CodeGenBase { 9 | public: 10 | CodeGenBase(AssemblerBase *assembler) : assembler_(assembler) { 11 | } 12 | 13 | protected: 14 | AssemblerBase *assembler_; 15 | }; 16 | 17 | #endif -------------------------------------------------------------------------------- /app/src/main/res/menu/home.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/deprecated/misc-helper/format_printer.cc: -------------------------------------------------------------------------------- 1 | #include "misc-helper/format_printer.h" 2 | 3 | void hexdump(const uint8_t *bytes, size_t len) { 4 | size_t ix; 5 | for (ix = 0; ix < len; ++ix) { 6 | if (ix != 0 && !(ix % 16)) 7 | LOG_FUNCTION_IMPL(0, "\n"); 8 | LOG_FUNCTION_IMPL(0, "%02X ", bytes[ix]); 9 | } 10 | LOG_FUNCTION_IMPL(0, "\n"); 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/logging/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(.) 2 | 3 | if(NOT DOBBY_BUILD_KERNEL_MODE) 4 | set(SOURCE_FILE_LIST 5 | ${CMAKE_CURRENT_SOURCE_DIR}/logging.cc 6 | ) 7 | else() 8 | set(SOURCE_FILE_LIST 9 | ${CMAKE_CURRENT_SOURCE_DIR}/kernel_logging.cc 10 | ) 11 | endif() 12 | add_library(logging 13 | ${SOURCE_FILE_LIST} 14 | ${SOURCE_HEADER_LIST} 15 | ) -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/benchmark/js/jquery.flot.uiConstants.js: -------------------------------------------------------------------------------- 1 | (function ($) { 2 | 'use strict'; 3 | $.plot.uiConstants = { 4 | SNAPPING_CONSTANT: 20, 5 | PANHINT_LENGTH_CONSTANT: 10, 6 | MINOR_TICKS_COUNT_CONSTANT: 4, 7 | TICK_LENGTH_CONSTANT: 10, 8 | ZOOM_DISTANCE_MARGIN: 25 9 | }; 10 | })(jQuery); 11 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InstructionRelocation/arm64/InstructionRelocationARM64.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/dobby_internal.h" 4 | 5 | #include "core/arch/arm64/constants-arm64.h" 6 | 7 | #if 0 8 | namespace zz { 9 | namespace arm64 { 10 | void GenRelocateCodeAndBranch(void *buffer, CodeMemBlock *origin, CodeMemBlock *relocated); 11 | } // namespace arm64 12 | } // namespace zz 13 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/bench_results/martinus_mod/index2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

Benchmark Results

6 | 7 | insert 100m values in map

8 | 9 | Lookup 100m ints, all present | Lookup 100m ints, few present

10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/profile_saver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of AliuHook, a library providing XposedAPI bindings to LSPlant 3 | * Copyright (c) 2021 Juby210 & Vendicated 4 | * Licensed under the Open Software License version 3.0 5 | */ 6 | 7 | #ifndef ALIUHOOK_PROFILE_SAVER_H 8 | #define ALIUHOOK_PROFILE_SAVER_H 9 | 10 | bool disable_profile_saver(); 11 | 12 | #endif //ALIUHOOK_PROFILE_SAVER_H 13 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 8dp 6 | 176dp 7 | 16dp 8 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/MemoryAllocator/AssemblyCodeBuilder.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "PlatformUnifiedInterface/MemoryAllocator.h" 4 | 5 | #include "core/assembler/assembler.h" 6 | 7 | using namespace zz; 8 | 9 | using AssemblyCode = CodeMemBlock; 10 | 11 | class AssemblyCodeBuilder { 12 | public: 13 | static AssemblyCode *FinalizeFromTurboAssembler(AssemblerBase *assembler); 14 | }; 15 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/hidden_api.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of AliuHook, a library providing XposedAPI bindings to LSPlant 3 | * Copyright (c) 2021 Juby210 & Vendicated 4 | * Licensed under the Open Software License version 3.0 5 | */ 6 | 7 | #ifndef ALIUHOOK_HIDDEN_API_H 8 | #define ALIUHOOK_HIDDEN_API_H 9 | 10 | #include "jni.h" 11 | 12 | bool disable_hidden_api(JNIEnv*); 13 | 14 | #endif //ALIUHOOK_HIDDEN_API_H 15 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/arch/x86/constants-x86.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_ARCH_CONSTANTS_X86_H 2 | #define CORE_ARCH_CONSTANTS_X86_H 3 | 4 | namespace zz { 5 | namespace x86 { 6 | 7 | enum ScaleFactor { 8 | TIMES_1 = 0, 9 | TIMES_2 = 1, 10 | TIMES_4 = 2, 11 | TIMES_8 = 3, 12 | TIMES_16 = 4, 13 | TIMES_HALF_WORD_SIZE = sizeof(void *) / 2 - 1 14 | }; 15 | 16 | } // namespace x86 17 | } // namespace zz 18 | 19 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: LLVM 2 | 3 | IndentWidth: 2 4 | TabWidth: 2 5 | UseTab: Never 6 | ColumnLimit: 120 7 | 8 | FixNamespaceComments: true 9 | 10 | # default is false 11 | #AlignConsecutiveMacros: true 12 | #AlignConsecutiveAssignments: true 13 | #AlignConsecutiveDeclarations: true 14 | 15 | # default is true 16 | ReflowComments: false 17 | SortIncludes : false 18 | AllowShortFunctionsOnASingleLine: false -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/MemoryAllocator/CodeBuffer/code-buffer-x64.h: -------------------------------------------------------------------------------- 1 | #ifndef CODE_BUFFER_X64_H 2 | #define CODE_BUFFER_X64_H 3 | 4 | #include "MemoryAllocator/CodeBuffer/CodeBufferBase.h" 5 | 6 | class CodeBuffer : public CodeBufferBase { 7 | public: 8 | CodeBuffer() : CodeBufferBase() { 9 | } 10 | 11 | public: 12 | void FixBindLabel(int offset, int32_t disp) { 13 | Store(offset, disp); 14 | } 15 | }; 16 | 17 | #endif -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptEntry.cpp: -------------------------------------------------------------------------------- 1 | #include "InterceptEntry.h" 2 | #include "Interceptor.h" 3 | 4 | InterceptEntry::InterceptEntry(InterceptEntryType type, addr_t address) { 5 | this->type = type; 6 | 7 | #if defined(TARGET_ARCH_ARM) 8 | if (address % 2) { 9 | address -= 1; 10 | this->thumb_mode = true; 11 | } 12 | #endif 13 | 14 | this->patched_addr = address; 15 | this->id = Interceptor::SharedInstance()->count(); 16 | } -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/dobby/dobby_internal.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/common.h" 4 | 5 | #include "UnifiedInterface/platform.h" 6 | 7 | #include "PlatformUnifiedInterface/MemoryAllocator.h" 8 | #include "PlatformUnifiedInterface/ExecMemory/CodePatchTool.h" 9 | #include "PlatformUnifiedInterface/ExecMemory/ClearCacheTool.h" 10 | 11 | #include "MemoryAllocator/AssemblyCodeBuilder.h" 12 | 13 | #include "InterceptRouting/InterceptRouting.h" -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/scripts/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:focal 2 | 3 | ARG DEBIAN_FRONTEND='noninteractive' 4 | 5 | RUN apt-key adv --keyserver 'keyserver.ubuntu.com' --recv-key 'C99B11DEB97541F0' && 6 | apt-add-repository -y -u 'https://cli.github.com/packages' && 7 | apt-add-repository 'deb https://apt.kitware.com/ubuntu/ focal main' 8 | 9 | ADD setup_linux_cross_compile.sh /root/setup_linux_cross_compile.sh 10 | RUN sh /root/setup_linux_cross_compile.sh 11 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/ClosureTrampolineBridge/arm/helper_arm.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_ARM) 3 | 4 | #include "dobby/dobby_internal.h" 5 | 6 | void set_routing_bridge_next_hop(DobbyRegisterContext *ctx, void *address) { 7 | *reinterpret_cast(&ctx->general.regs.r12) = address; 8 | } 9 | 10 | void get_routing_bridge_next_hop(DobbyRegisterContext *ctx, void *address) { 11 | } 12 | 13 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/aliuhook.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by ven on 24/03/2022. 3 | // 4 | 5 | #ifndef ALIUHOOK_ALIUHOOK_H 6 | #define ALIUHOOK_ALIUHOOK_H 7 | 8 | #include "elf_img.h" 9 | 10 | void *InlineHooker(void *, void *); 11 | 12 | bool InlineUnhooker(void *); 13 | 14 | class AliuHook { 15 | public: 16 | static pine::ElfImg elf_img; 17 | static int android_version; 18 | 19 | static void init(int version); 20 | }; 21 | 22 | #endif //ALIUHOOK_ALIUHOOK_H 23 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/art/runtime/obj_ptr.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace lsplant::art { 4 | 5 | template 6 | class ObjPtr { 7 | public: 8 | inline MirrorType *operator->() const { return Ptr(); } 9 | 10 | inline MirrorType *Ptr() const { return reference_; } 11 | 12 | inline operator MirrorType *() const { return Ptr(); } 13 | 14 | private: 15 | MirrorType *reference_; 16 | }; 17 | 18 | } // namespace lsplant::art 19 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "(lldb) Launch", 6 | "type": "cppdbg", 7 | "request": "launch", 8 | "program": "enter program name, for example ${workspaceRoot}/a.out", 9 | "args": [], 10 | "stopAtEntry": false, 11 | "cwd": "${workspaceRoot}", 12 | "environment": [], 13 | "externalConsole": true, 14 | "MIMode": "lldb" 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/invoke_constructor.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by rushii on 2024-08-27. 3 | // 4 | 5 | #ifndef ALIUHOOK_INVOKE_CONSTRUCTOR_H 6 | #define ALIUHOOK_INVOKE_CONSTRUCTOR_H 7 | 8 | #include "jni.h" 9 | 10 | bool LoadInvokeConstructorCache(JNIEnv *en, int android_version); 11 | 12 | void UnloadInvokeConstructorCache(JNIEnv*); 13 | 14 | bool InvokeConstructorWithArgs(JNIEnv* env, jobject instance, jobject constructor, jobjectArray args); 15 | 16 | #endif //ALIUHOOK_INVOKE_CONSTRUCTOR_H 17 | -------------------------------------------------------------------------------- /app/src/test/java/com/crack/vapp/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.crack.vapp; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | // @Test 14 | // public void addition_isCorrect() { 15 | // assertEquals(4, 2 + 2); 16 | // } 17 | } -------------------------------------------------------------------------------- /app/src/main/java/com/crack/vapp/Utils/lg.java: -------------------------------------------------------------------------------- 1 | package com.crack.vapp.Utils; 2 | 3 | import android.util.Log; 4 | 5 | //日志 6 | 7 | public class lg { 8 | private static final String TAG = "lg"; 9 | 10 | public static void d( String msg) { 11 | Log.d(TAG, "d: " + msg); 12 | } 13 | 14 | public static void e( String msg) { 15 | Log.e(TAG, "e: " + msg); 16 | } 17 | 18 | public static void i( String msg) { 19 | Log.i(TAG, "i: " + msg); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_menu_slideshow.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/assembler/assembler-x86-shared.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_IA32) 3 | 4 | #include "core/assembler/assembler-x86-shared.h" 5 | 6 | using namespace zz::x86shared; 7 | 8 | void Assembler::jmp(Immediate imm) { 9 | buffer_->Emit8(0xE9); 10 | buffer_->Emit32((int)imm.value()); 11 | } 12 | 13 | uint64_t TurboAssembler::CurrentIP() { 14 | return pc_offset() + (addr_t)realized_addr_; 15 | } 16 | 17 | #endif -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_menu_gallery.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/art/runtime/reflective_reference.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace lsplant::art { 6 | template 7 | class ReflectiveReference { 8 | public: 9 | static_assert(std::is_same_v, "Unknown type!"); 10 | 11 | ReflectiveType *Ptr() { return val_; } 12 | 13 | void Assign(ReflectiveType *r) { val_ = r; } 14 | 15 | private: 16 | ReflectiveType *val_; 17 | }; 18 | 19 | } // namespace lsplant::art 20 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/RoutingPlugin/RoutingPlugin.cc: -------------------------------------------------------------------------------- 1 | #include "InterceptRouting/RoutingPlugin/RoutingPlugin.h" 2 | 3 | tinystl::vector RoutingPluginManager::plugins; 4 | 5 | RoutingPluginInterface *RoutingPluginManager::near_branch_trampoline = NULL; 6 | 7 | void RoutingPluginManager::registerPlugin(const char *name, RoutingPluginInterface *plugin) { 8 | DEBUG_LOG("register %s plugin", name); 9 | 10 | RoutingPluginManager::plugins.push_back(plugin); 11 | } 12 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/arch/CpuFeature.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_ARCH_CPU_FEATURE_H 2 | #define CORE_ARCH_CPU_FEATURE_H 3 | 4 | #include "dobby/common.h" 5 | 6 | class CpuFeatures { 7 | private: 8 | static void FlushICache(void *start, size_t size) { 9 | ClearCache(start, (void *)((addr_t)start + size)); 10 | } 11 | 12 | static void FlushICache(void *start, void *end) { 13 | ClearCache(start, end); 14 | } 15 | 16 | static void ClearCache(void *start, void *end); 17 | }; 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Google 3 | IndentWidth: 4 4 | UseCRLF: false 5 | UseTab: false 6 | --- 7 | Language: Cpp 8 | DerivePointerAlignment: true 9 | PointerAlignment: Right 10 | ColumnLimit: 100 11 | AlignEscapedNewlines: Right 12 | Cpp11BracedListStyle: true 13 | Standard: Latest 14 | # IndentAccessModifiers: false 15 | IndentCaseLabels: false 16 | BreakStringLiterals: false 17 | IndentExternBlock: false 18 | AccessModifierOffset: -4 19 | # EmptyLineBeforeAccessModifier: true 20 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/dobby/platform_detect_macro.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #if !defined(DISABLE_ARCH_DETECT) 4 | #if defined(__arm__) 5 | #define TARGET_ARCH_ARM 1 6 | #elif defined(__arm64__) || defined(__aarch64__) 7 | #define TARGET_ARCH_ARM64 1 8 | #elif defined(_M_IX86) || defined(__i386__) 9 | #define TARGET_ARCH_IA32 1 10 | #elif defined(_M_X64) || defined(__x86_64__) 11 | #define TARGET_ARCH_X64 1 12 | #else 13 | #error Target architecture was not detected as supported by Dobby 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/deprecated/misc-helper/misc-helper/variable_cache.h: -------------------------------------------------------------------------------- 1 | #ifndef VARIABLE_CACHE_H 2 | #define VARIABLE_CACHE_H 3 | 4 | #include 5 | 6 | #define cache_set stash 7 | void cache_set(const char *name, uint64_t value); 8 | 9 | #define cache_get(x) cache(x) 10 | #define assert_cache(x) (assert(cache(x)), cache(x)) 11 | uint64_t cache_get(const char *name); 12 | 13 | int serialized_to_file(const char *filepath); 14 | 15 | int unserialized_from_file(const char *filepath); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/deprecated/misc-helper/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(.) 2 | 3 | if(NOT DOBBY_BUILD_KERNEL_MODE) 4 | set(SOURCE_FILE_LIST 5 | ${CMAKE_CURRENT_SOURCE_DIR}/variable_cache.c 6 | ${CMAKE_CURRENT_SOURCE_DIR}/async_logger.cc 7 | ${CMAKE_CURRENT_SOURCE_DIR}/format_printer.cc 8 | ) 9 | else() 10 | set(SOURCE_FILE_LIST 11 | ${CMAKE_CURRENT_SOURCE_DIR}/format_printer.cc 12 | ) 13 | endif() 14 | 15 | add_library(misc_helper 16 | ${SOURCE_FILE_LIST} 17 | ${SOURCE_HEADER_LIST} 18 | ) -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/RoutingPlugin/NearBranchTrampoline/NearBranchTrampoline.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/dobby_internal.h" 4 | 5 | #include "InterceptRouting/RoutingPlugin/RoutingPlugin.h" 6 | 7 | class NearBranchTrampolinePlugin : public RoutingPluginInterface { 8 | bool Prepare(InterceptRouting *routing) { 9 | return false; 10 | }; 11 | 12 | bool Active(InterceptRouting *routing); 13 | 14 | bool GenerateTrampolineBuffer(InterceptRouting *routing, addr_t src, addr_t dst); 15 | }; 16 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Interceptor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/dobby_internal.h" 4 | #include "InterceptEntry.h" 5 | 6 | class Interceptor { 7 | public: 8 | static Interceptor *SharedInstance(); 9 | 10 | public: 11 | InterceptEntry *find(addr_t addr); 12 | 13 | void remove(addr_t addr); 14 | 15 | void add(InterceptEntry *entry); 16 | 17 | const InterceptEntry *getEntry(int i); 18 | 19 | int count(); 20 | 21 | private: 22 | static Interceptor *instance; 23 | 24 | tinystl::vector entries; 25 | }; -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/ClosureTrampolineBridge/x86/helper_x86.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_IA32) 3 | 4 | #include "dobby/dobby_internal.h" 5 | 6 | void set_routing_bridge_next_hop(DobbyRegisterContext *ctx, void *address) { 7 | addr_t esp = ctx->esp; 8 | 9 | addr_t entry_placeholder_stack_addr = esp - 4; 10 | *(addr_t *)entry_placeholder_stack_addr = (addr_t)address; 11 | } 12 | 13 | void get_routing_bridge_next_hop(DobbyRegisterContext *ctx, void *address) { 14 | } 15 | 16 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/ObjcRuntimeReplace/dobby_objc_runtime_repalce.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif 9 | 10 | IMP DobbyObjcReplace(Class _class, SEL _selector, IMP replacement); 11 | 12 | void DobbyObjcReplaceEx(const char *class_name, const char *selector_name, void *fake_impl, void **orig_impl); 13 | 14 | void *DobbyObjcResolveMethodImp(const char *class_name, const char *selector_name); 15 | 16 | #ifdef __cplusplus 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/arch/x64/constants-x64.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_ARCH_CONSTANTS_X64_H 2 | #define CORE_ARCH_CONSTANTS_X64_H 3 | 4 | namespace zz { 5 | namespace x64 { 6 | 7 | enum ScaleFactor { 8 | TIMES_1 = 0, 9 | TIMES_2 = 1, 10 | TIMES_4 = 2, 11 | TIMES_8 = 3, 12 | TIMES_16 = 4, 13 | TIMES_HALF_WORD_SIZE = sizeof(void *) / 2 - 1 14 | }; 15 | 16 | enum RexBits { REX_NONE = 0, REX_B = 1 << 0, REX_X = 1 << 1, REX_R = 1 << 2, REX_W = 1 << 3, REX_PREFIX = 1 << 6 }; 17 | 18 | } // namespace x64 19 | } // namespace zz 20 | 21 | #endif -------------------------------------------------------------------------------- /app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/BionicLinkerUtil/bionic_linker_util.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | typedef void *soinfo_t; 10 | 11 | soinfo_t linker_dlopen(const char *filename, int flag); 12 | 13 | char *linker_soinfo_get_realpath(soinfo_t soinfo); 14 | 15 | uintptr_t linker_soinfo_to_handle(soinfo_t soinfo); 16 | 17 | void linker_iterate_soinfo(int (*cb)(soinfo_t soinfo)); 18 | 19 | void linker_disable_namespace_restriction(); 20 | 21 | #ifdef __cplusplus 22 | } 23 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/codegen/codegen-ia32.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_CODEGEN_X86_H 2 | #define CORE_CODEGEN_X86_H 3 | 4 | #include "core/codegen/codegen.h" 5 | #include "core/assembler/assembler.h" 6 | #include "core/assembler/assembler-ia32.h" 7 | 8 | namespace zz { 9 | namespace x86 { 10 | 11 | class CodeGen : public CodeGenBase { 12 | public: 13 | CodeGen(TurboAssembler *turbo_assembler) : CodeGenBase(turbo_assembler) { 14 | } 15 | 16 | void JmpNear(uint32_t address); 17 | }; 18 | 19 | } // namespace x86 20 | } // namespace zz 21 | 22 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/README.md: -------------------------------------------------------------------------------- 1 | # DexBuilder 2 | 3 | c++ dex builder for replacement with [dexmaker](https://github.com/linkedin/dexmaker). 4 | 5 | Most of them are copied from [AOSP](https://cs.android.com/android/platform/superproject/+/master:frameworks/base/startop/view_compiler). 6 | 7 | Modified parts are owed by LSPosed Developers. If you would like to use it in an open source project, please submodule it. 8 | 9 | Only part of instructions used by LSPosed are implemented. If you want to add other instructions, PR is welcomed. 10 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/codegen/codegen-arm.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_CODEGEN_ARM_H 2 | #define CORE_CODEGEN_ARM_H 3 | 4 | #include "core/codegen/codegen.h" 5 | #include "core/assembler/assembler.h" 6 | #include "core/assembler/assembler-arm.h" 7 | 8 | namespace zz { 9 | namespace arm { 10 | 11 | class CodeGen : public CodeGenBase { 12 | public: 13 | CodeGen(TurboAssembler *turbo_assembler) : CodeGenBase(turbo_assembler) { 14 | } 15 | 16 | void LiteralLdrBranch(uint32_t address); 17 | }; 18 | 19 | } // namespace arm 20 | } // namespace zz 21 | 22 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/SupervisorCallMonitor/test_supervisor_call_monitor.cc: -------------------------------------------------------------------------------- 1 | 2 | #include "dobby/dobby_internal.h" 3 | 4 | #include "SupervisorCallMonitor/supervisor_call_monitor.h" 5 | 6 | #if 1 7 | __attribute__((constructor)) static void ctor() { 8 | log_set_level(2); 9 | log_switch_to_syslog(); 10 | 11 | supervisor_call_monitor_init(); 12 | supervisor_call_monitor_register_main_app(); 13 | supervisor_call_monitor_register_syscall_call_log_handler(); 14 | supervisor_call_monitor_register_mach_syscall_call_log_handler(); 15 | } 16 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/codegen/codegen-arm64.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_CODEGEN_ARM64_H 2 | #define CORE_CODEGEN_ARM64_H 3 | 4 | #include "core/codegen/codegen.h" 5 | #include "core/assembler/assembler.h" 6 | #include "core/assembler/assembler-arm64.h" 7 | 8 | namespace zz { 9 | namespace arm64 { 10 | 11 | class CodeGen : public CodeGenBase { 12 | public: 13 | CodeGen(TurboAssembler *turbo_assembler) : CodeGenBase(turbo_assembler) { 14 | } 15 | void LiteralLdrBranch(uint64_t address); 16 | }; 17 | 18 | } // namespace arm64 19 | } // namespace zz 20 | 21 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/codegen/codegen-x64.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_CODEGEN_X64_H 2 | #define CORE_CODEGEN_X64_H 3 | 4 | #include "core/codegen/codegen.h" 5 | #include "core/assembler/assembler.h" 6 | #include "core/assembler/assembler-x64.h" 7 | 8 | namespace zz { 9 | namespace x64 { 10 | 11 | class CodeGen : public CodeGenBase { 12 | public: 13 | CodeGen(TurboAssembler *turbo_assembler) : CodeGenBase(turbo_assembler) { 14 | } 15 | 16 | void JmpNearIndirect(addr_t forward_stub_addr); 17 | }; 18 | 19 | } // namespace x64 20 | } // namespace zz 21 | 22 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/cmake/CMakeLists.txt.in: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.8) 2 | 3 | project(googletest-download NONE) 4 | 5 | include(ExternalProject) 6 | ExternalProject_Add(googletest 7 | GIT_REPOSITORY https://github.com/google/googletest.git 8 | GIT_TAG main 9 | SOURCE_DIR "${CMAKE_BINARY_DIR}/googletest-src" 10 | BINARY_DIR "${CMAKE_BINARY_DIR}/googletest-build" 11 | CONFIGURE_COMMAND "" 12 | BUILD_COMMAND "" 13 | INSTALL_COMMAND "" 14 | TEST_COMMAND "" 15 | ) -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/tests/parallel_flat_hash_map_mutex_test.cc: -------------------------------------------------------------------------------- 1 | #define THIS_HASH_MAP parallel_flat_hash_map 2 | #define THIS_TEST_NAME ParallelFlatHashMap 3 | 4 | #if 1 5 | #define THIS_EXTRA_TPL_PARAMS , 4, std::mutex 6 | #else 7 | #include 8 | #include 9 | #define THIS_EXTRA_TPL_PARAMS , 4, boost::upgrade_mutex 10 | #endif 11 | 12 | #define THIS_EXTRA_TPL_PARAMS_NULLMUTEX , 4, phmap::NullMutex 13 | 14 | #include "parallel_hash_map_test.cc" 15 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/ClosureTrampolineBridge/arm64/helper_arm64.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_ARM64) 3 | 4 | #include "core/assembler/assembler-arm64.h" 5 | 6 | #include "dobby/dobby_internal.h" 7 | 8 | using namespace zz::arm64; 9 | 10 | void set_routing_bridge_next_hop(DobbyRegisterContext *ctx, void *address) { 11 | *reinterpret_cast(&ctx->general.x[TMP_REG_0.code()]) = address; 12 | } 13 | 14 | void get_routing_bridge_next_hop(DobbyRegisterContext *ctx, void *address) { 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/codegen/codegen-arm.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_ARM) 3 | 4 | #include "core/codegen/codegen-arm.h" 5 | 6 | namespace zz { 7 | namespace arm { 8 | 9 | void CodeGen::LiteralLdrBranch(uint32_t address) { 10 | TurboAssembler *turbo_assembler_ = reinterpret_cast(this->assembler_); 11 | #define _ turbo_assembler_-> 12 | _ ldr(pc, MemOperand(pc, -4)); 13 | turbo_assembler_->GetCodeBuffer()->Emit32((addr_t)address); 14 | } 15 | 16 | } // namespace arm 17 | } // namespace zz 18 | 19 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/MemoryAllocator/CodeBuffer/code-buffer-x86.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_IA32) 3 | 4 | #include "MemoryAllocator/CodeBuffer/code-buffer-x86.h" 5 | 6 | void CodeBuffer::Emit32(int32_t data) { 7 | ensureCapacity(GetBufferSize() + sizeof(int32_t)); 8 | *reinterpret_cast(getCursor()) = data; 9 | buffer_cursor += sizeof(int32_t); 10 | return; 11 | } 12 | 13 | void CodeBuffer::FixBindLabel(int offset, int32_t disp) { 14 | *reinterpret_cast(buffer + offset) = disp; 15 | return; 16 | } 17 | 18 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/ClosureTrampolineBridge/x64/helper_x64.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_X64) 3 | 4 | #include "dobby/dobby_internal.h" 5 | 6 | void set_routing_bridge_next_hop(DobbyRegisterContext *ctx, void *address) { 7 | addr_t rsp = ctx->rsp; 8 | 9 | // ClosureTrampolineEntry reserved stack 10 | addr_t entry_placeholder_stack_addr = rsp - 8; 11 | *(addr_t *)entry_placeholder_stack_addr = (addr_t)address; 12 | } 13 | 14 | void get_routing_bridge_next_hop(DobbyRegisterContext *ctx, void *address) { 15 | } 16 | 17 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/MemoryAllocator/CodeBuffer/code_buffer_arm64.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "MemoryAllocator/CodeBuffer/CodeBufferBase.h" 4 | 5 | typedef int32_t arm64_inst_t; 6 | 7 | class CodeBuffer : public CodeBufferBase { 8 | 9 | public: 10 | CodeBuffer() : CodeBufferBase() { 11 | } 12 | 13 | public: 14 | arm64_inst_t LoadInst(uint32_t offset) { 15 | return *reinterpret_cast(GetBuffer() + offset); 16 | } 17 | 18 | void RewriteInst(uint32_t offset, arm64_inst_t instr) { 19 | *reinterpret_cast(GetBuffer() + offset) = instr; 20 | } 21 | }; -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/ClosureTrampolineBridge/x64/dummy/closure-trampoline-template-x64.S: -------------------------------------------------------------------------------- 1 | #if defined(ENABLE_CLOSURE_BRIDGE_TEMPLATE) 2 | 3 | #if defined(__WIN32__) || defined(__APPLE__) 4 | #define cdecl(s) _##s 5 | #else 6 | #define cdecl(s) s 7 | #endif 8 | 9 | .align 4 10 | 11 | ; 12 | closure trampoline just carray the required members from the object. 13 | .globl 14 | cdecl(closure_trampoline_template) cdecl(closure_trampoline_template) 15 | : push[rip + 6 + 6] jmp[rip + 6 + 8] carry_data :.long 0.long 0 carry_handler :.long 0.long 0 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/arch/CpuRegister.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_ARCH_CPU_REGISTER_H 2 | #define CORE_ARCH_CPU_REGISTER_H 3 | 4 | class RegisterBase { 5 | public: 6 | static constexpr RegisterBase from_code(int code); 7 | 8 | static constexpr RegisterBase no_reg(); 9 | 10 | virtual bool Is(const RegisterBase ®) const { 11 | return (reg.reg_code_ == this->reg_code_); 12 | } 13 | 14 | int code() const { 15 | return reg_code_; 16 | }; 17 | 18 | protected: 19 | explicit constexpr RegisterBase(int code) : reg_code_(code) { 20 | } 21 | 22 | int reg_code_; 23 | }; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/SupervisorCallMonitor/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library(supervisor_call_monitor STATIC 2 | mach_system_call_log_handler.cc 3 | system_call_log_handler.cc 4 | supervisor_call_monitor.cc 5 | sensitive_api_monitor.cc 6 | misc_utility.cc 7 | ) 8 | target_link_libraries(supervisor_call_monitor 9 | misc_helper 10 | dobby 11 | ) 12 | 13 | add_library(test_supervisor_call_monitor SHARED 14 | test_supervisor_call_monitor.cc 15 | ) 16 | target_link_libraries(test_supervisor_call_monitor 17 | supervisor_call_monitor 18 | ) 19 | 20 | include_directories( 21 | . 22 | ) 23 | 24 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/logging/kernel_logging.cc: -------------------------------------------------------------------------------- 1 | #include "logging/logging.h" 2 | 3 | #include 4 | #include "utility_macro.h" 5 | 6 | #if defined(BUILDING_KERNEL) 7 | #define abort() 8 | #else 9 | #include 10 | #endif 11 | 12 | static int _log_level = 1; 13 | PUBLIC void log_set_level(int level) { 14 | _log_level = level; 15 | } 16 | 17 | PUBLIC int log_internal_impl(int level, const char *fmt, ...) { 18 | if (level < _log_level) 19 | return 0; 20 | 21 | va_list ap; 22 | va_start(ap, fmt); 23 | 24 | vprintf(fmt, ap); 25 | 26 | va_end(ap); 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/UserMode/Thread/platform-thread-windows.cc: -------------------------------------------------------------------------------- 1 | #include "PlatformThread.h" 2 | 3 | using namespace zz; 4 | 5 | int OSThread::GetCurrentProcessId() { 6 | return 0; 7 | } 8 | 9 | int OSThread::GetCurrentThreadId() { 10 | return 0; 11 | } 12 | 13 | OSThread::LocalStorageKey OSThread::CreateThreadLocalKey() { 14 | return 0; 15 | } 16 | 17 | void OSThread::DeleteThreadLocalKey(LocalStorageKey key) { 18 | } 19 | 20 | void *OSThread::GetThreadLocal(LocalStorageKey key) { 21 | return NULL; 22 | } 23 | 24 | void OSThread::SetThreadLocal(LocalStorageKey key, void *value) { 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/xz/linux/include/linux/decompress/unxz.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Wrapper for decompressing XZ-compressed kernel, initramfs, and initrd 3 | * 4 | * Author: Lasse Collin 5 | * 6 | * This file has been put into the public domain. 7 | * You can do whatever you want with this file. 8 | */ 9 | 10 | #ifndef DECOMPRESS_UNXZ_H 11 | #define DECOMPRESS_UNXZ_H 12 | 13 | int unxz(unsigned char *in, int in_size, 14 | int (*fill)(void *dest, unsigned int size), 15 | int (*flush)(void *src, unsigned int size), 16 | unsigned char *out, int *in_used, 17 | void (*error)(char *x)); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | google { 4 | content { 5 | includeGroupByRegex("com\\.android.*") 6 | includeGroupByRegex("com\\.google.*") 7 | includeGroupByRegex("androidx.*") 8 | } 9 | } 10 | mavenCentral() 11 | gradlePluginPortal() 12 | } 13 | } 14 | dependencyResolutionManagement { 15 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 16 | repositories { 17 | google() 18 | mavenCentral() 19 | } 20 | } 21 | 22 | rootProject.name = "Vapp" 23 | include ':app' 24 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/cmake/xcode_generator_helper.cmake: -------------------------------------------------------------------------------- 1 | if(CMAKE_GENERATOR STREQUAL Xcode) 2 | message(STATUS "[*] Detect Xcode Project") 3 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/build/Debug) 4 | set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/build/Release) 5 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/build/Debug) 6 | set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/build/Release) 7 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/build/Debug) 8 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/build/Release) 9 | endif() -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/ClosureTrampolineBridge/common_bridge_handler.h: -------------------------------------------------------------------------------- 1 | #ifndef CLOSURE_TRAMPOLINE_COMMON_HANDLER_H 2 | #define CLOSURE_TRAMPOLINE_COMMON_HANDLER_H 3 | 4 | #include "dobby/dobby_internal.h" 5 | 6 | #include "Interceptor.h" 7 | #include "TrampolineBridge/ClosureTrampolineBridge/ClosureTrampoline.h" 8 | 9 | extern "C" { 10 | void common_closure_bridge_handler(DobbyRegisterContext *ctx, ClosureTrampolineEntry *entry); 11 | } 12 | 13 | void get_routing_bridge_next_hop(DobbyRegisterContext *ctx, void *address); 14 | 15 | void set_routing_bridge_next_hop(DobbyRegisterContext *ctx, void *address); 16 | 17 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/art/runtime/reflective_handle.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "reflective_reference.hpp" 6 | #include "value_object.hpp" 7 | 8 | namespace lsplant::art { 9 | 10 | class ArtMethod; 11 | 12 | template 13 | class ReflectiveHandle : public ValueObject { 14 | public: 15 | static_assert(std::is_same_v, "Expected ArtField or ArtMethod"); 16 | 17 | T *Get() { return reference_->Ptr(); } 18 | 19 | void Set(T *val) { reference_->Assign(val); } 20 | 21 | protected: 22 | ReflectiveReference *reference_; 23 | }; 24 | 25 | } // namespace lsplant::art 26 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/include/slicer/sha1.h: -------------------------------------------------------------------------------- 1 | /* ================ sha1.h ================ */ 2 | /* 3 | SHA-1 in C 4 | By Steve Reid 5 | 100% Public Domain 6 | */ 7 | 8 | #include 9 | #define u_int32_t uint32_t 10 | 11 | typedef struct { 12 | u_int32_t state[5]; 13 | u_int32_t count[2]; 14 | unsigned char buffer[64]; 15 | } SHA1_CTX; 16 | 17 | void SHA1Transform(u_int32_t state[5], const unsigned char buffer[64]); 18 | void SHA1Init(SHA1_CTX* context); 19 | void SHA1Update(SHA1_CTX* context, const unsigned char* data, u_int32_t len); 20 | void SHA1Final(unsigned char digest[20], SHA1_CTX* context); -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_menu_camera.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | if (Plugin.ImportTableReplace AND SYSTEM.Darwin) 2 | message(STATUS "[Dobby] Enable got hook") 3 | include_directories(builtin-plugin/ImportTableReplace) 4 | add_subdirectory(builtin-plugin/ImportTableReplace) 5 | endif () 6 | 7 | if (Plugin.Android.BionicLinkerUtil) 8 | if (NOT SYSTEM.Android) 9 | message(FATAL_ERROR "[!] Plugin.Android.BionicLinkerUtil only works on Android.") 10 | endif () 11 | message(STATUS "[Dobby] Enable Plugin.Android.BionicLinkerUtil") 12 | set(dobby.plugin.SOURCE_FILE_LIST ${dobby.plugin.SOURCE_FILE_LIST} 13 | BionicLinkerUtil/bionic_linker_util.cc 14 | ) 15 | endif () -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/MemoryAllocator/CodeBuffer/code-buffer-arm64.h: -------------------------------------------------------------------------------- 1 | #ifndef CODE_BUFFER_ARM64_H 2 | #define CODE_BUFFER_ARM64_H 3 | 4 | #include "MemoryAllocator/CodeBuffer/CodeBufferBase.h" 5 | 6 | typedef int32_t arm64_inst_t; 7 | 8 | class CodeBuffer : public CodeBufferBase { 9 | 10 | public: 11 | CodeBuffer() : CodeBufferBase() { 12 | } 13 | 14 | public: 15 | arm64_inst_t LoadInst(uint32_t offset) { 16 | return *reinterpret_cast(GetBuffer() + offset); 17 | } 18 | 19 | void RewriteInst(uint32_t offset, arm64_inst_t instr) { 20 | *reinterpret_cast(GetBuffer() + offset) = instr; 21 | } 22 | }; 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/UserMode/Thread/PlatformThread.cc: -------------------------------------------------------------------------------- 1 | #include "./PlatformThread.h" 2 | 3 | namespace zz { 4 | int OSThread::GetThreadLocalInt(LocalStorageKey key) { 5 | return static_cast(reinterpret_cast(GetThreadLocal(key))); 6 | } 7 | 8 | void OSThread::SetThreadLocalInt(LocalStorageKey key, int value) { 9 | SetThreadLocal(key, reinterpret_cast(static_cast(value))); 10 | } 11 | 12 | bool OSThread::HasThreadLocal(LocalStorageKey key) { 13 | return GetThreadLocal(key) != nullptr; 14 | } 15 | 16 | void *OSThread::GetExistingThreadLocal(LocalStorageKey key) { 17 | return GetThreadLocal(key); 18 | } 19 | } // namespace zz -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/codegen/codegen-ia32.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_IA32) 3 | 4 | #include "core/codegen/codegen-ia32.h" 5 | 6 | namespace zz { 7 | namespace x86 { 8 | 9 | void CodeGen::JmpNear(uint32_t address) { 10 | TurboAssembler *turbo_assembler_ = reinterpret_cast(this->assembler_); 11 | #define _ turbo_assembler_-> 12 | #define __ turbo_assembler_->GetCodeBuffer()-> 13 | uint32_t currIP = turbo_assembler_->CurrentIP() + 5; 14 | int32_t offset = (int32_t)(address - currIP); 15 | 16 | __ Emit8(0xe9); 17 | __ Emit32(offset); 18 | } 19 | 20 | } // namespace x86 21 | } // namespace zz 22 | 23 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/benchmark/BENCHMARK.md: -------------------------------------------------------------------------------- 1 | # parallel-hashmap 2 | 3 | How to run these benchmarks 4 | =========================== 5 | 6 | These bencharks were run on windows using Visual Studio 2017, in a cygwin window with the VC++ 2017 compiler env vars (add something like this in your Cygwin.bat: 7 | 8 | CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" 9 | 10 | Running them on linux would require Makefile changes. 11 | 12 | To build and run the tests, just update the path to the abseil libraries in the makefile, and run make. 13 | 14 | Your charts are now in charts.html. 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InstructionRelocation/x86/InstructionRelocationX86Shared.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/common.h" 4 | 5 | #include "MemoryAllocator/AssemblyCodeBuilder.h" 6 | 7 | #include "x86_insn_decode/x86_insn_decode.h" 8 | 9 | int GenRelocateCodeFixed(void *buffer, CodeMemBlock *origin, CodeMemBlock *relocated, bool branch); 10 | 11 | void GenRelocateCodeX86Shared(void *buffer, CodeMemBlock *origin, CodeMemBlock *relocated, bool branch); 12 | 13 | int GenRelocateSingleX86Insn(addr_t curr_orig_ip, addr_t curr_relo_ip, uint8_t *buffer_cursor, AssemblerBase *assembler, 14 | CodeBufferBase *code_buffer, x86_insn_decode_t &insn, int8_t mode); -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/Routing/FunctionInlineHook/FunctionInlineHookRouting.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/dobby_internal.h" 4 | 5 | #include "InterceptRouting/InterceptRouting.h" 6 | 7 | #include "TrampolineBridge/ClosureTrampolineBridge/ClosureTrampoline.h" 8 | 9 | class FunctionInlineHookRouting : public InterceptRouting { 10 | public: 11 | FunctionInlineHookRouting(InterceptEntry *entry, dobby_dummy_func_t replace_func) : InterceptRouting(entry) { 12 | this->replace_func = replace_func; 13 | } 14 | 15 | void DispatchRouting() override; 16 | 17 | private: 18 | void BuildRouting(); 19 | 20 | private: 21 | dobby_dummy_func_t replace_func; 22 | }; 23 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/Application.mk: -------------------------------------------------------------------------------- 1 | APP_CFLAGS := -Wall -Wextra 2 | APP_CFLAGS += -fno-stack-protector -fomit-frame-pointer 3 | APP_CFLAGS += -Wno-builtin-macro-redefined -D__FILE__=__FILE_NAME__ -Wno-gnu-string-literal-operator-template 4 | APP_CPPFLAGS := -std=c++20 5 | APP_CONLYFLAGS := -std=c18 6 | APP_STL := c++_shared 7 | 8 | ifneq ($(NDK_DEBUG),1) 9 | APP_CFLAGS += -Oz 10 | APP_CFLAGS += -Wno-unused -Wno-unused-parameter -Werror 11 | APP_CFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden 12 | APP_CFLAGS += -fno-unwind-tables -fno-asynchronous-unwind-tables 13 | APP_LDFLAGS += -Wl,--exclude-libs,ALL -Wl,--gc-sections -Wl,--strip-all 14 | endif 15 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/xz/linux/scripts/xz_wrap.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This is a wrapper for xz to compress the kernel image using appropriate 4 | # compression options depending on the architecture. 5 | # 6 | # Author: Lasse Collin 7 | # 8 | # This file has been put into the public domain. 9 | # You can do whatever you want with this file. 10 | # 11 | 12 | BCJ= 13 | LZMA2OPTS= 14 | 15 | case $SRCARCH in 16 | x86) BCJ=--x86 ;; 17 | powerpc) BCJ=--powerpc ;; 18 | ia64) BCJ=--ia64; LZMA2OPTS=pb=4 ;; 19 | arm) BCJ=--arm ;; 20 | sparc) BCJ=--sparc ;; 21 | esac 22 | 23 | exec xz --check=crc32 $BCJ --lzma2=$LZMA2OPTS,dict=32MiB 24 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/codegen/codegen-arm64.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_ARM64) 3 | 4 | #include "dobby/dobby_internal.h" 5 | #include "core/codegen/codegen-arm64.h" 6 | 7 | namespace zz { 8 | namespace arm64 { 9 | 10 | void CodeGen::LiteralLdrBranch(uint64_t address) { 11 | auto turbo_assembler_ = reinterpret_cast(this->assembler_); 12 | #define _ turbo_assembler_-> 13 | 14 | auto label = RelocLabel::withData(address); 15 | turbo_assembler_->AppendRelocLabel(label); 16 | 17 | _ Ldr(TMP_REG_0, label); 18 | _ br(TMP_REG_0); 19 | 20 | #undef _ 21 | } 22 | 23 | } // namespace arm64 24 | } // namespace zz 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/examples/f1.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Make sure that the phmap.h header builds fine when included in two separate 3 | * source files 4 | */ 5 | #include 6 | #include 7 | 8 | using phmap::flat_hash_map; 9 | 10 | int main() 11 | { 12 | // Create an unordered_map of three strings (that map to strings) 13 | using Map = flat_hash_map; 14 | Map email = 15 | { 16 | { "tom", "tom@gmail.com"}, 17 | { "jeff", "jk@gmail.com"}, 18 | { "jim", "jimg@microsoft.com"} 19 | }; 20 | 21 | extern void f2(Map&); 22 | f2(email); 23 | 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptEntry.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include "dobby/common.h" 5 | 6 | typedef enum { kFunctionInlineHook, kInstructionInstrument } InterceptEntryType; 7 | 8 | class InterceptRouting; 9 | 10 | typedef struct InterceptEntry { 11 | uint32_t id; 12 | InterceptEntryType type; 13 | InterceptRouting *routing; 14 | 15 | union { 16 | addr_t addr; 17 | addr_t patched_addr; 18 | }; 19 | uint32_t patched_size; 20 | 21 | addr_t relocated_addr; 22 | uint32_t relocated_size; 23 | 24 | uint8_t origin_insns[256]; 25 | uint32_t origin_insn_size; 26 | 27 | bool thumb_mode; 28 | 29 | InterceptEntry(InterceptEntryType type, addr_t address); 30 | } InterceptEntry; -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/art/runtime/thread.hpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "common.hpp" 4 | 5 | namespace lsplant::art { 6 | 7 | class Thread { 8 | CREATE_FUNC_SYMBOL_ENTRY(Thread *, CurrentFromGdb) { 9 | if (CurrentFromGdbSym) [[likely]] 10 | return CurrentFromGdbSym(); 11 | else 12 | return nullptr; 13 | } 14 | 15 | public: 16 | static Thread *Current() { return CurrentFromGdb(); } 17 | 18 | static bool Init(const HookHandler &handler) { 19 | if (!RETRIEVE_FUNC_SYMBOL(CurrentFromGdb, "_ZN3art6Thread14CurrentFromGdbEv")) 20 | [[unlikely]] { 21 | return false; 22 | } 23 | return true; 24 | } 25 | }; 26 | } // namespace lsplant::art 27 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Vapp 3 | HomeActivity 4 | Open navigation drawer 5 | Close navigation drawer 6 | Android Studio 7 | android.studio@android.com 8 | Navigation header 9 | Settings 10 | 11 | Home 12 | Gallery 13 | Slideshow 14 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/examples/f2.cc: -------------------------------------------------------------------------------- 1 | /* 2 | * Make sure that the phmap.h header builds fine when included in two separate 3 | * source files 4 | */ 5 | #include 6 | #include 7 | #include 8 | 9 | using phmap::flat_hash_map; 10 | using Map = flat_hash_map; 11 | 12 | void f2(Map& email) 13 | { 14 | // Iterate and print keys and values 15 | for (const auto& n : email) 16 | std::cout << n.first << "'s email is: " << n.second << "\n"; 17 | 18 | // Add a new entry 19 | email["bill"] = "bg@whatever.com"; 20 | 21 | // and print it 22 | std::cout << "bill's email is: " << email["bill"] << "\n"; 23 | } 24 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Vapp - 安卓12插件化开发框架 ---- 仅仅供初学者 学习 项目 还有很多不完善 可以说是乞丐中的乞丐 下面的话纯 装逼 2 | 3 | 简介 4 | 5 | Vapp是专为Android 12设计的轻量级插件化框架,支持动态加载Activity/Service组件、资源合并与Dex合并技术,实现应用多开功能。通过创新性的模块解耦方案,帮助开发者突破系统限制,打造高效灵活的插件化应用。 6 | 7 | 核心功能 ✨ 8 | 9 | 1. 组件动态加载 10 | ​Activity/Service插件化​:支持热插拔式加载未安装的插件组件 11 | ​生命周期管理​:完整代理宿主与插件的生命周期交互 12 | ​Intent兼容​:支持显式/隐式Intent启动插件组件 13 | 14 | 3. 资源智能合并 15 | ​多维度资源整合​:自动合并drawable/layout/values等资源目录 16 | ​资源冲突解决​:基于哈希算法的智能资源覆盖策略 17 | ​动态主题适配​:支持插件与宿主主题的无缝融合 18 | 19 | 5. Dex优化方案 20 | ​增量合并Dex​:采用D8/R8优化器提升运行时性能 21 | ​类加载隔离​:定制ClassLoader防止类冲突 22 | ​内存优化​:实现插件Dex文件的按需加载 23 | 24 | 兼容性说明 25 | 26 | 特性 支持版本 备注 27 | 28 | Android API 12 (API 31) 仅适配Android 12+系统 29 | 架构 x86_64/arm64 暂不支持32位架构 30 | 安全机制 SELinux兼容 通过SELinux策略白名单 31 | 32 | 33 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/arch/CpuUtils.h: -------------------------------------------------------------------------------- 1 | #ifndef CPU_UTILITY_H 2 | #define CPU_UTILITY_H 3 | 4 | /* Define the default attributes for the functions in this file. */ 5 | #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) 6 | 7 | #if defined(__i386__) || defined(__x86_64__) 8 | static __inline__ void __DEFAULT_FN_ATTRS __cpuid(int __info[4], int __level) { 9 | __asm__("cpuid" : "=a"(__info[0]), "=b"(__info[1]), "=c"(__info[2]), "=d"(__info[3]) : "a"(__level)); 10 | } 11 | 12 | static __inline__ void __DEFAULT_FN_ATTRS __cpuidex(int __info[4], int __level, int __ecx) { 13 | __asm__("cpuid" : "=a"(__info[0]), "=b"(__info[1]), "=c"(__info[2]), "=d"(__info[3]) : "a"(__level), "c"(__ecx)); 14 | } 15 | #endif 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/cmake/DetectVersion.cmake: -------------------------------------------------------------------------------- 1 | 2 | file(READ "${CMAKE_CURRENT_SOURCE_DIR}/parallel_hashmap/phmap_config.h" _PHMAP_H_CONTENTS) 3 | string(REGEX REPLACE ".*#define PHMAP_VERSION_MAJOR ([0-9]+).*" "\\1" DETECTED_PHMAP_VERSION_MAJOR "${_PHMAP_H_CONTENTS}") 4 | string(REGEX REPLACE ".*#define PHMAP_VERSION_MINOR ([0-9]+).*" "\\1" DETECTED_PHMAP_VERSION_MINOR "${_PHMAP_H_CONTENTS}") 5 | string(REGEX REPLACE ".*#define PHMAP_VERSION_PATCH ([0-9]+).*" "\\1" DETECTED_PHMAP_VERSION_PATCH "${_PHMAP_H_CONTENTS}") 6 | set(DETECTED_PHMAP_VERSION "${DETECTED_PHMAP_VERSION_MAJOR}.${DETECTED_PHMAP_VERSION_MINOR}.${DETECTED_PHMAP_VERSION_PATCH}") 7 | 8 | message(STATUS "Detected PHMAP Version - ${DETECTED_PHMAP_VERSION}") 9 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/codegen/codegen-x64.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_X64) 3 | 4 | #include "core/codegen/codegen-x64.h" 5 | 6 | namespace zz { 7 | namespace x64 { 8 | 9 | void CodeGen::JmpNearIndirect(addr_t forward_stub_addr) { 10 | TurboAssembler *turbo_assembler_ = reinterpret_cast(this->assembler_); 11 | #define _ turbo_assembler_-> 12 | #define __ turbo_assembler_->GetCodeBuffer()-> 13 | uint64_t currIP = turbo_assembler_->CurrentIP() + 6; 14 | int32_t offset = (int32_t)(forward_stub_addr - currIP); 15 | 16 | // jmp *(rip + disp32) 17 | __ Emit8(0xFF); 18 | __ Emit8(0x25); // ModR/M: 00 100 101 19 | __ Emit32(offset); 20 | } 21 | 22 | } // namespace x64 23 | } // namespace zz 24 | 25 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/html/latex_macros: -------------------------------------------------------------------------------- 1 | \newcommand{\andalso}{\quad\quad} 2 | \newcommand{\infabbrev}[2]{\infax{#1 \quad\eqdef\quad #2}} 3 | \newcommand{\infrule}[2]{\displaystyle \dfrac{#1}{#2}} 4 | \newcommand{\ar}{\rightarrow} 5 | \newcommand{\Int}{\mathtt{Int}} 6 | \newcommand{\Bool}{\mathtt{Bool}} 7 | \newcommand{\becomes}{\Downarrow} 8 | \newcommand{\trule}[1]{(\textbf{#1})} 9 | \newcommand{\FV}[1]{\mathtt{fv}(#1)} 10 | \newcommand{\FTV}[1]{\mathtt{ftv}(#1)} 11 | \newcommand{\BV}[1]{\mathtt{bv}(#1)} 12 | \newcommand{\compiles}[1]{\text{C}\llbracket{#1}\rrbracket} 13 | \newcommand{\exec}[1]{\text{E}\llbracket{#1}\rrbracket} 14 | \renewcommand{\t}[1]{\mathtt{#1}} 15 | \newcommand{\ite}[3]{\text{if }#1\text{ then }#2\text{ else }#3} 16 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/cmake/Util.cmake: -------------------------------------------------------------------------------- 1 | # Check files list exist 2 | function(check_files_exist CHECK_FILES) 3 | foreach(file ${CHECK_FILES}) 4 | if(NOT EXISTS "${file}") 5 | message(FATAL_ERROR "${file} NOT EXISTS!") 6 | endif() 7 | endforeach() 8 | endfunction(check_files_exist CHECK_FILES) 9 | 10 | # Search suffix files 11 | function(search_suffix_files suffix INPUT_VARIABLE OUTPUT_VARIABLE) 12 | set(ResultFiles ) 13 | foreach(filePath ${${INPUT_VARIABLE}}) 14 | # message(STATUS "[*] searching *.${suffix} from ${filePath}") 15 | file(GLOB files ${filePath}/*.${suffix}) 16 | set(ResultFiles ${ResultFiles} ${files}) 17 | endforeach() 18 | set(${OUTPUT_VARIABLE} ${ResultFiles} PARENT_SCOPE) 19 | endfunction() 20 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/SupervisorCallMonitor/supervisor_call_monitor.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | typedef uintptr_t addr_t; 5 | 6 | #include "dobby.h" 7 | 8 | void supervisor_call_monitor_init(); 9 | 10 | void supervisor_call_monitor_register_handler(DBICallTy handler); 11 | 12 | void supervisor_call_monitor_register_svc(addr_t svc_addr); 13 | 14 | void supervisor_call_monitor_register_image(void *header); 15 | 16 | void supervisor_call_monitor_register_main_app(); 17 | 18 | void supervisor_call_monitor_register_system_kernel(); 19 | 20 | void supervisor_call_monitor_register_syscall_call_log_handler(); 21 | 22 | void supervisor_call_monitor_register_mach_syscall_call_log_handler(); 23 | 24 | void supervisor_call_monitor_register_sensitive_api_handler(); -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/external/deprecated/misc-helper/deprecated/unistd_helper.h: -------------------------------------------------------------------------------- 1 | #ifdef _WIN32 2 | 3 | #include 4 | #define open _open 5 | #define read _read 6 | #define O_RDONLY _O_RDONLY 7 | #define O_WRONLY _O_WRONLY 8 | #define O_CREAT _O_CREAT 9 | #define O_TRUNC _O_TRUNC 10 | 11 | #define ssize_t int 12 | 13 | #define STDIN_FILENO 0 14 | #define STDOUT_FILENO 1 15 | #define STDERR_FILENO 2 16 | /* should be in some equivalent to */ 17 | typedef __int8 int8_t; 18 | typedef __int16 int16_t; 19 | typedef __int32 int32_t; 20 | typedef __int64 int64_t; 21 | typedef unsigned __int8 uint8_t; 22 | typedef unsigned __int16 uint16_t; 23 | typedef unsigned __int32 uint32_t; 24 | typedef unsigned __int64 uint64_t; 25 | 26 | #else 27 | 28 | #include 29 | 30 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/dobby/pac_kit.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #if defined(__arm64e__) && __has_feature(ptrauth_calls) 6 | #include 7 | #endif 8 | 9 | static inline void *pac_strip(void *addr) { 10 | if (addr == NULL) { 11 | return NULL; 12 | } 13 | #if __has_feature(ptrauth_calls) 14 | addr = ptrauth_strip(addr, ptrauth_key_asia); 15 | #endif 16 | return addr; 17 | } 18 | 19 | static inline void *pac_sign(void *addr) { 20 | if (addr == NULL) { 21 | return NULL; 22 | } 23 | #if __has_feature(ptrauth_calls) 24 | addr = ptrauth_sign_unauthenticated((void *)addr, ptrauth_key_asia, 0); 25 | #endif 26 | return addr; 27 | } 28 | 29 | static inline void *pac_strip_and_sign(void *addr) { 30 | return pac_sign(pac_strip(addr)); 31 | } -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/KernelMode/PlatformUtil/ProcessRuntimeUtility.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "PlatformUnifiedInterface/MemoryAllocator.h" 4 | 5 | #include "UnifiedInterface/platform.h" 6 | 7 | typedef struct _RuntimeModule { 8 | char path[1024]; 9 | void *load_address; 10 | } RuntimeModule; 11 | 12 | struct MemRegion : MemRange { 13 | MemoryPermission permission; 14 | MemRegion(addr_t addr, size_t size, MemoryPermission perm) : MemRange(addr, size), permission(perm) { 15 | } 16 | }; 17 | 18 | class ProcessRuntimeUtility { 19 | public: 20 | static const tinystl::vector &GetProcessMemoryLayout(); 21 | 22 | static const tinystl::vector *GetProcessModuleMap(); 23 | 24 | static RuntimeModule GetProcessModule(const char *name); 25 | }; -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/UserMode/PlatformUtil/ProcessRuntimeUtility.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "PlatformUnifiedInterface/MemoryAllocator.h" 4 | 5 | #include "UnifiedInterface/platform.h" 6 | 7 | typedef struct _RuntimeModule { 8 | char path[1024]; 9 | void *load_address; 10 | } RuntimeModule; 11 | 12 | struct MemRegion : MemRange { 13 | MemoryPermission permission; 14 | 15 | MemRegion(addr_t addr, size_t size, MemoryPermission perm) : MemRange(addr, size), permission(perm) { 16 | } 17 | }; 18 | 19 | class ProcessRuntimeUtility { 20 | public: 21 | static const tinystl::vector &GetProcessMemoryLayout(); 22 | 23 | static const tinystl::vector &GetProcessModuleMap(); 24 | 25 | static RuntimeModule GetProcessModule(const char *name); 26 | }; -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/examples/hash_std.cc: -------------------------------------------------------------------------------- 1 | #include "hash_std.h" // defines Person with std::hash specialization 2 | 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | // As we have defined a specialization of std::hash() for Person, 9 | // we can now create sparse_hash_set or sparse_hash_map of Persons 10 | // ---------------------------------------------------------------- 11 | phmap::flat_hash_set persons = 12 | { { "John", "Mitchell", 35 }, 13 | { "Jane", "Smith", 32 }, 14 | { "Jane", "Smith", 30 }, 15 | }; 16 | 17 | for (auto& p: persons) 18 | std::cout << p._first << ' ' << p._last << " (" << p._age << ")" << '\n'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/crack/vapp/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.crack.vapp; 2 | 3 | import android.content.Context; 4 | 5 | 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | import static org.junit.Assert.*; 11 | 12 | /** 13 | * Instrumented test, which will execute on an Android device. 14 | * 15 | * @see Testing documentation 16 | */ 17 | //@RunWith(AndroidJUnit4.class) 18 | //public class ExampleInstrumentedTest { 19 | // @Test 20 | // public void useAppContext() { 21 | // // Context of the app under test. 22 | // Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 23 | // assertEquals("com.crack.vapp", appContext.getPackageName()); 24 | // } 25 | //} -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/Routing/FunctionInlineHook/RoutingImpl.cc: -------------------------------------------------------------------------------- 1 | #include "dobby/dobby_internal.h" 2 | #include "InterceptRouting/Routing/FunctionInlineHook/FunctionInlineHookRouting.h" 3 | 4 | void FunctionInlineHookRouting::BuildRouting() { 5 | SetTrampolineTarget((addr_t)replace_func); 6 | 7 | // generate trampoline buffer, run before GenerateRelocatedCode 8 | addr_t from = entry_->patched_addr; 9 | #if defined(TARGET_ARCH_ARM) 10 | if (entry_->thumb_mode) 11 | from += 1; 12 | #endif 13 | addr_t to = GetTrampolineTarget(); 14 | GenerateTrampolineBuffer(from, to); 15 | } 16 | 17 | void FunctionInlineHookRouting::DispatchRouting() { 18 | BuildRouting(); 19 | 20 | // generate relocated code which size == trampoline size 21 | GenerateRelocatedCode(); 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/assembler/assembler-arch.h: -------------------------------------------------------------------------------- 1 | #ifndef CORE_ASSEMBLER_ARCH_H 2 | #define CORE_ASSEMBLER_ARCH_H 3 | 4 | #include "src/assembler.h" 5 | 6 | #if 0 7 | #if TARGET_ARCH_IA32 8 | #include "src/ia32/assembler-ia32.h" 9 | #elif TARGET_ARCH_X64 10 | #include "src/x64/assembler-x64.h" 11 | #elif TARGET_ARCH_ARM64 12 | #include "src/arm64/assembler-arm64.h" 13 | #elif TARGET_ARCH_ARM 14 | #include "src/arm/assembler-arm.h" 15 | #elif TARGET_ARCH_PPC 16 | #include "src/ppc/assembler-ppc.h" 17 | #elif TARGET_ARCH_MIPS 18 | #include "src/mips/assembler-mips.h" 19 | #elif TARGET_ARCH_MIPS64 20 | #include "src/mips64/assembler-mips64.h" 21 | #elif TARGET_ARCH_S390 22 | #include "src/s390/assembler-s390.h" 23 | #else 24 | #error Unknown architecture. 25 | #endif 26 | #endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/examples/hash_value.cc: -------------------------------------------------------------------------------- 1 | #include "hash_value.h" // defines Person with std::hash specialization 2 | 3 | #include 4 | #include 5 | 6 | int main() 7 | { 8 | // As we have defined a specialization of std::hash() for Person, 9 | // we can now create sparse_hash_set or sparse_hash_map of Persons 10 | // ---------------------------------------------------------------- 11 | phmap::flat_hash_set persons = 12 | { { "John", "Mitchell", 35 }, 13 | { "Jane", "Smith", 32 }, 14 | { "Jane", "Smith", 30 }, 15 | }; 16 | 17 | for (auto& p: persons) 18 | std::cout << p._first << ' ' << p._last << " (" << p._age << ")" << '\n'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/.github/workflows/linux.yml: -------------------------------------------------------------------------------- 1 | name: Linux 2 | 3 | on: 4 | push: 5 | pull_request: 6 | branches: [ master ] 7 | 8 | jobs: 9 | build: 10 | runs-on: ${{ matrix.os }} 11 | strategy: 12 | matrix: 13 | os: [ubuntu-latest] 14 | compiler: [g++, clang++] 15 | flags: [-std=c++11, -std=c++17] 16 | optimize: [-O2] 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v2.0.0 20 | - name: Build and test 21 | env: 22 | CXX: ${{ matrix.compiler }} 23 | CXXFLAGS: ${{ matrix.flags }} ${{ matrix.optimize }} 24 | run: | 25 | mkdir build && cd build && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Release .. && cmake --build . && make test 26 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/.github/workflows/macos.yml: -------------------------------------------------------------------------------- 1 | name: MacOS 2 | 3 | on: 4 | push: 5 | pull_request: 6 | branches: [ master ] 7 | 8 | jobs: 9 | build: 10 | runs-on: ${{ matrix.os }} 11 | strategy: 12 | matrix: 13 | os: [macos-latest] 14 | compiler: [g++, clang++] 15 | flags: [-std=c++11, -std=c++17] 16 | optimize: [-O2] 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v2.0.0 20 | - name: Build and test 21 | env: 22 | CXX: ${{ matrix.compiler }} 23 | CXXFLAGS: ${{ matrix.flags }} ${{ matrix.optimize }} 24 | run: | 25 | mkdir build && cd build && cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Release .. && cmake --build . && make test 26 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/SymbolResolver/pe/dobby_symbol_resolver.cc: -------------------------------------------------------------------------------- 1 | #include "SymbolResolver/dobby_symbol_resolver.h" 2 | #include "dobby/common.h" 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #include "PlatformUtil/ProcessRuntimeUtility.h" 10 | 11 | #include 12 | 13 | #undef LOG_TAG 14 | #define LOG_TAG "DobbySymbolResolver" 15 | 16 | PUBLIC void *DobbySymbolResolver(const char *image_name, const char *symbol_name_pattern) { 17 | void *result = NULL; 18 | 19 | HMODULE hMod = LoadLibraryExA(image_name, NULL, DONT_RESOLVE_DLL_REFERENCES); 20 | result = GetProcAddress(hMod, symbol_name_pattern); 21 | if (result) 22 | return result; 23 | 24 | //result = resolve_elf_internal_symbol(image_name, symbol_name_pattern); 25 | return result; 26 | } -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/assembler/assembler-arm64.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if TARGET_ARCH_ARM64 3 | 4 | #include "core/assembler/assembler-arm64.h" 5 | 6 | void AssemblerPseudoLabel::link_confused_instructions(CodeBufferBase *buffer_) { 7 | auto buffer = (CodeBuffer *)buffer_; 8 | 9 | for (auto &ref_label_insn : ref_label_insns_) { 10 | int64_t fixup_offset = pos() - ref_label_insn.pc_offset; 11 | 12 | arm64_inst_t inst = buffer->LoadInst(ref_label_insn.pc_offset); 13 | arm64_inst_t new_inst = 0; 14 | 15 | if (ref_label_insn.link_type == kLabelImm19) { 16 | new_inst = encode_imm19_offset(inst, fixup_offset); 17 | } 18 | 19 | buffer->RewriteInst(ref_label_insn.pc_offset, new_inst); 20 | } 21 | } 22 | 23 | using namespace zz::arm64; 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/UserMode/MultiThreadSupport/ThreadSupport.cpp: -------------------------------------------------------------------------------- 1 | #include "MultiThreadSupport/ThreadSupport.h" 2 | 3 | using namespace zz; 4 | 5 | OSThread::LocalStorageKey ThreadSupport::thread_callstack_key_ = 0; 6 | 7 | // Get current CallStack 8 | CallStack *ThreadSupport::CurrentThreadCallStack() { 9 | 10 | // TODO: __attribute__((destructor)) is better ? 11 | if (!thread_callstack_key_) { 12 | thread_callstack_key_ = OSThread::CreateThreadLocalKey(); 13 | } 14 | 15 | if (OSThread::HasThreadLocal(thread_callstack_key_)) { 16 | return static_cast(OSThread::GetThreadLocal(thread_callstack_key_)); 17 | } else { 18 | CallStack *callstack = new CallStack(); 19 | OSThread::SetThreadLocal(thread_callstack_key_, callstack); 20 | return callstack; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/UserMode/ExecMemory/code-patch-tool-windows.cc: -------------------------------------------------------------------------------- 1 | #include "dobby/dobby_internal.h" 2 | 3 | #include 4 | 5 | using namespace zz; 6 | 7 | PUBLIC int DobbyCodePatch(void *address, uint8_t *buffer, uint32_t buffer_size) { 8 | DWORD oldProtect; 9 | int page_size; 10 | 11 | // Get page size 12 | SYSTEM_INFO si; 13 | GetSystemInfo(&si); 14 | page_size = si.dwPageSize; 15 | 16 | void *addressPageAlign = (void *)ALIGN(address, page_size); 17 | 18 | if (!VirtualProtect(addressPageAlign, page_size, PAGE_EXECUTE_READWRITE, &oldProtect)) 19 | return kMemoryOperationError; 20 | 21 | memcpy(address, buffer, buffer_size); 22 | 23 | if (!VirtualProtect(addressPageAlign, page_size, oldProtect, &oldProtect)) 24 | return kMemoryOperationError; 25 | 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_add_app.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/menu/activity_main_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 |

5 | 6 | 7 | 11 | 15 | 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/.github/workflows/windows.yml: -------------------------------------------------------------------------------- 1 | name: Windows 2 | 3 | on: 4 | push: 5 | pull_request: 6 | branches: [ master ] 7 | 8 | jobs: 9 | build: 10 | runs-on: ${{ matrix.os }} 11 | strategy: 12 | matrix: 13 | os: [windows-latest] 14 | flags: ["/std:c++11", "/std:c++latest"] 15 | optimize: [/O2] 16 | steps: 17 | - name: Checkout 18 | uses: actions/checkout@v2.0.0 19 | - name: Build and test 20 | env: 21 | CXX: ${{ matrix.compiler }} 22 | CXXFLAGS: ${{ matrix.flags }} ${{ matrix.optimize }} 23 | CTEST_OUTPUT_ON_FAILURE: 1 24 | run: | 25 | cmake -Bbuild -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=Release && cmake --build build --target ALL_BUILD && cmake --build build --target RUN_TESTS 26 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/UserMode/Thread/PlatformThread.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/common.h" 4 | 5 | namespace zz { 6 | 7 | class OSThread { 8 | public: 9 | typedef int LocalStorageKey; 10 | 11 | static int GetCurrentProcessId(); 12 | 13 | static int GetCurrentThreadId(); 14 | 15 | static LocalStorageKey CreateThreadLocalKey(); 16 | 17 | static void DeleteThreadLocalKey(LocalStorageKey key); 18 | 19 | static void *GetThreadLocal(LocalStorageKey key); 20 | 21 | static int GetThreadLocalInt(LocalStorageKey key); 22 | 23 | static void SetThreadLocal(LocalStorageKey key, void *value); 24 | 25 | static void SetThreadLocalInt(LocalStorageKey key, int value); 26 | 27 | static bool HasThreadLocal(LocalStorageKey key); 28 | 29 | static void *GetExistingThreadLocal(LocalStorageKey key); 30 | }; 31 | 32 | } // namespace zz -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/KernelMode/UnifiedInterface/platform.h: -------------------------------------------------------------------------------- 1 | #ifndef PLATFORM_INTERFACE_COMMON_PLATFORM_H 2 | #define PLATFORM_INTERFACE_COMMON_PLATFORM_H 3 | 4 | #include "dobby/common.h" 5 | 6 | // ================================================================ 7 | // base :: OSMemory 8 | 9 | enum MemoryPermission { kNoAccess, kRead, kReadWrite, kReadWriteExecute, kReadExecute }; 10 | 11 | class OSMemory { 12 | public: 13 | static int PageSize(); 14 | 15 | static void *Allocate(size_t size, MemoryPermission access); 16 | 17 | static void *Allocate(size_t size, MemoryPermission access, void *fixed_address); 18 | 19 | static bool Free(void *address, size_t size); 20 | 21 | static bool Release(void *address, size_t size); 22 | 23 | static bool SetPermission(void *address, size_t size, MemoryPermission access); 24 | }; 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/scripts/setup_macos_cross_compile.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -x 4 | set -e 5 | 6 | mkdir -p ~/opt 7 | 8 | cd ~/opt 9 | CMAKE_VERSION=3.25.2 10 | CMAKE_DOWNLOAD_PACKAGE=cmake-$CMAKE_VERSION-macos-universal 11 | wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/$CMAKE_DOWNLOAD_PACKAGE.tar.gz && 12 | tar -zxf $CMAKE_DOWNLOAD_PACKAGE.tar.gz >/dev/null && 13 | mv $CMAKE_DOWNLOAD_PACKAGE cmake-$CMAKE_VERSION 14 | CMAKE_HOME=~/opt/cmake-$CMAKE_VERSION 15 | 16 | cd ~/opt 17 | LLVM_VERSION=15.0.6 18 | LLVM_DOWNLOAD_PACKAGE=clang+llvm-$LLVM_VERSION-x86_64-apple-darwin 19 | wget https://github.com/llvm/llvm-project/releases/download/llvmorg-$LLVM_VERSION/$LLVM_DOWNLOAD_PACKAGE.tar.xz && 20 | tar -xf $LLVM_DOWNLOAD_PACKAGE.tar.xz >/dev/null && 21 | mv $LLVM_DOWNLOAD_PACKAGE llvm-$LLVM_VERSION 22 | LLVM_HOME=~/opt/llvm-$LLVM_VERSION 23 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/examples/basic.cc: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | using phmap::flat_hash_map; 6 | 7 | int main() 8 | { 9 | // Create an unordered_map of three strings (that map to strings) 10 | flat_hash_map email = 11 | { 12 | { "tom", "tom@gmail.com"}, 13 | { "jeff", "jk@gmail.com"}, 14 | { "jim", "jimg@microsoft.com"} 15 | }; 16 | 17 | // Iterate and print keys and values 18 | for (const auto& n : email) 19 | std::cout << n.first << "'s email is: " << n.second << "\n"; 20 | 21 | // Add a new entry 22 | email["bill"] = "bg@whatever.com"; 23 | 24 | // and print it 25 | std::cout << "bill's email is: " << email["bill"] << "\n"; 26 | 27 | return 0; 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/de/robv/android/xposed/callbacks/IXUnhook.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of AliuHook, a library providing XposedAPI bindings to LSPlant 3 | * Copyright (c) 2021 Juby210 & Vendicated 4 | * Licensed under the Open Software License version 3.0 5 | * 6 | * Originally written by rovo89 as part of the original Xposed 7 | * Copyright 2013 rovo89, Tungstwenty 8 | * Licensed under the Apache License, Version 2.0, see http://www.apache.org/licenses/LICENSE-2.0 9 | */ 10 | 11 | package de.robv.android.xposed.callbacks; 12 | 13 | /** 14 | * Interface for objects that can be used to remove callbacks. 15 | * 16 | * @param The class of the callback. 17 | */ 18 | @SuppressWarnings({"unused"}) 19 | public interface IXUnhook { 20 | /** 21 | * Returns the callback that has been registered. 22 | */ 23 | T getCallback(); 24 | 25 | /** 26 | * Removes the callback. 27 | */ 28 | void unhook(); 29 | } -------------------------------------------------------------------------------- /app/src/main/res/layout/item_app.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 15 | 16 | 17 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/MemoryAllocator/CodeBuffer/CodeBufferBase.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/common.h" 4 | 5 | class CodeBufferBase { 6 | public: 7 | CodeBufferBase() { 8 | } 9 | 10 | public: 11 | virtual CodeBufferBase *Copy(); 12 | 13 | void Emit8(uint8_t data); 14 | 15 | void Emit16(uint16_t data); 16 | 17 | void Emit32(uint32_t data); 18 | 19 | void Emit64(uint64_t data); 20 | 21 | template T Load(int offset) { 22 | return *(T *)(buffer_.data() + offset); 23 | } 24 | 25 | template void Store(int offset, T value) { 26 | *(T *)(buffer_.data() + offset) = value; 27 | } 28 | 29 | template void Emit(T value) { 30 | EmitBuffer((uint8_t *)&value, sizeof(value)); 31 | } 32 | 33 | void EmitBuffer(uint8_t *buffer, int len); 34 | 35 | uint8_t *GetBuffer(); 36 | size_t GetBufferSize(); 37 | 38 | private: 39 | tinystl::vector buffer_; 40 | }; 41 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/ClosureTrampolineBridge/ClosureTrampoline.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/dobby_internal.h" 4 | 5 | #ifdef ENABLE_CLOSURE_TRAMPOLINE_TEMPLATE 6 | #ifdef __cplusplus 7 | extern "C" { 8 | #endif //__cplusplus 9 | void closure_trampoline_template(); 10 | void closure_bridge_template(); 11 | #ifdef __cplusplus 12 | } 13 | #endif //__cplusplus 14 | #endif 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif //__cplusplus 19 | 20 | typedef struct { 21 | void *address; 22 | int size; 23 | void *carry_handler; 24 | void *carry_data; 25 | } ClosureTrampolineEntry; 26 | 27 | asm_func_t get_closure_bridge(); 28 | 29 | #ifdef __cplusplus 30 | } 31 | #endif //__cplusplus 32 | 33 | class ClosureTrampoline { 34 | private: 35 | static tinystl::vector *trampolines_; 36 | 37 | public: 38 | static ClosureTrampolineEntry *CreateClosureTrampoline(void *carry_data, void *carry_handler); 39 | }; 40 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Backend/UserMode/ExecMemory/substrated/mach_interface_support/substrated.defs: -------------------------------------------------------------------------------- 1 | /* 2 | * Regenerate with: 3 | * 4 | * $(xcrun --sdk macosx -f mig) \ 5 | * -isysroot $(xcrun --sdk macosx --show-sdk-path) \ 6 | * -sheader substratedserver.h \ 7 | * -server substratedserver.c \ 8 | * -header substratedclient.h \ 9 | * -user substratedclient.c \ 10 | * substrated.defs 11 | */ 12 | 13 | subsystem substrated 9000; 14 | 15 | #include 16 | #include 17 | 18 | routine substrated_mark(server 19 | : mach_port_t; 20 | task 21 | : vm_task_entry_t; 22 | source_address 23 | : mach_vm_address_t; 24 | source_size 25 | : mach_vm_size_t; 26 | inout target_address 27 | : mach_vm_address_t); 28 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/Routing/FunctionWrapper/FunctionWrapperExport.cc: -------------------------------------------------------------------------------- 1 | #include "dobby/dobby_internal.h" 2 | 3 | #include "logging/logging.h" 4 | 5 | #include "Interceptor.h" 6 | #include "InterceptRouting/InterceptRouting.h" 7 | 8 | #include "function-wrapper.h" 9 | 10 | PUBLIC int DobbyWrap(void *function_address, PreCallTy pre_call, PostCallTy post_call) { 11 | DEBUG_LOG("Initialize 'DobbyWrap' hook at %p", function_address); 12 | 13 | Interceptor *interceptor = Interceptor::SharedInstance(); 14 | 15 | InterceptEntry *entry = new InterceptEntry(); 16 | entry->id = interceptor->entries->getCount(); 17 | entry->type = kFunctionWrapper; 18 | entry->function_address = function_address; 19 | 20 | FunctionWrapperRouting *routing = new FunctionWrapperRouting(entry); 21 | routing->DispatchRouting(); 22 | interceptor->addHookEntry(entry); 23 | routing->Commit(); 24 | 25 | DEBUG_LOG("Finalize %p", function_address); 26 | return 0; 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/RoutingPlugin/RoutingPlugin.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/dobby_internal.h" 4 | 5 | #include "InterceptRouting/InterceptRouting.h" 6 | 7 | class RoutingPluginInterface { 8 | public: 9 | // @Return: if false will continue to iter next plugin 10 | virtual bool Prepare(InterceptRouting *routing) = 0; 11 | 12 | // @Return: if false will continue to iter next plugin 13 | virtual bool Active(InterceptRouting *routing) = 0; 14 | 15 | // @Return: if false will continue to iter next plugin 16 | virtual bool GenerateTrampolineBuffer(InterceptRouting *routing, addr_t src, addr_t dst) = 0; 17 | 18 | private: 19 | char name_[256]; 20 | }; 21 | 22 | class RoutingPluginManager { 23 | public: 24 | static void registerPlugin(const char *name, RoutingPluginInterface *plugin); 25 | 26 | public: 27 | static tinystl::vector plugins; 28 | 29 | static RoutingPluginInterface *near_branch_trampoline; 30 | }; 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/crack/vapp/test/testService.java: -------------------------------------------------------------------------------- 1 | package com.crack.vapp.test; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | import android.util.Log; 7 | 8 | public class testService extends Service { 9 | 10 | static String TAG = "testService"; 11 | public testService() { 12 | } 13 | 14 | @Override 15 | public void onCreate() { 16 | Log.d(TAG, "onCreate: 代理 testService 运行 .... 理论上 不会运行"); 17 | super.onCreate(); 18 | } 19 | 20 | @Override 21 | public int onStartCommand(Intent intent, int flags, int startId) { 22 | Log.d(TAG, "onStartCommand: 代理 testService 运行 .... 理论上 不会运行"); 23 | return super.onStartCommand(intent, flags, startId); 24 | } 25 | 26 | @Override 27 | public IBinder onBind(Intent intent) { 28 | // TODO: Return the communication channel to the service. 29 | throw new UnsupportedOperationException("Not yet implemented"); 30 | } 31 | } -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := lsplant 6 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/external/dex_builder/include 7 | LOCAL_SRC_FILES := lsplant.cc 8 | LOCAL_EXPORT_C_INCLUDES:= $(LOCAL_PATH)/include 9 | LOCAL_SHARED_LIBRARIES := dex_builder 10 | LOCAL_LDLIBS := -llog 11 | LOCAL_EXPORT_LDLIBS := $(LOCAL_LDLIBS) 12 | LOCAL_CFLAGS := -flto 13 | LOCAL_LDFLAGS := -flto 14 | include $(BUILD_SHARED_LIBRARY) 15 | 16 | include $(CLEAR_VARS) 17 | 18 | LOCAL_MODULE := lsplant_static 19 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/external/dex_builder/include 20 | LOCAL_SRC_FILES := lsplant.cc 21 | LOCAL_EXPORT_C_INCLUDES:= $(LOCAL_PATH)/include 22 | LOCAL_STATIC_LIBRARIES := dex_builder_static 23 | LOCAL_EXPORT_LDLIBS := -llog 24 | include $(BUILD_STATIC_LIBRARY) 25 | 26 | include jni/external/dex_builder/Android.mk 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/Routing/InstructionInstrument/InstructionInstrumentRouting.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "dobby/dobby_internal.h" 4 | 5 | #include "InterceptRouting/InterceptRouting.h" 6 | 7 | #include "TrampolineBridge/ClosureTrampolineBridge/ClosureTrampoline.h" 8 | 9 | class InstructionInstrumentRouting : public InterceptRouting { 10 | public: 11 | InstructionInstrumentRouting(InterceptEntry *entry, dobby_instrument_callback_t pre_handler, 12 | dobby_instrument_callback_t post_handler) 13 | : InterceptRouting(entry) { 14 | this->prologue_dispatch_bridge = nullptr; 15 | this->pre_handler = pre_handler; 16 | this->post_handler = post_handler; 17 | } 18 | 19 | void DispatchRouting() override; 20 | 21 | private: 22 | void BuildRouting(); 23 | 24 | public: 25 | dobby_instrument_callback_t pre_handler; 26 | dobby_instrument_callback_t post_handler; 27 | 28 | private: 29 | void *prologue_dispatch_bridge; 30 | }; 31 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of AliuHook, a library providing XposedAPI bindings to LSPlant 3 | * Copyright (c) 2021 Juby210 & Vendicated 4 | * Licensed under the Open Software License version 3.0 5 | */ 6 | 7 | #pragma clang diagnostic push 8 | #pragma ide diagnostic ignored "OCUnusedMacroInspection" 9 | 10 | #ifndef ALIUHOOK_LOG_H 11 | #define ALIUHOOK_LOG_H 12 | 13 | #include 14 | 15 | #define LOG_TAG "AliuHook" 16 | 17 | #define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__) 18 | #define LOGW(...) __android_log_print(ANDROID_LOG_WARN, LOG_TAG, __VA_ARGS__) 19 | #define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__) 20 | #define LOGF(...) __android_log_print(ANDROID_LOG_FATAL, LOG_TAG, __VA_ARGS__) 21 | 22 | #ifdef NDEBUG 23 | #define LOGD(...) 24 | #else 25 | #define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__) 26 | #endif 27 | 28 | #endif //ALIUHOOK_LOG_H 29 | 30 | #pragma clang diagnostic pop -------------------------------------------------------------------------------- /.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/xz/linux/lib/xz/xz_dec_syms.c: -------------------------------------------------------------------------------- 1 | /* 2 | * XZ decoder module information 3 | * 4 | * Author: Lasse Collin 5 | * 6 | * This file has been put into the public domain. 7 | * You can do whatever you want with this file. 8 | */ 9 | 10 | #include 11 | #include 12 | 13 | EXPORT_SYMBOL(xz_dec_init); 14 | EXPORT_SYMBOL(xz_dec_reset); 15 | EXPORT_SYMBOL(xz_dec_run); 16 | EXPORT_SYMBOL(xz_dec_end); 17 | 18 | #ifdef CONFIG_XZ_DEC_MICROLZMA 19 | EXPORT_SYMBOL(xz_dec_microlzma_alloc); 20 | EXPORT_SYMBOL(xz_dec_microlzma_reset); 21 | EXPORT_SYMBOL(xz_dec_microlzma_run); 22 | EXPORT_SYMBOL(xz_dec_microlzma_end); 23 | #endif 24 | 25 | MODULE_DESCRIPTION("XZ decompressor"); 26 | MODULE_VERSION("1.1"); 27 | MODULE_AUTHOR("Lasse Collin and Igor Pavlov"); 28 | 29 | /* 30 | * This code is in the public domain, but in Linux it's simplest to just 31 | * say it's GPL and consider the authors as the copyright holders. 32 | */ 33 | MODULE_LICENSE("GPL"); 34 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/README.md: -------------------------------------------------------------------------------- 1 | ## Dobby 2 | 3 | [![Contact me Telegram](https://img.shields.io/badge/Contact%20me-Telegram-blue.svg)](https://t.me/IOFramebuffer) [![Join group Telegram](https://img.shields.io/badge/Join%20group-Telegram-brightgreen.svg)](https://t.me/dobby_group) 4 | 5 | Dobby a lightweight, multi-platform, multi-architecture exploit hook framework. 6 | 7 | - Minimal and modular library 8 | - Multi-platform support(Windows/macOS/iOS/Android/Linux) 9 | - Multiple architecture support(X86, X86-64, ARM, ARM64) 10 | 11 | ## Compile 12 | 13 | [docs/compile.md](docs/compile.md) 14 | 15 | ## Download 16 | 17 | [download latest library](https://github.com/jmpews/Dobby/releases/tag/latest) 18 | 19 | ## Credits 20 | 21 | 1. [frida-gum](https://github.com/frida/frida-gum) 22 | 2. [minhook](https://github.com/TsudaKageyu/minhook) 23 | 3. [substrate](https://github.com/jevinskie/substrate). 24 | 4. [v8](https://github.com/v8/v8) 25 | 5. [dart](https://github.com/dart-lang/sdk) 26 | 6. [vixl](https://git.linaro.org/arm/vixl.git) 27 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/dobby.cpp: -------------------------------------------------------------------------------- 1 | #include "dobby/dobby_internal.h" 2 | #include "Interceptor.h" 3 | 4 | __attribute__((constructor)) static void ctor() { 5 | DEBUG_LOG("================================"); 6 | DEBUG_LOG("Dobby"); 7 | DEBUG_LOG("dobby in debug log mode, disable with cmake flag \"-DDOBBY_DEBUG=OFF\""); 8 | DEBUG_LOG("================================"); 9 | } 10 | 11 | PUBLIC const char *DobbyGetVersion() { 12 | return __DOBBY_BUILD_VERSION__; 13 | } 14 | 15 | PUBLIC int DobbyDestroy(void *address) { 16 | #if defined(TARGET_ARCH_ARM) 17 | if ((addr_t)address % 2) { 18 | address = (void *)((addr_t)address - 1); 19 | } 20 | #endif 21 | auto entry = Interceptor::SharedInstance()->find((addr_t)address); 22 | if (entry) { 23 | uint8_t *buffer = entry->origin_insns; 24 | uint32_t buffer_size = entry->origin_insn_size; 25 | DobbyCodePatch(address, buffer, buffer_size); 26 | Interceptor::SharedInstance()->remove((addr_t)address); 27 | return 0; 28 | } 29 | 30 | return -1; 31 | } 32 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/Interceptor.cpp: -------------------------------------------------------------------------------- 1 | #include "Interceptor.h" 2 | 3 | Interceptor *Interceptor::instance = nullptr; 4 | 5 | Interceptor *Interceptor::SharedInstance() { 6 | if (Interceptor::instance == nullptr) { 7 | Interceptor::instance = new Interceptor(); 8 | } 9 | return Interceptor::instance; 10 | } 11 | 12 | InterceptEntry *Interceptor::find(addr_t addr) { 13 | for (auto *entry : entries) { 14 | if (entry->patched_addr == addr) { 15 | return entry; 16 | } 17 | } 18 | return nullptr; 19 | } 20 | 21 | void Interceptor::add(InterceptEntry *entry) { 22 | entries.push_back(entry); 23 | } 24 | 25 | void Interceptor::remove(addr_t addr) { 26 | for (auto iter = entries.begin(); iter != entries.end(); iter++) { 27 | if ((*iter)->patched_addr == addr) { 28 | entries.erase(iter); 29 | break; 30 | } 31 | } 32 | } 33 | 34 | const InterceptEntry *Interceptor::getEntry(int i) { 35 | return entries[i]; 36 | } 37 | 38 | int Interceptor::count() { 39 | return entries.size(); 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/examples/hash_value.h: -------------------------------------------------------------------------------- 1 | #ifndef phmap_example_hash_value_ 2 | #define phmap_example_hash_value_ 3 | 4 | #include // minimal header providing phmap::HashState() 5 | #include 6 | using std::string; 7 | 8 | struct Person 9 | { 10 | bool operator==(const Person &o) const 11 | { 12 | return _first == o._first && _last == o._last && _age == o._age; 13 | } 14 | 15 | // Demonstrates how to provide the hash function as a friend member function of the class 16 | // This can be used as an alternative to providing a std::hash specialization 17 | // -------------------------------------------------------------------------------------- 18 | friend size_t hash_value(const Person &p) 19 | { 20 | return phmap::HashState().combine(0, p._first, p._last, p._age); 21 | } 22 | 23 | string _first; 24 | string _last; 25 | int _age; 26 | }; 27 | 28 | #endif // phmap_example_hash_value_ 29 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/Routing/InstructionInstrument/instrument_routing_handler.cc: -------------------------------------------------------------------------------- 1 | #include "dobby/dobby_internal.h" 2 | 3 | #include "InterceptRouting/Routing/InstructionInstrument/InstructionInstrumentRouting.h" 4 | #include "InterceptRouting/Routing/InstructionInstrument/instrument_routing_handler.h" 5 | 6 | #include "TrampolineBridge/ClosureTrampolineBridge/common_bridge_handler.h" 7 | 8 | void instrument_forward_handler(InterceptEntry *entry, DobbyRegisterContext *ctx) { 9 | auto routing = static_cast(entry->routing); 10 | if (routing->pre_handler) { 11 | auto handler = (dobby_instrument_callback_t)routing->pre_handler; 12 | (*handler)((void *)entry->patched_addr, ctx); 13 | } 14 | 15 | // set prologue bridge next hop address as relocated instructions 16 | set_routing_bridge_next_hop(ctx, (void *)entry->relocated_addr); 17 | } 18 | 19 | void instrument_routing_dispatch(InterceptEntry *entry, DobbyRegisterContext *ctx) { 20 | instrument_forward_handler(entry, ctx); 21 | } 22 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/BionicLinkerUtil/bionic_linker_demo.cc: -------------------------------------------------------------------------------- 1 | #include "dobby.h" 2 | 3 | #include "bionic_linker_util.h" 4 | 5 | #include "logging/logging.h" 6 | 7 | #include 8 | 9 | #define LOG_TAG "BionicLinkerUtil" 10 | 11 | __attribute__((constructor)) static void ctor() { 12 | const char *lib = NULL; 13 | 14 | #if defined(__LP64__) 15 | lib = "/system/lib64/libandroid_runtime.so"; 16 | #else 17 | lib = "/system/lib/libandroid_runtime.so"; 18 | #endif 19 | 20 | void *vm = NULL; 21 | 22 | vm = DobbySymbolResolver(lib, "_ZN7android14AndroidRuntime7mJavaVME"); 23 | INFO_LOG("DobbySymbolResolver::vm %p", vm); 24 | 25 | #if 0 26 | linker_disable_namespace_restriction(); 27 | void *handle = NULL; 28 | handle = dlopen(lib, RTLD_LAZY); 29 | vm = dlsym(handle, "_ZN7android14AndroidRuntime7mJavaVME"); 30 | #else 31 | void *handle = NULL; 32 | handle = linker_dlopen(lib, RTLD_LAZY); 33 | vm = dlsym(handle, "_ZN7android14AndroidRuntime7mJavaVME"); 34 | #endif 35 | INFO_LOG("vm %p", vm); 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/crack/vapp/service/ProxyService.java: -------------------------------------------------------------------------------- 1 | package com.crack.vapp.service; 2 | 3 | import android.app.Service; 4 | import android.content.Intent; 5 | import android.os.IBinder; 6 | import android.util.Log; 7 | 8 | import java.util.ArrayList; 9 | 10 | public class ProxyService extends Service { 11 | 12 | 13 | private static final String TAG = "ProxyService"; 14 | public ProxyService() { 15 | } 16 | 17 | @Override 18 | public void onCreate() { 19 | Log.d(TAG, "onCreate: 代理 ProxyService 运行 .... 理论上 不会运行"); 20 | super.onCreate(); 21 | } 22 | 23 | @Override 24 | public int onStartCommand(Intent intent, int flags, int startId) { 25 | Log.d(TAG, "onStartCommand: 代理 ProxyService 运行 .... 理论上 不会运行"); 26 | return super.onStartCommand(intent, flags, startId); 27 | } 28 | 29 | @Override 30 | public IBinder onBind(Intent intent) { 31 | // TODO: Return the communication channel to the service. 32 | throw new UnsupportedOperationException("Not yet implemented"); 33 | } 34 | } -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/builtin-plugin/SupervisorCallMonitor/misc_utility.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | typedef uintptr_t addr_t; 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | #if defined(__LP64__) 11 | typedef struct mach_header_64 mach_header_t; 12 | typedef struct segment_command_64 segment_command_t; 13 | typedef struct section_64 section_t; 14 | typedef struct nlist_64 nlist_t; 15 | #define LC_SEGMENT_ARCH_DEPENDENT LC_SEGMENT_64 16 | #else 17 | typedef struct mach_header mach_header_t; 18 | typedef struct segment_command segment_command_t; 19 | typedef struct section section_t; 20 | typedef struct nlist nlist_t; 21 | #define LC_SEGMENT_ARCH_DEPENDENT LC_SEGMENT 22 | #endif 23 | 24 | // get macho segment by segment name 25 | segment_command_t *macho_kit_get_segment_by_name(mach_header_t *mach_header, const char *segname); 26 | 27 | // get macho section by segment name and section name 28 | section_t *macho_kit_get_section_by_name(mach_header_t *mach_header, const char *segname, const char *sectname); 29 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/Routing/FunctionWrapper/intercept_routing_handler.h: -------------------------------------------------------------------------------- 1 | #ifndef FUNCTION_WRAPPER_INTERCEPT_ROUTING_HANDLER_H 2 | #define FUNCTION_WRAPPER_INTERCEPT_ROUTING_HANDLER_H 3 | 4 | #include "TrampolineBridge/ClosureTrampolineBridge/ClosureTrampoline.h" 5 | #include "Interceptor.h" 6 | #include "dobby/dobby_internal.h" 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif //__cplusplus 11 | 12 | // Dispatch the routing befor running the origin function 13 | void prologue_routing_dispatch(DobbyRegisterContext *ctx, ClosureTrampolineEntry *entry); 14 | 15 | // Dispatch the routing before the function return . (as it's implementation by relpace `return address` in the stack 16 | // ,or LR register) 17 | void epilogue_routing_dispatch(DobbyRegisterContext *ctx, ClosureTrampolineEntry *entry); 18 | 19 | void pre_call_forward_handler(DobbyRegisterContext *ctx, InterceptEntry *entry); 20 | 21 | void post_call_forward_handler(DobbyRegisterContext *ctx, InterceptEntry *entry); 22 | 23 | #ifdef __cplusplus 24 | } 25 | #endif //__cplusplus 26 | 27 | #endif -------------------------------------------------------------------------------- /app/src/main/res/navigation/mobile_navigation.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 19 | 20 | 25 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/Trampoline/x86/trampoline_x86.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_IA32) 3 | 4 | #include "dobby/dobby_internal.h" 5 | 6 | #include "core/assembler/assembler-ia32.h" 7 | #include "core/codegen/codegen-ia32.h" 8 | 9 | #include "InstructionRelocation/x86/InstructionRelocationX86.h" 10 | 11 | #include "MemoryAllocator/NearMemoryAllocator.h" 12 | #include "InterceptRouting/RoutingPlugin/RoutingPlugin.h" 13 | 14 | using namespace zz::x86; 15 | 16 | CodeBufferBase *GenerateNormalTrampolineBuffer(addr_t from, addr_t to) { 17 | TurboAssembler turbo_assembler_((void *)from); 18 | #define _ turbo_assembler_. 19 | 20 | CodeGen codegen(&turbo_assembler_); 21 | codegen.JmpNear((uint32_t)to); 22 | 23 | CodeBufferBase *result = NULL; 24 | result = turbo_assembler_.GetCodeBuffer()->Copy(); 25 | return result; 26 | } 27 | 28 | CodeBufferBase *GenerateNearTrampolineBuffer(InterceptRouting *routing, addr_t src, addr_t dst) { 29 | DEBUG_LOG("x86 near branch trampoline enable default"); 30 | return NULL; 31 | } 32 | 33 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/xz/userspace/buftest.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Test application to test buffer-to-buffer decoding 3 | * 4 | * Author: Lasse Collin 5 | * 6 | * This file has been put into the public domain. 7 | * You can do whatever you want with this file. 8 | */ 9 | 10 | #include 11 | #include 12 | #include 13 | #include "xz.h" 14 | 15 | #define BUFFER_SIZE (1024 * 1024) 16 | 17 | static uint8_t in[BUFFER_SIZE]; 18 | static uint8_t out[BUFFER_SIZE]; 19 | 20 | int main(void) 21 | { 22 | struct xz_buf b; 23 | struct xz_dec *s; 24 | enum xz_ret ret; 25 | 26 | xz_crc32_init(); 27 | 28 | s = xz_dec_init(XZ_SINGLE, 0); 29 | if (s == NULL) { 30 | fputs("Initialization failed\n", stderr); 31 | return 1; 32 | } 33 | 34 | b.in = in; 35 | b.in_pos = 0; 36 | b.in_size = fread(in, 1, sizeof(in), stdin); 37 | 38 | b.out = out; 39 | b.out_pos = 0; 40 | b.out_size = sizeof(out); 41 | 42 | ret = xz_dec_run(s, &b); 43 | xz_dec_end(s); 44 | 45 | fwrite(out, 1, b.out_pos, stdout); 46 | fprintf(stderr, "%d\n", ret); 47 | 48 | return 0; 49 | } 50 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/InterceptRouting/Routing/FunctionWrapper/function-wrapper.h: -------------------------------------------------------------------------------- 1 | #ifndef FUNCTION_WRAPPER_H 2 | #define FUNCTION_WRAPPER_H 3 | 4 | #include "dobby/dobby_internal.h" 5 | 6 | #include "TrampolineBridge/ClosureTrampolineBridge/ClosureTrampoline.h" 7 | #include "InterceptRouting/InterceptRouting.h" 8 | #include "Interceptor.h" 9 | 10 | #if TARGET_ARCH_IA32 11 | #elif TARGET_ARCH_X64 12 | #include "InterceptRouting/x64/X64InterceptRouting.h" 13 | #elif TARGET_ARCH_ARM64 14 | #include "InterceptRouting/arm64/ARM64InterceptRouting.h" 15 | #elif TARGET_ARCH_ARM 16 | #else 17 | #error "unsupported architecture" 18 | #endif 19 | 20 | class FunctionWrapperRouting : public InterceptRouting { 21 | public: 22 | FunctionWrapperRouting(InterceptEntry *entry) : InterceptRouting(entry) { 23 | } 24 | 25 | void DispatchRouting(); 26 | 27 | void *GetTrampolineTarget(); 28 | 29 | private: 30 | void BuildPreCallRouting(); 31 | 32 | void BuildPostCallRouting(); 33 | 34 | private: 35 | void *prologue_dispatch_bridge; 36 | 37 | void *epilogue_dispatch_bridge; 38 | }; 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/examples/pmr.cc: -------------------------------------------------------------------------------- 1 | #if __has_include() 2 | #include 3 | namespace std 4 | { 5 | namespace pmr = experimental::pmr; 6 | } 7 | #elif __has_include() 8 | #include 9 | #elif 10 | #error is missing 11 | #endif 12 | 13 | #include 14 | 15 | struct MyStruct 16 | { 17 | template 18 | using ParallelFlatHashMap = phmap::parallel_flat_hash_map, std::equal_to, 19 | std::pmr::polymorphic_allocator>>; 20 | 21 | ParallelFlatHashMap hashMap; 22 | 23 | // No compile errors 24 | MyStruct() 25 | { 26 | } 27 | 28 | // Compile errors 29 | MyStruct(std::pmr::memory_resource* memoryResource = std::pmr::get_default_resource()) 30 | : hashMap(memoryResource) 31 | { 32 | } 33 | }; 34 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/assembler/assembler-ia32.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if TARGET_ARCH_IA32 3 | 4 | #include "core/assembler/assembler-ia32.h" 5 | 6 | using namespace zz::x86; 7 | 8 | void Assembler::jmp(Immediate imm) { 9 | buffer_->Emit8(0xE9); 10 | buffer_->Emit32((int)imm.value()); 11 | } 12 | 13 | addr32_t TurboAssembler::CurrentIP() { 14 | return pc_offset() + (addr_t)realized_addr_; 15 | } 16 | 17 | void AssemblerPseudoLabel::link_confused_instructions(CodeBufferBase *buffer) { 18 | auto _buffer = (CodeBuffer *)buffer; 19 | 20 | for (auto &ref_label_insn : ref_label_insns_) { 21 | int64_t new_offset = pos() - ref_label_insn.pc_offset; 22 | 23 | if (ref_label_insn.link_type == kDisp32_off_7) { 24 | // why 7 ? 25 | // use `call` and `pop` get the runtime ip register 26 | // but the ip register not the real call next insn 27 | // it need add two insn length == 7 28 | int disp32_fix_pos = ref_label_insn.pc_offset - sizeof(int32_t); 29 | _buffer->FixBindLabel(disp32_fix_pos, new_offset + 7); 30 | } 31 | } 32 | } 33 | 34 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/lsp/external/dex_builder/external/parallel_hashmap/examples/hash_std.h: -------------------------------------------------------------------------------- 1 | #ifndef phmap_example_hash_std_ 2 | #define phmap_example_hash_std_ 3 | 4 | #include // minimal header providing phmap::HashState() 5 | #include 6 | using std::string; 7 | 8 | struct Person 9 | { 10 | bool operator==(const Person &o) const 11 | { 12 | return _first == o._first && _last == o._last && _age == o._age; 13 | } 14 | 15 | string _first; 16 | string _last; 17 | int _age; 18 | }; 19 | 20 | namespace std 21 | { 22 | // inject specialization of std::hash for Person into namespace std 23 | // An alternative is to provide a hash_value() friend function (see hash_value.h) 24 | // ------------------------------------------------------------------------------ 25 | template<> struct hash 26 | { 27 | std::size_t operator()(Person const &p) const 28 | { 29 | return phmap::HashState().combine(0, p._first, p._last, p._age); 30 | } 31 | }; 32 | } 33 | 34 | #endif // phmap_example_hash_std_ 35 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/core/assembler/assembler-x64.cc: -------------------------------------------------------------------------------- 1 | #include "platform_detect_macro.h" 2 | #if defined(TARGET_ARCH_X64) 3 | 4 | #include "core/assembler/assembler-x64.h" 5 | 6 | using namespace zz::x64; 7 | 8 | void AssemblerPseudoLabel::link_confused_instructions(CodeBufferBase *buffer) { 9 | CodeBuffer *_buffer = (CodeBuffer *)buffer; 10 | 11 | for (auto &ref_label_insn : ref_label_insns_) { 12 | int64_t new_offset = pos() - ref_label_insn.pc_offset; 13 | 14 | if (ref_label_insn.link_type == kDisp32_off_9) { 15 | // why 9 ? 16 | // use `call` and `pop` get the runtime ip register 17 | // but the ip register not the real call next insn 18 | // it need add two insn length == 9 19 | int disp32_fix_pos = ref_label_insn.pc_offset - sizeof(int32_t); 20 | _buffer->FixBindLabel(disp32_fix_pos, new_offset + 9); 21 | } 22 | } 23 | } 24 | 25 | void Assembler::jmp(Immediate imm) { 26 | buffer_->Emit8(0xE9); 27 | buffer_->Emit32((int)imm.value()); 28 | } 29 | 30 | addr64_t TurboAssembler::CurrentIP() { 31 | return pc_offset() + (addr_t)realized_addr_; 32 | } 33 | 34 | #endif -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/ClosureTrampolineBridge/arm64/dummy/dynamic-closure-trampoline-template-arm64.S: -------------------------------------------------------------------------------- 1 | // .section __TEXT,__text,regular,pure_instructions 2 | 3 | // For iOS, we can't allocate executable memory, but we can use `remap` doing some trick. 4 | // For details, please refer `libffi` 5 | 6 | #if defined(ENABLE_CLOSURE_BRIDGE_TEMPLATE) 7 | 8 | #if defined(__WIN32__) || defined(__APPLE__) 9 | #define cdecl(s) _##s 10 | #else 11 | #define cdecl(s) s 12 | #endif 13 | 14 | #define PAGE_MAX_SIZE 4096 15 | #define PAGE_MAX_SHIFT 14 16 | 17 | .align PAGE_MAX_SHIFT.globl cdecl(dynamic_closure_trampoline_table_page) cdecl(dynamic_closure_trampoline_table_page) 18 | :.rept(PAGE_MAX_SIZE - 4 * 4) / 19 | 8 // sub dynamic_closure_trampoline_forward size 20 | adr x16, 21 | #0 b cdecl(dynamic_closure_trampoline_forward) 22 | .endr 23 | 24 | cdecl(dynamic_closure_trampoline_forward) 25 | : sub x16, 26 | x16, #0x4000 // [DynamicClosureTrampoline **] 27 | ldr x16, 28 | [ x16, #0 ] // [DynamicClosureTrampoline *] 29 | ldr x17, 30 | [ x16, #0 ] // trampolineTo 31 | br x17 32 | 33 | #endif -------------------------------------------------------------------------------- /app/src/main/java/com/crack/vapp/BaseData.java: -------------------------------------------------------------------------------- 1 | package com.crack.vapp; 2 | 3 | import android.app.Activity; 4 | import android.app.Application; 5 | import android.content.Context; 6 | import android.content.pm.ApplicationInfo; 7 | import android.content.pm.PackageInfo; 8 | 9 | public class BaseData extends Application { 10 | public static Application app; 11 | public static Context context; 12 | public static Activity baseActivity; 13 | 14 | public static String proxyActivity = "com.crack.vapp.ui.ProxyActivity"; 15 | 16 | public static String oriAppName = "com.crack.vapp"; 17 | 18 | 19 | public static PackageInfo packageInfo = null; 20 | 21 | public static Object Package = null; 22 | 23 | static { 24 | System.loadLibrary("vapp"); 25 | } 26 | 27 | @Override 28 | public Context getBaseContext() { 29 | return super.getBaseContext(); 30 | } 31 | 32 | @Override 33 | protected void attachBaseContext(Context base) { 34 | super.attachBaseContext(base); 35 | app = this; 36 | context = base; 37 | } 38 | 39 | private native void nativeInit(); 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/source/TrampolineBridge/ClosureTrampolineBridge/common_bridge_handler.cc: -------------------------------------------------------------------------------- 1 | #include "logging/logging.h" 2 | 3 | #include "TrampolineBridge/ClosureTrampolineBridge/common_bridge_handler.h" 4 | 5 | PUBLIC void common_closure_bridge_handler(DobbyRegisterContext *ctx, ClosureTrampolineEntry *entry) { 6 | DEBUG_LOG("common bridge handler: carry data: %p, carry handler: %p", (InterceptEntry *)entry->carry_data, 7 | entry->carry_handler); 8 | 9 | typedef void (*routing_handler_t)(InterceptEntry *, DobbyRegisterContext *); 10 | auto routing_handler = (routing_handler_t)entry->carry_handler; 11 | 12 | #if defined(__APPLE__) && __arm64e__ 13 | #if __has_feature(ptrauth_calls) 14 | uint64_t discriminator = 0; 15 | // discriminator = __builtin_ptrauth_type_discriminator(__typeof(routing_handler)); 16 | routing_handler = (__typeof(routing_handler))__builtin_ptrauth_sign_unauthenticated((void *)routing_handler, 17 | ptrauth_key_asia, discriminator); 18 | #endif 19 | #endif 20 | 21 | routing_handler((InterceptEntry *)entry->carry_data, ctx); 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/cpp/lspc/Dobby/.vscode/tags: -------------------------------------------------------------------------------- 1 | !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ 2 | !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ 3 | !_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ 4 | !_TAG_PROGRAM_NAME Exuberant Ctags // 5 | !_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ 6 | !_TAG_PROGRAM_VERSION 5.8 // 7 | HookZzCodeSegment ../tools/zzsolidifyhook.py /^HookZzCodeSegment = [$/;" kind:variable line:4 8 | lief ../tools/zzsolidifyhook.py /^import lief$/;" kind:namespace line:2 9 | new_target_file ../tools/zzsolidifyhook.py /^new_target_file = "\/Users\/jmpews\/Desktop\/test\/test.hook.dylib"$/;" kind:variable line:31 10 | target_file ../tools/zzsolidifyhook.py /^target_file = "\/Users\/jmpews\/Desktop\/test\/test.dylib"$/;" kind:variable line:30 11 | zz_macho_get_segment_with_name ../tools/zzsolidifyhook.py /^def zz_macho_get_segment_with_name(target_parsed, seg_name):$/;" kind:function line:13 12 | zz_macho_insert_segment ../tools/zzsolidifyhook.py /^def zz_macho_insert_segment(target_file, new_target_file):$/;" kind:function line:20 13 | zzsolidifyhook.py ../tools/zzsolidifyhook.py 1;" kind:file line:1 14 | -------------------------------------------------------------------------------- /app/src/main/res/layout/item_app_add.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 15 | 16 | 17 | 27 | 28 | 29 |