mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-03-04 19:24:41 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fcc177da5 | ||
|
|
c8c1316db9 |
2
LICENSE
2
LICENSE
@@ -188,7 +188,7 @@
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (C) 2018 Genymobile
|
||||
Copyright (C) 2018-2025 Romain Vimont
|
||||
Copyright (C) 2018-2026 Romain Vimont
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -210,7 +210,7 @@ work][donate]:
|
||||
## License
|
||||
|
||||
Copyright (C) 2018 Genymobile
|
||||
Copyright (C) 2018-2025 Romain Vimont
|
||||
Copyright (C) 2018-2026 Romain Vimont
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -852,7 +852,7 @@ Report bugs to <https://github.com/Genymobile/scrcpy/issues>.
|
||||
.SH COPYRIGHT
|
||||
Copyright \(co 2018 Genymobile <https://www.genymobile.com>
|
||||
|
||||
Copyright \(co 2018\-2025 Romain Vimont <rom@rom1v.com>
|
||||
Copyright \(co 2018\-2026 Romain Vimont <rom@rom1v.com>
|
||||
|
||||
Licensed under the Apache License, Version 2.0.
|
||||
|
||||
|
||||
@@ -172,8 +172,7 @@ Additionally, if you want to build the server, install Java 17 from Caskroom, an
|
||||
make it available from the `PATH`:
|
||||
|
||||
```bash
|
||||
brew tap homebrew/cask-versions
|
||||
brew install adoptopenjdk/openjdk/adoptopenjdk17
|
||||
brew install openjdk@17
|
||||
export JAVA_HOME="$(/usr/libexec/java_home --version 1.17)"
|
||||
export PATH="$JAVA_HOME/bin:$PATH"
|
||||
```
|
||||
|
||||
@@ -27,8 +27,6 @@ import com.genymobile.scrcpy.video.VideoSource;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Build;
|
||||
import android.os.Looper;
|
||||
import android.system.ErrnoException;
|
||||
import android.system.Os;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -235,8 +233,6 @@ public final class Server {
|
||||
}
|
||||
});
|
||||
|
||||
dropRootPrivileges();
|
||||
|
||||
prepareMainLooper();
|
||||
|
||||
Options options = Options.parse(args);
|
||||
@@ -277,17 +273,4 @@ public final class Server {
|
||||
// Do not print stack trace, a user-friendly error-message has already been logged
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private static void dropRootPrivileges() {
|
||||
try {
|
||||
if (Os.getuid() == 0) {
|
||||
// Copy-paste does not work with root user
|
||||
// <https://github.com/Genymobile/scrcpy/issues/6224>
|
||||
Os.setuid(2000);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Ln.w("Cannot set UID", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user