[UTILITY][APP][WINDOWS] AndroidFileUtils | Grab the Logs you need! [v1312]

Search This thread

.torrented

Senior Member
Mar 7, 2011
2,789
1,484
32
www.cyanfox-rom.com
This is my first Windows App written in Visual C#. I've had no previous experience with this language (just C++ and Java) This was a blast learning how to code!

Pre-req's: You will need .NET 4.0 installed to work

You may need to install a different BusyBox version if it does not connect to device!!!

ADB not needed, comes packaged with AndroidLib.dll <- Embedded in application (thanks to regaw_leinad)

Does not work with Windows XP or lower

This app is for Windows that will quickly grab a:

-Logcat log : { Verbose, Debug, Info, Warning, Error, Fatal, App Force Close, Custom Filter }
-dmesg log
-last_kmsg log

To use this App effectively, you will need to grab the log AFTER the problem has occured!

Also will copy to your clipboard so you can just paste it to your favorite site or file!

Nothing fancy or elegant about this but it gets the job done! Help out our devs by getting them the Logs they need!

For screenshots check the screenshots tab at the top (DevDB Black Bar ^)

Credit also goes to @regaw_leinad for the AndroidLib.dll

Feedback is needed as this is my first Windows application!

Also, if anybody can come up with a better name for this app, I will gladly change it!

Credit goes to [insert xda-member handle here] for renaming this app to "[insert new name of application]"

Downloads can be found here: http://xdaforums.com/devdb/project/?id=1462#downloads

================================================
Code:
v1312 (Windows 8 beta)
+Added debugging to find these Windows 8 bugs

v1311_v2
+More fixes in code, improved device handling when rebooting device.

v1311
+Fixed a bun in AndroidLib Library.
+Re-factored Reboot Sequence; Now devices will auto connect after a 
  reboot has been initiated.
+Massive code overhaul and speed improvements.

v1310
+Added Reboot Sequence {Recovery, Fastboot}
+Fixed NullReferenceException, if object is not initialized.

v1308-Beta
+New Filtering Option "Custom Filter" This will allow you to filter for what
  specific log types you want.
+Removed "Silent" filtering for obvious reasons.

v1308
+New Filtering Option "App Force Close" This will allow you to only grab 
  the error message when an app force closes.

v1307
+UI change (not released)

v1306
+Kills all threads if any are running upon exit, small other optimizations.

v1305:
+Fixed two small bugs that caused crashes.

v1300: 
+Another overhaul in code, thanks again to regaw_leinad for the help 
+AndroidLib.dll is no longer needed ^ 
+ADB is now properly killed when closing the application ^

v1200:
+Cleaned up code, ui, added a logcat filtering option
  { Verbose, Debug, Info, Warning, Error, Fatal, Silent }

v1100: 
+Added save log feature, changed up the UI a tiny bit

v1004: 
+Major overhaul to code, now speedier! (thanks to regaw_leinad for the help)

v1003: 
+Updated App again: Now should support ANY device :)

v1002:
+Cleaned up code, more aesthetics !

v1001: 
+New Release, Cleaned up some things and added some device info !

v1000: 
+Initial Release

XDA:DevDB Information
[Windows] AndroidFileUtils | Grab the Logs you need!, a Tool/Utility for the HTC Droid DNA

Contributors
.torrented, http://xdaforums.com/member.php?u=3766545, regaw_leinad

Version Information
Status: Stable
Current Stable Version: AFU - v1311_v2

Created 2013-11-06
Last Updated 2014-02-14
 

Attachments

  • Capture_dmesg.JPG
    Capture_dmesg.JPG
    206.1 KB · Views: 714
  • Capture_kmsg.JPG
    Capture_kmsg.JPG
    197.1 KB · Views: 630
  • Capture_logcat.JPG
    Capture_logcat.JPG
    205.8 KB · Views: 623
  • AFU-v1200_Error_Filter.JPG
    AFU-v1200_Error_Filter.JPG
    151.3 KB · Views: 651
  • v1310.PNG
    v1310.PNG
    61.9 KB · Views: 387
Last edited:
  • Like
Reactions: Rapscallion16

regaw_leinad

Inactive Recognized Developer
Jan 30, 2010
3,667
3,787
Seattle, WA
www.regawmod.com
Awesome, man! Just to let you know, you say that the user needs ADB to be installed for it to work, but AndroidLib actually has that built it. If you're really trying to access the adb binary itself, look for the ResourceFolderManager class in the library, and adb.exe exists at runtime in the "AndroidLib" folder.
 
  • Like
