Android常用adb命令

來源:互聯網
上載者:User

標籤:檔案   輸入   screen   remount   卸載   讀取   serve   www.   html   

1、進入手機命令列模式

adb shell

有多部手機的話

adb -s + 手機編號 + shell

 

2、安裝apk

adb install 然後將apk檔案拖進命令列

 

      卸載apk

adb uninstall  + 包名

 

3、進入root許可權

adb shell

su

 

4、殺死server

adb kill-server

 

5、調起server

adb devices

或者

adb start-server

 

6、adb push命令(向手機寫入檔案或者讀取手機檔案)

demo:adb pushD:\Test.apk  /system/app/  寫入檔案

     adb push /system/app D:\     讀取檔案

注意:adb push不是安裝命令,是將一個檔案拷貝到手機指定的目錄中,只要有足夠的許可權,可以將檔案拷貝到 任意一個目錄中,甚至是放在/system/app/目錄中,成為系統的使用者程式

 

7、刪除應用

adb remount  //重新掛在系統磁碟分割,使系統磁碟分割重新可寫

adb shell

cd system/app

rm  *.apk

 

8、輸出所有已經安裝的應用

adb shell pm list packages -f

 

9、類比按鍵輸入

adb shell input keyevent  +keyevent對應的code

 

10、錄製螢幕

adb shell screenrecord /sdcard/demo.mp4

 

11、啟動一個activity

adb shell am start -n 包名/包名 + 類名

 

12、重新啟動

adb reboot

 

http://www.cnblogs.com/wansho/p/5104336.html

Android常用adb命令

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.