Ice Universe, one of the best known Samsung leakers in the world, has shared a very peculiar image on its Twitter profile. It is a photo of a landscape that, when configured as a wallpaper, causes Samsung mobiles and even some Google Pixels to fail and they need to be reset from the factory to be able to use them again.
Is it malware? Is it some kind of hack? Rather not. Apparently, the problem resides in the colour space used by the photo and an Android 10 bug. Next, we will explain what is happening with this wallpaper and how it can be solved.
This is not sRGB
In the video above you can see the failure.
By default, Android 10 uses the sRGB colour space (RGB standard, created by HP and Microsoft), so it plays back images that use the sRGB colour space. The problem is that this image that we are dealing with today uses the RGB colour space, and RGB is not the same as sRGB. Without going any further, RGB has more colours than sRGB.
Dylan Roussel, from 9to5Google, explains in a Twitter thread that when we configure the image as the wallpaper, the operating system invokes the “do colour management” function of the “ColorManagementProxy”. Basically, this function is in charge of checking that the device supports its colour space.
What happens when the image is RGB? Normally, the operating system would convert it to sRGB, but Android 10 does not. For this reason, Roussel explains, a Google Pixel 3 XL with Android 10 fails to put the image as the wallpaper. However, the same does not happen in a Google Pixel 4 XL with the Android 11 beta, since this version does convert the colour space.
The Google Skia colour profile plays an important role here. This uses premultiplied colours, that is, colours that have already been multiplied by the alpha channel (the one that defines opacity). However, most graphics file formats assume post-multiplied alphas (a colour value and opacity separate from that colour). So you have to convert correctly between the two formats when reading and writing in these systems. The problem is that Android processes the image without converting it, causing SystemUI to go into a crash loop and the device cannot be used. The solution is to restore the factory or, in some cases, start the device in safe mode, although some users claim that this method does not always work.
Davide Bianco, a developer of Android custom ROMs, explains that “what happens is that the value of the variable” Y “is greater than the limits of the histogram, causing the SystemUI to collapse.” In a histogram the RGB scale of values from 0 to 255 is shown. However, if we take a look at the crashing register we will see that Android tries to give it the value “256”, an impossible value and that it is out of limits.
It is a bug that will surely be replicated in other images that use the same colour profile. How is it solved? At the operating system level little can be done, but at the file level, there is a simple solution: convert the colour profile. Just open an editing program (Affinity Photo, Photoshop or GIMP) and convert the profile to sRGB. Then that image is exported as JPEG or PNG and voila, it can be used without problem.
Ice Universe claims that Samsung already received information about this bug in mid-May and that the problem has been resolved. Most affected users use Samsung mobiles, so it will be a matter of waiting for the relevant update to be released.