When we discuss operating systems, what should we discuss?

On the first working day of 2024, Huawei Device CEO Yu Chengdong mentioned in an internal letter to all employees:

2024 is a critical year for native Hongmeng. We must accelerate the development of various Hongmeng native applications and focus on winning the two most difficult battles of technical base and third-party ecology.

Half a month later, on January 18, Huawei held its first press conference in 2024. The protagonist was HarmonyOS NEXT – this system, nicknamed "pure-blooded Harmony", from the OS kernel to AI The large models are independently developed by Huawei, with a total of more than 120 million lines of code, and have become a truly mature system.

If the sudden release of the Huawei Mate 60 series last year was a blitz, then the construction of the Hongmeng system was a long march.

In 2015, Huawei's mobile phone sales had just exceeded the 100 million mark, and its market share was rising rapidly. The future "crisis" had not yet arrived, but the development of Hongmeng system had already been put on the agenda; four years later, in 2019, we For the first time at HDC, we got a glimpse of the Hongmeng system, and the design of the distributed microkernel was deeply rooted in the hearts of the people; after another four years, the Hongmeng Galaxy version finally showed the whole system to the outside world, and also ushered in a key battle for Hongmeng. .

Being prepared for danger in times of peace, Huawei never fights an unprepared battle.

100 million lines of code, from replacement to transcendence

Smartphones have developed for seventeen years since the iPhone was released in 2007, and the kernels of the two major systems, iOS and Android, are older than the history of mobile phone development – the Linux kernel was born in 1991, and the XNU kernel was born in 1996. It is a product of the development of the PC era almost thirty years ago.

If the operating system is compared to an airplane, the kernel is like an engine, an important component that drives the interaction between hardware and applications. Using the same metaphor of human flight history, the current time point is roughly equivalent to the 1930s and 1940s.

At that time, aircraft had been developed for decades, but the power source was always inseparable from the two cores of propellers and reciprocating engines. All designs were incremental improvements based on this, just like Android and 2024. iOS is still built on the Linux and XNU kernels from the end of the last century.

▲The earliest jet aircraft He 178

However, the development of the times will always drive technical routes to diverge. The development of technology does not entirely follow a gradual development process, and explosive breakthroughs are more likely to occur. By the 1930s, inventors Hans von Ohain and Frank Whittle respectively thought of new technologies that abandoned propellers and reciprocating engines, and designed jet engines from scratch.

The uneven skies during World War II gave these engine technology lines the opportunity to compete head-on, and jet engines with better performance quickly proved themselves and became the mainstream power source for today's spacecraft.

The evolution of aircraft engines is similar to the development of operating systems.

Thirty years ago, the amount of information a person faced and processed every day may not be the same as it is now thirty years later. A large amount of information in the virtual world has flowed from the desktop to every corner of your life – mobile phones, watches, glasses, headphones, PCs, tablets, TVs, smart homes, smart cars, etc., and information must adapt to different forms and scenarios. Even the needs of different numbers of people.

Can these programs, which originated in the personal computer era decades ago, really follow the current trend of smart device development?

This is why Hongmeng Galaxy Edition deserves attention.

The new Hongmeng system has implemented full-stack self-research, with a total code count of an astonishing 120 million lines.

From the "root" of the OS kernel and file system to the "branches" of the cloud and AI models, every technical framework is re-created on a blank canvas, independent of all other existing projects. Such a level of system reconstruction and integration , nothing less than reinventing the aircraft engine.

The biggest benefit brought by rebuilding the underlying system is that Hongmeng Galaxy Edition has more new features in architectural design and technical details that adapt to the development of the times.

Only after the great defeat can there be great establishment. Compared with the Linux kernel used by Android, Hongmeng adopts a microkernel architecture, which has three major characteristics: inherent smoothness, ultimate energy efficiency, and pure security.

An example was given at the press conference: If the task scheduling of the Linux kernel is to put cars of different sizes and speeds in the same mixed lane, then the Hongmeng kernel automatically distinguishes between fast lanes, slow lanes and lanes based on user scenarios and system load. Overtaking lanes, efficient scheduling combined with minimalist component communication methods, lightweight concurrency models and new memory mechanisms, no matter how new the device is, it can still achieve inherently high smoothness and low energy consumption.

Security is also a top priority. Android users have been suffering from 0day vulnerabilities and frequently updated kernel security patches for a long time. Accordingly, Hongmeng kernel has chosen a root-free design from the beginning. Kernel services are isolated from each other, and the security verification module is also guaranteed from a mathematical perspective.

This has allowed Hongmeng core to obtain a series of the industry's highest level security certifications, such as CC EAL6+, ASIL-D and IEC 61508. Previously, no complex architecture like the system kernel could pass the rigorous test of CC EAL6+.

Talking back to the engine, the "sudden" change in the technical route was actually relative to the entire history. For people living at the time, the process of this change was actually quite long.

