People around the world already have their greater love for Apple iphone and some for other smart phones like Samsung, Moto G, HTC, etc.,

Lei Jun, Xiaomi’s founder, has said he wants to move into ten new markets, including India, Brazil, Russia and Mexico.

In doing so he may have a bigger problem than consumers’ love affair with Apple’s iPhone 6. He needs to get Xiaomi’s patents in order.  Xiaomi applied for 2,318 patents in 2014, and Lei plans to get “tens of thousands” more in the coming years. But his company’s patent portfolio is still thin. Samsung, for instance, has been granted 11,877 invention patents in China alone.

All the sales of Xiomi phones in India since the case sued by Ericson for infringing their wireless technology said Delhi High court, but then partially lifted a ban that it can keep selling its qualcomm chips it wait for another receiving judgement.

The company’s name is already synonymous with copycat tactics. Its latest Mi4 phone has been called “a clear copy of the iPhone” in one review, while its tablet the Mi Pad has the same screen size and resolution as Apple’s iPad.

But, China played an huge part in apple record $18 billion in profit this last quarter. The region accounted for 21% of Apple’s revenue, up from 16% last year. After looking for a while like it was under assault from local, cheaper players in China, Apple has turned the tables.

Still Xiomi believes that its presence in the country is growing. All the more reason for Xiaomi, the hot Chinese firm boasting high-spec smartphones for half the price of an iPhone or Samsung Galaxy, to expand beyond China.

The big risk for Xiaomi as it tries to keep growing: running into companies with far more patents, who want to sue.

An omen may already be Xiaomi’s legal problems in India.

But there could be more legal trouble down the road from Ericsson and storied phone manufacturer Nokia.

Both companies have become less active making phones in the face of greater competition, and as a result they’re spending more time capitalizing on the enormous patent portfolios they’ve amassed over the years.

Both are more likely to get their legal weaponry out in the name of patent infringement, which can reap millions in damages, says Florian Mueller, a intellectual property analyst and author of the FossPatents blog. “They have nothing to lose. Only something to gain if they litigate aggressively,” he says. “In that regard, the environment has changed very unfavorably.”

Xiaomi also faces the risk of patent litigation from patent trolls like Unwired Planet. Two years ago the former Internet services company bought 2,185 patents from Ericsson, and has since sued everyone from Apple to Google to Samsung.

Companies like Unwired Planet are privateers, or perhaps a better term would be patent trolls for hire.  Nokia has sold patents to around half a dozen of these companies, who will often go on to share their royalty income with the original patent holders.

With patent holders feeding more patent trolls, Xiaomi is facing a tricky legal landscape. It has a much larger number of players to negotiate with, driving up the cost of legal defence and potentially the cost of licensing too.

Patents are territorial rights, so as Xiaomi moves into different regions like Brazil, it runs the risk of lawsuits from companies who have patents rights there. Brazil, the Middle East and India aren’t known for hosting expensive court battles — which is good news for Xiaomi for now — but that changes if Xiaomi wants to start selling phones in developed markets like the United States, where patent trolls are most active.

Mueller estimates Xiaomi would have to spend as much as $100 million on patent litigation over approximately two years if it became active Stateside, and tens of millions more if it moved into Germany, the second most expensive region for patent litigation.

Mueller already sees big parallels between Xiaomi today and Taiwanese smartphone maker HTC five years ago. Both smartphone makers were born after the Android revolution, and both have faced early patent suits from older patent holders.

The tricky part for both is figuring out whether to agree to pay royalties or hold out for a court battle, as Xiaomi seems to be doing in India.

One tale of two approaches shows how getting that wrong can be cripplingly expensive:

In 2010 HTC became one of the first Android smartphone sellers to say “yes” to a licensing agreement with Microsoft. It paid the company a remarkable $10 per smartphone sold, adding up to hundreds of millions of dollars over the years. (Soon after the deal, Microsoft would rake in an estimated $800 million in royalties from HTC and Samsung in a single quarter.)

While HTC had agreed to Microsoft’s licensing demands, Motorola did not. In 2010, Microsoft sued Motorola, claiming it infringed on nine of its patents. “It’s not like Android’s free,” Microsoft CEO Steve Ballmer said at the time. “You do have to license patents.”

Yet in hindsight, Motorola made the right decision to stand firm. A jury ordered it to pay Microsoft $14 million in damages in 2013, but that was pocket change compared to the estimated hundreds of millions HTC had to pay the Windows Phone maker in licensing fees.

Mueller says“It’s a probabilistic game, “Companies have to think, ‘This patent holder is threatening to sue me. Are they really going to get serious leverage?’”

Xiaomi, who like HTC in 2010 is new to this game, has to figure out when its’ worth fighting, settling out of court quickly and striking deals when it makes sense, Mueller adds. “In India with Ericsson maybe it overplayed its hand. They’re going to have to be careful.”

Good thing that last month Xiaomi raised $1.1 billion in new funding at a $45 billion valuation. To push those global expansion efforts Lei will need to earmark a significant chunk of that money for lawyers.

Keywords: Xiomi, patent portfolio, Infringement, Ericson, Nokia, Samsung.