android 常用命令

 

列出连接的设备

adb devices 

安装apk:

adb install bin/MyFirstApp-debug.apk
卸载apk

adb uninstall  包名

如果你不知道这个包名,在AndroidManifest.xml里的找package="com.example.helloandroid"(apktool d *.apk 的AndroidManifest.xml可以看到内容,直接解压看不到

或者可以通过adb shell pm list packages 列出目标设备中已安装的应用程序包。

 

adb logcat [ <filter-spec> ] - View device log

adb push [-p] <local> <remote>
                             - copy file/dir to device
                               ('-p' to display the transfer progress)
adb pull [-p] [-a] <remote> [<local>]
                             - copy file/dir from device
                               ('-p' to display the transfer progress)
                               ('-a' means copy timestamp and mode)

adb shell                    - run remote shell interactively
adb shell <command>          - run remote shell command

 

参考:

下面这个tutorial不错。

http://www.herongyang.com/Android/index.html

原文地址:https://www.cnblogs.com/cute/p/4091405.html