Reactions: .torrented

.torrented

Senior Member
Mar 7, 2011
2,789
1,484
32
www.cyanfox-rom.com
Awesome, man! Just to let you know, you say that the user needs ADB to be installed for it to work, but AndroidLib actually has that built it. If you're really trying to access the adb binary itself, look for the ResourceFolderManager class in the library, and adb.exe exists at runtime in the "AndroidLib" folder.

Cool I didn't know that!
 
  • Like
Reactions: Quadroller

regaw_leinad

Inactive Recognized Developer
Jan 30, 2010
3,667
3,787
Seattle, WA
www.regawmod.com
Cool I didn't know that!
Just tried out the application. Works great!

One thing that might help the user experience:
Look into using a BackgroundWorker or the async/await combination to process all of the logcat data. This will make it so the app doesn't freeze temporarily while it's collecting the data. Also, you could do that same thing on the application startup while AndroidLib loads it's resources and starts the adb server.
 
  • Like
Reactions: .torrented

regaw_leinad

Inactive Recognized Developer
Jan 30, 2010
3,667
3,787
Seattle, WA
www.regawmod.com
Oh and one more thing, I'm not sure you called the "Dispose" method on the AndroidController object when the app closes. If you haven't already, go ahead and put that in. It stops the adb server and frees up all resources used by AndroidLib ;)

The only reason that I say this is because adb was still running after I had closed the program.
 

.torrented

Senior Member
Mar 7, 2011
2,789
1,484
32
www.cyanfox-rom.com
Oh and one more thing, I'm not sure you called the "Dispose" method on the AndroidController object when the app closes. If you haven't already, go ahead and put that in. It stops the adb server and frees up all resources used by AndroidLib ;)

The only reason that I say this is because adb was still running after I had closed the program.

You mean this? Does it matter where in my code it goes?
Code:
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            android.Dispose();
        }
 

Uzephi

Inactive Recognized Contributor
Apr 20, 2012
3,439
1,892
Phoenix
Google Pixel 3a
Downloaded beta dated today. I have my HTC Rezound plugged in as wired hotspot for PC, so I know the PC reads it, but application cannot find the device. Also tried with DNA plugged in, no go. Running Windows 7 with all the correct drivers.

The program has a huge window on my 1080p setup. it fills the screen and goes a little under my start menu.

Side note: Since it is a log grabbing program, wouldn't as name like "Android Log Master" be a better name?

Playing a little more with program. Tried running as admin, and now it will not go passed "warming CPU" been stuck there for 10+ minutes. attatched image for view of oversized window.

Edit: closed program and reopened under regular permissions (not admin) and the windows error window popped up. below code box is what the error entailed. is this normal?

Edit 2: now older version will not go passed "warming CPU". Window is fine though, doesn't go under start menu from being too large like beta.

Code:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception (0x80004005): Access is denied
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at RegawMOD.Command.RunProcessNoReturn(String executable, String arguments, Boolean waitForExit)
   at RegawMOD.Android.Adb.ExecuteAdbCommandNoReturn(AdbCommand command)
   at RegawMOD.Android.Adb.KillServer()
   at RegawMOD.Android.AndroidController.CreateResourceDirectories()
   at RegawMOD.Android.AndroidController.get_Instance()
   at AndroidFileUtils.MainForm.acLoadWorker_DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18052 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
AndroidFileUtils
    Assembly Version: 1.3.5114.1674
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18044 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18047 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18021 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
AndroidLib
    Assembly Version: 1.5.2.0
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------
AndroidLib
    Assembly Version: 1.5.2.0
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------
AndroidLib
    Assembly Version: 1.5.2.0
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------
AndroidLib
    Assembly Version: 1.5.2.0
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------
AndroidLib
    Assembly Version: 1.5.2.0
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
 

Attachments

  • screenie.jpg
    screenie.jpg
    213.6 KB · Views: 121
Last edited:

.torrented

Senior Member
Mar 7, 2011
2,789
1,484
32
www.cyanfox-rom.com
Downloaded beta dated today. I have my HTC Rezound plugged in as wired hotspot for PC, so I know the PC reads it, but application cannot find the device. Also tried with DNA plugged in, no go. Running Windows 7 with all the correct drivers.

The program has a huge window on my 1080p setup. it fills the screen and goes a little under my start menu.

Side note: Since it is a log grabbing program, wouldn't as name like "Android Log Master" be a better name?

