According to the latest batch of market-positive trade-deal headlines, US negotiators are scrambling to hash out a deal with their counterparts in Beijing that would enable Trump and President Xi to save face, while averting the next round of US tariffs (and possibly removing existing tariffs) - even if this means squandering the leverage Trump has accrued by backing the Chinese economy into a corner.

But amid the rush to finish a deal by the end of the month, the battle of wills between Chinese telecoms giant Huawei and the US government rages on. And in what appears to be its latest salvo, Huawei is reportedly suing the US government over its ban on federal agencies purchasing Huawei products, which it argues is illegal under US law.

According to the NYT, which was tipped off about the suit by two sources close to Huawei, the Chinese firm is planning to file in the Eastern District of Texas, where its American headquarters is based:

SHANGHAI - The Chinese electronics giant Huawei is preparing to sue the United States government for banning federal agencies from using the company’s products, according to two people familiar with the matter. The lawsuit is due to be filed in the Eastern District of Texas, where Huawei has its American headquarters, according to the people, who requested anonymity to discuss confidential plans. The company plans to announce the suit later this week.

While the legal precedents are stacked against Huawei, reversing the ban probably isn't the lawsuit's ultimate goal; rather, according to the Times, the company is hoping to force the White House to "more publicly make its case against the Chinese equipment maker." The suit is part of a multi-pronged approach by the company to defend its reputation from aspersions cast by the US.

The move could be aimed at forcing the United States government to more publicly make its case against the Chinese equipment maker. It is part of a broad push by Huawei to defend itself against a campaign led by the United States to undermine the company, which Washington sees as a security threat. Executives have spoken out strongly against America’s actions, and new marketing campaigns have been aimed at mending the company’s image among consumers. For many years, United States officials have said that Huawei’s telecommunication equipment could be used by Beijing to spy and disrupt communication networks. The company has denied the allegations, but major wireless carriers such as AT&T and Verizon have effectively been prevented from using Huawei’s equipment as a result.

Mirroring a strategy employed by Russian security firm Kaspersky Labs after the federal government ordered agencies to uninstall Kaspersky's software over fears it was being used to spy on the federal government, Huawei's lawyers are expected to argue that a defense spending authorization law passed last year was tantamount to a "bill of attainder" - legislation that unfairly singles out a person or group.

The lawsuit that Huawei is preparing to file in the United States is expected to challenge a section of a defense spending authorization law that was approved last year. The provision blocks executive agencies from using telecom equipment made by Huawei and another Chinese company, ZTE. According to one of the people familiar with the matter, Huawei’s lawsuit is likely to argue that the provision is a “bill of attainder,” or a legislative act that singles out a person or group for punishment without trial. The Constitution forbids Congress from passing such bills. The United States Embassy in Beijing did not immediately respond to a request for comment. A call placed outside business hours to the United States Courthouse in Plano, Tex., where Huawei’s American headquarters are located, was not answered.

Huawei executives have argued that the US's campaign to encourage its western allies to ban or put up barriers preventing Huawei technology from being used in the construction of their 5G wireless networks was motivated not by security concerns, like the US has maintained, but by commercial interests. The US wants 5G technology developed by Verizon and other US providers to form the backbone of 5G, not Huawei. However, the fact that many of the US's allies have refused to go along with this has demonstrated that Huawei's market leading technology is simply too valuable.

And as Huawei ramps up its legal efforts in the US (as criminal proceedings alleging IP theft have started in a Seattle courtroom), CFO Meng Wanzhou is suing the Canadian government and the officers who arrested her for violating the Canadian Charter of Rights and Freedoms, Reuters reports.

In a civil lawsuit filed in the British Columbia Supreme Court on Friday, Meng’s lawyers said the manner in which officers obtained evidence and information from Meng constituted serious violations of the Canadian Charter of Rights and Freedoms. Meng is the daughter of Huawei’s founder. It added that Canadian Border Services Agency (CBSA) officers deliberately delayed the immediate execution of an arrest warrant and unlawfully subjected Meng to detention, search and interrogation to extract evidence from her before she was arrested. […] The lawsuit further alleged that Meng was directed to surrender all her electronic devices, computers and passwords and that CBSA officers then unlawfully opened and viewed the contents of the seized devices in violation of her right to privacy. CBSA officers also searched Meng’s luggage in violation of the right to privacy, the lawsuit said. "The CBSA Officers knew or were recklessly indifferent to the fact that they had no authority to conduct such a search, which search was performed under the false pretense of a routine customs or immigration related examination," according to the lawsuit.

While any failure to secure a trade deal with China would certainly be embarrassing for Trump, a series of losses in Western courts to Huawei would not only be embarrassing, but seriously undermine the US's efforts to muscle out Huawei and establish American firms as the dominant global force in 5G.