10. May 2012 · 37 comments · Categories: Android, howto, Windows · Tags: ,

Update 03/14/2012: The below process works for the Windows 8 Consumer Preview. If you need to modify the driver .INF to support your device, please read this post for instructions on disabling Driver Signature Enforcement in Windows 8.

It isn’t actually that difficult to get ADB (Android Debug Bridge) working correctly under Windows x64 (Windows XP 64bit, 7 and Windows 8 x64 are supported) – you just need to perform a few steps in the right order.

  1. Download the latest 32-bit and 64-bit Java JDK from here: http://www.oracle.com/technetwork/java/javase/downloads/index.html (click the JDK link).
  2. Install the 32-bit JDK first, then the 64-bit. Note — Technically you can just use the 64-bit version, but you will occasionally get errors about the 32-bit version (x86) being missing. Best bet is to install both. Both Java 6 and Java 7 are supported.
  3. Once Java is installed, download the Android development kit for Windows from here: http://developer.android.com/sdk/index.html – you can now opt to download the SDK install in .exe format, which is recommend (and will be used by this guide).
  4. After the installer has finished downloading, run it. If you haven’t yet installed the JDK packages, the installer will remind you that they are required and won’t let you proceed.
  5. The installer will automatically launch the Android SDK Manager and prompt you to install a number of default packages. Of those listed, only the first two options (Android SDK Tools and Android SDK Platform Tools) and the Google USB Driver package (located in the Extras tree, near the bottom of the list) are needed. After you have selected the packages you want, click Install (x) Packages. A new window will appear – any items without a green checkmark require that you select them, then click Approve before you can proceed.
  6. After the process has finished, allow the Manager to restart the ADB process, then close the dialog box.
  7. When it’s finished downloading and installing, enable debugging mode on your Android phone and plug it in. Windows should now automagically detect the correct ADB driver. Once Windows has completed the driver installation, open Device Manager and ensure that the “Android Phone” category at the top has an entry called ‘Android Composite ADB Interface’ (pictured below). If the driver wasn’t installed automagically and appears in Device Manager as a Nexus One (or whatever your model of phone is), you can find the driver downloaded by the SDK Setup in the folder you extracted the SDK to (by default, C:\Program Files (x86)\Android\android-sdk-windows\google-usb_driver).
  8. Finally, open a command prompt, navigate to the platform-tools directory in the SDK folder and type ‘adb devices’ — ADB should now list your device (note: adb used to reside in the tools directory, but was moved to platform-tools with Gingerbread. As of r16 (the ICS update to the SDK), fastboot is also now located in platform-tools).
Device Manager showing the ADB Driver is correctly installed

Device Manager showing the ADB Driver is correctly installed

Note that some devices aren’t supported by the official ADB driver. Check the comments below for instructions on how to modify the driver INF to support your device.

I work for an SMB, but we’re past the size where it’s ‘easy’ to go around to everyone’s computers and deploy a new email signature. We also have prescribed branding, but staff inevitably will find a font they like better for their signature and will destroy that branding and consistency without hesitation.

So the other, I finally got around to making things easier for myself. Rather than try to convince everyone to leave their signatures alone, and rather than go around to everyone’s computer and have them login so I can change their signature, I sent out instructions on how to set your signature in Outlook (in Options, under the Mail Format tab), and then hammered out a few lines in to the existing login script:

REM Copy email signature
c:
cd \
if exist %appdata%\Microsoft\Signatures goto COPY
md %appdata%\Microsoft\Signatures
:COPY
cd  %appdata%\Microsoft\Signatures
del *.* /q
copy Q:\Marketing\EmailSignatures\%username%.* .\

The first two lines (after the Remark) make sure that the script is in the root of the C: drive (other parts of the login script not listed here move around, and as we’re deleting files later on with a wildcard it’s worth it to make sure we’re in the right place).

Next, it checks to make sure that the Signatures folder exists. If you’ve already been in to the Signatures area in Outlook it will create the folder for you, however if this is the first time the user is logging in and their profile is just being created, that folder won’t be there, so we make Outlook create it.

After that, we delete the contents of the folder — I can do this because I know that our staff should only be using the one signature. If you’re in an environment where that isn’t the case, this is a Bad Idea.

Finally, we copy the new signature off the shared drive. In this case, we have a plain-text signature and and HTML version, and the filenames are prefixed with the users username, so I can make use of the username environmental variable to automatically select the right files.

