This took several hours, with multiple dead ends, but here’s my story of getting my first Titanium app deployed to an Android device, using Windows 7 64-bit Ultimate.
First, which phone to get? Obviously I want the cheapest possible, with no commitment. It doesn’t need to even be activated, since I won’t be making any calls with it; it’ll just be used as a test platform over wifi and USB. And for a realistic scenario, I want the lowest-end OS possible (Android 2.1 in this case). So I got a no-contract Samsung Intercept, over Virgin Mobile, from BestBuy for $169. I realize that eventually I’ll need to get a real developer phone (like a Nexus S) but that shouldn’t be necessary initially. Turns out it isn’t, fortunately.
- First set up device for wifi.
- Good idea to write down the battery serial # first in case you need it later: XXXXXXXXX/XXX
- Install the battery. Strangely with no directions in the package this took a bit to figure out (I did end up googling for and downloading these manuals here and here. Eventually I used my fingernail to pop off the back cover, which was pretty flimsy.
- Once it’s charged, go to the home screen, scroll to Settings and tap.
- Check Wi-Fi to turn it on.
- Click “Wi Fi Settings” / Add Wi-Fi Network and enter your key. Now you’re connected and can browse the web.
- Set up the phone for debugging.
- When I plugged the USB into my PC for the first time, it got a “driver install failed” error, which I ignored. Turns out I shouldn’t have. Read on.
- In Titanium Developer, load your Titanium Project and confirm the Android SDK version is low enough for the device. You can find the Android version from the phone by going to Settings / About Phone. In my case it’s “2.1update1” and 2.2 is not out just yet.
- Go to Run on Device tab, then click the gray “Install Now” button. The yellow alert box in the upper right will say “Installing app to device”, but goes away after maybe a minute. That was easy!
- I check my phone though, and my app is not there. This sort of thing has been reported before. So I realize this could be a USB driver missing problem.
- Get the proper drivers for this phone.
- I unplug and then plug in the USB, and it tries again to install the drivers for Samsung Intercept and fails.
- Switch to Googling mode. I look online at Samsung.com for the driver, since maybe for some reason Windows doesn’t know about it. Searching by device name doesn’t work (pretty lame website there) so I have to find the Samsung model number, which isn’t anywhere in the packing materials, but I discover is SPH-M910 from looking under Settings / About Phone.
- I try to download the latest manual and driver but discover it’s only for XP/Vista, and won’t install on Windows 7 at all. Amazing for a phone that was released just a few months ago (see forums about lacking Win 64-bit drivers here and here).
- I google further, and find the unrecognizability in Windows 7 64-bit was related to USB debugging being enabled.
- So I disable the USB debugging:
- Leave USB unplugged.
- Now go to Settings / Applications on phone.
- Check “Unknown sources”
- Go to Development and check “Stay Awake” and “Allow Mock Locations”.
- Turn off phone
- Plug USB back in.
- Turn on phone
- It should now show up in devices in Windows (Control Panel / Hardware and Sound / Devices and Printers) as SAMSUNG_Android.
- On the phone, set it to be mountable as a drive.
- You should see the little USB symbol at the top of your Android screen.
- Touch the top of the screen and scroll it down – you will see “USB Storage” – tap on that.
- A new menu will pop up and you should see “Mount” and select it.
- Try to install the app again in Titanium, wait a minute for Installing alert to subside, but still same result.
- I decide to eliminate Titanium as a possible variable, so I it’s time to back up and see if I can build a simple HelloAndroid app with Eclipse. It builds and runs fine in the emulator. OK, that’s something.
- Follow the directions to install the Google USB driver, but this doesn’t work in my case since the Samsung Intercept is not part of the driver INF file. So I add the entries, noting that I also need to add “\” to each lines which was a typo in the post.
- Try to update the Samsung device using the new modified INF file via the Device Manager, but Windows claims the most recent version of the driver has already been installed. Strange.
- Maybe the INF settings need tweaking so I unplug the phone from USB.
- Download, unzip and run the usbdeview utility and try to re-install the INF via that. No difference.
- Maybe the Device ID in the INF is incorrect, so find Samsung ID here. I confirm the Device ID’s are correct so that’s not the issue.
- Finally a bit of luck, via Google I stumble across this page on a heretofore unknown Samsung mobile developer site. What’s interesting about the developer guide is that even though the page is all about the Galaxy Tab, there’s a download for Samsung Mobile USB drivers that I hadn’t seen anywhere else.
- So I created a Samsung developer account needed to download the “Samsung USB Driver for Mobile Phones”.
- I uneventfully install this new MSI.
- With the phone plugged in, I get an alert saying the driver was installed. So now the moment of truth – can I use USB debugging now?
- Unplug phone from USB.
- Check “USB Debugging” on phone.
- Plug phone into PC.
- Now, Windows installs a set of 4 Samsung drivers (specifically USB Composite device, Android USB Mode, USB Mass Storage Device, and (the kicker!) Android Composite ADB Interface.
- That looks much better. Check to see if it appears as an ADB device now:
c:\Program Files (x86)\Android\android-sdk-windows\platform-tools> adb devices List of devices attached emulator-5560 device M9101f380ce9 device
Yay – there it is!
- Now back to Eclipse. Rebuild the HelloAndroid project in Eclipse, and as per these directions, choose to Run at the new device instead of the Emulator. Boom, it gets pushed to the phone and launches automatically.
- Now try Titanium Developer. Click install now, wait about 45 seconds, and boom, it’s installed.
I’ve read reports that this is easier on a Mac (deploying to Android “just works”), and probably one of the more expensive phones supported by Google’s USB driver would have made life easier. But now I can say that I have a Titanium app running on a realistic end-user phone.
Next up, deploying to iPhone.