aboutsummaryrefslogtreecommitdiff
path: root/android
AgeCommit message (Collapse)Author
2022-01-01android/Android.mk: remove -Wframe-larger-thanRobert Swiecki
2022-01-01android: libcommon -> libhfcommonRobert Swiecki
2022-01-01android: move android build to libunwind v1.6.2Robert Swiecki
2019-12-03android: fixes for AndroidRobert Swiecki
2019-10-30android: compile hfnetdriverRobert Swiecki
2019-10-30make android-all workRobert Swiecki
2019-10-30android: make make android-all workRobert Swiecki
2018-01-07android: fix libcommon->libhfcommon referencesRobert Swiecki
2017-12-18move some struct honggfuzz fields into exe subfieldRobert Swiecki
2017-12-13android: disable *san and *coverage for the honggfuzz itselfRobert Swiecki
2017-09-29linux/ptrace: use name 'trace' to rest this problem with <linux/ptrace.h> vs ↵Robert Swiecki
linux/ptrace.h
2017-09-29linux/ptrace -> linux/ptrace_utils due to Android build failuresRobert Swiecki
2017-06-15[Android] Port "-Wno-format-truncation"Anestis Bechtsoudis
Since Android has dropped support for GCC most probably it will not affect the targets. Copying to be aligned with core makefile common CFLAGS and for possible future GCC support. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2017-06-08android: Use unified headersRobert Swiecki
2017-06-06[Android] Fix missing clang deps from libcommonAnestis Bechtsoudis
libcommon requires libblocksruntime when compiled with clang. A common static libs flag has been created to automatically include dep for all three targets when compiling with clang. '-fblocks' flag is already propagated from 'COMMON_CFLAGS'. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2017-05-24android: make libhfuzz and libcommon compilableRobert Swiecki
2017-05-24android: make honggfuzz (at least) compilableRobert Swiecki
2017-05-18[Android] Cleanup makefileAnestis Bechtsoudis
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-12-29[ANDROID] Fix POST_BUILD variable scope bugAnestis Bechtsoudis
It’s mostly triggered with some older versions of the Android NDK Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-12-29[ANDROID] Fix mk bug when compiling without ptraceAnestis Bechtsoudis
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-12-28[android] Fix wrong linking with libhfuzz.a from main toolAnestis Bechtsoudis
libhfuzz is not an actual dependency of the honggfuzz standalone tool. Instead it is simply desired to always build it with the build config matching the main tool so that it is available to user for wrapping targets with instrumentation. Having libhfuzz as part of LOCAL_STATIC_LIBRARIES effectively instructs NDK automation to include it as dependency. This results into resolving some of the external libc dependencies (strcmp, strstr, etc.) with the ones implemented from libhfuzz. This is not desired since it breaks functionality. Replace LOCAL_STATIC_LIBRARIES dependency with a proper APP_MODULES list when invoking ndk-build to always build both modules. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-10-30[Android] Fix force clean sequence bugAnestis Bechtsoudis
If target Android API level changed from previous build, an initial clean will be triggered. Although, due to the way that make expands expressions at first run, the file check for NDK toolchain config file will be also true while the file will have been deleted from triggered clean. This effectively triggers a shell cat against a missing file resulting into an ugly warning being print. To avoid using secondary expansion, use a simple bool variable which checks if a clean has already happened before re-trying the checks against a different config. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-10-30[Android] Android mk should use APP_PLATFORMAnestis Bechtsoudis
ANDROID_API is not always visible for Android.mk, thus not safe to be used. Prefer APP_PLATFORM which is always set due the way ndk-build is invoked from master makefile. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-10-28[Android] Force clean if API level or toolchain changedAnestis Bechtsoudis
Android NDK is failing to automatically detect if input API level or build toolchain has been changed. As such it's not forcing an objs clean. Deal with such case by using build attribute cache files. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-10-28[Android] Align libunwind CPU naming conventions with makefileAnestis Bechtsoudis
All CPU targets have matching names expect arm64 (vs aarch64). Create a softlink for this case so that we don't need create more target naming conventions in makefiles. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-10-18[Android] Compile libhfuzzAnestis Bechtsoudis
libhfuzz is compiled as static library using the BUILD_STATIC_LIBRARY template from Android NDK. The static library is added as "virtual" dependency to main honggfuzz module, otherwise the build system will ignore it since it detects that the module target is not used. The libhfuzz extra cflags are matching the ones from master Makefile. Testing of the libhfuzz is still pending since it requires clang 4.0 while Android is still defaulting to 3.8. Also tided-up a little bit the Android.mk so that common configuration is shared at the top of the file for both target modules. Finally an additional post build step was required to copy the generated .a file into the project dir so that both output files are under the same file. Static libraries compiled from NDK templates are not automatically added to project output dirs since they purposed for internal dependencies by default. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-10-17Typos & grammarAnestis Bechtsoudis
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-05-06[android] Fix atomics build issue noticed at x86Anestis Bechtsoudis
Seems to be safer for NDK toolchains to link with lib atomic (-latomic). Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-05-06[android] Enable compile with clangAnestis Bechtsoudis
Glue with libBlocksRuntime and compile with minimum API 23 which works with current HF ptrace backend. Use 'ANDROID_CLANG=true' flag to enable clang builds (default off) Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com> # third_party/android/scripts/compile-libBlocksRuntime.sh third_party/android/libBlocksRuntime arm # make android ANDROID_CLANG=true
2016-05-06Grammar & typosAnestis Bechtsoudis
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2016-04-02Make it compile under AndroidJagger
2016-03-10Move sancov to the main dir and hook it to mac and posixJagger
2016-02-08ANDROID: Resolve IPT compilation issueAnestis Bechtsoudis
Build 'pt.c' component to resolve undefined references to 'arch_ptAnalyze()' from 'arch_perfMmapParse()'. IPT has no value yet for Android x86/x64_86 ABIs due to very old kernels. Add component instead of a disabling macro for future benefit when new kernels adopted. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2015-12-26LINUX: Introduce sanitizer coverageAnestis Bechtsoudis
Initial commit of sanitizer coverage data parsing. Currently only number of PCs is measured. More coverage data to be added soon. rawunpack is still pending for targets being terminated with signals that are not handled by supported sanitizers. Testing so far included "-fsanitize-coverage=func" Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2015-12-26Stack size improvementsAnestis Bechtsoudis
Reduce allocated stack memory & add compile warning to verify stack size < 50k Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2015-10-09log + cmd bug fixesAnestis Bechtsoudis
Small fixes spotted when compiling for MAC & Android. * Print-out format fixes. Casts have been introduced at some places to clarify the matching type and satisfy tested compilers. * Update Android makefile with new cmd parsing component. * Wrap getpid() with arch defines, enabling syscall only for LINUX arch. * Clean-up unused headers in cmdline.c * Split LOG_HELP print messages since clang was complaining: cmdline.c:88:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2015-09-11Android.mk: OPENSSL_ARMCAP handlingAnestis Bechtsoudis
Clean-up when OPENSSL_ARMCAP flag is exported to avoid possible future confusion Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2015-09-10Android.mk identationAnestis Bechtsoudis
Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2015-09-10Perf + armcap fixesAnestis Bechtsoudis
* Perf is setting 'exclude_callchain_kernel' flag which requires kernels >= 3.7. Detect old kernels and abort archInit() if not compatible. TODO: See if disabling that flag at runtime for non-compatible kernels affects perf operations * For ARM kernels running Android API <= 21, if fuzzing target links to libcrypto (OpenSSL), OPENSSL_cpuid_setup initialization is triggering a SIGILL/ILLOPC at armv7_tick(). Setups using BoringSSL (API >= 22) are not affected. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2015-09-08Android toolchain checkAnestis Bechtsoudis
Clang is not supported yet due to local_thread implementation. Clang uses __aeabi_read_tp() which not supported by bionic. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2015-09-08Small bug fixes in refactored codeAnestis Bechtsoudis
* Missing display.c from Android makefile (TODO: Export some variables from main makefile to auto-inherit without need to manually update both) * Extra semicolon (apart GCC doesn't give a damn about it) * Integer format fix Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2015-08-26Fix Android x86_64 supportAnestis Bechtsoudis
libunwind imports have to be re-ordered to pick the correct "_Ux86_64_setcontext" definition. Small typo fixes too. Signed-off-by: Anestis Bechtsoudis <anestis@census-labs.com>
2015-08-20Un-hardcode Android API choiceAnestis Bechtsoudis
2015-08-19Makefile cleanupAnestis Bechtsoudis
2015-08-06Implement Android Linux PTRACE supportAnestis Bechtsoudis
* Fork upstream libunwind and cross-compile with Android NDK * libunwind is also used for proc symbol resolve instead of bfd * Replace BDF lib with capstone for disassembling actions * Engineer build & patch scripts to support Android ARM, ARM64, x86, x86_64 * Rename linux/ptrace.* to linux/ptrace_utils.* since it conflicts with Android platform includes for ptrace API * Wrap register & instruction sizes under macros to reflect sizes for supported CPU arch (makes debugging easier) * Add / Implement missing definitions / functions for Android * Improve Android build process
2015-07-31Android support + minor improvementsAnestis Bechtsoudis
* Add Android API 21 support (make android) using POSIX / SIGNAL arch * Add support for targets with args of type arg=___FILE___ * Add .gitignore