Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using another android device as client #100

Open
ghost opened this issue Mar 27, 2018 · 32 comments
Open

Using another android device as client #100

ghost opened this issue Mar 27, 2018 · 32 comments

Comments

@ghost
Copy link

@ghost ghost commented Mar 27, 2018

Thanks for this amazing project.
Is it possible to mirror one android screen to another android device using scrcpy-adb connect method? I found adb clients compiled for arm devices and also java implementation of adb client on github. What are your thoughts?

@rom1v rom1v changed the title Feature Request: Using another android device as client. Using another android device as client Mar 27, 2018
@rom1v
Copy link
Collaborator

@rom1v rom1v commented Mar 27, 2018

As is, the client would require SDL and FFmpeg ARM versions, and wrap SDL stuff into an Android application.

But IMO it would be better to write a specific Android client, which would use the Android APIs instead of SDL and FFmpeg.

@NickAcPT
Copy link

@NickAcPT NickAcPT commented Apr 10, 2018

+1 Would also like to see this turn into a feature.

@tailcode
Copy link

@tailcode tailcode commented Jul 4, 2018

Hi @rom1v !
I am working on this. Is it okay to use the name scrcpy for the app?

@rom1v
Copy link
Collaborator

@rom1v rom1v commented Jul 4, 2018

@tailcode The name should not be confusing about what application it is, so the very same name is not a good idea.

Maybe scrcpy-something, or another "wordplay".

@tailcode
Copy link

@tailcode tailcode commented Jul 4, 2018

@rom1v Thank you. Considering basic functionality of scrcpy, I think my app is ready but not perfect. This is my first app. I want you to take a look at my app and provide me with suggestions. So if you are okay with it please provide me with an email or any other medium to send the apk. And if possible kindly suggest some "wordplay" for the app name.

@NickAcPT
Copy link

@NickAcPT NickAcPT commented Jul 4, 2018

Hey, sorry for bothering, but is there any plans to make it so there's almost no latency on the android app @tailcode is developing?
I know that might need some protocol redesign in order to acomplish such task..

@rom1v
Copy link
Collaborator

@rom1v rom1v commented Jul 4, 2018

Considering basic functionality of scrcpy, I think my app is ready but not perfect. This is my first app. I want you to take a look at my app and provide me with suggestions. So if you are okay

Sure. Publish the code somewhere and I'll take a look when I have some time 👍

@tailcode
Copy link

@tailcode tailcode commented Jul 11, 2018

@rom1v Here is the code. Thanks in advance.
https://gitlab.com/las2mile/scrcpy-android

@rom1v
Copy link
Collaborator

@rom1v rom1v commented Jul 12, 2018

@tailcode Thank you very much. Seems great. 👍 I will definitely check when I have some more time.

For now, just one little remark: you could use adblib as a dependency instead of a copy-paste of their source code:

compile 'com.tananaev:adblib:1.2'
@tailcode
Copy link

@tailcode tailcode commented Jul 13, 2018

@rom1v Thank you very much. I agree with you. But I have made small changes to AdbCrypto.java file of adblib. I will see if I can isolate those changes. Meanwhile one issue that I came upon while using the app is, I am unable to open items in gallery and file manager of remote device. When I click on an image or video thumbnail, instead of opening, they are being selected. Please enlighten me if I am missing something.

@rom1v
Copy link
Collaborator

@rom1v rom1v commented Jul 18, 2018

@tailcode Hey, I just tested, that works great 👍 Good job!

