From huge markets to tiny niches, Android is everywhere because it can do everything.

The Android software platform lets smartphone builders everywhere create devices for every niche. If Apple's iPhone is the gold standard against which all other phones must be measured, it's also a one-size-fits-all strategy with just a handful of models on the market at any given time.

As a direct result of Android's open architecture, the platform is sweeping world markets. According to the latest IDC report, 87.6 percent of the 344.7 million smartphones that shipped in the second quarter of 2016 were equipped with Android software. Another 11.7 percent came with Apple's iOS, leaving less than 1 percent of the pie to share among Windows Phone and other challengers.

So how did Android become such a success? Let's have a look in the rear-view mirror.

How Android provides a platform for everything

Android started out as an advanced platform for digital cameras with network connections. When Android, Inc. founders Andy Rubin and Matias Duarte realized that the camera market was too small to carry a whole new business structure, the company ported its software over to the more promising smartphone sector.

"The exact same platform, the exact same operating system we built for cameras, that became Android for cellphones," Rubin later told PC World.

This was the fall of 2004. One year later, Google bought Android, Inc. for an undisclosed sum—likely about $50 million.

From its inception, Android was never intended to drive massive profits. It was designed to promote sales of digital cameras and related services, so the software was wrapped around the free Linux-libre kernel and tagged with the open source Apache 2.0 license right from the start. That attitude stayed in place as Android, Inc. moved over to phones, and again when Google took over.

"We wanted as many cellphones to use Android as possible," said Rubin. "So instead of charging $99 or $59 or $69 to use Android, we gave it away for free, because we knew the industry was price sensitive."

With profit motivations out of the way, it was easy to take the next logical step and provide the open source community with a properly maintained developer hub for Android. And so the Android Open Source Project was born. That announcement arrived in October 2008, right alongside the first commercially available Android handsets.

Less than 30 months later, an army of Androids had settled into enough niches to reach a 33.3-percent global market share. As the worldwide leader in smartphone software, Android held on to its open source philosophy at heart, though Google later broke away some key pieces of the Android puzzle under a proprietary license. These days, you can modify and build almost all of Android from freely available code, but the remaining Google-specific bits are almost compulsory in order to provide a high-quality user experience. These non-open software tools include Gmail, Google Maps, and the entire Google Play package. That includes the Play Store, where most Android users get their apps from. More on this in a bit.

Opening up the source code to all comers brings many benefits to the platform, as well as to Google itself:

New ideas pour in from community developers, often along with a first crack at addressing whatever problem or opportunity the developer found.
Google's software development efforts get extra help at no cost, apart from running new code through the company's security and integration paces before folding it into the commercial code base.
Peer-reviewed software tends to be more reliable, thanks to many additional sets of eyes scanning the code for problems. According to a 2014 report from code quality analyst firm Coverity, open source projects boast a defect density of just 0.61 defects per 1,000 lines of code while commercial developers stop at a defect density of 0.76. Like any open source project worth its salt, Android has a rigid workflow for adding new code that includes many rounds of testing by separate parts of the core team. Device vendors like Samsung and Xiaomi tend to add their own software on top of proprietary changes to the core Android platform. Despite the best efforts of these industrial giants to provide clean code, they don't have the benefit of an army of curious volunteers to vet that extra code. Hence, vendor-specific Android builds can be both slower and less reliable, driving purists to look for cleaner OS implementations such as Google's own Nexus and Pixel projects.
And of course, the open source strategy helps prospective device builders tune Android to their particular needs. Code forks in the Android community are both common and helpful for exploring new market niches. Technically, every time a vendor adds code that's specific to its own hardware or places proprietary apps on your phone or tablet, that's another code fork. The same goes for enthusiast and third-party Android builds such as the Cyanogenmod and CopperheadOS firmware builds.

Let's start at the top

At the very top of today's Android lineup, you'll find Google's own Pixel and Pixel XL phones.

Where the old Nexus brand offered the cleanest Android experience on highly competitive hardware, the new Pixel name aims for the top shelf. These devices don't compromise their hardware choices to meet an attractive price point.

They contain the latest and greatest Qualcomm Snapdragon 821 processor cores, massive batteries, large and fine-grained OLED screens, and one of the best cameras ever found in a smartphone. Google matched the Pixel line's prices to Apple's iPhone 7—and arguably deserves that honor.

In Ars' detailed review of the Google Pixel, you'll find that the company made some rookie mistakes in the hardware design. Google is new at this top-to-bottom hardware design game, and the Pixel reportedly suffered from a rushed development process. Wrinkles such as a bland body design and poor speakers should be ironed out in the 2017 versions.

Even so, we were suitably impressed by touches like the premium camera. Above all else, the Pixel's implementation of Android 7.1 felt cohesive and intelligent.

"The software here feels like it is all cooperating to deliver a single vision instead of serving as a battlefield between Google and your hardware OEM's software ambitions," we wrote.

