Thursday, August 5, 2010

adb on a cheap aPad

So you have an aPad but it is a cheap one.

A "real" Android phone can be USB connected to a host (Windows, Linux or Mac) and should be detected as an "Android phone". If you have downloaded the adb (Android development bridge) USB drivers these should be automatically installed and your development environment (Elcipse is preferred) should then see the device as a potential test environment.

That's the theory. In practice my M003 device does not seem to implement the appropriate USB "slave" code for an adb connection. In this USB scenario your development machine is the USB host (normal big USB connectors) and the device is the USB slave (usually some other USB connector). This means that a USB connection is not possible.

What then?

adb also supports a TCPIP connection on port 5555. This connection fortunately is implemented. This can be confirmed using the Linux nmap command (nmap -A [ip address of device]) which will confirm that port 5555 is indeed listening - waiting for a connection.

  • The Android development kit must be downloaded and installed
  • Java is required
  • adb is found in the tools directory of the SDK
    • To connect to the device use adb connect [ip address of device]
    • To confirm the connection use adb devices
    • To confirm privileged access to the device use adb shell which will provide a prompt (from the device!) at which you will have sufficient access to write to the file system. Try creating a file.
    • Your UID is 2000 which is the shell ID. Getting to be root is going to be harder
More to follow

No comments: