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

the length of texts copying from devices to PC is limited to 4093. #1117

Closed
NewUserHa opened this issue Jan 28, 2020 · 7 comments
Closed

the length of texts copying from devices to PC is limited to 4093. #1117

NewUserHa opened this issue Jan 28, 2020 · 7 comments

Comments

@NewUserHa
Copy link

#145 (comment)

nowadays, the big file is not unusual.

what about increasing it to 32M or 64M? or even a whole binary data file like some .so or game data?

could it even detect clipboard changes automatically to avoid to let users need to find out they have to press c-c one time separately?

thanks!

@NewUserHa
Copy link
Author

4093 is even unable to copy an Adaway host/DNS plain text file from devices to PC.

@rom1v
Copy link
Collaborator

rom1v commented Jan 28, 2020

nowadays, the big file is not unusual.

If you want to copy a file, you should use adb pull.

what about increasing it to 32M or 64M?

At the default bitrate (8Mbits/s, ie 1Mbyte/s), this would be the same size as 32 or 64 seconds of video in the clipboard. That seems huge to me.

Anyway, I guess the Android clipboard has a lower limit anyway: https://stackoverflow.com/questions/28100218/is-there-any-characters-bytes-limit-in-the-android-clipboard-android-developme

could it even detect clipboard changes automatically to avoid to let users need to find out they have to press c-c one time separately?

I am not aware of any solution for this.

@NewUserHa
Copy link
Author

the big plain text config file is not unusual.

I feel the windows clipboard can handle big MBs plain text.

Then what about incresing it to 1M or 4M?

@NewUserHa
Copy link
Author

so it's able to copy some big logs from devices to PC

@reversegear
Copy link

so it's able to copy some big logs from devices to PC

Files can be easily copied via adb pull request
only text copy paste has a limitation

rom1v added a commit that referenced this issue Jun 4, 2020
Beyond 256k, SDL_GetClipboardText() returns an empty text on my machine.

Fixes #1117 <#1117>
rom1v added a commit that referenced this issue Jun 4, 2020
Beyond 256k, SDL_GetClipboardText() returns an empty text on my machine.

Fixes #1117 <#1117>
rom1v added a commit that referenced this issue Jun 4, 2020
Beyond 256k, SDL_GetClipboardText() returns an empty string on my
computer.

Fixes #1117 <#1117>
@rom1v
Copy link
Collaborator

rom1v commented Jun 4, 2020

could it even detect clipboard changes automatically to avoid to let users need to find out they have to press c-c one time separately?

This is done by #1465. Please test it and provide feedback :)

Then what about incresing it to 1M or 4M?

I increased the clipboard size form 4k to 256k: clipboard.

After all previous commits for making it possible, the increase is done by 913a9f3. On my computer, beyond 256k, SDL_GetClipboard() returns an empty string.

I implemented these changes above #1465, so shortcuts have changed! (TL;DR: just use LCtrl+c to copy and LCtrl+v to paste).

Feedback welcome :)

Binaries for testing

For windows users, take both scrcpy.exe and scrcpy-server, and replace them in your scrcpy v1.14 release.

For other platforms, take scrcpy-server and build only the client.

  • scrcpy.exe
    SHA256: b5fb3b193474702a6045545022e138a5daa7952ae3994dfa840491f694826231
  • scrcpy-server
    SHA256: 15533c3d4a4a12a20e2afe9cd7dfb8efecd3f990227ac8262bb79998c1fc3af5

rom1v added a commit that referenced this issue Jun 8, 2020
Beyond 256k, SDL_GetClipboardText() returns an empty string on my
computer.

Fixes #1117 <#1117>
rom1v added a commit that referenced this issue Jun 11, 2020
Beyond 256k, SDL_GetClipboardText() returns an empty string on my
computer.

Fixes #1117 <#1117>
@rom1v
Copy link
Collaborator

rom1v commented Jun 11, 2020

I rebased the increase from 4k to 256k on dev and merged, without the content of #1465 (which required more work).

@rom1v rom1v closed this as completed Jun 11, 2020
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

3 participants