As you know, there has recently been a big day for all Sony and Android fans - Google has released the source code for Android 4.3, which means that manufacturers are already busy preparing updates. Software updates are a very important aspect of working on devices and we are constantly working to improve and accelerate this process. We bring to your attention a translation of a short story about how it is organized. Welcome to habrakat!

')
In general, the software update process consists of four stages: development, testing, certification, and approval. At the development stage, we ensure that the software works stably on our devices, as well as we are engaged in the integration of old and new proprietary functions (such as Walkman, STAMINA, etc.). Compared to the development of ICS, this process has become more efficient, primarily due to close cooperation with Google and Qualcomm.
During the testing, certification and approval phases, we must ensure that the software conforms to technology standards and regulatory requirements. This ensures that the product we release is thoroughly checked for proper operation with all the components of our devices.
The process of working on the update - from the source code to the finished update.
Fredrik Extrand, Product Management Program Manager, is responsible for planning updates.The first thing we do at the development stage is to ensure that the Android kernel (boot, kernel and hardware components) works correctly and stably on our devices, this is a necessary condition for further integration.
An important change in the work process is that we now receive certain pre-release data from Google as part of the Platform Development Kit (PDK), which is distributed to developers several weeks before the release of the new version of Android. Thanks to the PDK, we can begin work on updates much earlier, since we know which parts of the HAL we have to update.
PDK is a set of files that allow device and chipset manufacturers to port their drivers, develop, test and optimize their own Android builds. PDK includes a set of interfaces for the Android HAL, source codes for integration platforms, a binary image of the system, as well as all the necessary documentation.
The illustration shows how the software update process has been improved with PDK and AOSP.“By accessing the PDK, we can start developing much earlier. Thanks to AOSP, we can start working on updates as soon as the source code for the new version of Android is available. Please note that this image is for illustrative purposes and does not reflect actual timelines. ” - Says Fredrik.
Another important part of the design phase is the configuration of the HAL components. The difficulty lies in the fact that we use a variety of different chips, cameras, sensors, displays, etc. Of course, not all of them correspond to the reference design and must be re-integrated with the new software - this work lies entirely with us. An important part is the sensor HAL, we developed a dynamic sensor HAL called DASH, the source code of which is already hosted on
GitHub . All changes we will make to DASH will also be published on GitHub, including the configuration files for the sensors.

When the main work on the Android kernel and HAL is finished and the result is fairly stable, it is the turn of work on the main functions, such as phone calls, messaging and Internet connection. At this stage, we usually start “dogfooding” - the internal distribution of new software among users who are not directly involved in the development process. At this stage, the release is already stable enough for everyday use, although some functions are not yet in place and various errors can occur. This provides us with a lot of useful feedback and allows you to detect and correct various defects at the very early stage.
“In software development, there is a rule of thumb that says that if a program is stable enough to be demonstrated, then 90% of the work is still to come. While working on ICS, we reached this stage within two weeks - the build was good enough for normal use, not counting minor crashes, but at the same time, there was still a lot of routine work ahead of integrating various proprietary functions and finding bugs in all the corners of the operating system ”- says Frederick Extrand
Another task at this stage is to integrate a number of proprietary software fixes and improvements that distinguish our version from the basic “Android”. To avoid code fragmentation, most of these patches are sent to the Android Open Source Project and, in the future, will be included in the code of new releases. Also, at this stage, we integrate our own graphical components, user interface, a number of proprietary APIs, and also ensure the correct operation of devices with different operators in different regions.
“- The fact that we now have AOSP makes our work on fixes and improvements easier, and in the long run means that we will have to make significantly fewer patches to integrate into each new version of Android.”Already at this stage, ongoing testing. First of all, we focus on checking for new changes and improvements, then we need to make sure that our earlier development, as well as components developed by Google, also work at the proper level.
As mentioned earlier, we add a number of own functions that distinguish our version of Android from the basic one. These include the new lock screen, desktop, phonebook, Walkman player, video player, photo album, messaging app, settings screen, text input, calendar, email client, localization, and various user interface components. Since we already have a working version of Android 4.3 on our devices, developers can start testing our own components directly on AOSP.
When all the developments are combined together, we begin to purposefully test the software for stability. In addition to pure “laboratory” tests, and dogfooding, we rely on a number of users inside and outside the company. Along with a clean stability check, we run power consumption tests. After the product is stable and fully tested, the time for certification comes (however, if any component is ready before others, for example, at the first stage, it is sent for certification before others). We need to make sure that the hardware and software complies with the standards of Bluetooth, Wi-Fi and others. All this is necessary conditions for the use of these technologies in our products and, of course, is done to ensure its maximum quality. Also, at this stage, we solve various legal issues, such as those related to intellectual property. If possible, we try to obtain global certificates, however, in some cases, special local certification is required, in total, we must obtain special certificates in 80 countries, for this we either conduct our own testing and provide evidence that their products have passed, or provide them these are external testers. Many users complained about delays in the release of ICS updates and cursed sluggish developers, in which they were wrong - the development phase was completed on time, and the delay occurred at the certification and approval stage.
When all the certificates and permits have been received, we are finally ready to officially release the update and start its distribution worldwide. Of course, we are aware that large companies are not flexible and fast enough, sometimes we have to allocate efforts and resources between several projects, which also brings additional difficulties, but we are constantly working to optimize and speed up this process and try to make each new version went out as quickly as possible and was as high as possible.
“It is obvious that everyone is interested in how quickly the update will be ready, I can’t say for sure right now, since we have just started work, but I can confidently say that now we have everything necessary to do this work as soon as possible”Of course, this is a somewhat simplified description of the process of working on updates, but we hope that it gave you the necessary insight into the innovations and improvements.
You can see the original post
here .