Merge pull request #15778 from amwps290/master

translated
This commit is contained in:
Xingyu.Wang 2019-10-06 11:40:35 +08:00 committed by GitHub
commit 75ad7b16ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 111 additions and 117 deletions

View File

@ -1,117 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: (amwps290)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Mirror your Android screen on your computer with Guiscrcpy)
[#]: via: (https://opensource.com/article/19/9/mirror-android-screen-guiscrcpy)
[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/holmjahttps://opensource.com/users/holmjahttps://opensource.com/users/rajaram121)
Mirror your Android screen on your computer with Guiscrcpy
======
Access your Android device from your PC with this open source
application based on scrcpy.
![Coding on a computer][1]
In the future, all the information you need will be just one gesture away, and it will all appear in midair as a hologram that you can interact with even while you're driving your flying car. That's the future, though, and until that arrives, we're all stuck with information spread across a laptop, a phone, a tablet, and a smart refrigerator. Unfortunately, that means when we need information from a device, we generally have to look at that device.
While not quite holographic terminals or flying cars, [guiscrcpy][2] by developer [Srevin Saju][3] is an application that consolidates multiple screens in one location and helps to capture that futuristic feeling.
Guiscrcpy is an open source (GNU GPLv3 licensed) project based on the award-winning [scrcpy][4] open source engine. With guiscrcpy, you can cast your Android screen onto your computer screen so you can view it along with everything else. Guiscrcpy supports Linux, Windows, and MacOS.
Unlike many scrcpy alternatives, Guiscrcpy is not a fork of scrcpy. The project prioritizes collaborating with other open source projects, so Guiscrcpy is an extension, or a graphical user interface (GUI) layer, for scrcpy. Keeping the Python 3 GUI separate from scrcpy ensures that nothing interferes with the efficiency of the scrcpy backend. You can screencast up to 1080p resolution and, because it uses ultrafast rendering and surprisingly little CPU, it works even on a relatively low-end PC.
Scrcpy, Guiscrcpy's foundation, is a command-line application, so it doesn't have GUI buttons to handle gestures, it doesn't provide a Back or Home button, and it requires familiarity with the [Linux terminal][5]. Guiscrcpy adds GUI panels to scrcpy, so any user can run it—and cast and control their device—without sending any information over the internet. Everything works over USB or WiFi (using only a local network). Guiscrcpy also adds a desktop launcher to Linux and Windows systems and provides compiled binaries for Linux and Windows.
### Installing Guiscrcpy
Before installing Guiscrcpy, you must install its dependencies, most notably scrcpy. Possibly the easiest way to install scrcpy is with [snap][6], which is available for most major Linux distributions. If you have snap installed and active, then you can install scrcpy with one easy command:
```
`$ sudo snap install scrcpy`
```
While it's installing, you can install the other dependencies. The [Simple DirectMedia Layer][7] (SDL 2.0) toolkit is required to display and interact with the phone screen, and the [Android Debug Bridge][8] (adb) command connects your computer to your Android phone.
On Fedora or CentOS:
```
`$ sudo dnf install SDL2 android-tools`
```
On Ubuntu or Debian:
```
`$ sudo apt install SDL2 android-tools-adb`
```
In another terminal, install the Python dependencies:
```
`$ python3 -m pip install -r requirements.txt --user`
```
### Setting up your phone
For your phone to accept an adb connection, it must have Developer Mode enabled. To enable Developer Mode on Android, go to **Settings** and select **About phone**. In **About phone**, find the **Build number** (it may be in the **Software information** panel). Believe it or not, to enable Developer Mode, tap **Build number** seven times in a row.
![Enabling Developer Mode][9]
For full instructions on all the many ways you can configure your phone for access from your computer, read the [Android developer documentation][10].
Once that's set up, plug your phone into a USB port on your computer (or ensure that you've configured it correctly to connect over WiFi).
### Using guiscrcpy
When you launch guiscrcpy, you see its main control window. In this window, click the **Start scrcpy** button. This connects to your phone, as long as it's set up in Developer Mode and connected to your computer over USB or WiFi.
![Guiscrcpy main screen][11]
It also includes a configuration-writing system, where you can write a configuration file to your **~/.config** directory to preserve your preferences between uses.
The bottom panel of guiscrcpy is a floating window that helps you perform basic controlling actions. It has buttons for Home, Back, Power, and more. These are common functions on Android devices, but an important feature of this module is that it doesn't interact with scrcpy's SDL, so it can function with no lag. In other words, this panel communicates directly with your connected device through adb rather than scrcpy.
![guiscrcpy's bottom panel][12]
The project is in active development and new features are still being added. The latest build has an interface for gestures and notifications.
With guiscrcpy, you not only _see_ your phone on your screen, but you can also interact with it, either by clicking the SDL window itself, just as you would tap your physical phone, or by using the buttons on the panels.
![guiscrcpy running on Fedora 30][13]
Guiscrcpy is a fun and useful application that provides features that ought to be official features of any modern device, especially a platform like Android. Try it out yourself, and add some futuristic pragmatism to your present-day digital life.
We took a look at 12 of the best open source Android games in the F-Droid repository.
All six apps are available from the F-Droid repository and licensed under the GPLv3, providing an...
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/9/mirror-android-screen-guiscrcpy
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/holmjahttps://opensource.com/users/holmjahttps://opensource.com/users/rajaram121
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer)
[2]: https://github.com/srevinsaju/guiscrcpy
[3]: http://opensource.com/users/srevinsaju
[4]: https://github.com/Genymobile/scrcpy
[5]: https://www.redhat.com/sysadmin/navigating-filesystem-linux-terminal
[6]: https://snapcraft.io/
[7]: https://www.libsdl.org/
[8]: https://developer.android.com/studio/command-line/adb
[9]: https://opensource.com/sites/default/files/uploads/developer-mode.jpg (Enabling Developer Mode)
[10]: https://developer.android.com/studio/debug/dev-options
[11]: https://opensource.com/sites/default/files/uploads/guiscrcpy-main.png (Guiscrcpy main screen)
[12]: https://opensource.com/sites/default/files/uploads/guiscrcpy-bottompanel.png (guiscrcpy's bottom panel)
[13]: https://opensource.com/sites/default/files/uploads/guiscrcpy-screenshot.jpg (guiscrcpy running on Fedora 30)

View File

@ -0,0 +1,111 @@
[#]: collector: (lujun9972)
[#]: translator: (amwps290)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (Mirror your Android screen on your computer with Guiscrcpy)
[#]: via: (https://opensource.com/article/19/9/mirror-android-screen-guiscrcpy)
[#]: author: (Seth Kenlon https://opensource.com/users/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/holmjahttps://opensource.com/users/holmjahttps://opensource.com/users/rajaram121)
使用 Guiscrcpy 将你的安卓手机的屏幕投射到你的电脑
======
使用这个基于 scrcpy 的开源应用从你的电脑上访问你的安卓设备
![Coding on a computer][1]
在未来,您所需的一切信息都将在你的股掌之内,并且全部以全息的形式出现在空中,即使您在驾驶汽车时也可以与之交互。 不过,这就是未来,直到那一刻到来,我们所有人都只能将信息分散在笔记本电脑,手机,平板电脑和智能冰箱上。 不幸的是,这意味着当我们需要来自该设备的信息时,我们通常必须查看该设备。
虽然不完全是像全息终端或飞行汽车那样酷炫,[srevin saju][3] 开发的 [guiscrcpy][2] 是一个在一个地方整合了多个屏幕,有助于捕捉未来感觉的应用程序。
Guiscrcpy 是一个基于屡获殊荣的一个开源引擎 [scrcpy][4] 的一个开源项目GUN GPLv3 许可证)。使用 Guiscrcpy 你可以将你的安卓手机的屏幕投射到你的电脑这样你就可以查看手机上的一切东西。Guiscrcpy 支持 LinuxWindows 和 MacOS。
不像其他 scrcpy 的替代软件一样Guiscrcpy 并不仅仅是 scrcpy 的一个简单的复制。该项目优先考虑了与其他开源项目的协作。因此Guiscrcpy 对 scrcpy 来说是一个扩展或者说是用户界面层。将 Python 3 GUI 与 scrcpy 分开可以确保没有任何东西干扰 scrcpy 后端的效率。 您可以投射 1080P 分辨率的屏幕。因为它的超快的渲染速度和超低的 CPU 使用,即使在低端的电脑上也可以运行的很顺畅。
Scrcpy 是 Guiscrcpy 项目的基石。它是一个基于命令行的应用,因此它没有一个用户界面去处理你的手势操作。它也不提供一个返回按钮和主页按钮,而且它需要你对 [linux 终端][5]比较熟悉。Guiscrcpy 给 scrcpy 添加了图形面板。因此任何用户都可以使用它而且不需要通过网络发送任何信息就可以投射和控制他的设备。Guiscrcpy 同时也为 Windows 用户和 Linux 用户提供了编译好的二进制文件,以方便您的使用。
### 安装 Guiscrcpy
在你安装 Guiscrcpy 之前,你需要先安装它的依赖包。尤其是要安装 scrcpy。安装 scrcpy 最简单的方式可能就是使用对于大部分 Linux 发行版都安装了的 [snap][6] 工具。如果你的电脑上安装并使用了 snap那么你就可以使用下面的命令来一步安装 scrcpy。
```
`$ sudo snap install scrcpy`
```
当你安装完 scrcpy你就可以安装其他的依赖包了。[Simple DirectMedia Layer][7] 是一个显示和控制你设备屏幕的工具包。[Android Debug Bridge][8] (ADB) 命令可以连接你的安卓手机到电脑。
在 Fedora 或者 CentOS
```
`$ sudo dnf install SDL2 android-tools`
```
在 Ubuntu 或者 Debian
```
`$ sudo apt install SDL2 android-tools-adb`
```
在另一个终端中,安装 Python 依赖项:
```
`$ python3 -m pip install -r requirements.txt --user`
```
### 设置你的手机
为了能够让你的手机接受一个 adb 连接。必须让你的手机开启开发者选项。为了打开开发者选项,打开**设置**,然后选择**关于手机**,找到**版本号**(它也可能位于**软件信息**面板中)。爱信不信,只要你连续点击**版本号**七次,你就可以打开开发者选项。
![Enabling Developer Mode][9]
更多更全面的连接手机的方式,请参考[安卓开发者文档][10]。
一旦你设置好了你的手机,将你的手机通过 USB 线插入到你的电脑中(或者通过无线的方式进行连接,确保你已经配置好了无线连接)。
### 使用 Guiscrcpy
当你启动 guiscrcpy 的时候,你就能看到一个主控制窗口。点击窗口里的 **Start scrcpy** 按钮。只要你设置好了开发者模式并且通过 USB 或者 WiFi 将你的手机连接到电脑。guiscrcpy 就会连接你的手机。
![Guiscrcpy main screen][11]
它还包括一个可写入的配置系统,你可以将你的配置文件写入到 **~/.config** 目录。可以在使用前保存你的首选项。
guiscrcpy 底部的面板是一个浮动的窗口可以帮助你执行一些基本的控制动作。它包括了主页按钮,返回按钮,电源按钮以及一些其他的按键。这些按键在安卓手机上都非常常用。值得注意的是,它并不是与 scrcpy 直接交互。因此,它可以毫无延迟的执行。换句话说,这个操作窗口是直接通过 adb 与你的手机进行交互而不是通过 scrcpy。
![guiscrcpy's bottom panel][12]
这个项目目前十分活跃,不断地有新的特性加入其中。最新版本的具有了手势操作和通知界面。
有了这个 guiscrcpy你不仅仅可以在你的电脑屏幕上看到你的手机你还可以通过点击窗口就像操作你的实体手机一样或者使用浮动窗口上的按钮与之进行交互。
![guiscrcpy running on Fedora 30][13]
Guiscrcpy 是一个有趣且实用的应用程序,提供的功能应该是任何现代设备(尤其是 Android 之类的平台)的正式功能。 自己尝试一下,为当今的数字生活增添一些未来主义的感觉。
我们看了 F-Droid 软件库中的 12 个最佳的开源 Android 游戏。
所有 6 个应用程序都可以从 F-Droid 软件库中获得,并根据 GPLv3 许可,从而提供了...
--------------------------------------------------------------------------------
via: https://opensource.com/article/19/9/mirror-android-screen-guiscrcpy
作者:[Seth Kenlon][a]
选题:[lujun9972][b]
译者:[amwps290](https://github.com/amwps290)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/sethhttps://opensource.com/users/scottnesbitthttps://opensource.com/users/holmjahttps://opensource.com/users/holmjahttps://opensource.com/users/rajaram121
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/code_computer_laptop_hack_work.png?itok=aSpcWkcl (Coding on a computer)
[2]: https://github.com/srevinsaju/guiscrcpy
[3]: http://opensource.com/users/srevinsaju
[4]: https://github.com/Genymobile/scrcpy
[5]: https://www.redhat.com/sysadmin/navigating-filesystem-linux-terminal
[6]: https://snapcraft.io/
[7]: https://www.libsdl.org/
[8]: https://developer.android.com/studio/command-line/adb
[9]: https://opensource.com/sites/default/files/uploads/developer-mode.jpg (Enabling Developer Mode)
[10]: https://developer.android.com/studio/debug/dev-options
[11]: https://opensource.com/sites/default/files/uploads/guiscrcpy-main.png (Guiscrcpy main screen)
[12]: https://opensource.com/sites/default/files/uploads/guiscrcpy-bottompanel.png (guiscrcpy's bottom panel)
[13]: https://opensource.com/sites/default/files/uploads/guiscrcpy-screenshot.jpg (guiscrcpy running on Fedora 30)