Apple (NASDAQ:AAPL) is crushing Samsung (NASDAQOTH: SSNLF) in the smartphone wars. During the fourth quarter of 2014, Apple iPhone shipments soared 46% year-over-year as Samsung shipments fell 11%, according to IDC. Apple also claimed 19.85% of the global smartphone market, nearly matching Samsung's 20.01% share.

Apple iPhone 6. Source: Apple

Samsung faces enemies on all fronts, losing the high-end market to Apple and its status symbol appeal, and ceding the low and mid-range markets to cheaper rivals like Xiaomi. It has scrambled to offset those losses with smartwatches, VR headsets, new phones, and its own Google-free OS and ecosystem, but those are all uncertain, long-term bets.

But as dire as the situation seems, things are looking even worse for HTC (NASDAQOTH: HTCCY) and Sony (NYSE:SNE), which were marginalized by Samsung long before the iPhone 6 arrived. Let's take a look at how these two underdogs have been faring as Samsung struggles to keep the throne.

How HTC lost the smartphone race
Back in 2011, HTC controlled nearly 11% of the smartphone market. Today, it has less than 2%, according to the company's own estimates. In the first nine months of 2014, HTC revenue fell 13% year-over-year. The company returned to profitability in 2014 but only due to aggressive cost cutting measures.

Over the past four years, product delays, marketing missteps, and executive departures -- including head of design Scott Croyle -- have all weighed down the company.

This dilemma parallels the challenges Samsung faces. Apple can sell smartphones at higher margins, because it packs lower-powered hardware into a sleek package which has both cult and status appeal. IHS reports that the 16GB iPhone 6, which sells for $649, only costs $200 to manufacture. The Samsung Galaxy S5, on the other hand, sells for $600 and costs $256 to manufacture.

Since HTC flagship devices are usually cheaper than its Samsung counterparts, the company must match those specs with an even lower price tag. But at the same time, Chinese companies -- which are willing to sell comparable devices at paper thin margins -- are luring away potential customers as well.

Sony is stuck in the same boat
Unlike HTC, Sony never claimed a double digit share of the smartphone market. It controlled only about 2% in 2014, according to Gartner, due to the same challenges that marginalized HTC.

In the second quarter of 2014, revenue at the Sony mobile division rose 1.2% to $2.8 billion, but it posted a staggering operating loss of $1.6 billion, wiping out company-wide profits and causing the company to take a net loss of $1.2 billion. In the following quarter, the mobile business bounced back as sales improved 29% year-over-year to $3.5 billion, and it squeezed out a tiny operating profit of $76 million.

Despite that improvement, the nagging question is whether or not Sony should sell or spin off its mobile division, as it previously did with PCs and TVs, so it can focus on its more profitable businesses. But for now, Sony plans on making the division profitable at the expense of revenue growth.

Hiroki Totoki, the new head of the mobile unit, told investors last November that his priority was to make the Xperia business profitable although sales could decline "by 20% to 30%." This likely means that Sony will try to launch fewer Xperia models at premium prices.

Following Samsung's untested game plan
Sony and HTC have both mimicked some of Samsung's business decisions to diversify away from the crowded Android market.

Like Samsung, both companies are selling more wearable devices. Last year, HTC launched a GoPro alternative, the RE Camera, and is reportedly developing a fitness band. Sony has diversified its wearable offerings with new SmartWear devices like the SmartBand, SmartBand Talk, and SmartWatch 3. None of those devices generate meaningful revenue yet, but the potential is there -- research firm ON World expects global smartwatch shipments to soar from 4 million in 2013 to 330 million by 2018.

HTC, like Samsung, is also looking to Microsoft (NASDAQ:MSFT) Windows Phones to escape the Android market. Both companies sold Windows Phones in the past, and Samsung is reportedly interested in launching new Windows Phones soon. Windows Phone only accounts for about 3% of smartphones worldwide, but with HTC, Samsung, and maybe even Sony pushing the operating system, it could finally gain ground against iOS and Android.

Windows Phones: HTC One M8 for Windows (left) and Samsung ATIV SE (right)

Don't count HTC and Sony out yet
While it might seem like the current smartphone market trends spell doom for Android underdogs like HTC and Sony, neither company will abandon their mobile efforts anytime soon.

Both players could shift toward wearables and Windows Phones, which would diversify their top line away from Android devices. Meanwhile, Google will likely keep licensing its Nexus brand to Android laggards like HTC to keep Samsung market share in check. Nonetheless, HTC and Sony's mobile presence will likely shrink over time, and they should not be considered contrarian bets on the smartphone market quite yet.