Is it possible to quit from the client? (I only see the remote fullscreen, so I can't control the client device)

Also, if the devices have a different aspect ratio (typically if I force the navbar to be displayed), the video aspect-ratio is not preserved.

When I click on an image or video thumbnail, instead of opening, they are being selected.

I think there is a similar problem with VLC: if I click quickly while a video is playing, it should display the control bar, but it does not.

@tailcode
Copy link

@tailcode tailcode commented Jul 20, 2018

@rom1v Thank you very much for the feedback.

Is it possible to quit from the client?

Yes, when you exit from the app, socket pipe breaks and server terminates. Cleaning of remote device is handled in server code.

I only see the remote fullscreen, so I can't control the client device

You mean input events are not working ? I have tested on few devices and they worked for me. Please let me know what device you are using and I will try to test on it if I can find it in my circle.

One hurdle I have encountered on a Samsung device is, it doesn't have curl or wget binaries in it and the server cannot be downloaded to it by the current implementation. I don't know if all samsung devices are so. I have worked on a new method to push server to remote device which I am testing. I will push them to git once I think it is ready.

@rom1v
Copy link
Collaborator

@rom1v rom1v commented Jul 20, 2018

when you exit from the app

How do you do that? The whole client screen displays the remote screen.

You mean input events are not working ?

Yes, input events are workings: they are forwarded to the remote device.

@tailcode
Copy link

@tailcode tailcode commented Jul 20, 2018

@rom1v Sorry, I mistook your question.

Is it possible to quit from the client?

Just swipe from bottom edge of screen. You will see android navigation bar.

@robsmith11
Copy link

@robsmith11 robsmith11 commented May 14, 2019

srccpy-android works really well for me, especially after changing my phone's aspect ratio to match my tablet's with adb shell wm size 1080x1440.

Even with just a wifi connection, the latency is low enough to type without any lag on my bluetooth keyboard, scroll webpages, and watch videos.

Maybe a link could be added in scrcpy's README?

@k3dar
Copy link

@k3dar k3dar commented Jun 8, 2019

@tailcode thanks for android client, having problem with landscape device, more info: https://gitlab.com/las2mile/scrcpy-android/issues/3

@RomSand
Copy link

@RomSand RomSand commented Sep 16, 2019

It works only wiressly, no USB OTG support ?
Thanks.

@parkerlreed
Copy link

@parkerlreed parkerlreed commented Oct 28, 2019

Any APK for scrcpy-android? Would love to try it out.

@robsmith11
Copy link

@robsmith11 robsmith11 commented Oct 29, 2019

@parkerlreed
https://gitlab.com/las2mile/scrcpy-android/raw/master/release/scrcpy-release.apk

It works pretty well for me over wifi, but would have lower latency I think if USB connections were supported.

@parkerlreed
Copy link

@parkerlreed parkerlreed commented Oct 29, 2019

Cheers! Working quite well with Pixel 3 XL host and Fire HD 8 as client

@billymcintosh
Copy link

@billymcintosh billymcintosh commented Nov 15, 2019

Tried with Xiaomi Mi 9 and Nvidia Shield TV. No dice. It seems to connect but it's just a blank screen.

Scratch that ^

Shield was on ethernet whilst phone was on Wifi. Works when both on wifi.

@dudinr1
Copy link

@dudinr1 dudinr1 commented Jan 13, 2020

Is it possible to choose custom resolution or lunch mirror screen from shell (probably for tasker use).

I have broken s8+ which is main device for nexus 7 2013 which is build in in my car dashboard. Both has 1000x1920 resolution and I can choose 1080x1920 inside scrcpy-android-client and my tap to screen doesn't recognize proper.

Besides that, there is no lag, quality is avesome. Good work and thank you a lot for your work

@k3dar
Copy link

@k3dar k3dar commented Jan 13, 2020

@dudinr1
you can try add/change resolution before build apk in:
app/src/main/res/values/strings.xml

@recnac-itna
Copy link

@recnac-itna recnac-itna commented Jan 15, 2020

@tailcode First, thanks a lot for your android client project. It's very useful in my scenario.

By using your project, I have a problem in control. The controls such as tap and drag work like a charm in this PC client. But for your android client, the operations are easy to be lost or misunderstood.

Do you have time to track this issue? Thanks a lot.

@kingvhit
Copy link

@kingvhit kingvhit commented Feb 24, 2020

Can I fork this repository to maintain this one, I am very interest on it.

@slayerkodi
Copy link

@slayerkodi slayerkodi commented Mar 14, 2020

Is there still development on this?

@hoasis2
Copy link

@hoasis2 hoasis2 commented Mar 16, 2020

Is there still development on this?

Here is not the proper place for this.
Better check out here: gitlab.com/las2mile/scrcpy-android

@updeshxp
Copy link

@updeshxp updeshxp commented May 14, 2020

Working, tested on Galaxy S8 :)

@tailcode
Copy link

@tailcode tailcode commented May 30, 2020

Dear All
Sorry for the delayed response. I am aware this is not proper place for this but scrcpy-android started here.
I am glad that my tiny project is being usable to someone.
I am not sure if I will continue on the project. Interested people can fork and work on it. I believe the code is simple and straight forward. I am not sure which license applies for it.
Also there seems adb wireless implementation changes coming in Android 11 Dev previews. I will keep an eye on it.
Again I would like to thank @rom1v for scrcpy project.

@billymcintosh
Copy link

@billymcintosh billymcintosh commented May 30, 2020

Very respectable response and code can almost always be better. Java is my coffee but I'll have a deep dive and use my external thought process to help if possible.

@Neffez
Copy link

@Neffez Neffez commented Jun 15, 2020

Dear All
Sorry for the delayed response. I am aware this is not proper place for this but scrcpy-android started here.
I am glad that my tiny project is being usable to someone.
I am not sure if I will continue on the project. Interested people can fork and work on it. I believe the code is simple and straight forward. I am not sure which license applies for it.
Also there seems adb wireless implementation changes coming in Android 11 Dev previews. I will keep an eye on it.
Again I would like to thank @rom1v for scrcpy project.

Thanks for your work, I'm very interested in it. Maybe you could decide on a license, otherwise it's kind of problematic to use and work on your code. You could just copy a license template from https://opensource.org/licenses (for exmaple GPL or MIT).

@parkerlreed
Copy link

@parkerlreed parkerlreed commented Oct 2, 2020

An Android build with the new multi-touch support would be fantastic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet