Microsoft’s troubles with Windows 8 have been widely reported but they pale in comparison to the struggles that Redmond is having with their Windows Phone mobile operating system. Along with Nokia, the two have given it their all but the fact remains… market adoption is still very low. Good thing Microsoft has an ace in its back pocket – Android.

When creating Android, Google illegally used technology from a number of tech companies including Microsoft. Rather than going through years of litigation, a number of Android vendors have already agreed to sign licensing deals with Microsoft to put the issue behind them.

It’s nothing new really as Microsoft has been earning royalties from Android since 2011. At present, more than 20 manufacturers now license IP from Microsoft including HTC, LG and Samsung.

Those licensing deals translate into serious dough for Microsoft. Most believe that Redmond will collect somewhere around $8 per Android device sold moving forward. Do the math and Microsoft is set to collect royalty fees of around $3.4 billion this year.

The good news for Microsoft is that shipments of Android handsets are showing no signs of slowing down. An estimated 1.5 billion Android-powered phones are expected to ship in 2017 and if Microsoft earned royalties on just half of those devices, they’d pocket a cool $5.9 billion. Using the same data, if Redmond collected royalties on 75 percent of devices, they’d pull in an estimated $8.8 billion in extra revenue.