Airport Security and 10ml of Toothpaste

One normally expects ridiculous airport security stories to come from the USA… here is one from Manchester Airport.

I have a small washbag with a mesh cover. Its total volume is probably about the same as a standard-issue 1-litre clear plastic bag. Often, I just toss it in the tray as-is, and up to now security has had no problem with that.

On this occasion, it contained a toothbrush, a razor and a mostly-empty tube of toothpaste. These tubes are 100ml when full (a valid size for security); there is no way this one had any more than 10ml in it.

I loaded up, passed through the gate and waited for my luggage. My wheeled bag came through fine, but the rest was diverted for further inspection. “Odd”, I thought. I always travel with the same stuff, and make sure it’s nothing they’d object to.

The lady asks me the usual preliminary questions, and then extracts the flaccid tube of toothpaste.

“Sir, this is a problem. It needs to be in a clear plastic bag.”

“Well, I suppose so, but you can see it now.”

“No, sir. You either need to go back and buy a bag”, (at several low-cost airports, including Manchester, plastic bags are dispensed by vending machines packed in little plastic balls, and cost £1), “or I can’t let you take this through.”

I wondered if this was some strange revenue protection policy, or whether I was living in a parallel universe.

“Those are the rules, sir. If it’s not in a bag, it can’t come through.”

I laughed. I attempt reason. It fails. So I said, “Well, it’s not worth £1, so you can keep it.” I moved to pick up my other bags, and go.

“Sorry, sir, you can’t take those bags. They have to go back through the machine.”

“But you had a problem with the toothpaste, and now you’ve removed the toothpaste, so what’s the problem?”

“No, sir, they have to go back through the machine.”

Which they duly did, and no problems were found.

As I was leaving, I said to her “In your heart of hearts, you know this doesn’t make anyone safer, does it?”

She said, “We have to do a vapour test, and I can’t do a vapour test if it’s not in a plastic bag.”

Now, there may be a tiny core of truth in that; perhaps vapours accumulate in the bag while you are waiting and that makes explosives easier to detect. Although I don’t see them checking people’s plastic bags for holes, or making sure objects spend a good long time in the bags. If their tests really require that, then they must be pretty dangerously insensitive.

But the real issue here is the lack of common sense applied to the problem. This was less than 10ml of… something. If I stuck that much explosive in my underwear and tried to detonate it, the worst that could happen would be that I’d not be having any more children! We’ve lost sight of the original goal of the rules, and fallen back on enforcing them unbendingly as an attempted route to safety. It’s a secular form of legalism.

Fixing a Non-Booting CyanogenMod 7

Late on Friday afternoon, my day-to-day phone, a Samsung Galaxy S II which runs CyanogenMod 7.1, stopped booting – it got stuck at the “rotating arrow” blue Android for ever. I use my phone rather heavily, so this was a significant inconvenience – doubled by the fact that on Saturday morning, I flew to the Bay Area for a week at the Mozilla office. “What’s the confirmation code for collecting your train tickets, sir?” “Where are you staying in California, sir?” Er…

The last action I took before this happened is that I made a full system backup via Recovery mode (I use the excellent ClockWorkMod Recovery). I’m not sure if that’s what caused the problem, but it was instrumental in the solution. I could still boot into Recovery, and fortunately that also allows console access via adb shell.

Things which didn’t solve it or give any clues:

  • Looking to see if I’d filled a partition (I hadn’t)
  • Making a second backup, watching carefully for errors
  • Restoring the backup I’d made
  • “Fix permissions” in the Recovery options
  • Wiping the cache, dalvik cache and other non-destructive wipes
  • Reinstalling the same CyanogenMod build again

After some trepidation, I tried doing a full factory reset from Recovery. This got the phone booting again, but without any of my data :-(. Fortunately, ClockWorkMod has a “partial backup restore” function. I restored the data partition… and the phone stopped booting again.

So this is progress. I now had some idea where the problem lay. I finally found it using a laborious 5-minutes-per-cycle manual bisection technique. Delete half the stuff on the data partition, reboot, if it still fails, delete more, reboot… once you get it to boot, restore the data partition, narrow it down further. Once you find a top-level directory, repeat the process inside it.

The result: the existence of a single 0-byte file stopped my phone from booting entirely. The file was:

data/system/profiles.xml

I have no idea what that file does (there are only a few references online), how a 0-byte version of it got created, or why having it existent but empty breaks things but if it’s not present everything works fine. I have no idea if anyone else will ever see this problem, or if they will ever find this blog post. But still, here’s my Wisdom of the Ancients.

Holy War or Bikeshedding?

A holy war is a dispute, often but not always over a relatively minor issue, which is not resolvable on the merits of the arguments, but where people feel passionate enough to continue arguing anyway in the hope that their side will prevail. Holy wars are not quite the same as bikeshed paintings. People painting bikesheds are usually quick to jump in with an opinion (because they can), but they won’t necessarily feel strongly about it, and indeed will sometimes express other, incompatible opinions, to show that they understand all sides of the issue. In a holy war, on the other hand, understanding the other sides is a sign of weakness. In a holy war, everyone knows there is One Right Answer; they just don’t agree on what it is.

— Karl Fogel, Producing Open Source Software