Samsung Galaxy s2 DSR is ON. Don't sent DTR ON - android

When I plug my device to my computer I keep getting the following error in the LogCat:
07-12 15:23:57.695: E/DataRouter(1820): DSR is ON. Don't send DTR ON.
07-12 15:23:59.700: E/DataRouter(1820): usb connection is true
My OS is 4.0.3 GT-19100T.
I have seen posts about it but no answer. does any1 knows how to stop these annoying messages in my LogCat?

You can selectively disable logs from appearing. For example in your case, you can do
adb logcat DataRouter:S
If you want to completely disable logs
adb logcat -s

This and a lot of others errors is a bug of firmware (or preinstalled application). You cannot do anything.
If you use Linux I suggest to use grep to filter this messages

If you want to see just your app's log messages, use '-s' to filter out everything else and then specify your app's tag along with the lowest level of logging you want:
adb logcat -s MyApp:V # show only MyApp, all logging levels
adb logcat -s MyApp:I # show only MyApp, logging levels 'info' and above
To see the available filter letters, use
adb logcat --help
They are (in order of precedence):
F fatal
E error
W warning
I info
D debug
V verbose
They correspond to using Log.d(...), Log.i(...), etc., in your app.

Related

Whitelist my App in logcat / chatty identical 1 line

Logcat is filtering my logs, so I get only:
1234-1234/com.example.test I/chatty: uid=45678(com.example.test) identical 1 line
This is a serious issue for me, I tried applying the solutions suggested in other threads like
adb logcat -P ""
I also read the documentation (logcat --help and the "-P" option at official documentation like adb logcat -P 45678), but this also didn't help.
adb logcat -p shows that I whitelisted my app:
adb logcat -p
45678 (the UID of my app)
Still the logs are getting filtered. How can I fix that? I simply want no log filtering on my app during development.
My fault. I checked in Android Studio where I had the log leve filter set to "Info". The chatty message is "info" level, my log messages were "verbose" level. Actually I am getting both, my app log messages and the chatty messages...
Make sure to test without Android Studio using logcat: adb logcat and see if you see your log message. If that works, something is selected wrong in Android Studio like it was for me and by me.

Stop Java Library from Sending Log Messages

I am using an open Source Library for my Android Application. However its developers did not remove all the Log statements before releasing it. This causes a lot of ruckus in LogCat.
Is there a way to turn the Log Messages from a specific Java library Off ?
You can Filter LogCat outputs by some specific Tag names , like (adb shell)
adb logcat -s "TAGNAME"

To get complete logs of 2 devices using adb

I am testing an app with 2 devices communicating using sockets and monitoring the timestamp values. I select the required device name from the DDMS perspective. But some initial logs are missing(as I have many Log.d statements in the code). I want to store the whole log file after I stop apps in both the phones. Can someone tell me how this can be done in command line using adb? I couldn't find any example for 2 devices.
Thanks
You can try with two console and get logcat separately for two devices
Get serial no for each devices using adb devices
and save logcat as text files
console 1: adb -s <device1serialNO> logcat -d > logcat1.txt
console 2: adb -s <device2serialNO> logcat -d > logcat2.txt
You can filter result for your given tag if needed
Before launching your application you can start the following command in your terminal:
adb logcat <your_application_log_tag>:V *:S > file.txt
<your_application_log_tag> is a log tag that you use in your application. *:S means that you suppress all log outputs from other components. > file.txt redirects the output of the command to file.txt.
The cause of the problem is that for logging Android has a buffer in RAM and if it becomes full it rewrites the most old entries (FIFO). The command I've provided will store the log on your computer.

Logcat displays nothing when used from Runtime.exec

I'm running the command
logcat -d AndroidRuntime:E *:S
When ran from adb on my computer, it displays all the things it should. When I try to run it from an Android application with
Runtime.getRuntime().exec("logcat -d AndroidRuntime:E *:S");
and print the output, it won't display anything except the headers.
How can I fix this?
First, this has never been supported.
Second, if you are running on Android 4.1 and later, you will only get any log messages that your own app logs, not messages from other apps, as you can no longer hold the READ_LOGS permission in an ordinary SDK app.

How to filter android logcat only for VPN

I've got a general logcat successfully;But my particular problem is connecting to the VPN (on any 4+ android ROM) so I want to do a logcat related to VPN only and see what's going on.
Tried 'LegacyVpnRunner' in this way :
adb logcat LegacyVpnRunner:E *:S -v long > name of problem.txt
But the final txt was this:
adb server is out of date. killing...
* daemon started successfully *
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
What's the problem? did I use a wrong alias for VPN service? (LegacyVpnRunner) if so, Where is the referernce to find related aliases for any android service?
Thanks
Do not limit your filter to capturing just Error priority messages. As for using proper tag
com.android.server.connectivity.Vpn.java uses 2 tags for logging - "Vpn" and "LegacyVpnRunner". So I would suggest trying both:
adb logcat -s Vpn:*
adb logcat -s LegacyVpnRunner:*

Categories

Resources