[Droid Incredible Android Development] 00McD00:
So as many of you know, over the last couple of months I have gotten into the developing world. Over this time I have had to spend hour searching the internet for various mods/fixes and I have decided to compile them into one comprehensive guide. I am not taking credit for (most) of these (especially LauchKey application), I just wanted to create a handy thread for new developers and seasoned ones alike to be able to refer to without having to reverse engineer everything. Please don't feel the need to credit me for these or ask me to use them, I am offering them up as a public good to all.

*This guide is under the assumption that you already have a stable knowledge of apktool, Note++, and 7zip. If not...well that is an entirely different beast.

*There is a lot of info here, please understand (and let me know of course) if I left something out or made a mistake.

I would quickly like to thank those who made this thread possible:

-he_stheone64

-appelflap

-tommytomatoe

-klquicksall

-bour

-Jermaine151

-j4n87

Lets start off easy-how to hide recent apps from Sense 2.1 notification bar:

*There are two ways to do this, I will be showing both and I usually do both just to make sure.

Option 1

1. Decompile the SystemUI folder for desired ROM.

2. Navigate to smali/com/android/systemui/statusbar and open StatusBarFlag.smali

3. Search for:

sput-boolean v0, Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_RECENT_APP:Z

-and change to:

sput-boolean [B]v2[/B], Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_RECENT_APP:Z

4. Save and recompile

Option 2

1. Decompile SystemUI

2. Navigate to res/values-hdpi and open dimens.xml

3. All the lines that start with "recent_app" change their values to 0

-example:

<dimen name="recent_app_icon_width">0px</dimen>

4. Save and recompile

Next lets change the app drawer from 4x4 to 5x4:

1. Decompile Rosie.apk

2. Navigate to res/values and open integers.xml

3. Change the following values from 4 to 5:

<integer name="folder_grid_columns">[B]4[/B]</integer>
<integer name="allprogram_grid_columns">[B]4[/B]</integer>

4. Then navigate to values-port and open integers.xml and do the same for this line:

<integer name="folder_grid_columns">4</integer>

5. Save all and recompile

Now lets remove the paged scrolling from Sense 2.1 app drawer:

1. Decompile com.htc.framework.jar

2. Navigate to smali/com/htc/widget and open PagedGridView.smali

3. Search for (there should 3, change them all):

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

-and change to:

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

4. Save and recompile

*Now you will need to replace the page separator image in the Rosie.apk

5. Navigate to res/drawable and replace "bottom_divider.9.png" with the one attached.

Now we're going to hide the location icon:

1. Decompile services.jar

2. Navigate to com/android/server/status and open HtcCdmaStatusBar.smali

3. Search for (there should be 2, change both):

invoke-virtual {v0, v1, v4}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V

-change to:

invoke-virtual {v0, v1, [B]v6[/B]}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V

4. Save and recompile

Now lets change the app drawer and icon text backing transparency:

1. Decompile Rosie.apk

2. Navigate to res/values and open colors.xml

3. Search for:

<color name="all_item_background">#ff000000</color>

-change to (77 for semi-transparent):

<color name="all_item_background">#[B]00[/B]000000</color>

4. Navigate to values-hdpi and open colors.xml

5. Search for and make same changes as above:

<color name="add_to_home_background">#ff000000</color>

for app text background

1. Search for and make same changes as above:

<color name="bubble_dark_background">#b2191919</color>

2. Save all and recompile

Now we're going to remap the right Rosie button to LaunchKey

1. Decompile Rosie.apk

2. Navigate to smali/com/htc/launcher/ and open Launcher.smali

3. Search for:

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

*There are actually 2 of these, change the one that has something similar to this above it:

.locals 0
.parameter "x0"

.prologue
.line 147

-change to:

invoke-direct {p0}, Lcom/htc/launcher/Launcher;->[B]launchCustom[/B]()V

4. Next find:

.method private onAppWidgetReset()V

