欢迎使用CSDN-markdown编辑器

来源:互联网 发布:java junit jar 编辑:程序博客网 时间:2024/06/16 06:16

List Connected Devices
adb devices
C:\Users\yanpingc>adb devices
List of devices attached
04157df4654e6308 device

C:\Users\yanpingc>adb -s 04157df4654e6308 shell
shell@zeroltechn:/ $
Specify the device
adb -s XXXXXXX
-d specify real device.
-e specify emulator.
Output logs
adb logcat
Adb logcat | grep START
Install/Uninstall an Application
Install: adb install -r *.apk
-r is upgrade the package if it exists.
You can uninstall an android application via the shell. Switch the data/app directory (cd /data/app) and simply delete your android application.
You can also uninstall an app via adb with the package name.
adb uninstall

Go to Shell
You can get shell access to your Android device via the following command.
adb shell
This will connect you to your device and give you Linux command line access to the underlying file system, e.g. ls, rm,, cd, mkdir, etc. The application data is stored in the directory “/data/data/package_of_your_app”.
Copy files from and to your device
You can copy a file from and to your device via the following commands.
// assume the gesture file exists on your Android device
adb pull /sdcard/gestures ~/test
// now copy it back
adb push ~/test/gesture /sdcard/gestures2

原创粉丝点击