ALL ABOUT ROSIE - The comprehensive guide to Rosie modding
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
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/showthread.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/showthread.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/showthread.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
Good guide man!!
You should add the m10 edits ;-)
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.
he_stheone64 said:
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.
Click to expand...
Click to collapse
PM Sent :-D
Sweet guide, mate!
BTW in Sense 3.0's Rosie.apk there are 3 instances of android:background="#ff000000" in all_apps_view.xml
Thx for identifying that little typo.
Great guide. Thanks a lot.
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...
For smalis you better ask seo, his second name is smali
I am glad to be a part of the DHD side of things
Thanks stoney as usual.
Wow, really nice to see such useful things popping up, great guide man
Nice easy to follow guide. Thanks going to have a play with this later.
Do Androids dream of electric sheep?
I found a bug in the section on "it" "5x5 drawer app"
The third section should be "dimens.xml in values-port-hdpi folder" instead of "values-dimens.xml in hdpi folder"
Beautiful!
Hey,
first of all, thanks for this really nice guide!
Now I have a question:
Is there a way to test the modified Rosie with an emulator?
I'd really love to try modding on my own, but it would be nice if I could test it somewhere else than on my own device or to buy a second one, so I have one to use as a phone and one to test with
Eneco said:
Hey,
first of all, thanks for this really nice guide!
Now I have a question:
Is there a way to test the modified Rosie with an emulator?
I'd really love to try modding on my own, but it would be nice if I could test it somewhere else than on my own device or to buy a second one, so I have one to use as a phone and one to test with
Click to expand...
Click to collapse
Android emulator will not run proprietary roms (Sense, touchwhiz, blur, etc cetera). Do you won't be able to test sense apks (ie Rosie.apk).
Easy way to test on device:
Make a bakeup of your Rosie.apk:
adb shell cp system/app/Rosie.apk /system/app/Rosie.bak
To test new apk:
adb shell stop
adb push moddedRosie.apk /system/app/Rosie.apk
adb shell start
If it works, great! If not here is to revert:
adb shell stop
adb shell cp /system/app/Rosie.Baker /system/app/Rosie.apk
adb shell start
Sent from my PC36100 using Tapatalk
Hi, first of all great info
But does anyone else get compile errors on Rosie (Sense 3.0) via apktool? I have looked at 'Adjusting the curve of scrollbars' and have decompiled as directed, using the htc framework, and everything is fine, but when building it gives a load of errors. It compiles just not sure on the errors.
I have done this lots on Sense 2.1 Rosie with no trouble so wonder if people also have issues on 3.0?
The errors are all related around: '...has no default translation in C:\\Rosie\res;....'
e.g. extract:
\>apktool b Rosie
Checking whether sources has changed...
Smaling...
Checking whether resources has changed...
Building resources...
pt: warning: string 'add_clock' has no default translation in C:\\Rosie\res; fou
_HK
pt: warning: string 'add_folder' has no default translation in C:\\Rosie\res; fo
h_HK
pt: warning: string 'add_photo_frame' has no default translation in C:\\Rosie\re
_BR zh_HK
pt: warning: string 'add_search' has no default translation in C:\\Rosie\res; fo
h_HK
pt: warning: string 'all_apps_menu_find' has no default translation in C:\\Rosie
pt_BR zh_HK
pt: warning: string 'btn_cancel' has no default translation in C:\\Rosie\res; fo
K
pt: warning: string 'btn_done' has no default translation in C:\\Rosie\res; foun
pt: warning: string 'cancel_action' has no default translation in C:\\Rosie\res;
R zh_HK
Click to expand...
Click to collapse
Did you try to change apktool version (like from 1.41 to old 1.31)? That sometimes helps, since some versions can produce these annoying language string bugs in rare occasions.
L0cke said:
Hi, first of all great info
But does anyone else get compile errors on Rosie (Sense 3.0) via apktool? I have looked at 'Adjusting the curve of scrollbars' and have decompiled as directed, using the htc framework, and everything is fine, but when building it gives a load of errors. It compiles just not sure on the errors.
I have done this lots on Sense 2.1 Rosie with no trouble so wonder if people also have issues on 3.0?
The errors are all related around: '...has no default translation in C:\\Rosie\res;....'
Click to expand...
Click to collapse
Have the same problem. Same with lower versions of apktool.
ARHD with Sense3-mods. It should work with those, too, doesn't it?
Related
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:
Code:
sput-boolean v0, Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_RECENT_APP:Z
-and change to:
Code:
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:
Code:
<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:
Code:
<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:
Code:
<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):
Code:
iput-boolean v0, p0, Lcom/htc/widget/PagedGridView;->mEnableScrollByPage:Z
-and change to:
Code:
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):
Code:
invoke-virtual {v0, v1, v4}, Lcom/android/server/status/StatusBarService;->setIconVisibility(Landroid/os/IBinder;Z)V
-change to:
Code:
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:
Code:
<color name="all_item_background">#ff000000</color>
-change to (77 for semi-transparent):
Code:
<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:
Code:
<color name="add_to_home_background">#ff000000</color>
for app text background
1. Search for and make same changes as above:
Code:
<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:
Code:
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:
Code:
.locals 0
.parameter "x0"
.prologue
.line 147
-change to:
Code:
invoke-direct {p0}, Lcom/htc/launcher/Launcher;->[B]launchCustom[/B]()V
4. Next find:
Code:
.method private onAppWidgetReset()V
5. And put this directly above it:
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
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:
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="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:
Code:
<item android:state_pressed="true" android:drawable="@drawable/icon_p_phone_on" />
<item android:drawable="@drawable/icon_p_phone_rest" />
-to this:
Code:
<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:
Code:
<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!
Here is a mod shown to me by Wildstang: Remove ADB Debugging Icon:
1. Decompile services.jar
2. Navigate to smali/com/android/server and open NotificationManagerService.smali
3. Search for this line:
Code:
iput v7, v6, Landroid/app/Notification;->icon:I
4. And comment out to look like this:
Code:
#iput v7, v6, Landroid/app/Notification;->icon:I
5. Save and recompile
Here is a mod shown to me by Silverxbv2: Remove clock from statusbar:
1. Decompile SystemUI.apk
2. Navigate to res/layout and open status_bar.xml
3. Delete this line (should be line #9 if using Note++):
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon"...(this is just the beginning of the code, delete the entire line)
4. Save and recompile
Very nice guide. Great work.
Just beasting!!!!
jermaine151 said:
Just beasting!!!!
Click to expand...
Click to collapse
Well thank you sir, just doing unto others as others have done unto me hopefully this helps some people out.
Very, very nice guide. Do you happen to know how to change the Verizon Wireless to something else in the Notification Pulldown?
Devildog8791 said:
Very, very nice guide. Do you happen to know how to change the Verizon Wireless to something else in the Notification Pulldown?
Click to expand...
Click to collapse
Sorry, I haven't ran across that one yet.
00McD00 said:
Sorry, I haven't ran across that one yet.
Click to expand...
Click to collapse
That's cool. That's something that I have been trying to get figured out. If I figure it out, I'll let you know (if you want).
Devildog8791 said:
Very, very nice guide. Do you happen to know how to change the Verizon Wireless to something else in the Notification Pulldown?
Click to expand...
Click to collapse
I believe it resides in the eri.xml file inside framework-res.apk, look in the xml folder. This is where the Verizon banner is located for a lot of phones but not absolutely sure on the Inc. You need to extract the file tehn edit it with a hexeditor such as HxD.
Here is a link to how I did it on my Droid Eris over a year ago but like I said I haven't tried this on an Incredible so not sure its the same file.
http://www.droidforums.net/forum/droid-hacks/57078-how-edit-eri-xml.html
This is awesome, thanks.
Really appreaciate this and thanks for taking the time to post this up!!
kzoodroid said:
I believe it resides in the eri.xml file inside framework-res.apk, look in the xml folder. This is where the Verizon banner is located for a lot of phones but not absolutely sure on the Inc. You need to extract the file tehn edit it with a hexeditor such as HxD.
Here is a link to how I did it on my Droid Eris over a year ago but like I said I haven't tried this on an Incredible so not sure its the same file.
http://www.droidforums.net/forum/droid-hacks/57078-how-edit-eri-xml.html
Click to expand...
Click to collapse
Thanks, I'll take a look and see if that is it. I'll let you know.
Edit: I decompiled framework-res.apk and I didn't see it there. The search continues.
On a side note, as far as the transparency goes, is it the higher the number the less transparent it is. For example, will 88 be less transparent than 77? Can I use any number between 00-99?
Devildog8791 said:
Thanks, I'll take a look and see if that is it. I'll let you know.
Edit: I decompiled framework-res.apk and I didn't see it there. The search continues.
On a side note, as far as the transparency goes, is it the higher the number the less transparent it is. For example, will 88 be less transparent than 77? Can I use any number between 00-99?
Click to expand...
Click to collapse
I used root explorer and there is an eri.xml file on the phone. system>framework>framework-res.apk>res>xml just not sure if it contains the verizon banner but its a good bet it does. I don't have my laptop here which has all my tools on it to extract it and HxD to edit the xml file. Actually its not ahrd to extract just make a copy of framework-res.apk, move it to a pc and rename it framework-res.zip and open with 7-zip and take out eri.xml then drop it into HxD and it opens to be edited.
kzoodroid said:
I used root explorer and there is an eri.xml file on the phone. system>framework>framework-res.apk>res>xml just not sure if it contains the verizon banner but its a good bet it does. I don't have my laptop here which has all my tools on it to extract it and HxD to edit the xml file. Actually its not ahrd to extract just make a copy of framework-res.apk, move it to a pc and rename it framework-res.zip and open with 7-zip and take out eri.xml then drop it into HxD and it opens to be edited.
Click to expand...
Click to collapse
I decompiled framework-res.apk so I could see it as it was written. Is it different if you do it with a hex editor? I would think that it would be better to have it decompiled.
Devildog8791 said:
I decompiled framework-res.apk so I could see it as it was written. Is it different if you do it with a hex editor? I would think that it would be better to have it decompiled.
Click to expand...
Click to collapse
I'm going to put 7-zip and HxD on this pc and see if that amkes a difference as i want to change it myself. I'll let you know what I see.
The link I posted said using apktool accomplished the same thing. Just easier to open it with 7zip and drop it into HxD imo. I finally opened it in HxD but don't see Verizon any where in it. From past experience with my Eris I vaguely remember having problems finding it too but don't rememeber what I did to get it too show itself. Could also be that its located somewhere else on the incredible. From what I've goolged on editing eri.xml its kind of hit and miss as to if its there or not to edit on different phones and carriers.
Devildog8791 said:
Thanks, I'll take a look and see if that is it. I'll let you know.
Edit: I decompiled framework-res.apk and I didn't see it there. The search continues.
On a side note, as far as the transparency goes, is it the higher the number the less transparent it is. For example, will 88 be less transparent than 77? Can I use any number between 00-99?
Click to expand...
Click to collapse
I believe so, I've only used 77 and 00. But I am pretty sure you are right.
Devildog8791 said:
I decompiled framework-res.apk so I could see it as it was written. Is it different if you do it with a hex editor? I would think that it would be better to have it decompiled.
Click to expand...
Click to collapse
Sorry to burst your guys' bubble but I looked in there and that's definitely not where it is. I am on the search for it too.
00McD00 said:
Sorry to burst your guys' bubble but I looked in there and that's definitely not where it is. I am on the search for it too.
Click to expand...
Click to collapse
Conap actually has an app for the Incredible and Eris to edit the eri.xml file to remove the banner but he says it only works for ASOP ROMs. For some reason on Sense based ROMs its either hidden in the eri.xml file as there is text that doesn't decipher or it is somewhere else. From what I rememeber it might have been an ASOP ROM I had actually done this on before with my Eris so thats probably why it worked.
http://forum.xda-developers.com/showthread.php?p=11464084#post11464084
Edit: sent conap a pm asking if he knew where it was.
Edit #2: He got right back with me and said in froyo its in the eri.xml file so it must have been moved in gingerbread. He said they added a status bar apk in system apps for gingerbread so that's probably where they moved it too (SystemUI.apk).
deleted... figured it out.
Thanks for the tutorial, I've been looking FOREVER on how to remap the phone and apps. I was thinking it was smali or something lol
Just one question, I'm trying to figure out how to swap the buttons on Sense 2.1 on my Incredible 2 and it seems a little different than 1.0 and I'm banging my head against the wall trying to figure it out (the buttonbar XML edit). Any way you can show me(us) that one? It's the one with Relative Layout and Text View in the XML file and Image Button etc etc is below it
franklin270h said:
Thanks for the tutorial, I've been looking FOREVER on how to remap the phone and apps. I was thinking it was smali or something lol
Just one question, I'm trying to figure out how to swap the buttons on Sense 2.1 on my Incredible 2 and it seems a little different than 1.0 and I'm banging my head against the wall trying to figure it out (the buttonbar XML edit). Any way you can show me(us) that one? It's the one with Relative Layout and Text View in the XML file and Image Button etc etc is below it
Click to expand...
Click to collapse
Yeah join the club lol 1.0 is different from 2.1 and I am also trying to figure it out (haven't tried TOO hard yet). Basically what you have to do is change it so the left button is doing the work of the middle button and vice versa. Simply put, in the button_bar.xml where it says "btn_left" you should change to middle and vise versa. But you are correct, it is different and I have yet to master it.
Here is another tutorial which will teach you how to add a powermenu to your stock rom ICS for the P6810 only.
Sources:
http://forum.xda-developers.com/showthread.php?t=1805408
http://forum.xda-developers.com/showthread.php?t=1208320
http://forum.xda-developers.com/showthread.php?t=1801137
Files:
http://www.mediafire.com/?46ta4oa6woe923d,8pcaw7edzd4isk0,8n0ibr7b0127zm5
Step 0: Requirements
Java JRE, JDE and notepad++;
apktool, aapt.exe and autosign (attached in this thread) for editing framework-res.apk;
smali, baksmali;
a framework-res.apk for your device;
an android.policy.jar for your device.
Step 1: Editing framework-res.apk
Create a folder decompiling where you can put all the files.
First decompile the framework-res.apk :
open a terminal (cmd) and type
Code:
java -jar apktool.jar d framework-res.apk framework-res
you'll have a framework-res folder.
Go to
Code:
\Decompiling\framework-res\res\values\
Edit with notepad++ strings.xml and add this line
Code:
<string name="reboot_title">Reboot Options</string>
at the very end and before
Code:
sources>
then open public.xml and add this line :
Code:
<public type="string" name="reboot_title" id="0x01040695" />
The id must be the highest number of the whole file and of course must be unique.
When finished, you have to recompile it :
Code:
apktool b framework-res framework-res.apk
Then copy this file into the autosign folder and launch sign.bat
The framework-res.apk must be the only apk file !
Now you're done with this file.
Step 2: Editing android.policy.jar
open a terminal (cmd) and type
Code:
java -Xmx512m -jar baksmali.jar android.policy.jar
If everything's ok, you'll have an "out" subfolder. Go to
Code:
\out\com\android\internal\policy\impl
copy the three files : GlobalActions$99$1.smali, GlobalActions$99$2.smali, GlobalActions$99.smali. into it.
In file "GlobalActions$99.smali" there is id 0x1110008, you might want to check that this id is same in you roms public.xml (config_sf_slowBlur ). Check also that ids 0x104000a = "ok" -string and 0x104 = "cancel" -string matches in your framework.
Edit with notepad++ GlobalActions.smali
-Search mRestart and check these lines just before mRestart
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;
Code:
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$5;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
the 5 could be different so just be sure to have the same line.
-Change number 6 to 99 (both of them) :
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
Code:
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
Now edit with notepad++ GlobalActions$SinglePressAction.smali
-Before line "# instance fields"
paste following code :
Code:
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
Then after line "# direct methods"
paste following code :
Code:
.method static constructor <clinit>()V
.registers 3
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Recovery"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
Compile your jar :
Code:
java -Xmx512m -jar smali.jar out -o classes.dex
You'll obtain a classes.dex file. Open your android.policy.jar original and replace the classes.dex by the new one.
Now you're done !
I put the final work attached to this thread with the other files so you can test it.
Maybe there's another way to do this so feel free to leave comments
Good luck !
Good work mate. :thumbup:
Been having a few issues getting this done previously. Will have a look a see if I've messed anything up and compare my method to this. Probably lack of sleep didn't help....
Hopefully will have time to try again for my upcoming build v2.1 release. Just on the progress of optimizing every apk png. Rather long process......
Sent from my GT-I9300 using xda premium
UpInTheAir said:
Good work mate. :thumbup:
Been having a few issues getting this done previously. Will have a look a see if I've messed anything up and compare my method to this. Probably lack of sleep didn't help....
Hopefully will have time to try again for my upcoming build v2.1 release. Just on the progress of optimizing every apk png. Rather long process......
Sent from my GT-I9300 using xda premium
Click to expand...
Click to collapse
Well I could have forgotten some stuff cause of lack of sleep too
just tell me which step is wrong
Thanks mate
nah... the step is quite thorough... i dont have any problem following it... kind of miss read in some of the other thread that you link... i was tinkering the firmware for extended power menu base of it last time... but still... lack of sleep is not helping.. and reading in those condition is worse...
mengpo said:
Well I could have forgotten some stuff cause of lack of sleep too
just tell me which step is wrong
Thanks mate
Click to expand...
Click to collapse
Sorry, didn't mean to imply there is anything wrong with your guide / process.
Meant that a have just tried using a different guide (and failed with this build) and may have made some errors due to lack of sleep at the time.
I will give your guide a try soon. Will report what kind of success. Edit: Hopefully you will see the results in my next build ! Been a long day, so not the best time to do it right now.
Haven't even had the time to try your kernel too, busy busy busy.
Worked a treat thanks. :good:
Used my own framework-res.apk and android.policy.jar so my current mods would be unaffected.
Saved me a lot of time figuring out where I went wrong with a previous attempt from another guide, probably a typo somewhere I was more careful following your guide, and not so tired
You'll see this mod in my next ROM build v2.1 very soon, . Thanks
UpInTheAir said:
Worked a treat thanks. :good:
Used my own framework-res.apk and android.policy.jar so my current mods would be unaffected.
Saved me a lot of time figuring out where I went wrong with a previous attempt from another guide, probably a typo somewhere I was more careful following your guide, and not so tired
You'll see this mod in my next ROM build v2.1 very soon, . Thanks
Click to expand...
Click to collapse
You're welcome !
I'm so happy (and proud ) my mod will be used in your rom
mengpo said:
Here is another tutorial which will teach you how to add a powermenu to your stock rom ICS for the P6810 only.
Sources:
http://forum.xda-developers.com/showthread.php?t=1805408
http://forum.xda-developers.com/showthread.php?t=1208320
http://forum.xda-developers.com/showthread.php?t=1801137
Files:
http://www.mediafire.com/?46ta4oa6woe923d,8pcaw7edzd4isk0,8n0ibr7b0127zm5
Step 0: Requirements
Java JRE, JDE and notepad++;
apktool, aapt.exe and autosign (attached in this thread) for editing framework-res.apk;
smali, baksmali;
a framework-res.apk for your device;
an android.policy.jar for your device.
Step 1: Editing framework-res.apk
Create a folder decompiling where you can put all the files.
First decompile the framework-res.apk :
open a terminal (cmd) and type
Code:
java -jar apktool.jar d framework-res.apk framework-res
you'll have a framework-res folder.
Go to
Code:
\Decompiling\framework-res\res\values\
Edit with notepad++ strings.xml and add this line
Code:
<string name="reboot_title">Reboot Options</string>
at the very end and before
Code:
sources>
then open public.xml and add this line :
Code:
<public type="string" name="reboot_title" id="0x01040695" />
The id must be the highest number of the whole file and of course must be unique.
When finished, you have to recompile it :
Code:
apktool b framework-res framework-res.apk
Then copy this file into the autosign folder and launch sign.bat
The framework-res.apk must be the only apk file !
Now you're done with this file.
Step 2: Editing android.policy.jar
open a terminal (cmd) and type
Code:
java -Xmx512m -jar baksmali.jar android.policy.jar
If everything's ok, you'll have an "out" subfolder. Go to
Code:
\out\com\android\internal\policy\impl
copy the three files : GlobalActions$99$1.smali, GlobalActions$99$2.smali, GlobalActions$99.smali. into it.
In file "GlobalActions$99.smali" there is id 0x1110008, you might want to check that this id is same in you roms public.xml (config_sf_slowBlur ). Check also that ids 0x104000a = "ok" -string and 0x104 = "cancel" -string matches in your framework.
Edit with notepad++ GlobalActions.smali
-Search mRestart and check these lines just before mRestart
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$5;
Code:
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$5;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
the 5 could be different so just be sure to have the same line.
-Change number 6 to 99 (both of them) :
Code:
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$99;
Code:
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$99;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
Now edit with notepad++ GlobalActions$SinglePressAction.smali
-Before line "# instance fields"
paste following code :
Code:
# static fields
.field protected static rebootMode:I
.field protected static final rebootOptions:[Ljava/lang/String;
Then after line "# direct methods"
paste following code :
Code:
.method static constructor <clinit>()V
.registers 3
const/4 v0, 0x3
new-array v0, v0, [Ljava/lang/String;
const/4 v1, 0x0
const-string v2, "Reboot"
aput-object v2, v0, v1
const/4 v1, 0x1
const-string v2, "Recovery"
aput-object v2, v0, v1
const/4 v1, 0x2
const-string v2, "Download"
aput-object v2, v0, v1
sput-object v0, Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;->rebootOptions:[Ljava/lang/String;
return-void
.end method
Compile your jar :
Code:
java -Xmx512m -jar smali.jar out -o classes.dex
You'll obtain a classes.dex file. Open your android.policy.jar original and replace the classes.dex by the new one.
Now you're done !
I put the final work attached to this thread with the other files so you can test it.
Maybe there's another way to do this so feel free to leave comments
Good luck !
Click to expand...
Click to collapse
I have started to add reboot and recovery options to my phone MMX a110
The following thread has details of what I've done. Please suggest me to move further.
I am stuck at globalAction.smali
http://forum.xda-developers.com/showthread.php?p=36944844#post36944844
would any of you know how to add home to the powermenu, all guides I could find are for cm7?
Hey Guys, I am back with another guide and this time i will show you how to add KitKat Easter Egg in your ROM.
Disclaimer: I and XDA are not responsible for the damage of your phone. Take necessary backup if you are indoubt.
Requirements:
framework.jar from your ROM
Know how to decompile APK
Easter Egg app attached below
Let's start
1. Decompile framework.jar
2. Go to smali/com/android/internal/app
and open PlatLogoActivity.smali
3. Select all and replace it with this code:
Code:
.class public Lcom/android/internal/app/PlatLogoActivity;
.super Landroid/app/Activity;
.source "PlatLogoActivity.java"
# direct methods
.method public constructor <init>()V
.registers 1
.prologue
.line 12
invoke-direct {p0}, Landroid/app/Activity;-><init>()V
return-void
.end method
# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
.registers 7
.parameter "savedInstanceState"
.prologue
.line 16
invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V
.line 18
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 19
.local v1, intent:Landroid/content/Intent;
new-instance v2, Landroid/content/ComponentName;
const-string v3, "ss.ms1410.kitkateasteregg"
const-string v4, "ss.ms1410.kitkateasteregg.PlatLogoActivity"
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 23
:try_start_16
invoke-virtual {p0, v1}, Lcom/android/internal/app/PlatLogoActivity;->startActivity(Landroid/content/Intent;)V
:try_end_19
.catch Landroid/content/ActivityNotFoundException; {:try_start_16 .. :try_end_19} :catch_1d
.line 39
:goto_19
invoke-virtual {p0}, Lcom/android/internal/app/PlatLogoActivity;->finish()V
.line 41
return-void
.line 31
:catch_1d
move-exception v0
.line 35
.local v0, e:Landroid/content/ActivityNotFoundException;
const-string v2, "First install that app MuSaddiq told you to!"
const/4 v3, 0x0
invoke-static {p0, v2, v3}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object v2
invoke-virtual {v2}, Landroid/widget/Toast;->show()V
goto :goto_19
.end method
4. Recompile framework.jar
Push it into system/framework
Set correct permissions(rw-r--r--)
5. Install this app by me, it contains the Easter Egg code and that smali above redirects to it:
Download:
For LDPI Devices
For HDPI Devices
For XHDPI Devices
6. Now go to your Settings and multiple tap on Android Version
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Credits:
m4rinko2
iamareebjamal
Github Source
If you liked this MOD then just click here and here
Reserved 01
Note: First you need to install Android 4.4's framework-res.apk to decompile KitKatEasterEgg.apk.
Change the letter K
To change the letter K follow the steps below
1. Decompile KitKatEasterEgg.apk
2. Go to smali/ss/ms1410/kitkateasteregg/
Open PlatLogoActivity.smali
3. Find
Code:
const-string v0, "K"
4. Change K to whatever your want.
5. Recompile and Sign the apk.
Change the ANDROID 4.4 Text
To change ANDROID 4.4 text follow the steps below
1. Decompile KitKatEasterEgg.apk
2. Go to smali/ss/ms1410/kitkateasteregg/
Open PlatLogoActivity.smali
3. Find
Code:
const-string v0, "ANDROID 4.4"
4. Change ANDROID 4.4 to whatever your want.
5. Recompile and Sign the apk.
Change the font
To change the font of letter K follow the steps below
1. Rename your font's file name to Roboto-Bold.
2. Decompile KitKatEasterEgg.apk
3. Copy and paste your font in assets folder
4. If asked to replace, click yes.
5. Recompile and Sign the apk.
To change the font of ANDROID 4.4 text follow the steps below
1. Rename your font's file name to Roboto-Light.
2. Decompile KitKatEasterEgg.apk
3. Copy and paste your font in assets folder
4. If asked to replace, click yes.
5. Recompile and Sign the apk.
Change the Android Logo
To change the Android Logo follow the steps below
1. Rename your Logo's file name to platlogo
2. Decompile KitKatEasterEgg.apk
3. Copy and paste your logo in res/drawable-nodpi folder
4. If asked to replace, click yes.
5. Recompile and Sign the apk.
Change the red background
To change the red background follow the steps below
1. Decompile KitKatEasterEgg.apk
2. Go to smali/ss/ms1410/kitkateasteregg/
Open PlatLogoActivity.smali
As the background color is in smali code so we can't use the hex color codes to change the bg color.
To get the color codes of smali use Android Color Converter.
Using Android Color Convertor:
Download and extract ACC.zip
Run ACC.
Paste the HEX color code in the HEX Tab.
Press the convert button.
It will automatically convert the hex color code into smali color code.
Now copy the smali color code from the SMALI Tab.
3. Find this line
Code:
.field static final BGCOLOR:I = [COLOR="Red"]-0x12E2DC[/COLOR]
Change the highlighted code(smali color code) to your code(smali color code)
4. Now find this line
Code:
const v0, [COLOR="red"]-0x12E2DC[/COLOR]
Again change the highlighted code(smali color code) to your code(smali color code)
5. Recompile and Sign KitKatEasterEgg.apk
Awesome job! I guess i don't have to sign the framework.jar Nd yeah will it work on CM7.2?
aniket.lamba said:
Awesome job! I guess i don't have to sign the framework.jar Nd yeah will it work on CM7.2?
Click to expand...
Click to collapse
No need to sign the framework.jar and I don't know about CM7.2 but there is no harm in trying.
MuSaddiq said:
No need to sign the framework.jar and I don't know about CM7.2 but there is no harm in trying.
Click to expand...
Click to collapse
Ok I'll try it right now.
aniket.lamba said:
Ok I'll try it right now.
Click to expand...
Click to collapse
It will surely work on CM7 rom....
Go ahead and try it
Nice work op
Wow! Awesome guide sir...
Here is my easter egg:
awesome guide frnd. I was waiting for it!!!!!!!!!
DC07 said:
Nice work op
Click to expand...
Click to collapse
GhostRider921 said:
Wow! Awesome guide sir...
Click to expand...
Click to collapse
kumar akarsh said:
awesome guide frnd. I was waiting for it!!!!!!!!!
Click to expand...
Click to collapse
Thank u everyone
Do I need to deodex first before using this guide? Sorry but I'm new to this.
Sent from my GT-S5300 using Tapatalk 2
If Galaxy y users ever get 4.0 then dont forget to try this app : http://forum.xda-developers.com/showthread.php?t=2569170
Its kitkat platlogo app for android 4.0+
luqman98 said:
Do I need to deodex first before using this guide? Sorry but I'm new to this.
Sent from my GT-S5300 using Tapatalk 2
Click to expand...
Click to collapse
Yes, u need to be deodexed.
Sent from my GT-I9192 using xda app-developers app
Very Nice Work
Nice Bro I like Your work:thumbup:
iamareebjamal said:
Very Nice Work
Click to expand...
Click to collapse
shadman0 said:
Nice Bro I like Your work:thumbup:
Click to expand...
Click to collapse
Thanks
good guide dude!!! Thanks!!
---------- Post added at 04:17 PM ---------- Previous post was at 04:13 PM ----------
please add instructions of how to decompile your kitkatapp ^_^ not all of us know how to decompile it.. thanks. :cyclops:
markmellarpes said:
please add instructions of how to decompile your kitkatapp ^_^ not all of us know how to decompile it.. thanks. :cyclops:
Click to expand...
Click to collapse
Why? Are you getting any error?
MuSaddiq said:
Why? Are you getting any error?
Click to expand...
Click to collapse
yup.. i dunno why.. there is no apktool.yml appearing.. error comes out when it is in the part of decompiling values xml
undefinedresobject: resource spec: 0x01030119
ill try to redownload the apk again
edit:same result ^_^
markmellarpes said:
yup.. i dunno why.. there is no apktool.yml appearing.. error comes out when it is in the part of decompiling values xml
undefinedresobject: resource spec: 0x01030119
ill try to redownload the apk again
edit:same result ^_^
Click to expand...
Click to collapse
I am really sorry, I totally forgot to tell that first you need to install Android 4.4's framework-res.apk to decompile this apk.
Btw i will add this in op too.
Hi guys,
Today I'm going to share how to change the long press destination of any lidroid toggle, I didn't find any guide on it around so I decided to post it myself.... I'm definitely not the owner of lidroid toggles.....so let's begin
Requirements:
1. Brain
2. Patience
3. Experience
4. A SystemUI.apk with lidroid toggles
How to:
1. Decompile your SystemUI which already has lidroid
2. Go to smali/com/wanam/systemui/quickpanel
3. Now open any quicksetting button smali(open only those which don't have the $ mark, and remember that power button and shutdown are also on those which don't have the long press)
4. Now search this:
Code:
handleLongClick
5. Below them you'll gonna see the package and activity or in some smalis only the activities
Example:
1. Both package and activity:
From dormant toggle smali:
Code:
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.Settings$DormantmodeSettingsActivity"
2. Only with activity from sound toggle smali:
Code:
const-string v1, "android.settings.SOUND_SETTINGS"
6. Now for those smalis which has both package and activity if you want your long press destination to any other settings page just edit the activity to anything you want,
To say it easily edit the second one:
Code:
const-string v2, "com.android.settings.Settings$DormantmodeSettingsActivity"
from
Code:
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.Settings$DormantmodeSettingsActivity"
For those smalis which only have activity edit the activity just like before
7. After your editing is done as usual recompile, sign, push to system,reboot and enjoy
Credits:
Lidroid
@wanam All credits goes to them I didn't find any guide on it so that's why i just made it and shared
For lidroid toggles use sir wanam's guide:
http://forum.xda-developers.com/galaxy-s3/development/mod-add-customizable-23-statusbar-t2032614
To get activities use this app:
https://play.google.com/store/apps/details?id=de.szalkowski.activitylauncher
Update for Android 6.0.1:
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-secmmsepiccommon-touchwiz-mods-t3350454
Vietnamese guide
HOW TO DISABLE THE SMS TO MMS AUTO, UNLIMIT-CONVERSION WHILE EXCEED 3 SMS
WHAT DOES THIS MOD DO: This mod will let you type very long text messages and it won't automatically convert it into MMS.
★ Go into your system/priv-app/SecMms_Delight_Open folder and take out your "SecMms_Delight_Open.apk"
★ Then use one of the applications such as apktools or baksmali and then use the commands to decompile the SecMms_Delight_Open.apk
★ Once you have decompiled the SecMms_Delight_Open.apk, go to:
smali/com/android/mms/l.smali
Click to expand...
Click to collapse
Now open up "l.smali" with your notepad++ for editing.
Now for this part of this guide what I have highlighted in "GREEN" text is what you have to find using Notepad++, What you see in "RED" is the line you have to remove/delete completely, And also what you see in "BLUE" is the line you have to make changes to:
SEARCH FOR:
Code:
[COLOR="Green"] sput v0, Lcom/android/mms/l;->Q:I[/COLOR]
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
NOW REMOVE:
Code:
.line 213
[COLOR="Red"] const/4 v0, 0x4[/COLOR]
[COLOR="Green"] sput v0, Lcom/android/mms/l;->Q:I[/COLOR]
AND CHANGE TO:
Code:
.line 213
[COLOR="Blue"] const/16 v0, 0x3e8[/COLOR]
[COLOR="Green"] sput v0, Lcom/android/mms/l;->Q:I[/COLOR]
NOW SEARCH FOR:
Code:
[COLOR="Green"] sget v0, Lcom/android/mms/l;->Q:I[/COLOR]
AND REMOVE:
Code:
.method public static e()I
.locals 1
.prologue
.line 881
[COLOR="Red"] sget v0, Lcom/android/mms/l;->Q:I[/COLOR]
return v0
.end method
AND CHANGE TO:
Code:
.method public static e()I
.locals 1
.prologue
.line 881
[COLOR="Blue"] const/16 v0, 0x3e8[/COLOR]
return v0
.end method
NOW SEARCH FOR:
Code:
[COLOR="Green"] sput v1, Lcom/android/mms/l;->Q:[/COLOR]I
ABOVE THIS SAME LINE YOU HAVE TO ADD A NEW LINE WHICH IS IN BLUE:
Code:
.line 2481
const-string/jumbo v1, "pref_key_threshold"
const/4 v2, 0x4
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v1
[COLOR="Blue"] const/16 v1, 0x3e8[/COLOR]
[COLOR="green"] sput v1, Lcom/android/mms/l;->Q:I[/COLOR]
Once done now save changes, Recompile your SecMms_Delight_Open.apk and that's it you are now DONE!!!
HOW TO CHANGE THE MESSAGING TIME STAMPS TO ITS ORIGINAL TIME
WHAT DOES THIS MOD DO: This mod will show the exact sent time of received messages, not the moment when you actually received it on your phone.
★ Go into your system/priv-app/SecMms_Delight_Open folder and take out your "SecMms_Delight_Open.apk"
★ Then use one of the applications such as apktools or baksmali and then use the commands to decompile the SecMms_Delight_Open.apk
★ Once you have decompiled the SecMms_Delight_Open.apk, go to:
smali/com/android/mms/transaction/SmsReceiverService.smali
Click to expand...
Click to collapse
Now open up "SmsReceiverService.smali" with your notepad++ for editing.
Now for this part of this guide what I have highlighted in "GREEN" text is what you have to find using Notepad++, What you see in "RED" is the line you have to remove/delete completely, And also what you see in "BLUE" is the line you have to make changes to:
SEARCH FOR:
Code:
[COLOR="Green"] invoke-static {}, Ljava/lang/System;->currentTimeMillis()J[/COLOR]
THIS SAME LINE THAT YOU HAVE JUST LOOKED FOR, IS ALSO THE LINE YOUR GOING TO HAVE TO REMOVE WHICH SHOULD LOOK LIKE THIS:
Code:
.line 2668
:cond_8
const-string/jumbo v2, "date"
[COLOR="Red"] invoke-static {}, Ljava/lang/System;->currentTimeMillis()J[/COLOR]
move-result-wide v4
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
goto/16 :goto_1
.end method
AND THEN CHANGE IT TO THIS:
Code:
.line 2668
:cond_8
const-string/jumbo v2, "date"
[COLOR="Blue"] invoke-virtual {p1}, Landroid/telephony/SmsMessage;->getTimestampMillis()J[/COLOR]
move-result-wide v4
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v3
invoke-virtual {v1, v2, v3}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Long;)V
goto/16 :goto_1
.end method
Once done now save changes, Recompile your SecMms_Delight_Open.apk and that's it you are now DONE!!!
Comming soon...
Credit:
@jovy23
SecMms_Delight_Open (G920FXXU1AOCV): https://www.androidfilehost.com/?fid=23991606952591971
Mod by @Manh_IT
Test for TW Android 5.1.1 ROM (G925FXXU2BOGB) [July, 30 2015]:https://www.androidfilehost.com/?fid=24052804347783614
DISABLE THE SMS TO MMS AUTO-CONVERSION WHILE EXCEED 480 WORD
CHANGE THE MESSAGING TIME STAMPS TO ITS ORIGINAL TIME
ENABLE THE SCREEN ON/OFF TOGGLE
Click to expand...
Click to collapse
Great! nice work mate why dont u make thread on samsungviet.vn mate
nambavuong said:
Great! nice work mate why dont u make thread on samsungviet.vn mate
Click to expand...
Click to collapse
Ok, I will make thread on samsungviet.vn
Để chút em lên luôn
You can achieve this same thing without editing smali. CSC has a line for this.
Manh_IT said:
SecMms_Delight_Open (G920FXXU1AOCV): https://www.androidfilehost.com/?fid=23991606952591971
Mod by @Manh_IT
Click to expand...
Click to collapse
Can you please make a mod to send contacts in text format without turning it into a vcard file??
can you make a guide to mod unlimited text in popup windows?
Can you please update this guide for the 5.1.1 update?
The no SMS->MMS conversion mod doesn't work anymore on the 5.1.1 firmwares.
My S6 converts to MMS if there are more than 1 recipients, is it possible to edit this feature? Thanks!
edgarf28 said:
Can you please update this guide for the 5.1.1 update?
The no SMS->MMS conversion mod doesn't work anymore on the 5.1.1 firmwares.
Click to expand...
Click to collapse
I'll update soon!
SecMms_Delight_Open Mods for TW 5.1.1
Test for TW Android 5.1.1 ROM (G925FXXU2BOGB) [July, 30 2015]:https://www.androidfilehost.com/?fid=24052804347783614
DISABLE THE SMS TO MMS AUTO-CONVERSION WHILE EXCEED 480 WORD
CHANGE THE MESSAGING TIME STAMPS TO ITS ORIGINAL TIME
ENABLE THE SCREEN ON/OFF TOGGLE
Click to expand...
Click to collapse
@nambavuong @edgarf28 You can help me test it? Thank!!!
Manh_IT said:
Test for TW Android 5.1.1 ROM (G925FXXU2BOGB) [July, 30 2015]:https://www.androidfilehost.com/?fid=24052804347783614
@nambavuong @edgarf28 You can help me test it? Thank!!!
Click to expand...
Click to collapse
Dl now to test on edgars rom
Living on the edge
Manh_IT said:
Test for TW Android 5.1.1 ROM (G925FXXU2BOGB) [July, 30 2015]:https://www.androidfilehost.com/?fid=24052804347783614
@nambavuong @edgarf28 You can help me test it? Thank!!!
Click to expand...
Click to collapse
Thanks for this...
But unfortunately the screen on/off toggle mod isn't there... can't find any setting about this under the messaging app settings. Also the screen still turns on when receiving an message.
The SMS -> MMS conversion mod works though.
I don't know about the time-stamps mod (don't know how I can test this)
edgarf28 said:
Thanks for this...
But unfortunately the screen on/off toggle mod isn't there... can't find any setting about this under the messaging app settings. Also the screen still turns on when receiving an message.
The SMS -> MMS conversion mod works though.
I don't know about the time-stamps mod (don't know how I can test this)
Click to expand...
Click to collapse
"DISABLE THE SMS TO MMS AUTO-CONVERSION WHILE EXCEED 480 WORD" mod work ?
"CHANGE THE MESSAGING TIME STAMPS TO ITS ORIGINAL TIME"
WHAT DOES THIS MOD DO: This mod will show the exact sent time of received messages, not the moment when you actually received it on your phone.
Manh_IT said:
Test for TW Android 5.1.1 ROM (G925FXXU2BOGB) [July, 30 2015]:https://www.androidfilehost.com/?fid=24052804347783614
@nambavuong @edgarf28 You can help me test it? Thank!!!
Click to expand...
Click to collapse
Can this be done for back-to-n0t3 port ? Or tell me how to ?
Thanks
hi,
where can i find the screen on/off toggle mod
THX
Just flashed it over sixperience rom, and working like a charm lel thx for the mod tho ))
hi mate @Manh_IT
i try your guide for 5.1.1 COH2 firmware
but i have problem becouse in l.smali i don't have sput v0, Lcom/android/mms/l;->Q:I
regards ambasadii
edit:
no matter ,resolved!
Anyone know the way to get split view in landscape working?
Sent from my S4 via the NSA network
Bump... anyone please?
Would you perchance know where the wallpaper is being called upon when a theme is being applied? We have a ported s6 rom to the note 3 and everything works brilliant except for the bubbles and background portion of the apk. It seems that something is broken and it doesn't see the bubble images or the backgrounds when a theme is applied. We did figure out the bubbles finally but the background images elude us. Thank you for any assistance. We assume it's an xml file but not seeing where it calls the image for background.