Windows under ADB (Android Debug Bridge) basic commands (Continuous update ... )

Source: Internet
Author: User
Tags file copy tmp folder

Preface: Just started to learn Android (adhere to 1 notes a day ^_^), more practical command is the ADB, so the first to learn these, mainly with the real machine debugging, simulator is genymotion, so emulator temporarily not need ha, can follow up

1. View simulator/Connection device:

By default, all ADB clients communicate with the ADB service using a 5037 port number. Each emulator/Device instance requires a pair of contiguous ports: even ports for console connections, odd ports for ADB connections.

(the ADB sometimes fails to start and needs to see if the lower number is occupied: Netstat-aon | Findstr "5037" and then get PID; Tasklist-aon | findstr "pid" gets the process that is currently using the port;

Many software will occupy, so you can modify the ADB port number: In the "System variables" add android_adb_server_port= "XXX" can be);

ADB device: Displays a list of currently connected emulators/devices. Input: Serial number (device type and port number) and status (offline (not connected), device (connected)) two. ---> only indicates that the device is currently connected and does not indicate that it has started to complete. --------------Real-Computer connectivity

2. Specify an emulator/device instance to perform some action : Adb-s <name> <command>:

Install the application: Adb-s <name> install <apk include Path>:install is the location of the APK that will be installed on the emulator/device to find the APK to install---> Install this software on the specified device

Success after viewing the device Desktop Discovery installation succeeded ^_^

According to the above information, and then use the ES file browser (phone to the software to open root) view: Data/local/tmp found this software, so you can speculate: first download the APK to the local TMP folder, and then install;

3. File copy of simulator/device instance:

ADB pull <device> <local>--------> The files in the device (either SD card or phone internal storage space can be, as long as the specified location is available) push to local (computer) specified location


Transfer from local to phone storage:

ADB push <local> <device>------------->adb push d://testapk//testchinese.pdf/storage/emulated/0/ Ninarming-----(from the computer to the internal storage of the phone)--it is found that if the transmission is in Chinese, red Rice mobile phone (with red rice 1s connection) is not recognized, but the shell is recognized, letters or numbers are supported

Pull and push:

Pull--> pull down the meaning, there is no kind of pull the data from the cloud feel, and the device can be analogous to the cloud, because it can be remote, not through the USB connection, can be wireless, remote access, So the relative file from the device to the current CMD computer (local) is used pull-->adb pull <romote> <local>;

Push---> Push up, because CMD is the computer you're working on (local), relative to the horizontal plane, and the device-to-cloud is above sea level, you need the impetus to send the file up, so adb push <local> < Romote>

4. Enter the shell:

ADB shell-----------> into the shell,

Exit-----------------> is exit shell

A. The following is the entry to the shell, first look at the files in the specified directory LS;

B. Create folder mkdir Testmakedir;

C. See if a successful LS is created;

D. Delete the specified folder RmDir testmakedir;

E. Check to see if the success LS is removed and then exit.

Windows under ADB (Android Debug Bridge) basic commands (Continuous update ... )

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.