android: port libfuzzer-mutator
MODIFY
Android.bp
Android.bp
@@ -190,6 +190,16 @@ cc_library_static {
],
}
+cc_library_headers {
+ name: "libafl_headers",
+ vendor_available: true,
+ host_supported: true,
+
+ export_include_dirs: [
+ "include",
+ ],
+}
+
cc_prebuilt_library_static {
name: "libfrida-gum",
compile_multilib: "64",
@@ -255,3 +265,7 @@ cc_binary {
"utils/afl_frida/android",
],
}
+
+subdirs = [
+ "custom_mutators",
+]

ADD
custom_mutators/Android.bp
+cc_library_shared {
+ name: "libfuzzer-mutator",
+ vendor_available: true,
+ host_supported: true,
+
+ cflags: [
+ "-g",
+ "-O0",
+ "-funroll-loops",
+ "-fPIC",
+ "-fpermissive",
+ "-std=c++11",
+ ],
+
+ srcs: [
+ "libfuzzer/FuzzerCrossOver.cpp",
+ "libfuzzer/FuzzerDataFlowTrace.cpp",
+ "libfuzzer/FuzzerDriver.cpp",
+ "libfuzzer/FuzzerExtFunctionsDlsym.cpp",
+ "libfuzzer/FuzzerExtFunctionsWeak.cpp",
+ "libfuzzer/FuzzerExtFunctionsWindows.cpp",
+ "libfuzzer/FuzzerExtraCounters.cpp",
+ "libfuzzer/FuzzerFork.cpp",
+ "libfuzzer/FuzzerIO.cpp",
+ "libfuzzer/FuzzerIOPosix.cpp",
+ "libfuzzer/FuzzerIOWindows.cpp",
+ "libfuzzer/FuzzerLoop.cpp",
+ "libfuzzer/FuzzerMerge.cpp",
+ "libfuzzer/FuzzerMutate.cpp",
+ "libfuzzer/FuzzerSHA1.cpp",
+ "libfuzzer/FuzzerTracePC.cpp",
+ "libfuzzer/FuzzerUtil.cpp",
+ "libfuzzer/FuzzerUtilDarwin.cpp",
+ "libfuzzer/FuzzerUtilFuchsia.cpp",
+ "libfuzzer/FuzzerUtilLinux.cpp",
+ "libfuzzer/FuzzerUtilPosix.cpp",
+ "libfuzzer/FuzzerUtilWindows.cpp",
+ "libfuzzer/libfuzzer.cpp",
+ ],
+
+ header_libs: [
+ "libafl_headers",
+ ],
+}

android: port libfuzzer-mutator