Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy files from phone to PC #1227

Open
rpawar0703 opened this issue Mar 20, 2020 · 8 comments
Open

Copy files from phone to PC #1227

rpawar0703 opened this issue Mar 20, 2020 · 8 comments

Comments

@rpawar0703
Copy link

Is there any way to copy stuff from phone to pc like drag and drop feature. If not, please implement it. Thanks

@quancayda
Copy link

Yeah, I also expect scrcpy has that function like way Samsung dex did J.

@rpawar0703
Copy link
Author

Yeah, I also expect scrcpy has that function like way Samsung dex did J.

you can use "adb pull sdcard/filename or foldername" to copy files from phone to PC even without scrcpy

@quancayda
Copy link

Yeah, I also expect scrcpy has that function like way Samsung dex did J.

you can use "adb pull sdcard/filename or foldername" to copy files from phone to PC even without scrcpy

Haha, i mentioned drag copy function to drag a file from scrcpy screen to PC.
No need to take much time for using adb pull while you can copy it via usb cable more quickly :).

@Nuc1eoN
Copy link

Nuc1eoN commented Mar 17, 2022

you can use "adb pull sdcard/filename or foldername" to copy files from phone to PC even without scrcpy

Yes but that is not a visual way of doing it.
Also how would you copy folders from a Work profile using this method? It is not possible afaik.

@necros2k7
Copy link

@Nuc1eoN , @rom1v Simple GUI file manager will be fine like in Myphoneexplorer or like in https://www.tightvnc.com/download.php

@kagbodji
Copy link

kagbodji commented Sep 8, 2023

I'll throw this idea in the hat: perhaps a mapped folder where the server and client cooperate to do file copying (perhaps using adb pull in the background) could work. Think Rsync between host computer and the phone.

  1. when starting scrcpy, provide a mapped dir to the host computer. It could be in the format of --fle_sync_dir=device_dir:host_dir. Those directories would be created if they don't exist
  2. the user simply copies/pastes or drags/drops files on the device_dir to the host_dir or vice-versa to see the files appear on either device.
  3. the user should be aware that files will be synced between this dirs and it's up to them to manage the dirs (i.e., clearing files as needed -- or there could be a config to auto-remove file from the source after it's been copied over)

@imvickykumar999
Copy link

imvickykumar999 commented Nov 17, 2023

This might help, after connecting phone ...

adb connect 192.168.0.102

Run below code. https://pypi.org/project/pure-python-adb/#pull

from ppadb.client import Client as AdbClient

client = AdbClient(host="127.0.0.1", port=5037)
device = client.device('192.168.0.102:5555')

file='image.png'
path='Download/'
device.pull(f"/sdcard/{path}/{file}", f"static/{file}")

ScrCpy GUI: https://github.com/imvickykumar999/Android-Trojan-Horse/releases/tag/SDcard_Manipulator

@perrette
Copy link

perrette commented Jan 31, 2024

The idea by @kagbodji does not sound very simple to do in practice. What to do on startup if the folders content differ?
I'd imagine instead doing exactly like copy PC -> Phone works: just drop the file in the Download folder from the PC. However, I am not familiar at all with Android, but is it possible to simply get the drag and drop events from any app in USB debug mode? Does this event include the actual path of the underlying data, or (more likely) does it simply contain some visual info? If you can't get the file path from any app (or from a set of supported apps), then I don't see how that's possible to do that from the phone. The only remaining, and by far simplest option in my limited perspective, is to mount the Android drive on the host computer, and let the user move files around using the usual host computer file manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants