1

When I plug my phone into my computer, I can see the logcat 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?

  • Based on on the Internet search result for HwAutofillHelper I would assume that this class exists only on Huawei devices (all references were related to Huawei devices). As the log entry can be produced by multiple apps, I would assume that it is a system framework that is active in every app. Would be interesting to see the code of this class... – Robert Jul 8 at 12:50
2

Logcat can show the process ID (PID) that outputs the log message.

  • For command-line: adb logcat will use threadtime by default, which shows the PID
  • For Android Studio:
    1. Open the Logcat window
    2. From the toolbar (on the left-side), click the Logcat Header (cogwheel) button
      • If the toolbar is not shown, click the Show Options Menu (cogwheel) button on the top-right corner, then choose Show Toolbar
    3. On Configure Logcat Header dialog, check Show process and thread IDs, then press OK

By default, logcat will show the log in the following format:

date time PID-TID/package priority/tag: message

With the PID, it is possible to identify the source with ps command with -p flag to pinpoint the source, i.e. adb shell ps -p [PID]. The command will show the package name or the executable name.


Example

The logcat returned the following message

2020-07-08 22:06:16.002 18510-18510/? I/ScreenEventHandler: Received Broadcast ACTION_SCREEN_ON

The PID is 18510.

Calling adb shell ps -p 18510 returned the following

USER      PID   PPID  VSIZE   RSS   WCHAN            PC  NAME
u0_a107   18510 15708 1006092 44320 sys_epoll_ 00000000 S com.asksven.betterbatterystats

Thus, the message was written by com.asksven.betterbatterystats (BetterBatteryStats)

| improve this answer | |
  • 2
    Further idea: getting the APK and browsing/reverse-engineering it to pinpoint the class name and the exact line in the code. – Andrew T. Jul 8 at 15:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.