Get LogCat From Android Device Manually - android

My phone cannot connect to the android ADB but I need to check its logs since it seems to be getting unique errors from an app I made. aLogcat app is outdated and getting "bug reports" from developer options is unreadable for me.
Is there any way for me to get a logcat report of my app while I'm running an application on it?
Edit: I use a droid Mini phone and it won't connect to eclipse. After installing the specific driver for the device it worked.

First of all, consider making ADB work for your device. Provided this is totally impossible, consider using ACRA. If you don't want to integrate fully with it, check their logcat collection code.

Related

How can you get details about crash of Android app?

It is not really a programming question. I have this app that continues to crash on my phone, but works fine for everybody else. I used to program android apps, so I have knowledge in this field.
It something on my phone probably it always crashes at the same stage. I did not program this app. How can I still get the details of the error or the trace of the exception?
I would suggest plugging the phone into your computer or laptop, opening up the Logcat tab in Android Studio and viewing the exception details as the app crashes.
This can be done separately from Android Studio using ADB but it involves more steps.
Of course, make sure that you have enabled USB debugging on your device before this.

How to debug remotely

I have a situation:
1. Samsung 7 has a strange bug in my app.
2. This device is 10000 miles away from me.
What are the opportunities for debugging this device remotely.
When tester on the other side can do everything.
I tried adb tcpip <port>
but device ip can be only local(192.168.....)
The rude way is to get Android Studio there and install team viewer on the phone. It's not working every time.
And when we have 1 hour intersection it's difficult to support.
Is there any other way?
Have your user enable Developer Options on the device. You should already know how to do that.
See whether the device has Take Bug Report and/or Bug Report Shortcut settings. If you enabled Bug Report Shortcut a Take Bug Report option will appear when pressing/holding the power button.
Instruct your user to take a bug report -- either through Developer Options, or from the power menu -- as soon as your app crashes.
As for the APK you send to your user, make sure debugging is enabled, so you get all your log messages. If you obfuscate the APK, be sure you keep your mapping files handy.
If you have some idea of where the bug is happening, an option could be to set up something like http://www.acra.ch/ and send your tester a new apk.
This way when the bug is provoked, given you set up useful log events, you will receive information about the crash or bug. ACRA lets you include the LogCat as well, which is pretty useful.
There are several options:
-Build APK and send it to the phone. Install and check/try again.
-Create Android Virtual Device identical to the model located remotely, install Samsung Android firmware.
There is no clear solution about debugging out of local network.
You could try something like LogmeIn for Android - this way both devices will be in the same network.
Once done, just do usual adb connect ipadress If t refuses to do so first, try enabling ADB over WiFi option

Is it possible to see output from log cat without having the app source code?

I have an app installed on my device.
An app that I developed, but I haven't got the source code anymore.
Is it possible to attach log cat to this app?
yes you can, just enable usb debugging on your android device, and plug the device where you have the application installed on it, by that, you will see all the logs on logcat.
Depends if you've left logs in the code. If you did, the easiest method would be probably going into your Android Studio and checking you Android Monitor tab. You can switch devices / applications there.
If you don't have any logs and your question actually means you want to add some logs in, then I'm afraid you can't reliably do that.

Android: How to find out reason for "Unfortunately [...] has stopped"?

when I run my Android application with an emulator, it works perfectly, and so it does on my phone, but on another phone, trying to run the app, I always get the "Unfortunately [...] has stopped" error. How can I find out the reason for this error (Using the emulator, I could look it up in LogCat, but not on a real phone)??
Thanks in advance!
On a real phone, you can use the tool aLogCat to view logs on the device itself. You can also connect it to your computer via USB and use the adb logcat tool, and the logs will be visible from the computer's shell window.
Adb logcat could also be used over a wireless network with a tool like WiFi ADB, should you prefer wireless methods.
Android Remote Stacktrace is a quite useful library/script that allows you to easily add a way for a phone to send its crash logs your way.
Simplest would in this case probably be to add it to a test version you put on the other phone. Since it's not being actively developed (afaik), you may not want to put it in a normal store release build.

Why .apk file is not running on the real device

I have developed an Android app. That app is running on the emulator perfectly. My application gets data from webservices. when I run the applicaton on a real device, I am getting force close.
I do not understand what the reason is. I came to know that we can debug our application by running on real device. I don't know exactly how to do it.
I found some link for using a real device for debugging http://developer.android.com/tools/device.html. But in this link it is given that usbdrivers are required for connecting the device to a PC. I am using Samsung Galaxy y . I did not found any drivers for that model (GT-S5360). Can anybody please help me.
Except from device debugging you can also have a look at the device generated log. There are many applications that allows you to do do, CatLog being one.
You should have the Android SDK.
http://developer.android.com/sdk/index.html
Activate USB Debugging on your device and run adb logcat in a command line on the host.
http://www.groovypost.com/howto/mobile/how-to-enable-usb-debugging-android-phone/
If you use eclipse, you can do all this the same way as on the emulator.
http://developer.android.com/tools/building/building-eclipse.html

Categories

Resources