Inside BlackBerry’s last stand

FORTUNE — Here’s what Research in Motion CEO Thorsten Heins wants you to do: forget everything you know about BlackBerry. Just about everything at the Canadian smartphone maker is new. The twin BlackBerry 10 devices unveiled today are thinner and sleeker than previous models. The underlying software has been entirely rebuilt. And the company itself has a new name. Research in Motion is now called BlackBerry and will soon begin to trade as BBRY on the NASDAQ.

The design of the phones have been labored over. The Q10 sports a classical physical keyboard and the Z10 is more like a typical iPhone or Android with a touchscreen. The touchscreen keyboard has a heat map beneath it so that, as customers use it, the position of keys adjusts to their keystrokes—leading to fewer spelling mistakes. The software, details of which have come out in dribs and drabs, introduces new features like “peek,” which allows users to move aside the task they’re working on to glance at notifications and then quickly come back. Another feature dubbed “flow” allows users to swipe between applications, keeping many open simultaneously.

Last December I traveled to Waterloo, Ontario for an exclusive behind-the-scenes look at the decisions that have led the company to this moment. I joined Heins at the same gray conference table where I’d spoken to his predecessors, Jim Balsillie and co-founder Mike Lazaridis during the company’s spectacular rise. At 6-feet, 6-inches tall, the affable German CEO has a towering presence even when he is seated. He couldn’t contain a grin as he slid his new touchscreen BlackBerry 10 phone in my direction. “There’s a huge growth curve ahead of us from mobile communications where we are today to mobile computing,” he crowed. “This is computing power at your hip.”

It has been almost a year since Heins took over as BlackBerry’s (RIMM) CEO. Back then, the company was in deep crisis. Its BlackBerry 7—then its latest phone—wasn’t selling, nor was its ill-starred iPad competitor, the Playbook tablet. The company was still working to transition from 3G technology to faster LTE technology. Having been in a state of breakneck hyper-growth for so long—it topped Fortune‘s Fastest Growing Companies list in 2009—the firm suffered from convoluted layers of management, including two CEOs and three COOs. The stock, which had peaked at $144 when the company dominated the nascent North American smartphone market in the summer of 2008, was languishing at $15. Rumors surfaced that the company had no cash. Investors were hoarse from calling for new leadership. Worse, the market shuddered when the company eschewed hiring a turnaround specialist in favor of Heins, an insider, as CEO. In his first conference call, he suggested that RIM did not need a turnaround per se, sending some observers into fits.

Despite Heins’s bumpy public debut, he acted quickly to staunch the company’s bleeding. He eliminated a billion dollars in expenses, cutting 5,000 employees in the process. He put in a new management team of industry veterans from around the world, many of whom had played pivotal roles in the wireless revolution at companies such as Verizon (VZ) and Orange. He postponed BlackBerry 10’s original launch date to ensure the company would deliver software capable of competing with Apple (AAPL) and Google (GOOG). And he became a personal ambassador for BlackBerry’s new approach both inside and outside the company. “We have to win back our customers one by one by one,” he says.

A year later, nothing is business as usual at BlackBerry as it attempts to make its best attempt at winning back users. Like Apple when it launched the iMac—or like Blockbuster when it launched the On Demand service that could not rescue it from changing technology—RIM will likely see its fate sealed by this launch.

Team of veterans.

Heins, 55, has spent his entire career in wireless technology. Having gotten his masters in physics and math from the University of Hannover in Germany, he gained most of his technical experience during the 23 years that he worked at the German phone-maker Siemens where he rose to become Chief Technology Officer of Siemens Communications Division. He joined BlackBerry in 2007 as a senior vice president of the handheld business. There, he worked his way up to become one of three chief operating officers. He counts that as an advantage. “I knew the people and the structures, and I knew what was wrong,” he says. (For more, see Fortune‘s RIM: What the hell happened?)

When he took over as CEO, Heins inherited a fragmented, distracted culture. Everyone was working on something different. On his first day on the job he was given a list of 2,500 projects currently in process. Outsider investors and journalists were demanding that he outline a strategy. But before he talked to the public, he addressed his employees. “You can’t just go in front of your people and say, ‘this company is in deep shit,'” he says. “I had to prepare my people for what was to come.” The cuts were brutal: Heins let go of 30% of the company’s workforce. He consolidated 10 manufacturing partners down to three, eliminating the inefficiencies that came from having too many partners working on similar projects.

While this was hard for company morale, Heins also outlined a vision for BlackBerry’s future, particularly as the maker of a cutting edge a mobile operating system. He attempted to be transparent with employees about how the company was doing. On the Friday morning after every quarterly earnings call, he gathered employees to discuss the company’s results. And, he encouraged them to embrace four values, which are written Facebook-style (FB) across the walls: be brave, open, lean and dependable—or as the acronym suggests—”bold.” (Not surprisingly, that is also the name of one of the phonemaker’s most recognizable designs.)

