Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an HTC HD2 with a completely busted screen, I tried repairing it with a replacement screen but broke the ribbon cable to the screen (oops) sad day,

I've got two of these and I've been running them as servers and ipcam cameras.

I started using qtadb, which did work on my phone despite a broken screen. I installed droid VNC Server beta using the file manager on qtadb. I grabbed the app's manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="52" android:versionName="0.991" package="org.onaips.vnc"  xmlns:android="">
    <uses-sdk android:minSdkVersion="3" />
<application android:label="droid VNC server" android:icon="@drawable/icon" android:name="MainApplication" android:debuggable="false">
    <activity android:label="@string/app_name" android:icon="@drawable/icon" android:name=".MainActivity" android:launchMode="singleInstance">
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
    <activity android:label="Preferences" android:name="preferences" />
    <meta-data android:name="com.mobclix.APPLICATION_ID" android:value="1F34160B-63BB-4854-BDB7-D46B7EADBF06" />
    <activity android:name="" />
    <service android:name="StartAtBootService">
            <action android:name="org.onaips.vnc.StartAtBootService" />
    <receiver android:name="StartAtBootServiceReceiver">
            <action android:name="android.intent.action.BOOT_COMPLETED" />
            <category android:name="android.intent.category.HOME" />
    <service android:name="avncservice" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

and I have tried several things to start and run the service using the console on qtadb. I have tried running:

am start -a android.intent.action.MAIN -n org.onaips.vnc/

am start -a android.intent.action.MAIN -n org.onaips.vnc/org.onaips.vnc.MainActivity

am start -n org.onaips.vnc/

am start -n org.onaips.vnc/org.onaips.vnc.MainActivity

am startservice -a android.intent.action.MAIN -n org.onaips.vnc/

am startservice -a android.intent.action.MAIN -n org.onaips.vnc/org.onaips.vnc.MainActivity


I test each time by NMAPing my device's ip address, no new ports show up. (I don't have a firewall)

But on a working phone, it doesn't start when you run the app; it starts when you press the run button. So How do I press the run button with a broken screen?

I just need vnc server to run so i can actually do some config things to run debian and my video server on it.

share|improve this question

Use adb shell am start -a android.intent.action.Main -n org.onaips.vnc/.MainActivity outside the shell, and the VNC server will start.

share|improve this answer

This answer was suggested as an edit by an anonymous user, but should stand on its own.

First you have to locate the droidvncserver executable file on your device. On a Nexus S it's in this directory:


Then you have to set the execution right on the executable file (it's a UNIX subutility) from PC using adb.exe. In a command line window (from the appropriate Android SDK folder) you can type :

adb.exe shell chmod 766 /data/data/org.onaips.vnc/files/androidvncserver

(this has to be to done only once, for further detail on chmod command type man chmod in google)

Then you'll be able to launch vnc server directly from your PC using adb.exe:

adb.exe shell /data/data/org.onaips.vnc/files/androidvncserver

Additionnaly to connect your VncViewer using the USB cable type in another command line window:

adb.exe forward tcp:5901 tcp:5901
share|improve this answer
adb shell
cd /data/data/org.onaips.vnc/files
chmod 766 androidvncserver
share|improve this answer
No explanations, nothing! Care to elaborate more about this for the benefit of end user reading this? – t0mm13b Oct 15 '12 at 13:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.