I am using android-x86 2.2 version as a live cd, adb tool is not avilable to see logcat so suggest some alternative to see system logs.
I found the solution to see the log first press Alt+F1 then write logcat at the terminal then hit enter you will be able to see logs.
Related
I recently updated my Nexus 9 Tablet to Android 7 Nougat.
Since then the Logcat view in Eclipse stoped displaying Logcat messages, the view just stays empty.
Also the devices target is shown as "Unknown".
If I instead start Logcat outside Eclipse (AndroidSDK->tools->ddms) it displays all messages. However, then the "Application" Column stays empty.
There are allready some (older) questions on this topic here on SO, but none of the solutions here worked for me.
What i tryed:
Use another USB Port
Focus the device in the DDMS perspective
Restart Eclipse
Reboot the device + pc
abd kill-server
disable and re-enabled USB Debuging on the device
Reset the USB-Debuging authorization and confirm the RSA fingerprint again
Switch USB-Mode to "MTP"
Every installed package from the Android SDK is up to date and i use latest Eclipse+ADT Plugin.
Also everything works fine with my Galaxy S5 Mini (Android 5.1.1).
I know, that the ADT-Plugin is deprecated and we should use Android Studio.
However I still preffer to use Eclipse as long as possible, so I am looking for a solution for this problem.
So does anyone know how to solve this issue?
I tried with this custom build and it works for me. Now I can see my logcat in Eclipse again.
https://github.com/khaledev/ADT/releases
Download the zip file then in Eclipse menu Help > Install New Software... > Add > Archive...
Just pick the downloaded zip and do the rest of the install process.
can use "Android Device Monitor" Application,
This application in the sdk-tools package.
Launch From the command line,
cd to the "sdk-tools folder/tools/" directory,
enter the following command : monitor.
or
windows environment,
open the directory "sdk-tools folder/tools/",
and double click monitor.bat.
detail -> Google User Guide
I had the same problem. Eventually, I found out that the "Eclipse IDE for Android Developers" was out of date. Updating this feature fixed the problem. Procedure:
Open Help -> About Eclipse -> Installation Details
Select "Installed Software" tab
Select "Eclipse IDE for Android Developers"
Click "Update" in the bottom.
Try to launch directly sdk tool monitor from Android SDK, it can be found in:
sdk-tools folder/tools/
you'll see monitor.bat, click on it to launch Android Device Monitor oustside Eclipse, don't forget to create a filter for your APP, go to logcat window-> Saved filters -> + -> fill your app name in "by Aplication Name"
If nothing works, in an emergency, you may try this to get logcat over command line (use cmd in windows), type :
adb logcat --pid=YOUR_APP_PID_NUMER
this shows messages from your APP. if you don't know your PID, put a line in your APP code:
System.out.println("foo stuff I can find easily when I read logcat results");
Run your app, make sure you get the up line executed.
Then in your command line type:
adb -d logcat System.out:I *:S
Find your line System.out.println("foo... and read the PID number, is next right to time data.
And then
adb logcat --pid=pid number you read from your comment line
to get logcat messages from your app in the command shell in real-time.
If you just want messages output till now, just add -d modifier:
adb -d logcat --pid=pid number you read from your comment line
I get an error in the android emulator. "The application AppName has stopped unexpectedly. Please try again.
How do I use the debugger to troubleshoot where the error occurs
This is a pretty big question. Here is the standard Android documentation for debugging android apps:
http://developer.android.com/guide/developing/debugging/index.html
I don't usually answer with a link.. but honestly this it's probably easiest just to go through the piece of the URL. breakpoints and log events.
http://www.vogella.de/articles/EclipseDebugging/article.html#usedebug_breakpoints
you should also look at the log file. By default android logs all messages to a log file which you can access on your command line as "adb logcat". For more on adb tool loot at here
I am not sure what kind of debugger you want. AFAIK, two debugger can be used in android: ADB and gdbserver. If you want debug java code, you can use ADB. You can issue "adb connect localhost" in shell to make adb connect to your emulator. Then you can use "adb logcat" to see the log of your emulator. Mostly, the emulator will give you log about where the error occurs in your java code.
I just recompiled after waiting a longgggg while without changing code (I did remove code and a xml file, but undid it with cntl+z) and then it worked without issues - sigh –
I like to use Logcat. Logcat will give you a pretty detailed error message with the lines that the error occurred on. You can open up the Logcat perspective in Eclipse by going:
Window -> Show View -> Other (if Logcat doesn't show in the list) -> Logcat
I prefer this to the debugger because the emulator runs a bit faster.
I'm in trouble with my android device in which log folder under /dev is unreachable or maybe even does not exists.
$ pwd
pwd
/dev
$ cd log
cd log
cd: can't cd to log
$
So LogCat is out-of-service and I cannot view device's stdout or stderr logs in DDMS.
I googled a little bit and tried to find some information for about this problem:
http://developer.android.com/guide/developing/tools/adb.html#alternativebuffers
Viewing stdout and stderr topic seemed to be useful but this thread says it is unsupported :
Why is redirecting stdout/stderr on android not working?
Here is another one having the same problem:
"Unable to open log device '/dev/log/main': No such file or directory"
I found a temporary solution to dump my logs in a file on device manually but as usual I cannot monitor system just my application logs.
Is there any solution you can suggest? Any way to redirect stdout and stderr logs to files,console etc.?
Any kind of help will be appreciated.
Solution:
On call screen
type *#*#2846579#*#*
opens system management menu
Project menu -> background settings -> Log setting
Log level setting -> VERBOSE
Log switch -> LOG on
Dump and Log -> Checked all the boxes
Restart device.
Thats all.
What device is this? If it ships with Market, it must pass the CDD, and that includes having the development tools needed for app development which includes logcat support (though this just means the logcat command, technically the implementation could be different). For such a device the manufacturer must supply an update to make it compatible.
If it is not a compatible device, all bets are off, and you will just need to get help from the manufacturers or any hackers who are working with the device.
RunO NesrE - I finally found the solution to this.
There is a recent post on the xda-developers forum for a different Huawei phone with the same problem and it has a fix.
http://forum.xda-developers.com/showpost.php?p=17774398&postcount=93
It worked a treat on my Huawei Sonic (U8650).
I am no good with hardware concepts. So I have this probably very silly doubt.
I want to add Log to my application. When running on an emulator, I know where to see the Log output - it's visible in the Logcat window of Eclipse.
I want to know where I can see these logs when I run it on a hardware device. I am using following command to load my app on to the device : ./adb install helloWorld.apk
So where will the log be created and under what name?
Apologies if the question is vague or silly. I really do not know more details.
-Kiki
Try to use:
./adb logcat
When you run on device, the log is also available in LogCat. You will need to turn on USB debugging (Settings > Applications > Development > USB Debugging) in your device, then you can use LogCat just like in the emulator, both using ./adb logcat and in Eclipse.
This is pretty simple: I'm using NetBeans on Linux with Android emulator 1.6. I have Logcat on my android phone, but the process of getting the messages to somewhere readable isn't smooth at all.
Can someone tell me how to get Logcat running on the emulator? Is there anything I can do to see debug messages other then having to copy the apk to my phone and testing it?
Thanks in advance!
You have a few options for viewing the debug log output, assuming you have the SDK installed and your command path set up correctly:
Type adb logcat. The log output from the connected device or running emulator will appear. I usually prefer adb logcat -v time to see the time stamps.
Type ddms. This launches the stand-alone version of DDMS. It has a logcat display at the bottom.
Install the ADT extension for Eclipse, and open the logcat view. (Since you're using NetBeans I assume this isn't what you want to do, but I'm mentioning it for completeness.)
In all cases, the interaction is the same whether you're using a physical device or software emulator, because the ADB daemon conceals the details. Whatever you're doing for the device is also expected to work for the emulator.
If you have a device and emulator connected simultaneously, you can use adb -e logcat for the emulator and adb -d logcat for the device. From stand-alone DDMS or Eclipse, just pick the device or emulator from the pop-up menu.
If you have setup nbandroid you can find the adb logcat viewer in netbeans under:
Window -> Output -> ADB Log
--edit
Just followed up on the post above and started using C:\Program Files (x86)\Android\android-sdk-windows\tools\ddms which is alot better then the one in netbeans.
The SDK comes with a handy tool called ddms it should be in the tools folder of the SDK.
At the moment an Emulator is running, or a mobile phone is connected to your machine it should show up in ddms and you can see all the log output in ddms.