diff --git a/edxp-core/src/main/cpp/main/include/art/runtime/gc/heap.h b/edxp-core/src/main/cpp/main/include/art/runtime/gc/heap.h index dfb65e699..6d77303b0 100644 --- a/edxp-core/src/main/cpp/main/include/art/runtime/gc/heap.h +++ b/edxp-core/src/main/cpp/main/include/art/runtime/gc/heap.h @@ -63,9 +63,19 @@ namespace art { [[fallthrough]]; case __ANDROID_API_R__: if constexpr(edxp::is64) { - OFFSET_heap = 392; + // TODO: preload band to a boolean or enum + if (edxp::GetAndroidBrand() == "meizu") { + OFFSET_heap = 0x190; + } else { + OFFSET_heap = 392; + } } else { - OFFSET_heap = 236; + // TODO: preload band to a boolean or enum + if (edxp::GetAndroidBrand() == "meizu") { + OFFSET_heap = 0xF4; + } else { + OFFSET_heap = 236; + } } break; } diff --git a/edxp-core/src/main/cpp/main/include/utils.h b/edxp-core/src/main/cpp/main/include/utils.h index cc0508bce..b758ee0fe 100644 --- a/edxp-core/src/main/cpp/main/include/utils.h +++ b/edxp-core/src/main/cpp/main/include/utils.h @@ -19,6 +19,13 @@ namespace edxp { return atoi(prop_value); } + static inline std::string GetAndroidBrand() { + std::string prop_value; + prop_value.reserve(PROP_VALUE_MAX); + __system_property_get("ro.product.brand", prop_value.data()); + return prop_value; + } + template inline bool path_exists(const std::filesystem::path &path) { try {