3

My new Android 4.0 device seems could not output Logcat messages.

I have an Android program that runs OK on an Android 2.2 device and could output Log.i messages in the Eclipse ADT Logcat window. However, when I run this same program in my new Android 4.0 device, I could only see messages with dalvikvm and OSFileSystem tag in the Eclipse ADT Logcat window, the Log.i messages from the program are missing.

I have followed this thread Why doesn't logcat show anything in my Android? and tried to change the file /sys/kernel/logger/log_main/enable in my Android 4.0 device. But I find that my Android 4.0 device has only the directory up to /sys/kernel. The files under /sys/kernel are :

-r--r--r-- root     root         4096 2012-05-03 13:17 uevent_seqnum
-rw-r--r-- root     root         4096 2012-05-03 13:17 uevent_helper
-rw-r--r-- root     root         4096 2012-05-03 13:17 profiling
drwxr-xr-x root     root              2012-05-03 13:17 ipv4
drwxr-xr-x root     root              2012-05-03 13:17 mm

I think the rom settings in my new Android 4.0 device may have blocked the Log.i messages from my program. Does anyone know how to turn on the Log.i messages for my device.

My Android 4.0 device is not rooted.

Thanks for any suggestion.

Community
  • 1
  • 1
user1129812
  • 2,859
  • 8
  • 32
  • 45
  • Do you see output from other files? Maybe you have your logcat filtered? Try running `adb logcat` from command prompt and see the logcat there (to exclude eclipse as a point of failure) – WarrenFaith May 03 '12 at 06:37
  • I have tried `adb logcat`. There are many outputs in the terminal. But there is no "Log.i" messages from the program. – user1129812 May 03 '12 at 07:14
  • Could you try to increase the log level by using `Log.e` instead? – WarrenFaith May 03 '12 at 07:19
  • I have replaced all "Log.i" with "Log.e". But the problem remains the same. – user1129812 May 03 '12 at 08:13
  • your device is connected and the only one running? No emulator running on the pc? If so I have no clue whats going on... – WarrenFaith May 03 '12 at 08:26
  • Yes, the 4.0 device is the only one connected to the PC with no emulator opened. My program runs OK on the 4.0 device, just no Logcat outputs from the "Log.x" statements. It may be due to the specific settings in my Android 4.0 device. My "ASK SP404" is not a branded smartphone. I just share the problem here hoping that someone has a solution for this 4.0 phone. – user1129812 May 03 '12 at 10:29
  • Have you set `android:debuggable="true"` in the AndroidManifest's application tag? – Alex Lockwood May 03 '12 at 06:36
  • After adding, the "application" element in "AndroidManifest.xml" becomes : ``, but there is still no "Log.i" messages from program. – user1129812 May 03 '12 at 07:10
  • If you are working with a real device, you will have to enable USB debugging on your phone/tablet as well. – Alex Lockwood May 03 '12 at 07:19
  • Yes, I check that I have already enabled USB debugging in my Android 4.0 phone. – user1129812 May 03 '12 at 07:57

0 Answers0