• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[APP] GetLogs - Get dmesg, logcat, radio, etc with one click!

Search This thread

rpierce99

Senior Member
Jan 4, 2009
203
154
I know how annoying it is trying to set up ADB, open a terminal, export logs to local files, copy, paste, etc just to submit a bug report or help a developer diagnose an issue.

That is why I put together this little app to do all of that for you!
This app runs the following commands:
  • dmesg
  • logcat -v time -d
  • logcat -v time -b radio -d
  • getprop
  • uname -a
  • ps

It puts these together into a single document and uploads it to Pastebin, so you can just put a link in a forum thread or IRC or in the bug tracker.

To run these, sadly it needs root. It also requires permissions to read phone identity so that it can automatically mask your ESN/MDN/etc in the logs before it uploads them. It also requires permissions to read account information so that it can mask all of your accounts in the logcat.

EVEN WITH ALL OF THOSE THINGS BLOCKED AUTOMATICALLY PLEASE LOOK OVER YOUR LOG BEFORE GIVING OUT THE URL. IT IS A PRIVATE PASTEBIN AND IF YOU FIND SOMETHING PRIVATE YOU CAN REMOVE IT.

Usage:
  • Install the app on your phone.
  • Run the app.
  • Add any information that should be masked (keep in mind private phone ids and accounts will be masked automatically).
  • Hit PasteBin! and wait for the upload to finish.
  • Note the url at the bottom of the screen and give it to whoever requested your logs.

This is just a simple app to help get logs, but if you have any suggestion of how it might be better, do let me know by posting in this thread.

Known Issues:
  • If you add too many mask strings the app doesn't scroll so you lose the PasteBin! button and/or the resulting URL.
Google Code Project: http://code.google.com/p/getlogs/

Version History:
Version 1.2
  • Added filtering to "just a file" output
  • Limited dmesg and both logcats to only 1000 lines each to prevent OutOfMemory Exceptions.
Version 1.1
  • Added ability to just save the file, no upload. (/sdcard/Android/apps/com.GetLogs/data/)
  • App now remembers the last message, in case you forget to write down your pastebin address.
  • Added ps to the list of processes run.
Version 1.0
Initial Version

Upgrade Instructions:
Uninstall current version if installed.
Install new version.
 

Attachments

  • GetLogs.jpg
    GetLogs.jpg
    51.2 KB · Views: 3,626
  • GetLogs.apk
    58.7 KB · Views: 3,909
Last edited:

rpierce99

Senior Member
Jan 4, 2009
203
154
Ok so, update - application not installed error, yes I have unknown sources selected, just doesn't install. Any ideas?

Sent from my MSM using XDA App
Hm, I get the same thing, I've never published an android app before and I chose not to sign it, maybe I need to do that...

EDIT: Ok I signed it and it installs now, sorry about that.
 
Last edited:
  • Like
Reactions: VistroDistro

baikal2

Member
Aug 10, 2008
28
0
Hi,

Is there any way for the file to be dumped on the phone instead of uploading it to pastebin. The user can then pick his way of displaying the file to the world.
 

Entropy512

Senior Recognized Developer
Aug 31, 2007
14,095
25,088
Owego, NY
This is awesome, gonna install it when I get home so I can get highlandsun some logs of radio failures that occur when I'm at my desk at work. (I never have time to get the logs from the terminal when working, and I can't ADB at work.)
 

arrrghhh

Inactive Recognized Developer
Feb 10, 2007
11,907
3,854
I posted the data file in another thread but I don't think anyone was able to look at it. Here is the logs for my tilt2. The issue I'm running into is that wifi loses the data connection immediately when the phone goes to sleep. The wifi signal does not drop, and in fact still says I'm connected, so the only way to regain data is to turn off the wifi then back on. Would someone be able to look at these logs and help me out here?

Hrm...

No offense, but this really doesn't belong here. IIRC, you posted the logs in the FRX06 thread - which is good, but don't you remember me mentioning opening a bug on the tracker? Obviously if there's already a bug open, just add your comments/logs to it... if there isn't already a bug on it, open a new bug with your comments/logs :p.

Seriously, this has absolutely nothing to do with this thread.
 

Demonic240

Senior Member
Mar 18, 2009
1,007
122
Plano
Hrm...

No offense, but this really doesn't belong here. IIRC, you posted the logs in the FRX06 thread - which is good, but don't you remember me mentioning opening a bug on the tracker? Obviously if there's already a bug open, just add your comments/logs to it... if there isn't already a bug on it, open a new bug with your comments/logs :p.

Seriously, this has absolutely nothing to do with this thread.

Ah, I'll remove it then. Sorry about that.
 

highlandsun

Inactive Recognized Developer
Sep 15, 2009
872
263
Los Angeles
highlandsun.com
Better dmesg binary

In the interest of having more readable kernel logs...

Delete your current /bin/dmesg and put this one in there instead. Make sure you chmod it 755.
 

Attachments

  • dmesg.zip
    2.7 KB · Views: 61
Last edited:

teemo

Senior Member
Nov 18, 2007
2,441
2,315
Kolding
In the interest of having more readable kernel logs...

Delete your current /bin/dmesg and put this one in there instead. Make sure you chmod it 755.

