[Sprint HTC EVO 4G LTE] mikeyxda:
Finally got the time to hack some files to make 4x5 Sense rosie available on the Evo 4G LTE. This post is like most guides: assumes some knowledge of apktool, hex editing, and other programming "skills". Note that this post is designed for 720p displays so the numbers like the cell gaps might have to be modified if your phone is other than 720 x 1280 resolution, but the basics should still work. Also, as of this time, there are no M10 editing tools that work with Sense 4 so if some become available, obviously the best method of changing the M10 files will change (you won't have to use a hex editor). That said, the basics will still guide you through what you need to do in order to get 4x5 rosie working on your Sense 4 ROM.

First, let's edit the relevant m10 files

Once you've decompiled Rosie.apk from your ROM, we will edit these m10 files with a hex editor. We only need to change 3 bytes in one file and one byte in the second m10 file:

First, open \assets\Port\rosie_screen.m10 in your hex editor. I use XVI32. Search for "cell on Y" without the quotes. Note that you must use a unicode search (because there are zeroes between each character). Either that, or search for the hex string that is displayed in the window below instead. There should only be one occurrence. When you get there, we want to change the "4" that follows that and the "80" associated with the cell gap. We'll change the "4" to a "5" and the cell gap from "80" to "70". You can only reduce the cell gap slightly because many multi-cell widgets take up not only multiple rows, but also assume a certain size for the cell gap. Taking the value from 80 to 70 seems to be the best compromise for fitting all the icons (and text) and not overlapping 2-row widgets. Here's a screen shot showing the two values that got changed. When done editing, save the changes to the rosie_screen.m10 file.

After you've edited \assets\Port\rosie_screen.m10 as above, go to \assets\Land\rosie_screen.m10 and do the edits as above but only do the first edit: changing the 4 to a 5. In landscape mode, there's already only a 10 pixel gap between cells and you really can't reduce it. Landscape rosie at 4x5 is a compromise at best, but it does work without changing the gap... although with a bit of unavoidable overlap.

m10 editing done, now let's edit the XML files

Open \res\values\integers.xml and we'll change the bottom line from a 4 to a 5. It should look like this after edited:

<integer name="config_folderCellCountY">5</integer>

Open \res\values-normal-port-xhdpi\integers.xml and changeone 4 to a 5. This is how the line look after edited:

<integer name="config_cellLayoutCellCountY">5</integer>

Open \res\values-normal-port-xhdpi\dimens.xml and change one 80 to a 26. This is how the two lines look after edited:

<dimen name="workspace_height_gap">26.0px</dimen>

Open \res\values-normal-land-xhdpi\integers.xml and change one 4 to 5 near the top. This is how the line looks after edited:

<integer name="config_cellLayoutCellCountY">5</integer>

Open \res\values-normal-land-xhdpi\dimens.xml and change one 155 to 122 near the top/middle. This is how the line looks after edited:

<dimen name="workspace_cell_height">122.0px</dimen>

That's it. Recompile with the modified m10 and xml files and you should have a working 4x5 rosie for Sense 4. Note that the "xhdpi" folder is what is used on 720p phones like the Evo 4G LTE and One X. If your phone uses quarter-HQ (QHD), the files you'll want to edit will be the same XML files but in a different folder (like hdpi instead of xhdpi).

Mike