From 2faf800056008191827fdda61c71ff3ed24f135b Mon Sep 17 00:00:00 2001 From: MeexReay Date: Sat, 17 May 2025 03:40:27 +0300 Subject: [PATCH] catch_kernel_trouble - add hint about recovery mode catch_kernel_trouble - move log to /tmp right after pulling --- catch-kernel-trouble.sh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/catch-kernel-trouble.sh b/catch-kernel-trouble.sh index d93c9a4..0c1c91c 100755 --- a/catch-kernel-trouble.sh +++ b/catch-kernel-trouble.sh @@ -10,14 +10,23 @@ fi pmbootstrap chroot adb pull /proc/last_kmsg /home/pmos -tail -n $NUM_LINES $PMWORK/chroot_native/home/pmos/last_kmsg > kernel-trouble +if ! mv $PMWORK/chroot_native/home/pmos/last_kmsg /tmp/full-kernel-trouble +then + echo "1. Enter to the recovery mode" + echo "2. Run this script" + echo "3. Connect the phone to usb cable" + exit 1 +fi + +tail -n $NUM_LINES /tmp/full-kernel-trouble > kernel-trouble echo -echo " --- Kernel log (last $NUM_LINES lines) --- " +echo "Last $NUM_LINES log lines" echo cat kernel-trouble echo -echo " --- Writed to \"$PWD/kernel-trouble\" --- " +echo "Saved to \"$PWD/kernel-trouble\"" +echo "Full log was saved to \"/tmp/full-kernel-trouble\"" echo