All posts by Peter Ridge

Peter is a product development and management professional whose career has spanned from computer hardware and software engineering to product packaging, print advertising and user experience design. He is a published author and has applied his skills to a variety of businesses from start up ventures to top-10 media companies.

Device Not Found Error from ADB on Mac OS X

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.

Update 2015/01/28: cielavenir wrote a handy tool to load/unload the EasyTether kext. You can get it at https://github.com/cielavenir/EasyTetherLoader

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

Disable Onboard MacBook Trackpad when Magic Trackpad Attached

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.

Enable Tab Key Navigation for All Controls in Web Pages and Windows on Mac OS X

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.

Middle-click/Cmd+click on a Link Doesn’t Open Tabs in Firefox 6.0.2

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.