DDAY.it DDAY.it We tried HarmonyOS. No, it's not the Android copy

Time: 04/Dec By: kenglenn 349 Views

TweetsDDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

Huawei has finally announced HarmonyOS 2.0. At the moment the update for smartphones will only be available for China, a question we believe linked more to certifications than anything else. Also because, on tablets and smartwatches, HarmonyOS will arrive in Europe in the coming weeks with the Watch 3 and the MatePad Pro.

A lot has been said and talked about HarmonyOS, also because when Richard Yu presented it in the now distant 2019 it was described as a totally revolutionary solution based on a microkernel.DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

That, however, was only a piece of HarmonyOS, a part of a much more complex story that has evolved over the last few years. Last week Huawei presented HarmonyOS as a single system for all devices, and brought Apple as an example not to follow, which instead has an operating system dedicated to each device.

The example was not too happy, let's face it, because if it is true that Apple's system has different names depending on the devices, in the end the heart of tvOS, iOS, iPadOS, WatchOS and now also of macOS is practically the same. Only the name changes. On the contrary, with HarmonyOS, the name is the same, but if we look under the surface we find different kernels, depending on the devices used, and different ways to develop.DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

The HarmonyOS SDK is finally available, and also the IDE, or the application environment that servers to write code, sign it, compile it and test it, on a device or on an emulator, has been released. Initially, the process was enormous to try it, you even had to send your passport to Huawei and it was used on virtual machines, but now you can download, install and try it in Europe too.

We did, and we also looked inside the SDK to understand how Huawei worked. The first thing to say is that Huawei has taken the path that any developer would take: they have not reinvented the wheel. The same development software, the DEV Eco Studio, is nothing more than a fork of the open source version of the well-known IntelliJ IDEA by Jetbrains in the Community Edition version.DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

Libraries used today, as well as IDEs, kernels and everything that revolves around a product are the result of years of work, with millions of lines of code written and modified to which developers from all over the world have contributed world. It is evident that Huawei did not have years of time, and it made no sense to try to write libraries and software that already exist, are available on the net and are accessible to all as they are open.

The second thing concerns the question everyone is asking, which is whether in the end HarmonyOS is a version of Android to which Huawei has simply changed the name.DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

Here the answer is much more complex, because today Harmony relies on different kernels. Like LiteOS, for wearable devices and TV Vision or Linux, for tablets and smartphones. Over the years, Huawei had done a huge job on the open source version of Android: even when it used Google services and its EMUI was sold as a customization of Android, it was still an interface that it had profoundly changed, not only in the graphical interface but also low level. To make HarmonyOS he took the base he has used over the years and cleaned it up, modifying it for his own use. It can be done, it's open source.

This means that Huawei has modified the kernel keeping only the modules it needed and the drivers for its devices, added all its part of services and also added its user interface. It didn't upset everything, it wouldn't have made sense: it had to maintain compatibility with all the apps that already exist today.DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

The structure of Harmony for smartphones therefore follows that of Android, and in fact both the apps and the tools included in Android such as the Debug Tools work: ADB, for example, also works on Harmony and so do the tools you need to add Google Play Services also work on Harmony and allow you to install Google services, obviously abusively, on smartphones and tablets with Harmony.

Trivializing, you can look at the block structure of a system like Android. The kernel has been modified, it is still Linux but only adopts the drivers for Huawei devices. The libraries are all open source, they are certainly not Google libraries: the Media Framework, SSL, SQLite are all projects that Google has used for Android but they are the result of the work of many developers over the years. The application framework is from Huawei, as are all the applications. Of "Android", in the smartphone and tablet version of HarmonyOS, only the runtime remains, which ensures backwards compatibility.DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

In HarmonyOS there is a lot of Android Opensource but there is also a lot of Huawei: all the SDK part, the new ARK compiler, the APIs and all the documentation that Huawei now provides to develop applications are not those of Google, they are all the result of an inspired but original work.

Huawei could obviously have rethought everything from scratch, but it would have been a huge job that would have taken years. Just look at how long Google is taking with Fuchsia, and Google is certainly not the latest to write software.DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

What changes, in the end, is not so much why the applications run but how they run, what can be done and if actually using HarmonyOS there are more possibilities than you would have with Android and Google. The answer in this case is yes, because if you develop an application for Harmony smartphones, using the new native libraries, the development tool and all Huawei services, what you get is an application that works exclusively on Huawei devices with Harmony e which has a number of features that Google and Android still don't have because Google hasn't introduced them. We are referring, for example, to all the seamless connection logic between devices with Harmony OS that Huawei has repeatedly mentioned and taken as an example.

