A lawsuit seeking damages from Google over its willful appropriation of Java as the basis of its Android operating system has been slowly grinding through the courts for most of the last decade. It has finally concluded that Google's taking of Java "was not fair" use, opening up Google to billions in damages.

On Tuesday, the US Court of Appeals for the Federal Circuit ruled in agreement with Oracle, determining that Google's use of Java code in Android was not fair. It delegated the job of determining the amount of damages that Google owes Oracle to a lower federal court in San Francisco.

In 2016, Oracle sought almost $9 billion in damages related to its estimation of $21 billion in profits that Google has earned over the lifetime of the Android platform. Google could have licensed Java from Sun (or Oracle, which acquired Sun), but it chose not to, as was revealed in earlier court documents.

While often portrayed as an underdog fair use case against a big bad proprietary IP firm, in reality the code Google took from Java had been made available under the GPL. Google replaced that open license and redistributed it under the incompatible, permissive Apache Open Source License. Google violated Java copyright and violated the terms of the open source GPL

Google violated Java copyright and violated the terms of the open source GPL to give it all the value of Java's code with none of the responsibly to respect the GPL or alternatively to license Java code commercially.

Because that enabled Android rapidly grow into an unlicensed platform that Google could then profit from, its actions may constitute the largest fraud to have ever occurred in the industry.

Google's original concept for its Android phone project

Two years before iPhone appeared, Google acquired an existing "Android" project in 2005, which was essentially an offshoot of Danger, the Java platform powering TMobile's SideKick slider phone. Both Danger and Android were founded by former Apple employee Andy Rubin (who more recently left Google to launch Essential, another Android-based phone project).

In 2005, it was common to license Sun's mobile edition of Java to launch new smartphones. Google originally sought to develop Android as a Java Mobile button-phone platform similar to BlackBerry or Windows Mobile, but was blindsided by Apple's release of iPhone in 2007.

The search giant then shifted gears to develop a more powerful device patterned directly on the far more ambitious and sophisticated features and functionality Apple had delivered. A key part of that strategy involved appropriating the value of Java Mobile, then owned by Sun, to create a replacement that used the same language and API construction to leverage developers' existing familiarity with Java Mobile, then the dominant mobile platform.

After Apple's iPhone rapidly conquered the existing smartphone businesses of BlackBerry, Nokia, Palm and Windows Mobile in its first three years, a variety of hardware makers and carriers jumped to support Android as the last remaining alternative.

Oracle's 8 year battle with Google

Google's free distribution of a modified version of Java Mobile rapidly replaced Sun's own software as the platform for low-end mobile devices. After Oracle acquired Sun in 2010, it filed a lawsuit against Google involving copyright infringement of Java by Android.

Oracle sought both damages against Google and a legal injunction on its distribution, describing Google's Android as an "incompatible clone of Java." "we need to negotiate a license for Java under the terms we need"

During the trial, it was revealed that Rubin had written a memo stating, "If Sun doesn't want to work with us, we have two options: 1) Abandon our work and adopt MSFT CLR VM and C# language - or - 2) Do Java anyway and defend our decision, perhaps making enemies along the way."

Another internal Google document similarly stated, "What we've actually been asked to do (by [Google founders] Larry [Page] and Sergey [Brin]) is to investigate what technical alternatives exist to Java for Android and Chrome. We've been over a bunch of these, and think they all suck. We conclude that we need to negotiate a license for Java under the terms we need."

Google claimed "fair use" for compatibility, without being compatible

Rather than licensing Java, Google decided to follow Rubin's advice: just take the code, see what happens, and try to defend itself. Part of that "defense" was a fight to suppress the evidence that Android willfully infringed upon Oracle's Java.

Another element of Google's defense, it turned out, was to claim that the code it took from Java was "fair use" because it was related to achieving compatibility with the Java platform. However, rather than seeking to be compatible with an existing standard, Google only desired to be compatible with the value of the code it appropriated.

In 2014, the U.S. Court of Appeals for the Federal Circuit in Washington issued a ruling that reversed an earlier decision that had prohibited Oracle from claiming copyright for portions of its Java platform used by Google in Android.

That ruling noted that "given the record evidence that Google designed Android so that it would not be compatible with the Java platform, or the JVM specifically, we find Google's interoperability argument confusing."

It added, "the compatibility Google sought to foster was not with Oracle's Java platform or with the JVM central to that platform. Instead, Google wanted to capitalize on the fact that software developers were already trained and experienced in using the Java API packages at issue."