From abe703fffea4cd08c40a8d16d0f8d6419c2585bd Mon Sep 17 00:00:00 2001 From: Shaun Inman Date: Fri, 13 Jan 2023 20:22:21 -0500 Subject: [PATCH] added simple Probe.pak edit exec.sh and adb push to device and run Tools/Probe.pak to quickly log output from the chrooted environment (useful since the runtime is different from the adb shell one) --- src/prober/Probe.pak/exec.sh | 11 +++++++++++ src/prober/Probe.pak/launch.sh | 5 +++++ src/prober/makefile | 15 +++++++++++++++ src/prober/prober.c | 16 ++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100755 src/prober/Probe.pak/exec.sh create mode 100755 src/prober/Probe.pak/launch.sh create mode 100644 src/prober/makefile create mode 100644 src/prober/prober.c diff --git a/src/prober/Probe.pak/exec.sh b/src/prober/Probe.pak/exec.sh new file mode 100755 index 0000000..f29ae65 --- /dev/null +++ b/src/prober/Probe.pak/exec.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +ELF=keymon.elf + +# killall --help + +# killall -l + +killall -STOP $ELF +sleep 5 +killall -CONT $ELF \ No newline at end of file diff --git a/src/prober/Probe.pak/launch.sh b/src/prober/Probe.pak/launch.sh new file mode 100755 index 0000000..51fb168 --- /dev/null +++ b/src/prober/Probe.pak/launch.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +cd $(dirname "$0") + +./prober.elf &> ./log.txt \ No newline at end of file diff --git a/src/prober/makefile b/src/prober/makefile new file mode 100644 index 0000000..f0a42ae --- /dev/null +++ b/src/prober/makefile @@ -0,0 +1,15 @@ +ifeq (,$(CROSS_COMPILE)) +$(error missing CROSS_COMPILE for this toolchain) +endif + +TARGET = Probe.pak/prober.elf + +CC = $(CROSS_COMPILE)gcc +CFLAGS = -marm -mtune=cortex-a9 -mfpu=neon-vfpv4 -mfloat-abi=hard -march=armv7-a -fomit-frame-pointer +CFLAGS += -I. +# LDFLAGS = -ldl -lSDL -lSDL_image -lSDL_ttf + +all: + $(CC) prober.c -o $(TARGET) $(CFLAGS) $(LDFLAGS) +clean: + rm -f $(TARGET) \ No newline at end of file diff --git a/src/prober/prober.c b/src/prober/prober.c new file mode 100644 index 0000000..dced2e8 --- /dev/null +++ b/src/prober/prober.c @@ -0,0 +1,16 @@ +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////// + +#include + + +int main (int argc, char *argv[]) { + system("./exec.sh"); +} \ No newline at end of file