24

My rooted Galaxy Nexus has a broken screen. How can I use my PC (ie, via ADB) to control the phone?

androidscreencast would be the ideal solution, but its keyboard/mouse control feature does not work in Jelly Bean. Perhaps someone knows why and we can patch the code? (see: https://groups.google.com/d/msg/androidscreencast/BAeW5iG55FI/ebTFodV-BZsJ)

Installing a VNC server is another, but for the love of me I can't get it to work. Eg, using Droid VNC Server, I install the apk, and am supposed to execute /data/data/org.onaips.vnc/files/androidvncserver but there is no files directory inside org.onaips.vnc (instructions from here: https://github.com/oNaiPs/droid-VNC-server/issues/14). VMLite is another VNC server that can be started with a special Windows utility (and doesn't need root!) but it's not OSS so I can't get the apk in order to install (Google Play is not pushing apps to my phone prob because I disabled some service--let me know if I can force Google Play to update itself from ADB or install the app). fastdroid-vnc is a binary (not apk) and it runs fine via shell, but something is broken and it shows nothing.

What are my options? Let's make this a community wiki, to help anyone who's broken their screen!

1

8 Answers 8

11

Looks like these days the best solution for controlling an Android phone from a PC is scrcpy. It is being actively maintained, has very high performance (framerate, latency), is available cross-platform. It also does not require root on the phone.

1
  • 2
    This application works in real time (no waiting for screenshots) and can even work with the lockscreen on non-rooted devices. This is exactly what I needed to recover a phone with a broken touchscreen. Thank you!
    – dotancohen
    Commented Mar 3, 2021 at 13:10
9

adbcontrol can do this. It opens a window containing the phone screen on your computer, so you can use it when the phone screen is broken, and you can click and type in the window to control the phone. To install adbcontrol do:

wget http://marian.schedenig.name/wp-content/uploads/adbcontrol.zip
unzip adbcontrol.zip

Now edit config.properties and change:

adbCommand=/your/path/to/adb
localImageFilePath=/home/youruser/adbcontrol_screenshot.png

Save config.properties and run java -jar adbcontrol.jar which will open a window to remote control your phone. Make sure that adb works (adb shell opens a shell), and that the phone is awake so the screen is on (even if it's cracked/broken) otherwise you'll just get a black window.

5

One word: Vysor

Using the vysor to control my Xperia Z2. See the state of my phone, but Vysor came to the rescue.

Using vysor to control my Xperia Z2

*if phone reboots and won't connect after plugging in, try removing the micro sd card. Mine wouldn't work at all until I did so - random phone smasher

2
  • I wonder what it needs. It tells me on my Android 4.2.1 and 4.4.2 that screen is unavailable and a restart would fix it, which of course is never fixed. On which Android version did you test this tool?
    – Firelord
    Commented Feb 19, 2016 at 16:23
  • @Firelord Android 5.1.1. You've tried different usb ports? Its hard to tell where the problem lies, but perhaps it might be as a result of the OS version.
    – KhoPhi
    Commented Feb 19, 2016 at 19:32
4

You could try to use AndroidScreenCast for you purposes - it's maintainable version of original androidscreencast. It requires only Java and ADB, no phone client, so just run it and use it. I've just tried it with Nexus 4, Android 4.1.2 Jelly Bean emulator. And, actually, I'm currently the maintainer of the project, so if you got any questions or issues - contact me via github.

And here's link for Windows bundle: androidscreencast.7z of latest release.

2

Webkey is a great app for this. On top of being a VNC server, it is also a web host. You go to your phone's IP in a web browser, and you control your phone via the page's VNC viewer.

It also has services for file transfer, GPS location, and a bunch more. And, it lets you define users and passwords, along with different services each user is allowed to access (view only, view and control, gps, etc). And the web server can be accessed over https as well as http, so you can encrypt your connection (it's a self-signed cert).

The only downside I can think of is that I don't know if it can be initially configured without having access to the touchscreen. Perhaps if you configure it on another phone, then you could side load the apk and copy the settings to your broken phone. About the only thing you would need to figure out in that case is how to add the app to SuperUser's list of allowed apps.

For those who care, WebKey is open source and free. Just icing on the cake.

1
  • Thanks, but it's really the ability to start it from the command-line that is key. Commented Mar 22, 2013 at 15:14
1

use MyPhoneExplorer. This fits all your requirements, however for the first time when you connect you should have enabled ADB Debugging under developer Options
you can make call, hang call, SMS, read contacts, backup, start an app, play a game. what not. I have been using this for past 5 - 6 years.

1
  • But you can't remote control the phone using mouse
    – Alex78191
    Commented Feb 19 at 22:20
0

This is the my absolute favorite method so far out of everything I have tried for countless hours of Google surfing for this exact same answer. It requires a bit of configuring, and honestly I have no idea if it works on Windows, so you may have to borrow a friend's Mac or install Ubuntu inside Virtualbox or something, but it's well worth it.

  1. Download STF (Smartphone Test Farm) from github https://github.com/openstf/stf.
  2. This requires a ton of dependencies, and while the instructions are pretty simple, it may seem a bit hazy so I'll try to simplify. If you are using OS X then you can use homebrew (navigate to brew.sh for homebrew) to install all dependencies with a single command:

    brew install rethinkdb graphicsmagick zeromq protobuf yasm pkg-config

  3. If you're on Linux then manually install the dependencies via the provided links:

Node.js - https://nodejs.org/

RethinkDB - http://rethinkdb.com/

GraphicsMagick - http://www.graphicsmagick.org/

ZeroMQ Libraries - http://zeromq.org/

Protobuf Libraries - https://github.com/google/protobuf

yasm - http://yasm.tortall.net/

pkg-config - http://www.freedesktop.org/wiki/Software/pkg-config/

  1. Extract the STF-master folder from the Github zip and navigate to it from Terminal npm install then npm link.

  2. Next, type this in from a terminal still inside the same directory rethinkdb. Minimize the terminal window and open up a new terminal window and navigate to the STF-master folder again. This time type in stf local. Minimize this window as well.

  3. Now connect your device via USB to the computer. Open up any internet browser from the computer, not the phone and type in the URL localhost:7100. This will bring up the STF interface. Simply provide any username and email you like and you will see your connected device in a panel and be able to control it like never before. Clicking simulates touch functionality, typing is automatically sent directly to the device, take screenshots, send shell commands, create your own Oauth services and keys; the possibilities are endless.

1
  • Thank you for the instructions. To help clarity, format commands as code, usually on a separate line (check out the Markdown help). Don't tell readers to "minimize this window." (Too much detail, and terminals can have tabs, tiles, etc.) If necessary, just say "in a new terminal, execute the following" (meaning, the previous command is long-running). Lastly, it's not clear what "type this" refers to in step 5. Commented Mar 29, 2017 at 10:10
0

i have to add this new tool, works perfectly and without java! Has been a savior for my broken screen: seversquare https://github.com/yangh/sevensquare Install very easy on linux ; don't know for windows.

Cheers

1
  • It would really be helpful to point out a few more details, so folks don't have to waste their time: 1) there are no binaries, you have to compile it yourself; 2) you'll need a Linux machine to compile it; 3) last update was about a year ago, so not sure if it's still maintained; 4) it requires ADB on the computer. It claims to run on Windows as well, though (but certainly will need the appropriate drivers for ADB and your Android device).
    – Izzy
    Commented Jan 22, 2018 at 17:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .