Skip to content

Instantly share code, notes, and snippets.

@FacuM
Created October 19, 2018 01:49
Show Gist options
  • Save FacuM/2ce81f51ca69507f989f6bea006e3879 to your computer and use it in GitHub Desktop.
Save FacuM/2ce81f51ca69507f989f6bea006e3879 to your computer and use it in GitHub Desktop.
Untested dmesg as oneshot service
#!/system/bin/sh
while true
LAST=$(dmesg | tail -1)
if [ $(dmesg | tail -1) -ne "$LAST" ]
then
printf "$LAST" >> /data/local/kmsg
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment