As the latest Samsung-Apple trial gets under way, catch up on this scene-setting excerpt from “Haunted Empire: Apple After Steve Jobs” by former Wall Street Journal reporter Yukari Iwatani Kane.

On the evening after the first iPhone went on sale, a couple dozen visiting designers from Samsung were dining at a Korean barbecue restaurant in San Francisco called Hanuri when a friend showed up with the device. The phone was locked, so the designers couldn’t see the home screen or open the applications. But it didn’t matter. They were impressed enough with the sleekness of the device and the elegant ease of swiping their finger to pull up the pass-code screen. They oohed and aahed as they made the gesture over and over again. They had never seen anything like it.

Like the rest of the world, Samsung’s executives and designers were awed by the iPhone, and they wanted something similar. Historically, companies chased each other all the time with products that looked the same. If one scored big with a product that was slightly different, others followed quickly with varying degrees of modification. That was how minor companies moved up the food chain. Samsung was no different. The company had access to plenty of top engineers and designers and didn’t lack for talent. But their main task was to look at popular products in the market and focus their energies on improving upon them. Part of its modus operandi was to use its manufacturing prowess and its relationships with its customers to follow rivals quickly from behind. When Motorola’s Razr phone was all the rage, Samsung’s executives demanded that its engineers outdo them with a similar phone that was even thinner than the Razr. The edict was the same with the iPhone.

From Samsung’s perspective, there was nothing wrong with being inspired by a rival. Companies were stimulated by each other’s products all the time.

The Galaxy S, Samsung’s first iPhone look-alike, created an enormous complication for Apple. Samsung was a formidable opponent — a family-controlled multinational conglomerate with nearly limitless resources and numerous subsidiaries and businesses from electronics to heavy industries to life insurance. In 2010, the electronics division alone reported revenues of 154.6 trillion won, or $142 billion. The company had a strong portfolio of patents that was only growing bigger.

Although the two corporations were rivals, Apple also happened to be one of Samsung’s biggest customers. That same year, Apple had spent about $6 billion with Samsung on microchips, memory chips and liquid crystal displays. If a legal battle led the Korean company to withhold those components, Apple would be in trouble.

Tim Cook, Apple’s reigning expert on the intricacies of the supply chain, was particularly wary of endangering the relationship.

The two industrial superpowers stood at the brink of global conflict. For months, their leaders and top lawyers flew back and forth across the Pacific, soaring above the clouds as they coldly appraised each other’s defenses and calculated the odds of whether it was better to avert the war that loomed between them or to let that war commence. The stakes were unimaginably high: Billions of dollars and the question of who would dominate the future of human communication.

In mid-2010, Jobs and Cook had met with Samsung’s president Lee Jae Yong at Apple’s Cupertino offices. The Korean electronics company had just unveiled a smartphone that looked strikingly like the iPhone 3GS. Even more alarming, the user interface of the device was nearly identical — down to the design of the calendar, clock and notes applications. The home screen was filled with similar-looking square icons. The Apple executives warned Lee. He needed to stop copying their products.

Over the next six months, the two titans entered into a dance of negotiation and modulated aggression as they held a series of peace talks in an effort to avert a protracted legal battle. Soon after the first summit, Apple’s general counsel and lead patent attorney traveled to Korea to formally complain. Their issue with Samsung was twofold. The Galaxy S phone and its packaging looked too much like the iPhone, and Samsung was using Google’s Android operating system, which, in their view, incorporated Apple’s patented technology without its permission. In a 67-page report, the iPhone maker detailed examples of how the Galaxy phone was specifically infringing on its patents. As a solution, the company demanded that Samsung change some of the designs and license Apple’s technology for others.

Samsung was unsympathetic. They refused to acknowledge the similarities of design and counter-accused Apple of violating its intellectual property. To settle the dispute, the manufacturer proposed a cross-licensing agreement, in which both parties would agree to let the other be.

A few more fruitless meetings followed. After Samsung unveiled its tablet device, Galaxy Tab, at a European trade show in September, Apple laid out a proposal to license some of its patents for $30 per smartphone and $40 per tablet with a 20 percent discount for cross-licensing Samsung’s portfolio back to Apple. For 2010, that amounted to about $250 million.

Samsung spurned the offer. By the time they next met in Korea, Samsung had reworked the math in its favor. They asserted that Apple owed Samsung money, not the other way around. In the discussions, Samsung’s legal team sent mixed messages. Officially, they refused to budge on their position, but in an informal conversation over lunch, they had indicated a willingness to negotiate. For months Apple had held out hope that the Samsung camp would ultimately be willing to work out an acceptable deal that would allow them to avoid a courtroom battle.

Any possibility of that outcome ended when Samsung unveiled the Galaxy Tab 10.1 the following February. The tablet device was more like the iPad, not less. Samsung seemed inclined to edge as close to the line as they could unless it was forced to retreat.

The war was on.

Yukari Iwatani Kane is the author of “Haunted Empire: Apple After Steve Jobs,” which explores how Apple is handling the loss of its visionary founder while also dealing with the many challenges of a globally dominant company. A former Wall Street Journal reporter with nearly 15 years of experience writing about the technology industry, she covered Apple during the last years of Jobs’s reign, and broke the news about his liver transplant. Reach her @yukarikane.