The US on Monday charged the Chinese phone giant Huawei with trying to steal trade secrets from T-Mobile, among other crimes.

One Justice Department indictment includes internal emails between Huawei's US and Chinese employees who prosecutors said were trying to copy a T-Mobile device-testing robot.

The emails read like a comical spy movie, with one set of employees trying to avoid wrongdoing and another engineer getting caught putting part of the robot into his bag.

Huawei said that it hasn't violated any US laws and that it already settled with T-Mobile in a civil lawsuit.

The US on Monday charged the Chinese phone giant Huawei, Chief Financial Officer Meng Wanzhou, and a couple of affiliates with bank and wire fraud and theft of trade secrets.

The two indictments are the latest development in a saga that exploded when the Canadian government arrested Meng in December at the request of US authorities.

Read more: US calls Huawei and CFO Meng Wanzhou national-security threats, indicts company and exec on fraud and IP theft charges

While the situation for Huawei is grave, the indictment outlining the charges of trade-secret theft makes for slightly comical reading, particularly where it touches on allegations that the Chinese firm attempted to obtain T-Mobile's trade secrets starting in 2012.

At the time, T-Mobile was touting a device-testing robot called Tappy, which comprised a robotic arm and camera that tapped new phones to test their responsiveness and catch any software bugs.

The image below shows what Tappy looks like, and this T-Mobile video features the robot in action.

Tappy, T-Mobile's device-testing robot. Tappy

At one point, T-Mobile considered licensing Tappy to phone makers like Huawei who might use the robot to catch software bugs earlier in development. In 2012, it allowed these prospective partners limited access to Tappy in its lab, where engineers could play around with the robot. That included Huawei, whose US engineers were able to test Tappy.

This quickly spiraled into Huawei trying to gather a bunch of information about the robot, as detailed in internal emails included in the indictment. Prosecutors characterized Huawei's efforts as an attempt to "steal" data on Tappy to develop its own robot, called xDeviceRobot.

Read more: Chinese electronics giant Huawei allegedly offered bonuses to any employee who stole trade secrets

Prosecutors say the emails describe Huawei's Chinese engineers working on their equivalent to Tappy and pressuring their US counterparts to steal as much information as possible — and the US engineers trying to avoid doing any such thing.

Huawei engineers pressured into information gathering

At the beginning of 2013, Huawei's Chinese engineers came up with a list of questions about Tappy for T-Mobile engineers. They also asked their US colleagues, who had access to Tappy, to take some photos of the robot and send them back, the indictment said.

T-Mobile quickly grew suspicious. The indictment said a Huawei US employee wrote to colleagues: "We CAN'T ask TMO any questions about the robot. TMO is VERY angry the questions that we asked."

Huawei's Chinese engineers continued to pester their US colleagues for more information through the spring of 2013, repeatedly requesting photos of the robot and measurement data, the indictment said. A Huawei US employee bluntly replied that Huawei China should question Tappy's manufacturer, not T-Mobile.

Eventually, the US employee suggested that the Chinese engineers come out to see Tappy for themselves.

"I suggested HQ to send an engineer to TMO for a hands-on experience by playing the robot system," the employee said. "I believe this would give HQ robot team a huge benefit in understanding TMO robot system from hardware and software, as well as operation."

At this point, Huawei's US engineers had asked so many questions that T-Mobile had complained. Here's an excerpt from an email from the US employee included in the indictment:

Huawei China persisted, flying out an engineer to sneak his way into T-Mobile's lab, the indictment said.

Though the engineer had no clearance to visit the lab, two US colleagues snuck him in, the indictment said. The Chinese engineer was asked to leave, but he returned the next day and took photos and gathered information. He was once again discovered and booted, but he returned to China with the information.

Deeply suspicious at this point, T-Mobile revoked access to Tappy, allowing only one US Huawei engineer, referred to in the indictment as "A.X.," to test the robot. Huawei China continued to pester this engineer to send photos and information.

"No need for home to keep reminding me," A.X. replied to their email at one point, per the indictment.

On May 29, 2013, after Huawei China asked A.X. to provide detailed measurements of Tappy's robot arm, A.X. walked into T-Mobile's lab, took one of Tappy's arms, and put it in his bag, the indictment said. When T-Mobile discovered the arm was missing, A.X. gave it back, but the damage had been done.

The indictment alleges that Huawei China did everything it could to cover up the coordinated effort, saying that A.X. and the Chinese engineer had "acted on their own" and that the pair had been fired.

Huawei says the T-Mobile case is settled

Huawei said this whole episode was settled in an earlier civil lawsuit, and it denied any wrongdoing in a statement to Business Insider: