File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ android {
7878 }
7979 externalNativeBuild {
8080 cmake {
81- version = " 3.25 .0+"
81+ version = " 4.0 .0+"
8282 path = file(" src/main/cpp/CMakeLists.txt" )
8383 }
8484 }
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.18.1 )
1+ cmake_minimum_required (VERSION 4.1.2 )
22
33project (launcherfix)
44
5- add_library (launcherfix SHARED launcher-fix.cpp )
5+ add_library (launcherfix SHARED launcher-fix.cpp patcher.cpp )
66
77target_compile_features (launcherfix PUBLIC cxx_std_20 )
88set_target_properties (launcherfix PROPERTIES CXX_EXTENSIONS OFF )
99
1010set_target_properties (launcherfix PROPERTIES
1111 INTERPROCEDURAL_OPTIMIZATION ON
12+ UNITY_BUILD ON
1213 C_VISIBILITY_PRESET hidden
1314 CXX_VISIBILITY_PRESET hidden
1415)
Original file line number Diff line number Diff line change 1+ #pragma once
2+
3+ #include < string>
4+ #include < array>
5+
6+ #include < link.h>
7+
8+ class DataPaths {
9+ public:
10+ std::string original_data_path{};
11+ std::string data_path{};
12+ std::string load_symbols_from{};
13+
14+ bool patch_exceptions{};
15+
16+ static DataPaths& get_instance ();
17+
18+ private:
19+ DataPaths () {}
20+ };
21+
22+ // this is every function that i thought would be relevant
23+ constexpr std::array remove_symbols{
24+ " __gxx_personality_v0" ,
25+ " __cxa_throw" ,
26+ " __cxa_rethrow" ,
27+ " __cxa_allocate_exception" ,
28+ " __cxa_end_catch" ,
29+ " __cxa_begin_catch" ,
30+ " __cxa_guard_abort" ,
31+ " __cxa_guard_acquire" ,
32+ " __cxa_guard_release" ,
33+ " __cxa_free_exception"
34+
35+ // android 10's libc doesn't have these symbols
36+ // and the ndk is forbidden from exporting them!! so keep it for old mods...
37+ // "_Unwind_RaiseException",
38+ // "_Unwind_Resume"
39+ };
40+
41+ FILE* fopen_hook (const char * pathname, const char * mode);
42+ int rename_hook (const char * old_path, const char * new_path);
43+
44+ int on_dl_iterate (dl_phdr_info* info, size_t size, void * data);
You can’t perform that action at this time.
0 commit comments