Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
13
Question by Ranger-Ori · Jul 14, 2013 at 04:11 AM · tutoriallogcatadb

How to use adb logcat?

Well I've tried to understand how to use it by reading these:

http://forum.unity3d.com/threads/70197-Any-tips-for-debugging-Android

http://answers.unity3d.com/questions/175161/debugging-android.html

but still, I have no clue how to do it, and what to do... people are writing their comments as if it is obvious how to use these commands, but nothing work for me cause I can't find a proper tutorial for new comers.

I really need a step by step guide, I would highly appreciate it, thanks.

Comment
Add comment · Show 4
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Benproductions1 · Jul 14, 2013 at 04:18 AM 1
Share

From the first link: "There is something called the logcat, which is a combined message pipe from all applications. To read it you first need to locate the adb tool that comes with the Android SD$$anonymous$$. Depending on which version you have of the SD$$anonymous$$ the adb is located either under /tools or/platform-tools."

It's all there... all you have to do is read.

PS: This is a question-answer forum. If you are requesting a tutorial, this is not the place.

avatar image Benproductions1 · Jul 14, 2013 at 04:19 AM 1
Share

Also adb logcat has nothing to do with Unity. It can be used for anything. Look up "adb logcat tutorial" and you will find $$anonymous$$ANY step by step guides on how to use it.

avatar image Ranger-Ori · Jul 14, 2013 at 04:23 AM 0
Share

I found it, but this is exactly what I'm asking. what next? should I move it into my android device? should I open it on the PC? what to do?

avatar image Benproductions1 · Jul 14, 2013 at 04:31 AM 0
Share

Please use Google as I have advised. There's even a video tutorial on how to do it!
http://www.youtube.com/watch?v=2AHJsR$$anonymous$$a_J8

7 Replies

· Add your reply
  • Sort: 
avatar image
38
Best Answer

Answer by cregox · Nov 07, 2013 at 08:44 PM

If you're using Unity with android, you must have already installed adb through Android SDK. Given that, yeah, it should be simple and obvious. And Ben is right. You didn't seem to google enough or take any effort here... But I just hate simple unanswered questions.

So, quoting updated parts from Herman, there are just a couple things to assure:

Make sure USB debugging is enabled on the Android device (check under Settings -> Development). - Run adb through the command prompt (with command line argument logcat) that comes with the Android SDK while running the game on the Android, still connected via USB to the computer.

And then, quoting eriQue, here's a good command line to filter out stuff:

 adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG

Finally, if the Android Debug Bridge can't help you, I'm not sure what could. There was this one time, actually, it couldn't help me... But I was ignoring a unity warning, so I did the debugging checklist in the wrong order.

Comment
Add comment · Show 17 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Ranger-Ori · Nov 13, 2013 at 03:28 PM 0
Share

First, thanks for the answer.

Second, here is what I didn't know. you wrote:

"Run adb through the command prompt (with command line argument logcat) that comes with the Android SD$$anonymous$$ while running the game on the Android, still connected via USB to the computer."

I had no clue that I needed to actually copy the cmd.exe file into the "platform-tools" folder and activate the command prompt in there so it would work. (or to write to exact location of the adb.exe file in cmd) in no tutorial there was an explanation for this, and only this guide actually explained that

Not all of us are Software Engineers.. otherwise I would'nt ask this question. :)

By the way, this utility only shows the unity console? or is there some more important info I can get using it?

avatar image cregox · Nov 13, 2013 at 03:36 PM 0
Share

You don't need to be an engineer to know about the command prompt. But that's cool, dude. I saw your pain, reason why I decided to write a detailed answer. Glad I could hit something! ;-)

This shows the android console. It has nothing to do with Unity, it doesn't even need to know Unity exists. There might be some more important info you can get using it, but that will most likely be true only if you're using tools outside Unity (which you probably aren't).

avatar image Bunny83 · Nov 13, 2013 at 04:01 PM 5
Share

You really don't need (and shouldn't) copy cmd.exe into the android tools folder. adb is "just" a program. To run it you have to specify the right location of the program.

This can be done by:

  • "browsing" to the actual folder inside your command prompt where the adb exe is located. The "cd" command (change directory) might be useful.

  • Create a shortcut to adb.exe and edit the shortcut properties to add additional parameters you want to pass to adb

  • Same as above but more versatile: Create a shortcut to cmd.exe and change the working directory to the directory of your adb location. When you open the cmd with this shortcut it should start in the tools directory and you can directly type "adb xxxx"

  • The most common one is to add the directory to the default search path. This is what i do with most tools which i know i'm going to use them quite a lot ;). If you've done that, you can start the ADB from any command prompt from any directory. $$anonymous$$eep in $$anonymous$$d to restart cmd or the changes wouldn't apply. Before you ask how you add an directory to the PATH environment variable, see this

avatar image Giantbean · Nov 13, 2013 at 10:10 PM 1
Share

Update: Going to my SD$$anonymous$$ Platform-tools folder I held the shift key and right clicked in the folder then chose "Open command window here" This gives you the path and you can start typing adb logcat. With this method I got "-waiting for device-" however the devise is plugged in and stuck at the splash screen of the app.

So Shift + right-click in the folder with the adb.exe may be of use to someone.

avatar image Giantbean · Nov 15, 2013 at 04:50 PM 2
Share

Another Update: $$anonymous$$y trouble was corrupt drivers. uninstalling and re-installing never worked but a Universal ADB driver got my phone recognized by ADB. Hope that helps others save some time.

Show more comments
avatar image
7

Answer by LargeVader · Jan 31, 2016 at 02:47 PM

  1. Run the Terminal and enter to:

/Users/YourUserName/Library/Android/sdk/platform-tools

  1. You must put a ' ./ ' before the code:

./adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG

I works for me.

Unity 5 v.5.3.2f1 Android Studio 1.3.2 OSX Yosemite

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image atmonopoly51299 · May 02, 2017 at 02:20 PM 0
Share

It works!!!! Thank you a lot Sir !!

avatar image
2

Answer by robinwood · Mar 28, 2016 at 02:47 PM

I guess you want to see unity logs on the android devices, so you try to use the logcat.

I have used adb logcat before, but it was very annoying.

So i give up using adb logcat and made a plugin which can provide an in-game console to view full Unity console logs on devices.

You can check it out here: https://www.assetstore.unity3d.com/#!/content/44935

Enjoy it :)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by elich11 · Apr 12, 2017 at 03:37 PM

Simple, You don't need to do nothing (if you use studio), just open the logcat console and see the Unity debug prints there, you can also add a Unity tag to make it more readable. You will see all your Debug.Log prints.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by finologic · Aug 11, 2015 at 06:48 PM

1) Press shift -> Right click -> open command window here 2) Then type "adb devices" without quotes in cmd 3) It shows the list of devices 4) Now type adb logcat > somename.txt 5) Once you are done remove the usb. Then u will get the txt file and start exploring

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
  • 1
  • 2
  • ›

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

31 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

ADB ActivityManager error! 0 Answers

internal profiler enabled 0 Answers

Crash problem on device but not in unity IDE 1 Answer

Google Play OBB and adb logcat help? 1 Answer

Unable to reference a component. 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges