Tuesday, March 22, 2011

More evidence of Google’s habit of GPL laundering in Android: the BlueZ Bluetooth stack and the ext4 file system

On Thursday I reported on what is very likely a violation of the GPL (the license under which Linux and many other open source programs are published) by Android, Google's mobile operating system in connection with the Linux kernel headers. It sparked a lot of debate, but so far I haven't seen even one explicit denial of the legal theories I tend to subscribe to. No one quoted in the media has claimed affirmatively that Android isn't infringing. On the contrary, I have seen others share my concern. This blog post by an O'Reilly author who calls himself a "US copyright law junkie" is particularly interesting.

After the Linux header story, a loyal reader of this blog sent me two links that pointed me to two other examples of GPL "laundering" in Android. This makes three distinct situations where Google has taken affirmative steps to try to remove the GPL effect from its supposedly free software stack. As I've discussed before, those steps are most likely ineffective, but even if they are, they are deeply troubling.

The first new example of laundering concerns an Android component I use every day: the Bluetooth stack with which I connect my Android phone to my car's audio system. It's a safe assumption that most if not all Bluetooth-compatible Android devices come with that software module.

Google uses the GPL'd BlueZ code as Android's default Bluetooth stack. BlueZ was originally developed by Qualcomm, a company that has previously been a tough enforcer of intellectual property rights (such as against its customer Nokia). Qualcomm already makes money on virtually all Android phones in certain ways, but who knows when it may want more and seek to monetize BlueZ. Since the time BlueZ was GPL'd, other parties will also have contributed to BlueZ's codebase. It could be difficult to work things out with all right holders.

The other link I received shows that the header files for the ext4 file system (which was added to Android starting with its Gingerbread, or version 2.3, release) were also laundered. While that file system is part of Linux, this is -- as I'll explain further below -- still a separate issue from the headers that Google cleansed for Bionic.

Headers touched and added to multiple times over a long period of time

I dug into the commit history of the three known sets of header files that were laundered by Google. I found that many of these header files were added to numerous times by various committers. I have published a timeline of when the Bionic, BlueZ and ext4 headers were first introduced into Android and when those headers were added to or updated. That PDF document is very wide; the best way to view it is to download it from the link I provided and then set the zoom mode to "screen height".

I have done a PNG image as well -- but here on this blog you won't see much because of the limited width available:

Below I've also listed the key events:

