Android 查看 無wifi/usb裝置的logcat方法,androidlogcat

來源:互聯網
上載者:User

Android 查看 無wifi/usb裝置的logcat方法,androidlogcat
Android 查看 無wifi/usb裝置的logcat方法一.情況

一個定製Android裝置,wifi被去掉,我需要調試一個USB裝置這樣也無法用usb來輸出logcat.

因為這個USB裝置需要核心驅動支援,因此無法在其它裝置調試。

因此有的方法有,一般想到用藍芽輸出logcat,但這是Android wear 才支援的特性。
在代碼中加入捕獲錯誤和異常代碼,寫入sd卡,這個工作量較大,而且麻煩

二.簡單的解決辦法1.安裝Android Terminal 軟體。

一個可用連結是
http://jackpal.github.io/Android-Terminal-Emulator/downloads/Term.apk
在顯示屏上輸入命令

2.在Terminal 輸入命令

logcat -f /sdcard/m.log

此後開始執行應用。

3.關閉log捕獲。

可以在終端視窗輸入 ctrl-c,一般是音量減 + c鍵。

4.下載捕獲結果

可以把裝置切換到隨身碟模式,或用adb pull /sdcard/m.log 從裝置下取到PC上分析查看,

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.