5. And put this directly above it:

.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

6. Include the LaunchKey app in your ROM

7. Save and recompile

Now let's go for a mod that I have yet to find a guide for anywhere-swapping phone and apps buttons (Sense 1.0):

1. Decompile Rosie.apk

2. Navigate to res/layout-port and open button_bar.xml

3. It's easiest to just replace everything in this file with the following:

<?xml version="1.0" encoding="utf-8"?>
<com.htc.launcher.widget.ButtonBar android:background="@com.htc:drawable/common_app_rosie_navbar" android:layout_width="fill_parent" android:layout_height="@dimen/button_bar_height" android:layout_alignParentBottom="true"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemes.android.com/apk/res/com.htc.launcher">
<ImageButton android:gravity="center" android:id="@id/left_btn" android:background="@drawable/bb_btn_middle" android:focusable="false" android:layout_width="wrap_content" android:layout_height="84.0px" android:src="@drawable/bb_btn_middle_src" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" />
<View android:id="@id/left_btn_touch" android:clickable="true" android:layout_width="@dimen/button_bar_touch_width" android:layout_height="@dimen/button_bar_touch_height" android:layout_alignBottom="@id/left_btn" />
<ImageButton android:id="@id/middle_btn" android:background="@drawable/bb_btn_left" android:focusable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/button_bar_margin" android:src="@drawable/bb_btn_left_src" android:scaleType="center" android:layout_alignBottom="@id/left_btn" android:layout_alignParentLeft="true" />
<ImageButton android:id="@id/right_btn" android:background="@drawable/bb_btn_right" android:focusable="false" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/button_bar_margin" android:src="@drawable/bb_btn_right_src" android:scaleType="center" android:layout_alignBottom="@id/middle_btn" android:layout_alignParentRight="true" />
<View android:id="@id/right_btn_touch" android:clickable="true" android:layout_width="@dimen/button_bar_touch_width" android:layout_height="@dimen/button_bar_touch_height" android:layout_alignBottom="@id/middle_btn" android:layout_alignParentRight="true" />
</com.htc.launcher.widget.ButtonBar>

4. Now make this change in bb_btn_middle_src.xml from:

<item android:state_pressed="true" android:drawable="@drawable/icon_p_phone_on" />
<item android:drawable="@drawable/icon_p_phone_rest" />

-to this:

<item android:state_pressed="true" android:drawable="@drawable/icon_all_on" />
<item android:drawable="@drawable/icon_all_rest" />

5. Now take the attached "bb_btn_left_src.xml" and add it to res/drawable-port

6. Save and recompile

7. Next replace the attached "rosiebuttons.zip" images in res/drawable-hdpi (these are centered for a straight across dock, will be too high for regular Sense Rosie).

Now customizing the Rosie bar (great place to find replacements is Sense 2.1 themes):

For Sense 1.0

1. Right click on com.htc.resources, select 7zip and "open archive"

2. Navigate to res/drawable-port-hdpi and the 8 images you need to replace are located in there

*you can also replace the ones in drawable-land-hdpi though they don't really matter since Sense 1.0 Rosie doesn't go landscape.

For Sense 2.1

1. Right click on Rosie.apk, select 7zip and "open archive"

2. Navigate to res/drawable-port-hdpi and replace the button and navbar pngs

3. Do the same for drawable-land-hdpi

4. Replace "common_mainnav_scroller3.png" in res/drawable-hdpi also

Finally, if you decide to theme the Rosie (above) then you might need to change the scroll bar path to straight:

1. Decompile Rosie.apk

2. Navigate to res/values-hdpi and open integers.xml

3. Change the following bolded values:

<integer name="scroll_y1">[B]10[/B]</integer>
<integer name="scroll_y3">[B]10[/B]</integer>

*Well there you have it folks, should should be everything you need to know to make Rosie yours! Please let me know if I left anything out or if something needs to be changed/added. Enjoy!