aboutsummaryrefslogtreecommitdiffstats
path: root/docs/setup_linux-host_android-device_arm64-kernel.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/setup_linux-host_android-device_arm64-kernel.md')
-rw-r--r--docs/setup_linux-host_android-device_arm64-kernel.md31
1 files changed, 11 insertions, 20 deletions
diff --git a/docs/setup_linux-host_android-device_arm64-kernel.md b/docs/setup_linux-host_android-device_arm64-kernel.md
index 6273b0058..699671155 100644
--- a/docs/setup_linux-host_android-device_arm64-kernel.md
+++ b/docs/setup_linux-host_android-device_arm64-kernel.md
@@ -1,34 +1,25 @@
-# Setup: Linux host, Android device, arm64 kernel
+# Setup: Linux or Mac OS host, Android device, arm64 kernel
Prerequisites:
- go1.8+ toolchain (can be downloaded from [here](https://golang.org/dl/))
- Android NDK (tested with r15 on API24) (can be downloaded from [here](https://developer.android.com/ndk/downloads/index.html))
+ + Set the `$NDK` environment variable to point at it
- Android Serial Cable or [Suzy-Q](https://chromium.googlesource.com/chromiumos/platform/ec/+/master/docs/case_closed_debugging.md) device to capture console output is preferable but optional. syzkaller can work with normal USB cable as well, but that can be somewhat unreliable and turn lots of crashes into "lost connection to test machine" crashes with no additional info.
-From `syzkaller` checkout:
- - Build `syz-manager` for host:
-```
-go build -o bin/syz-manager ./syz-manager
-```
+ - Build syzkaller
- - Build `syz-fuzzer` and `syz-execprog` for arm64:
-```
-GOOS=linux GOARCH=arm64 go build -o bin/syz-fuzzer ./syz-fuzzer
-GOOS=linux GOARCH=arm64 go build -o bin/syz-execprog ./tools/syz-execprog
+```sh
+$ make android
```
- - Build `syz-executor` for arm64:
+ - Check the output files are correct
```sh
-NDK=/path/to/android-ndk-r15
-UNAME=$(uname | tr '[:upper:]' '[:lower:]')
-TOOLCHAIN=aarch64-linux-android
-API=24
-ARCH=arm64
-$NDK/toolchains/$TOOLCHAIN-4.9/prebuilt/$UNAME-x86_64/bin/$TOOLCHAIN-g++ \
- -I $NDK/sources/cxx-stl/llvm-libc++/include \
- --sysroot=$NDK/platforms/android-$API/arch-$ARCH \
- executor/executor.cc -O1 -g -Wall -static -o bin/syz-executor
+$ file bin/*
+bin/syz-execprog: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
+bin/syz-executor: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, not stripped
+bin/syz-fuzzer: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
+bin/syz-manager: Mach-O 64-bit executable x86_64
```
- Create config with `"type": "adb"` and specify adb devices to use. For example: