Skip to Content
Android Developer Tools深入精要
book

Android Developer Tools深入精要

by Mike Wolfson
July 2014
Intermediate to advanced
248 pages
5h 19m
Chinese
GoTop Information, Inc.
Content preview from Android Developer Tools深入精要
Android Debug Bridge
ADB
|
19
[Page-21]
你會看到
#
符號則代表你已經在
shell
模式。當你要離開遠端
shell
時,可以利用
Ctrl+D
或輸入
exit
來結束
shell
會話。
下面的例子示範如何存取
shell
;使用一般的
Linux
指令來瀏覽目錄結構,讀取一個檔
案的內容,最後離開
shell
等待輸入下一個指令。
$ adb shell
root@android:/ # pwd
/
root@android:/ # cd /system/etc
root@android:/system/etc # pwd
/system/etc
root@android:/system/etc # cat ./hosts
127.0.0.1 localhost
root@android:/system/etc # exit
$
一次性指令模式
這也可以做到用非互動式的方式來執行指令。你可以在
shell
關鍵字後面輸入想要執行
的指令。
adb shell
指令
下個例子示範如何用單項指令來讀取
/system/etc/hosts
檔案,執行指令,並等候下個指
令,而沒有保留對遠端
shell
的連線。
$ adb shell cat /system/etc/hosts
127.0.0.1 localhost
$
取得系統資訊
有很多情況你需要系統的各種詳細資訊,一些有用的指令可以傾印出豐富的系統訊
息,包括服務狀態、系統統計資料以及錯誤訊息。若你要分析應用程式的狀態及特定
細節,則你會需要收集這些統計資料。 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Android 高效能多執行緒

Android 高效能多執行緒

Anders Goransson
深入淺出 jQuery

深入淺出 jQuery

Ryan Benedetti, Ronan Cranley
HTML5 錦囊妙計

HTML5 錦囊妙計

Christopher Schmitt, Kyle Simpson

Publisher Resources

ISBN: 9789863470861