It took 11 years between Whitney's application for a jet engine patent and the launch of the aircraft he designed. It also took nearly ten years for Huawei's Hongmeng Galaxy Edition to be fully reconstructed from the project establishment to the bottom layer of the system. The accumulation of these ten years has made Huawei's Hongmeng ecosystem more solid.

Only by moving steadily can we go far. During this period, Hongmeng worked steadily, gradually overcoming technical difficulties almost from scratch, and summarized them into massive development documents and development tools. Until all these "supporting facilities" are developed, Hongmeng Galaxy Edition will be officially unveiled to developers.

For example, the self-developed development language ArkTS is still essentially compatible with the TypeScript language, and developers can invest in the development of the Hongmeng project without re-learning. But it also introduces many new features, allowing developers to program in a simpler and natural way, improving development efficiency by an average of 30%. The existence of the Bisheng compiler allows the execution performance to be improved by 10% without changing a single line of code.

With these handy tools, developers can actively embrace the new ecosystem, and only then can Hongmeng claim to have achieved "from substitution to transcendence."

Built for 800 million devices, the world’s first full-scenario system

At the press conference, Ai Faner saw the first batch of device demonstrations equipped with Hongmeng Galaxy Edition. Her feeling of use can be summed up in four words:

Smart, refined, safe and smart.

The so-called "smart" refers to the fact that the native Hongmeng realizes "component decoupling", that is, the display, sound and communication modules are separated. Developers can combine these modules according to their needs like fonts in movable type printing. up and applied on different devices.

Developers no longer need to work hard to adapt the software to the hardware, but can "scenario first", first think about what functions are needed for specific devices and scenarios, and then introduce the corresponding modules without any burden.

As consumers, what is easier to realize should be visual "exquisiteness".

Compared with the current Hongmeng 4, Hongmeng Galaxy Edition has achieved underlying reconstruction in visual language. Microsoft and Google have tried to implement the Mica and Material Design design languages ​​respectively, but because the design specifications stay at the application layer, developers may not be willing to choose. The end result is like a glamorous city mixed with many ancient "urban villages" .

On the contrary, the visual language of Hongmeng Galaxy Edition is native and global. Applications made using Hongmeng development tools naturally adapt to this set of design languages. The native light effect, as the design DNA of the Hongmeng system, runs through every corner, giving the system a sense of breathing and vitality like the sun rising over the sea.

There are many manufacturers that attach great importance to animation, but this is the only one that elevates light effects and light fields to the core position of dynamic effects, and uses light and dark changes to express vitality.

In terms of security and privacy protection, which consumers pay more and more attention to, Hongmeng has also added a lot of ingenuity.

You can compare the relationship between the user and the application to that of a sender and a courier. When the user plans to change their avatar, it is equivalent to entrusting a picture file to the "courier" for delivery.

The problem is that the previous permission management mechanism was quite extensive. On every occasion like this, the "courier" will ask the user for the keys to the entire house (access rights to the camera, gallery, location, etc.), and the user can only choose to agree or refuse. Once the key is given to the person, there is nothing to stop the courier from entering the house and rummaging around for irrelevant data.

Hongmeng refines privacy management from the bottom of the system to every file, which is equivalent to setting up a "express locker" at the door of the home. Users put the pictures they want to use as avatars in it, and the couriers come to pick them up. During the entire process, the other party will not be able to access files outside the allowed range, thereby better protecting personal privacy and security.

Hongmeng has also placed AI intelligence capabilities at the system layer. Standard interfaces mean that developers of Hongmeng native applications can easily call the system's own AI capabilities.

Assuming that the Aifaner app develops a Hongmeng version, our technical colleagues do not need to spend time reinventing the wheel. By adding a line of code, they can call system controls to implement the AI ​​reading function of articles and turn images and text into audio. Even better, the natural and senseless cross-end interaction of the Hongmeng system means that you can hear half of it on your mobile phone, open the car door, and sit in the car. The car system will automatically relay on and continue playing, and a graphic content will be changed at almost zero cost. It became a podcast.

According to the roadmap, Hongmeng Galaxy Edition will not be launched as a commercial version for all consumers until the fourth quarter of this year, but the capabilities demonstrated by the current developer preview version alone make the months at the end of the year particularly worth looking forward to.

7 billion yuan in developer incentives, but there are more opportunities for Hongmeng

At last year’s Huawei Developer Conference, Gong Ti, President of Huawei Terminal BG Software Department, once said:

After four major version iterations, Hongmeng has built a differentiated user experience. The next most important task is to build a prosperous Hongmeng application ecosystem. This is a great undertaking that requires the participation of all developers.

The galaxy is about to turn around and a thousand sails are dancing. Whether the Hongmeng Galaxy Edition can run or not, what really plays a decisive role is the developers and ecological partners.

