Monday, May 14, 2012

Root Droid Incredible from 2.3.4

ICS Home ScreenI wasn't able to follow any other advice on how to root my Droid Incredible once I upgraded to Verizon's Gingerbread 2.3.4.  I found some articles describing how to downgrade the firmware and then use unrevoked to root the phone but I had no luck getting these instructions to work.  Instead, I followed my own path using HTC's bootloader unlock tool which was released for the Droid Incredible.

My only complaint with HTC's bootloader unlock tool was the necessity for using Windows to unlock the phone.  I attempted to use Wine under Ubuntu with no success.  I have a virtual Windows 7 using VirtualBox that may have worked but I was tired and decided to use another computer in my office.

My Goal:
Install CyanogenMod and try out an Ice Cream Sandwich build CM9
ICS Version ConfirmationIssues with Ice Cream Sandwich on Droid Incredible at the time of writing:

  1. Video Recording doesn't seem to work -- other camera functions seem to work just fine
  2. Once rooted, can't rent Movies from Google Play store.
  3. Netflix fails playing back video -- Audio works with a blank picture, there are reports that the DRM is broken and won't be fixable
  4. Composite video output via special cable has never worked on CyanogenMod and I didn't expect it to magically work.  I believe, HTC created the video output prior to Android having an API for HDMI outputs let alone working with composite video.
  5. I don't have Verizon service on this phone any longer so I can't test phone functionality but I was able to get it to call *228 to try to register with Verizon and I have gotten phone to work with previous versions of CyanogenMod.

You will need:

  1. One Microsoft Windows Computer to unlock the bootloader
  2. One Compuer (Can be the same computer as above) with Android SDK tools (adb) -- Ubuntu Linux is my main computer
  3. One Droid Incredible with USB Debugging turned on
  4. One SD Card -- I'm using a 16 GB card.  SD content is not touched following my instructions but be careful there are some options that will format your card and then your backups and other content will be deleted.
Definitions and Concepts:

  1. Bootloader: the BIOS of the phone -- Navigate through this using Volume Up/Down and Power Button as the Enter key
  2. Recovery: Recovery partition and application used to reset the phone to factory defaults.  Can be customized using CyanogenMod's Clockwork recovery which gives more flexibility than Verizon/HTC's stock recovery
Here are the steps:
  1. Follow HTC's instructions for unlocking the bootloader on the Droid Incredible
  2. Reboot the unlocked phone to Bootloader by holding the Volume Down while pressing Power to turn on the phone.
    1. Select Fastboot (not available if device is not unlocked) (Use Volume Up/Down to select and the Power Button as Enter Key in this mode)
    2. Download or compile fastboot for your OS of choice (Again I'm using Ubuntu Linux)
    3. run 'fastboot flash recovery recovery-clockwork-'
    4. run 'fastboot reboot'
    5. Hold the Volume Down key while booting to get to the Bootloader and Choose 'Recovery' to start the recovery-clockwork application.
  3. Clockwork Recovery
    1. First let's make a backup of Verizon's 2.3.4 Droid Incredible -- Choose 'backup and restore' (In this application Volume Up/Down are used for selection and the optical joystick button is used for Enter -- Power Button is now used as a screen saver)
      1. This will save the backup to a folder on the sdcard under clockworkmod
    2. Choose to install zip from sdcard
    3. Navigate to
    4. After successfully applying the image zip, then choose 'wipe data/factory reset'
      1. This is done because we are using an entirely different system -- there is no easy upgrade path.  Without the factory reset you may get a number of errors
    5. Next we need to apply the gapps zip for CM9
    6. Finally 'reboot system now' and wait for ICS to build some packages for the first time.
I'll try to fill in more details and take some pictures of the Bootloader and the Recovery Screens.

Friday, May 4, 2012

Achieved Handbrake on Ubuntu 12.04 Precise Pangolin

I upgraded to Ubuntu's newest version 12.04 Precise Pangolin earlier this week and ran into a problem with Handbrake working.  The website offers a ppa repository that unfortunately does not have an updated binary package or repository for the new version of Ubuntu.

Being from old school Debian :) I knew that there was some ~easy way to install Handbrake through the deb-src of the older version of the source repository.  Add this to your /etc/apt/source.list or /etc/apt/source.list.d/stebbins-handbrake-releases-precise.list
deb-src oneiric main
 Then run 'sudo apt-get update' or 'sudo aptitude update' to update the local software database.

Follow these steps that I got from Debian's Manual:

  1. Now, first get the source package:
    1.      apt-get source foo
  2. and change to the source tree:
    1.      cd foo-*
  3. Then install needed build-dependencies (if any):
    1.      sudo apt-get build-dep foo
  4. Then create a dedicated version of your own build (so that you won't get confused later when Debian itself releases a new version)
    1.      dch -l local 'Blah blah blah'
  5. And finally build your package
    1.      debuild -us -uc
  6. If everything worked out fine, you should now be able to install your package by running
    1.      sudo dpkg -i ../*.deb

Tuesday, May 1, 2012

SCCM 2007 Reboot Report

We unfortunately have some devices inside our hospital that cannot be rebooted after applying updates.  These are not critical patient care devices but they are used sporadically 24/7 and therefore we cannot schedule a clean reboot.  For example, we have a computer that is being used during a sleep study that is not directly used all night long (cannot click postpone reboot) but that nevertheless needs to be managed. Our current solution is to apply updates to a specific group of computers and then have our application team manage rebooting those machines at their convenience.

We needed a report that could be used to show when the last time a computer was rebooted based off of a collection.  This is what I was able to come up with:

   sys.netbios_name0 AS [Computer Name],
   [Top Console User] = CASE
then 'Unknown'
   CONVERT(VARCHAR(10),os.LastBootUpTime0,101) AS [Bootup Time],
   Datediff(dd, os.LastBootUpTime0, GetDate()) AS [Days Since Last Reboot],
   CONVERT(VARCHAR(10),wss.LastHWScan,101) AS [Last Inventory]
   dbo.v_R_System_Valid AS sys
   LEFT JOIN dbo.v_GS_Operating_system AS os
      ON sys.resourceID = os.resourceID
   LEFT JOIN dbo.v_GS_Workstation_Status AS wss
      ON sys.resourceID = wss.resourceID
   inner join v_FullCollectionMembership on (v_FullCollectionMembership.ResourceID = sys.ResourceID)
v_FullCollectionMembership.CollectionID = @CollectionID
   [Days Since Last Reboot] DESC