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 parameters, and then try to use.

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 corresponding driver for ADB, which is the first and must be done.

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

Back to the title, we are now talking about the use of the ADB push command. If 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.

Here's how to use this command:

Let's say your file is in the root directory of the D drive, like D:\file.txt.

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

It means to copy the File.txt file under the D packing directory under Windows to the/system/temp/directory of the small machine (mobile phone or tablet).

When you run this command, you may encounter failed to copy ' D:\file.xtxt ' to '/system/temp/': Error message for the Read-only file system.

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

ADB remount

It means to change the device to readable and writable.

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

After seeing Remount succeeded, you can execute again: adb push d:\file.txt/system/temp/so you can succeed, you can see the file.txt file in the/system/temp/directory of the small machine.

If you want to copy the files from the small machine to your computer, then it's easy to execute 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.