Adb push command, adbpush

Source: Internet
Author: User

Adb push command, adbpush
Recently, I just got started with a tool (command). What command? It is the adb command. This command is purely a mouse and does not understand anything. So we can only adb -- help the parameter and then try to use it.

Today, we have encountered a problem where we need to copy a file to a midrange computer. A midrange computer can be understood as a mobile phone or tablet computer, and the camera runs android. I don't know how to copy it. So I searched and dealt with adb.

First, use USB to connect the computer to the small machine, and then install the corresponding adb driver. This is the first step and must be done.

After entering the doc system, you can enter the linux Command Line status by typing the adb shell, indicating that adb can be used.

Back to the title, we want to talk about the use of the adb push command. If you have the adb command installed in linux, you can use adb -- help to check how adb works. Here I will select one for analysis:

Adb push <local> <remote>-copy file/dir to device

This is how to use adb push. I don't need to explain this. You can understand it.

The following describes how to use this command:

Assume that your file is in the root directory of drive D, such as D: \ file.txt.

After entering the DOC, run the command adb push D: \ file.txt/system/temp/

The idea is to copy the file.txt file under the D-root directory under windows to the/system/temp/directory of the small machine (mobile phone or tablet.

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

How can this problem be solved? It's easy to 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 the following command again: adb push D: \ file.txt/system/temp/to complete the operation, you can see the file.txt file in the/system/temp/directory of the applet.

If you want to copy files from a computer to a computer, run the adb pull command. Is that easy?


Does the Android adb push command return an error message? Which command can be used to determine whether the file pushed to the mobile phone exists?

If a message is not returned after successful push, an error message is returned. For example, to push a file to a read-only directory:
Adb push test.txt/system/app/
Will return:
Failed to copy '11' to '/system/app // 11': Read-only file system

You can use:
Adb shell
Go to the mobile phone and view the push result in the specified directory.

I am a newbie. I just got started with android. I want to ask adb push if I want to copy a folder (including content) to a specified location, such as/system.

Yes. For example, you can use this command to copy all files under F: \ download \ mp3 to the sdcard/mp3 directory of your mobile phone.
Adb push F: \ download \ mp3/sdcard/mp3/

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.