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

Avoid rewrites in tmp #1880

Open
lollita opened this issue Nov 3, 2020 · 13 comments
Open

Avoid rewrites in tmp #1880

lollita opened this issue Nov 3, 2020 · 13 comments

Comments

@lollita
Copy link

lollita commented Nov 3, 2020

If I have understood correctly, scrcpy, every time it runs, it writes scrcpy-server.odex and scrcpy-server.vdex in /data/local/tmp.
Do it is possible to avoid all these rewrites, and keep the file by overwriting it if not exist or there is a new one?

@rom1v
Copy link
Collaborator

rom1v commented Nov 3, 2020

See #1722.

Why is it a problem for you?

@lollita
Copy link
Author

lollita commented Nov 3, 2020

I think it's unnecessary wear and tear on the memory card if avoidable.
I subscribe #1722.

@Biswa96
Copy link
Contributor

Biswa96 commented Nov 3, 2020

Maybe make an apk package for the scrcpy-server?

@lollita
Copy link
Author

lollita commented Nov 3, 2020

I use
chmod -w /data/local/tmp/oat/arm64/scrcpy-server.*
Until the new version.

@npes87184
Copy link
Contributor

npes87184 commented Nov 4, 2020

If user has concern about this, the best way is to create an apk and install it. However, it may need to do something to make server as apk. In short time, maybe we can remain the server in device and calculate the checksum to ensure the server in device is expected.

@rom1v
Copy link
Collaborator

rom1v commented Nov 11, 2020

For information, I started to work on a new option (probably --install) which would install the server (if the same version is not already installed) instead of pushing it (the same way I do for gnirehtet). As a side effect, this will solve this issue.

The goal is to install a real Android app. This will pave the way to:

  • provide an IME (to inject non-ASCII text)
  • forward audio (a proper integration of what sndcpy does)
  • optionally mirror camera instead of the screen (which requires a user authorization from an app)

@npes87184
Copy link
Contributor

For information, I started to work on a new option (probably --install) which would install the server (if the same version is not already installed) instead of pushing it (the same way I do for gnirehtet). As a side effect, this will solve this issue.

The goal is to install a real Android app. This will pave the way to:

  • provide an IME (to inject non-ASCII text)
  • forward audio (a proper integration of what sndcpy does)
  • optionally mirror camera instead of the screen (which requires a user authorization from an app)

I am excited about this, things like #1484 can also be solved by provding apk. For example, we can add a notification or toast directly on phone.

@quyleanh
Copy link
Contributor

@rom1v how about progress of scrcpy's IME?

@rom1v
Copy link
Collaborator

rom1v commented Feb 22, 2021

Unfortunately, no. For now, I'm working on #40 to add asynchronous swscale, and I'm doing more refactors (so that in the end I will be able to split the core from the UI).

Also related, as an alternative, maybe #2130 could allow proper text injection (I don't know).

@quyleanh
Copy link
Contributor

Thank you. I hope the IME can be implemented soon.

@lollita
Copy link
Author

lollita commented Aug 21, 2021

ls: /data/local/tmp/oat/arm64/scrcpy-server.* : No such file or directory
ls: /data/local/tmp/scrcpy-server.*: No such file or directory

@rom1v
Copy link
Collaborator

rom1v commented Oct 2, 2022

Please check #3517.

@lollita
Copy link
Author

lollita commented Mar 12, 2023

I replaced "scrcpy-server" with a 0 size file.
It seems that it does not write the file but I get "scrcpy-server: 1 file pushed, 0 skipped."
Why?

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

No branches or pull requests

5 participants