diff --git a/README.md b/README.md index 904c482..369cd03 100644 --- a/README.md +++ b/README.md @@ -40,3 +40,7 @@ The default hotkey is Hotkey 1 (or `L3`), the left hotkey button. To utilize a d - `HOTKEY_2` (right hotkey) If another value is specified, this pak will revert to using `HOTKEY_1`. + +### Debug Logging + +To enable debug logging, create a file named `debug` in the pak folder. Logs will be written to the `$SDCARD_PATH/.userdata/$PLATFORM/logs/` folder. diff --git a/bin/on-boot b/bin/on-boot index 4d58647..2f49e44 100755 --- a/bin/on-boot +++ b/bin/on-boot @@ -1,6 +1,7 @@ #!/bin/sh bindir="$(dirname "$0")" progdir="$(dirname "$bindir")" +[ -f "$progdir/debug" ] && set -x PAK_NAME="$(basename "$progdir")" main() { diff --git a/bin/service-on b/bin/service-on index 340ceca..01065b2 100755 --- a/bin/service-on +++ b/bin/service-on @@ -2,6 +2,7 @@ bindir="$(dirname "$0")" progdir="$(dirname "$bindir")" cd "$progdir" || exit 1 +[ -f "$progdir/debug" ] && set -x PAK_NAME="$(basename "$progdir")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$progdir/lib" diff --git a/launch.sh b/launch.sh index 1432545..9152600 100644 --- a/launch.sh +++ b/launch.sh @@ -2,6 +2,7 @@ echo "$0" "$@" progdir="$(dirname "$0")" cd "$progdir" || exit 1 +[ -f "$progdir/debug" ] && set -x PAK_NAME="$(basename "$progdir")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$progdir/lib" echo 1 >/tmp/stay_awake