2011-03-24

Corrections for Android Tutorial "Hello, Views > Spinner"

The Android Developer's guide (available at http://developer.android.com/guide/index.html) is an excellent resource for folks looking to develop Android applications. Of course, as is much technical documentation, it's infected with code bugs and errors.

In particular, this post lists errors in the "Hello, Views > Spinner" tutorial, available at http://developer.android.com/resources/tutorials/views/hello-spinner.html, and includes step-by-step corrections for these problems. This information was communicated to the Android development team in Android Issue 12817.
Link To This ArticleQR Code Link To This Articlehttp://goo.gl/P408h

2011-03-22

Android Protector OWNED Easy as 1, 2, 3!

Not content with the original password protection of Android 2.2 on my T-Mobile G2, I went searching through the Android Market for other solutions. Amongst the adware and other junkware I stumbled across Android Protector v3.3.1 by Alexander Kosenkov, which looked promising. So, I decided to give it a try, installed it, and set about seeing if it did what it claimed to do, and whether it was easy to defeat.
Link To This ArticleQR Code Link To This Articlehttp://goo.gl/u0NZK

The basis of the revolutionary and disruptive approach I took to break Protector stems from playing a lot of video games growing up. If there's one thing I learned during all those precious hours of youth spent in front of the TV with a game controller in hand, it was to TRY AGAIN. When Mario died because I didn't jump far enough, I just tried again. When Mike Tyson KO'd me before I got him, I just tried again. When those re-attempts failed, I just tried again.

Applying this life lesson to TRY AGAIN to attempting to defeat Android Protector proved useful. I was able to bypass Android Protector's security measures less than three minutes after installing and using it for the first time.

The steps to do so are simple:
  1. After installing and configuring Protector, restart the Android phone so the application is enabled, then search for the application in the Android Market, and select it in the search results listing. At this point, Protector covers the screen with a security code input box, otherwise preventing access to the Android Market screen beneath it. Just use the back arrow to return to the home screen.
  2. Launch the Android Market application, again. The Market app should try to immediately return you to viewing the Protector application listing, but of course, Protector should again cover the screen with the security code input box. After it does, just press the back arrow to return to the home screen.
  3. Launch the Android Market application, again. Amazingly, the Market app displays the Protector application listing and Protector does not cover the screen with the security code input box. Press the link to Uninstall Protector. Protector is thus defeated without ever needing to input the security code.
Android Protector OWNED!

A short video of these steps in action is available on YouTube.



What have you OWNED today?

HOWTO: Install T-Mobile G2 USB Driver

While Googling for G2 USB driver does currently lead to some pages that list working instructions for installing the driver on M$ Windows machines to connect to a T-Mobile G2 Android phone through USB with adb, many of the search results were not useful, and this post is small contribution to help direct folks to a solution. (Plus, who knows what will happen to the info pages at tmobile.com, with AT&T acquiring T-Mobile.)
Link To This ArticleQR Code Link To This Articlehttp://goo.gl/leNAj

After installing the Android SDK, and selecting to install the latest Google USB Driver package with the SDK and AVD Manager, edit the android_winusb.inf file, located in the directory where the Google USB drivers installed (which currently is android-sdk/extras/google/usb_driver), and paste in the following three lines, at the end of the sections labeled "[Google.NTx86]" and "[Google.NTamd64]".
;T-Mobile G2
%SingleAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C91
%CompositeAdbInterface% = USB_Install, USB\VID_0BB4&PID_0C91&MI_01
Then, connect the G2 to the computer with a USB cable, ensure the phone is in debug mode, and follow the remaining instructions at http://developer.android.com/sdk/win-usb.html

Note that it's sometimes necessary to repeat this process after downloading and updating the Google USB Driver package, as the updates can clear out the previous custom configuration changes.

2011-03-12

HOWTO: Clone VirtualBox VM (from existing Hard Disk) and Change the UUID

Currently, Google searching for information on how to clone VirtualBox Virtual Machines or how to move a VirtualBox VM (to a new host directory, host disk, or host machine) leads to a lot of folks stuck with cloning failures, apparent dead ends, outdated information, and VirtualBox features that don't seem to work correctly. While poking around enough leads to working solutions, this blog post is a small contribution to help direct folks towards success.
Link To This ArticleQR Code Link To This Articlehttp://goo.gl/BOiD6

Note: These steps work for me running VirtualBox 4.0.4 r70112 (and with the latest 4.0.6 r71416), on Windows 7 Home Premium x64 SR1. I am new to using VirtualBox and my experience level is yet introductory. Also, the information provided here is listed elsewhere on the internet, and is probably somewhere in the VirtualBox documentation.

Without further ado, to copy a flat (i.e., without snapshots) virtual machine, with the VM not running (i.e., stopped), follow these three steps:
  1. First, create a copy of the VDI file, using Windows Explorer or a simple copy command: copy abc.vdi def.vdi
  2. Then, change the UUID of the new VDI file with the command VBoxManage.exe internalcommands sethduuid def.vdi
  3. And finally, from within the VirtualBox Manager, create a new Virtual Machine, selecting to use the new VDI as an existing Hard Disk.

To simply move the location of an existing VDI file on the host, or to copy or move the VDI file to another host, it does work to delete the VM within the VirtualBox Manager, without actually deleting the VDI file on the host file system (obviously, deleting the VM on the current host is not necessary if moving to a new host), move the VDI file to the new location, and then create a new VM, selecting to use the moved VDI file as an existing Hard Disk.

Alternatively, to move the VDI file on the host without deleting the existing VM, close the VirtualBox Manager and shut down all VM instances. (Shutting down the VMs not associated to the move might not be necessary.) Then, edit *all* of the file paths in the .vbox file associated with the VM to be moved. By default, the .vbox file is in a subdirectory in the host user's home directory (e.g., C:\Users\User1). The .vbox file name should match the name of the VDI file, and be in a subdirectory with a name that also matches the name of the VDI file. The .vbox file is a simple text XML file, easily edited in Windows Notepad. Finally, start the VirtualBox Manager, select the newly moved VM, which should still be listed on the left side, where all of the VMs are listed, and start it.

Note that changing the UUID of the VDI file is not necessary, when simply moving it.