Android with ADB pull or push copy phone files to the computer, copy the phone database to the computer, copy the computer database to the phone

Source: Internet
Author: User



First, the ADB command configuration, if you encounter ADB is not an internal or external command, it is not a running program or a batch file. Configuration under Environment variables



1. ADB is not an internal or external command, nor is it a running program or batch file.



WORKAROUND: In My Computer-Properties-Advanced Computer Configuration-environment variables, system variables to find the path, the SDK Platform-tools added to it.


D:\Java\android\android-sdk\platform-tools





2. Use the command line to copy the files on the phone to the computer


ADB pull Sdcard/1222073679.png








Copy folder commands, such as copy the log folder to your computer's current directory


ADB pull sdcard/log/


Copy the folder into a folder under the current folder, such as copy 360 folder into the current folder of 360 inside


ADB pull sdcard/360/360


3, how to copy an app's database files to the computer



This method requires the root phone



Copy the database file to the phone SDcard first


E:\test>adb shell
[email protected]:/ $ su
su
[email protected]:/ # cd /data/data/com.android.contacts/databases/
cd /data/data/com.android.contacts/databases/
[email protected]:/data/data/com.android.contacts/databases # ls
ls
contacts_app.db
contacts_app.db-journal
[email protected]:/data/data/com.android.contacts/databases # cp contacts_app.db /mnt/sdcard/
_app.db /mnt/sdcard/                                                          <
[email protected]:/data/data/com.android.contacts/databases #





That is, after entering the SU input command, execute this command (copy the contacts_app.db to the SDcard card)


cp/data/data/com.android.contacts/databases/contacts_app.db/mnt/sdcard/


So the contacts_app.db database file is copied to the phone sdcard. On the Computer A folder shift+ right-click on a terminal, and then use the following statement copied to the computer can


ADB pull Sdcard/contacts_app.db


4. By the way, learn the push command.


ADB push aaa/contacts_app.db/sdcard/


Copy the file contacts_app.db to the phone sdcard.






Android with ADB pull or push copy phone files to the computer, copy the phone database to the computer, copy the computer database to the phone


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.