Wednesday, August 22, 2012

How to install android debug bridge (adb)

Google is making it a challenge to use basic Android tools. The swiss-army knife of Android tinkering is adb. Where do you find it? Not in the SDK. If you download-and-install the r20 SDK, you'll find a note in the tools directory:

The adb tool has moved to platform-tools/

If you don't see this directory in your SDK,
launch the SDK and AVD Manager (execute the android tool)
and install "Android SDK Platform-tools"
[...]
I couldn't find anything named "SDK and AVD Manager" in the SDK, but I found the android tool in the tools directory. I even found a suggestion for how to get platform-tools without opening a UI. But...
jason@pinot:~/android/sdk-r20$ ./tools/android update sdk --no-ui
./tools/android: 1: ./tools/android: java: not found
./tools/android: 1: ./tools/android: java: not found
./tools/android: 110: exec: java: not found
After searching around the Ubuntu packages site, I realized I needed to:
sudo apt-get install openjdk-7-jre
Then I reran the android update command (above). Yes, I got the platform-tools (including adb), but I'm also getting tons of other crap I don't want. Maybe running ./tools/android without any arguments would have been better...

Now, the moment of truth:

jason@pinot:~/android/sdk-r20$ ./platform-tools/adb 
./platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
You've got to be kidding me.
jason@pinot:~/android/sdk-r20$ sudo apt-get install libncurses5
[...]
libncurses5 is already the newest version.
[...]
Ah, adb is a 32-bit binary. Do 32-bit Linux installs even exist any more? Anyway,
sudo apt-get install lib32ncurses5 lib32stdc++6
Phew! What a workout! Finally, the reward:
jason@pinot:~/android/sdk-r20$ ./platform-tools/adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached 
0146B5BB04002013 device
Ah, what a lovely device number.

Saturday, August 11, 2012

Android GSM Reception Icons

Since I got my Galaxy Nexus and hooked it up to T-Mobile service, I've been wondering about the abbreviations next to the mobile signal reception strength icon. Everyone knows that more bars is good, but what about "E" versus "H"? After having very poor download speeds with an "E" status, I finally did some searching to find out.

The abbreviations refer to the technology of the network you are connected to:

  • H - HSPA - this is the fastest connection, with up to 14 Mbit/s download speeds (or up to 84 Mbit/s for HSPA+)
  • 3G - most likely refers to W-CDMA, the predecessor to HSPA, with speeds up to 2 Mbit/s
  • E - EDGE - a predecessor to 3G networks, with speeds up to 384 kbit/s (non-Enhanced)
So, even a week "H" connection can be much better than a strong "E" connection. Keep that in mind the next time you are checking reception!