He then turned his attention to shoring up the company’s leadership. To streamline the legal process and make it easier and faster for the company to get deals done, Heins hired the former general counsel of Verizon Wireless, Steven Zipperstein as chief legal officer. To revamp operations, he brought in former Sony Ericsson (SNE) executive Kristian Tear, who had worked in wireless technology for nearly 25 years.

As chief marketing officer, Heins hired Frank Boulben. “My biggest issue was marketing. BlackBerry meant something different to everybody and there was no guidance or direction,” Heins explains. A former global director of commercial strategy for Vodafone and executive vice president of brand and consumer marketing for Orange, Boulben had been responsible for successfully consolidating 19 brands under the name Orange. It was his idea to change the company’s name.

New day, new devices.

The BlackBerry 10 operating system was in the works well before Heins took over as CEO, but Heins brought focus to the process. He began by launching studies to figure out who BlackBerry’s customers were. He says he came away with three major findings: BlackBerry users are more likely to be very active on social networks. They are multitaskers. And they are task-oriented. “We came from enterprise, and we are very much a productivity tool,” Heins says.

The pair of devices that BlackBerry has unveiled sport design features that address these findings. For one, the company has introduced “balance,” an easy toggle between a user interface for work (able to be controlled entirely by the enterprise) and a personal user interface (controlled by individuals). “For users, corporate can’t invade your privacy because the operating system doesn’t allow it,” said Heins. “And it gives the CIO the total confidence that it’s secure.”

To lure customers back, Heins has spent much of the second half of 2012 traveling personally to visit CIOs, carriers, technology reviewers, and other influencers. In particular, the company is betting that the chief information officers who have long been BlackBerry’s largest customer base will help the company become relevant in the market again. It’s a dicey bet: corporate buying patterns have changed in recent years as employees increasingly have more control over their choice of smartphone, and many are opting for Apple and Android-powered devices. In the all-important North American market, this duopoly holds 89% of the market, according to Comscore (SCOR). BlackBerry has seen its share of that market fall to 7% from 34% two years ago.

Winning back smartphone users may be particularly difficult because customers increasingly find themselves locked into one company’s ecosystem and the cost of switching is high. An Android-powered phone, for example, integrates effortlessly with Gmail and Google Maps, while an iPhone makes it easy for users to share material with an iPad or an Apple TV. Both companies have app stores with more than 600,000 apps in them; RIM has just 120,000. What’s more, in a bid to cut their costs, CIOs have loosened up policies to allow employees to bring their personal devices to work. (In a survey conducted last year by Forrester Research (FORR), some 54% of decision makers at North American and European companies indicated they are implementing a so-called BYOD program.)

However, smartphones are just one step in Heins’ ambitious goal to power mobile computing more broadly. He has already hinted at a coming tablet release. And the company’s new operating system is built with technology from its 2010 purchase of QNX Software Systems, a maker of sophisticated software that is already embedded in many cars as well as other types of mobile devices such as TV sets and air traffic control systems. It offers a window into BlackBerry’s future. Says Heins, “We’re already strong in automotive with QNX today. Think about what this could do for healthcare or financial services.”

What’s next?

Realistically, what kind of future can BlackBerry hope to have? Last week BlackBerry’s shares rose 2.3% after Lenovo’s chief financial officer Wong Waiming told a media outlet that the company had spoken to the Canadian phone maker and its bankers about various strategic alliances, implying a potential acquisition. Waiming later backtracked, explaining that he was speaking more broadly about Lenovo mergers and acquisitions. What’s more, any potential acquisition would face major regulatory hurdles from the Canadian government, which would need to issue approval. Nevertheless, it’s a reminder that even as BlackBerry prepares for its debut, it has its strategic options well in view.

Early on, Heins hired J.P. Morgan (JPM) to evaluate what the company’s options were. He says he had no choice. “There was a lot of doubt about whether RIM was going to make it,” Heins reflects. This strategic review continues, but Heins explains that more recently the focus has shifted to future-oriented ideas rather than the how-do-we-get-out-of-this-mess approach at its inception. Says Heins, “To be a leader in mobile computing, we are trying to create a broader ecosystem. We are asking, ‘what are your strategic options to get there?'” He is considering everything, including licensing the BlackBerry ecosystem as Android and Microsoft (MSFT) have done to other manufacturers. That might give device makers such as Samsung the bargaining power they are desperate for.

But if BlackBerry hopes to license its operating system, it will have to prove first that it works. Much like Google did with its original Nexus phone, BlackBerry now needs to showcase the potential for its software. Says Heins, “That’s why the launch is so important.”

Subscribe to Well Adjusted, our newsletter full of simple strategies to work smarter and live better, from the Fortune Well team. Sign up today.