I am developing a system log app for users to check their device's log. We all know that using logcat an app can read the system log in real-time, but is there a way to read the "history" system log, like for one week? (our app may be down during the week)
UPDATED:
I am also the builder of the custom Android OS, based on AOSP. The system log app is also running in this OS only. So I have the ability to develop drivers, framework layer and system apps besides normal apps.
If a normal app cannot accomplish the task, how about developing a driver additionally? I know that there is a driver module named "logger" in the kernel, which is in charge of the logging. Maybe I can add some code to "logger" and let it dump the logs into files: log_20140629.txt, log_20140630.txt and so on. Every file contains the log in that whole day. Then my app just read these files. Is this idea possible?
We all know that using logcat an app can read the system log in real-time
Only on devices running Android 4.1 and lower, or possibly on rooted devices. Android apps on Android 4.2+ cannot hold the READ_LOGS permission.
but is there a way to read the "history" system log, like for one week?
I have no idea what the "'history' system log" is. If you mean "the system log's history", LogCat exists as a ring buffer. This buffer used to be 64KB a long time ago, and I do not know if they increased its size. On many production devices, this will hold minutes to hours of history, not days.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With