Have you ever encountered a situation where your smartphone Android starts to slow down, overheat or suddenly turn off for no apparent reason? In 90% of such cases, the culprit is not a hardware failure, but a software failure - an application conflict, a system error or a background service. But how can you accurately determine the source of the problem if the phone does not display obvious errors on the screen?
This is where Android log service comes to the rescue - a built-in operating system tool that keeps a detailed record of all events, errors and actions in the background. These records, called logs (logss, contain valuable diagnostic information, from application startup times to critical kernel failures. However, most users do not even suspect the existence of this tool - but in vain! The ability to work with logs can save hundreds of rubles on repairs or hours of time on reinstalling the system.
In this article we will look in detail at:
- ๐ What is a log service Android and where system logs are stored
- ๐ฑ How to access logs without
rootrights (4 working methods) - โ ๏ธ What data can be extracted to diagnose faults
- ๐ ๏ธ Step-by-step guide for analyzing logs for beginners
- ๐ง Popular apps for reading and filtering logs
The material will be useful for ordinary users who want to independently understand the reasons unstable operation of the phone, and for developers testing their applications on Androiddevices.
What is the Android log service and why do you need it?
Log service (or Android log system) is a built-in operating system mechanism that continuously records events occurring in the phone. Every action, from touching the screen to an application loading error, is recorded in special files with timestamps. These files are called logs (log files) and are divided into several types:
- ๐ Main log โ the main log of system and application events
- ๐จ Kernel log โ records kernel Linux (critical hardware errors)
- ๐ฑ Event log โuser interface events (clicks, gestures)
- ๐ Radio log โmobile network operation logs Wi-Fi and Bluetooth
The main task of the logs is to help developers and engineers diagnose problems. For example, if an application suddenly closes, an entry is left in the logs indicating PID (process ID) and the reason for the crash (ANR or Force Close). Without this information, it would be extremely difficult to find the root of the problem.
For the average user, the log service is useful in the following cases:
- ๐ The phone began to work slowly, but the reason cannot be identified through the task manager
- ๐ The battery discharges too quickly, and there are no obvious โeatersโ in the settings charge
- ๐ต Problems connecting to the mobile network or Wi-Fi (constant breaks, slow Internet)
- ๐ Applications crash without errors or the phone reboots on its own
โ ๏ธ Attention: Logs Android contain confidential information - from application launch history to location data. Do not transfer logs to third parties without first clearing personal data!
Interesting fact: on devices with Android 10 and newer, the system automatically archives logs for the last 24 hours in a compressed form. This saves disk space, but makes it difficult to access old records without special tools.
Where Android logs are stored and how to access them
Log files in Android are stored in protected system folders, access to which is restricted by default. The main paths to the logs:
/data/log/โ main system logs (requiredroot-rights)/proc/kmsgโ real-time kernel log/data/anr/โ records of application freezes (ANR)/data/tombstones/โ reports of critical failures (tombstone files)
Without superuser rights (root) most of these folders will be inaccessible. However, there are several legal ways to get logs:
Method 1: Through ADB (Android Debug Bridge)
The most reliable method that does not require root. You you will need:
- ๐ฅ๏ธ Computer with installed drivers ADB
- ๐ฑ Enabled debugging on USB on the phone (
Settings โ About the phone โ Build number- press 7 times, thenSettings โ System โ For developers โ USB debugging) - ๐ Cable USB (preferably original)
Instructions:
- Connect your phone to the PC and confirm permission to debug.
- Open command line (
cmd) and enter:
adb logcat -d > android_logs.txt
This command saves the current logs to a file android_logs.txt on your computer.
Enable developer mode (7 clicks on "Build number")|
Activate debugging USB in settings|
Install ADB drivers on PC|
Connect the phone with the original cable| -->
Method 2: Using applications for reading logs
If ADB seems complicated, you can use specialized utilities from Google Play:
- ๐ฑ Logcat Extreme โshows logs in real time with filtering by levels (Error, Warning, Info)
- ๐ aLogcat โa simple viewer with color-coded events
- ๐ CatLog โsupports saving logs to a file and sending by email
Limitation: these applications only show main log i event log. data-i="116">or kernel log or radio log you will still need ADB or root.
Method 3: Through the engineering menu (for some models)
Some manufacturers (for example, Samsung, Xiaomi, Huawei) provide access to logs through hidden menus. For example, on Samsung you can enter the code:
*#9900#
This will open a menu SysDumpwhere you can save system, modem and Wi-Fi logs to a file on the memory card.
โ ๏ธ Attention: Engineering menu codes may vary depending depending on the model and firmware version. Incorrect code entry may lead to a reset!
Method 4: Automatic sending of logs in case of failure
Starting from Android 9, the system automatically collects reports on critical errors and offers to send them to Google. These reports contain:
- ๐ฑ Device model and version Android
- ๐ Battery and charge status
- ๐ก Network information (Wi-Fi/mobile data)
- ๐ฅ Call stack that led to the failure
To find these reports, go to Settings โ System โ Error reporting.
Via ADB (computer)|Special applications|Engineering menu|Automatic system reports-->
What data can be extracted from Android logs
System logs contain a huge amount of information, but it is usually enough to diagnose problems several key sections. Let's consider what can be learned from different types of logs:
| Log type | What data it contains | Use example |
|---|---|---|
| Main log | Records about starting/stopping applications, errors ANR, events systems | Finding the cause of a game or messenger crash |
| Kernel log | Kernel errors, driver problems, processor overheating | Diagnostics of sudden phone reboots |
| Radio log | Mobile network events Wi-Fi, Bluetooth, GPS | Finding the cause of a bad signal or connection breaks |
| Event log | User gestures, pressing buttons, changing screen orientation | Checking whether the phone responds to touches |
Let's look in practice at what useful log entries look like:
- ๐ด ANR (Application Not Responding) error:
E/ActivityManager( 1234): ANR in com.whatsapp (whatsapp/1.2.3)
Meaning: Application WhatsApp version 1.2.3 has stopped responding. Possible reasons are lack of memory or a conflict with another process. - ๐ Battery problems:
W/BatteryStats( 5678): high drain from 'com.facebook.katana' (uid 10123)
Value: The application Facebook consumes too much energy in the background. - ๐ต Mobile network failures:
E/RILJ ( 2345): Unsol Response: Radio power off
Value: The modem suddenly turned off - there may be a problem with the SIM card or antenna.
Critical information: In the kernel logs (kernel log) there are often entries about processor overheating, for example: thermal_engine: Mitigation: CPU0, level: 3, temp: 85ยฐC. If the temperature exceeds 80ยฐC, this is a direct signal about the need to clean the device or replace the thermal paste.
For ease of analysis, the logs are divided into levels of importance:
- ๐ข
Vโ Verbose (detailed debugging messages) - ๐ต
Dโ Debug (information for developers) - โช
Iโ Info (standard events) - ๐ก
Wโ Warning (potential problems) - ๐ด
Eโ Error (critical errors) - โซ
Fโ Fatal (fatal failures leading to a reboot)
To quickly find errors in the logs, use a filter by severity level. For example, in ADB the command adb logcat *:E will show only critical errors (Error).
How to analyze Android logs: step-by-step guide
Getting the logs is only half the battle. The main thing is to read them correctly and highlight useful information. Follow this algorithm:
Step 1: Save the logs to a file
If you use ADB, run the command:
adb logcat -d -f C:\logs\android_logs.txt
For applications like aLogcat press the button Save and select a format (.txt or .log).
Step 2: Filter out unnecessary records
Full logs can span thousands of lines. To narrow your search:
- ๐ Look for keywords:
ANR,crash,exception,thermal,battery - ๐ Limit the time range (for example, logs for the last 10 minutes)
- ๐ฏ Use filters by severity level (
Efor errors,Wfor warnings)
Step 3: Look for duplicates errors
If the same error appears repeatedly, it is most likely the cause of the problem. For example:
E/WindowManager( 1234): Failed to capture screenshot: Permission deniedE/WindowManager( 1234): Failed to capture screenshot: Permission denied
E/WindowManager( 1234): Failed to capture screenshot: Permission denied
In this case, the problem is related to the lack of rights to create screenshots (possibly due to restrictions Work Profile or Device Policy).
Step 4: Check the connection between events
Pay attention to the timestamps. For example:
05-20 14:30:22.123 I/ActivityManager( 1234): Launching com.android.chrome
05-20 14:30:23.456 E/Chrome ( 5678): Out of memory! Killing process.
Here you can see that the browser Chrome was launched at 14:30:22, and a second later an out of memory error occurred. This indicates a memory leak in the application.
Step 5: Use online services for analysis
If parsing logs yourself causes difficulties, you can upload the file to specialized services:
- ๐ Android Logcat Viewer (logcat.viewer) - visualizes color-coded logs
- ๐ StackOverflow - search by fragments of logs often leads to discussions with solutions
- ๐ค Google Issue Tracker - a database of known bugs Android with logs
90% of problems with Android can be diagnosed by analyzing only 3 types of logs: main log (application errors), kernel log (hardware failures) and radio log (communication problems).
Popular apps for working with Android logs
For convenient viewing and analysis of logs, there are both mobile and desktop utilities. Let's look at the most effective ones:
| Name | Platform | Features | Link |
|---|---|---|---|
| Logcat Extreme | Android | Real-time viewing, filters, saving to file | Google Play |
| aLogcat | Android | Simple interface, color coding, text search | Google Play |
| CatLog | Android | Support for regular expressions, sending logs by email | Google Play |
| Android Studio Logcat | Windows/macOS/Linux | Integration with ADB, advanced filters, call stack analysis | Official website |
| LogViewer | Windows | Visualization of logs, construction of event graphs | GitHub |
For developers, the most powerful tool is Android Studio Logcat. It allows you to:
- ๐ Filter logs by
PID(process identifier) - ๐ Build time diagrams of events
- ๐ Automatically detect crash logs and ANR
- ๐ค Save logs in format
.txtor.logwith timestamps
For ordinary users Mobile applications like Logcat Extremeare better suited. They do not require a connection to a PC and allow you to quickly find critical errors directly on your phone.
โ ๏ธ Attention: Some antiviruses (for example, Avast or Dr.Web) can block application access to logs, regarding this as a potential threat. During diagnostics, add a app for reading logs to the antivirus exceptions.
Typical errors in Android logs and their solutions
Let's look at the most common errors that can be found in logs and ways to eliminate them.
1. ANR (Application Not Responding) errors
Example entry:
E/ActivityManager( 1234): ANR in com.android.settings (settings/1.0)
E/ActivityManager( 1234): Reason: Broadcast of Intent { act=android.intent.action.BOOT_COMPLETED}
Cause: The application Settings does not respond to the system boot completion event. This may happen due to:
- ๐ Conflict with other applications launched at startup
- ๐๏ธ Application cache corruption
- ๐ฑ Lack of RAM
Solution:
- Clear the application cache
SettingsinSettings โ Applications. - Disable autorun of unnecessary apps (for example, via Greenify).
- If the problem persists, reset the settings (
Settings โ System โ Reset).
2. Low memory errors (Out of memory)
Example entry:
E/art ( 5678): Throwing OutOfMemoryError from art::JNI::ThrowOutOfMemoryError("Java heap space")
Reason: The application (in this case - ARTruntime Android) has run out of allocated memory. This most often occurs with:
- ๐ฎ Games with high graphics requirements
- ๐ท Applications for photo/video processing (Photoshop Express, CapCut)
- ๐ Browsers with a large number of open tabs
Solution:
- Close all background applications before launching a โheavyโ app.
- Reduce graphic settings in games.
- If the error appears frequently, check if the phoneโs memory is full (at least 10-15% should be free).
3. Kernel errors (Kernel panic)
Example entry:
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
Cause: Critical kernel failure Linux, often associated with:
- ๐ Malfunction battery or power controller
- ๐ฅ Overheating of the processor (temperature above 85ยฐC)
- ๐ฝ Damage to the file system (for example, after an incorrect shutdown USB)
Solution:
- Check the processor temperature using AIDA64 or CPU Monitor.
- If the phone overheats, clean the charging connector from dust and avoid using it in hot weather.
- Reset to factory settings. If the error persists, contact the service center (there may be a hardware fault).
4. Problems with the mobile network (Radio power off)
Example entry:
E/RILJ ( 2345): Unsol Response: Radio power off
E/RILJ ( 2345): Unsol Response: No network connection
Cause: The phone's modem has turned off or lost connection to the network. This may be caused by:
- ๐ถ Problems with the SIM card (damage, incorrect installation)
- ๐ก Malfunction of the operator's base station
- ๐ง Malfunction of the phone's antenna module
Solution:
- Reboot the phone and check if the network appears.
- Try inserting the SIM card into another phone - if the problem persists, contact your operator.
- Update the modem firmware (if an update is available via
Settings โ Software update). - If all else fails, check the antenna connector at the service center.
What to do if there are a lot of errors in the logs E/Volley?
These errors are related to network requests in applications (usually through the library VolleyMost often they appear when:
- There is no Internet connection, but the application is trying to send a request.
- The server that the application is accessing is unavailable (error 404 or 500).
- The application is blocked by a firewall or VPN.
Solution:1. Check your Internet connection.
2. Disable the VPN or firewall (for example, NetGuard).
3. Update the problematic application to the latest version.
4. If errors appear in the browser, clear the cache and cookies.
How to clear Android logs and why it is sometimes necessary
Although logs take up relatively little space (usually no more than 10-20 MB), in some cases clearing them may be necessary useful:
- ๐ Privacy: Logs contain information about launched applications, network connections and even geolocation.
- ๐ ๏ธ Diagnostics: After cleaning the logs, it is easier to track down new errors without going through thousands of old entries.
- ๐ฑ Performance: On weak devices, constant logging can slow down the system slightly.
Cleaning methods:
Method 1: Through ADB
Run the command:
adb logcat -c
This will clear the buffer main logbut will not affect kernel log or radio log.
Method 2: Reboot the phone
When rebooting The buffer main log is reset automatically. However, kernel log and tombstone files are saved.
Method 3: Manual cleaning (required root)
To completely clear all logs:
surm -rf /data/log/*
rm -rf /data/anr/*
rm -rf /data/tombstones/*
โ ๏ธ Attention: Deleting tombstone files may interfere with diagnosing hardware failures. Do not clear these files if you plan to contact the service center under warranty!
To regularly clear logs without root you can use applications like SD Maid (function CorpseFinder delete old ones tombstone files).
FAQ: Frequently asked questions about the Android log service
๐ Is it possible to get logs from a phone that does not turn on?
Yes, but this will require recovery mode (Recovery Mode) or a connection to a PC via ADB in fastbootmode. On some devices (for example, Samsung), logs are stored in the /data/logsection, which can be read through TWRP Recovery. If the phone is completely โbrickedโ (does not respond to buttons), only JTAG-diagnostics at a service center will help.
๐ฑ How to save logs if the phone constantly reboots?
In this case it will help continuous output of logs via ADB:
- Connect the phone to the PC and run the command:
adb logcat > C:\logs\crash_logs.txt
The logs will be written to a file in real time, even if the phone reboots. After collecting data, click Ctrl+Cto stop recording.