• Will Google Betray and Kill Android
  • Vasiliy Zukanov

Android is by far the most popular platform in the world, supporting more than 2 billion mobile devices. There is no doubt that it was a great success.

Still, I suspect Android’s prospects may not be as rosy as they used to be.

I first had this idea about a year ago. At the time, Google announced that the Kotlin programming language would be officially supported for Android development. The announcement generated a lot of enthusiasm among Android developers, but I couldn’t join the wave.

I tried to understand how Kotlin would mutually benefit Android, but all I could see was the further fragmentation of an already fragmented and chaotic development ecosystem.

I had hoped Google would share more information with us, but they didn’t. All they said was that Kotlin was officially supported because it was a “better” development language, that efforts would be focused on promoting it, and that Kotlin examples would be added to the official documentation.

The most immediate and obvious question – what is Java’s road map on Android? – Still no reply.

Why I wrote this article:

Sometimes I want to share some gloomy thoughts with readers of my blog. So, I wrote a series of quantitative analyses showing how Kotlin’s introduction might have a side effect on Android. Surprisingly, the article attracted a lot of attention from readers and received a lot of feedback.

I analyzed the feedback and pointed out that there seems to be a misunderstanding about why JetBrains invented and promoted Kotlin. Many developers focus on the technical side and forget that JetBrains would not have invested such huge resources in Kotlin without a clear business model. No problem. That’s what I wrote.

Next I’d like to share some of the reasons I think Google will adopt Kotlin, but I’ve been stuck for months.

At first I thought That Google adopted Kotlin because of their ongoing legal dispute with Oracle over the use of Java on Android. I think Kotlin can help Google get out of this dispute. However, after studying oracle’s lawsuit against Google in detail, I think I was wrong.

An even scarier hypothesis gradually developed in my mind – Google adopted Kotlin and hurt us to better fight Oracle’s lawsuit.

I’m going to share with you this terrifying theory.

Keep in mind that this is the third article in my series. It builds on the content of my first article, which explained why Google adopted Kotlin, and my second, which summarized Oracle’s lawsuit against Google. I’m assuming you’ve read the first two articles in this series.

Google negotiated Java license with Oracle:

One surprising and intriguing piece of evidence in Oracle’s case against Google is an email sent by software engineer Tim Lindholm to Andy Rubin, the “father of Android” :

Let me explain what’s going on here:

That said, Google believes that removing Java apis from Android is hardly a threat to Safra Katz. But we thought there was value in coming up with alternatives to the Java API in the negotiations so that we could get better terms and better prices for using the Java API. Obj-c, in our view, offers a credible alternative. What we want to know is why you hate this idea, whatever you think we missed in understanding it.

Two people are mentioned here: Google senior executive Alan Eustace and Oracle senior executive Safra Katz. The email was dated about six months after Oracle bought Sun and about two months before Oracle sued Google.

In my comments on Oracle’s lawsuit against Google, I mentioned that Google must have known that the Java API was copyrighted and licensed by Sun. It turns out they also had talks with Oracle after Sun was acquired.

Notice how Google threatened Oracle to remove the Java API from Android. They have no intention of actually doing so, but they think the threat will get them better terms and prices for Java usage licenses. Now keep this strategy in mind.

The most striking part of the email:

What [Larry and Scherger] actually asked us to do was investigate technical alternatives to the Java language in Android and Chrome. We’ve done a few of them and think they’re all terrible.

In explaining why Google adopted Kotlin, I described a virtual conversation between a middle manager at Google and a senior executive about whether to adopt Kotlin. I use it to tell you that the idea that Google adopted Kotlin because it was “better” or “the developer community asked them to do it” is ridiculous. I also suggested that Kotlin’s adoption would probably require the approval of Google’s senior management, or even the board.

Now you know, Google founders Larry Page and Sergey Brin were directly involved with the Java language in Android even before Oracle sued Google. Today, when Google is in the middle of a multi-billion dollar lawsuit, I don’t think anyone at Google would discuss Kotlin as a “simpler programming language.”

We came to the conclusion that we needed to negotiate a Java license based on our needs.

But, but, but…… Google has been saying for years that the Java API is not copyrighted. Greedy Oracle, they say, has no reason to Sue them! So why did they conclude that they needed to negotiate a license for Java? Did Google rush to donate hundreds of millions of dollars to Oracle, or did they lie to us and the courts?

