CANNOT manage to get ADB working whatever I do.

by HLL » Fri, 28 May 2010 03:52:15 GMT


Sponsored Links
 Hay everyone,

I Want to start developing for android and for some reason whatever I
do I can not make ADB show up my Nexus One.

Both on and off in development mode
Both SD Mount and without SD Mount
Both With usb tethering on and off

for all "adb devices"(windows XP64bit) show no device (service started
successfully, device recognized in Device Manager correctly).

Tried reinstalling drivers, tried uninstalling drivers
completely(using 3rd party software) and reinstalling, tried different
versions of the usb driver (up to the one before the last - that came
with the 2.1 sdk)
NOTHING...
It seems online that this issue reoccurs on different devices, but all
of them seemed to solve with one of the above solutions, Which none
worked for me.

It does not look like a hardware problem, because EVERYTHING else that
is USB'ed works correctly.

Any non-already tried idea would be appreciated.

Regards,
Hillel

--



Other Threads

1. startActivityForResult problems

Hello All

I've use startActivityForResult as it described in many examples but
it return 0 result code after start new Activity.

In main Activity I use such code for sub activity invocation

                Intent iShowVideo = new Intent(EventHandling.this, 
ShowVideo.class);
                startActivityForResult(iShowVideo, 
this.REQUEST_CODE_SHOW_VIDEO);

And such code for getting results.

        @Override
        protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
                // TODO Auto-generated method stub
                //super.onActivityResult(requestCode, resultCode, data);
                if(requestCode == REQUEST_CODE_SHOW_VIDEO){
                        if(resultCode == RESULT_CANCELED){
                                Toast toast = Toast.makeText(this, 
"onActivityResultCancel: " +
String.valueOf(resultCode), Toast.LENGTH_LONG);
                                toast.show();
                        }else{
                                Toast toast = Toast.makeText(this, 
"onActivityResult: " +
String.valueOf(resultCode), Toast.LENGTH_LONG);
                                toast.show();
                        }
                }
        }

Here is a part code from ShowVideo activity
        @Override
        protected void onCreate(Bundle savedInstanceState) {
                // TODO Auto-generated method stub
                super.onCreate(savedInstanceState);

                setContentView(R.layout.showvideo);
                //showDialog(DIALOG_YES_NO_MESSAGE);

        Button button = (Button)findViewById(R.id.btnOK);
        button.setOnClickListener(mOkListener);
        button = (Button)findViewById(R.id.btnCancel);
        button.setOnClickListener(mCancelListener);

        //setResult(RESULT_OK, (new Intent()).setAction("Test!"));
        }

    private OnClickListener mOkListener = new OnClickListener()
    {
        public void onClick(View v)
        {
            // To send a result, simply call setResult() before your
            // activity is finished.
            setResult(RESULT_OK, (new Intent()).setAction("Corky!"));
            finish();
        }
    };

This code should work according many examples. And it should return
RESULT_OK after btnOK clicked but after I click this button it only
closes ShowVideo  Activity.

Please help.
--~--~---------~--~----~------------~-------~--~----~

2. SSL client authentication

I am new on SSL programming. The Android app I am developing needs to
open an SSL socket to a secure server which requires the client
authentication. When running on the Emulator and trying to talk to a
Server running on the host PC, the following Android code snippet
always gives me a SocketException at the line, SSLSocket c =
(SSLSocket) f.createSocket(hostName, 8888) :

    private void openSslClient(String hostName)
    {
        try
        {
            KeyStore keyStore = KeyStore.getInstance
(KeyStore.getDefaultType());
            InputStream fis = this.getAssets().open("client.bks");
            keyStore.load(fis, "clientjks".toCharArray());

            KeyManagerFactory kmf = KeyManagerFactory.getInstance
("X509");

            kmf.init(keyStore, "clientkey".toCharArray());

            TrustManagerFactory tmf = TrustManagerFactory.getInstance
("X509");

            tmf.init(keyStore);

            SSLContext sc = SSLContext.getInstance("TLS");
            sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(),
                    new SecureRandom());

            SSLSocketFactory f = sc.getSocketFactory();
            SSLSocket c = (SSLSocket) f.createSocket(hostName, 8888);
            c.startHandshake();
            w = new BufferedWriter(new OutputStreamWriter
(c.getOutputStream()));
            r = new BufferedReader(new InputStreamReader
(c.getInputStream()));
        } catch (Exception e)
        {
            Log.e(LOG_TAG, "openSslClient failed", e);
        }
    }