This is the high-end template that other flagship Android phones must strive to equal or exceed. Some users prefer the sleeker design and VR-ready screen of Samsung's Galaxy S7. The HTC 10 also sports a unique design and a higher-quality screen than the Pixel, along with a strong set of stereo speakers. The Oneplus 3T comes tantalizingly close to matching the Pixel's top-shelf hardware selections, and it includes 50-percent more RAM than the Google phone—all at $439 compared to the Pixel's $649. For now, the Pixel line holds a unique advantage by shipping with Android 7.1 Nougat, but the other vendors have all vowed to bring Nougat to their flagships in the next few months.

So consumers have plenty of choices at the high end of the market. That's nothing compared to the sometimes vexing plethora of choices on the lower rungs of the pricing ladder.

Entry-level options

At the lowest end of the smartphone spectrum, Android dominates the game. In the US, getting an Apple phone from a major network will run you at least $300 for last year's iPhone 6S. Most carriers start at the more recent iPhone SE at entry-level price points ranging from $320 to $400. More adventurous shoppers can find unlocked versions of these phones elsewhere, but significant discounts tend to be attached to pre-owned and refurbished handsets.

Jump over to the Android side, and things are a little different.

The major carriers peddle smaller, lower-end Android handsets at far lower price points. T-Mobile can hook you up with a brand new ZTE Avid Trio Android phone for $99. Sprint has the LG Tribute 5 for $120, and Verizon sells the LG K4 LTE at exactly the same price. AT&T aims a bit higher with the $150 LG K10. And if you're willing to go with pre-owned or refurbished phones, the savings on current-generation Androids can be downright tremendous.

Any way you slice it, low-end Android choices will put a much smaller dent in your pocketbook than the cheapest available iPhones. Note that none of these low-end devices come with the latest and greatest Android platform installed. The Tribute 5 launched in January 2016 with the aging Android 4.4.2 KitKat installed. It has received some security updates since then, but it's still stuck with a three-year-old OS version. K4 and K10 started out with Android 5.1.1 Lollipop but have moved on to version 6.0.1 Marshmallow. The Avid Trio started its T-Mobile life just a couple of weeks ago and is still running its original Marshmallow software.

The three latest Android versions—Lollipop, Marshmallow, and Nougat—currently add up to just 58.4 percent of all devices visiting the Play Store. The rest rely on older fare such as KitKat and Jelly Bean, with a few stragglers still running the 2010-vintage Froyo version. The varied freshness of OS versions is an Android problem that Cupertino doesn't have to worry about. A staggering 92 percent of all iOS devices run one of the two latest software versions. This fragmentation is an oft-invoked reason for preferring Apple's unified ecosystem or for leaning toward the quicker OS updates of Google's own Pixel and Nexus brands. The separation of Google Play Services is an attempt to work around the fragmentation issue by allowing older, update-free Android devices to install fresh Google Play components on top of their aging platforms. It's complicated.

That being said, low-cost Android devices address an important market. I'm not saying that a ZTE Avid Trio can match biceps with the iPhone 5S in any meaningful way. That's not what the lower-cost Android phones are about. If you don't care about beefy processor performance, high-end graphics, fantastic cameras, or blink-and-you-missed-it page loads in the mobile browser, you probably see low prices as a huge selling point. Low-cost Androids are all good enough for some occasional Web browsing, intense Facebooking, and an always-on Twitter experience. And, for better or worse, many non-techie consumers neither know nor care about the whole OS fragmentation fracas.

That's true enough in the cost-conscious America we live in, but even more so in the developing world.

In India, you can find capable Android phones under unfamiliar brands like Reliance, Karbonn, and Videocon for as little as $45. These handsets have wimpy processors and come with absolutely minimal RAM and storage, but they run still-supported Android versions such as 5.1 Lollipop, and they support advanced features such as Voice over LTE calling.

Indian retailers ran sales on iPhones in late November. The best iPhone 5S discounts dipped down to roughly $260, and you could have grabbed an iPhone SE for $490 after cashback credits to your Paytm account. If you thought that the pricing chasm between entry-level iPhones and Android was large in America, it's even greater in the developing world.

On top of that, developing markets are often far more price-sensitive than our domestic market. Hence, Apple isn't much of a player in places like India. According to analyst firm Strategy Analytics, iPhones have slipped to a two-percent market share in India, down from four percent a year earlier. Meanwhile, Android jumped from 90 percent to 97 percent, leaving no real room for any other challengers in the world's second-largest consumer market.

India is just an example. The same story plays out in other developing areas such as Africa or South America. Apple's pricing strategy is not winning any wars in these high-volume markets. Android's open source model, on the other hand, is where it's at.

Specialized models

Apart from top-of-the-line flagships and low-cost entry-level models, Android devices are free to exploit every available niche market.

Pining for a physical keyboard? There are still Android models with that feature. Heck, good old BlackBerry still made keyboard-equipped Android phones in 2016, and the company is now licensing its QWERTY keyboard patents to other companies.

