title: Find android adb command from logcat
body: <p>I hope anyone can help me. I am using <code>VNC server</code> on an <code>Android</code> stick on which I am developing, because I don't want it to be connected with a display at all time. The problem is that now and then the <code>VNC</code> app force closes. Without a display i am forced to restart the whole stick since it auto starts. Now my question, is it possible to restart the <code>VNC</code> server from <code>adb</code>?</p>
  
  <p>The <code>log cat</code> at restart looks like this:</p>
  
  <pre><code>02-28 19:27:32.958: I/ActivityManager(270): Start proc com.schumi.vncs for broadcast com.schumi.vncs/.StartServiceAtBootReceiver: pid=1149 uid=10075 gids={3003, 1028}
  02-28 19:27:33.138: V/VNCserver(1149): copy -&gt; /data/data/com.schumi.vncs/files/android_vncs
  02-28 19:27:33.328: V/VNCserver(1149): Starting /data/data/com.schumi.vncs/files/android_vncs -p 0987654321 -r 0 -s 100 -P 5901   -i enable  
  02-28 19:37:40.388: E/AndroidRuntime(1149):     at com.schumi.vncs.ServerManager$SocketListener.run(ServerManager.java:283)
  02-28 19:37:43.228: I/ActivityManager(270): Process com.schumi.vncs (pid 1149) has died.
  </code></pre>
  
  <p>The <code>Android Manifest</code> of the <code>VNC Server</code> looks like this</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:versionCode="12"
  android:versionName="1.0.5"
  package="com.schumi.vncs"&gt;
  &lt;uses-permission
      android:name="com.android.vending.BILLING"/&gt;
  &lt;application
      android:label="@2131165185"
      android:icon="@2130837514"
      android:name="MainApplication"&gt;
      &lt;activity
          android:label="@2131165185"
          android:icon="@2130837514"
          android:name=".VNC_serverActivity"
          android:launchMode="singleInstance"&gt;
          &lt;intent-filter&gt;
              &lt;action
                  android:name="android.intent.action.MAIN"/&gt;
              &lt;category
                  android:name="android.intent.category.LAUNCHER"/&gt;
          &lt;/intent-filter&gt;
          &lt;intent-filter&gt;
              &lt;action
                  android:name="com.schumi.vncs.ACTIVITY_UPDATE"/&gt;
              &lt;category
                  android:name="android.intent.category.DEFAULT"/&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity
          android:name="Settings"/&gt;
      &lt;activity
          android:name="Status"/&gt;
      &lt;activity
          android:name="Donate"/&gt;
      &lt;activity
          android:name="com.google.ads.AdActivity"
          android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/&gt;
      &lt;service
          android:name=".ServerManager"&gt;
          &lt;intent-filter&gt;
              &lt;action
                  android:name="com.schumi.vncs.ServerManager"/&gt;
              &lt;category
                  android:name="android.intent.category.DEFAULT"/&gt;
          &lt;/intent-filter&gt;
      &lt;/service&gt;
      &lt;receiver
          android:name=".StartServiceAtBootReceiver"&gt;
          &lt;intent-filter&gt;
              &lt;action
                  android:name="android.intent.action.BOOT_COMPLETED"/&gt;
              &lt;category
                  android:name="android.intent.category.HOME"/&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
      &lt;service
          android:name="com.schumi.vncs.BillingService"/&gt;
      &lt;receiver
          android:name="com.schumi.vncs.BillingReceiver"&gt;
          &lt;intent-filter&gt;
              &lt;action
                  android:name="com.android.vending.billing.IN_APP_NOTIFY"/&gt;
              &lt;action
                  android:name="com.android.vending.billing.RESPONSE_CODE"/&gt;
              &lt;action
                  android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED"/&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  &lt;/application&gt;
  &lt;uses-permission
      android:name="android.permission.WRITE_SETTINGS"/&gt;
  &lt;uses-permission
      android:name="android.permission.READ_FRAME_BUFFER"/&gt;
  &lt;uses-permission
      android:name="android.permission.RECEIVE_BOOT_COMPLETED"/&gt;
  &lt;uses-permission
      android:name="android.permission.ACCESS_SUPERUSER"/&gt;
  &lt;uses-permission
      android:name="android.permission.ACCESS_WIFI_STATE"/&gt;
  &lt;uses-permission
      android:name="android.permission.ACCESS_NETWORK_STATE"/&gt;
  &lt;uses-permission
      android:name="android.permission.INTERNET"/&gt;
  &lt;uses-permission
      android:name="android.permission.GET_TASKS"/&gt;
  &lt;uses-permission
      android:name="android.permission.READ_PHONE_STATE"/&gt;
  &lt;uses-permission
      android:name="android.permission.WAKE_LOCK"/&gt;
  &lt;uses-sdk
      android:minSdkVersion="7"/&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>Could anyone please help me, it would be much more convenient to execute a batch file rather than restart the whole device</p>
  
  <p>Regards Phil</p>