FORUMS
Remove All Ads from XDA

[GUIDE] ALL ABOUT ROSIE - The comprehensive guide to Rosie modding

5,030 posts
Thanks Meter: 10,783
 
By he_stheone64, Senior Member on 9th August 2011, 03:40 PM
Post Reply Email Thread
ALL ABOUT ROSIE - The comprehensive guide to Rosie modding




After (too) many Themes and Mods for Milestone and DHD it`s time for another guide - this time for our beloved (say HTC widgets) and hatred (say shortcuts & customization) Rosie - just the same love and hate relationship like to ladies in real life...

Credits: tommytomatoe for the great base of this TUT - http://forum.xda-developers.com/show....php?t=1152549
brut as always for his fanatstic apktool - we would all be blind hexediting without him
daneshm for his nice apkmanager script - very helpful for guys like me, who compile hundred`s of apk`s a week
diamondback, flemmard for m.10 tools - help us to keep modding Sense 3.0
The1wingedangel for originally bringing the remapping mod to the DHD and jschisurf for the original mod on EVO
he_stheone64 (me ) for Auto Transparency Rosie, custom app drawer background & 5x5 app drawer


Tools: archive utility (7z, bettercut, et cetera), apktool or apkmanager, notepad++, m10editor picture editor like Photoshop or Gimp


Decompiling Rosie.apk

First install proper framework (com.htc.resources.apk) with “apktool if com.htc.resources.apk” in apktool or 10 in apkmanager
Decompile with apktool: apktool d Rosie.apk or apkmanager: decompile with 10

Build Rosie with apktool: apktool b Rosie or apkmanager: compile with 11

Link to capy´s apktool guide - http://forum.xda-developers.com/show....php?t=1133485


Guide is based on Sense 2.1 & 3.0 Rosie


THE BASICS

Buttons

Left Button Icon (app drawer):



In Rosie.apk/res/drawable-hdpi look for:

Code:
:icon_all_on.png 
icon_all_rest.png
icon_all_down_on.png
icon_all_down_rest.png
*Note, with the nature of the Sense 2.1 Rosie, you will only need to modify the icon_all_on.png and icon_all_rest.png


Left Button Background:

>>

In com.htc.resources.apk/res/drawable-hdpi look for:

Code:
:common_app_rosie_btn_left_rest.png
common_app_rosie_btn_left_pressed.png

Middle Button Icon (Phone):



In Rosie.apk/res/drawable-hdpi look for:

Code:
:icon_p_phone_on.png
icon_p_phone_rest.png

Middle Button Text (Phone):

Decompile Rosie.apk using first. In Rosie/res/values look for strings.xml. Open it up in notepad++. Search for:

Code:
:
<string name="phone">Phone</string>
Change the string in between ><


Middle Button Background:

>>

In com.htc.resources.apk/res/drawable-hdpi look for:

Code:
:common_app_rosie_btn_middle_rest.png
common_app_rosie_btn_middle_pressed.png

Right Button Icon (personalize icon):



In Rosie.apk/res/drawable-port-hdpi look for:

Code:
:personalize_rest.png
personalize_on.png

RightButton Background:

>>

In com.htc.resources.apk/res/drawable-hdpi look for:

Code:
:common_app_rosie_btn_right_rest.png
common_app_rosie_btn_right_pressed.png

Modify/Edit Button:

>>

In Rosie.apk/res/drawable-port-hdpi look for:

Code:
:btn_left_rest_big.png
btn_left_setting_pressed.png

Trash Button:
>>

In Rosie.apk/res/drawable-port-hdpi look for:

Code:
:btn_right_rest_big.png
btn_right_remove_press.png

Trash Icon:



In Rosie.apk/res/drawable-hdpi look for:

Code:
:con_trash_rest.png
con_trash_on.png


Dock Components


Dock (main background):



In Rosie.apk/res/drawable-port-hdpi look for:

Code:
:rosie_navbar.png

Dock (Scrollbar background):



In Rosie.apk/res/drawable-hdpi look for:

Code:
:common_mainnav_scroller3.png

Dock (Scrollbar):



In Rosie.apk/res/drawable-hdpi look for:

Code:
:common_mainnav_scroller1.png

Sense 3 Dock

This is the frustrating part in Sense 3.0 - you edit the usual suspects - and nothing happens after the flash. The reason is, that large parts of button press effects and other details are now controlled by fusion.apk. This replaces a lot of the button presses from com.htc.resources.apk and parts of Rosie like the complet dock.

1. You need to decompile fusion.apk with m.10 editor (How-To`s are all over the place), make sure you tick the "decode images" box. You will then find all pngs ether in the editor (which is a pain, if you edit fusion.apk with plenty of pngs) or in c://user/yourname/appdata/roaming/m10editor
2. You need to identify the pngs by sight, since the decompile does not give the correct png names to the pics. Note that all pngs are turned by 180 degrees after the compile.
3. Edit the pngs and zip Rosie in m.10 editor

