Turbulent Sky
Tech Tips, Tricks and Solutions

by

Getting started with Android development on OS X? Is the debugger unable to see your Android phone via USB? I ran into a similar issue and solved it as follows.

In my case, when I would issue the “adb devices” command, I would get back “List of devices attached” and nothing afterward. Similarly, issuing the “adb usb” command would result in “error: device not found”.

As it turns out, the problem was due to a conflict between adb and EasyTether, a USB tethering app. Both wanted to use the USB port to communicate with the phone. If you also use EasyTether or EasyTether Pro, the instructions below will get you up and running. If you use a similar tethering app, this solution may also be helpful.

  1. In OS X, open the Terminal application
  2. Connect your Android device (phone, tablet, etc.) to the USB port
  3. Go to the Android SDK directory. In my case, it’s in ~/android-sdk-macosx/platform-tools
    $ cd ~/android-sdk-macosx/platform-tools
  4. Verify that the device and usb port aren’t available by executing the commands “adb devices” and “adb usb”
    $ ./adb devices
    List of devices attached
    
    $ ./adb usb
    error: device not found
    $
  5. Now, it’s time to free the USB device. Go to the system extensions directory and unload the EasyTether kernel extension. If you’re using a different app, you’ll have to find out what kernel extension it uses on OS X
    $ cd /System/Library/Extensions/
    $ sudo kextunload EasyTetherUSBEthernet.kext
    
    Password:
    $
  6. Go back to the Android SDK directory (unless you have adb in your path) and kill the adb server, in case it’s still running$ cd -$ ./adb kill-server
  7. Finally, restart the adb server on the USB device and check that your device appears
    $ ./adb usb
    * daemon not running. starting it now on port 5037 *
    * daemon started successfully *
    restarting in USB mode
    $ ./adb devices
    List of devices attached
    5052D5808D6F00EC device
    
    $

If you see your Android device listed, as shown in the output of the last step, above, then you’re in business. You should now be able to start an adb shell, install an apk, etc.

To restore EasyTether on OS X, go back to the system extensions directory and reinstall the kernel extension by running, “sudo kextload EasyTetherUSBEthernet.kext”, or just reboot.

Are you using a different tethering app and solved the issue? Post your success in the comments.

Post a comment

by

Do you use a Magic Trackpad or a mouse with your Macbook or Macbook Pro? Do you accidentally bump the onboard trackpad and wish it would automatically turn off when you use an external pointing device?

Well, this is easily rectified. However, the setting is not in an obvious location.

Automatically disable the onboard trackpad

  1. Open System Preferences
  2. Click on the Universal Access applet
  3. Click the Mouse & Trackpad tab
  4. Select the Ignore built-in trackpad when mouse or wireless trackpad is present checkbox

Just remember to turn off the Bluetooth connection for the Magic Trackpad if you temporarily take your laptop to a nearby location, such as a meeting room, or you will have a rude reminder that the onboard trackpad doesn’t work.

Post a comment

by

If you use Windows or Linux as well as Mac OS X, you may have run into the frustration of not being able to use the Tab key to go to checkboxes, buttons and other controls in Safari, Web forms, dialog boxes and other applications on OS X.

Enable full keyboard access in OS X

Fortunately, this functionality is not missing. It is simply disabled by default. Why? Beats me, but it is easy to turn it on.

  1. Open System Preferences
  2. Click on the Keyboard applet
  3. Click the Keyboard Shortcuts tab
  4. Under Full Keyboard Access, select the All controls radio button

Now the Tab key will work the way it does on all those other operating systems.

Post a comment

by

Last night, I updated to Firefox 6.0.2 and after it was finished installing, lo and behold the middle mouse button no longer opened links in new tabs. Using a middle click (Command+click on the Mac) on a link normally opens the destination in a background tab, but it just stopped working. However, I could still use the context menu (right-click on PC, Control+click on Mac) and select “Open Link in New Tab”.

Check your extensions. Are you using Greasemonkey 0.9.10? Are you also using Tab Mix Plus 0.3.8.6? As of this writing, they’re both the latest versions at the Firefox add-ons site. Nevertheless, there’s an incompatibility that causes the middle-click to fail.

To remedy the problem, download and install the latest version of Greasemonkey 0.9.11 directly at https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/0.9.11 or if you’d rather wait for Mozilla to approve the version, it should eventually show up as an update in Firefox.

Post a comment

by

When using PuTTY to SSH to a Linux server and edit files, I’ve encountered on several occasions where navigating in vim using the cursor (arrow) keys on the keyboard while in insert mode results in control characters and/or new lines being inserted. Here are a couple of ways to rectify the situation.

  1. Check if the vim command is pointing to the full version of vim or vim tiny.
    $ which vim

    Some Linux distros link vim to vim tiny. If it’s pointing to the normal vim, skip to step 4, below.

  2. If you’re using vim tiny and want to continue to do so, then edit /etc/vim/vimrc.tiny and add the command set nocompatible to turn off compatibility mode.
  3. If you’d rather have the normal vim editor, then install it. After installation, confirm that the vim command points to the correct version and continue with step 4, below.
  4. Check that /etc/vim/vimrc (or ~/.vimrc) contains the command, set no compatible, to turn off compatibility mode.

That should do it. If you still have trouble, be sure that your terminal is set correctly in PuTTY and on the remote system.

Have another way to fix this issue? Post it in the comments.

Post a comment

Earlier Posts »

Creative Commons License This work by Peter Ridge is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License.
Turbulent Sky Theme by Peter Ridge, based on BlueMod Theme by FrederikM.de
Bear