diff --git a/.classpath b/.classpath old mode 100644 new mode 100755 index 30a4a09..75ddfe0 --- a/.classpath +++ b/.classpath @@ -3,6 +3,6 @@ - + diff --git a/.project b/.project index 42986f3..03c1362 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ - avnc + droidVNCserver diff --git a/res/raw/busybox b/res/raw/busybox deleted file mode 100644 index 2d7bf40..0000000 Binary files a/res/raw/busybox and /dev/null differ diff --git a/res/raw/indexvnc b/res/raw/indexvnc deleted file mode 100755 index f8be29e..0000000 --- a/res/raw/indexvnc +++ /dev/null @@ -1,20 +0,0 @@ - - - - -$USER's $DESKTOP desktop ($DISPLAY) - - - - - -
-Further help:
-oNaiPs Blog
-www.TightVNC.com - diff --git a/src/org/onaips/vnc/StartAtBootService.java b/src/org/onaips/vnc/StartAtBootService.java deleted file mode 100644 index 127c02c..0000000 --- a/src/org/onaips/vnc/StartAtBootService.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.onaips.vnc; - -import java.io.IOException; -import java.io.OutputStream; - -import android.app.Service; -import android.content.Intent; -import android.content.SharedPreferences; -import android.os.IBinder; -import android.preference.PreferenceManager; -import android.util.Log; - -public class StartAtBootService extends Service { - - @Override - public IBinder onBind(Intent arg0) { - // TODO Auto-generated method stub - return null; - } - - - @Override - public int onStartCommand(Intent intent, int flags, int startId) - { - startServer(); - // We want this service to continue running until it is explicitly - // stopped, so return sticky. - return START_STICKY; - } - - - public boolean free_version() - { - return getPackageName().equals("org.onaips.vnc"); - } - - - public void startServer() - { - SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this); - - Boolean startdaemon=preferences.getBoolean("startdaemononboot", false); - - //Lets see if i need to boot daemon... - Log.v("VNC","Let me see if we need to start daemon..." + (startdaemon?"Yes":"No")); - if (startdaemon==false) - return; - - - //this code is redundant, how to merge it? - try{ - Process sh; - - - String password=preferences.getString("password", ""); - String password_check=""; - if (!password.equals("")) - password_check="-p " + password; - - - String rotation=preferences.getString("rotation", "0"); - rotation="-r " + rotation; - - String scaling=preferences.getString("scale", "100"); - - String scaling_string=""; - if (!scaling.equals("0")) - scaling_string="-s " + scaling; - - String donate=free_version()?"":" -d "; - - String port=preferences.getString("port", "5901"); - try - { - int port1=Integer.parseInt(port); - port=String.valueOf(port1); - } - catch(NumberFormatException e) - { - port="5901"; - } - String port_string="-P " + port; - - - sh = Runtime.getRuntime().exec("su"); - OutputStream os = sh.getOutputStream(); - - - writeCommand(os, "chmod 777 " + getFilesDir().getAbsolutePath() + "/androidvncserver"); - writeCommand(os,getFilesDir().getAbsolutePath() + "/androidvncserver "+ password_check + " " + rotation + " " + scaling_string + " " + port_string + donate); - - //dont show password on logcat - Log.v("VNC","Starting " + getFilesDir().getAbsolutePath() + "/androidvncserver " + " " + rotation + " " + scaling_string + " " + port_string + donate); - - } catch (IOException e) { - Log.v("VNC","startServer():" + e.getMessage()); - } catch (Exception e) { - Log.v("VNC","startServer():" + e.getMessage()); - } - - } - - static void writeCommand(OutputStream os, String command) throws Exception - { - os.write((command + "\n").getBytes("ASCII")); - } -} diff --git a/src/org/onaips/vnc/StartAtBootServiceReceiver.java b/src/org/onaips/vnc/StartAtBootServiceReceiver.java deleted file mode 100644 index 61022ab..0000000 --- a/src/org/onaips/vnc/StartAtBootServiceReceiver.java +++ /dev/null @@ -1,18 +0,0 @@ -package org.onaips.vnc; - -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; - -public class StartAtBootServiceReceiver extends BroadcastReceiver -{ - @Override - public void onReceive(Context context, Intent intent) - { - if (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) { - Intent i = new Intent(); - i.setAction("org.onaips.vnc.StartAtBootService"); - context.startService(i); - } - } -} \ No newline at end of file