Huawei, logcat not showing the log for my app?

The question:

OK, logcat is showing system logs but it is not showing application log on my Huawei Ascend. If I switch to another device such as my Galaxy Nexus or Nexus 7 then for the same app (same APK even) log is displayed.

The Huawei Ascend is running Android 4.1.1, it has USB debugging switched on in developer options. This occurs for logcat run from either the command line or from IntelliJ. And I’m making sure that the correct device is selected – in fact I’m only plugging a single device in at a time. I’ve tried restarting adb, clearing it’s buffer etc

I can see that the app is starting on the Huawei, I even get system logs showing that the Activity has started. But unlike on the other devices I get no app log in the Activity#onCreate (or from anywhere else).

08-08 20:55:44.050: INFO/WindowManager(431): Switching to real app window: Window{41ae8780 paused=false}
08-08 20:55:44.180: INFO/ActivityManager(431): Displayed +387ms

How can the application log not be getting delivered?

The Solutions:

Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.

Method 1

OK, since I had another Huawei Ascend I ran into the same problem. This time I have the exact answer. Follow these instructions (from denispyr’s answer on Why doesn’t logcat show anything in my Android?)



and you will see a hidden menu. Go to the Project Menu > Background Setting > Log setting and define the log availability (log switch) and level (log level setting).

And then make sure you restart your phone.

Please note this probably only applies to Huawei phones.

Also note that if you’re on a Huawei tablet (e.g. MediaPad M3), instead of dialing, you launch the Huawei Calculator in landscape and enter ()()2846579()().

Method 2

For Huawei with Android 8.0+

we must dial the code: *#*#2846579#*#*

and selecting the option AP Log will be enough to display the messages in the LogCat.

Huawei, logcat not showing the log for my app?

Method 3

If any one having Letv Phone (LeEco Le Max 2 or 1) above solution won’t work. Try the below USSD. Fig.1 for reference.

Press Dialer *#*#76937#*#*

Select “Enable All Logs”


Method 4

I gave up.

Log.d(TAG, msg);

Try this., msg);

work for me.

Method 5

I have a HUAWEI Y3 II aka LUA-L21.

The accepted answer didn’t work for me.
It led to some MTKLogger settings screen, which is different than described in the answer, and didn’t help at all.

My solution

  1. Dial *#*#2846580#*#* (please note this code is different from the one in the accepted answer)
  2. You just entered a settings screen called EngineerMode (again, different from accepted answer’s ProjectMenu)
  3. In the first Telephony tab, click the Log Control item
  4. Activate both switches (set Mtklog control to catch all log and adb radio log to catch radio log by adb)
  5. Back in the previous screen, swipe to the Log and Debugging tab
  6. Open Debug Utils
  7. Change Debug Level from User Mode to Engineer Mode
  8. For good measure, restart your phone


Changing Log control

Huawei, logcat not showing the log for my app?
Huawei, logcat not showing the log for my app?

Changing Debug utils

Huawei, logcat not showing the log for my app?
Huawei, logcat not showing the log for my app?

Additional notes

Just to clarify my original problem; logcat was showing some of my app’s log entries, just not my own messages – I saw entries belonging to my process com.example.myapp, but never anything I was printing out myself, in my code, using Log.d("TAG", "hello world");

There was plenty of stuff like this:

4260-4270/com.example.myapp I/art: Debugger is no longer active
4260-4412/com.example.myapp I/System.out: [CDS]rx timeout:1
4260-4412/com.example.myapp D/NativeCrypto: doing handshake ++
4260-4603/com.example.myapp D/OpenGLRenderer: Flushing caches (mode 0)
4260-4603/com.example.myapp D/Surface:  Surface::disconnect(this=0xb85285d8,api=1)
4260-4260/com.example.myapp D/ActivityThread: ACT-STOP_ACTIVITY_HIDE handled : 0 / [email protected]

…but never anything like this:

4260-4603/com.example.myapp D/MainActivity: hello from onCreate!

The above steps solved the issue for me.

Method 6

Some newer versions of Huawei Phones (I am using a Y9s 2019) have some settings changed.

Process is now

Dial *#*#2846579#*#*

Background Settings -> AP LOG Settings -> Open.

If you still can’t see the logs, restart both your phone and Android Studio/Eclipse

Method 7

Open your Dialer app and enter the following code: *#*#2846579#*#*.

    1-Enter the Background Settings page.
    2-Click on “Log Settings”
    3-Check all 3 options to enable full logging.
    4-Ignore the "will affect performance" warning.
    5-Reboot the phone.

Method 8

Try downloading a Logcat app(eg aLogCat) on your device itself and see if you are having the same problem.
I know its not a complete solution, but this way you may be able to figure out whats going wrong by reading the application logs.

Method 9

Try this:

In Eclipse editor:

Reset adb from windows–>devices and then try again …

please check your project is highlighted with green color (simply select your projrct name)

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Comment