android中adb命令最全總結(jié)
一、查看adb版本
adb version
C:\Users\Administrator>adb version Android Debug Bridge version 1.0.41 Version 30.0.4-6686687 Installed as E:\platform-tools\adb.exe
二、查看已經(jīng)連接的設(shè)備
adb devices
C:\Users\Administrator>adb devices List of devices attached 127.0.0.1:7555 device
三、獲取手機(jī)序列號(hào)
adb get-serialno
C:\Users\Administrator>adb get-serialno 127.0.0.1:7555
四、查看手機(jī)設(shè)別型號(hào)
adb shell getprop ro.product.model
C:\Users\Administrator>adb shell getprop ro.product.model Xiaomi
五、查看手機(jī)分辨率
adb shell wm size
C:\Users\Administrator>adb shell wm size Physical size: 1440x810
六、獲取手機(jī)的mac地址
adb shell cat /sys/class/net/wlan0/address
C:\Users\Administrator>adb shell cat /sys/class/net/wlan0/address 08:00:27:7e:49:9c
七、查看日志
adb logcat
C:\Users\Administrator>adb logcat
八、查看電池信息
adb shell dumpsys battery
C:\Users\Administrator>adb shell dumpsys battery Current Battery Service state: AC powered: true USB powered: false Wireless powered: false Max charging current: 2000000 status: 2 health: 2 present: true level: 72 scale: 100 voltage: 4036 temperature: 326 technology: Li-poly
九、查看進(jìn)程
adb shell ps
C:\Users\Administrator>adb shell ps USER PID PPID VSIZE RSS WCHAN PC NAME root 1 0 2732 1272 ep_poll 08126b35 S /init root 2 0 0 0 kthreadd 00000000 S kthreadd root 3 2 0 0 smpboot_th 00000000 S ksoftirqd/0 root 5 2 0 0 worker_thr 00000000 S kworker/0:0H
十、查看cpu使用情況
adb shell top
C:\Users\Administrator>adb shell top
十一、安裝apk
- apk文件需要放到你命令執(zhí)行的文件夾下,或者寫上apk的絕對(duì)路徑
- adb install [apk文件的路徑]
C:\Users\Administrator>adb install douyin.apk Performing Push Install
- 多個(gè)設(shè)備安裝apk
- adb -s [設(shè)備號(hào)] install [apk文件的路徑]
C:\Users\Administrator>adb -s 127.0.0.1:7555 install douyin.apk Performing Push Install
- 如果apk已經(jīng)存在,需要覆蓋安裝
- adb install -r [apk文件的路徑]
C:\Users\Administrator>adb install -r douyin.apk Performing Push Install
十二、卸載apk
- 普通卸載
- adb uninstall [apk文件的路徑]
C:\Users\Administrator>adb uninstall douyin.apk
- 卸載但是保留數(shù)據(jù)
- adb uninstall -k [apk文件的路徑]
C:\Users\Administrator>adb uninstall -k douyin.apk
十三、查看手機(jī)上所有安裝的app包名
adb shell pm list packages
C:\Users\Administrator>adb shell pm list packages package:com.rxgx.xx.ldzw package:com.tanwan.h5.xrxhj package:com.xinxin.mobile.dsfh package:com.xinxin.mobile.llwg package:com.android.providers.telephony package:com.xinxin.H5.jbdfhyc package:com.ss.android.ugc.aweme
十四、獲取某個(gè)應(yīng)用包名的啟動(dòng)入口
- adb shell dumpsys package com.ss.android.ugc.aweme | findstr activity
- com.ss.android.ugc.aweme/com.ss.android.sdk.activity.BootstrapActivity 這個(gè)就是抖音的啟動(dòng)入口
C:\Users\Administrator>adb shell dumpsys package com.ss.android.ugc.aweme | findstr activity
ad29111 com.ss.android.ugc.aweme/com.ss.android.sdk.activity.BootstrapActivity
十五、啟動(dòng)某個(gè)app
adb shell am start -n [包名]/[啟動(dòng)入口]
C:\Users\Administrator>adb shell am start -n com.ss.android.ugc.aweme/com.ss.android.sdk.activity.BootstrapActi
vity
Starting: Intent { cmp=com.ss.android.ugc.aweme/com.ss.android.sdk.activity.BootstrapActivity }
十六、屏幕截圖
adb shell screencap [保存路徑]
C:\Users\Administrator>adb shell screencap /sdcard/screen.png
十七、錄制視頻
adb shell screenrecord [保存路徑]
C:\Users\Administrator>adb shell screenrecord /sdcard/demo.mp4
十八、上傳文件到手機(jī)
adb push 文件名 手機(jī)端SDCard路徑
C:\Users\Administrator>adb push douyin.apk sdcard/douyin.apk
十九、從手機(jī)端下載文件
adb pull [手機(jī)上文件路徑]
C:\Users\Administrator>adb pull sdcard/douyin.apk
二十、模擬屏幕點(diǎn)擊事件
adb shell input tap x坐標(biāo)軸 y坐標(biāo)軸
C:\Users\Administrator>adb shell input tap 500 1450
二十一、模擬手勢滑動(dòng)事件
adb shell input swipe 開始x軸 開始y軸 結(jié)束x軸 結(jié)束y軸 過程持續(xù)時(shí)間毫秒
C:\Users\Administrator>adb shell input swipe 100 500 100 1450 100
二十二、模擬點(diǎn)按鍵盤按鈕
adb shell input keyevent [key值]
C:\Users\Administrator>adb shell input keyevent 25
二十三、向屏幕輸入一些信息
- db shell input text [字符串信息]
- %s是空格
C:\Users\Administrator>db shell input text "insert%stext%shere"
二十四、發(fā)送廣播
adb shell am broadcast -a "broadcastactionfilter"
C:\Users\Administrator>adb shell am broadcast -a "broadcastactionfilter"
二十五、使用自帶瀏覽器打開網(wǎng)頁
adb shell am start -a [瀏覽器包名] -d [網(wǎng)址]
C:\Users\Administrator>adb shell am start -a "android.intent.action.VIEW" -d https://www.google.com
二十六、獲取手機(jī)root權(quán)限
adb vivoroot
C:\Users\Administrator>adb vivoroot
二十七、連接不穩(wěn)定時(shí)需要掛載
adb remount
C:\Users\Administrator>adb remount
二十八、重啟手機(jī)
正常重啟
C:\Users\Administrator>adb reboot
重啟手機(jī)到recovery
C:\Users\Administrator>adb reboot recovery
重啟到bootloader界面
C:\Users\Administrator>adb reboot bootloader
二十九、關(guān)閉adb服務(wù)
C:\Users\Administrator>adb kill-server
三十、啟動(dòng)adb服務(wù)
C:\Users\Administrator>adb start-server
到此這篇關(guān)于android中adb命令最全總結(jié)的文章就介紹到這了,更多相關(guān)android adb命令 內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!
- Android設(shè)備adb連接后顯示device unauthorized解決方案
- 基于adbkit的android設(shè)備管理(精簡版stf)
- android中的adb命令學(xué)習(xí)
- 超詳細(xì)的Android開發(fā)調(diào)試工具ADB命令及安裝介紹
- 詳解android adb常見用法
- adb通過wifi連接android設(shè)備流程解析
- Android adb命令中pm工具的作用及用法說明
- Android adb安裝apk時(shí)提示Invalid APK file的問題
- Android user版通過adb_enable開啟adb 調(diào)試 不提示對(duì)話框的流程分析
- Android PC端用ADB抓取指定應(yīng)用日志實(shí)現(xiàn)步驟
- Android 實(shí)現(xiàn)永久性開啟adb 的root權(quán)限
- 關(guān)于ADB的Android Debug Bridge(安卓調(diào)試橋)那些事
- Android客制化adb shell進(jìn)去后顯示shell@xxx的標(biāo)識(shí)
- android設(shè)置adb自帶screenrecord錄屏命令
- Android 修改adb端口的方法
- Android中ADB命令用法大結(jié)局
- Android開啟ADB網(wǎng)絡(luò)調(diào)試方法
- Android ADB簡介、安裝及使用詳解
相關(guān)文章
Android用PopupWindow實(shí)現(xiàn)新浪微博的分組信息實(shí)例
PopupWindow可以實(shí)現(xiàn)浮層效果,而且可以自定義顯示位置,本篇文章主要介紹Android用PopupWindow實(shí)現(xiàn)新浪微博的分組信息,有需要的可以了解一下。2016-11-11
Android 根據(jù)EditText搜索框ListView動(dòng)態(tài)顯示數(shù)據(jù)
這篇文章主要介紹了Android 根據(jù)EditText搜索框ListView動(dòng)態(tài)顯示數(shù)據(jù)的相關(guān)資料,需要的朋友可以參考下2016-09-09
Android使用AlertDialog實(shí)現(xiàn)對(duì)話框
本文主要介紹了Android使用AlertDialog實(shí)現(xiàn)對(duì)話框的相關(guān)知識(shí),具有很好的參考價(jià)值。下面跟著小編一起來看下吧2017-03-03
Android常用三方庫混淆規(guī)則整理(小結(jié))
這篇文章主要介紹了Android常用三方庫混淆規(guī)則整理(小結(jié)),小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-07-07
Android自定義橫向滑動(dòng)菜單的實(shí)現(xiàn)
這篇文章主要介紹了Android自定義橫向滑動(dòng)菜單的實(shí)現(xiàn),小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2018-05-05
Android?Flutter中異常處理的方法總結(jié)
這篇文章主要為大家詳細(xì)介紹了Android?Flutter中異常處理的相關(guān)知識(shí),文中的示例代碼講解詳細(xì),具有一定的學(xué)習(xí)價(jià)值,感興趣的小伙伴可以跟隨小編一起學(xué)習(xí)一下2023-06-06
Android自定義ViewGroup嵌套與交互實(shí)現(xiàn)幕布全屏滾動(dòng)
這篇文章主要為大家介紹了Android自定義ViewGroup嵌套與交互實(shí)現(xiàn)幕布全屏滾動(dòng)效果示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪2023-01-01
Android App實(shí)現(xiàn)監(jiān)聽軟鍵盤按鍵的三種方式
本篇文章主要介紹Android App實(shí)現(xiàn)監(jiān)聽軟鍵盤按鍵的三種方式,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下。2017-03-03

