Common Android command lines-ADB and android-adb

Source: Internet
Author: User

Common Android command lines-ADB and android-adb
Configuration environment:

  • Configure the environment on MAC

(1) Start the terminal. You can search for "terminals" in Spotlight"

(2) Go to the HOME directory. Enter the command cd $ HOME in "terminal ".

(3) Update the. bash_profile file. If the file does not exist, enter the command to create: touch. bash_profile

(4) open the. bash_profile file and enter the command: open-e. bash_profile.

(5) configure the ADB environment. Enter your own path:

Export PATH =$ {PATH}:/Users/apple/Library/Android/sdk/platform-tools

Export PATH =$ {PATH}:/Users/apple/Library/Android/sdk/tools

(6) save the file and close. bash_profile.

(7) Update the environment variable. Command: source. bash_profile

(8) check whether the configuration is successful. Command: adb devices.

If the preceding result is displayed, the configuration is successful.

Common ADB commands:

1. Start SDK Manager: android
2. Start DDMS: dams
3. obtain all the simulators currently running: adb devices
4. install the application: adb install-r application .apk
Uninstall application: adb uninstall application package name
5. Obtain the file in the simulator: adb pull <remote> <local>
6. Write a file to the simulator: add push <local> <remote>
7. Enter the shell mode of the simulator: adb shell
8. view Log information in the command line: adb logcat-s label name
9. view the help information: adb help
10. Filter logs under a package only: adb logcat | grep "com. xsp"

Terminal
1. open multiple terminals: command + N
2. open multiple windows: command + T


Adb shell
Grep
Adb bash

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.