That`s it - makes it tougher, but at least the devs behind m.10 editor like flemmard or diamondback offered us the option to theme Sense 3.0


Transparent stock Sense 3.0 Rosie Dock

Credits: damo - see the detailed instructions in his thread, thx to liamsteers for reminding me (rarely use that one, due to my Revolution dock...)

http://forum.xda-developers.com/show....php?t=1078621


Decompile Rosie with m.10 editor
Navigate to m.10 Files and select Rosie_Workspace.m10 and decompile it.

Expand these lines (see screens) and look for btn.navbtn_side_anim-Centre, btn.navbtn_side_anim-Left and btn.navbtn_side_anim-Right
change these opacity values from 1 to 0.75:




Look for 2 navbar.png and change opacity from 1 to 0.5




Navigate back to Start and click save.


Note: Latest Rosie in GB 2.3.5 and Sense 3,5 have these edits in Rosie_navbar.m10


Adjusting the curve of scrollbars


Scrollbar Angle Position: Stock has curved path when you navigate between home screens. This will allow it go straight across :)

Decompile Rosie.apk with apktool. In Rosie/res/values-hdpi look for integers.xml and make these changes:

CURVED PATH (stock):

Code:
:<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="scroll_x1">0</integer>
    <integer name="scroll_y1">37</integer>
    <integer name="scroll_x2">240</integer>
    <integer name="scroll_y2">10</integer>
    <integer name="scroll_x3">480</integer>
    <integer name="scroll_y3">37</integer>
    <integer name="cell_layout_corner_radius">5</integer>
    <integer name="cell_layout_line_width">4</integer>
    <integer name="blade_control_touch_area">50</integer>
</resources>

STRAIGHT PATH

Code:
:<?xml version="1.0" encoding="UTF-8"?>
<resources>
    <integer name="scroll_x1">0</integer>
    <integer name="scroll_y1">10</integer>
    <integer name="scroll_x2">240</integer>
    <integer name="scroll_y2">10</integer>
    <integer name="scroll_x3">480</integer>
    <integer name="scroll_y3">10</integer>
    <integer name="cell_layout_corner_radius">5</integer>
    <integer name="cell_layout_line_width">4</integer>
    <integer name="blade_control_touch_area">50</integer>
</resources>

Centralize The Dock: - only for Rosie 2.1



In Rosie.apk/res/layout-port look for button_bar.xml:

Code:
:android:layout_width="fill_parent"
Change to

Code:
:android:layout_width="320.0px"
Add

Code:
:
android:layout_centerHorizontal="true"
Example:

Code:
:<?xml version="1.0" encoding="UTF-8"?>
<com.htc.launcher.widget.ButtonBar android:background="@com.htc:drawable/common_app_rosie_navbar" android:layout_width="320.0px" android:layout_height="@dimen/button_bar_height" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true"
  xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:launcher="http://schemes.android.com/apk/res/com.htc.launcher">

Transparent app drawer

Here is how you can create a transparent app drawer for Rosie - this is based of Rosie Sense 3.0. The basic edits in values folder are usually the same for 2.1, edits in all_apps_view.xml are not necessary for 2.1 Rosie, but essential for custom background (see next section).


all_apps_view.xml

Change all 3 instances of android:background="#ff000000" to android:background="#00000000"


Values folder - color.xml

Change <color name="all_item_background">#ff000000</color> to <color name="all_item_background">#00000000</color> or whatever alpha channel value you like (77 would be semi transparent, the 00 is fully transparent)

Tip: You can also remove the annoying icon text background by editing bubble_dark_background and bubble_text_shadowColor in that xml (set alpha to 00)


Values-hdpi folder - color.xml

Change <color name="add_to_home_background">#ff000000</color> to <color name="add_to_home_background">#00000000</color> or whatever alpha channel value you like (77 would be semi transparent, the 00 is fully transparent)


In rare occasions you also need to edit smalis in order to allow transparency

Look for this value in launcher.smali

const/high16 v23, -0x100

and change to:

const/high16 v23, -0x6700


Custom background app drawer

Now to my very personal variation on top of these edits - the custom background:

all_apps_view.xml

Add

android:background="@drawable/applistbackground"

after <com.htc.launcher.AllAppsView

so the code looks like this:

<com.htc.launcher.AllAppsView android:background="@drawable/applistbackground" android:layout_width="fill_parent"

Then add a custom png to drawable-hdpi folder BEFORE you compile (that builds the ID).

Name: applistbackground.png Size: 480x762 pixel

This mod allows you to have a background of your choice with gradients, semi transparency, patterns, pics, whatever you prefer...

Note: These edits are on top of the edits explained in transparent app drawer section


Enjoy your transparent app drawer with the background of your choice



5x5 app drawer

There are plenty of 4x5 mods around, but I wanted a 5x5 (EVO & DHD are big enough), so I came up with this 5x5 version:

application_boxed.xml

Change android:textSize="@com.htc:dimen/darklist_primary_xs" to android:textSize="17.0px"

dimens.xml in values folder

Change <dimen name="application_boxed_padtop_firstrow">21.0px</dimen> to 8.0px
Change <dimen name="application_boxed_padtop_otherrows">15.0px</dimen> to 8.0px

dimens.xml in values-hdpi folder

Change <dimen name="application_boxed_padtop_firstrow">30.0px</dimen> to 8.0px
Change <dimen name="application_boxed_padtop_otherrows">30.0px</dimen> to 8.0px
Change <dimen name="application_boxed_padtop_lastrow">19.0px</dimen> to 8.0px

dimens.xml in values-port-hdpi folder

Change <dimen name="application_boxed_tv_layout_height">156.0px</dimen> to 124.0px
Change <dimen name="application_boxed_tv_padding_top">7.0px</dimen> to 0.0px
Change <dimen name="application_boxed_tv_padding_bottom">0.0px</dimen> to 20.0px
Change <dimen name="application_boxed_tv_textsize">@com.htc:dimen/darklist_primary_xs</dimen> to 17.0px


integers.xml in values folder

Change <integer name="allprogram_grid_rows">4</integer> to <integer name="allprogram_grid_rows">5</integer>
Change <integer name="folder_grid_columns">4</integer> to <integer name="folder_grid_columns">5</integer>
Change <integer name="allprogram_grid_columns">4</integer> to <integer name="allprogram_grid_columns">5</integer>

integers.xml in values-port folder

Change <integer name="folder_grid_columns">4</integer> to <integer name="folder_grid_columns">5</integer>

integers.xml in values-port-hdpi folder

Change <integer name="allprogram_grid_rows">4</integer> to <integer name="allprogram_grid_rows">5</integer>

The last edit depends on the Rosie version - older Sense 3 versions, that value is not existent in port-hdpi folder. Please also note, this might not fully work on 2.1 Sense Rosies and some dimens.xml values might differ based on the Rosie version (you see version no. in AndroidManifest.xml).

Note: In latest GB 2.3.5 DHD Sense 3.0 there´s an additional values folder to watch:

In values/normal-long-port-hdpi folder you also need to edit integers.xml:

Change

<integer name="allprogram_grid_rows">4</integer>
<integer name="allprogram_grid_columns">4</integer>

to

<integer name="allprogram_grid_rows">5</integer>
<integer name="allprogram_grid_columns">5</integer>

and dimens.xml to these values:

<dimen name="application_boxed_padtop_firstrow">8.0px</dimen>
<dimen name="application_boxed_padtop_otherrows">8.0px</dimen>
<dimen name="application_boxed_tv_layout_height">124.0px</dimen>
<dimen name="application_boxed_tv_textsize">17.0px</dimen>
<dimen name="application_boxed_padtop_lastrow">8.0px</dimen>

So you can combine these 3 mods to a 5x5, transparent Rosie with your custom background



Remapping the right dock button

To Remap the Right Button of Rosie for Sense 2.1 and below (Sense 3.0 is a little more tricky)

Open Launcher.smali, found in [out|smali]/com/htc/launcher/

Search for

Code:
:invoke-direct {p0}, Lcom/htc/launcher/Launcher;->addItems()V
Change to:

Code:
:invoke-direct {p0}, Lcom/htc/launcher/Launcher;->launchCustom()V
*Note. This line is preceded by this chunk of code (can differ from version to version):

Code:
:.method static synthetic access$2000(Lcom/htc/launcher/tommytomatoe/Launcher;)V
    .locals 0
    .parameter "x0"

    .prologue
    .line 147
Next, search for

Code:
:.method private onAppWidgetReset()V
Directly above this method, write in this method:

Code:
:.method private launchCustom()V
    .locals 5

    .prologue
    .line 5536
    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.intent.action.MAIN"

    invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 5537
    .local v1, intent:Landroid/content/Intent;
    const-string v2, "android.intent.category.LAUNCHER"

    invoke-virtual {v1, v2}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

    .line 5538
    new-instance v2, Landroid/content/ComponentName;

    const-string v3, "com.beansoft.launchkey"

    const-string v4, "com.beansoft.launchkey.Redirect"

    invoke-direct {v2, v3, v4}, Landroid/content/ComponentName;-><init>(Ljava/lang/String;Ljava/lang/String;)V

    invoke-virtual {v1, v2}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

    .line 5540
    :try_start_0
    invoke-virtual {p0, v1}, Lcom/htc/launcher/Launcher;->startActivity(Landroid/content/Intent;)V
    :try_end_0
    .catch Landroid/content/ActivityNotFoundException; {:try_start_0 .. :try_end_0} :catch_0
    .catch Ljava/lang/IllegalArgumentException; {:try_start_0 .. :try_end_0} :catch_1

    .line 5546
    :cond_0
    :goto_0
    return-void

    .line 5541
    :catch_0
    move-exception v0

    .line 5542
    .local v0, e:Landroid/content/ActivityNotFoundException;
    sget-boolean v2, Lcom/htc/launcher/Launcher;->localLOGV:Z

    if-eqz v2, :cond_0

    invoke-virtual {v0}, Landroid/content/ActivityNotFoundException;->printStackTrace()V

    goto :goto_0

    .line 5543
    .end local v0           #e:Landroid/content/ActivityNotFoundException;
    :catch_1
    move-exception v0

    .line 5544
    .local v0, e:Ljava/lang/IllegalArgumentException;
    sget-boolean v2, Lcom/htc/launcher/Launcher;->localLOGV:Z

    if-eqz v2, :cond_0

    invoke-virtual {v0}, Ljava/lang/IllegalArgumentException;->printStackTrace()V

    goto :goto_0
.end method
These two lines are where the magic happens:

Code:
:const-string v3, "com.beansoft.launchkey"

    const-string v4, "com.beansoft.launchkey.Redirect"
You must place the package name and the activity which launches the desired app. The above chunk of code will launch whatever app LaunchKey has redirected. Below are some more examples.

Browser
Code:
:const-string v3, "com.android.browser"

    const-string v4, "com.android.browser.BrowserActivity"
Camera

Code:
:const-string v3, "com.android.camera"

    const-string v4, "com.android.camera.CameraEntry"
Messaging

Code:
:const-string v3, "com.android.mms"

    const-string v4, "com.android.mms.ui.ConversationList"

Please don`t ask too many questions regarding these smali edits, since I`m no smali wizard. Hopefully good smali guys like seo can help out here, in case there are detailed questions. I`m all about png and xml…


