I think this one is definitely needed for this forum. So posting this here.
Here's how to use logcat:
There are two main ways to do a logcat, within android, and through adb.
Logcat within android can be done one of two ways, through a Logcat app:
Here are two good examples are either: aLogcat or Catlog
I prefer catlog, because in my opinion it has a little bit nicer UI. Both of these programs can dump their logs to a txt file, which is very useful for debugging. Or, you can do it in terminal emulator (same rules as running through adb(see below))
From Moscow Desire:
On the other hand, using adb to run logcat, in my opinion is much more useful, because you can start using it when android boots (i.e. once the boot animation appears.)
The code for logcat to output to a file is
Code:
adb logcat > name of problem.txt
you can also do
Code:
adb logcat -f name of problem.txt
how I prefer to do it is this way:
Code:
adb logcat -v long > name of problem.txt
with the -v flag & the long argument, it changes output to long style, which means every line of logcat will be on its own line (makes it a little neater, imo)
Note: When outputting to a file, you will see a newline, but nothing printed, this is normal. To stop logcat from writting to a file, you need to press ctrl+c.
Here's where using logcat (via adb makes life really easy)
Lets say you find a problem you're having after looking at a logcat.
For example:
When I was trying to use a different ramdisk, wifi wouldn't work so I got a logcat that's almost 1300 lines long (a lot of stuff happens in the background)
So if you are searching for an error in the logcat file (it's always e/ for error, f/ for fatal. Those are the two main things that will break a system.)
Code:
D/dalvikvm( 871): GC_CONCURRENT freed 472K, 6% free 10224K/10823K, paused 1ms+6ms
V/AmazonAppstore.DiskInspectorServiceImpl( 871): Available blocks: 21981, Block size: 4096, Free: 90034176, Threshold: 5242880, withinThreshold? true
D/AmazonAppstore.UpdateService( 871): Received action: null from intent: Intent { cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService }
W/AmazonAppstore.UpdateService( 871): Confused about why I'm running with this intent action: null from intent: Intent { cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService }
D/dalvikvm( 890): GC_CONCURRENT freed 175K, 4% free 9375K/9671K, paused 2ms+3ms
V/AmazonAppstore.ReferenceCounter( 871): Reference (MASLoggerDB) count has gone to 0. Closing referenced object.
E/WifiStateMachine( 203): Failed to reload STA firmware java.lang.IllegalStateException: Error communicating to native daemon
V/AmazonAppstore.UpdateService( 871): runUpdateCommand doInBackground started.
V/AmazonAppstore.UpdateService( 871): Running UpdateCommand: digitalLocker
V/AmazonAppstore.UpdateCommand( 871): Not updating key: digitalLocker from: 1334228488057
V/AmazonAppstore.UpdateService( 871): Finished UpdateCommand: digitalLocker
V/AmazonAppstore.UpdateService( 871): Running UpdateCommand: serviceConfig
V/AmazonAppstore.MASLoggerDB( 871): performLogMetric: Metric logged: ResponseTimeMetric [fullName=com.amazon.venezia.VeneziaApplication_onCreate, build=release-2.3, date=Wed Apr 11 13:10:55 CDT 2012, count=1, value=1601.0]
V/AmazonAppstore.MASLoggerDB( 871): onBackgroundTaskSucceeded: Metric logged: ResponseTimeMetric [fullName=com.amazon.venezia.VeneziaApplication_onCreate, build=release-2.3, date=Wed Apr 11 13:10:55 CDT 2012, count=1, value=1601.0]
W/CommandListener( 118): Failed to retrieve HW addr for eth0 (No such device)
D/CommandListener( 118): Setting iface cfg
D/NetworkManagementService( 203): rsp
D/NetworkManagementService( 203): flags
E/WifiStateMachine( 203): Unable to change interface settings: java.lang.IllegalStateException: Unable to communicate with native daemon to interface setcfg - com.android.server.NativeDaemonConnectorException: Cmd {interface setcfg eth0 0.0.0.0 0 [down]} failed with code 400 : {Failed to set address (No such device)}
W/PackageParser( 203): Unknown element under : supports-screen at /mnt/asec/com.android.aldiko-1/pkg.apk Binary XML file line #16
D/wpa_supplicant( 930): wpa_supplicant v0.8.x
D/wpa_supplicant( 930): random: Trying to read entropy from /dev/random
D/wpa_supplicant( 930): Initializing interface 'eth0' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
D/wpa_supplicant( 930): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 930): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 930): ctrl_interface='eth0'
D/wpa_supplicant( 930): update_config=1
D/wpa_supplicant( 930): Line: 4 - start of a new network block
D/wpa_supplicant( 930): key_mgmt: 0x4
(mind you, that's 29 lines out of 1300ish, just for example)
I then could do the following with logcat:
Code:
adb logcat WifiStateMachine:E *:S -v long > name of problem.txt
and this will only print out any errors associated with WifiStateMachine, and anything which is fatal, which makes it about a million times easier to figure out what's going on!
In WifiStateMachine:E, the :E = to look for Errors, the full list of options is as follows:
V — Verbose (lowest priority)
D — Debug
I — Info (default priority)
W — Warning
E — Error
F — Fatal
S — Silent (highest priority, on which nothing is ever printed)
You can replace the :E with any other letter from above to get more info.
In order to filter out anything other than what you are looking for (in this case, WifiStateMachine) you must put a *:S after your last command (i.e. WifiStateMachine:E ThemeChoose:V ... ... AndroidRuntime:E *:S)
Sources: http://developer.android.com/tools/help/logcat.html
http://developer.android.com/tools/help/adb.html
Update for windows users:
Thank go to FuzzyMeep Two, Here's what he's posted for windows
(If you used his tool, here's his post, thank him for his work!)
Note : I am just sharing. Original post here.
Don't be a noob. Be a newbie..!!
Details here.
Great Guide! Should become a sticky.
You know,today morning you said you were not an expert with logcats.I see this thread and i am awestruck,but then i read the second last line :|
Prawesome said:
You know,today morning you said you were not an expert with logcats.I see this thread and i am awestruck,but then i read the second last line :|
Click to expand...
Click to collapse
I said i am no expert. That doesn't mean i cannot take, read or understand logcat..!!
Don't be a noob. Be a newbie..!!
Details here.
This thread is perfect to be a sticky in the Android Development Section.
Newcommers should know how to properly report bugs. I also leave a redirect in the Original Android Development.
I rather use ddms for all
Command prompt is the most basic thing same old Windows
Sent from my GT-P7300 using xda app-developers app
helped me out. Thanks
Fro "noobs" it will be easier to use qtadb https://qtadb.wordpress.com/download/ , just download, install and run. Nice GUI for adb, contains access to logcat too.
Fro "noobs" it will be easier to use qtadb https://qtadb.wordpress.com/download/ , just download, install and run. Nice GUI for adb, contains access to logcat too.
Click to expand...
Click to collapse
And it colours out errors according to their priority
I am a potato, problem?
Thanks bro
Sent from my GT-S5830 using Tapatalk 2
Extremely useful,
thank you!
However, catlog force closes when I added it as system app.
How can i get application specific logcat like i want to get logcat of systemui only
Really helpful!
Aman
Wysłane z mojego GT-I8190 przy użyciu Tapatalka
Thanks Sir...its helped me a lot..about understanding logcat
---------- Post added at 07:17 AM ---------- Previous post was at 07:12 AM ----------
Thanks Sir...its helped me a lot..about understanding logcat
Related
Is it possible to emulate an android ROM on a computer?
If you grab the SDK, you can run any version of Android in the emulator. If you want to run an actual ROM you will need to create an image of /system (as system.img) and replace that with those in the SDK folder.
thanks alot! that helped me alot
and yes, i want to run an actual ROM. what filesystem does it have to be?
was thinking about something like...
(cd PATH)
dd if=/dev/zero of=system bs=1024 count=#KB_needed
losetup /dev/loop0 system
mkfs -f FS /dev/loop0
(mkdir /mnt/system)
mount /dev/loop0 /mnt/system/
cp -a system /mnt/system/
umount /mnt/system/
losetup -d /dev/loop0
do you know any good tools for this exept for dd?
Never tried so I honestly don't know, you sound like you know a lot more than me about creating/mounting images than me, so it's probably best to use your judement. The easiest way is just to make a nadroid back backup, flash the ROM you want to test, nadroid that and grab system.img, revert to your old nandroid backup. It's tedious, and it doesn't help if you want to test a ROM before flashing, but that's the only method I've heard people use.
okay. thanks
HTC Sense UI system.img
Does anybody know where I can download a system.img for a HTC with Sense UI (Hero for example)? I have been looking for ages with no luck.
My app is not working on a customers Hero and I am trying to find a Hero system.img to run in the emulator so I can work out why it fails on this phone.
I dont own a Hero, so am unable to extract my own system.img.
You can get HTC official ROMs here:
http://forum.xda-developers.com/showthread.php?t=559622
if you've got a windows computer you probably could extract the content of this exe file and then try to follow my previous instructions to make the system.img.
And if you don't have an unix/linux box.. You could send the content of the exe file to me, if you are able to extract the data in it. (I'm in China with a netbook atm and not able to extract the exe file with my limited tools). Then I could try to make you a system.img
I tried that, but without an HTC phone connected to the PC USB the exe wont extract.
I take that back. I found the files in my temp folder. I have extracted ROM.zip including the system.img into the avd folder, but the emulator is failing to bring it up.
could you upload that zip file here or on rapidshare? then i could have a look at it
Here is the rom.zip file from RUU_Hero_HTC_WWE_2.73.405.38_WWE_release_signed_NoDriver.exe:
rom.zip
Other people must be doing this kindof thing to test their apps?
Here is the logcat. It looks like the sytem process is starting to come up, then fails. This repeats over and over.
12-16 18:34:20.945: INFO/SystemServer(113): Starting telephony registry
12-16 18:34:20.975: INFO/SystemServer(113): Starting Package Manager.
12-16 18:34:21.056: INFO/Installer(113): connecting...
12-16 18:34:21.075: INFO/installd(33): new connection
12-16 18:34:21.205: INFO/PackageManager(113): Got library com.google.android.maps in /system/framework/com.google.android.maps.jar
12-16 18:34:21.225: INFO/PackageManager(113): Got library com.google.android.gtalkservice in /system/framework/com.google.android.gtalkservice.jar
12-16 18:34:21.265: INFO/PackageManager(113): Got library com.htc.framework in /system/framework/com.htc.framework.jar
12-16 18:34:21.515: INFO/PackageManager(113): Got library android.awt in /system/framework/android.awt.jar
12-16 18:34:21.535: INFO/PackageManager(113): Got library android.test.runner in /system/framework/android.test.runner.jar
12-16 18:34:21.535: INFO/PackageManager(113): Got library com.android.im.plugin in /system/framework/com.android.im.plugin.jar
12-16 18:34:21.545: INFO/PackageManager(113): Got library com.htc.android.pimlib in /system/framework/com.htc.android.pimlib.jar
12-16 18:34:21.565: INFO/PackageManager(113): Got library com.htc.android.easopen in /system/framework/com.htc.android.easopen.jar
12-16 18:34:21.565: INFO/PackageManager(113): Got library com.scalado.util.ScaladoUtil in /system/framework/com.scalado.util.ScaladoUtil.jar
12-16 18:34:22.596: DEBUG/dalvikvm(113): GC freed 4273 objects / 216216 bytes in 302ms
12-16 18:34:23.476: ERROR/PackageManager(113): Adding duplicate shared user, keeping first: android.uid.shared
12-16 18:34:23.526: ERROR/PackageManager(113): Occurred while parsing settings at line -1, column -1
12-16 18:34:23.546: ERROR/PackageManager(113): Adding duplicate shared user, keeping first: com.htc.rosie.uid.shared
12-16 18:34:23.596: ERROR/PackageManager(113): Occurred while parsing settings at line -1, column -1
12-16 18:34:23.746: ERROR/PackageManager(113): Bad package setting: package com.android.providers.contacts has shared uid 10008 that is not defined
12-16 18:34:23.746: ERROR/PackageManager(113): Bad package setting: package com.android.launcher has shared uid 10008 that is not defined
12-16 18:34:23.756: ERROR/PackageManager(113): Bad package setting: package com.android.googlesearch has shared uid 10008 that is not defined
12-16 18:34:23.766: ERROR/PackageManager(113): Bad package setting: package com.android.inputmethod.latin has shared uid 10008 that is not defined
12-16 18:34:23.786: ERROR/PackageManager(113): Bad package setting: package com.htc.MusicWidget has shared uid 10047 that is not defined
12-16 18:34:23.816: ERROR/PackageManager(113): Bad package setting: package com.android.contacts has shared uid 10008 that is not defined
12-16 18:34:23.836: ERROR/PackageManager(113): Bad package setting: package com.android.providers.userdictionary has shared uid 10008 that is not defined
12-16 18:34:23.846: ERROR/PackageManager(113): Bad package setting: package com.android.providers.im has shared uid 10008 that is not defined
12-16 18:34:23.896: INFO/dalvikvm(113): DexOpt: Some deps went away
12-16 18:34:23.926: ERROR/dalvikvm(113): /system/framework/com.scalado.util.ScaladoUtil.jar odex has stale dependencies
12-16 18:34:23.926: ERROR/dalvikvm(113): odex source not available -- failing
12-16 18:34:23.926: WARN/dalvikvm(113): threadid=15: thread exiting with uncaught exception (group=0x40013140)
12-16 18:34:23.936: ERROR/AndroidRuntime(113): Uncaught handler: thread android.server.ServerThread exiting due to uncaught exception
12-16 18:34:23.956: ERROR/AndroidRuntime(113): *** EXCEPTION IN SYSTEM PROCESS. System will crash.
12-16 18:34:23.966: ERROR/AndroidRuntime(113): dalvik.system.StaleDexCacheError: /system/framework/com.scalado.util.ScaladoUtil.jar
12-16 18:34:23.966: ERROR/AndroidRuntime(113): at dalvik.system.DexFile.isDexOptNeeded(Native Method)
12-16 18:34:23.966: ERROR/AndroidRuntime(113): at com.android.server.PackageManagerService.<init>(PackageManagerService.java:419)
12-16 18:34:23.966: ERROR/AndroidRuntime(113): at com.android.server.PackageManagerService.main(PackageManagerService.java:261)
12-16 18:34:23.966: ERROR/AndroidRuntime(113): at com.android.server.ServerThread.run(SystemServer.java:126)
12-16 18:34:24.006: ERROR/AndroidRuntime(113): Crash logging skipped, no checkin service
12-16 18:34:24.006: ERROR/AndroidRuntime(113): Crash logging skipped, no htc checkin service
12-16 18:34:24.036: INFO/Process(113): Sending signal. PID: 113 SIG: 9
12-16 18:34:24.066: INFO/Zygote(102): Exit zygote because system server (113) has terminated
12-16 18:34:24.086: INFO/ServiceManager(26): service 'usagestats' died
12-16 18:34:24.086: INFO/ServiceManager(26): service 'SurfaceFlinger' died
12-16 18:34:24.086: INFO/ServiceManager(26): service 'power' died
12-16 18:34:24.086: INFO/ServiceManager(26): service 'batteryinfo' died
12-16 18:34:24.086: INFO/ServiceManager(26): service 'telephony.registry' died
12-16 18:34:24.106: ERROR/installd(33): eof
12-16 18:34:24.106: ERROR/installd(33): failed to read size
12-16 18:34:24.106: INFO/installd(33): closing connection
12-16 18:34:24.146: INFO/ServiceManager(26): service 'media.audio_flinger' died
12-16 18:34:24.146: INFO/ServiceManager(26): service 'media.player' died
12-16 18:34:24.146: INFO/ServiceManager(26): service 'media.camera' died
12-16 18:34:25.096: DEBUG/AndroidRuntime(130): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
12-16 18:34:25.116: DEBUG/AndroidRuntime(130): CheckJNI is ON
12-16 18:34:25.686: DEBUG/AndroidRuntime(130): --- registering native functions ---
12-16 18:34:25.956: INFO/(129): ServiceManager: 0xac38
12-16 18:34:25.956: DEBUG/AudioHardwareInterface(129): Running in emulation - using generic audio driver
12-16 18:34:25.956: INFO/AudioFlinger(129): Create BTIPSA2dpInterface
12-16 18:34:25.966: DEBUG/BTIPSA2dpInterface(129): BTIPSA2dpInterface 1.0.0.0.
12-16 18:34:25.966: DEBUG/BTIPSA2dpInterface(129): BTIPSA2dpInterface:penOutputStream 1, 0, 0
12-16 18:34:25.966: INFO/(129): Creating ashmem region names /data/btips/btips_mm_shm size 20480
12-16 18:34:25.966: INFO/AudioFlinger(129): AudioFlinger's thread ready to run for output 0
12-16 18:34:25.986: DEBUG/BTIPSA2dpInterface(129): BTIPSA2dpStreamOut::set 1, 0, 0
12-16 18:34:25.986: DEBUG/AudioFlinger(129): setRouting 0 2 -1, tid 129, calling tid 129
12-16 18:34:25.986: DEBUG/AudioFlinger(129): setRouting 1 2 -1, tid 129, calling tid 129
12-16 18:34:25.986: DEBUG/AudioFlinger(129): setRouting 2 1 -1, tid 129, calling tid 129
12-16 18:34:25.986: DEBUG/AudioFlinger(129): setMode to mode 0
12-16 18:34:25.996: INFO/AudioFlinger(129): AudioFlinger's thread ready to run for output 1
12-16 18:34:26.006: INFO/CameraService(129): CameraService started: pid=129
12-16 18:34:26.086: DEBUG/(130): ======================== register_android_graphics_Canvas, g_haveProfilerFile=0
12-16 18:34:26.476: INFO/Zygote(130): Preloading classes...
12-16 18:34:26.486: DEBUG/dalvikvm(130): GC freed 786 objects / 43096 bytes in 9ms
12-16 18:34:26.746: DEBUG/dalvikvm(130): GC freed 275 objects / 17264 bytes in 6ms
12-16 18:34:26.956: DEBUG/dalvikvm(130): GC freed 200 objects / 12200 bytes in 8ms
12-16 18:34:27.096: DEBUG/dalvikvm(130): Trying to load lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.346: DEBUG/dalvikvm(130): Added shared lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.356: DEBUG/dalvikvm(130): Trying to load lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.356: DEBUG/dalvikvm(130): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0
12-16 18:34:27.366: DEBUG/dalvikvm(130): Trying to load lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.366: DEBUG/dalvikvm(130): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0
12-16 18:34:27.386: DEBUG/dalvikvm(130): Trying to load lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.386: DEBUG/dalvikvm(130): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0
12-16 18:34:27.396: DEBUG/dalvikvm(130): Trying to load lib /system/lib/libmedia_jni.so 0x0
12-16 18:34:27.396: DEBUG/dalvikvm(130): Shared lib '/system/lib/libmedia_jni.so' already loaded in same CL 0x0
12-16 18:34:27.426: DEBUG/dalvikvm(130): GC freed 467 objects / 29272 bytes in 10ms
Click to expand...
Click to collapse
Anybody?
Someone must have emulated HTC Touch / Sense UI?!
Okay... After unzipping and manipulating a 2.1 ROM to my liking; I have now resigned it...
Can someone please explain to me how I would go about testing it with the Android SDK Emulator?
I have already created a 2.1 AVD and the emulator loads to the "ANDROID" screen...
What must I do to test out this newly packaged ROM file?
I was working on an app and after I uploaded a *.ttf to the assets folder I went to run my app in the android emulator. It uploaded okay but during installation I got
[2011-08-03 14:36:37 - katastroapp] Installing katastroapp.apk...
[2011-08-03 14:36:40 - katastroapp] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
[2011-08-03 14:36:40 - katastroapp] Please check logcat output for more details.
[2011-08-03 14:36:41 - katastroapp] Launch canceled!
Here is my logcat
08-03 21:34:12.316: DEBUG/SntpClient(59): request time failed: java.net.SocketException: Address family not supported by protocol
08-03 21:36:37.893: DEBUG/AndroidRuntime(395): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
08-03 21:36:37.893: DEBUG/AndroidRuntime(395): CheckJNI is ON
08-03 21:36:38.183: DEBUG/AndroidRuntime(395): --- registering native functions ---
08-03 21:36:39.613: DEBUG/dalvikvm(247): GC_EXPLICIT freed 158 objects / 7584 bytes in 80ms
08-03 21:36:39.793: DEBUG/dalvikvm(59): GC_EXPLICIT freed 1624 objects / 73120 bytes in 145ms
08-03 21:36:39.904: DEBUG/AndroidRuntime(395): Shutting down VM
08-03 21:36:39.904: DEBUG/dalvikvm(395): Debugger has detached; object registry had 1 entries
08-03 21:36:39.943: INFO/AndroidRuntime(395): NOTE: attach of thread 'Binder Thread #3' failed
08-03 21:39:12.383: DEBUG/SntpClient(59): request time failed: java.net.SocketException: Address family not supported by protocol
If anyone knows whats up with that I would be greatly helped.
I figured it out, I just didnt give my emulator enough memory. stupid easy fix.
AIO LOGCAT MANAGER
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Since android development and logcat is essential part to track problems and errors..
The three most important log types are:
logcat: the log output of the Android system
radio logcat: the log output of your System / BB / RIL communication
kernel log (kmsg / dmesg): the kernel messages
Additionally there's the last_kmsg which is a dump of the kernel log until the last shutdown.
The tool I made will make you able to do all of these in very friendly interface, and even you could do more,, So let's see how it is
How to use:
It is simple, just run AIO_Logcat_Manager.bat file.. I will explain every feature in next heading.
Walkthrough Features:
Splash screen:
The main screen:
In this main menu, you can choose the type of logcat you want,, All, Error, Fatal, Radio, Kernel... etc
Process logcat filtered by name menu (Option 9):
This is unique in my tool, where you can filter your result logcat for specific process name..
Example: assume you get this logcat
Code:
D/dalvikvm( 871): GC_CONCURRENT freed 472K, 6% free 10224K/10823K, paused 1ms+6ms
V/AmazonAppstore.DiskInspectorServiceImpl( 871): Available blocks: 21981, Block size: 4096, Free: 90034176, Threshold: 5242880, withinThreshold? true
D/AmazonAppstore.UpdateService( 871): Received action: null from intent: Intent { cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService }
W/AmazonAppstore.UpdateService( 871): Confused about why I'm running with this intent action: null from intent: Intent { cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService }
D/dalvikvm( 890): GC_CONCURRENT freed 175K, 4% free 9375K/9671K, paused 2ms+3ms
V/AmazonAppstore.ReferenceCounter( 871): Reference (MASLoggerDB) count has gone to 0. Closing referenced object.
E/WifiStateMachine( 203): Failed to reload STA firmware java.lang.IllegalStateException: Error communicating to native daemon
V/AmazonAppstore.UpdateService( 871): runUpdateCommand doInBackground started.
V/AmazonAppstore.UpdateService( 871): Running UpdateCommand: digitalLocker
V/AmazonAppstore.UpdateCommand( 871): Not updating key: digitalLocker from: 1334228488057
V/AmazonAppstore.UpdateService( 871): Finished UpdateCommand: digitalLocker
V/AmazonAppstore.UpdateService( 871): Running UpdateCommand: serviceConfig
V/AmazonAppstore.MASLoggerDB( 871): performLogMetric: Metric logged: ResponseTimeMetric [fullName=com.amazon.venezia.VeneziaApplication_onCreate, build=release-2.3, date=Wed Apr 11 13:10:55 CDT 2012, count=1, value=1601.0]
V/AmazonAppstore.MASLoggerDB( 871): onBackgroundTaskSucceeded: Metric logged: ResponseTimeMetric [fullName=com.amazon.venezia.VeneziaApplication_onCreate, build=release-2.3, date=Wed Apr 11 13:10:55 CDT 2012, count=1, value=1601.0]
W/CommandListener( 118): Failed to retrieve HW addr for eth0 (No such device)
D/CommandListener( 118): Setting iface cfg
D/NetworkManagementService( 203): rsp
D/NetworkManagementService( 203): flags
E/MediaPlayerService( 203): Unable to change interface settings: java.lang.IllegalStateException: Unable to communicate with native daemon to interface setcfg - com.android.server.NativeDaemonConnectorException: Cmd {interface setcfg eth0 0.0.0.0 0 [down]} failed with code 400 : {Failed to set address (No such device)}
W/PackageParser( 203): Unknown element under : supports-screen at /mnt/asec/com.android.aldiko-1/pkg.apk Binary XML file line #16
D/wpa_supplicant( 930): wpa_supplicant v0.8.x
D/wpa_supplicant( 930): random: Trying to read entropy from /dev/random
D/wpa_supplicant( 930): Initializing interface 'eth0' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
D/wpa_supplicant( 930): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 930): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 930): ctrl_interface='eth0'
D/wpa_supplicant( 930): update_config=1
D/wpa_supplicant( 930): Line: 4 - start of a new network block
D/wpa_supplicant( 930): key_mgmt: 0x4
and you want to see MediaPlayerService process logcat only..!!
So here comes the useful feature of this tool, where you can filter the only process you are interested in..
Read Exported logcats (Option 10):
Here you can read all logcats you have exported to the output folder
Kernel logcats (Option 11):
This feature needs from the user to be rooted in order to access kernel logs..!!!
Here you have the ability either to read or to export different kernel log types..
Reading:
Exporting:
How to read your logcat:
Here is a useful thread written by @Stryke_the_Orc that will help you understanding your logcat files.
http://forum.xda-developers.com/showthread.php?t=2274119
Future ADB engine update:
If ADB engine is outdated, you can download android SDK from official website here and extract adb, AdbWinApi.dll and AdbWinUsbApi.dll from sdk\platform-tools folder and put in AIO_Logcat_Manager\tools folder.
Reporting bugs:
Please feel free reporting any bugs to help to polish upcoming releases :laugh:
Help in development:
If you are developer and you are interested in polishing this work, please go ahead since I KEPT IT OPEN SOURCE, so everyone can participate in development of this tool (just don't forget to give me some credits buddy )
Download:
AIO-Logcat-Manager_v1.0 @ 14/June/2013
Change-log:
@ 14/June/2013 (v1.0):
- The first release of AIO logcat manager.
Special Thanks to XDA Portal Team For Featuring This Utility:
http://www.xda-developers.com/android/simplify-logging-with-aio-logcat-manager/
Lol i love your thread
Inviato dal mio GT-I9070 con Tapatalk 2
KINGbabasula said:
Lol i love your thread
Inviato dal mio GT-I9070 con Tapatalk 2
Click to expand...
Click to collapse
Thank you for support
Very cool, I will be adding this tool to the OP of my thread:good::highfive:
dude, you are great.
this is the best logcat utility ever, especially the filter feature :good:
mike0jj said:
dude, you are great.
this is the best logcat utility ever, especially the filter feature :good:
Click to expand...
Click to collapse
Oh it is great that there is still somebody who cares about this project. I thought it was buried down inside xda archive
Thanks buddy and I hope I could hear some suggestion regarding the utility development.
cheers
majdinj said:
Oh it is great that there is still somebody who cares about this project. I thought it was buried down inside xda archive
Thanks buddy and I hope I could hear some suggestion regarding the utility development.
cheers
Click to expand...
Click to collapse
I push it anyone looking for a logcat tool running windows, it's a great tool. Nice job:thumbup::beer:
Slithering from the nether regions of a twisted mind and tarnished soul
good work man, a lot of people need to say thanks to you
Sabyn said:
good work man, a lot of people need to say thanks to you
Click to expand...
Click to collapse
Thanks man
Thanks for this man. Helpful to everyone! Maybe you could add an option in the future to read logcats already made from ADB. Just a thought if you don't already have it
If I may make a suggestion, it would be a great idea to possibly include something like logcat-color to make viewing of real-time logs a lot easier
Great tool by the way
N_otori0us_ said:
Thanks for this man. Helpful to everyone! Maybe you could add an option in the future to read logcats already made from ADB. Just a thought if you don't already have it
Click to expand...
Click to collapse
Thanks man, but this feature is already implemented in the tool :laugh:
CNexus said:
If I may make a suggestion, it would be a great idea to possibly include something like logcat-color to make viewing of real-time logs a lot easier
Great tool by the way
Click to expand...
Click to collapse
Yeah sure.. but java coding is different from cmd; however it is possible, but it will be very very long scripting if I am using cmd for that. May be I will try to learn some java coding later on, but not in the mean time..
Thanks for suggestion :good:
Thanks for sharing this
I added it to my FAQ Guides HERE and HERE
bigdaddy619 said:
Thanks for sharing this
I added it to my FAQ Guides HERE and HERE
Click to expand...
Click to collapse
wow.. thanks for sharing
you should add a little cat icon instead of the cmd one when running the program ^_^ Thanks for your work! :good:
I get this error: "Unable to open log device '/dev/log/main': No such file or directory" in the log file. Using ezaechiel TW ROM on a Galaxy Note 1. There's no file called 'main' in the folder '/dev/log/'
Any ideas?
Ok managed to get logcat to work, found '/system/etc/init.d/12cleaner' had
Code:
if [ -e /dev/log/main ]
then
rm -f /dev/log/main
Which I commented out and now it's working.
Hello buddy.
+1 to ur work but can u please tell me if I can took out the logcat from my rom while stuck at splash screen??
Sent from my A2 using xda app-developers app
qmobilea2 said:
Hello buddy.
+1 to ur work but can u please tell me if I can took out the logcat from my rom while stuck at splash screen??
Sent from my A2 using xda app-developers app
Click to expand...
Click to collapse
No, for the logcat to work, the system needs to at least start. You can probably grab a kernel log, but I don't think it will show you what you want.
Sent from my SPH-D710 using XDA Premium 4 mobile app
thx a lot for this logcat tool. now is much easyer for me to logcat my sense port
Here's how to use logcat:
There are two main ways to do a logcat, within android, and through adb.
Logcat within android can be done one of two ways, through a Logcat app:
Here are two good examples are either: aLogcat or Catlog
I prefer catlog, because in my opinion it has a little bit nicer UI. Both of these programs can dump their logs to a txt file, which is very useful for debugging. Or, you can do it in terminal emulator (same rules as running through adb(see below))
On the other hand, using adb to run logcat, in my opinion is much more useful, because you can start using it when android boots (i.e. once the boot animation appears.)
The code for logcat to output to a file is
Code:
adb logcat > name of problem.txt
you can also do
Code:
adb logcat -f name of problem.txt
how I prefer to do it is this way:
Code:
adb logcat -v long > name of problem.txt
with the -v flag & the long argument, it changes output to long style, which means every line of logcat will be on its own line (makes it a little neater, imo)
Note: When outputting to a file, you will see a newline, but nothing printed, this is normal. To stop logcat from writting to a file, you need to press ctrl+c.
Here's where using logcat (via adb makes life really easy)
Lets say you find a problem you're having after looking at a logcat.
For example:
When I was trying to use a different ramdisk, wifi wouldn't work so I got a logcat that's almost 1300 lines long (a lot of stuff happens in the background)
So if you are searching for an error in the logcat file (it's always e/ for error, f/ for fatal. Those are the two main things that will break a system.)
Code:
D/dalvikvm( 871): GC_CONCURRENT freed 472K, 6% free 10224K/10823K, paused 1ms+6ms
V/AmazonAppstore.DiskInspectorServiceImpl( 871): Available blocks: 21981, Block size: 4096, Free: 90034176, Threshold: 5242880, withinThreshold? true
D/AmazonAppstore.UpdateService( 871): Received action: null from intent: Intent { cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService }
W/AmazonAppstore.UpdateService( 871): Confused about why I'm running with this intent action: null from intent: Intent { cmp=com.amazon.venezia/com.amazon.mas.client.framework.UpdateService }
D/dalvikvm( 890): GC_CONCURRENT freed 175K, 4% free 9375K/9671K, paused 2ms+3ms
V/AmazonAppstore.ReferenceCounter( 871): Reference (MASLoggerDB) count has gone to 0. Closing referenced object.
E/WifiStateMachine( 203): Failed to reload STA firmware java.lang.IllegalStateException: Error communicating to native daemon
V/AmazonAppstore.UpdateService( 871): runUpdateCommand doInBackground started.
V/AmazonAppstore.UpdateService( 871): Running UpdateCommand: digitalLocker
V/AmazonAppstore.UpdateCommand( 871): Not updating key: digitalLocker from: 1334228488057
V/AmazonAppstore.UpdateService( 871): Finished UpdateCommand: digitalLocker
V/AmazonAppstore.UpdateService( 871): Running UpdateCommand: serviceConfig
V/AmazonAppstore.MASLoggerDB( 871): performLogMetric: Metric logged: ResponseTimeMetric [fullName=com.amazon.venezia.VeneziaApplication_onCreate, build=release-2.3, date=Wed Apr 11 13:10:55 CDT 2012, count=1, value=1601.0]
V/AmazonAppstore.MASLoggerDB( 871): onBackgroundTaskSucceeded: Metric logged: ResponseTimeMetric [fullName=com.amazon.venezia.VeneziaApplication_onCreate, build=release-2.3, date=Wed Apr 11 13:10:55 CDT 2012, count=1, value=1601.0]
W/CommandListener( 118): Failed to retrieve HW addr for eth0 (No such device)
D/CommandListener( 118): Setting iface cfg
D/NetworkManagementService( 203): rsp
D/NetworkManagementService( 203): flags
E/WifiStateMachine( 203): Unable to change interface settings: java.lang.IllegalStateException: Unable to communicate with native daemon to interface setcfg - com.android.server.NativeDaemonConnectorException: Cmd {interface setcfg eth0 0.0.0.0 0 [down]} failed with code 400 : {Failed to set address (No such device)}
W/PackageParser( 203): Unknown element under : supports-screen at /mnt/asec/com.android.aldiko-1/pkg.apk Binary XML file line #16
D/wpa_supplicant( 930): wpa_supplicant v0.8.x
D/wpa_supplicant( 930): random: Trying to read entropy from /dev/random
D/wpa_supplicant( 930): Initializing interface 'eth0' conf '/data/misc/wifi/wpa_supplicant.conf' driver 'wext' ctrl_interface 'N/A' bridge 'N/A'
D/wpa_supplicant( 930): Configuration file '/data/misc/wifi/wpa_supplicant.conf' -> '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 930): Reading configuration file '/data/misc/wifi/wpa_supplicant.conf'
D/wpa_supplicant( 930): ctrl_interface='eth0'
D/wpa_supplicant( 930): update_config=1
D/wpa_supplicant( 930): Line: 4 - start of a new network block
D/wpa_supplicant( 930): key_mgmt: 0x4
(mind you, that's 29 lines out of 1300ish, just for example)
I then could do the following with logcat:
Code:
adb logcat WifiStateMachine:E *:S -v long > name of problem.txt
and this will only print out any errors associated with WifiStateMachine, and anything which is fatal, which makes it about a million times easier to figure out what's going on!
In WifiStateMachine:E, the :E = to look for Errors, the full list of options is as follows:
V — Verbose (lowest priority)
D — Debug
I — Info (default priority)
W — Warning
E — Error
F — Fatal
S — Silent (highest priority, on which nothing is ever printed)
You can replace the :E with any other letter from above to get more info.
In order to filter out anything other than what you are looking for (in this case, WifiStateMachine) you must put a *:S after your last command (i.e. WifiStateMachine:E ThemeChoose:V ... ... AndroidRuntime:E *:S)
Sources: http://developer.android.com/tools/help/logcat.html
http://developer.android.com/tools/help/adb.html
Update for windows users:
Thank go to FuzzyMeep Two, Here's what he's posted for windows
(If you used his tool, here's his post, thank him for his work!)
This is a share.original thread
Hmmm.. I think all can see original guide in Android section...
There's no need of posting it again..
Anyway.. Thanks..
TheStrix said:
Hmmm.. I think all can see original guide in Android section...
There's no need of posting it again..
Anyway.. Thanks..
Click to expand...
Click to collapse
I think that it is good for moto E users, most of them are newbies, so they won't have to search a lot
What's the difference BTW logcat and androids inbuilt Bug report function
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Sent from my XT1033 using Tapatalk
jaspreet997 said:
What's the difference BTW logcat and androids inbuilt Bug report functionView attachment 2751421
Sent from my XT1033 using Tapatalk
Click to expand...
Click to collapse
Logcat gives you the messages of the system logs and you can submit them to a developer manually. Bug report is kinda an automatic thing that keeps track of your errors
EDIT:
The problem was that i was trying to read a line from the inputreader, when there was no line, so it was waiting for a response there...
Hello,
I am currently building an app to fix a little problem that exists on some devices with the wifi-mac and bluetooth addresses constantly changing (for me it's a N4 but I read somewhere that there are other devices with that problem too)
The thing the app should do is (steps taken from another xda thread: http://forum.xda-developers.com/showpost.php?p=43164157&postcount=1 )
- Mount /persist
- create the folders wifi and bluetooth
- create a text file in each of these directories containing the addresses that should be used in future
- fix the owners and permissions of these files and directories
- execute /system/bin/conn_init as su
The app is mostly done but somehow not working at all.
Everything from generating random adresses to saving them in a temporary file seems to work fine, but as soon as I try to mount the persist directory, the app stops to react.
At first, this was the first thing done by the SU Shell class that I wrote for executing su shell commands, so I thought that might be not working, but when I let that execute echo test it returns test just fine...
The code that is used could be expressed like that (this is missing some debug info and strings that get passed, but it should technically have the same result):
Code:
try {
shell = Runtime.getRuntime().exec("su");
outputStream = new DataOutputStream(shell.getOutputStream());
inputStream = new BufferedReader(new InputStreamReader(shell.getInputStream()));
outputStream.writeBytes("mount /dev/block/mmcblk0p20 /persist");
outputStream.flush();
} catch (IOException e) {
e.printStackTrace();
}
The attached zip file contains my main activity and the before mentioned su shell.
The complete source code of the app is available via my git server: http://greensserver.redirectme.net/greenchris/WiFi-MAC-and-Bluetooth-Adress-Fix.git
Does anybody have an idea why this isn't working?
Greetings
GreenChris
Edit:
I forgot to add the logcat...
Code:
04-09 23:33:21.289 3903-3903/com.janchristiangruenhage.macfixer I/art﹕ Late-enabling -Xcheck:jni
04-09 23:33:21.791 3903-3949/com.janchristiangruenhage.macfixer D/OpenGLRenderer﹕ Render dirty regions requested: true
04-09 23:33:21.797 3903-3903/com.janchristiangruenhage.macfixer D/Atlas﹕ Validating map...
04-09 23:33:21.951 3903-3949/com.janchristiangruenhage.macfixer I/Adreno-EGL﹕ : QUALCOMM Build: 10/28/14, c33033c, Ia6306ec328
04-09 23:33:21.953 3903-3949/com.janchristiangruenhage.macfixer I/OpenGLRenderer﹕ Initialized EGL, version 1.4
04-09 23:33:21.985 3903-3949/com.janchristiangruenhage.macfixer D/OpenGLRenderer﹕ Enabling debug mode 0
04-09 23:33:22.318 3903-3903/com.janchristiangruenhage.macfixer I/Timeline﹕ Timeline: Activity_idle id: [email protected] time:14543691
04-09 23:33:31.781 3903-3919/com.janchristiangruenhage.macfixer I/art﹕ Background sticky concurrent mark sweep GC freed 11333(680KB) AllocSpace objects, 3(44KB) LOS objects, 13% free, 4MB/5MB, paused 5.706ms total 39.550ms
04-09 23:33:31.843 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ address-bytes generated
04-09 23:33:43.923 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ save .bdaddr
04-09 23:33:43.925 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ address written: .bdaddr
04-09 23:33:43.954 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ su shell started
04-09 23:33:43.955 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ added outputstream
04-09 23:33:43.957 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ added inputstreamreader
04-09 23:33:43.957 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ echo test
04-09 23:33:43.973 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ test
04-09 23:33:43.974 3903-3903/com.janchristiangruenhage.macfixer D/macfixer﹕ mount /dev/block/mmcblk0p20 /persist