Bionic: first "clean headers" added 2008-10-21 (Android Release 1.0).
Notable additions of new "cleaned up" headers or updates on: 2008-10-30, 2009-05-27, 2009-06-16, 2009-07-09, 2009-07-16, 2009-08-06, 2009-08-20, 2009-08-31, 2009-10-14, 2010-02-01, 2010-02-02, 2010-02-03, 2010-02-08, 2010-04-07, 2010-06-02, 2010-06-02, 2010-06-23, 2010-07-15, 2010-08-07, 2010-08-16, 2010-08-24, 2010-09-24, and 2010-11-01.
(See history at http://android.git.kernel.org/?p=platform/bionic.git;a=history;f=libc/kernel;hb=HEAD)

BlueZ: first "clean headers" added 2009-03-09.
Notable additions of "cleaned up" headers and updates on: 2009-03-09, 2009-03-09, 2009-12-09, 2010-02-24 and 2010-03-24.
(See history at http://android.git.kernel.org/?p=platform/system/bluetooth.git;a=history;f=bluez-clean-headers;hb=HEAD)

ext4: first "clean headers" added 2010-08-14.
(See history at http://android.git.kernel.org/?p=platform/system/extras.git;a=history;f=ext4_utils;hb=HEAD)

It's clear that the question of GPL laundering is not isolated to the Bionic headers, nor can it be considered an isolated incident born of inattentiveness or oversight. This is a clear pattern of extensive GPL laundering by Google, which should worry any manufacturer or developer who cares about the IP integrity of Android and its effect on their proprietary extensions or applications. It should also be of significant concern to those who advocate software freedom.

The emergence of ever more such issues has me profoundly worried in two respects:

  • Between the copyright part of Oracle's lawsuit, the very suspect copying of Linux headers and now these most recent discoveries, it's hard not to see an attitude. There's more to this than just nonchalance. Is it hubris? Or recklessness? A lack of managerial diligence?

  • The headers of the GPL'd BlueZ software and of the ext4 file system were apparently put through the same "copyright-cleansing" process as the Linux kernel headers. Google employees claimed in an online discussion that they believe they have been able to work around the GPL for this one, too. This is very worrying for the whole free and open source software universe because it means that this was not at all specific to Linux. It can now happen to any GPL'd program out there, and has happened to more than one GPL'd program already. It reduces the GPL to a farce -- like a piece of fence in front of which only fools will stop, while "smart" people simply walk around it.

In the following I'll provide more detail on the BlueZ and ext4 issues.

The "BlueZ clean headers" directory: not what I call "clean"

The platform/system/bluetooth.git section of the Android codebase contains a directory called "bluez-clean-headers". The word "clean" is Google's euphemism for "put through a copyright-cleansing process". You can find Google's explanation of the distorted meaning of the word here. That text relates to the Linux headers, but it's the same approach as the one used on BlueZ. It outlines Google's theory why it believes that cutting out comments and some other material does away with copyright -- a position that is highly questionable at best.

The short version is that "clean" is a Googlespeak expression for software that is claimed to have been deprived of copyright protection and, as a result, freed from copyleft, a mechanism that is meant to protect free software against proprietization.

That "bluez-clean-headers" repository contains only one directory, named "bluetooth". This link leads to its file list. You can read the content of each file by clicking on the word "raw" at the right end of each line.

Five of the six files -- bluetooth.h, hci.h, hci_lib.h, rfcomm.h, and sco.h -- start with the following notice:

"This header was automatically generated from a Bluez [sic] header of the same name, to make information necessary for userspace to call into the kernel available to Android. It contains only constants, structures, and macros generated from the original header, and thus, contains no copyrightable information."

If you compare it to the notice at the start of the repurposed Linux header files (which I published here), you can see that it's the same dubious claim, just that "Linux" was replaced with "Bluez" [sic] and "libc" with "Android".

Google will have used the identical script as for the Linux headers, possibly with a different configuration file, or only a slightly modified version of it.

One of the six files (the fourth one listed in the directory), l2cap.h, contains the notice of the "cleansed" Linux kernel headers. I checked into it and it is indeed another Linux kernel header that Google uses. It's not part of the set of headers that are added to Bionic, but it's originally a Linux and not BlueZ header. It is, however, needed for this Bluetooth implementation.

I googled some more information about this. There's a Google Groups discussion in which some Android developers answered questions about this. A user named Mattaku Betsujin disagreed with the "no copyrightable material" position and wrote this comment, which I think is spot-on:

"Hmm, this seems to be a really loose interpretation of the GPL .....
I am not sure that triviality is a way out of your GPL [obligations]."

I also tried to find out whether BlueZ is indeed Android's default Bluetooth stack, and this page leaves no doubt that it is.

The ext4 file system: used by Android starting with Gingerbread (Android version 2.3)

In this Android source code directory, there are several header files that were generated by putting headers of the ext4 file system through Google's scrubber script.

Since its version 2.3 (aka "Gingerbread"), Android uses ext4. In Bionic's case it's certain that each Android device includes the related files; in BlueZ's case, it's a safe assumption that most Android devices supporting Bluetooth come with that stack. But I can't say with certainty that the ext4 headers identified above are part of Android in the form in which it is distributed on devices. They are located in a part of the codebase that's related to debugging and inspection.

While ext4 is a Linux file system, it's important to consider that this is not just more of the same in terms of additional files added to Bionic. These headers are distinct from the ones that make it into Bionic. They are from a different part of the Linux codebase: while the headers added to Bionic come from the /linux/include/ section of the Linux codebase, the ext4 headers come from the linux/fs/ section, which is for file systems. That fact sets the ext4 headers apart from headers of which the Linux kernel maintainers offer "sanitized" versions for inclusion in C libraries.

This shows that Google's header laundering doesn't seem to stop anywhere. They take whatever headers they want, put them through their script, and claim that those are not copyrightable.

Copyright and GPL notices stand in contradiction to Google's claims

Each of the original BlueZ headers starts with the following copyright notice:

* BlueZ - Bluetooth protocol stack for Linux
* Copyright (C) 2000-2001 Qualcomm Incorporated
* Copyright (C) 2002-2003 Maxim Krasnyansky <maxk@qualcomm.com>
* Copyright (C) 2002-2010 Marcel Holtmann <marcel@holtmann.org>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

And there are over 100 files with express copyright statements and GPL license notices and more than 60 distinct express copyright holders in the original Linux kernel headers that Google "borrowed" for Android.

The fact that such notices are added to header files shows that the authors of the programs in question consider the headers copyrightable. Also, without copyright, there's no way to put material under a license such as the GPL.

Google cuts out all those notices and replace them with its own "no copyrightable material" notice. It clearly says something that Google is uncomfortable with those notices and sees a need to remove them. In many header files the copyright and GPL notice is the only part to be removed. If, as some have contended, header files are not copyrightable, why bother removing the notice at all?

We are no longer talking about one incident. There are three (Linux kernel headers, BlueZ, ext4), there may already be more, and if nothing is done to stop this, there will be many more.

If you'd like to be updated on the smartphone patent disputes and other intellectual property matters I cover, please subscribe to my RSS feed (in the right-hand column) and/or follow me on Twitter @FOSSpatents.

Share with other professionals via LinkedIn: