system – logcat: E QC-QMI : qmi_client [378]: unable to connect to server, errno=[13:Permission denied]

On my Fairphone-2 with Android 9 I had a look into logcat because it is generally unstable since the upgrade to 9 and sometimes gets hot and drains battery like hell. Today I saw this:

378   395 E QC-QMI  : qmi_client (378): unable to connect to server, errno=(13:Permission denied), attempt=60
395   395 W thermal-engine: type=1400 audit(0.0:1056): avc: denied { dac_override } for capability=1 scontext=u:r:thermal-engine:s0 tcontext=u:r:thermal-engine:s0 tclass=capability permissive=0    378   395 E QC-QMI  : qmi_client (378): unable to connect to server after 60 tries... giving up
378   395 E QC-QMI  : qmi_qmux_if_pwr_up_init_ex:  Initialization failed, rc = -1
378   395 E QMI_FW  : QMUXD: WARNING qmi_qmux_if_pwr_up_init failed! rc=-1

The first type of message comes in every second for 1 minute, then the fail is reported, then it starts over.

Any hints appreciated about:

  1. what is qmi_client, possibly WIFI?
  2. which permission could that be, some device or a network endpoint?
  3. which server could that be or is this just any server requested by some app?
  4. can this be somehow related to that thermal-engine, the message of which consistently comes along each time and 378 is actually the PID of the thermal-engine. What is it and why would it want to connect anywhere?

recovery mode – Analyzing boot loop Root cause from console-ramoops-0 ( & logcat)

Boot-looped and got stuck in powered by android logo. Logcat hasnt been much useful. Wanna know what’s causing the stuck.
All I have is this from /sys/fs/pstore/console-ramoops-0

'android.frameworks.sensorservice@1.0::ISensorManager/default': No such file or directory

I am attaching Entire /sys/fs/pstore/console-ramoops-0

what seems the issue ?
I have TWRP backups of vendor system boot that i tinkered restores with. No Luck. This is stock MIUI ROM with TWRP as recovery base so after flashing dm-verify-no encrypt.zip ( cant recall the exact name ) + certification.zi & permssiver I get past MIUI logo but now looping at powered by android logo

applications – Logcat: Differnet logs when the same app has been run multiple times

This question is w.r.t getting the logs from the logcat (using command-line tool).

I want to fetch the logs of a particular app after the app has been run for a specifc amount of time (say 15 seconds) without any user involvment. So, I used the logcat using the command adb shell logcat --pid ProcessIdOfApp and when I tried to run the same app two times (after the fresh installation and cleaned all the earlier logs) using adb shell logcat -c, then also for many apps, I am getting different logs. When I am saying different logs what I mean here is we are getting different tags.

I also tried rebooting the smartphone and then installed the apk on the device, but still I am getting different logs.

My curiousity is when the same code is being executed, the corresponding logs generation should also be same. Why it is coming different when the same app has been launched multiple times?

  • Is it like I am not filtering the logs properly for a given app? If
    yes, then what command I should use to filter the logs for a given
    app?

  • Since I am getting different tags when the same app has been launch
    multiple times, how to know which tags should be ignored?

Android Stuck on boot after flashing the kernel I built (Waiting for service ‘media.audio_policy’ on ‘/dev/binder’… in logcat)

I have built the Kernel for my Samsung Android device. But after flashing it and booting the device it gets stuck on the Samsung Logo.

Device : SM-M015G
Kernel was obtained from Samsung Opensource
Android 10 (Since the kernel version is meant for Android 10)

When observing logcat the following message are being output for ever in a loop. (Sometimes with other logcat messages too)

06-11 22:36:45.844  1326  1692 I chatty  : uid=1000(system) AudioService identical 4 lines
06-11 22:36:45.944  1326  1692 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
06-11 22:36:45.976   803   803 W ServiceManagement: Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0
06-11 22:36:45.976   803   803 I ServiceManagement: getService: Trying again for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0...
06-11 22:36:46.044  1326  1692 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
06-11 22:36:46.245  1326  1692 I chatty  : uid=1000(system) AudioService identical 2 lines
06-11 22:36:46.345  1326  1692 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
06-11 22:36:46.346  1774  1774 D audio_hw_utils: audio_extn_utils_open_snd_mixer: retry, retry_num 10
06-11 22:36:46.445  1326  1692 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
06-11 22:36:46.746  1326  1692 I chatty  : uid=1000(system) AudioService identical 3 lines
06-11 22:36:46.846  1326  1692 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...
06-11 22:36:46.947  1326  1692 W ServiceManager: Service media.audio_policy didn't start. Returning NULL
06-11 22:36:46.947  1326  1692 W AudioSystem: AudioPolicyService not published, waiting...
06-11 22:36:46.976   803   803 W ServiceManagement: Waited one second for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0
06-11 22:36:46.977   803   803 I ServiceManagement: getService: Trying again for android.hardware.camera.provider@2.4::ICameraProvider/legacy/0...
06-11 22:36:47.346  1774  1774 D audio_hw_utils: audio_extn_utils_open_snd_mixer: retry, retry_num 11
06-11 22:36:47.447  1326  1692 I ServiceManager: Waiting for service 'media.audio_policy' on '/dev/binder'...

Does anybody have any ideas to fix this?
Thanks.

Is there any way I can view LogCat events from 24 hours ago?

All the logcat events that I see are very recent. Is there any way to see older events from around 24 hours ago?

adb – Enabling logcat on boot

I’m trying to debug a ROM problem, that cause Android animation boot run forever, occuring after the first reboot.

Trying to read the log with logcat ,executing from shell adb logcat -d before powering on the phone, but adb remains in < waiting for device > state

Before rebooting Android, I test adb logcat and it was working fine.

Anyone can help? How to read boot logs?

logging – Creating a log entry in logcat via adb?

Does anybody knows a possibility to add a log entry into the logcat main log?

I need to inject an log line with custom text into this log on arbitrary devices.

The main problem is that I can’t just install an own app that does inject the log entries.
I need to create the log entry directly on adb.

applications – Identify the source (e.g. Java class, process, app) from an output in the logcat

When I plug my phone into my computer, I can see the console output in Android Studio. I recently noticed that whenever I start entering a password in a field designated for passwords (the ones that display ‘*’ for any character), the phone prints a very concerning message to the console:

D/HwAutofillHelper: inputType is password, now record

Since it is an Honor Phone, I suppose Hw is short for Huawei?

Nevertheless, I’d like to know if there is a way to find out what process produced this output and what app it belongs to?

adb – Logcat does not display React Native debug messages

I am currently developing an application using React Native (JavaScript). My client runs logcat via the SDK command like using this command (available on the official wiki):

adb logcat *:S ReactNative:V ReactNativeJS:V

This should show all level messages (console.trace all the way to console.error). However, it does not display debug or trace messages. It shows all the other messages very well. Messages display fine on the React Native debugger, but not on Logcat.

Run by connecting a physical Android device to the computer and running the command. Unfortunately, the client cannot run an emulator (incompatible CPU) and cannot run from source, so it cannot use the built-in debugger of React Native.

Android Studio – Difference between using Run, Logcat and Debug

Tools window

When I test my app, I usually use the tab Run to see possible Log errors and impressions, but I understand that what should be used is Logcat to see the application logs and there is another option which is to run the application with the button Debug.

My question is which of these tabs should I use to test my app and what is the use of each tab in case I have to use any of these pros and cons over the others.