Samsung has won the right to see the text of the HTC-Apple agreement to cross-license (some) patents and end their lengthy court battles, which have dragged on since 2010. The document will be shown only to its lawyers as part of arguments before Judge Lucy Koh in its post-trial arguments after Apple was awarded a billion-dollar judgement against Samsung over infringement of some of Apple's design and interaction patents.

Patents blogger Florian Müller has pulled off something of a coup, discovering a copy of the agreement, though heavily redacted.

Even so it provides a number of fascinating details:

• any change of ownership of either company (most likely for HTC at the moment), the agreement dies ("unless other wise agreed in writing by the Parties")

• if either side gives or lends the patents to another company, the other side is still covered

• the cessation of the lawsuits isn't permanent; it could restart at the International Trade Commission, though on what basis isn't known

• it's unclear whether the agreement covers all patents that the two sides hold (the detail is redacted) but there is a section called "Exclusions to grant of rights", which makes it sound pretty clear that not everything is available to both sides

• the agreement only covers some - unspecified - products.

Samsung demanded sight of the agreement for its case with Apple, where Judge Koh will on 6 December hear pleadings by both sides over the outcome of the jury decision.

According to Groklaw, Samsung has prevailed in its demands to see an unredacted version of the agreement including the licensing fees, although it will be for "attorneys' eyes only" and so not publicised.

Apple and HTC had agreed to provide a version of the licence agreement to the court - but with 33 key words redacted, specifically the ones that specify the licence fees that HTC is paying Apple under the agreement. (That HTC is paying Apple is taken as read; although HTC had some 4G/LTE patents, it had yet to prove those against Apple, while the US company had gone as far as winning some injunctions against HTC handsets.)

Apple is seeking sales injunctions against Samsung products found to have infringed; Samsung argued that Apple's willingness to license its patents to HTC means that injunctions are unreasonable, since all that is needed is some more negotiation between Apple and Samsung - given that Apple has already shown that it will license the patents to others (specifically, HTC).

The price on the patents, and the detail about which patents, indicates what value Apple puts on its technology, Samsung argued. Groklaw quotes Judge Koh's interim ruling:

At the hearing, Samsung explained that it needs an unredacted version of the settlement agreement because the financial terms are probative of [give proof of the] arguments Samsung raises in its opposition to Apple's permanent injunction motion. Despite Samsung's assertions that consumers' willingness to pay a premium for patented features of a product is not relevant to a consumer demand inquiry, it argues that to the degree Apple prevails on the contrary argument, the licensing fees with HTC are relevant to the degree of consumer demand for Apple's patented features.

Samsung's lawyers are using a subtle argument: they're saying they don't think Apple's patents are relevant to how much demand there is for products in the marketplace. (They argue this because if Samsung is found to have infringed Apple patents, the payments per patent by HTC would point to the amount Samsung should pay.) But equally, if Apple is right, then it is hoping that the HTC licence will be quite low, so it can argue any fine down.

Samsung's lawyers may have some inkling of the amount, because of a per-handset deal Samsung has made with Microsoft to license patents the software giant claims are infringed by Android.

HTC's Peter Chou has said in interviews that suggestions that HTC is paying $6-$8 per handset to Apple under the agreement are "outrageous" and, more to the point, untrue. Too high? Too low? We'll have to crawl over HTC's financial results to see if it shows up.

The licensing of non-essential patents has rapidly become a business worth hundreds of millions of dollars every quarter - of which almost all goes to Microsoft, which has demanded and won licences for its patents from almost all of the Android device makers marketing products outside China.

HTC and Samsung have both signed deals - whose values have been guessed at being anywhere between $5 and $15 per handset - and even in October 2011 Microsoft could boast other deals from Acer, Quanta Computer, Wistron, Viewsonic and others.

The biggest holdout: Google-owned Motorola Mobility (MMI), which for a couple of years has been asserting its standards-essential H.264 patents against Microsoft, claiming infringement and demanding a payment related to the retail price of products, while Microsoft has been demanding payment against the non-essential Android patents.

It's hard not to see MMI's suit against Microsoft as a reaction to the Android payment demands - MMI was one of the first companies into the Android space - but a court is presently determining how much Microsoft should pay. Once that is done, and the Apple-Samsung trial is wrapped up, the beginning of the end of the smartphone patent wars might be in sight.