Flash "/>

New toy

03 August 2011 at 12:20 am

eeepad.pngI’ve been working with various devices and Flash the last half year and today I got myself a brand new toy, the ASUS Eee Pad Transformer. It’s the first Android tablet that has appealed to me in any way and the keyboard dock actually makes it usable as something more than just an entertainment-toy like the iPad is to me.

Don’t get me wrong though. Android is still miles behind Apple in terms of usability on their tablet OS, but HoneyComb 3.2 really isn’t bad at all and I needed a high resolution tablet (1280 by 752 pixels) for device testing. Getting my projects onto the device was absolutely straightforward except for one important thing - the device didn’t show up in Flash Builder initially.

Thanks to Mark Doherty and Twitter I got an answer in just minutes but it wasn’t exactly detailed: “you’ll need to add the oem code to a file called adb_usb.ini”. It took a few minutes to figure this out so I figured I’d post how to add any USB device to the Android SDK and Flash Builder 4.5 (an others) for future reference.

Open a Terminal window and at the prompt type this:
cd /Applications/android-sdk-mac_86

If your Android SDK is in a different location, just substitute the path above. Next, make sure you stop the ADB server by issuing the kill-command:
./adb kill-server

Next you’ll create the adb_usb.ini file. Open another Terminal window. By default, Terminal windows open at your home path and that’s just where we want to be. In this folder there should be a hidden folder called “.android”. You can’t see this using the OSX Finder, but if you type:
ls -la

you’ll see all the files in the directory. Enter the folder using the cd-command:
cd .android/

If you type “ls -la” again and no “adb_usb.ini” exists, type the following to create the file:
touch adb_usb.ini

The next step is adding support for the tablet/device vendor of your choice. You can edit this file using any good text editor or you can do it simply via the Terminal by typing:
echo “0x0b05” >> ~/.android/adb_usb.ini

That will append the hex value to the text file. In the line above, the characters “0b05” adds support for devices from ASUS. The full (but not complete) list of manufacturers can be found here: http://developer.android.com/guide/developing/device.html and using this you should be able to add support for any other USB-based device.

You finish off by restarting the ADB server:
./adb start-server

and then ask it to list devices connected:
./adb devices

On my machine this produced a list like the one below and made the ASUS Eee Pad Transformer device show up in Flash Builder as it should:
List of devices attached
370668942427457 device

I hope this is of use to others as well 😊