At work without adb. Using terminal on Rhod.
What am I missing?
Code:
$ $ su
# mount -o remount,rw /
# rm /bin/dmesg
# cp /sdcard/dropbox/dmesg /bin
cp: write error: No space left on device
# ls -l /bin/dm*
-rwxrwxrwx    1 0        0               0 Jun 29 10:10 /bin/dmesg
It does remove dmesg, it does copy the new, but filesize=0
 

Top Liked Posts

  • There are no posts matching your filters.
  • 101
    I know how annoying it is trying to set up ADB, open a terminal, export logs to local files, copy, paste, etc just to submit a bug report or help a developer diagnose an issue.

    That is why I put together this little app to do all of that for you!
    This app runs the following commands:
    • dmesg
    • logcat -v time -d
    • logcat -v time -b radio -d
    • getprop
    • uname -a
    • ps

    It puts these together into a single document and uploads it to Pastebin, so you can just put a link in a forum thread or IRC or in the bug tracker.

    To run these, sadly it needs root. It also requires permissions to read phone identity so that it can automatically mask your ESN/MDN/etc in the logs before it uploads them. It also requires permissions to read account information so that it can mask all of your accounts in the logcat.

    EVEN WITH ALL OF THOSE THINGS BLOCKED AUTOMATICALLY PLEASE LOOK OVER YOUR LOG BEFORE GIVING OUT THE URL. IT IS A PRIVATE PASTEBIN AND IF YOU FIND SOMETHING PRIVATE YOU CAN REMOVE IT.

    Usage:
    • Install the app on your phone.
    • Run the app.
    • Add any information that should be masked (keep in mind private phone ids and accounts will be masked automatically).
    • Hit PasteBin! and wait for the upload to finish.
    • Note the url at the bottom of the screen and give it to whoever requested your logs.

    This is just a simple app to help get logs, but if you have any suggestion of how it might be better, do let me know by posting in this thread.

    Known Issues:
    • If you add too many mask strings the app doesn't scroll so you lose the PasteBin! button and/or the resulting URL.
    Google Code Project: http://code.google.com/p/getlogs/

    Version History:
    Version 1.2
    • Added filtering to "just a file" output
    • Limited dmesg and both logcats to only 1000 lines each to prevent OutOfMemory Exceptions.
    Version 1.1
    • Added ability to just save the file, no upload. (/sdcard/Android/apps/com.GetLogs/data/)
    • App now remembers the last message, in case you forget to write down your pastebin address.
    • Added ps to the list of processes run.
    Version 1.0
    Initial Version

    Upgrade Instructions:
    Uninstall current version if installed.
    Install new version.
    3
    I'm preparing the app for compatibility with other devices (potentially putting it in the market) and fixing some long standing issues (I never realized that when I implemented "just a file" it didn't do any of the filtering that the pastebin button did, oops) and I have another version I'd like for you all to test out for me. I don't have a rhod anymore so I have no idea if this will work, but it works well on my CM9 Touchpad, and I don't think I did anything that will break it for you all. So let me know if it works same/better/worse and make sure that the filtering is working for both the pastebin button and the just a file option, thanks. Note that this version also limits the output to 1000 lines per log to prevent some previous OutOfMemory exceptions I was seeing.
    2
    Hi folx, hi rpierce99,

    1st of all THX for the tool :),

    I use it with a SGS+ on a CustomRom based on 2.3.6 KPU. I /We try to figure out a problem concerning the orginal charging cradle from samsung. All new stock kernel recognise the charging cradle, but custom kernels aren't able to recognise it. So the developers need a lot of logs.

    I teted your tool yesterday the first time and had a look at the data.txt but there are only a lot of the character "#" Is it normal ? Do i have to change the in this post mentioned file ? Or is there another reason (improper masking ? i haven't set anything in the field)

    THX for your answeres and your work

    Cheers

    Rhonin :D

    More than likely there is a regex expression being passed in that is matching every character, make sure there are no blanks in your list of custom filters. The latest version shouldn't allow empty account names to screw it up (it skips the account name if it's empty) but it's possible something is slipping through. I can make a version that doesn't force filter if you want. Let me know if you don't find an empty entry in your custom filters and I'll build a version that will work for you. If you want to chat about it drop by #xdandroid on freenode and we can talk.
    2
    arrrghhh found me on IRC and let me know that the new version works on his raph, so I'm guessing rhods are good too, so I've removed all of the older versions from previous posts and updated the OP with the newest, least buggy version of the app yet. Continue to post feature requests and bug reports here, I'm actually prepping the app for market release so I'd like to get it as polished as I can.
    2
    Hi, i think that the forum has produces the corrupt file because it works before uploading :(

    i have to try it again. Here is the link.

    That's the prob :(

    Thank you for your effort again

    Based on the number of ##MDN## replacements happening, I'm going to build you a new version (see attached), first it's going to add a new logcat entry to show you what your phone number API request is actually returning, and then it's going to stop trying to filter phone number from your log. Don't post the logs with your phone number intact unless you don't mind the world knowing your phone number, but if you PM me the line that says what your phone number API is returning (it will start with "Replacing phone: ") I will fix and rebuild with phone replacement turned back on.