Google had argued in the lawsuit that it believed copyright in the API would “end the software industry as we know it today.” As it turns out, apis had a copyright concept long before Oracle sued Google, and the software industry is still alive because of it.

OpenJDK:

OpenJDK was three years old when Tim Lindholm wrote the above E-mail. Google could integrate this open source Java API implementation into Android. However, top Google executives found alternatives to Java and tried to manipulate Oracle executives into giving them discounts. This email doesn’t even mention OpenJDK as an option.

Why didn’t Google just use Oracle’s open source OpenJDK for free instead of negotiating a license to use the Java API?

OpenJDK is licensed under GPL + Classpath Exception, while Android is primarily licensed under Apache. Integrating OpenJDK into Android doesn’t help Google, and Google executives are well aware of that, so it didn’t even come up as an option in this discussion.

However, about six years later, OpenJDK was introduced to Android with the release of Android Nougat. What made Google change its mind?

Neither OpenJDK nor Android license will change, so OpenJDK is not a secure option for Google. At that point, Google was running out of ways to convince the U.S. Court of Appeals for the Federal Circuit that the Java API was not copyrightable. The Supreme Court rejected Google’s request to hear the case. The risks associated with OpenJDK were no longer as great, so Google decided to integrate it.

But don’t get me wrong – Google still has a lot at stake with OpenJDK in Android.

First, Oracle could petition the court to ban OpenJDK for systems after Android Nougat, and oracle would surely win and get an injunction. Even if Google is able to convince the court that a separate trial is needed to determine damages for infringements of Android after the Nougat version, Oracle is likely not to back down.

While Google has a chance to get rid of OpenJDK in Android, it can’t hope to win a multi-billion dollar lawsuit and control Android’s future on that basis alone.

So, Google went after Kotlin.

How Kotlin can help Google:

Remember the strategy Google used to negotiate the Java license with Oracle in 2010? They are trying to prove that they can migrate Android to other technologies, hoping oracle will give them a discount. Today, we know it doesn’t work as well as expected.

One theory I have is that Google wants to use Kotlin as a publicity stunt to prove they are serious this time. That way, if Google decides to settle with Oracle, it could be a good bargaining chip in settlement negotiations, maybe even the only one. Because as far as this lawsuit is concerned, Google seems to be on the losing end.

I personally think this explanation is highly unlikely. Oracle has made it clear that they want a fair share of Android, but everything Google has ever done with Android suggests they won’t let anyone in. It looks like Oracle and Google are too far apart to be a viable solution option.

Even if Kotlin is only a bargaining chip, Google still needs to prove they can migrate Android from Java to Kotlin.

Unless…

In theory, Google could re-implement the Kotlin API to eliminate Android’s dependency on the Java API. If the Java API is no longer used, Google will be able to remove the OpenJDK from Android.

Will Android drop support for Java applications after removing OpenJDK? I don’t think so.

Facebook, for example, probably already has a million lines of Java code in its code base. Moving such a large project to Kotlin will be a very difficult and long-term project that will cost millions of dollars. I don’t see Facebook getting there in the foreseeable future. Google is unlikely to give up support for other applications such as Facebook, so it has no choice but to continue using Java to support Java applications.

After removing OpenJDK, Andorid can solve the problem of missing Java apis by compiling Java to Kotlin before compiling, or directly to code that uses the Kotlin API. This is not difficult to achieve.

So, Google adopted Kotlin to remove the controversial Java API from the Android platform.

Google’s doomsday scenario:

As FAR as I know, if Oracle wins, in theory, they could get share in Android, whether or not it continues to use the Java API.

Oracle said Google violated its copyright and created a competing product that essentially eliminated Java from the mobile market. Even if Google removes the infringing material at this point, the court could still hold Google liable for long-term damage to Oracle’s core business. In that case, Oracle could get Android’s share even if the infringement stops.

This is a doomsday scenario for Google because Oracle will take Android’s share and Google won’t be able to do anything.

Unless… There will be no Android.

Fuchsia:

One of the biggest mysteries surrounding Android is whether Google’s new “secret” operating system, Fuchsia, is actually intended to replace Android.

If Fuchsia does replace Android, the implications for players in the Android ecosystem will be huge, but Google won’t share any information with us. I and many other Android developers have asked official Google representatives about the road map for Android and Fuchsia, but as far as I know, no one has been able to answer the question.

So let me answer the big Android question: What is Fuchsia?