The same considerations also apply to smartwatches and other devices: in this case the kernel is not Linux but remains the same kernel that was used up to now on wearables, LiteOS. We downloaded the SDK and tried to develop an application for HarmonyOS intended for smartwatches, therefore a type of application that is defined as "lite".DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

Huawei today allows you to create two types of applications, normal and lite, and the latter is the one that uses the LiteOS kernel.

Starting yesterday, June 4, 2021, Huawei has finally uploaded all the documentation necessary to in fact develop applications using its SDKs. All the APIs are documented in English, there are guides, tutorials, there is everything needed: anyone with knowledge of Javascript, which together with Java is the necessary language to develop apps dedicated to Huawei devices with HarmonyOS, can do it.DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

In our case we chose Javascript for an empty project intended for the Watch, and we tried to play a bit with the elements of the design and the language itself.

There is a file that defines the templates in HML, Harmony Markup Language, a style file (classic CSS) and a js file for the app code, with its life-cycle. If we look at the folder containing the SDKs we realize that the one used by Huawei and offered to developers is a sort of Javascript framework along the lines of Vue Native or Nativescript, all written by Huawei for which it is possible to look at the sources. We haven't looked at everything, but Huawei seems to have done a good job.DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

These applications are then compiled and packaged, and can be installed on devices or tested in the simulator. If you use "native" APIs, these apps only work on Huawei devices. By changing the language of the App Gallery on a Huawei device, and putting it in the "Chinese" version, it is possible to see, for some apps, the double version: the classic one that runs on all Android devices, created using Google's development tools and the "HarmonyOS" one, which only runs on Harmony devices because it was written by Chinese developers using new tools provided by Huawei.

It cannot be said that Huawei has copied Android, even if without Android HarmonyOS would not have existed, at least in the version for smartphones and tablets. In recent days Huawei has denied, probably out of pride, that HarmonyOS is based on open-source Android but itself, in the list of open projects from which HarmonyOS 2 has taken elements, has included Android in an open-source version citing it more times.DDAY.it DDAY.it We tried HarmonyOS. No, it's not the copy of Android

That's not the only project: there's Apache Weex, there are several compilers, there are hundreds of libraries, and there are also a number of projects that Huawei's Chinese developers have been working on in recent years. Flutter, for example, is the open-source framework created by Google for creating native interfaces for iOS and Android. About 10 months ago a group of developers also added native EMUI components to Flutter, and Huawei took over a piece of that project as well.

Harmony is, like most software today, a puzzle of “forked” opensource projects.

Huawei's commitment to producing all the detailed documentation also in English is commendable: as we wrote for an Android or Javascript developer, it is relatively simple to get familiar with the new system and create a native Harmony application.

Huawei has rightly dropped compatibility with classic apps, and we believe it did so for a simple reason: an open door to the West. When Harmony comes to us, it will be difficult for a Western developer to decide to partially (or totally) rewrite his Android application, also changing the user interface, for an operating system that is currently niche.

On the other hand, it is easier for the same app created for Android, modified, to end up on the App Gallery: in short, what Satispay, the banks and all the other developers who have contributed to the App Gallery in Italy have done.

Furthermore, if the situation linked to Google services were to change, maintaining compatibility in a very short time, all phones with Harmony on board could still have YouTube, Maps, the Playstore and all the apps you need. This without giving up the native Harmony apps, the only ones with access to those APIs that guarantee a series of additional functions if products with Harmony on board are used and connected to each other.

What will change for European users? What the user sees today when using a phone is the interface, and the HarmonyOS interface is the evolution of EMUI. Except for a small "Harmony" writing, at least on tablets and smartphones it will seem to be using the same phone or tablet that you have always used, with no major differences other than those related to the new EMUI.

The real difference, in terms of performance, speed and possibilities, is given by the applications written natively for Harmony with the Huawei SDK: initially, in Europe, only the apps already present on the phone, plus some special cases, will be.

Huawei, right now, is trying to recover share on the internal market where it still has so much influence and can really push many developers to release native versions for Harmony that offer something more than what is offered today by the Android version. Just to give an example, the classic problem of Android's Camera2 APIs, i.e. the inability to use the manufacturer's camera functions in apps like Instagram, is overcome by the native Harmony APIs: every app developed for Harmony it can use all the functions of Huawei cameras, from machine learning to night mode.

Huawei, with Harmony, has basically taken Android from being an open-source project with broad compatibility to something more like iOS, with optimization related to specific hardware and with libraries designed to maximize the dialogue between devices of the same company. To do this he modified a large part of it, but keeping his heart.