-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
55 lines (40 loc) · 1.57 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
MKFILE := $(abspath $(lastword $(MAKEFILE_LIST)))
DIR := $(shell dirname $(MKFILE))
ENV_FILE ?= ./docker/envs/taimen-km.env
DOCKER := docker
DEVICE ?= 712KPBF1235565
CA ?= "[email protected]"
DEVICE_NAME ?= hikey620
.PHONY: build help
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
build: Dockerfile compose.yaml ## Build the Docker container(s)
@$(DOCKER) compose build
run: ## Run the Docker container using entrypoint
@$(DOCKER) compose --env-file ${ENV_FILE} run --rm \
--env DEVICE=$(DEVICE) \
teezz-recorder /docker-entrypoint.sh
mutatorgen: ## Run Docker container to generate protobuf files
@$(DOCKER) compose --env-file ${ENV_FILE} run --rm \
--env DEVICE=$(DEVICE) \
teezz-recorder /mutatorgen-entrypoint.sh
run-sh: ## Run the Docker container and spawn shell
@$(DOCKER) compose --env-file ${ENV_FILE} run --rm \
--env DEVICE=$(DEVICE) \
teezz-recorder "/bin/bash"
test:
@$(DOCKER) compose run --rm \
teezz-recorder /test-entrypoint.sh
test_c:
LD_LIBRARY_PATH=. python3 -m unittest generator.tests.c_test
test_cpp:
LD_LIBRARY_PATH=. python3 -m unittest generator.tests.cpp_test
setup-dualrecord:
npm install frida-compile
compile-js:
rm -f $(DIR)/dualrecorder/generated/explore.js
rmdir $(DIR)/dualrecorder/generated
node $(DIR)/node_modules/frida-compile/bin/compile.js -o $(DIR)/dualrecorder/generated/explore.js $(DIR)/dualrecorder/dual.js
dualrecord:
python -m dualrecorder ./dualrecorder/generated/explore.js $(CA)