Top Ad unit 728 × 90

[Update: New Explanation, Google Response] This wallpaper triggers a rare bug causing Android devices to bootloop

Update 1 (06/04/2020 @ 03:12 AM ET): Explanations have emerged on the cursed wallpaper bug, alongside a response from Google. Scroll to the bottom for more information. The article as published on June 1, 2020, is preserved below.

Imagine you’re scouring the internet for cool wallpapers and you come across a picturesque landscape. It has everything; a lush green forest, a pristine lake with a tiny island, snow-capped mountains in the background, and a thick cloud cover with sunlight seeping in through the gaps. You immediately download the image, set it as your phone’s wallpaper, and boom! Your Android phone gets stuck in a bootloop. Sounds unlikely, doesn’t it? Well, it’s true for this particular wallpaper.

The wallpaper was recently shared on Twitter by renowned Samsung leakster Ice Universe, who claimed that the wallpaper “will cause your phone to crash!” Despite their warning, several users downloaded the wallpaper to check if it actually did do anything on their phone and they were met with the following results:

According to Davide Bianco, lead developer of the AOSP-based custom ROM “POSP”, this particular wallpaper causes some Android devices to crash as it makes use of the RGB color space, instead of the sRGB color space that is supported natively on Android. Bianco has submitted a patch to AOSP that reportedly fixes the issue and the description of the patch states that “The issue occurs when the user tries to set as wallpaper an image that is not sRGB. What happens is that variable y value is higher than the histogram bounds, making SysUI crash. One possible fix is to limit y value to be always less than 256.” Along with Bianco, two developers, XDA Senior Member BadDaemon and XDA Recognized Developer luca020400, from the popular LineageOS custom ROM team have also come up with a unique solution to the problem. You can check out the patch descriptions over on the LineageOS Gerrit by following this link and this link.

We strongly recommend against using this image as your wallpaper under any circumstances. In case you have already used it and your device is stuck in a bootloop, please check the instructions below on how you may be able to recover your device.

A report from 9to5Google on the matter further reveals that the issue is limited to devices running Android 10 or older and it doesn’t affect devices running the Android 11 Developer Preview. This is due to the fact that on Android 11, the system converts the color space if it’s not supported, but on Android 10 it does not. Which means that this isn’t an issue with this particular image and could be caused by other images using the RGB color space.

Do note that while the issue doesn’t affect all Android devices, we strongly recommend against trying the wallpaper on your phone. In case you try it anyway, you might be able to recover your device by either resetting it completely or by entering safe mode and changing the wallpaper. But since some users over on Twitter weren’t able to recover their devices using the aforementioned methods, it would be best if you don’t use the exact image as your wallpaper. If you really like the wallpaper, just take a screenshot of the image and use that as your wallpaper instead.


Update: Explanation and Response from Google

Expanding on the causes of the bug as explained by XDA Senior Member BadDaemon and XDA Recognized Developer luca020400, the “cursed” wallpaper is encoded in a special color space which is called “Google/Skia/E3CADAB7BD3DE5E3436874D2A9DEE126” — this is the full name of the color space, and Skia refers to the 2D graphics library made by Google. In contrast, most other wallpaper images are encoded in a color space called “sRGB”.

In Android versions 10 and older, all images are converted to sRGB unless otherwise specified by the developers. There’s a rare bug that can occur when converting the image to sRGB, wherein the code that calculates the “luminance” value of each pixel manages to exceed the maximum limit of 255.

Luminance is calculated using the following formula:

Luminance = .2126f * r + .7152f * g + .0722f * b

Here “r”, “g”, and “b” are red, green, and blue color values represented in an 8-bit value from 0 to 255.

The problem with this calculation is that it always rounds the final value up. The “cursed” wallpaper has the following RGB values: 255, 255, 243, which when plugged into the above equation looks like:

Luminance = .2126 * (255) + .7152 * (255) + .0722 * (243)
Luminance = 256

This value causes SystemUI, and basically the whole OS, to crash because it exceeds the maximum value. It’s a bug that’s so incredibly specific because it involves a combination of a rounding error and color space conversion error.

This bug does not affect Android 11 because the image’s “Skia” color space is not converted to sRGB by default. Thus, this color space conversion error and the rounding error does not occur on Android 11.

However, Romain Guy from the Android Toolkit team at Google believes that the root cause of this issue is only in the way that luminance is calculated and not in any color space conversion issues. Google is conducting its own testing, so we will likely see what they come up with soon.

The post [Update: New Explanation, Google Response] This wallpaper triggers a rare bug causing Android devices to bootloop appeared first on xda-developers.



from xda-developers https://ift.tt/2TY96QH
via IFTTT
[Update: New Explanation, Google Response] This wallpaper triggers a rare bug causing Android devices to bootloop Reviewed by site on 00:25 Rating: 5

Aucun commentaire:

All Rights Reserved by xda android © 2014 - 2015
Powered By Blogger, Designed by Sweetheme

Formulaire de contact

Nom

E-mail *

Message *

Fourni par Blogger.