Display Logcat in Terminal?

我只是一个虾纸丫 提交于 2019-12-03 05:26:13

问题


Edit/Solution: execute ./adb logcat in the platform-tools directory.


Original Question:

I know that there's a way to display the LogCat for an Android device/emulator in Terminal on my Mac, but I'm not sure what the command is. This is mostly due to my incompetence with UNIX commands.

Here are my previous failures:

adb logcat
adb.exe logcat
FULL_PATH_TO_PLATFORM_TOOLS/adb logcat
FULL_PATH_TO_PLATFORM_TOOLS/adb.exe logcat


回答1:


Ah, just adb logcat should work. You may need to do an explicit path if the Android SDK tools directories aren't in your PATH, but that should do it.




回答2:


If you have NPM, you could install module:

$ npm install -g logcat

that will provide you to start monitoring colored logcat in console and //127.0.0.1/.

$ logcat

Here is description




回答3:


In Terminal Emulator:

logcat > /sdcard/logfile.txt

This will put the logcat content in /sdcard/logfile.txt (your sd card main directory) obviously. Source (with more ways to acquire logcat):



来源:https://stackoverflow.com/questions/7601178/display-logcat-in-terminal

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!