Looking for a flip-phone with smartphone features? Lesser-known device makers like Freetel can hook you up. Samsung took that idea one step further with the W2016 flip-phone, which comes with separate screens on the inside and the outside of the fold, along with a physical T9 keypad.

Need a phone meeting military durability standards? You'll find rugged Android options aplenty, including the Kyocera DuraForce family or the Samsung Galaxy Rugby Pro.

And the list goes on. There are enough device designers in the Android ecosystem to meet pretty much any über-specialized hardware requirements you could come up with. And they all come equipped with Android's highly polished and battle-tested software platform, with the freedom to make further improvements or customizations as the situation requires.

Not to punt a deceased bronco or anything, but Apple has made no effort to build such a flexible ecosystem. Keeping its technologies close to the vest and ensuring that each device sold triggers a significant revenue stream directly to Apple itself, Cupertino has created a robust and highly profitable technology platform. But it will never be as popular as Android.

Profit motives

Of course, Apple is not trying to win a popularity contest. The company is in business to make money, and it has built a perfect beast for that exact purpose.

In the recently completed fiscal year 2016, Apple sold 212 million iPhones to collect $136.7 billion in iPhone revenues. That's an average price of $645 per unit, and Apple doesn't have to worry about competition from third-party phones running iOS driving that price downward.

Apple does depend on third-party companies to build its hardware, provide service connection to the phones, and end-user distribution. So there are costs involved in the iPhone business, and Apple doesn't get to hold on to every last penny. But the company has an iron grip on the iPhone's entire lifecycle. From the iOS software to the Apple-designed hardware, including the most efficient retail store chain in the US (on average, Apple stores record annual sales of $5,600 per square foot—some 56 percent ahead of second-place retailer Tiffany's), Apple owns every step of the distribution chain and maximizes the amount of profits going into the company's own pockets.

The company's gross margins sit at 39 percent these days, among the strongest readings on that metric in the retail and consumer electronics sectors.

As we have discussed at length here, Google runs Android in a very different manner. Google doesn't generate enormous profits via hardware sales, but by giving as many people as possible access to other revenue-generating Google/Alphabet services. More connections equals more Web searches and ad clicks, and connections also help Google establish its brand as a trusted and valuable online partner.

The Pixel brand has not changed Google's commitment to these ideals. In the latest earnings call, analysts probed Google's management for hints that the company might be moving closer to Apple's closely held mobile business model. Google CEO Sundar Pichai slapped away all of those suggestions:

We deeply remain committed to building an open ecosystem, because at the end of the day, we want Google to be there for every user, everywhere, and to do that well, we want to work with partners, and build a great ecosystem to make it happen... We have always believed that an open, horizontal free platform like Android breeds more innovation, more options for users and better business models for partners. We open-source our code, we build the most open APIs possible, and we work to create a sustainable, open ecosystem. With over 4,000 distinct Android devices, we are really proud of how so many partners are having success on the platform.
Sure, Alphabet is adding more real-world products and services to prepare for the inevitable end of the current Web search and advertising bonanza. The company is researching self-driving cars, wearable computing tools, balloon-powered global Internet services, multiple ideas within renewable energy generation, the kind of long-term medical research that's too unprofitable for specialists in that field, and much more. Some of these projects will eventually turn into real products on consumer-ready store shelves, letting Alphabet tap into direct retail sales in a whole new way.

The Pixel brand may be a small step in that direction, but it's far from an all-in jump. Alphabet is not yet ready to break out its hardware sales in quarterly financial reports, much less the specific performance of Pixel phones. These efforts are currently bundled into the Google segment in Alphabet's reports, making it nigh-on impossible to figure out how much revenue or operating profit the Nexus, Android, and Pixel brands are generating for the company.

But again, that's not even the point. Google has not designed Android to generate revenue on its own. Android is a funnel that drives mobile users into the larger Google ecosystem. Once inside, the company hopes that users will stay for the long haul.

How open is Android, really?

Before we part ways today, let's remember that Android isn't 100-percent open to everybody.

Several key parts of the full Android experience have been broken out as Google-branded auxiliary tools, available only if the device developer meets certain criteria. Your device can't be marketed as a Google-approved Android experience unless it includes a full set of Google tools such as Google Maps, Gmail, YouTube, and the Chrome browser. Google search must be the default search provider, icons for the most important ad-click drivers must be present on the home screen, and so forth. That's what it takes if you want to have official access to the all-important Google Play Store, among other crucial tools under the Google Play umbrella.

In short, Google wants to make darn sure that Android devices will funnel plenty of fresh service traffic in Google's direction. From the company's point of view, this is the reason Android exists.

None of this is stopping hardware partners from building more Android devices, of course. They can also try their hand at building separate app libraries such as the Amazon App Store, but we should note that Amazon's Kindle Fire tablet isn't marketed as a proper Android device, and it lacks that 13-app set of core Google services. Amazon can do this thanks to its own lineup of online services and entertainment options, stepping in to replace the missing Google features. Many other device designers don't have these advantages, so they sign up for the full Google-infused Android experience by default.

And the ecosystem keeps growing.