Giter VIP home page Giter VIP logo

scrcpycontroller's Introduction

Scrcpy Controller

JetBrains plugins JetBrains Plugins JetBrains Plugins

IntelliJ/Android Studio plugin for running and managing scrcpy and adb devices (USB & WiFi both)

Why

I am an Android Developer myself and I always use scrcpy ❤ to test my work on my phone.I feel lazy to launch scrcpy from terminal everytime. So I thought why not make a plugin for this so it would help all the Android Developers!

Exclusive Features

  • One Click to switch USB Device to WiFi
  • Run scrcpy on multiple devices effortlessly
  • Disconnect WiFi Devices
  • Connect WiFi Devices
  • All options from scrcpy v1.17 are configurable from the UI
  • Quick Shortcuts button for you to remember scrcpy shortcuts
  • Easy installation, scrcpy does not need to be added in your system's PATH Variable
  • Shortcuts are directly loaded from scrcpy's GitHub README if you are connected to the internet, else static shortcuts are loaded from scrcpy v1.16

Requirements

  1. Works on Android Studio 4.0+ and other IntelliJ-based IDEs with build number 193.4099.13 and above
  2. adb and scrcpy installed (need not be configured in PATH)

Installation

Install the plugin in Android Studio/IntelliJ-based IDE via:

  • Search for 'scrcpy Controller', install, and restart IDE

Manually

  • Download latest plugin zip (should contain latest version in file name e.g. 0.1.0) from releases
  • From Android Studio/IntelliJ-based IDE, open Settings -> Plugins -> Settings Icon -> Install plugin from disk and select the downloaded plugin zip -> Restart IDE
  1. Download and extract scrcpy to any folder of your choice
  2. Go to IDE Settings -> Tools -> Scrcpy Controller -> Enter/choose the location of the previously extracted scrcpy release -> Click on Test button to verify selected/entered path -> Ok button

If you like this plugin, please don't forget to leave a rating on the JetBrains Plugins Marketplace

Bonus

  • All options visible in the UI excluding the devices table (obviously) persist their values across IDE Restarts!
  • The To WiFi button will automatically try to switch your USB-connected device to WiFi adb by:
    1. Restarting adbd in tcpip mode (uses the port entered in ADB WiFi section or 5555 (default))
    2. Extract device's local WiFi IP and run's adb connect on the extracted IP
  • You can configure advanced, rarely-used options for scrcpy from IDE Settings -> Tools -> Scrcpy Controller
  • Devices with scrcpy currently running have a added to their serial

Screenshots

Main Tool Window Settings Shortcuts dialog
Main Tool Window Settings Shortcuts Dialog
Path Testers
ADB Tester scrcpy Tester
ADB Tester scrcpy Tester

Contributing

  • Feel free to make a PR for feature additions/bugs
  • This repository follows Google (2-space indents) coding style, so please keep this in mind while making PRs

Known Issues

  • If you use the plugin's stop button to terminate an active scrcpy recording session with mp4 extension, the mp4 file is not playable. This is being caused by Java's Process not interrupting scrcpy session properly. Similar issue exists with mkv extension, although the mkv file can be played properly, it is not seekable.
    Workaround: Close the scrcpy session with the window's close button
  • jadb throws an exception if any connected device becomes offline, hence devices list is not refreshed

Roadmap

  • Provide better UI/UX
  • Add support for sndcpy
  • Check and install scrcpy updates

Donate

  • This project would not have been possible without scrcpy (of course)!
  • I've spent endless nights making this plugin work well! If you liked my work, consider donating me via UPI (ID: shripal17@okaxis, Shripal Jain) (works only in India, open link in smartphone) or PayPal

License

  Copyright 2021 Shripal Jain

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at
  
     http://www.apache.org/licenses/LICENSE-2.0
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

scrcpycontroller's People

Contributors

shripal17 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

scrcpycontroller's Issues

Adb error: device offline

Hey @shripal17,

First of all, thank you for your effort!
Even though I choose the adb and scrcpy paths correctly, I get the error "adb error : device offline"

Thanks in advance for your support.

image
image

Erro when try record screen

Hi,
I getting an error when I try to record screen on mac

if I select record screen with .mp4 or mkv extension

2021-07-06 10:18:46.485 scrcpy[3199:57118] ERROR: No format specified for 
""/Users/foo/Desktop/replacement.mp4"" (try with --record-format=mkv)

but if I open the terminal and type
scrcpy -r replacement.mp4
the record works fine

ERROR: Command not found

2020-09-02 11:32:04.805 scrcpy[5438:53045] INFO: scrcpy 1.16 https://github.com/Genymobile/scrcpy

exec: No such file or directory

2020-09-02 11:32:04.806 scrcpy[5438:53045] ERROR: Command not found: [adb], [-s], [92NAY02H0C], [push], [/usr/local/Cellar/scrcpy/1.16/share/scrcpy/scrcpy-server], [/data/local/tmp/scrcpy-server.jar]

2020-09-02 11:32:04.806 scrcpy[5438:53045] ERROR: (make 'adb' accessible from your PATH or define its fullpath in the ADB environment variable)

can't select path on /usr/bin/scrcpy

image

Hi, I'm running scrcpy version 1.17 on lubuntu (one of Linux distros) and can't choose my path where scrcpy's. I've attached screenshot above, if you need more details, I will be glad to tell you.

imho nothing wrong with my scrcpy's, installed correctly and works normally on terminal.
image

--- Update

Hi, maybe someone else comes here with a same case, I just provide an alternative to create custom launcher for running scrcpy quickly,

create a .desktop file for scrcpy launcher

sudo vim /usr/share/applications/scrcpy.desktop

paste script below and save

[Desktop Entry]
Version=1.17
Type=Application
Name=Scrcpy
GenericName=scrcpy
Comment=Screen mirroring application
Exec=scrcpy %F
Icon=phone-symbolic
Terminal=false
X-MultipleArgs=false
Categories=Development;
StartupNotify=true

Voila! Browse your launcher and pin it on menu bar, Hope you get your scrcpy quickly!

Feature request: Integrate in IDE

Hi,
can you integrate Scrcpy screen into IDE, like what Google did for the emulator.
It would be nice to have such option to choose from - integrated or windowed.

Feature request: Auto-select when there's only 1 device connected

Use case:

lots of developers like you and me, work daily with just 1 device connected

Pain point:

every time open the UI have to select that 1 only device and then start

Suggestion:

auto-select when there's only 1 device, or maybe auto-select the first device on the list.

PS.: thanks for the great plugin, it's awesome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.