• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help How to get kernel logs on unrooted device?

  • Thread starter Thread starter Android Question
  • Start date Start date
A

Android Question

Guest
I've been having random reboots - perhaps once per day. I want to see the kernel logs - via dmesg, looking at /proc/last_kmsg, or some such. However, every attempt to do this hits a brick wall because apparently, the OS now blocks me from accessing my own kernel logs.

Possible?

Unrooted Galaxy S3, Android 4.4.2
 
I cat the last_kmsg with Terminal Emulator.

If that doesn't work for you, I'm afraid that root is probably your only option.

From adb shell, I get a "no such file or directory" error when I try to cat or ls /proc/last_kmsg, which I assumed was because I wasn't root as guides such as http://android-revolution-hd.blogspot.com/2014/02/how-to-generate-kernel-log-after-random.html tell you to use su before copying /proc/last_kmsg.

However, I suppose it's possible it's rebooting for some reason other than a crash - but then what? It's plugged into a charger and it wouldn't be installing updates 3 times in as many days.

(I am the OP. Bizarrely, you can start a thread anonymously, but not reply to it.)
 
Yeah, I'm rooted so wasn't sure about that for non-rooted.

Has logcat shed any light on things?

I'm wondering if you might see anything really misbehaving that might suggest a bad app.
 
So, logcat can be taken even without root.
I'm running a custom rom on a nexus tab (grouper) but when I flash Franco Kernel r81, as soon as I reboot I get constant "system UI closed"
So, is there any way I can get a crashlog (without a PC) that will start from boot (the force closes don't give me a chance to do anything while booted into system.
Cheers (twrp recovery for now)
 
I can get a log via logcat, but it starts with the device booting. There's no indication as to why:

--------- beginning of /dev/log/system
I/ActivityManager( 739): !@ mBooting is set true!
D/StatusBar-DoNotDistrub( 934): set Repeating event for Tue Feb 03 00:00:01 CST 2015 and for Tue Feb 03 00:00:00 CST 2015


I don't see any stack traces in the bugreport dump, either. Is it possible an app is intentially rebooting the phone rather than a kernel crash being responsible? How do I know which app requested the reboot - is this logged?

I've not installed any apps on the phone recently. This just started happening a few days ago.
 
Yeah, I think that you want to look at logs as time goes along, I acknowledge that it's not going to give you a past history - unfortunately, logcat isn't persistent.

I'm not sure it could be an app requesting a reboot - but I did have a browser that would core leak badly enough to cause reboots. In your case, maybe an app update is responsible.

Have you been having battery or heating issues lately?

Funky - will have to get back to you. Try the app I mentioned, it may be helpful anyway.
 
Back
Top Bottom