Legal cases always make for a good source of information. In the early days of Android, lawsuits revealed the inner workings between Google and its OEM partners. The latest court hearing in the five-year legal saga between Oracle and Google revealed how much money Android generates.

An Oracle lawyer disclosed that Google has made $31 billion in revenue and $22 billion profit from Android. The figures are based off confidential financial documents that were meant for “Attorney’s Eyes Only”. The revelation was made improperly and Google’s lawyers are trying to seal further information before it makes its way into the public record. Citing financial harm, they are urging a federal judge to redact and seal portions of the public transcript from last week’s hearings.

The legal case between the two companies is born out of Oracle accusing Google of using its Java software in the creation of Android without paying them. The Supreme Court denied Google’s request to hear the case and is now back to a district court where damages are being determined. Oracle could end up receiving up to $1 billion in damages when new versions of Android are factored.

On the development side, Android N is switching to an open version of Java as a means to insure future versions of the operating system cannot be targeted by Oracle’s lawsuit.