Playing a little more with program. Tried running as admin, and now it will not go passed "warming CPU" been stuck there for 10+ minutes. attatched image for view of oversized window.

Edit: closed program and reopened under regular permissions (not admin) and the windows error window popped up. below code box is what the error entailed. is this normal?

Edit 2: now older version will not go passed "warming CPU". Window is fine though, doesn't go under start menu from being too large like beta.

Code:
See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ComponentModel.Win32Exception (0x80004005): Access is denied
   at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
   at RegawMOD.Command.RunProcessNoReturn(String executable, String arguments, Boolean waitForExit)
   at RegawMOD.Android.Adb.ExecuteAdbCommandNoReturn(AdbCommand command)
   at RegawMOD.Android.Adb.KillServer()
   at RegawMOD.Android.AndroidController.CreateResourceDirectories()
   at RegawMOD.Android.AndroidController.get_Instance()
   at AndroidFileUtils.MainForm.acLoadWorker_DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18052 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
AndroidFileUtils
    Assembly Version: 1.3.5114.1674
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18044 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18047 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18021 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
AndroidLib
    Assembly Version: 1.5.2.0
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------
AndroidLib
    Assembly Version: 1.5.2.0
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------
AndroidLib
    Assembly Version: 1.5.2.0
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------
AndroidLib
    Assembly Version: 1.5.2.0
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------
AndroidLib
    Assembly Version: 1.5.2.0
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/ruu_log/AndroidFileUtils.exe
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

No that's not normal, The problem I have is it freezes when I use my DNA, but works fine when I use my Nexus 7.
I really can't see what's going on here, that is really just strange. I wonder if it has anything to do with A/V?

Thanks for trying.
 

Uzephi

Inactive Recognized Contributor
Apr 20, 2012
3,439
1,892
Phoenix
Google Pixel 3a
Update: ever since that error I cannot have the program start up (as admin or normal) without that error and app hanging, even with no devices hooked up. Tried with both HTC phones and the Motorola Droid X2 and none. Still get same error. I know I have .NET 4.0, the error log shows it is running with your loaded modules also. Both HTC phones are S-off, Rezound running stock hboot and DNA on ENG, though I do not think that matters.

Sent from my DNA using my mind.
 

.torrented

Senior Member
Mar 7, 2011
2,789
1,484
32
www.cyanfox-rom.com
Update! This program may not work if you don't have a good version of busybox installed to your device! I've installed with 1.21.1 and this program works correctly!

Edit* Added v1310!
 
Last edited:

t1gartist

Senior Member
Dec 8, 2012
643
286
newport news
two things really quick
1. is it ppossible to just have the app run busybox in the device via temp to stop that issue
2. i tried downloading the torrent and seeding it so it is readily available but download wouldnt start but thats ok
 

.torrented

Senior Member
Mar 7, 2011
2,789
1,484
32
www.cyanfox-rom.com
two things really quick
1. is it ppossible to just have the app run busybox in the device via temp to stop that issue
2. i tried downloading the torrent and seeding it so it is readily available but download wouldnt start but thats ok

1)That could be possible I didn't have time to experiment before I left. I will when I get back home in a week, on vacation right now.

2)I don't think xda 's torrent feature works I just use direct download it's only like 2 megabytes (1mb compressed)

Does the application at least work for you?
Sent from my HTC6435LVW using XDA Premium HD app
 

sdamark

Senior Member
Sep 28, 2012
1,389
894
Fountain Hills, AZ.
Did not see the option, has this been tested on Windows 8.0 ? I have Busybox on Rails v1.21.1 installed on my Moonshine S-Off DNA. Running Santod's KitKat sense 5.5 rom. TWRP 2.6 Beta. When trying to run program it just sticks at the Warming CPU screen. Note: Windows 8.0 has .Net 4.5 installed and I have turned on all options.

