Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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="http://schemas.android.com/apk/res/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">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <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="com.mobclix.android.sdk.MobclixBrowserActivity" />
    <service android:name="StartAtBootService">
        <intent-filter>
            <action android:name="org.onaips.vnc.StartAtBootService" />
        </intent-filter>
    </service>
    <receiver android:name="StartAtBootServiceReceiver">
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
            <category android:name="android.intent.category.HOME" />
        </intent-filter>
    </receiver>
    <service android:name="avncservice" />
</application>
<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" />
</manifest>

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/com.mobclix.android.sdk.MobclixBrowserActivity

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

am start -n org.onaips.vnc/com.mobclix.android.sdk.MobclixBrowserActivity

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


am startservice -a android.intent.action.MAIN -n org.onaips.vnc/com.mobclix.android.sdk.MobclixBrowserActivity

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

etc....

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
add comment

3 Answers 3

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:

/data/data/org.onaips.vnc/files

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
add comment
adb shell
cd /data/data/org.onaips.vnc/files
chmod 766 androidvncserver
androidvncserver
share|improve this answer
1  
No explanations, nothing! Care to elaborate more about this for the benefit of end user reading this? –  t0mm13b Oct 15 '12 at 13:41
add comment

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
add comment

Your Answer

 
discard

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.