• PSA: How to capture Android crash logs or app errors & warnings on your desktop using adb & logcat

    From Maria Sophia@mariasophia@comprehension.com to comp.mobile.android,alt.comp.os.windows-10,alt.os.linux on Wed Jun 17 01:13:00 2026
    From Newsgroup: comp.mobile.android

    PSA: How to capture Android crash logs or app errors & warnings
    on your desktop using adb & logcat

    Note: In my setup, none of the work is done on the phone. Everything,
    including reproducing the issue on the phone, is done on the desktop.

    When an Android package throws an error, warning, or outright crashes,
    what steps do you use to record what happened for debugging purposes?

    Here's my first-pass attempt at coming up with a test sequence.
    I'll use Aurora Store as the package for my example testcase.

    We will use logcat, which records system-wide logs including app output,
    stack traces and crash reports.
    <developer.android.com/tools/logcat>

    The following sequence is an initial attempt to document the process. Corrections and additions are welcome.

    When an Android package throws an error, warning, or outright crashes,
    what steps do you use to record what happened for debugging purposes?

    Here's my first-pass attempt at coming up with a test sequence.
    I'll use Aurora Store as the package for my example testcase.

    We will use logcat, which records system-wide logs including app output,
    stack traces and crash reports.
    <developer.android.com/tools/logcat>

    The following sequence is an initial attempt to document the process. Corrections and additions are welcome.

    1. Clear existing logs to ensure only events from the test are captured.
    adb logcat -c

    2. Start a filtered live log view.
    Select any preferred filtering method.
    a. Filter by package.
    adb logcat | grep -i com.aurora.store (for Linux)
    adb logcat | findstr -i com.aurora.store (for Windows)
    b. Filter only errors.
    adb logcat *:E
    c. Filter warnings and errors.
    adb logcat *:W
    d. Filter with timestamps.
    adb logcat -v time

    3. Manually reproduce the issue on the device.
    Note that I use screen copy to manipulate the phone on the desktop.

    4. If the package crashes, check the crash buffer.
    adb logcat -b crash

    5. Save logs for later analysis or sharing.
    Save the full session to a file.
    adb logcat -d > aurora_log.txt
    Save only errors.
    adb logcat *:E -d > aurora_errors.txt

    6. Optionally capture only the target application's PID.
    adb shell pidof com.aurora.store
    adb logcat --pid <PID>

    Additional options:

    1. Use logcat buffers separately.
    adb logcat -b main
    adb logcat -b system
    adb logcat -b events
    adb logcat -b crash

    2. Capture a full bug report for deeper debugging.
    adb bugreport bugreport.zip

    Some applications include internal debug toggles that produce richer logs. Aurora does not (AFAIK).

    As always, please strive to add value so that everyone benefits every time
    you post anything to Usenet, where the goal is perfect interoperability.
    --
    All of us are volunteers who pitch in together to kindly help each other.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Maria Sophia@mariasophia@comprehension.com to comp.mobile.android,alt.comp.os.windows-10,alt.os.linux on Fri Jun 19 14:52:51 2026
    From Newsgroup: comp.mobile.android

    Maria Sophia wrote:
    As always, please strive to add value so that everyone benefits every time you post anything to Usenet, where the goal is perfect interoperability.

    UPDATE:
    95% of "errors" in Samsung logcat are Samsung's own broken system services

    When I dump out error messages on my Samsung phone from my desktop using:
    adb logcat *:E

    95% of the "errors" come from just three Samsung system components.
    These are not app errors. They are not real system failures.
    They are Samsung's own services spamming the error log nonstop.

    Here are the three main offenders:

    1. MARsPolicyManager

    Repeated error message:
    Error occurred in setEnabledSetting()java.lang.SecurityException:
    Cannot disable a protected package: com.oasisfeng.island.fdroid

    MARs = "Mobile Active Resource Service."
    It is Samsung's aggressive battery/app management system.
    In my case, MARs is repeatedly trying to force-disable Island's F-Droid plugin, and Android keeps refusing because it is a protected package.
    Samsung keeps retrying every few seconds, so the error repeats endlessly.

    2. Watchdog

    Repeated error message:
    E Watchdog: !@Sync: 3647 heap: 128 / 138 FD: 966

    This is not an error.
    It is a diagnostic heartbeat that Samsung incorrectly logs at E (error) instead of D (debug) or I (info). Samsung logs internal watchdog sync
    events as errors, which floods the log.

    3. SDHMS (Samsung Device Health Monitoring Service)

    Repeated error message:
    SDHMS_UTIL_IO: e = /sys/class/power_supply/battery/chg_type:
    open failed: ENOENT (No such file or directory)

    This means SDHMS is trying to read a battery sysfs file that does not exist
    on my kernel. Instead of checking for existence first, Samsung just logs an error every time.

    Why Samsung logcat is so noisy:
    a. mislabels warnings as E (error)
    b. logs internal housekeeping as E
    c. retries failed operations endlessly
    d. does not rate-limit their system logs

    This is why Samsung devices produce massive logcat noise compared to Pixel, OnePlus, Motorola, etc., apparently.

    How to filter out Samsung's spam on Windows:
    adb logcat *:E | findstr /V /C:"MARsPolicyManager" /C:"Watchdog" /C:"SDHMS"

    This removes 95% of Samsung's bogus "errors" and leaves actual useful logs.
    --
    Some people are so helpful, good, so detailed, so technically competent,
    that almost everything they write, becomes a great reference for others.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Maria Sophia@mariasophia@comprehension.com to comp.mobile.android,alt.comp.os.windows-10,alt.os.linux on Fri Jun 19 15:32:58 2026
    From Newsgroup: comp.mobile.android

    Maria Sophia wrote:
    This is why Samsung devices produce massive logcat noise compared to Pixel, OnePlus, Motorola, etc., apparently.

    How to filter out Samsung's spam on Windows:
    adb logcat *:E | findstr /V /C:"MARsPolicyManager" /C:"Watchdog" /C:"SDHMS"

    This removes 95% of Samsung's bogus "errors" and leaves actual useful logs.

    ADDITION

    Below are specific Windows & Linux commands (findstr vs grep) to help
    others capture Android error logs and warnings and information output.

    This removes the flood of Samsung garbage in the logcat log:
    adb logcat *:E | findstr /V /C:"MARsPolicyManager" /C:"Watchdog" /C:"SDHMS"
    adb logcat *:E | grep -vE "MARsPolicyManager|Watchdog|SDHMS"

    This shows only real app crashes:
    adb logcat -v time | findstr /C:"FATAL EXCEPTION" /C:"AndroidRuntime"
    adb logcat -v time | grep -E "FATAL EXCEPTION|AndroidRuntime"

    This shows only battery or power errors:
    adb logcat | findstr /I /C:"battery" /C:"thermal" /C:"power" /C:"charger" /C:"voltage" /C:"current"
    adb logcat | grep -iE "battery|thermal|power|charger|voltage|current"

    This shows only network errors:
    adb logcat *:E | findstr /I /C:"Wifi" /C:"DNS" /C:"Network" /C:"Socket"
    adb logcat *:E | grep -iE "wifi|dns|network|socket"

    This shows network warnings and info also:
    adb logcat | findstr /I /C:"Wifi" /C:"wpa" /C:"DNS" /C:"Network" /C:"Connectivity" /C:"Socket" /C:"EHOSTUNREACH" /C:"ETIMEDOUT"
    adb logcat | grep -iE "wifi|wpa|dns|network|connectivity|socket|EHOSTUNREACH|ETIMEDOUT"

    This shows ANR (App Not Responding) events:
    adb logcat | findstr /I /C:"ANR in"
    adb logcat | grep -i "ANR in"

    This shows low-memory and OOM events:
    adb logcat | findstr /I /C:"lowmemorykiller" /C:"OutOfMemory" /C:"oom_adj"
    adb logcat | grep -iE "lowmemorykiller|OutOfMemory|oom_adj"

    This shows storage or filesystem errors:
    adb logcat | findstr /I /C:"fsck" /C:"ext4" /C:"f2fs" /C:"I/O error" /C:"write failed"
    adb logcat | grep -iE "fsck|ext4|f2fs|I/O error|write failed"

    This shows camera errors:
    adb logcat | findstr /I /C:"CameraService" /C:"CameraProvider" /C:"E/Camera"
    adb logcat | grep -iE "CameraService|CameraProvider|E/Camera"

    This shows audio errors:
    adb logcat | findstr /I /C:"AudioFlinger" /C:"AudioTrack" /C:"AudioRecord" /C:"E/Audio"
    adb logcat | grep -iE "AudioFlinger|AudioTrack|AudioRecord|E/Audio"

    This shows Bluetooth errors:
    adb logcat | findstr /I /C:"Bluetooth" /C:"bt_stack" /C:"btif" /C:"hci"
    adb logcat | grep -iE "Bluetooth|bt_stack|btif|hci"

    This shows GPS or location errors:
    adb logcat | findstr /I /C:"LocationManager" /C:"Gnss" /C:"gps" /C:"E/Gps"
    adb logcat | grep -iE "LocationManager|Gnss|gps|E/Gps"

    This shows app install or update failures:
    adb logcat | findstr /I /C:"PackageManager" /C:"INSTALL_FAILED" /C:"DexOpt" /C:"dex2oat"
    adb logcat | grep -iE "PackageManager|INSTALL_FAILED|DexOpt|dex2oat"

    This shows SELinux denials:
    adb logcat | findstr /I /C:"avc: denied"
    adb logcat | grep -i "avc: denied"

    This shows system_server crashes:
    adb logcat | findstr /I /C:"system_server" /C:"crash"
    adb logcat | grep -iE "system_server.*crash"

    This shows wakelock issues:
    adb logcat | findstr /I /C:"WakeLock" /C:"wakelock"
    adb logcat | grep -iE "WakeLock|wakelock"

    This shows thermal throttling:
    adb logcat | findstr /I /C:"thermal" /C:"throttle" /C:"overheat"
    adb logcat | grep -iE "thermal|throttle|overheat"

    I'll write up a linux/windows script to make all this easy peasy.
    --
    Every thread I author is intended to be a useful resource to thousands of people who have the same needs, wants & desires as this is a common need.
    --- Synchronet 3.22a-Linux NewsLink 1.2
  • From Hank Rogers@Hank@nospam.invalid to comp.mobile.android,alt.comp.os.windows-10,alt.os.linux on Fri Jun 19 17:09:20 2026
    From Newsgroup: comp.mobile.android

    Maria Sophia wrote on 6/19/2026 3:32 PM:
    Maria Sophia wrote:
    This is why Samsung devices produce massive logcat noise compared to Pixel, >> OnePlus, Motorola, etc., apparently.

    How to filter out Samsung's spam on Windows:
    adb logcat *:E | findstr /V /C:"MARsPolicyManager" /C:"Watchdog" /C:"SDHMS"

    This removes 95% of Samsung's bogus "errors" and leaves actual useful logs.

    ADDITION

    Below are specific Windows & Linux commands (findstr vs grep) to help
    others capture Android error logs and warnings and information output.

    This removes the flood of Samsung garbage in the logcat log:
    adb logcat *:E | findstr /V /C:"MARsPolicyManager" /C:"Watchdog" /C:"SDHMS"
    adb logcat *:E | grep -vE "MARsPolicyManager|Watchdog|SDHMS"

    This shows only real app crashes:
    adb logcat -v time | findstr /C:"FATAL EXCEPTION" /C:"AndroidRuntime"
    adb logcat -v time | grep -E "FATAL EXCEPTION|AndroidRuntime"

    This shows only battery or power errors:
    adb logcat | findstr /I /C:"battery" /C:"thermal" /C:"power" /C:"charger" /C:"voltage" /C:"current"
    adb logcat | grep -iE "battery|thermal|power|charger|voltage|current"

    This shows only network errors:
    adb logcat *:E | findstr /I /C:"Wifi" /C:"DNS" /C:"Network" /C:"Socket"
    adb logcat *:E | grep -iE "wifi|dns|network|socket"

    This shows network warnings and info also:
    adb logcat | findstr /I /C:"Wifi" /C:"wpa" /C:"DNS" /C:"Network" /C:"Connectivity" /C:"Socket" /C:"EHOSTUNREACH" /C:"ETIMEDOUT"
    adb logcat | grep -iE "wifi|wpa|dns|network|connectivity|socket|EHOSTUNREACH|ETIMEDOUT"

    This shows ANR (App Not Responding) events:
    adb logcat | findstr /I /C:"ANR in"
    adb logcat | grep -i "ANR in"

    This shows low-memory and OOM events:
    adb logcat | findstr /I /C:"lowmemorykiller" /C:"OutOfMemory" /C:"oom_adj"
    adb logcat | grep -iE "lowmemorykiller|OutOfMemory|oom_adj"

    This shows storage or filesystem errors:
    adb logcat | findstr /I /C:"fsck" /C:"ext4" /C:"f2fs" /C:"I/O error" /C:"write failed"
    adb logcat | grep -iE "fsck|ext4|f2fs|I/O error|write failed"

    This shows camera errors:
    adb logcat | findstr /I /C:"CameraService" /C:"CameraProvider" /C:"E/Camera"
    adb logcat | grep -iE "CameraService|CameraProvider|E/Camera"

    This shows audio errors:
    adb logcat | findstr /I /C:"AudioFlinger" /C:"AudioTrack" /C:"AudioRecord" /C:"E/Audio"
    adb logcat | grep -iE "AudioFlinger|AudioTrack|AudioRecord|E/Audio"

    This shows Bluetooth errors:
    adb logcat | findstr /I /C:"Bluetooth" /C:"bt_stack" /C:"btif" /C:"hci"
    adb logcat | grep -iE "Bluetooth|bt_stack|btif|hci"

    This shows GPS or location errors:
    adb logcat | findstr /I /C:"LocationManager" /C:"Gnss" /C:"gps" /C:"E/Gps"
    adb logcat | grep -iE "LocationManager|Gnss|gps|E/Gps"

    This shows app install or update failures:
    adb logcat | findstr /I /C:"PackageManager" /C:"INSTALL_FAILED" /C:"DexOpt" /C:"dex2oat"
    adb logcat | grep -iE "PackageManager|INSTALL_FAILED|DexOpt|dex2oat"

    This shows SELinux denials:
    adb logcat | findstr /I /C:"avc: denied"
    adb logcat | grep -i "avc: denied"

    This shows system_server crashes:
    adb logcat | findstr /I /C:"system_server" /C:"crash"
    adb logcat | grep -iE "system_server.*crash"

    This shows wakelock issues:
    adb logcat | findstr /I /C:"WakeLock" /C:"wakelock"
    adb logcat | grep -iE "WakeLock|wakelock"

    This shows thermal throttling:
    adb logcat | findstr /I /C:"thermal" /C:"throttle" /C:"overheat"
    adb logcat | grep -iE "thermal|throttle|overheat"

    I'll write up a linux/windows script to make all this easy peasy.


    Thanks Mary. Will you also post it to a github page so everyone
    benefits from it's value?

    I really appreciate your efforts.

    Also, do you have a web page where we can submit other problems which
    you might investigate and eventually provide needed solutions?

    I realize how busy you are, but many people get no value from your
    research because it's distribution is so limited.

    I really think you can do better, and I hope you will.

    --- Synchronet 3.22a-Linux NewsLink 1.2