Wallpaper crash explained: Here’s how a simple image can soft-brick phones

Wallpaper crash explained: Here’s how a simple image can soft-brick phones

How can a easy picture crash an Android cellphone to the purpose that it turns into unusable?

It’s a query that got here out steadily over the previous 24 hours, as information of a “cursed wallpaper” unfold across the net.

The wallpaper crash defined

Here’s a recap: Setting a specific picture as wallpaper can ship some telephones right into a loop of crashes that makes them unusable.

There are a number of options, relying on how onerous the cellphone is hit. Some customers have been capable of change the wallpaper within the brief interval between crashes. Others had success deleting the wallpaper utilizing the restoration instrument TWRP. But typically, the one resolution was to reset the cellphone to manufacturing unit settings, shedding any knowledge that’s not backed up.

The challenge was dropped at gentle by Ice Universe, the Chinese Twitter customers recognized for leaks. Based on person studies, many fashions from Samsung and Google are affected, whereas we’ve additionally seen some studies from customers of OnePlus, Nokia, and Xiaomi gadgets (it’s not clear if these latter gadgets ran inventory software program or customized ROMs). From our personal testing and person studies, Huawei gadgets appear to be much less uncovered to the wallpaper crash challenge.

Never set this image as wallpaper, particularly for Samsung cell phone customers!
It will trigger your cellphone to crash!
Don’t attempt it!
If somebody sends you this image, please ignore it.

— Ice universe (@UniverseIce) May 31, 2020

The challenge impacts up-to-date telephones working Android 10, however because it seems, it’s not really new. Users have been reporting comparable issues for a few years, and simply final month Android Police reported on what seems to be a carefully associated challenge particularly impacting Pixel telephones working the Google Wallpapers app.

Read More:  Google may require Android Go for all new low-memory phones

We requested a developer what’s occurring

It’s a bizarre downside that has the potential to turn into a wider challenge, particularly if trolls become involved. It’s straightforward to check unsavory characters boobytrapping wallpapers and sending them to unsuspecting customers as a “prank.”

So, what’s occurring?

We’ve seen a number of explanations for the difficulty, most of them involving the colour house of the picture, which works past what Android’s SystemUI can deal with and causes a crash.

To get a greater thought of what’s going with this Android wallpaper crash, we reached out to Davide Bianco, an Android developer who leads the POSP customized ROM challenge, who submitted an preliminary patch for the difficulty to the AOSP bug tracker.

Davide graciously defined for Android Authority readers how a picture could cause such issues, cautioning it’s his “private take.” Below is a evenly edited rationalization from him:

The important challenge proper right here is that SystemUI solely handles sRGB pictures for the wallpaper and doesn’t have any test towards non-sRGB wallpapers. This can result in a specific crash within the ImageProcessHelper class, as a variable used to entry an array goes over the array bounds.

For reference, right here is the tactic definition .

This variable is named y, and it’s the sum of the present scanned pixel rgb values. This pixel is obtained from scanning each row and column of the greyscaled image floor. Every time we get a pixel, we assign to y the sum of its rgb values (normally max is 255) and use mentioned variable to entry a component of the histogram array (which measurement is 256 max) and do stuff with mentioned component.

Read More:  LG wants to use transparent OLED displays for ‘invisible’ bedroom TVs

Now, for regular greyscaled pictures the sum of rgb values is all the time 255, however that is no regular picture. The variable y goes over 255, and it generates an out of bounds exception (any exception in SysUI is handled as deadly, resulting in an infinite loop of crashes as a result of the picture will get processed each time SysUI begins). Now, one resolution may very well be so as to add a test after y is assigned a worth that principally units y to 255 if it ever goes over the max certain. This really works, however we worsen high quality for some motive.

The LineageOS guys have been capable of finding out that this specific challenge occurs due to poor rounding, principally as a result of the rgb values have been all the time rounded to ceil as an alternative of regular rounding. They have been capable of repair it by manually rounding the values and apparently this technique additionally retains high quality, however I actually don’t see how, principally as a result of SysUI appears to all the time convert the picture to sRGB, resulting in a shade loss when the colour house is bigger.

It was additionally found by one 9to5Google developer (Editor’s word:  the developer is Dylan Roussel, an Android developer and 9to5Google contributor) that the difficulty doesn’t happen on Android 11 as the image is all the time transformed to sRGB earlier than it will get processed in any approach.

Read More:  Verizon is buying Tracfone to claim an edge in prepaid phone carriers

I additionally tried crafting my very own damaged picture with photoshop or gimp, however SysUI all the time transformed the picture to the secure shade house, resulting in no crash (however a lack of colours ofc). I even tried extracting the damaged picture shade profile and utilizing it in a brand new picture, however nonetheless couldn’t get SysUI to crash.

There’s excellent news, and there’s dangerous information

The dangerous information is the difficulty is now out within the open, and you may guess that some individuals will use it for mischief. More concerningly, this bug (or a really comparable one) seems to have been a problem for at the least a few years, with no seen motion from Google.

Also dangerous information: in case you fall sufferer to a prank (or your personal curiosity), there’s no straightforward, pain-free technique to undo it. At least manufacturing unit reset stays as a final resort, however we nonetheless wouldn’t suggest attempting it by yourself gadget.

Read subsequent: The finest Android wallpapers: Default wallpapers from 125+ Android gadgets

The excellent news is that this appears to be a simple bug, slightly than malware or something extra nefarious. We say “appears” as a result of we haven’t heard from Google again for affirmation. Also excellent news: this bug won’t be a problem as soon as Android 11 lands later this yr.


Add comment