It's not true that they won the legality of the case through an appeal. The original ruling sided with oracle on technical and legal matters. They just weren't awarded damages.
By "the original ruling" are you referring to https://www.eff.org/files/alsup_api_ruling.pdf , which says, "on the specific facts of this case, the particular elements replicated by Google were free for all to use under the Copyright Act. Therefore, Oracle’s claim based on Google’s copying of the 37 API packages, including their structure, sequence and organization is DISMISSED. To the extent stated herein, Google’s Rule 50 motions regarding copyrightability are GRANTED"?
Can you point to what part of this ruling sided with Oracle on either technical or legal matters? (With the exception of rangeCheck.) Or can you link to what ruling you mean by "the original ruling"?