logcat

Filter output of adb logcat based on thread id

早过忘川 提交于 2019-11-29 23:52:56
问题 I am using adb logcat -v threadtime to get the output in a format that includes time and thread id. I was wondering if there is a way to filter output based on the thread id (tid). I want to get output from certain threads only, now i can get the thread id but not the filtered output. Thanks 回答1: adb logcat -v threadtime | grep 123yourthreadid456 来源: https://stackoverflow.com/questions/7576579/filter-output-of-adb-logcat-based-on-thread-id

Android logcat: Send log entries from device using email

家住魔仙堡 提交于 2019-11-29 23:25:42
Scenario I have released a beta version of an Android app to a few friends. Now, I would like to fix some bugs that came up during the test period. I have set a third-party crash reports utility, so I can easily handle app crashes. However, there are some erroneous behaviours which are not causing crashes. In these cases, I would like to inspect the app logs and see what went wrong. Is there a way for the app to send its logcat entries via email? Clarifications There are many logging apps ( android-log-collector , Log Viewer (logcat) ) which can inspect and show logcat entries. However, these

modifying .smali files

拈花ヽ惹草 提交于 2019-11-29 22:38:13
I reverse engineered some android apks to add some instrumentation for functional testing. I want to know given an smali as following how can I add something like Log.e(TAG, "some descritpion", e); to each method in the .smali files. .class public Ld; .super Landroid/view/View; .source "SourceFile" # instance fields .field a:Z .field b:Lcom/rovio/ka3d/App; # direct methods .method public constructor <init>(Lcom/rovio/ka3d/App;)V .locals 2 .parameter .prologue const/4 v1, 0x1 .line 317 invoke-direct {p0, p1}, Landroid/view/View;-><init>(Landroid/content/Context;)V .line 313 const/4 v0, 0x0 iput

How to run logcat on multiple devices?

余生长醉 提交于 2019-11-29 22:11:35
How can I run logcat on multiple devices at the same time? "adb logcat" command gives an error: error: more than one device and emulator levis501 Use the -s option of adb : adb -s <serialnumber> Example C:\Users\lel>adb devices List of devices attached 192.168.198.101:5555 device 0123456789ABCDEF device adb -s 0123456789ABCDEF logcat adb -s 192.168.198.101:5555 logcat You can combine grep whit this, to get all lines that contain it. an example is with System.out Example: adb -s 192.168.198.101:5555 logcat | grep "System.out" I thought it might be useful. I have this script that helps me a lot.

How can I erase the old data from logcat?

妖精的绣舞 提交于 2019-11-29 21:16:37
When I execute the command adb logcat while running the android emulator, all of the old logs blow past and so I figure they are stored in a file somewhere. Is there a command I can run to clear the logs and start fresh? If not, is there some other way to do this? Pentium10 Have you tried this? adb logcat -c https://developer.android.com/studio/command-line/logcat.html adb logcat -c didn't do it for me adb logcat -b all -c worked Dup of How to empty (clear) the logcat buffer in Android The following command will clear only non-rooted buffers (main, system ..etc). adb logcat -c If you want to

The application has stopped unexpectedly: How to Debug?

强颜欢笑 提交于 2019-11-29 21:00:31
Please note, unlike many other questions having the subject title "application has stopped unexpectedly", I am not asking for troubleshooting a particular problem. Rather, I am asking for an outline of the best strategy for an Android/Eclipse/Java rookie to tackle this formidable task of digesting huge amounts of information in order to develop (and debug!) a simple Android application. In my case, I took the sample skeleton app from the SDK, modified it slightly and what did I get the moment I try to run it? The application (process.com.example.android.skeletonapp) has stopped unexpectedly.

understanding logcat output when written to file

自闭症网瘾萝莉.ら 提交于 2019-11-29 18:02:06
I have a log cat which is outputted to a text file but can't find anything on what each part means. For example, I have the following: W/Trace ( 857): Unexpected value from nativeGetEnabledTags: 0 E/ActivityThread( 565): Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d35408 that was originally bound here E/ActivityThread( 565): android.app.ServiceConnectionLeaked: Service com.android.exchange.ExchangeService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@40d35408

Unfortunately, (app) has stopped - error message in AVD/Eclipse on a new/default application

六月ゝ 毕业季﹏ 提交于 2019-11-29 17:28:45
I recently installed the ADT/Eclipse bundle on Windows 7 (64 bit). Whenever I try to run an application on the emulator it just says "Unfortunately, app has stopped". I've searched this error and read through loads of fixes on this site and others, but all of them seemed to be having trouble with a particular bit of code. This error is happening without me making any changes to the code. I've tried it with multiple projects, with different minimum and target SDKs, to get the same result. Here is my logcat log of the problem. 07-09 11:24:44.100: D/AndroidRuntime(832): Shutting down VM 07-09 11

Android unable to run logcat from application

家住魔仙堡 提交于 2019-11-29 16:53:11
So I am writing a profiler that needs to be able to log exceptions during the profiling session. My plan was to use logcat to dump to a file either on the SD card or the internal storage and then when the profiling session was complete, zipping the file up and sending it up to the server. I added the android.permission.READ_LOGS in my manifest, and my code is as follows: public void startLoggingExceptions() { String filename = null; String directory = null; String fullPath = null; String externalStorageState = null; // The directory will depend on if we have external storage available to us or

Accessing LogCat from Android via Python

∥☆過路亽.° 提交于 2019-11-29 15:01:52
问题 Is it possible to read information being sent over LogCat in python? I have a program that is written in java. Every draw frame it sends tag:"Fps: " message: number I would like this message to fire an event that I can catch in my python script so I can draw a fps-meter. 回答1: Take a look at subprocess. The following code was adapted from Stefaan Lippens import Queue import subprocess import threading class AsynchronousFileReader(threading.Thread): ''' Helper class to implement asynchronous