how to connect adb to a target that uses DHCP to get IP addr

by twebb » Wed, 29 Apr 2009 04:36:49 GMT


Sponsored Links
 I'm debugging on an OMAP target running android.  The target has
network connectivity via a usb-to-eth dongle and gets its IP address
via DHCP.  Normally, if I knew the IP addr of the target, I'd set
ADBHOST=<ip_addr> and then start adb - and all works well.  So in the
scenario where I don't know the IP addr that was assigned to the
target by the DHCP server, how can I start adb?  Can ADBHOST be set to
a network, like 192.168.1.* ?

Thanks,
twebb

--~--~---------~--~----~------------~-------~--~----~

-~----------~----~----~----~------~----~------~--~---



Other Threads

1. Android on device GPS locate not working - code included

I'm creating a project that allows for my location to be found using
the android device and communicating with my website as to where my
Android device is.  When I download the .apk to my phone the following
permissions are acquired:

Network communication (full)
Your location (fine (GPS), coarse (network-based) location)

As of now, on the emulator everything works fine and I can find my
location (default location on Google Maps), but on the phone the
application/device can't find location of the android phone.

please help!...below is the code I'm using for the GPS section.

- Amir

----

package org.gw.service;

import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.widget.Toast;

public class LocationService extends AService {

   public int excute() {
getDataMap().put(Command, LOCATION);

if (isOk()) {

    // // location.
    // getDataMap().put(Des, "OK");
    // //get location
    // getDataMap().put(Value, "100,100");
    // String location = "25,121.55";
    LocationManager lm = (LocationManager) getContext()
     .getSystemService(Context.LOCATION_SERVICE);

    LocationListener locationListener = new GWLocationListener(this);
    lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
     locationListener);



} else {
    getDataMap().put(Des, "error password!!");
}

return 0;
   }

   private class GWLocationListener implements LocationListener {
private LocationService service;
public GWLocationListener(LocationService service) {
    this.service=service;
}

@Override
public void onLocationChanged(Location loc) {
    if (loc != null) {
 String location = loc.getLatitude()+","+loc.getLongitude();
 service.getDataMap().put(Value, location);
  getDataMap().put(Des, "OK");
 new ServiceClient(service).excute();
    }
    else
    {

 getDataMap().put(Des, "Location fail!");
 new ServiceClient(service).excute();
    }
}

@Override
public void onProviderDisabled(String provider) {
   return;
}

@Override
public void onProviderEnabled(String provider) {
    return;
}

@Override
public void onStatusChanged(String provider, int status, Bundle
extras) {
    return;
}
   }
}

--~--~---------~--~----~------------~-------~--~----~

2. Thread Question

I have a function that utilizes a thread.

A variable the is needed for the program is populated after the thread
call is made.

The thread takes a while to complete.

How can I make the program wait for a thread to complete before moving
on?


Thanks,
Josh Beck

--~--~---------~--~----~------------~-------~--~----~

3. Android Database connectivity program

4. onDestroy/AlarmManager interaction on install?

5. How to use GridView ?

6. Proper way of handling orientation change + async thread

7. pass data between activities