Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I know that Android devices have an on-board adb server. I am able to start the server through the terminal emulator and run adb commands, but the device itself does not show up in the device list. The ultimate goal is to capture a logcat and store it locally, as I am having crashing issues that don't occur when it's plugged in, so I need to capture the logcat without plugging into USB.

I want to ultimately be able to run $ adb logcat -v time > /sdcard/logcat.txt and have it create the logcat text file that I can retrieve and view the next time the device crashes.

I'm running Jelly Bean 4.1.2

EDIT

I managed to track down a solution to my specific problem:

Locally, adb is not required to gather a logcat. From within the terminal emulator, you can simply execute logcat > /sdcard/logcat.txt to gather a logcat. However, I'll leave the question up in case someone figures a way to get adb to recognize itself, as it might be useful in the future.

share|improve this question
1  
Add this solution to your answer so we all know :) –  Jared Burrows Dec 28 '12 at 20:25

3 Answers 3

I don't think you can access the device directly from ADB on the device. but you can access the logcat if you need to in /dev/log/.

Just about anything you would need to access via adb should be accessible directly on the device, one way or another.

For example, adb gets screenshots from reading /dev/graphics/fb0

share|improve this answer

I have tried multiple times, and have never found a way for the build in adb client to recognise itself.

I think it is due to the fact that it checks it on USB etc - I could be wrong however.

It is safe to say though that there is no way for the ADB client in Android to recognise it's server self - sorry!

share|improve this answer

Might be best to attempt download of aLogCat from the Google Play Store.

There is an option in there under Menu > Preferences > Periodic Save from within the same application, that can be set, which activates the frequency of periodic saving, which gets saved to the SDCard.

That should make things easier somewhat to get the log without having to plug it in via USB.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.