Removing page by page scrolling in app drawer

Let`s be honest, when moving to GB the new page by page scrolling in app drawer sucked for a lot of us. This mod will make sure, good old Froyo scrolling returns.


com.htc.framework.jar

Decompile com.htc.framework.jar (I do this with apktool simply renaming it to com.htc.framework.apk)
Open PagedGridView.smali in smali/com/htc/widget with Notepad++

Search for all 3 instances of this code

iput-boolean v0, p0, Lcom/htc/widget/PagedGridView;->mEnableScrollByPage:Z

and change it to

iput-boolean v1, p0, Lcom/htc/widget/PagedGridView;->mEnableScrollByPage:Z


Rosie.apk

Set the transparency of all_apps_divider.9.png in drawable-hdpi and (if you have latest GB 2.3.5 Rosie) in new drawable-normal-long-port-hdpi folder to 0%.


Auto Transparency Rosie

This babe is like an X-Ray machine, it offers transpareny even to market widgets, that were not designed to do just that. That delivers a nicer view to your favorite wallpaper and the homescreen looks less clustered.
  • Extract Rosie with m.10 editor and decompile Rosie_navbar.m10
  • Scroll to Rosie_Navbar - scenecontainer.allpages
  • Set Opacity level to 0.8 (don`t go to low, then text gets barely readable, that value works fine).
  • Save file and push

