Google's former CEO told jurors that he was confident that the Android smartphone platform was developed legally, and that top executives at Sun Microsystems did not object to the project now at the center of a high-stakes court battle.

Eric Schmidt, now Google's executive chairman, took the stand on Tuesday in the trial of Oracle against Google over smartphone technology.

Oracle, which acquired Sun in 2010, sued Google in August 2010, saying Android infringed on its copyrights and patents for the Java programming language. Google countered that it does not violate Oracle's patents and that Oracle cannot copyright certain parts of Java, an open-source, or publicly available, software language.

In court on Tuesday, Oracle attorney David Boies showed Schmidt a 2005 presentation to Google's top managers that said Google must take a license from Sun. Schmidt said he could not recall being told that was the case.

Schmidt said at one point that Google derived enough advertising revenue from Android to fund the operating system and a whole bunch more.

The goal was to get as many users as we could on a powerful new platform that could exploit the Web, Schmidt said of Android.

Unlike current Google CEO Larry Page who testified last week, Schmidt appeared much more at ease while parrying questions from Boies about the development of Android.

At one point, Schmidt asked Boies to repeat a question, saying he wanted to be sure he answered it truthfully.

I want you to answer truthfully, Boies said, prompting Schmidt to laugh.

Schmidt was Oracle's final witness before Oracle rested its copyright case on Tuesday morning - and Google then called him as its first defense witness.

Under questioning from Google attorney Robert Van Nest, Schmidt said Sun wanted roughly $30 million to $50 million in 2006 to jointly develop a mobile platform with Google. Such a deal would have saved Google time in getting Android to market, Schmidt said.

We would have paid that simply to resolve it, Schmidt said.

However, negotiations between the two companies faltered. Android chief Andy Rubin later testified that while Google wanted to make the software platform open source, Sun wanted to impose restrictions to which Google was opposed.

After Google developed Android on its own and announced it at the end of 2007, Schmidt said he had multiple meetings with Sun Chief Executive Jonathan Schwartz, who never expressed any disapproval about Android.

Google has argued that Oracle launched the lawsuit only after Oracle decided it would be unable to develop a smartphone on its own.

The trial, expected to last at least eight weeks, has been divided into three phases: copyright liability, patent claims, and damages.

Early in the case, estimates of potential damages against Google ran as high as $6.1 billion. But Google successfully narrowed Oracle's patent claims and reduced the possible award. Oracle is seeking roughly $1 billion in copyright damages.

The jury will deliberate on copyright liability before moving on to hear evidence about patent infringement. U.S. District Judge William Alsup may also decide some of the copyright issues.

The case in U.S. District Court, Northern District of California, is Oracle America, Inc v. Google Inc, 10-3561.

(Editing by Gary Hill, Phil Berlowitz)