Lançado o scrcpy v1.20 para Linux

O scrcpy é a ferramenta ideal para você espelhar o seu Smartphone em um computador com sistema operacional Linux, confira as novidades da versão 1.20.






scrcpy 


Com o APP você espelha e controla dispositivos Android conectados via USB (ou via TCP/IP).
O que considero um ponto positivo é não requerer acesso root no dispositivo móvel.
Compatível com GNU/Linux, Windows e macOS.


Características

 

  • Leveza (Nativo, mostra apenas a tela do dispositivo)
  • Performance (30~60fps)
  • Qualidade (1920×1080 ou acima)
  • Baixa latência (35~70ms)
  • Baixo tempo de inicialização (~1 segundo para mostrar a primeira imagem)
  • Não intrusivo (nada é deixado instalado no dispositivo móvel) 

 

 


 

Instalação

 

Para instalar confira nossa matéria abaixo.

 

Espelhar o Smartphone na sua distribuição Linux

Espelhar o Smartphone no seu computador é muito útil, principalmente para casos em que o touch do smartphone deixa de funcionar e você precisa usar o aparelho. Confira como realizar sem precisar instalar nada no seu smartphone.



 

scrcpy v1.20

 

Lançado em 14 de Novembro de 2021 conta com as novidades e melhorias abaixo.



  • Adicionado o ícone oficial de alta resolução
  • Adicionado suporte de teclado HID no Linux
  • Adapte a saída --help ao tamanho do terminal
  • Retrabalhada a inicialização do servidor para evitar que Ctrl + c que às vezes não respondia
  • Removida as opções curtas obsoletas -T e -c
  • Corrigido "Não foi possível encontrar muxer v4l2"
  • Correção de soluções alternativas para dispositivos Meizu
  • Corrija o suporte para expandir o recurso de notificação em alguns dispositivos
  • Vários refatores técnicos e correções


 

Destaques


 

Novo ícone scrcpy

 

O Scrcpy usou um ícone XPM de baixa definição. Seu código-fonte era legal, mas o resultado foi péssimo, nessa versão o ícone foi substituído por um ao estilo Papirus.

Note os ícones na barra do sistema e na decoração da janela do Scrcpy.

 


 

Teclado HID



"Por padrão, o scrcpy usa chave Android ou injeção de texto: funciona em qualquer lugar, mas é (basicamente) limitado a caracteres ASCII.