Fuchsia is an insurance policy Google has bought for itself. If Google is ultimately found guilty of infringement and Oracle gets a share of the Android ecosystem or profits, Google will kill Android and migrate to Fuchsia.

However, Fuchsia must satisfy at least three conditions in order to replace Android:

  1. Fuchsia must have enough skilled developers to form a developer ecosystem.
  2. There must be equipment that can actually run Fuchsia.
  3. Fuchsia must support Android applications.

I believe that replacing one of the world’s most popular operating systems will be much more than that. The reason I chose to focus on these three prerequisites is that each of them is mandatory and can take a long time to implement.

So, even if Google decides to kill Off Android in favor of Fuchsia, we still have a couple of years to go, because it’s not going to happen any time soon.

Unless… Google is already trying to meet these conditions today.

Flutter:

Flutter is Google’s new mobile development SDK for Android and iOS. It’s written in a language called Dart, which doesn’t use the Java API underneath.

Steve Yegge (the guy who’s going to steal Google’s Android) once said this in his post:

Google wasn’t going to be outdone by its competitors, and they said, “Oh, really? You can’t compete with us, because we compete with ourselves!” They launched Flutter, saying it was a stack to compete with native Android, but they didn’t quite do it, the Android team just refused to admit it.

This article accurately expresses the absurd environment that Flutter finds itself in. That said, I don’t think Google really competes with itself.

So, let me answer another Android-related question: why did Google launch and promote Flutter?

It’s no secret that Flutter is also the official SDK for writing Fuchsia apps. If they decide to kill Android in favor of Fuchsia one day, it makes sense to give Android developers a preview of application development on Fuchsia, given Google’s need to build an ecosystem of skilled developers.

Project Treble:

The official documentation for Google’s Project Treble begins with this:

The Android 8.0 release includes Project Treble, a major re-architect of the Android OS framework designed to make it easier, faster, and less costly for manufacturers to update devices to a new version of Android. Treble is for all new devices launching with Android 8.0 and beyond (the new architecture is already running on the Developer Preview for Pixel phones).

As a result, Google has devoted considerable resources to reducing the cost to device makers of upgrading their devices to new versions of Android. Wow, Google is really good to these Oems.

You already know what’s gonna happen, don’t you?

In fact, I can explain to you how Google takes every opportunity to help oems. I can tell you that oems stopping releasing updates for older devices has nothing to do with Treble. I can even tell you that Treble isn’t really involved in all of this.

Back to Fuchsia.

The Android ecosystem is plagued by fragmentation. I’m not talking here about the fragmentation of Android development caused by Flutter. I’m talking about the fragmentation that affects the Android system itself and the hardware that runs it.

Each device manufacturer has a share of the Android market, and they can make changes to Android to suit their needs. For example, device makers could add proprietary code to Android to make images taken by their cameras super sharp. If the underlying hardware exposes special features, it also needs to be taken into account in a particular Android system.

All of these problems are due to incompatibilities between different versions of Android caused by these changes. Samsung phones won’t be able to run Pixel’s Android version or vice versa. This makes it impossible to switch between different versions of Android on the same device, let alone entirely different operating systems.

If Google releases Fuchsia at this point, there will be no devices left to run it. Fuchsia could take months or even years to get properly supported by hardware manufacturers.

Therefore, replacing an existing operating system with another operating system is a very difficult task.

Fortunately, Google’s fundamental theorem of software engineering is described like this:

We can solve any problem by introducing an extra level of indirection.

It’s unclear what this “indirection” has to do with Project Treble.

Therefore, Project Treble is not about helping hardware manufacturers or caring about Android users. It’s all about making sure hardware manufacturers standardize their platforms and get them ready for Fuchsia. I don’t know if Google plans to bring Fuchsia to devices running Android. However, they clearly want mobile devices to support Fuchsia at startup.

I think it’s safe to say that the vast majority of devices manufactured today already support Fuchsia.

At this point, you might be tempted to point out the technical differences between Android and Fuchsia. These operating systems are indeed based on different technology stacks. However, I can assure you that Google has billions of reasons to make Fuchsia compatible with Android devices.

Therefore, the second prerequisite mentioned earlier has been met.

Android applications on Fuchsia:

To kill Android, Google needs to make sure Fuchsia supports Android apps. I don’t need to explain this too much.