If you use that mod, please don`t forget to credit


Feel free to add more in this thread, I will be happy to add it to OP and make this the one stop shop for all Rosie mods.

May the force be with us
The Following 90 Users Say Thank You to he_stheone64 For This Useful Post: [ View ] Gift he_stheone64 Ad-Free
 
 
9th August 2011, 04:00 PM |#2  
liamstears's Avatar
Senior Member
Flag Kent
Thanks Meter: 1,712
 
Donate to Me
More
Good guide man!!

You should add the m10 edits ;)
The Following 2 Users Say Thank You to liamstears For This Useful Post: [ View ] Gift liamstears Ad-Free
9th August 2011, 04:06 PM |#3  
he_stheone64's Avatar
OP Senior Member
Flag Düsseldorf
Thanks Meter: 10,783
 
More
Thx - feel free to send me, whatever you feel should be added to OP, so we will have a very nice and complete guide here. The m.10`s you`re talking about are more specific to resizing a Rosie from another device, so that`s not really standard - but might make sense, since we have Sensation ROM`s here.
The Following 2 Users Say Thank You to he_stheone64 For This Useful Post: [ View ] Gift he_stheone64 Ad-Free
9th August 2011, 04:11 PM |#4  
liamstears's Avatar
Senior Member
Flag Kent
Thanks Meter: 1,712
 
Donate to Me
More
Quote:
Originally Posted by he_stheone64

Thx - feel free to send me, whatever you feel should be added to OP, so we will have a very nice and complete guide here. The m.10`s you`re talking about are more specific to resizing a Rosie from another device, so that`s not really standard - but might make sense, since we have Sensation ROM`s here.

PM Sent :D
9th August 2011, 04:14 PM |#5  
Mikenif's Avatar
Retired Recognized Developer
Flag Hoofddorp
Thanks Meter: 541
 
Donate to Me
More
Sweet guide, mate!
BTW in Sense 3.0's Rosie.apk there are 3 instances of android:background="#ff000000" in all_apps_view.xml
The Following User Says Thank You to Mikenif For This Useful Post: [ View ] Gift Mikenif Ad-Free
9th August 2011, 04:34 PM |#6  
he_stheone64's Avatar
OP Senior Member
Flag Düsseldorf
Thanks Meter: 10,783
 
More
Thx for identifying that little typo.
9th August 2011, 06:12 PM |#7  
hav0c's Avatar
Senior Member
Flag Amsterdam
Thanks Meter: 154
 
More
Thumbs up
Great guide. Thanks a lot.
9th August 2011, 06:28 PM |#8  
kalagas's Avatar
Senior Member
Flag Crete
Thanks Meter: 2,265
 
Donate to Me
More
Another big hit from best Themer ever...
Thanks mate, all community must say a BIG thank to you...

P.S. The next thing you will learn me is how to find the lines i want in Smali...
The Following User Says Thank You to kalagas For This Useful Post: [ View ] Gift kalagas Ad-Free
9th August 2011, 10:06 PM |#9  
he_stheone64's Avatar
OP Senior Member
Flag Düsseldorf
Thanks Meter: 10,783
 
More
For smalis you better ask seo, his second name is smali
The Following User Says Thank You to he_stheone64 For This Useful Post: [ View ] Gift he_stheone64 Ad-Free
9th August 2011, 10:23 PM |#10  
tommytomatoe's Avatar
Inactive Recognized Developer
Flag Knoxville USA
Thanks Meter: 6,839
 
Donate to Me
More
I am glad to be a part of the DHD side of things :)
The Following 2 Users Say Thank You to tommytomatoe For This Useful Post: [ View ] Gift tommytomatoe Ad-Free
Thyrus
9th August 2011, 11:14 PM |#11  
Guest
Thanks Meter: 0
 
More
Thanks stoney as usual.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes