SAN FRANCISCO, CA (AP)— BlackBerry is expanding its efforts to sell mobile-security software on its rivals’ smartphones and tablets to help counter the waning popularity of its own devices.

As part of its strategy outlined Thursday in San Francisco, BlackBerry unveiled several upgrades to its mobile security weapons and a partnership with smartphone market leader Samsung Electronics.

Many of the security features will protect smartphones running on operating systems made by Apple Inc., Google Inc. and Microsoft Corp.

BlackBerry CEO John Chen is counting on the increased emphasis on mobile security to help the Canadian company to double its annual software revenue to about $500 million. The security arsenal is designed to help businesses and government agencies protect their employees’ smartphones from malicious software and other hacking attacks that can steal confidential information.

Investors signaled their approval of the plan by driving up BlackBerry’s stock 92 cents, or 8 percent, to $12.19 in Thursday afternoon trading.

As part of the companies’ new alliance, Samsung plans to offer key pieces of BlackBerry’s security software to corporate customers whose employees work on Galaxy phones and tablets, which run Google’s Android operating system.

Competition from Android phones and

Apple’s iPhones, which debuted in 2007, has hobbled BlackBerry.

As the iPhone’s touch-screen technology and other easy-to-use features caught on, BlackBerry stuck with the physical keyboards on its smartphones and didn’t quickly develop a system to accommodate apps made by outside developers. BlackBerry eventually tried to bounce back by overhauling its operating system in 2012, but the response didn’t come quickly enough.

BlackBerry now holds a small fraction of the U.S. smartphone market after commanding a nearly 50 percent share as recently as 2009. The downfall has saddled BlackBerry with massive losses. In the company’s first half, which ran through August, revenue dropped 61 percent to $1.9 billion from the year before.

Chen, who took over as CEO a year ago, has been sharpening BlackBerry’s focus on the business and government market in a tacit admission that the company’s devices are unlikely to win over most consumers who have become enamored with Apple and Android products.

BlackBerry’s most recent phone, a square-shaped device called the Passport, quickly sold out of its limited supply after its September release. During his Thursday presentation, Chen provided a glimpse of a red Passport model that will be available Nov. 28. He also said BlackBerry will release another phone, called the Classic, on Dec. 17.