The first time the script runs users had to go back in to Signature Options and select the new signature, but after that, because the filename doesn’t change, Outlook will remember the selection and staff will always have a copy of the (correct, consistently-branded) signature.

Like I said, very basic, and there are a few improvements that could be make to the batch script, but it works well enough for me.

27. June 2011 · 1 comment · Categories: howto, Microsoft, Networking · Tags: ,

Although I missed World IPv6 Day, I was bored the other night and decided to finally setup an IPv6 tunnel. To do this, I registered a free account with Hurricane Electric’s Tunnel Broker. The process was a breeze and in no time I had a regular tunnel created. From there, it was all up to the Dlink router.

A few notes:

  1. Make sure you have the latest firmware for your DIR-825 Rev. B. At the time of writing, it’s version 2.05(NA).
  2. You will need to enable “WAN Ping Respond” – this can be found under Advanced -> Advanced Network. You can safely disable this after you finish complete the process and your tunnel is working. This is needed so that Tunnel Broker (TB, from here on out) can confirm your public-facing IP address and link it to your tunnel.

So, that out of the way, once Tunnel Broker has confirmed your tunnel is available, login to your router and do the following:

  1. Under the main Setup tab, click IPv6.
  2. Click the Manual IPv6 Internet Connection Setup button. Do not use the wizard.
  3. For the IPv6 CONNECTION TYPE, choose IPv6 in IPv4 Tunnel.
  4. In the Remote IPv4 Address box, enter the Server IPv4 Address provided by TB.
  5. In the Remote IPv6 Address box, enter the Server IPv6 Address provided by TB.
  6. The Local IPv6 Address is the Client IPv6 Address from TB.
  7. Under the IPv6 DNS SETTINGS heading, choose Use the following IPv6 DNS servers and enter the Anycasted IPv6 Caching Nameserver provided by TB in the Primary IPv6 DNS Server box (TB did not provide me with a secondary DNS address).
  8. Finally, uncheck Enable DHCP-PD under the LAN IPv6 ADDRESS SETTINGS heading.
  9. Leave the settings under the ADDRESS AUTOCONFIGURATION SETTINGS heading as their defaults.
  10. Click the Save Settings button at the top of the page and let the router do it’s thing. It will take some time to ‘measure the internet connection’ – this is normal.

You’re almost done. At this point, if you go to the Status tab and choose IPv6 from the options down the left side of the page, you should see the TB information you entered, and Network Status should say Connected.

The rest of the work depends on your operating system. I use Windows 7 on my main PC, which natively supports IPv6 (as does OS X and most *nix distros). As IPv6 is enabled by default, I simply had to open an Elevated Command Prompt and type:

ipconfig /release

ipconfig /renew

After it finished thinking, ipconfig spat out the new network configuration which included the correct IPv4 and IPv6 addresses. I opened Firefox and browsed to http://ipv6.google.com – success! Everything works! You can also confirm that IPv6 is working by using the nslookup tool from a command prompt like so:

C:\Users\Laslow>nslookup
Default Server:  ordns.he.net
Address:  2001:470:20::2

> xbox.com
Server:  ordns.he.net
Address:  2001:470:20::2

Non-authoritative answer:
Name:    xbox.com
Addresses:  2a01:111:f009::3b03
65.55.42.140

>

As you can see, the IPv6 nameserver came back with an IPv6 AAAA record (2a01:111:f009::3b03) and an IPv4 A record (65.55.42.140) for xbox.com.

26. May 2011 · 2 comments · Categories: howto, Linux · Tags: , , ,

