Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the default working directory for adb push/pull and how do I change it?

Tags:

android

adb

I pulled out a file from the android sdcard using adb and it seems it goes to c:\documents and settings\userName by default. I don't know how it got set to this folder since this is not where adb is installed, but probably has got something to do with the fact that both the workspace and .android folders are located here. How do I change this default location for pull command of adb?

like image 987
user13267 Avatar asked Aug 22 '13 05:08

user13267


People also ask

What is adb pull command?

Android Debug Bridge (adb) is a versatile command-line tool that lets you communicate with a device. The adb command facilitates a variety of device actions, such as installing and debugging apps, and it provides access to a Unix shell that you can use to run a variety of commands on a device.


1 Answers

The default directory for adb pull or adb push seems to be the current directory (aka . ). If you issue a command such as the following, not specifying the target directory

adb pull /boot.txt

the file (provided it exists) will be copied to the current directory.

Windows users:

Take notice of the following: If you are using Windows (Vista or newer), chances are that if the current directory requires elevated privileges to write on, Windows will silently replicate the directory structure of your current directory in a special folder called VirtualStore and will copy your files in it.

The full path for VirtualStore is: %LOCALAPPDATA%\VirtualStore, which most likely will translate into C:\Users\<account_name>\AppData\Local\VirtualStore.

So, in the following scenario,

C:\> cd "C:\Program Files (x86)\MyCustomADBInstallLocation"
C:\Program Files (x86)\MyCustomADBInstallLocation> adb pull /boot.txt

your file boot.txt will end up in this folder

C:\Users\<account_name>\AppData\Local\VirtualStore\Program Files (x86)\MyCustomADBInstallLocation\
like image 65
asm00 Avatar answered Sep 22 '22 14:09

asm00