The fate of systems such as Bada and Tizen in the past revealed that an operating system without application support is like water without a source but a tree without roots. Building base technology can take ten years to sharpen a sword, but building an ecosystem must be achieved in one go.

Here, rhythm is key. There are network externalities between applications. The more users there are, the higher the benefits each user will get. Only when enough and good enough applications are stationed in a short period of time can a collaborative ecosystem be formed between them. If the pace slows down, manufacturers and developers will fall into wait-and-see mode, causing the system to fall into a slow death trajectory. For Hongmeng, this is the most critical battle.

Fortunately, Huawei has many like-minded people.

In August last year, the number of Hongmeng ecological devices just exceeded 700 million; just five months later, this number had reached 800 million. Also within these five months, Huawei has completed the first phase of the Hongmeng native ecosystem, and has reached the first batch of 200+ Hongmeng native application development intentions, including Sina Weibo, Xiaohongshu, Bilibili and other "national application".

In terms of developer ecological cultivation, there are currently more than 300 universities cultivating Hongmeng ecological construction talents, and more than 150 industry-university cooperation projects have been launched. Huawei also works with relevant companies, universities, institutions, etc. to train more than 100,000 Hongmeng developers every month. Perhaps this is why Yu Chengdong confidently shouted at the press conference: A true operating system is one that has a base and an ecosystem. Underneath the ever-growing ecosystem are the vibrant young forces who, as Huawei's partners, are moving forward together.

Of course, in absolute terms, the number 200 is still too small, and the native application ecosystem needs to add fire. Huawei's goal in the second phase is to cover 5,000 head apps by the middle of this year, and then 500,000. Ultimately, it will go from China to the world.

The goal is long and arduous, and resources must be invested to achieve this plan.

For example, for the first batch of manufacturers to adapt to Hongmeng, Huawei will provide technical support and traffic tilt, including channel promotion and app store rankings, etc. In the Hongmeng Galaxy version’s app store, a “Harmony Pioneer” section has been specially designated to guide traffic for the first batch of native applications.

Later developers also have opportunities.

The Hongmeng Ecosystem Global Incentive Project "Shining Star Plan" launched in 2017 has been upgraded this month. Huawei has invested 7 billion yuan in resources to encourage innovation in Hongmeng native applications, meta-services, SDK and other fields. The developer's official website also provides on-shelf distribution, Assistance with operational growth and commercial monetization.

Thousands of sails are raised, and thousands of boats are deployed. The opening of new routes will always attract adventurers to join, and the same will be true for Hongmeng in the future. What's more, the cost of this "adventure" is quite low – the self-developed SDK has greatly reduced the development volume of existing applications transferred to the Hongmeng native ecosystem. Taking Agricultural Bank of China Mobile Banking as an example, the entire code volume of the Hongmeng native version has been reduced by 20%. 95% of the existing assets can be reused, and it only took 26 days to complete the development and quickly go online. At the same time, based on the underlying security features of Hongmeng kernel, the security capabilities of online banking are also guaranteed.

On the other hand, for manufacturers and developers, the characteristics of Hongmeng’s native ecosystem also give them an opportunity to re-examine application forms. The new architecture provides a broader imagination for applications.

For example, the Hongmeng native version of Xiaohongshu supports multi-device collaboration. Screens of different sizes can adapt to content with different layout styles. Editing can also be completed on the computer and previewed immediately on the mobile phone. This is very common in other systems. Difficult to do.

By 2024, when everyone thinks that mobile phone innovation is coming to an end, Hongmeng Galaxy Edition provides more possibilities. It is a rare and valuable opportunity that is worth exploring.

Building an operating system from scratch is a difficult and correct thing to do. To summarize it in just five words, "Ten years of sharpening a sword," is obviously a bit thin. It’s better to look at a few sets of data to get a stronger sense:

  • Spanning 10 years, this project has only just entered its second phase;
  • After running for 1624 days, I finally knocked on the door of more than 200 applications;
  • From TOP 200 to TOP 5000 to 500,000 applications;
  • From 100 million devices to 800 million devices to billions of devices;

Building an operating system from scratch is a difficult but correct thing for Chinese companies; it is a long march that Huawei alone cannot win, and this is never just a long march for Huawei.

Smartphones and mobile Internet have been booming for more than ten years, and more than 20 million developers have been trained in China. However, due to complicated fate, there is still no independent software ecosystem in China.

The tide of the times is coming, and on the eve of industrial upgrading and technological revolution, tens of millions of Chinese developers also have ardent expectations. Huawei Hongmeng is a big river in the new era, and this time it is helmed by Chinese developers.

When hundreds of boats compete, the one who advances first will win; when thousands of sails compete, the one who advances bravely will win.

*This article was jointly written by Xiao Qinpeng and Peng Haixing

# Welcome to follow the official WeChat public account of aifaner: aifaner (WeChat ID: ifanr). More exciting content will be provided to you as soon as possible.

Ai Faner | Original link · View comments · Sina Weibo