There are a large number of articles floating around with outdated instructions for installing Sun Oracle Java on CentOS. I’m happy to report that the process is now very, very easier if OpenJDK doesn’t work for you.

  1. Browse to this page: http://www.java.com/en/download/manual.jsp
  2. Copy the URL of the “Linux RPM (self-extracting file)” link.
  3. On your CentOS box (assuming you’re SSH’d to it), use wget to download the file (eg, wget http://javadl.sun.com/webapps/download/AutoDL?BundleId=48333)
  4. Note that, when the file finishes downloading you may need to rename it. Due to the redirect process Oracle uses, you may end up with a filename like “jre-6u25-linux-i586-rpm.bin\?AuthParam\=1306440404_3678aad28a7b9aae044da147678b211e\&GroupName\=JSC\&FilePath\=%2FESD6%2FJSCDL%2Fjdk%2F6u25-b06%2Fjre-6u25-linux-i586-rpm.bin\&File\=jre-6u25-linux-i586-rpm.bin\&BHost\=javadl.sun.com” (this happened to me). If this is the case, rename it to “jre-6u25-linux-i586-rpm.bin
  5. Use chmod to allow execute permissions: chmod +x jre-6u25-linux-i586-rpm.bin
  6. Execute the binary: ./jre-6u25-linux-i586-rpm.bin
  7. Verify the installation worked: java -version

That’s it. No extra compiling, no need to add extra repositories. Simple. (Disclaimer: because this is done without a package manager, you’ll have to remember to manually update the installation to keep your box secure.)

So out-of-box, Fedora 14 does a pretty good job handling graphics, but if you want to run with Nvidia’s drivers you need to do a little leg work. Fortunately, it’s very, very easy if you know your way around the system even a little.

First off, you should download the driver binaries from Nvidia’s site. Save them in an easy-to-access place and then do a quick ‘chmod 777′ on the package so you can execute it later. Also, make sure you have the kernel-headers and kernel-devel packages installed, plus gcc so the Nvidia installer can make the kernel module.

Now that the driver is downloaded, we need to disable the Nouveau driver that comes with Fedora. This is a two-step process.

  1. As root, edit ‘/etc/modprobe.d/blacklist.conf’ and add the following lines to the bottom:
  2. # Nouveau
    blacklist nouveau

  3. Now edit ‘/boot/grub/menu.lst’ and add the following to the end of the kernel line:
  4. nouveau.modeset=0
    e.g, “kernel /vmlinuz-2.6.35.9-64.fc14.x86_64 ro root=UUID=00311e4e-0043-498c-8532-7301b19eae76 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet nouveau.modeset=0

With that done, reboot. As your computer boots, press the Tab key repeatedly before the Fedora splash screen appears to get the Grub Menu to appear. Press ‘a’ to do a one-time edit of the kernel options (you’ll see the line above appear) and add the number ’3′ (no quotes) to the end, like so:

kernel /vmlinuz-2.6.35.9-64.fc14.x86_64 ro root=UUID=00311e4e-0043-498c-8532-7301b19eae76 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet nouveau.modeset=0 3

This will do a one-time boot to Run Level 3, much like adding ‘single’ to the end of the above line would put you in to Single User Mode. Once you’re at the text-mode long prompt (at a really low screen resolution, I might add), login as root and browse to the folder you saved the driver binary to, then run it. Let it go through it’s process and create the files it wants to, and when it finishes, you’re almost done.

The last thing to do is make the framebuffer work on the correct resolution. In my case, my monitor uses 1680×1050 as it’s native resolution, so that’s what I want to set it to.

Reboot the computer again, and do the Tab key trick to get back to the Grub Menu. Once again, press ‘a’ to edit the kernel options and this time add ‘vga=ask’ in addition to the number ’3′ to the end of the line, and then press enter. You should get a list of the framebuffer modes. Find the one that matches your resolution, enter it (and make a note of it), and then press enter. When you get to the login prompt, you should see that everything is the correct size and resolution. If not, try again. For reference, 1680×1050 in 32bit colour for my GeForce 260 is mode 369.

Once you have the correct mode, we’re ready to make it permanent. Login as root and edit the ‘/boot/grub/menu.lst’ file again. Now add the following to the end of the kernel line:

vga=873 video=nvidiafb

eg, kernel /vmlinuz-2.6.35.9-64.fc14.x86_64 ro root=UUID=00311e4e-0043-498c-8532-7301b19eae76 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us rhgb quiet nouveau.modeset=0 3 vga=873 video=nvidiafb

Where 873 is the the mode you entered above converted from hex to decimal (369 hex == 873 dec).

Save, reboot, and watch as both the framebuffer and Xorg now work at the proper resolution for your monitor. You’ll also now be able to turn on Desktop Effects in Gnome if you so choose.

I recently hit the 5,000 tweet mark on Twitter, and figured that it’s as good a time as any to write something about my experience on the abbreviated social networking site. It also seems appropriate as I permanently deleted my Facebook account (well, I’m in the process, anyway).

Click ‘Continue Reading’ below for the wall-of-text review.

More »

Rogers LogoAlthough I can’t confirm when this happened (it may have happened a while ago and I just never noticed), I was browsing the internet last night on my Google Nexus One and noticed that, when I mistyped http://imdb.com, I was redirected to http://www20.search.rogers.com (which doesn’t work outside of Rogers’ network) instead of receiving a normal Not Found error. This all smacks of the infamous VeriSign Site Finder fiasco.

I’m no fan of browser redirects in any form, and I’m even less of a fan of Yahoo which Rogers partners with to, among other things, provide results on their hijacked landing page. But what can you do? It’s their service, and there’s no opt-out link on the page.

Well, the answer is to manually opt-out. Unfortunately, you need to have a rooted/jail-broken phone to do this. As stated above, I have a Google Nexus One which runs CyanogenMod, but this should work with any other rooted Android phone and even jail-broken iPhones (although the paths are different — you’ll need to alter them as applicable).

To manually opt-out, do the following (assumes Android phone):

  1. Open a shell on your phone. You can use ConnectBot, Terminal Emulator, or adb shell.
  2. Assume root (su command).
  3. Remount the system partition in to read/write mode —  mount -o rw,remount /system
  4. Browse to /system/etc.
  5. Use your favourite text editor to open hosts.
  6. Add the following to the bottom of the hosts file — 127.0.0.1 www20.search.rogers.com
  7. Save and quit!

You’re done! You’ve just manually opt’ed-out of Rogers Wildcard DNS hijack. Now you’ll just get the normal ‘Not Found’ errors, as when Rogers see that the domain you’ve entered doesn’t exist and tried to redirect you to their search page, your phone will point that domain to itself and fail as it isn’t running a webserver.

TL;DR Version: To prevent getting directed to Rogers’ Search Page when you mistype an address, edit your hosts file to point www20.search.rogers.com to the 127.0.0.1 loopback address.

Update (05/01/2011): You can now officially opt-out using this link: http://searchassist.teoma.com/templates/rogers/optout

06. June 2010 · 1 comment · Categories: howto, Rants, Twitter · Tags: ,

Facebook LogoDeleting your Facebook account isn’t as it should be. If you simply browse to Account and then Account Settings, you are only given an option to Deactivate your account. All this does is temporarily hide your profile details from everyone, and does not actually remove any information what-so-ever from the site. All you need to do is login again and you can easily reactivate your account. To permanently delete yourself from Facebook’s database of evil, you have to go through the following process:

  1. Click on Help Center in the footer.
  2. Select Profile under the Using Facebook heading.
  3. Choose Account Settings and Deletion (oddly, the first item on the list).
  4. Now click on the How do I permanently delete my account? heading.
  5. This will expand a wall-o-text explaining how to deactivate your account, which you don’t want to do. Instead, read to the half-way point, where there is a link to submit a request to have your account deleted – click it.
  6. After reading the guilt-trip, click the submit button.
  7. In the new window, enter your password, and then the two words in the captcha box, then click Okay.

Note that at this point, your account still hasn’t been deleted! After clicking okay on the last box, you’ll see the following text:

Your account has been deactivated from the site and will be permanently deleted within 14 days. If you log into your account within the next 14 days, your account will be reactivated and you will have the option to cancel your request.

Yes, even though you went through 8 steps (the waiting is the 8th step) to delete your account, Facebook really wants to make sure you haven’t accidentally done so! As such, if you login in anytime in that 14 day period, you’re account will be reactivated (fortunately, it doesn’t automatically cancel the deletion request).

So quitting Facebook is nearly as hard as quitting smoking, but it can be done. I’ve started the process, and in 14 days my account will finally be out of there! What will I do with all of my Facebook time? Probably put it towards Twitter instead….

I rarely have to use it, but Microsoft’s Telephone Activation System is a real pain-in-the-ass. Most of the time I’m able to activate my various Microsoft products online, but from time-to-time it just doesn’t work. Then I have to dust off the phone and make the call.

Today, for example: I just purchased six new Dell Optiplex workstations and ghosted my standard image on to them. Would Windows automatically activate after I entered the correct product keys? No way. Instead, I was forced to activate each machine, one-by-one, over the phone.

So, what do you do to speed the whole process up? Here are a few tips:

  • Mute your phone. The voice recognition system that Microsoft uses has trouble telling the difference between your voice and background. Mute the phone to avoid the problem altogether.
  • As soon as you her the disembodied voice start to ask if you are in front of your computer, press ’1′ on the keypad. Don’t worry about interrupting – she doesn’t care.
  • You should now be prompted to read off the numbers from the Activation screen. Remember that your phone is muted, and use the keypad to enter the numbers instead – it’s faster this way, anyways. Also, you can start entering the numbers as soon as she starts asking for the next block. Again, don’t worry about interrupting. I usually let her get as far as ‘And—’ when she tries to say ‘And block #2?’
  • After you enter in the last block, let her talk. She’ll likely ask you ‘How many computers have you installed this copy of Windows on?’. As soon as she starts to ask the question, press ’1′ on the keypad.
  • If you did it all right, she should happily say ‘Verified!’
  • Once she starts giving instructions, press ’1′ on the keypad to skip them.
  • As she reads out each block of numbers, once you’ve got them typed in, just press ’2′ on the keypad to make her start reading the next block. If you miss something, press ’1′ to have her repeat the last box.
  • If you’ve typed the numbers in correctly, Windows should activate now!

Also, something to ponder – why does everything she say end in a question, even when not appropriate? Food for thought?

I was approached today by a manager requesting that I install the Eco Font on our 60+ workstations. Not being big on manual installations, and definately not wanting to take the ‘email the font as an attachment with installation instructions’, I opt’ed for the only route that made sense – installation via Group Policy Object!

This process is fairly straight forward, with the only potentially annoying portion being the creation of the actual .msi file to install the font. Sure, you can create batch startup scripts that copy the file to the fonts folder and update the registry, but this is a lot cleaner.

To create the .msi package used to install the font, I grabbed a free copy of WinInstall LE. Unfortunately registration with a non-free (read: Hotmail, Gmail, etc… accounts not accepted) email address is required. I tend to create throw-away accounts (eg, a9s6dfa9@my_domain.com) that I promptly delete afterwords. I get enough spam as it is.

Once downloaded and installed, there isn’t that much to do: launch the app, then create a new package by right-clicking on Windows Installer Packages in the top middle and click on New Package. Give it a name and description and you’re ready to start. Expand the package you just created, and you’ll see a new line item called New Feature. Select it, then change the name and description in the right-hand pane. No other changes required.

Next, expand the feature line that you just renamed, and you’ll get another line itm with a GUID (eg, {82B7A2B4-45E8-497A-AFB5-D182960CABF1}) – go ahead and delete it by right-clicking and choosing Delete. Now right-click on your feature and choose Add Files to Feature. Leave the Source line at it’s default value, but change the Target line by pressing the browse button (“…”).  From the list, select [WindowsFolder], then in both the Long folder path and Short folder path boxes add Fonts, so they read “[WindowsFolder]\Fonts” (without the quotes, of course). Now click OK. All we need to do now is add the file, which can be done by clicking the Add File button directly under the Target box. Browse to find your font and click Open. Now click OK, and you’ll see two new GUIDs under your feature.

The last thing we need to do is make this .msi package install without prompting the user. Simply click on the package line (not the feature), and click on the Install Modes tab on the right. Select Install only per machine and check the Show basic user interface only (simple progress and error handling) box.

Now all you need to do is compress the package – this will physically include the font inside the .msi package so that you only need the .msi file itself, rather than the .msi and the font files. To do this, simply select the Windows Installer Package inside WinINSTALL LE (not the feature or the components) and choose ‘Compress’ from the ‘Action’ (or right-click) menu. In the new window, simply press ‘Compress’, and you’re done!

By default, the .msi packages you create with WinInstall LE are located at \<Computer Name>\WinInstallPackages\<Package Name> on the computer you created them. Although the permissions on their share are very relaxed, we want the installer package to be in a high-availability location so that we can be sure the GPO we’ll create in just a short while will always be able to access it. I suggest copying it to \<Domain Controller>\SYSVOL\<Domain Name>\scripts. The guarentees that all of the clients will be able to access it.

Now login in to one of your Domain Controllers and fire up Group Policy Management. Create a new GPO and link it to whatever computer groups you may have, then right-click it and choose Edit. We’ll be working under the Computer Configuration header – if you’re using Server 2008, select Policies, then Software Settings – Server 2003 users just select Software Settings. Now right-click on Software Installation and choose New -> Package. Browse for your .msi package, select it, and choose OK. Selected Assigned, then OK.

You’re done! Just allow time for the GPO to propagate through your domain, and the next time your domain-joined systems reboot the font will be installed.