This describes steps to build xaac_dec_fuzzer and xaac_enc_fuzzer binary.
Clone libxaac repository
$ git clone https://android.googlesource.com/platform/external/libxaac
Create a directory inside libxaac and change directory
$ cd libxaac $ mkdir build $ cd build
Build fuzzer with required sanitizers (-DSANITIZE=fuzzer-no-link is mandatory to enable fuzzers)
$ cmake .. -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_BUILD_TYPE=Debug -DSANITIZE=fuzzer-no-link,address,\ signed-integer-overflow,unsigned-integer-overflow $ make
Create a directory CORPUS_DIR and copy some elementary aac files to that folder To run the fuzzer
$ ./xaac_dec_fuzzer CORPUS_DIR $ ./xaac_enc_fuzzer CORPUS_DIR
Build the fuzzer
$ SANITIZE_TARGET=address SANITIZE_HOST=address mmma -j$(nproc) \ external/libxaac/fuzzer
Create a directory CORPUS_DIR and copy some elementary aac files to that folder Push this directory to device.
To run on device
$ adb sync data $ adb shell /data/fuzz/xaac_dec_fuzzer CORPUS_DIR
To run on host
$ $ANDROID_HOST_OUT/fuzz/xaac_dec_fuzzer CORPUS_DIR