Android uses the adb command to install software

Source: Internet
Author: User

Preparations:

Make sure that adb.exe AdbWinApi is available under \ android-sdk-windows \ tools. dll AdbWinUsbApi. dll files. If they are not copied from \ android-sdk-windows \ platform-tools \ To tools (some tools of android sdk 3.0 and later are not stored in tools by default, as an optional configuration, place it under platform-tools)

Start:

Install apk on your mobile phone:

Adb install c: \ HA_drocap2_JOY3G.apk

 

Start the installed program. If the mobile phone has the root permission and enters the data \ app directory:

# Am start-n cn. vsp/cn. vsp. StartActivty

View the corresponding logs:

Adb logcat-s welcome: I

 

[Operation Command]

1. View Devices

ADB Devices

This command is used to view the currently connected devices. The android devices or simulators connected to the computer are listed and displayed.

2. Install software

ADB install

Adb install <apk file path>: This command installs the specified apk file on the device.

3. uninstall software

ADB uninstall <software Name>

ADB uninstall-k <software Name>

If the-k parameter is added, the software is uninstalled but the configuration and cache files are retained.

4. Enter the shell of the device or simulator:

ADB Shell

Through the above command, you can enter the shell environment of the device or simulator. In this Linux Shell, You can execute various Linux commands. In addition, if you only want to execute one shell command, you can use the following methods:

ADB shell [command]

For example, adb shell dmesg prints the kernel debugging information.

5. Release Port

You can set any port number as the request port from the host to the simulator or device. For example:

ADB forward TCP: 5555 TCP: 8000

6. Send files to the device from the computer

ADB push <local path> <remote path>

Use the push command to copy files or folders on the local computer to the device (mobile phone)

7. download files from your device to your computer

ADB pull <remote path> <local path>

Run the pull command to copy files or folders on the device (mobile phone) to the local computer.

8. view the bug report

ADB bugreport

9. Record wireless communication logs

In general, there are a lot of wireless communication logs and there is no need to record them during operation, but we can still set the record through the command:

ADB Shell

Logcat-B radio

10. Obtain the device ID and serial number.

ADB get-Product

ADB get-serialno

ADB Shell

Sqlite3

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.