Android: Those commonly used ADB commands

Source: Internet
Author: User
Tags file copy



1. List the current provisioning:
ADB devices
For example:
localhost:~ newuser$ ADB devices
List of devices attached
Bh903qdw15Device
41008990d29eb000Device


2. For a particular device
Adb-s <serialNumber> <command>
For example:
Adb-s BH903QDW15 Install hello.apk


3. Install the App
ADB install <path_to_apk>


4. File copy
4.1 Pull from phone to local
ADB pull <remote> <local>
For example:
ADB pull/sdcard/foo.txt foo.txt
4.2 Push from local to phone
ADB push <local> <remote>
For example:
ADB push Foo.txt/sdcard/foo.txt


5. Uninstalling the Software
adb shell pm Uninstall <packageName>
For example:
Adb-s bh903qdw15 Shell pm Uninstall-k Com.example.hello
-K Preserve data after uninstallation
Note: adb shell PM [command]
There are many commands: see: http://developer.android.com/tools/help/adb.html


6. Screen recording:
ADB Shell Screenrecord/sdcard/demo.mp4
Once you have finished recording, you can copy the file to local via pull, see 4.1


7. View all adb shell instructions
ADB Shell Ls/system/bin


8. Click Test randomly on the screen:
adb shell monkey-v-P <packageName> <number>


9. List the package name of the installed software:
ADB shell PM List Packages
For example, list the package names of third-party software:
ADB shell PM List packages-3


More commands: http://developer.android.com/tools/help/adb.html

-------------------------------------------------------------------

more communication, Android Development Alliance QQ Group: 272209595


Android: Those commonly used ADB commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.