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)
This commit is contained in:
Shaun Inman 2023-01-13 20:22:21 -05:00
parent cf44917afa
commit abe703fffe
4 changed files with 47 additions and 0 deletions

11
src/prober/Probe.pak/exec.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
ELF=keymon.elf
# killall --help
# killall -l
killall -STOP $ELF
sleep 5
killall -CONT $ELF

5
src/prober/Probe.pak/launch.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
cd $(dirname "$0")
./prober.elf &> ./log.txt

15
src/prober/makefile Normal file
View file

@ -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)

16
src/prober/prober.c Normal file
View file

@ -0,0 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <dirent.h>
#include <ctype.h>
#include <unistd.h>
#include <fcntl.h>
///////////////////////////////////////
#include <sys/time.h>
int main (int argc, char *argv[]) {
system("./exec.sh");
}