Will Verduzco · Jul 25, 2012 at 11:30 pm

Difficulties Decoding M10 Images in Recent Sense Versions

Themers working with HTC Sense ROMs currently face a major problem. They are unable to modify most images used by Sense 3.5 and beyond because of HTC’s method of storing images inside proprietary m10 files. Unfortunately, the images are not stored as JPG or PNG. Instead, they are encoded with an unknown algorithm.

Previously, M10Tools by XDA Recognized Developers Flemmard and Diamondback would be used to decode these images. However, with the release of Sense 3.5, this no longer was an option, as HTC added new image formats that are not compatible with the software package.

After trying unsuccessfully to decode the new image formats, Recognized Developer and Forum Moderator Diamondback has decided to seek help from other developers in the community to find a solution to the M10 image format woes. Luckily, there is progress being made to find a solution. For starters, Diamondback has compiled a list of what we know so far:

We don’t have any hard facts for these image types but looking at the “old” image types, we can guess a few things:

  • The images are in a format the GPU can render directly (Like s3tc, ATC, QTC, etc) (At least this used to be the case, might have changed)
  • Images are most likely compressed. The ratio between assumed size (based on meta data) and the actual data size indicates some heavy compression. The data itself obviously looks compressed too.
  • There are no headers or any other help. It is just raw data.
  • We don’t know exactly how the decoded images actually look like, so we can’t say what the images display. However, due to latest archievements we “might” know this for images from Sense 3.5 and 3.6 if needed.
  • The handling software side is all in a few libs and NOT in smali / java, so we can’t look for stuff there, however we have the libs, so if someone is pro with assembler he might find out something

So which image types are the ones in question? As compiled by Diamondback:

Here is a list of image type we already know ( remember, we don’t know where the numbers come from, might be some enum in native code or so)

  • Type 4: Raw RGB
  • Type 6: Raw RGBA (still used rather often)
  • Type 8: ATC RGB (doesn’t seem to be used at all anymore)
  • Type 9: ATC RGBA Explicit (doesn’t seem to be used at all anymore)

As you can see we got types WITH and WITHOUT alpha encoding.
Here is the list of UNKNOWN formats:

  • Type 13 (used way less than type 14, so maybe no alpha?)
  • Type 14 (this is the most used type, so I assume this one supports alpha encoding)

When thinking about what the data might be, don’t throw away crazy ideas like “The data is S3TC /ATC /whatever but compressed again by some ‘normal’ compression algorithm”. Maybe they just replaced type 8 and 9 with an additional compression on top of these types.

Diamondback is searching for help from everyone who is experienced with file formats, image compression, OpenGL or reverse engineering. Since these efforts have been ongoing for several months, any input is appreciated.  Those who wish to join the project should head over to the development thread and lend a hand.


_________
Want something on the XDA Portal? Send us a tip!
TAGS:

Will Verduzco

willverduzco is an editor on XDA-Developers, the largest community for Android users. Will Verduzco is the Portal Administrator for the XDA-Developers Portal. He has been addicted to mobile technology since the HTC Wizard. But starting with the Nexus One, his gadget love affair shifted to Google's little green robot. He is also a Johns Hopkins University graduate in neuroscience and is now currently studying to become a physician. View willverduzco's posts and articles here.
Aamir Siddiqui · Jun 30, 2015 at 02:43 pm · 3 comments

Beats Music No Longer Accepting New Accounts

Whenever Apple launches a new product or service, it definitely manages to grab the attention of all. Whether you love the company and or its products, or you hate it, there's no denying that Apple does make more people interested in things, old or new. When the company announced Apple Music, it directly took aim at the user base of iTunes which had migrated to the streaming convenience of Spotify and later, Google Play Music. In order to further bolster...

XDA NEWS
Emil Kako · Jun 30, 2015 at 02:37 pm · 3 comments

Do You Do Self-Repairs on Your Devices?

As smartphone designs become more and more complex, self-repairs on devices are also becoming more complicated. Unibody handsets like HTC's One flagship series can sometimes be a nightmare to repair if the person doesn't have much experience. That, of course, all depends on the device you are attempting to repair though. So, how many of you do self-repairs on your devices? Let us know why or why not in the comments below.

DISCUSS
Faiz Malkani · Jun 30, 2015 at 02:03 pm · 3 comments

Sony Z4 Slips Out of Top 5 Smartphones in Japan

In a bid to streamline its flagship series which had been losing credibility over the past few years due to their 6 month release cycles, Sony announced that releases would be pushed back to the standard duration of one year instead. When Sony's 2015 flagship was unveiled as the Z4 in Japan and the Z3+ across the rest of the world, enthusiasts everywhere expected things to take a turn for the better, in lieu of the aforementioned announcement. However, two months...

XDA NEWS
Share This