9 ms·
Scrcpy – An app to display and control Android devices
- ASinclair 9y agoVysor [1] has been around for a while. Does this improve upon the concept? [1] https://www.vysor.io/ https://www.vysor.io/
- thatcherc 9y agoThis seems pretty neat. What is the purpose of such an app though? Is it intended for use by Android developers? I don't see what I'd use it for but I'm interested in how people use the app.
- tyingq 9y agoWould be neat to launch a SaaS service with it that let people test their apps on various real phones. Or have "real world device" testing in your CI/CD pipeline. Or to automate something else that's only available via an android app.
- mohitmun 9y agocheckout https://browserstack.com/app-automate https://browserstack.com/app-automate and https://browserstack.com/app-live https://browserstack.com/app-live PS: I work for Browserstack
- rekwah 9y agoThese exist. * https://aws.amazon.com/device-farm/ https://aws.amazon.com/device-farm/ * https://www.xamarin.com/test-cloud https://www.xamarin.com/test-cloud * https://bitbar.com/testing/ https://bitbar.com/testing/ * https://saucelabs.com/devices https://saucelabs.com/devices
- Aissen 9y agoAdd Google's: https://firebase.google.com/docs/test-lab/ https://firebase.google.com/docs/test-lab/ And Geny's: https://www.genymotion.com/cloud/ https://www.genymotion.com/cloud/ (albeit a bit different)
- TheSwordsman 9y agoWould have been awesome like a year and a half ago when I cracked my phone screen.
- rom1v 9y agoIt has been devoloped for a specific use case (it is included in a B2B application where the user may need to display and control devices connected on USB). But you might use it for other reasons, like typing text messages from your computer, or showing your device in a conference (e.g. to demo an app).
- wccrawford 9y agoI'm getting just old enough that my near vision is starting to fail. It'd be nice to be able to use my mouse and a computer screen, with a slightly enlarged Android display, to control games and such on my phone. And since it apparently handles keyboard support, typing on the phone would be a lot easier, too.
- RandallBrown 9y agoI can see android users using it in place of an emulator. From what I've heard (I'm not an Android dev) the emulators are generally pretty slow and using a device is way faster. This would let you control it right from your computer, instead of having to actually tap on your phone, which can be tedious, especially when typing.
- izacus 9y agoWhile the modern Android emulator is nowdays actually faster than devices, testing on the actual hardware is still important due to device-specific issues. And having such tool makes this way easier since you don't have to constantly reach for a phone and be wrapped in cables :)
- MarkyC4 9y agoWireless ADB exists, but the initial APK upload is still pretty slow (compared to wired)
- xamuel 9y agoCould this be used like a poor man's personal hotspot, when data providers refuse to allow tethering?
- Jaruzel 9y agoI can also see a use for it, where your IM application of choice does not have web/desktop equivalent, but you want to chat via your PC anyway.
- squarefoot 9y agoIf it could control the phone through the network allowing to simulate swiping with the mouse it would be even more useful. As an example, I'm allergic to Whatsapp but am forced to keep it in (on a tablet which stays at home 24/7, data plan only SIM) because of a handful of friends who refuse to use more advanced IM software, so when I'm away they cannot contact me. The WA web app is a joke and forces one to keep the phone/tablet at hand anyway, so although I don't miss Whatsapp at all, being able to tunnel the access to it could be useful sometimes.
- Raphmedia 9y agoA consumer use would be a reliable way to do screen capture (e.g. Tinder, Snapchat). For devs, you could setup a device somewhere for automated testing.
- zanhecht 9y agoIt won't work on apps that block screenshots. For example, when I open my banking apps, I just see a black screen. See https://github.com/Genymobile/scrcpy/issues/36 https://github.com/Genymobile/scrcpy/issues/36
- otachack 9y agoDemoing an app on Android has been a pain, so far. Vysor was the easiest solution but comes with ads if you don't buy the license. This seemingly being an ad-free alternative makes it very interesting to me and my team. Only thing is I tried to compile the code base on a Macbook Pro and it took maybe 10+ minutes on my only attempt. I had to cancel it b/c my laptop was going into "jet" mode w/ the noise levels during a conference call. I'm going to try and compile it again and see how long it really takes for me.
- rom1v 9y ago10 minutes? Wow! It's probably due to the initial gradle build. On my laptop, after a new "git clone", the whole build takes 18s for me. If I use the prebuilt server (https://github.com/Genymobile/scrcpy#prebuilt-server https://github.com/Genymobile/scrcpy#prebuilt-server), so that it only compiles the client, it takes 0.8s.
- shimo5037 9y agoLooks great. It certainly has become much easier to build such apps on modern Android :) For something a bit more old school, I’d like to insert a shameless plug here that we open sourced something similar several years ago. It’s focused on the enterprise side, so setting it up is unfortunately quite a bit more involved. Screen rendering is obviously far less advanced as well, though still decent enough. It’s compatible with (almost) all Android versions since 2.3 which has its own fun challenges! Anyway, great project with a modern take! https://github.com/openstf/stf https://github.com/openstf/stf
- mohitmun 9y agoYou can also control it wirelessly using adb tcp mode. Run adb tcpip 5555 and connect it using adb connect command
- rom1v 9y agoActually, it won't work with the current version because of an adb bug ("adb reverse" does not work over "adb connect"): https://issuetracker.google.com/issues/37066218 https://issuetracker.google.com/issues/37066218 The solution would be to change the direction of the connection, and use "adb forward", but then scrcpy would try to connect before the server is started, so it would need to retry until connected (and the error would not be noticed on connect, but on first read, due to the tunnel). Working over "adb connect" would be good, though.
- post_break 9y agoI could see someone taking a bunch of android devices and using this to farm stuff.
- felipebueno 9y agoHey, thank you for such an useful tool! :) I'm an Android dev currently working on a team using NativeScript. My coworkers' latops have only 4GB RAM and they are unable to use an AVD for development. From now we are going to use scrpy :)
- titanomachy 9y agoI have 16GB and I can barely use AVD, it's still laggy and terrible compared to the iOS simulator. EDIT: yes, I do have hardware acceleration enabled.
- incidentnormal 9y agoVery clever, and nice writeup! A few years ago I wrote a bunch of bash scripts to control my phone over adb (found it useful to script certain things and write messages etc. Before things like WhatsApp had a Web client). This has taken that concept to its most elegant formulation! Well done.
- asmosoinio 9y agoAwesome tool, and a very good write-up! Wish I was still actively developing for Android, this would be very useful. This link should be a "Show HN"? I.e. it is about a tool you wrote.
- defied 9y agoVery nice! We’d be interested in adding VNC support so that we can control Android devices remotely via VNC.
- foobaw 9y agoThis is amazing - something that the Android team should definitely have supported already.. Great work!
- ww520 9y agoIs there X Windows support in Android?
- jra101 9y agoThis is awesome, worked perfectly. Only downside is if you have swipe to unlock, I couldn't actually get the swipe up to trigger the password input screen.
- math0ne 9y agoAwesome, I've been using Vysor for this but it def has issues the least of which is the ads, so I can't wait to try this!
- redwolf2 9y agoNice. I was using Droid@Screen(http://droid-at-screen.org/ http://droid-at-screen.org/) the whole time. This seem to be a promising alternative.
- pasbesoin 9y agoThank you
- sengork 9y agoMyPhoneExplorer and Samsung SideSync on Windows/macOS had this for a few years now. Glad to see an application for Linux now.
- alinspired 9y agothanks for sharing - this can replace airdroid for me
- tinhangliu 9y agoAmazing job! Congrats :)
- rahulrav 9y agoThis is amazing.
- pabl0rg 9y agoThis opens up the possibility of making something akin to niffy [1], which offers a sane/easy way to automate UI testing. Unfortunately, in the case of Android apps you wouldn't have css selectors to simplify simulation of clicks on specific elements. 1: https://github.com/segmentio/niffy https://github.com/segmentio/niffy
- rom1v 9y ago> Unfortunately, in the case of Android apps you wouldn't have css selectors to simplify simulation of clicks on specific elements. There is UIAutomator, you can select components based on text, class, index, etc. https://developer.android.com/training/testing/ui-automator.html https://developer.android.com/training/testing/ui-automator.... We use it to automate actions to configure Android devices (when there is no better way).
- sannee 9y agoWhy would you need a "real" phone for UI testing? Android has a very good emulator available.
- brokenmachine 9y agoGreat info on how it all works. Thanks for that!
- Abishek_Muthian 9y agoAFAIK, till now the only alternative for the features mentioned in OP was Vysor by clockworkmod which is a monthly paid app. I had to subscribe it for occasional demos, I'll be happy if Scrcpy fills in the role.
- voltagex_ 9y ago>$2.50/mo, $10/yr, or $40/lifetime. Purchase available in app.
- tenryuu 9y agoBeen wanting an application like this for quite a long time, no wireless, no 3rd parties, just me, my usb and not requiring java :)
- mikeymop 9y agoThis is an example of one of those applications that work so well, consists of simple parts, and leverages these simple tools very cleverly. It's a solution that I think 'why didn't I write this?' Very awesome work rom1v, and very much appreciate you explaining your usage of adb screenfetch and how you are able to arbitrarily run java code from /tmp. This opened up an entire new world for me.
- darepublic 9y agoRather than control with mouse and keyboard I want to control the android purely with voice.
- p47r1ck7541 9y agoThis is a really nice tool for the development of headless Android device.
- rom1v 9y agoIt now works wirelessly: https://www.genymotion.com/blog/open-source-project-scrcpy-now-works-wirelessly/ https://www.genymotion.com/blog/open-source-project-scrcpy-n... ;)