Agora é possível simular um teclado USB físico (# 2632 por @AlynxZhou): o teclado virtual está desabilitado e funciona para todos os personagens e IME."

 

Para utilizar o novo recurso use um dos comandos.

scrcpy --hid-keyboard

ou
scrcpy -K

Para mais opções de comandos use o manual.


scrcpy -h


Options: --always-on-top Make scrcpy window always on top (above other windows). -b, --bit-rate=value Encode the video at the gitven bit-rate, expressed in bits/s. Unit suffixes are supported: 'K' (x1000) and 'M' (x1000000). Default is 8000000. --codec-options=key[:type]=value[,...] Set a list of comma-separated key:type=value options for the device encoder. The possible values for 'type' are 'int' (default), 'long', 'float' and 'string'. The list of possible codec options is available in the Android documentation: https://d.android.com/reference/android/media/MediaFormat --crop=width:height:x:y Crop the device screen on the server. The values are expressed in the device natural orientation (typically, portrait for a phone, landscape for a tablet). Any --max-size value is cmoputed on the cropped size. --disable-screensaver Disable screensaver while scrcpy is running. --display=id Specify the display id to mirror. The list of possible display ids can be listed by: adb shell dumpsys display (search "mDisplayId=" in the output) Default is 0. --display-buffer=ms Add a buffering delay (in milliseconds) before displaying. This increases latency to compensate for jitter. Default is 0 (no buffering). --encoder=name Use a specific MediaCodec encoder (must be a H.264 encoder). --force-adb-forward Do not attempt to use "adb reverse" to connect to the device. --forward-all-clicks By default, right-click triggers BACK (or POWER on) and middle-click triggers HOME. This option disables these shortcuts and forwards the clicks to the device instead. -f, --fullscreen Start in fullscreen. -K, --hid-keyboard Simulate a physical keyboard by using HID over AOAv2. It provides a better experience for IME users, and allows to generate non-ASCII characters, contrary to the default injection method. It may only work over USB, and is currently only supported on Linux. -h, --help Print this help. --legacy-paste Inject computer clipboard text as a sequence of key events on Ctrl+v (like MOD+Shift+v). This is a workaround for some devices not behaving as expected when setting the device clipboard programmatically. --lock-video-orientation[=value] Lock video orientation to value. Possible values are "unlocked", "initial" (locked to the initial orientation), 0, 1, 2 and 3. Natural device orientation is 0, and each increment adds a 90 degrees rotation counterclockwise. Default is "unlocked". Passing the option without argument is equivalent to passing "initial". --max-fps=value Limit the frame rate of screen capture (officially supported since Android 10, but may work on earlier versions). -m, --max-size=value Limit both the width and height of the video to value. The other dimension is computed so that the device aspect-ratio is preserved. Default is 0 (unlimited). -n, --no-control Disable device control (mirror the device in read-only). -N, --no-display Do not display device (only when screen recording or V4L2 sink is enabled). --no-key-repeat Do not forward repeated key events when a key is held down. --no-mipmaps If the renderer is OpenGL 3.0+ or OpenGL ES 2.0+, then mipmaps are automatically generated to improve downscaling quality. This option disables the generation of mipmaps. -p, --port=port[:port] Set the TCP port (range) used by the client to listen. Default is 27183:27199. --power-off-on-close Turn the device screen off when closing scrcpy. --prefer-text Inject alpha characters and space as text events instead ofkey events. This avoids issues when combining multiple keys to enter a special character, but breaks the expected behavior of alpha keys in games (typically WASD). --push-target=path Set the target directory for pushing files to the device by drag & drop. It is passed as is to "adb push". Default is "/sdcard/Download/". -r, --record=file.mp4 Record screen to file. The format is determined by the --record-format option if set, or by the file extension (.mp4 or .mkv). --record-format=format Force recording format (either mp4 or mkv). --render-driver=name Request SDL to use the given render driver (this is just a hint). Supported names are currently "direct3d", "opengl", "opengles2", "opengles", "metal" and "software". https://wiki.libsdl.org/SDL_HINT_RENDER_DRIVER --rotation=value Set the initial display rotation. Possible values are 0, 1, 2 and 3. Each increment adds a 90 degrees rotation counterclockwise. -s, --serial=serial The device serial number. Mandatory only if several devices are connected to adb. --shortcut-mod=key[+...][,...] Specify the modifiers to use for scrcpy shortcuts. Possible keys are "lctrl", "rctrl", "lalt", "ralt", "lsuper" and "rsuper". A shortcut can consist in several keys, separated by '+'. Several shortcuts can be specified, separated by ','. For example, to use either LCtrl+LAlt or LSuper for scrcpy shortcuts, pass "lctrl+lalt,lsuper". Default is "lalt,lsuper" (left-Alt or left-Super). -S, --turn-screen-off Turn the device screen off immediately. -t, --show-touches Enable "show touches" on start, restore the initial value on exit. It only shows physical touches (not clicks from scrcpy). --v4l2-sink=/dev/videoN Output to v4l2loopback device. It requires to lock the video orientation (see --lock-video-orientation). --v4l2-buffer=ms Add a buffering delay (in milliseconds) before pushing frames. This increases latency to compensate for jitter. This option is similar to --display-buffer, but specific to V4L2 sink. Default is 0 (no buffering). -V, --verbosity=value Set the log level (verbose, debug, info, warn or error). Default is info. -v, --version Print the version of scrcpy. -w, --stay-awake Keep the device on while scrcpy is running, when the device is plugged in. --window-borderless Disable window decorations (display borderless window). --window-title=text Set a custom window title. --window-x=value Set the initial window horizontal position. Default is "auto". --window-y=value Set the initial window vertical position. Default is "auto". --window-width=value Set the initial window width. Default is 0 (automatic). --window-height=value Set the initial window height. Default is 0 (automatic). Shortcuts: In the following list, MOD is the shortcut modifier. By default, it's (left) Alt or (left) Super, but it can be configured by --shortcut-mod (see above). MOD+f Switch fullscreen mode MOD+Left Rotate display left MOD+Right Rotate display right MOD+g Resize window to 1:1 (pixel-perfect) MOD+w Double-click on black borders Resize window to remove black borders MOD+h Middle-click Click on HOME MOD+b MOD+Backspace Right-click (when screen is on) Click on BACK MOD+s Click on APP_SWITCH MOD+m Click on MENU MOD+Up Click on VOLUME_UP MOD+Down Click on VOLUME_DOWN MOD+p Click on POWER (turn screen on/off) Right-click (when screen is off) Power on MOD+o Turn device screen off (keep mirroring) MOD+Shift+o Turn device screen on MOD+r Rotate device screen MOD+n Expand notification panel MOD+Shift+n Collapse notification panel MOD+c Copy to clipboard (inject COPY keycode, Android >= 7 only) MOD+x Cut to clipboard (inject CUT keycode, Android >= 7 only) MOD+v Copy computer clipboard to device, then paste (inject PASTE keycode, Android >= 7 only) MOD+Shift+v Inject computer clipboard text as a sequence of key events MOD+i Enable/disable FPS counter (print frames/second in logs) Ctrl+click-and-move Pinch-to-zoom from the center of the screen Drag e drop APK file Install APK from computer Drag e drop non-APK file Push file to device (see --push-target)


Ai está, a melhor ferramenta para espelhar o seu smartphone na sua distribuição Linux.

 


Fonte



Comentários

Você precisa ver isso

Todos os arquivos do blog

Mostrar mais