mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-03-13 15:44:27 +01:00
Compare commits
16 Commits
workaround
...
issue5182
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0c95794463 | ||
|
|
523f939532 | ||
|
|
dd47cefa47 | ||
|
|
44b3fd82b1 | ||
|
|
cc41115625 | ||
|
|
773c23fda2 | ||
|
|
992b4922fe | ||
|
|
67f93350f6 | ||
|
|
52136268ef | ||
|
|
0a6ccdc4df | ||
|
|
5d2441d198 | ||
|
|
bbfac9ae1f | ||
|
|
65bd6bd8d4 | ||
|
|
cc8e6133b0 | ||
|
|
126da0cb18 | ||
|
|
1d3b6dac69 |
3
.github/FUNDING.yml
vendored
Normal file
3
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
github: [rom1v]
|
||||
liberapay: rom1v
|
||||
custom: ["https://paypal.me/rom2v"]
|
||||
26
.github/ISSUE_TEMPLATE/bug_report.md
vendored
26
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -7,17 +7,25 @@ assignees: ''
|
||||
|
||||
---
|
||||
|
||||
- [ ] I have read the [FAQ](https://github.com/Genymobile/scrcpy/blob/master/FAQ.md).
|
||||
- [ ] I have searched in existing [issues](https://github.com/Genymobile/scrcpy/issues).
|
||||
_Please read the [prerequisites] to run scrcpy._
|
||||
|
||||
**Environment**
|
||||
- OS: [e.g. Debian, Windows, macOS...]
|
||||
- scrcpy version: [e.g. 1.12.1]
|
||||
- installation method: [e.g. manual build, apt, snap, brew, Windows release...]
|
||||
- device model:
|
||||
- Android version: [e.g. 10]
|
||||
[prerequisites]: https://github.com/Genymobile/scrcpy#prerequisites
|
||||
|
||||
_Also read the [FAQ] and check if your [issue][issues] already exists._
|
||||
|
||||
[FAQ]: https://github.com/Genymobile/scrcpy/blob/master/FAQ.md
|
||||
[issues]: https://github.com/Genymobile/scrcpy/issues
|
||||
|
||||
## Environment
|
||||
|
||||
- **OS:** [e.g. Debian, Windows, macOS...]
|
||||
- **Scrcpy version:** [e.g. 2.5]
|
||||
- **Installation method:** [e.g. manual build, apt, snap, brew, Windows release...]
|
||||
- **Device model:**
|
||||
- **Android version:** [e.g. 14]
|
||||
|
||||
## Describe the bug
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
On errors, please provide the output of the console (and `adb logcat` if relevant).
|
||||
|
||||
8
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
8
.github/ISSUE_TEMPLATE/question.md
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
---
|
||||
name: Question
|
||||
about: Ask a question about scrcpy
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
23
README.md
23
README.md
@@ -2,7 +2,7 @@
|
||||
source for the project. Do not download releases from random websites, even if
|
||||
their name contains `scrcpy`.**
|
||||
|
||||
# scrcpy (v2.5)
|
||||
# scrcpy (v2.6.1)
|
||||
|
||||
<img src="app/data/icon.svg" width="128" height="128" alt="scrcpy" align="right" />
|
||||
|
||||
@@ -53,10 +53,16 @@ Make sure you [enabled USB debugging][enable-adb] on your device(s).
|
||||
|
||||
[enable-adb]: https://developer.android.com/studio/debug/dev-options#enable
|
||||
|
||||
On some devices, you also need to enable [an additional option][control] `USB
|
||||
debugging (Security Settings)` (this is an item different from `USB debugging`)
|
||||
to control it using a keyboard and mouse. Rebooting the device is necessary once
|
||||
this option is set.
|
||||
On some devices (especially Xiaomi), you might get the following error:
|
||||
|
||||
```
|
||||
java.lang.SecurityException: Injecting input events requires the caller (or the source of the instrumentation, if any) to have the INJECT_EVENTS permission.
|
||||
```
|
||||
|
||||
In that case, you need to enable [an additional option][control] `USB debugging
|
||||
(Security Settings)` (this is an item different from `USB debugging`) to control
|
||||
it using a keyboard and mouse. Rebooting the device is necessary once this
|
||||
option is set.
|
||||
|
||||
[control]: https://github.com/Genymobile/scrcpy/issues/70#issuecomment-373286323
|
||||
|
||||
@@ -148,11 +154,14 @@ documented in the following pages:
|
||||
|
||||
## Contact
|
||||
|
||||
If you encounter a bug, please read the [FAQ](FAQ.md) first, then open an [issue].
|
||||
You can open an [issue] for bug reports, feature requests or general questions.
|
||||
|
||||
For bug reports, please read the [FAQ](FAQ.md) first, you might find a solution
|
||||
to your problem immediately.
|
||||
|
||||
[issue]: https://github.com/Genymobile/scrcpy/issues
|
||||
|
||||
For general questions or discussions, you can also use:
|
||||
You can also use:
|
||||
|
||||
- Reddit: [`r/scrcpy`](https://www.reddit.com/r/scrcpy)
|
||||
- Twitter: [`@scrcpy_app`](https://twitter.com/scrcpy_app)
|
||||
|
||||
@@ -4,10 +4,10 @@ DEPS_DIR=$(dirname ${BASH_SOURCE[0]})
|
||||
cd "$DEPS_DIR"
|
||||
. common
|
||||
|
||||
VERSION=2.30.4
|
||||
VERSION=2.30.5
|
||||
FILENAME=SDL-$VERSION.tar.gz
|
||||
PROJECT_DIR=SDL-release-$VERSION
|
||||
SHA256SUM=dcc2c8c9c3e9e1a7c8d61d9522f1cba4e9b740feb560dcb15234030984610ee2
|
||||
SHA256SUM=be3ca88f8c362704627a0bc5406edb2cd6cc6ba463596d81ebb7c2f18763d3bf
|
||||
|
||||
cd "$SOURCES_DIR"
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ BEGIN
|
||||
VALUE "LegalCopyright", "Romain Vimont, Genymobile"
|
||||
VALUE "OriginalFilename", "scrcpy.exe"
|
||||
VALUE "ProductName", "scrcpy"
|
||||
VALUE "ProductVersion", "2.5"
|
||||
VALUE "ProductVersion", "2.6.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
@@ -29,7 +29,7 @@ Default is 128K (128000).
|
||||
.BI "\-\-audio\-buffer " ms
|
||||
Configure the audio buffering delay (in milliseconds).
|
||||
|
||||
Lower values decrease the latency, but increase the likelyhood of buffer underrun (causing audio glitches).
|
||||
Lower values decrease the latency, but increase the likelihood of buffer underrun (causing audio glitches).
|
||||
|
||||
Default is 50.
|
||||
|
||||
@@ -379,7 +379,7 @@ Default is 27183:27199.
|
||||
|
||||
.TP
|
||||
\fB\-\-pause\-on\-exit\fR[=\fImode\fR]
|
||||
Configure pause on exit. Possible values are "true" (always pause on exit), "false" (never pause on exit) and "if-error" (pause only if an error occured).
|
||||
Configure pause on exit. Possible values are "true" (always pause on exit), "false" (never pause on exit) and "if-error" (pause only if an error occurred).
|
||||
|
||||
This is useful to prevent the terminal window from automatically closing, so that error messages can be read.
|
||||
|
||||
|
||||
@@ -633,7 +633,7 @@ enum android_keycode {
|
||||
* Toggles between BS and CS digital satellite services. */
|
||||
AKEYCODE_TV_SATELLITE_SERVICE = 240,
|
||||
/** Toggle Network key.
|
||||
* Toggles selecting broacast services. */
|
||||
* Toggles selecting broadcast services. */
|
||||
AKEYCODE_TV_NETWORK = 241,
|
||||
/** Antenna/Cable key.
|
||||
* Toggles broadcast input source between antenna and cable. */
|
||||
|
||||
@@ -156,7 +156,7 @@ static const struct sc_option options[] = {
|
||||
.argdesc = "ms",
|
||||
.text = "Configure the audio buffering delay (in milliseconds).\n"
|
||||
"Lower values decrease the latency, but increase the "
|
||||
"likelyhood of buffer underrun (causing audio glitches).\n"
|
||||
"likelihood of buffer underrun (causing audio glitches).\n"
|
||||
"Default is 50.",
|
||||
},
|
||||
{
|
||||
@@ -654,7 +654,7 @@ static const struct sc_option options[] = {
|
||||
.optional_arg = true,
|
||||
.text = "Configure pause on exit. Possible values are \"true\" (always "
|
||||
"pause on exit), \"false\" (never pause on exit) and "
|
||||
"\"if-error\" (pause only if an error occured).\n"
|
||||
"\"if-error\" (pause only if an error occurred).\n"
|
||||
"This is useful to prevent the terminal window from "
|
||||
"automatically closing, so that error messages can be read.\n"
|
||||
"Default is \"false\".\n"
|
||||
@@ -1349,7 +1349,7 @@ print_exit_status(const struct sc_exit_status *status, unsigned cols) {
|
||||
return;
|
||||
}
|
||||
|
||||
assert(strlen(text) >= 9); // Contains at least the initial identation
|
||||
assert(strlen(text) >= 9); // Contains at least the initial indentation
|
||||
|
||||
// text + 9 to remove the initial indentation
|
||||
printf(" %3d %s\n", status->value, text + 9);
|
||||
@@ -2760,7 +2760,7 @@ parse_args_with_getopt(struct scrcpy_cli_args *args, int argc, char *argv[],
|
||||
}
|
||||
}
|
||||
|
||||
// If mouse bindings are not explictly set, configure default bindings
|
||||
// If mouse bindings are not explicitly set, configure default bindings
|
||||
if (opts->mouse_bindings.pri.right_click == SC_MOUSE_BINDING_AUTO) {
|
||||
assert(opts->mouse_bindings.pri.middle_click == SC_MOUSE_BINDING_AUTO);
|
||||
assert(opts->mouse_bindings.pri.click4 == SC_MOUSE_BINDING_AUTO);
|
||||
@@ -3101,7 +3101,7 @@ sc_get_pause_on_exit(int argc, char *argv[]) {
|
||||
if (!strcmp(value, "if-error")) {
|
||||
return SC_PAUSE_ON_EXIT_IF_ERROR;
|
||||
}
|
||||
// Set to false, inclusing when the value is invalid
|
||||
// Set to false, including when the value is invalid
|
||||
return SC_PAUSE_ON_EXIT_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,10 +233,10 @@ install` must be run as root)._
|
||||
|
||||
#### Option 2: Use prebuilt server
|
||||
|
||||
- [`scrcpy-server-v2.5`][direct-scrcpy-server]
|
||||
<sub>SHA-256: `1488b1105d6aff534873a26bf610cd2aea06ee867dd7a4d9c6bb2c091396eb15`</sub>
|
||||
- [`scrcpy-server-v2.6.1`][direct-scrcpy-server]
|
||||
<sub>SHA-256: `ca7ab50b2e25a0e5af7599c30383e365983fa5b808e65ce2e1c1bba5bfe8dc3b`</sub>
|
||||
|
||||
[direct-scrcpy-server]: https://github.com/Genymobile/scrcpy/releases/download/v2.5/scrcpy-server-v2.5
|
||||
[direct-scrcpy-server]: https://github.com/Genymobile/scrcpy/releases/download/v2.6.1/scrcpy-server-v2.6.1
|
||||
|
||||
Download the prebuilt server somewhere, and specify its path during the Meson
|
||||
configuration:
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
|
||||
Download the [latest release]:
|
||||
|
||||
- [`scrcpy-win64-v2.5.zip`][direct-win64] (64-bit)
|
||||
<sub>SHA-256: `345cf04a66a9144281dce72ca4e82adfd2c3092463196e586051df4c69e1507b`</sub>
|
||||
- [`scrcpy-win32-v2.5.zip`][direct-win32] (32-bit)
|
||||
<sub>SHA-256: `d56312a92471565fa4f3a6b94e8eb07717c4c90f2c0f05b03ba444e1001806ec`</sub>
|
||||
- [`scrcpy-win64-v2.6.1.zip`][direct-win64] (64-bit)
|
||||
<sub>SHA-256: `041fc3abf8578ddcead5a8c4a8be8960b7c4d45b21d3370ee2683605e86a728c`</sub>
|
||||
- [`scrcpy-win32-v2.6.1.zip`][direct-win32] (32-bit)
|
||||
<sub>SHA-256: `17a5d4d17230b4c90fad45af6395efda9aea287a03c04e6b4ecc9ceb8134ea04`</sub>
|
||||
|
||||
[latest release]: https://github.com/Genymobile/scrcpy/releases/latest
|
||||
[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v2.5/scrcpy-win64-v2.5.zip
|
||||
[direct-win32]: https://github.com/Genymobile/scrcpy/releases/download/v2.5/scrcpy-win32-v2.5.zip
|
||||
[direct-win64]: https://github.com/Genymobile/scrcpy/releases/download/v2.6.1/scrcpy-win64-v2.6.1.zip
|
||||
[direct-win32]: https://github.com/Genymobile/scrcpy/releases/download/v2.6.1/scrcpy-win32-v2.6.1.zip
|
||||
|
||||
and extract it.
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
set -e
|
||||
|
||||
BUILDDIR=build-auto
|
||||
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v2.5/scrcpy-server-v2.5
|
||||
PREBUILT_SERVER_SHA256=1488b1105d6aff534873a26bf610cd2aea06ee867dd7a4d9c6bb2c091396eb15
|
||||
PREBUILT_SERVER_URL=https://github.com/Genymobile/scrcpy/releases/download/v2.6.1/scrcpy-server-v2.6.1
|
||||
PREBUILT_SERVER_SHA256=ca7ab50b2e25a0e5af7599c30383e365983fa5b808e65ce2e1c1bba5bfe8dc3b
|
||||
|
||||
echo "[scrcpy] Downloading prebuilt server..."
|
||||
wget "$PREBUILT_SERVER_URL" -O scrcpy-server
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
project('scrcpy', 'c',
|
||||
version: '2.5',
|
||||
version: '2.6.1',
|
||||
meson_version: '>= 0.48',
|
||||
default_options: [
|
||||
'c_std=c11',
|
||||
|
||||
@@ -7,8 +7,8 @@ android {
|
||||
applicationId "com.genymobile.scrcpy"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 34
|
||||
versionCode 20500
|
||||
versionName "2.5"
|
||||
versionCode 20601
|
||||
versionName "2.6.1"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
buildTypes {
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
set -e
|
||||
|
||||
SCRCPY_DEBUG=false
|
||||
SCRCPY_VERSION_NAME=2.5
|
||||
SCRCPY_VERSION_NAME=2.6.1
|
||||
|
||||
PLATFORM=${ANDROID_PLATFORM:-34}
|
||||
BUILD_TOOLS=${ANDROID_BUILD_TOOLS:-34.0.0}
|
||||
|
||||
@@ -61,7 +61,14 @@ public final class Workarounds {
|
||||
fillConfigurationController();
|
||||
}
|
||||
|
||||
fillAppInfo();
|
||||
// On ONYX devices, fillAppInfo() breaks video mirroring:
|
||||
// <https://github.com/Genymobile/scrcpy/issues/5182>
|
||||
boolean mustFillAppInfo = !Build.BRAND.equalsIgnoreCase("ONYX");
|
||||
|
||||
if (mustFillAppInfo) {
|
||||
fillAppInfo();
|
||||
}
|
||||
|
||||
fillAppContext();
|
||||
}
|
||||
|
||||
|
||||
@@ -278,8 +278,9 @@ public class Controller implements AsyncProcessor {
|
||||
pointer.setPressure(pressure);
|
||||
|
||||
int source;
|
||||
if (pointerId == POINTER_ID_MOUSE) {
|
||||
// real mouse event
|
||||
boolean activeSecondaryButtons = ((actionButton | buttons) & ~MotionEvent.BUTTON_PRIMARY) != 0;
|
||||
if (pointerId == POINTER_ID_MOUSE && (action == MotionEvent.ACTION_HOVER_MOVE || activeSecondaryButtons)) {
|
||||
// real mouse event, or event incompatible with a finger
|
||||
pointerProperties[pointerIndex].toolType = MotionEvent.TOOL_TYPE_MOUSE;
|
||||
source = InputDevice.SOURCE_MOUSE;
|
||||
pointer.setUp(buttons == 0);
|
||||
|
||||
@@ -33,13 +33,13 @@ public final class UhidManager {
|
||||
private final ByteBuffer buffer = ByteBuffer.allocate(SIZE_OF_UHID_EVENT).order(ByteOrder.nativeOrder());
|
||||
|
||||
private final DeviceMessageSender sender;
|
||||
private final HandlerThread thread = new HandlerThread("UHidManager");
|
||||
private final MessageQueue queue;
|
||||
|
||||
public UhidManager(DeviceMessageSender sender) {
|
||||
this.sender = sender;
|
||||
thread.start();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
HandlerThread thread = new HandlerThread("UHidManager");
|
||||
thread.start();
|
||||
queue = thread.getLooper().getQueue();
|
||||
} else {
|
||||
queue = null;
|
||||
|
||||
Reference in New Issue
Block a user