The stack trace looks like below:
03-11 21:24:00.585: ERROR/OSNetworkSystem(1093): unknown socket error
-1
03-11 21:24:07.156: ERROR/PatientDataUploader(1093): openSslClient
failed
03-11 21:24:07.156: ERROR/PatientDataUploader(1093):
java.net.SocketException: unknown error
03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
org.apache.harmony.luni.platform.OSNetworkSystem.createSocketImpl
(Native Method)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
org.apache.harmony.luni.platform.OSNetworkSystem.createSocket
(OSNetworkSystem.java:79)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
org.apache.harmony.luni.net.PlainSocketImpl2.create
(PlainSocketImpl2.java:59)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
java.net.Socket.startupSocket(Socket.java:668)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
java.net.Socket.<init>(Socket.java:142)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
javax.net.ssl.SSLSocket.<init>(SSLSocket.java:42)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.<init>
(OpenSSLSocketImpl.java:179)
03-11 21:24:07.156: ERROR/PatientDataUploader(1093):     at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketFactoryImpl.createSocket
(OpenSSLSocketFactoryImpl.java:65)


The server test program I am using is a modified version of
SslReverseEchoer available on Dr. Herong Yang's website. It looks like
below:

        public static void main(String[] args) {
                if (args.length < 3) {
                        System.out.println("Usage:");
                        System.out
                                        .println("   java 
SslReverseEchoerRevised ksName ksPass ctPass
ipAddr");
                        return;
                }
                String ksName = args[0];
                char[] ksPass = args[1].toCharArray();
                char[] ctPass = args[2].toCharArray();
                String ipAddr = args[3];
                try {
                        KeyStore ks = KeyStore.getInstance("BKS");
                        ks.load(new FileInputStream(ksName), ksPass);
                        KeyManagerFactory kmf = 
KeyManagerFactory.getInstance("SunX509");
                        kmf.init(ks, ctPass);
                        TrustManagerFactory tmf = 
TrustManagerFactory.getInstance("X509");
                        tmf.init(ks);
                        SSLContext sc = SSLContext.getInstance("TLS");
                        sc.init(kmf.getKeyManagers(), tmf.getTrustManagers(), 
null);
                        SSLServerSocketFactory ssf = 
sc.getServerSocketFactory();
                        SSLServerSocket s = (SSLServerSocket) 
ssf.createServerSocket(8888,
                                        1, InetAddress.getByName(ipAddr));
                        s.setNeedClientAuth(true);
                        printServerSocketInfo(s);
                        SSLSocket c = (SSLSocket) s.accept();
                        printSocketInfo(c);
                        BufferedWriter w = new BufferedWriter(new 
OutputStreamWriter(c
                                        .getOutputStream()));
                        BufferedReader r = new BufferedReader(new 
InputStreamReader(c
                                        .getInputStream()));
                        String m = "Welcome to SSL Reverse Echo Server."
                                        + " Please type in some words.";
                        w.write(m, 0, m.length());
                        w.newLine();
                        w.flush();
                        while ((m = r.readLine()) != null) {
                                if (m.equals("."))
                                        break;
                                char[] a = m.toCharArray();
                                int n = a.length;
                                for (int i = 0; i < n / 2; i++) {
                                        char t = a[i];
                                        a[i] = a[n - 1 - i];
                                        a[n - i - 1] = t;
                                }
                                w.write(a, 0, n);
                                w.newLine();
                                w.flush();
                        }
                        w.close();
                        r.close();
                        c.close();
                        s.close();
                } catch (Exception e) {
                        System.err.println(e.toString());
                }
        }


Can someone shed some light on this?

Thank you in advance.
--~--~---------~--~----~------------~-------~--~----~

3. What's the bar at the top of the screen called?

4. Touchscreen PenMoun

5. does anyone try using this application - PHONEPLUS CALLBACK?

6. Andorid on Beagle : how to set dns server using setprop

7. explanation needes on ISurface and PVPlayer interface