I planned this section for a bit longer because I needed to explain how Fuchsia supports Android applications. I want to show that it’s not impossible, and Google may already be moving in that direction.

Fortunately, I don’t have to explain any of this anymore. I can show you this tweet from 9 days ago:

To be honest, I haven’t really looked at the submitted code, and I’m not entirely sure it’s entirely relevant to the problem I’m working on. But I don’t think it’s a coincidence.

It seems, then, that the first and third prerequisites mentioned earlier have also been met.

When Google will kill Android:

There’s a lot of noise in the Android community playing down Kotlin, Flutter and Fuchsia. I personally believe that this situation is absolutely critical and poses huge personal and business risks for all participants in the Android ecosystem.

In this post, I share with you how I thought about this question: Why did Google adopt Kotlin? What is the roadmap to Java for Android? Then what’s happening on Android?

Now I think the most important question is: When will Google kill Android?

From a technology standpoint, I estimate that Google could replace Android with Fuchsia in a year or two.

But remember, this process is not about technology. It’s not about users, developers, device manufacturers. The only factor in play is Google’s desire to avoid liability for copyright infringement if Oracle wins the case.

So how the courts process this lawsuit is the timeline that will determine Android’s fate.

If the Supreme Court agrees to hear the case and reinstate a federal Circuit decision, Google may even shut down the Fuchsia and Flutter projects, while Android will live on.

Is Oracle that evil:

At this point, you might be tempted to blame Oracle for all this. At least that was my initial reaction, because I thought Oracle was the devil of the software industry.

Then I asked myself: What harm has Oracle done to my career in the past?

It seems not. As an Android developer, I’m not even involved in the Oracle ecosystem.

But why do I have such an aversion to Oracle Bone Script?

I thought about it and came to the conclusion that I was about to become a victim of Google PR. Over the years, I’ve been hearing about some of the bad things Oracle has done and done, but I’ve never stopped to really think about this idea.

After reading the details of Oracle’s lawsuit against Google, I’m convinced oracle is right. The courts will be the ones to decide whether Google is really guilty, but there is undoubtedly enough evidence to justify Oracle’s actions.

Then I thought about what the Android ecosystem would have looked like if Google had licensed the Java Api from Sun in 2005 or 2006 or 2010. What harm does it do to us developers, device manufacturers and, most importantly, Android users? I can’t think of anything.

However, I do see that Google’s decision deprives us all of many potential benefits. Imagine that Sun or Oracle are part of the Android ecosystem.

Then we wouldn’t have to wait years to support Java 8 on Android. We will be part of the larger Java ecosystem and will reap all the benefits associated with it. In fact, we will be the largest group of Java developers and can influence the evolution of the entire Java ecosystem.

I used to think oracle bone script was evil. Today, I think Android developers, Oems and users are missing out because Google doesn’t see Oracle as a partner, all because of Google’s greed. This is actually a very reasonable request, because if you read the evidence in Oracle vs. Google, you’ll immediately understand that Sun’s Java ecosystem is a major factor in Android’s success.

Conclusion:

In three recent articles, I’ve shared with you some very disturbing theories about the current state and future of Android.

These theories may be wholly or partly wrong.

These thoughts explain everything that’s happened to Android over the past few years and answer today’s toughest questions. That is, a good theory not only explains the past, but also predicts the future.

One prediction has been fulfilled, as it does seem that Google is working hard to get Fuchsia to support Android applications.

Here are my additional predictions:

  1. Kotlin does not use the Java API
  2. OpenJDK will be removed from Android
  3. Compiled Java code will either use Kotlin’s APIs or be directly compiled into native code
  4. Google will continue to promote Flutter
  5. Google may try to use Kotlin in Flutter to further promote Kotlin
  6. Android devices that support Treble will be able to run Fuchsia
  7. Android will be killed

I don’t believe all of the above predictions will come true. However, if you see one of the predictions 1 through 6 come true, notice that it increases the likelihood that prediction 7 will come true.

There may be other developments in the Android ecosystem, and I’ll try to keep an eye on them. At this point, you might be wondering what to do. I don’t know.

As I said, according to this theory, every player in the Android ecosystem faces personal or business risk, depending on the circumstances of your participation.

While I can’t make specific recommendations, I think the following two suggestions might be useful:

  1. Consider your personal risk factors
  2. Take Google’s official announcements with a grain of salt and think critically.

Believe me, I want my whole theory to turn out to be crap.