fix: replace whale so file to fix crash on x86_64
fix: hook art::OatFileManager::SetOnlyUseSystemOatFiles on AndroidQ
This commit is contained in:
parent
c677b622b3
commit
7ea869e600
|
|
@ -12,3 +12,12 @@
|
|||
/release
|
||||
.externalNativeBuild
|
||||
elf-cleaner.sh
|
||||
|
||||
# vscode
|
||||
.project
|
||||
.classpath
|
||||
.settings/
|
||||
.vscode/
|
||||
|
||||
dalvikdx/bin/
|
||||
dexmaker/bin/
|
||||
Binary file not shown.
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "base/object.h"
|
||||
|
||||
namespace art {
|
||||
|
||||
namespace oat_file_manager {
|
||||
|
||||
CREATE_HOOK_STUB_ENTRIES(void, SetOnlyUseSystemOatFiles) {
|
||||
return;
|
||||
}
|
||||
|
||||
// http://androidxref.com/9.0.0_r3/xref/art/runtime/oat_file_manager.cc#637
|
||||
static void DisableOnlyUseSystemOatFiles(void *handle, HookFunType hook_func) {
|
||||
const int api_level = GetAndroidApiLevel();
|
||||
if (api_level == ANDROID_P) {
|
||||
HOOK_FUNC(SetOnlyUseSystemOatFiles,
|
||||
"_ZN3art14OatFileManager24SetOnlyUseSystemOatFilesEv");
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -16,6 +16,7 @@
|
|||
#include "art/runtime/class_linker.h"
|
||||
#include "art/runtime/gc/heap.h"
|
||||
#include "art/runtime/hidden_api.h"
|
||||
#include "art/runtime/oat_file_manager.h"
|
||||
#include "framework/fd_utils.h"
|
||||
|
||||
namespace edxp {
|
||||
|
|
@ -88,6 +89,8 @@ namespace edxp {
|
|||
art::ClassLinker::Setup(art_handle, hook_func);
|
||||
art::mirror::Class::Setup(art_handle, hook_func);
|
||||
art::JNIEnvExt::Setup(art_handle, hook_func);
|
||||
art::oat_file_manager::DisableOnlyUseSystemOatFiles(art_handle, hook_func);
|
||||
|
||||
art_hooks_installed = true;
|
||||
LOGI("ART hooks installed");
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue