Manually installing an OTA update for the Nexus 5x

In theory, your device should automatically check for an OTA (over-the-air) update, download it in the background, and then prompt you to install the update. No matter how much I manually checked, my device kept insisting it was up to date (I know Google likes to do staggered automatic rollouts, but it's just annoying when I manually initiate a check and Google still insists on not giving me the update).

These are just slightly more detailed step-by-step instructions based on Android 6.0.1 Marshmallow OTA Links for Sideloading. This GitHub page has a list of OTA updates for Nexus devices. Find the download for your device. I'm using my device (Nexus 5x) as an example. In theory, the instructions should be very similar for other Nexus devices.

Find your device's build number

There are two different 6.0 builds for the Nexus 5x (MDB08L and MDB08M). To find out which one was mine, I had to go to Settings > About phone > Build number to find out my build was MDB08L.

For the U.S. version of the Nexus 5x, the upgrade is MHC19J from MMB29Q.

Enable USB debugging

While you're in the About phone section, tap the Build number and keep tapping it until you get a notification that developer options are now enabled. Then go to Settings > Developer options and scroll down until you get to USB debugging and tap the toggle next to it to enable it.

Get the Android SDK

Google used to have an easy-to-find SDK download link. Now it points you to Android Studio instead, which you can use to install the SDK using SDK Manager if you go to Tools > Android > SDK Manager. You may, somewhere on the Android developer website be able to track down a standalone SDK download if you dig around enough.

It took me a while to find exactly where the SDK installed to. Eventually, I found it it was installed to /Users/username/Library/Android/sdk/platform-tools (I'm using a Mac—it's probably a similar path for Windows, maybe in /Users/username/AppData?).

Do the actual flashing of the OTA

Disclaimer: Uh, these instructions worked for me, but absolutely this is at your own risk. I'm not at all responsible (nor is the person who wrote the tutorial on which this is based) for any damage you might do to your device.

Open up a terminal (again, I'm using a Mac, so it's in /Applications/Utilities/; if you're using Windows, find cmd.exe and launch that up instead).

At this point, plug your device into your computer using a USB cable. You may have to switch to PTP mode to get it to work.

Change directories to where adb is:

cd /Users/username/Library/Android/sdk/platform-tools
Substitute in your actual username for username. And don't forget you can use the Tab key to autocomplete directory names instead of manually typing out the full path.

Make sure your device shows up in the list of devices:

./adb devices

Reboot to the bootloader:

./adb reboot bootloader
Use the volume down key to focus on Recovery. Once that's in focus, press the power button to select it.

You'll see what looks like an error and a dead Android lying on its back. Press the volume up key and power buttons at the same time until you get to a list of menu options.

Use the volume down key until you get Apply update from ADB into focus. Then press the power button to select it.

You should then see a message that says Now send the package you want to apply to the device with "adb sideload ."

Back on your computer, enter a command similar to this one (again, Tab completion is your friend—you don't want to manually retype the full filename of the OTA update you downloaded:

./adb sideload ~/Downloads/

You'll then see output similar to this in the terminal on your computer:

''/Users/username/Downloads/f67821b18f5a3bc6552039f0997fc9511f05c2c3.signed-Total xfer: 2.12x
with little progress percentages going up along the way.

Meanwhile, on your phone/Android device, you'll see output similar to this:

Finding update package...
Opening update package...
Verifying update package...
Installing update...
Source: google/bullhead/bullhead:6.0/MMB29Q/#######:user/release-keys
Target: google/bullhead/bullhead:6.0.1/MHC19J/#######:user/release-keys
Verifying current system...
Verified system image...
Verified vendor image...
Patching system image after verification.
Verifying the updated system image...
Verified the updated system image.
Patching vendor image after verification.
Verifying the updated vendor image...
Verified the updated vendor image.
Patching the boot image...
Writing bootloader...
Patching radio...
script succeeded: result was [1.000000]

Install from ADB complete.

When that's done, use the volume up key to highlight Reboot system now and then press the power button to select it.

After your device reboots, you should see something like Android is upgrading...
Optimising app # of 66

That's it! Your update should now be installed.


Using Automator to add Dropbox camera uploads to Photos on a Mac

Why Script Importing into Photos?

Recently, Apple deprecated iPhoto on the Mac in favor of a new iPhoto-like app called Photos. The nice thing about iPhoto was that you could drag a bunch of photos onto the iPhoto icon, and those photos would automatically import as a new album. I've found a bit of bugginess with Photos (perhaps it will be fixed in newer versions). Sometimes dragging photos into the app won't do anything. Sometimes it will launch up a preview and then ask to import. Other times it will just import.

I use Dropbox's camera upload function to have the pictures from my Android phone automatically upload to Dropbox's servers and then down to my Mac.

The Automator Script

I made an Automator .app with a Run AppleScript action that runs the following script (substitute in your own path and username to whatever folder you want to import):

set importFolder to POSIX file "/Users/yourusername/Dropbox/Camera Uploads/" as alias

set extensionsList to {"jpg", "png", "tiff"}
tell application "Finder" to set theFiles to every file of importFolder whose name extension is in extensionsList

set timeNow to time string of (current date)
set today to date string of (current date)
set albumName to today & " " & timeNow
set imageList to {}
repeat with i from 1 to number of items in theFiles
set this_item to item i of theFiles as alias
set the end of imageList to this_item
end repeat

tell application "Photos"
delay 10
import imageList into (make new album named albumName) skip check duplicates no end tell

tell application "Finder"
delete imageList
end tell


The basis for this script (with my own tweaks, of course) is how to easily import images into new

Tweaks in This Script

The main differences in my version of the script are:

  • Specification of the folder ahead of time instead of a prompt for the user to choose a folder
  • No check that there are images in the folder (Photos itself will tell you there's nothing to import if the Dropbox folder is empty).
  • Album name is based only on the date and time instead of prompting for a name and then appending a date and time.
  • Waiting longer after launching ("activat[ing]") Photos before doing the import. I found (on my non-SSD hard drive) that 2 seconds would make the Automator .app crash before importing.
  • Deleting (moving to the Trash, actually) the imported folders when done.


You mean products fail for other reasons?

If you read recent press coverage of Google’s Nexus One, it all seems to make sense. Phones weren’t going to sell well being sold only online without a chance for people to try them in person in a brick-and-mortar store. There wasn’t an advertising campaign for it. Very few articles or blogs about the end of Nexus One seem to think there was a problem at all with the phone itself. No one says the phone wasn’t ready for consumers or that it was too difficult to use.

Yet two years ago when Asus was just starting to be successful with the Eee PC netbook (which came preinstalled with a version of Linux, which Microsoft had to stop right away by resurrecting XP for the first of many times to come), that’s what a lot of the press coverage assumed. Geez. I mean, a lack of advertising campaign or in-person models to try out in the store couldn’t have anything to do with Linux netbooks not selling. It must be that Linux is too hard to use. It must be that Linux isn’t ready for consumers. It must really be that consumers just prefer Windows when given the choice.

Well, there is some truth to that in that the Linux distro Asus chose to put on the Eee PC was essentially crippled (not at all like Ubuntu, PCLinuxOS, Fedora, Debian, OpenSuSE, or any of the other popular distros of the time). It wasn’t even vanilla Xandros. It was a custom Xandros that could be customized only through pasting cryptic commands in the terminal.

Nevertheless, if they’d marketed it correctly, Linux could have been a success. The problem with Linux on “the desktop” (or the laptop or netbook) is the myth of meritocracy. You don’t win by being the best. You win by marketing.

Think about it.

When the iPad was announced, critics focused on the features it didn’t have (no webcam, no Flash, no USB ports), but Apple with its clever marketing department convinced the hoards that the device was magic, so the hoards bought it. If a Linux tablet had been released without Flash, people would have just laughed and said “This is the reason Linux will never succeed—they need to realize the masses use Flash.” But Apple releases a tablet and all of a sudden people are actually saying Flash isn’t necessary. HTML5 is suddenly the wave of the future. Apps for websites are suddenly better than just going to the websites themselves.

I also see a lot of Linux poo-pooers claim Linux doesn’t have any apps, and that Windows users have certain killer apps they need, and that’s why Linux won’t succeed. Well, when Android first started, it had very few apps. In fact, for the end of 2008 and all through 2009, iPhone fanatics kept pointing out how many hundreds of thousands of apps the iTunes App Store had compared to the few thousand Android had. Well, Android now has almost 100,000 apps. If this pace continues, the iTunes App Store and Android Market will probably have the same number of apps by this time next year. The Linux desktop (as opposed to server or embedded) has been around since… the late 90s? Android has been around since 2008. The Linux desktop isn’t mainstream but Android is.

What should we learn from all this? Marketing matters. Being able to test a physical product out yourself matters. Dell selling badly marketed (or even anti-marketed) Ubuntu models on its website isn’t going to sell Ubuntu preinstalled in great numbers, nor are relatively obscure vendors like System76 or ZaReason without a proper store front or brand name recognition.

I would love it if all the bugs in Ubuntu (or some other popular Linux distro) could be fixed. I would love it if some more attention would be paid to ease of use or to making more applications available in the software repositories. I would love that. But that won’t fix Bug #1. If Linux wants to make a dent in the desktop/laptop/netbook world, it needs to give up the idea of being good enough and start embracing the idea of crafting, shipping, and marketing a product—yes, one people can try out in a brick-and-mortar store. In other words, what I said two years ago is still true.


Ubuntu on a Macbook Pro

I’m not abandoning Mac OS X, but you knew it had to happen—I have installed Ubuntu on the Macbook Pro as a dual-boot. It hasn’t been easy, mind you. Previously, I had done a few dual-boot setups with Ubuntu and Windows or Ubuntu and some other Linux distro or even Ubuntu and an older version of Ubuntu. Ubuntu on a Macbook Pro is a totally different experience.

So first I went to the Ubuntu wiki to find out if it was worth my time. According to the Macbook Pro 3,1 page, everything works pretty much out of the box with Ubuntu 10.04 (Lucid Lynx). That was encouraging. Then I read up the generic Apple Intel installation instructions. They didn’t sound too complicated. Install rEFIt, repartition the hard drive, install Ubuntu in the new partitioned space. Easy, right? Well, not so easy. Here are a few bumps I encountered along the way:

  • rEFIt didn’t install correctly. After you install it, you should reboot and see the rEFIt menu. No menu. So I had to do some digging and found out there is a script you can run in the terminal to sort of reinstall rEFIt.
  • I couldn’t resize my hard drive through Disk Utility or BootCamp. Both failed, claiming there wasn’t enough free space, even though there was plenty (at least 70 GB after I backed up my files to an external hard drive and deleted them, planning to copy them back later). So, believe it or not, I took the hours to completely reinstall Mac OS X from scratch and then repartition the drive.
  • Since Ubuntu can’t reliably write to HFS+, I put my music, pictures, etc. on a shared FAT32 partition. Unfortunately, iTunes doesn’t really dig that. If I try to skip to the next song, I get about five seconds of the rainbow circle of death before the next song will actually play. The symlinks from the FAT32 partition also broke at first, too, because initially it was mounted as /Volumes/Storage but then it suddenly became /Volumes/STORAGE. After fixing everything to point to the upper-case mount point, the links appear to be working again.
  • Ubuntu would not install the first five times I tried. That’s right. I tried five times. It kept failing in the middle of the installation, claiming the CD was bad or the CD drive was bad or the laptop was too hot. All of those things could have been true to some degree. The CD had a little bit of dirt on it, which I tried to clean off but couldn’t get completely clean. The CD drive was definitely bad. In OS X it was pretty good at reading commercially produced CDs and DVDs but would sometimes reject homebrews (it would spin and try to read for a minute or two and then just spit the disc out). Also, unlike my wife’s new Macbook Pro, this old MBP overheats like nobody’s business. You could probably fry an egg on it. Eventually, I did something that worked, and I’m not sure which part of it did it. I turned the computer off for the night (let it cool down completely). Then I immediately booted it up and while Ubuntu was installing, I never left it alone. I played gBrainy. I looked in the file browser. I changed various settings. I didn’t let the CD rest and give up. So I don’t know if it was having it cool or constantly engaging the live CD session, but eventually Ubuntu did get installed.
  • I installed the Nvidia driver, but then Hardware Drivers instructed me to use a more recent driver. After that, suspend didn’t resume. But then I removed the old driver and rebooted, and resume from suspend worked fine, as did Compiz.
  • The touchpad works extremely well for two-finger scrolling, but the touch sensitivity is a bit much (and can’t be adjusted, as far as I can tell), so I have to be careful not to tap the touchpad accidentally when trying to scroll; otherwise, I end up clicking. If I turn off tapping to click, then I can’t right-click by tapping down two fingers. A bit annoying.
  • Control is a rather small key on the Mac keyboard, but for most navigation it’s used more often than the Cmd key (the Super key, for all intents and purposes). The key placement is a bit odd when you’re used to coming from Mac OS X or even from a regular Windows keyboard. Takes a bit of getting used to.
  • I thought Skype was broken, but it wasn’t. I set my account to offline instead of invisible, and apparently if you’re offline you can’t do the Skype test call (it just fails immediately). I didn’t know that, so I was trying all these crazy fixes like uninstalling PulseAudio or whatever. Turns out it just works fine if you’re invisible or online.
  • The Picasa from the Google repositories is broken with the latest Lucid kernel. If you download the .deb straight from Google, though, it works just fine.
  • I had a 32-bit Ubuntu CD already, so I didn’t really want to bother downloading 64-bit Ubuntu to take advantage of all 4 GB of RAM (and waste another blank CD, since Macs can’t boot from USB). I guess that would have been interesting to try, but 32-bit works quite snappily with only a bit more than 3 GB of RAM being recognized.

Overall, I have to say Ubuntu works quite well on a Mac. I think it even runs a bit cooler, too (still very hot but maybe not hot enough to fry an egg on). My plan is to keep playing around with both (sometimes boot into OS X, sometimes boot into Ubuntu). With a FAT32 partition for files, I have that luxury, except that I will have to be in OS X to import into iTunes and iPhoto—Rhythmbox and Picasa on Ubuntu will automatically watch folders for new files.

Apple and Mac OS X Computers Linux Ubuntu Windows

Where is this dreamland in which Windows “just works”?

First of all, I have to say it is not my intention to bash Windows. I am not a Windows hater. I actually like Windows. I use it at work every weekday, and I have found ways to have a generally pleasant experience with it. I like Mac OS X better than Windows, though, and I like Ubuntu Linux better than Mac OS X. I actually am quite a firm believer in using the operating system that works best for you and that all the major platforms have pros and cons.

What I can’t stand is Windows power users having a bad experience trying to migrate to Ubuntu (or some other Linux distribution) and then proclaiming “This is why Windows will always dominate the desktop” or “This is why Linux isn’t ready for the masses.” This in these contexts meaning that they had some problem using a peripheral or getting their wireless to work or whatever. I don’t get it. Really. I don’t understand where the logic in this proclamation is. Such a conclusion comes from several flawed assumptions:

  1. Windows always works.
  2. People choose Windows because it always works.
  3. If Linux always worked, the masses would suddenly flock to Linux.
  4. The problem I had with Linux is a problem everyone would have in Linux.

The truth is that if you work in tech support (I don’t officially, but I have unofficially in my last two jobs), you know that there are problems (many problems) on both Windows and Mac OS X. Windows has been the dominant platform at both my current and previous workplaces, and every single day there are Windows problems abounding—cryptic error messages, printer driver conflicts, wireless drivers preventing laptops from going into standby, blue screens of death, rogue viruses, and frozen applications. Believe me, our official tech support guy doesn’t just sit around twiddling his thumbs. He is busy.

Oddly enough, when people have these constant Windows problems, they don’t decide Windows “isn’t ready for the masses.” They just stick with it. Maybe they’ll say “I hate computers.” Maybe some smug Mac user (who also has problems of a different sort but somehow turns a blind eye to them) will say “I hate PCs” (and by PC they mean Windows PC). Oh, but the second a Windows power user tries Linux and encounters one or two problems, suddenly Windows is this always-working utopia. “I’d never have this problem in Windows.” Sure, buddy. Let me tell you about problems.

Last week, a friend of mine wanted to create a playlist of songs to put on her iPhone for a party she was throwing. Here are the problems she encountered:

  • The iPhone wouldn’t update because it couldn’t connect to the iTunes server
  • After it appeared to start the update, iTunes estimated the update download to take 54 minutes.
  • When the download failed after a half hour, she gave up on getting updated firmware on her iPhone altogether.
  • After installing the Amazon MP3 Installer, the download of the purchased MP3 failed midway through and would not complete or offer a useful error message after clicking retry.
  • The iTunes store worked better for purchasing music but cost more ($1.29 per song instead of $.99 per song)—not really a technical problem but still annoying.
  • She couldn’t sync the songs in her playlist to the iPhone, since the iPhone had been authorized on too many computers already, so she had to call Apple to get them to deauthorize her other computers so she could authorize her current computer.

So that’s “just working”? These are not the only problems she’s had on a Windows computer, and she’s had multiple computers. More importantly, she could not solve all these problems on her own, but she needed me to walk her through almost every step of the way. Is this pretty typical? Yes, actually. As I said before, I’m not even the real tech support guy at work, but people still ask me for help with their Windows problems every single day of the week. It could be Microsoft Word inserting some stupid line that can’t be erased or deleted. It could be Firefox not accepting cookies for website even when you’ve enabled them in Tools > Options. It could be the printer icon not allowing you to delete an errored out print job.

If there were really an operating system that offered you a flawless experience that didn’t require you to be your own tech support or for you to find outside tech support, then a lot of people would be out of jobs. Help desks everywhere would be laying off employees by the tens of thousands.

So does Linux have problems? Sure. It has a lot of problems. But those problems are not the primary (or even secondary or tertiary) reason most people use Windows. Windows’ dominance has mainly to do with inertia, marketing, brand-name recognition, and a near-monopoly on preinstallations. Why should I have to state this obvious fact? Because again and again Windows power users perpetuate this nonsense—because they have spent years or even decades perfecting the art of making Windows a bearable experience—that there are no problems in Windows and that any problem in Linux must be the reason Linux for desktops/laptops/netbooks isn’t more popular than it is.

Further Reading
Linux-for-the-masses narratives
Macs are computers, not magic (part 2)

Apple and Mac OS X Computers Linux Music I Like Ubuntu

A professional musician switches from Mac to Ubuntu Linux?

I just read Linux Music Workflow: Switching from Mac OS X to Ubuntu with Kim Cascone, and I have to say I’m shocked, especially after reading Kim Cascone’s Wikipedia entry. Kim is a serious musician, not just some schmoe dinking around in his basement.

I’ve been a full-time Ubuntu user for a little over four years now, having switched from Windows XP. My wife switched around the same time but from Windows to Mac, as she uses Mac for serious graphic design work.

Even though I get annoyed when anti-Linux trolls make it sound as if no one could use Linux just because Linux isn’t great for certain niche commercial applications (AutoCAD, Adobe CS, certain graphics-intensive video games), I have to concede that Linux is not for everyone. And if someone had come up to me yesterday and said, “Hey I’m a professional musician who uses a computer full-time for audio stuff. Should I use Linux?” I would probably laugh in her face and tell her to go with Mac OS X.

Even though I don’t use Linux for serious audio work, I’ve seen enough of the Linux audio mess of Pulse Audio, OSS, and ALSA to know it can be an obstacle for someone seeking to use Linux primarily for audio work. After reading that blog post, though, I have to say I’m pleasantly surprised.

And I also think that, even though there is a myth of meritocracy in the software world, arguing about how freedom is important isn’t going to win over the general public. If open source is really a better development model, it will create better software. There shouldn’t be a choice between functionality and ideology. If the ideology of freedom being better is true, then it should produce the best functionality eventually. And maybe it is slowly getting there.

I don’t subscribe to the notion that if Ubuntu (or some other Linux distro) fixes all its usability issues that all of a sudden hundreds of millions of Windows users (and Mac users?) will just download .iso files, burn them to CD, boot from CD, and install and configure a new operating system themselves. But why have extra obstacles?

Keep on bringing the improvements, Linux communities. This is definitely a cool development.

Apple and Mac OS X Computers Linux Ubuntu Windows

Fanboy isn’t just a generic insult. It means something.

Warning, for those who know me in person: This is an extremely geeky post. Proceed with caution.

Just as forum users will sometimes fling the label troll against anyone who argues with them, many forum users (particularly in computer-related discussions) will throw around the term fanboy without making the term meaningful. Most of the time, when I see the term fanboy used, it’s basically used as a way to avoid having meaningful or logical discussion and to shut the other person up, even if she has valid points. It’s basically a way of saying, “Since you clearly are a fan of this operating system, nothing you say has meaning.”

But being a fan alone doesn’t invalidate what you have to say. fanboy goes beyond fan. I think the folks over at Urban Dictionary have it right. Here are some of top-voted definitions for the word:

  • A passionate fan of various elements of geek culture (e.g. sci-fi, comics, Star Wars, video games, anime, hobbits, Magic: the Gathering, etc.), but who lets his passion override social graces.
  • A person who is completely loyal to a game or company reguardless[sic] of if they suck or not.
  • An arrogant person who goes into an outburst every time something he likes is questioned.

Since I am a regular on the Ubuntu Forums, the context in which I see fanboy is often in relation to operating systems. Linux fanboys. Mac fanboys. Windows fanboys. Just so people know, though, a Linux user defending Linux is not a Linux fanboy, just as a Mac user defending Mac OS X is not a Mac fanboy, and likewise for a Window user defending Windows.

What really sets a fanboy apart is saying only positive things about her operating system of choice and never acknowledging anything negative about her operating system of choice. Frankly, I haven’t found too many people like that on the Ubuntu Forums. Sure, if you speak mistruths about Linux or spread fear, uncertainty, and doubt without real concrete examples, then Ubuntu users will speak up and correct you. But if you ask them what’s wrong with Ubuntu or Linux, you’ll get a very, very long list of replies. I don’t think you’ll find many Ubuntu users who will say Ubuntu or Linux can do no wrong.

Further Reading
Mac Zealots, Linux Zealots, and Windows Zealots