Jim
Jim

Reputation: 9234

Android: adb pull file on desktop

Trying to copy file from device to desktop, here is a command:

adb pull sdcard/log.txt Users/admin/Desktop

But this command creates a folder Users/admin/Desktop inside platform-tools folder where adb is located. How to pull file to my desktop ?

Upvotes: 153

Views: 430880

Answers (6)

Vijayalaxmi Kalyani
Vijayalaxmi Kalyani

Reputation: 1

List item

Use following command to pull data from ADB

adb pull data/user/0/project package name/files/.local/share/dbname C:\Users\vijayalaxmi.k

data/user/0/project package name/files/.local/share/dbname this path you will get when you debug application. i.e database path

project package name example => com.example

instead of C:\Users\vijayalaxmi.k user your own path where you want to save your file. for example, c:\documents

Upvotes: 0

niek tuytel
niek tuytel

Reputation: 1179

Be root, Define file on device and define new filename.

adb root
adb pull /data/data/.../databases/launcher.db launcher.db

Upvotes: 9

CommonsWare
CommonsWare

Reputation: 1006539

Use a fully-qualified path to the desktop (e.g., /home/mmurphy/Desktop).

Example: adb pull sdcard/log.txt /home/mmurphy/Desktop

Upvotes: 191

David your friend
David your friend

Reputation: 171

On Windows, start up Command Prompt (cmd.exe) or PowerShell (powershell.exe). To do this quickly, open a Run Command window by pressing Windows Key + R. In the Run Command window, type "cmd.exe" to launch Command Prompt; However, to start PowerShell instead, then type "powershell". If you are connecting your Android device to your computer using a USB cable, then you will need to check whether your device is communicating with adb by entering the command below:

# adb devices -l  

Next, pull (copy) the file from your Android device over to Windows. This can be accomplished by entering the following command:

# adb pull /sdcard/log.txt %HOME%\Desktop\log.txt  

Optionally, you may enter this command instead:

# adb pull /sdcard/log.txt C:\Users\admin\Desktop\log.txt 

Upvotes: 6

Kirtap Llahsram
Kirtap Llahsram

Reputation: 13

do adb pull \sdcard\log.txt C:Users\admin\Desktop

Upvotes: -2

Alex P.
Alex P.

Reputation: 31666

Judging by the desktop folder location you are using Windows. The command in Windows would be:

adb pull /sdcard/log.txt %USERPROFILE%\Desktop\

Upvotes: 56

Related Questions