I'm getting this error message....

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentNullException: Value cannot be null.
Parameter name: input
at System.IO.BinaryReader..ctor(Stream input, Encoding encoding, Boolean leaveOpen)
at RegawMOD.Extract.Resources(Object obj, String outDirectory, String internalFolderPath, String[] fullPathOfItems)
at AndroidFileUtils.MainForm.acLoadWorker_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18051 built by: FX45RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
AndroidFileUtils
Assembly Version: 1.3.1.1
Win32 Version: 1.3.1.1
CodeBase: file:///C:/android/AndroidFileUtils.exe
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18045 built by: FX45RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18046 built by: FX45RTMGDR
CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    This is my first Windows App written in Visual C#. I've had no previous experience with this language (just C++ and Java) This was a blast learning how to code!

    Pre-req's: You will need .NET 4.0 installed to work

    You may need to install a different BusyBox version if it does not connect to device!!!

    ADB not needed, comes packaged with AndroidLib.dll <- Embedded in application (thanks to regaw_leinad)

    Does not work with Windows XP or lower

    This app is for Windows that will quickly grab a:

    -Logcat log : { Verbose, Debug, Info, Warning, Error, Fatal, App Force Close, Custom Filter }
    -dmesg log
    -last_kmsg log

    To use this App effectively, you will need to grab the log AFTER the problem has occured!

    Also will copy to your clipboard so you can just paste it to your favorite site or file!

    Nothing fancy or elegant about this but it gets the job done! Help out our devs by getting them the Logs they need!

    For screenshots check the screenshots tab at the top (DevDB Black Bar ^)

    Credit also goes to @regaw_leinad for the AndroidLib.dll

    Feedback is needed as this is my first Windows application!

    Also, if anybody can come up with a better name for this app, I will gladly change it!

    Credit goes to [insert xda-member handle here] for renaming this app to "[insert new name of application]"

    Downloads can be found here: http://xdaforums.com/devdb/project/?id=1462#downloads

    ================================================
    Code:
    v1312 (Windows 8 beta)
    +Added debugging to find these Windows 8 bugs
    
    v1311_v2
    +More fixes in code, improved device handling when rebooting device.
    
    v1311
    +Fixed a bun in AndroidLib Library.
    +Re-factored Reboot Sequence; Now devices will auto connect after a 
      reboot has been initiated.
    +Massive code overhaul and speed improvements.
    
    v1310
    +Added Reboot Sequence {Recovery, Fastboot}
    +Fixed NullReferenceException, if object is not initialized.
    
    v1308-Beta
    +New Filtering Option "Custom Filter" This will allow you to filter for what
      specific log types you want.
    +Removed "Silent" filtering for obvious reasons.
    
    v1308
    +New Filtering Option "App Force Close" This will allow you to only grab 
      the error message when an app force closes.
    
    v1307
    +UI change (not released)
    
    v1306
    +Kills all threads if any are running upon exit, small other optimizations.
    
    v1305:
    +Fixed two small bugs that caused crashes.
    
    v1300: 
    +Another overhaul in code, thanks again to regaw_leinad for the help 
    +AndroidLib.dll is no longer needed ^ 
    +ADB is now properly killed when closing the application ^
    
    v1200:
    +Cleaned up code, ui, added a logcat filtering option
      { Verbose, Debug, Info, Warning, Error, Fatal, Silent }
    
    v1100: 
    +Added save log feature, changed up the UI a tiny bit
    
    v1004: 
    +Major overhaul to code, now speedier! (thanks to regaw_leinad for the help)
    
    v1003: 
    +Updated App again: Now should support ANY device :)
    
    v1002:
    +Cleaned up code, more aesthetics !
    
    v1001: 
    +New Release, Cleaned up some things and added some device info !
    
    v1000: 
    +Initial Release

    XDA:DevDB Information
    [Windows] AndroidFileUtils | Grab the Logs you need!, a Tool/Utility for the HTC Droid DNA

    Contributors
    .torrented, http://xdaforums.com/member.php?u=3766545, regaw_leinad

    Version Information
    Status: Stable
    Current Stable Version: AFU - v1311_v2

    Created 2013-11-06
    Last Updated 2014-02-14
    1
    Awesome, man! Just to let you know, you say that the user needs ADB to be installed for it to work, but AndroidLib actually has that built it. If you're really trying to access the adb binary itself, look for the ResourceFolderManager class in the library, and adb.exe exists at runtime in the "AndroidLib" folder.
    1
    Awesome, man! Just to let you know, you say that the user needs ADB to be installed for it to work, but AndroidLib actually has that built it. If you're really trying to access the adb binary itself, look for the ResourceFolderManager class in the library, and adb.exe exists at runtime in the "AndroidLib" folder.

    Cool I didn't know that!
    1
    Cool I didn't know that!
    Just tried out the application. Works great!

    One thing that might help the user experience:
    Look into using a BackgroundWorker or the async/await combination to process all of the logcat data. This will make it so the app doesn't freeze temporarily while it's collecting the data. Also, you could do that same thing on the application startup while AndroidLib loads it's resources and starts the adb server.
    1
    Updated to v1200!

    New options for easier to read logs!!!
    Great update man, it's way more smooth! :)