Google wants $4 million from Oracle to cover the costs it incurred during this spring's epic legal battle over the Android mobile operating system.

In a brief filed with in federal court on Thursday night, Google lead counsel Robert Van Nest argued that Oracle is required to pay his company's legal costs because judge and jury ruled in favor of Google on almost every issue during the six-week trial.

"Google prevailed on a substantial part of the litigation," read Google's brief. "[Oracle] recovered none of the relief it sought in this litigation. Accordingly, Google is the prevailing party and is entitled to recover costs."

Google has not publicly revealed an itemized list of its expenses, but the total bill included $2.9 million spent copying and organizing documents. According to the brief, the company juggled a mind-boggled 97 million documents during the case.

In 2010, Oracle sued Google, claiming that the search giant infringed on its copyrights and patents in building the Android mobile operating system. The suit arrived after Oracle acquired Sun Microsystem, maker of the Java programming language, which plays a larger role on Android.

Oracle argued that Google stepped on its intellectual property in cloning 37 Java APIs, or application programming interfaces, software that developers use to build Java applications. But the database giant also claimed that Google actually lifted certain pieces of software code from the Java platform.

After a year of pre-trial wrangling and six weeks in court, Oracle walked away with next to nothing. Judge and jury decided that Google was liable for lifting nine lines of code and two test files, but otherwise, they sided against Oracle. Last month, Judge William Alsup ruled that Google owed Oracle exactly nothing for lifting those small pieces of code.

Oracle has said it will appeal the rulings. But in the meantime, it may have to pay Google. The search giant now awaits a ruling from Judge Alsup on its $4 million demand.

Image: yomanimus/Flickr