Use of the ADB push command

Source: Internet
Author: User

Recently contacted a tool (command), what command? is the ADB command, the command is purely a small white mouse, do not understand anything, so only the ADB--help the number of references. Then try to use it.

Today encountered a problem, need to copy a file to the small machine, the small machine can be understood as a mobile phone or tablet similar to the computer, the device is running Android. I don't know how to copy it immediately. So the search for a, from then on with the ADB dealings.

The first step is to use USB to connect the computer with the small machine and then install the ADB counterpart driver.

After entering the doc system, typing the ADB shell can enter the Linux command line state, indicating that ADB is able to use it.

Back to the headline, we are now talking about the use of the ADB push command. Assuming that your Linux is also installed with ADB commands, you can use ADB--help to see how the ADB is used. Here I choose a bar to analyze:

ADB push <local> <remote>-copy File/dir to device

This is the use of ADB push, this does not need me to explain, we all understand it.

The following describes how to use this command:

Suppose your file is under the root folder of the D drive. For example D:\file.txt

After entering Doc. Using the command: ADB push d:\file.txt/system/temp/

This means that the file.txt file under the D-Packing folder under Windows is copied to the/system/temp/folder of the small machine (phone or tablet).

When you run this command. You may encounter an error message from the failed to copy ' D:\file.xtxt ' to '/system/temp/': Read-only file system.

How to solve it? Very easy, use the following command:

Exit ADB first, then remount.!!

ADB remount

It means to change the device to readable and writable.

adb remount-remounts the/system partition on the device read-write

Once you see Remount succeeded, you will be able to run again: adb push d:\file.txt/system/temp/so you can succeed, you can see the file.txt file under the/system/temp/folder of the small machine.

Let's say you want to copy the files from your small machine to your computer and run the ADB pull command.

Use of the ADB push command

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.