Related
this is the final method that will add reboot,recovery and download options
to the power menu updated 10/21/2010
============================================================
Step 1.
the first thing we need to do is add string and image resources to framwork-res
for this example I am using a stock JI6 ROM your resource id's will be different
if on another ROM
use apk_manager to decompile framework-res
open "values\strings.xml" and add our string resources
Code:
<string name="reboot_recovery">Recovery</string>
<string name="reboot_download">Download</string>
<string name="reboot">Reboot</string>
save and close
open "values\public.xml" and assign our strings resource id's
scroll until you get to the end of the "<public type="string"" id list
note the id of the last string, in this example it is "10403c2" sometimes
the id's are out of order so search for "10403c2 + 1" or "10403c3"
if the next id is unused then we can start assigning id's to the strings
we added.
Code:
<public type="string" name="reboot_recovery" id="0x010403c3" />
<public type="string" name="reboot_download" id="0x010403c4" />
<public type="string" name="reboot" id="0x010403c5" />
now is a good time to add the image resources so add your icons to
"res\drawable-hdpi"
and assign id's to them the same way we did for the strings
in this example, using the example icons in the zip file I had
Code:
<public type="drawable" name="reboot" id="0x010803aa" />
<public type="drawable" name="recovery" id="0x010803ab" />
<public type="drawable" name="download" id="0x010803ac" />
save and close
now framework-res has the resources needed for this mod use
apk_manager to compile.
============================================================
Step 2.
next we need to modify Samsung's shutdown method to accept 3 more options
so decompile framework and open "com\android\internal\app\ShutdownThread.smali"
since we are going to pass an integer to ShutdownThread and then evaluate
that integer when the code runs we have to have a spot for the integer so
add this to line 37
Code:
.field public static mReboot:I
then in method run at line 1463 add this code before "invoke-static {}, Landroid/os/Power;->shutdown()V"
Code:
sget v1, Lcom/android/internal/app/ShutdownThread;->mReboot:I
const/4 v2, 0x1
if-eq v1, v2, :reboot
const/4 v2, 0x2
if-eq v1, v2, :rebootRecovery
const/4 v2, 0x3
if-eq v1, v2, :rebootDownload
then after this code on about line 1477
Code:
.line 531
invoke-static {}, Landroid/os/Power;->shutdown()V
.line 532
return-void
add this code
Code:
:reboot
const-string v4, "now"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
:rebootRecovery
const-string v4, "recovery"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
:rebootDownload
const-string v4, "download"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
save and close
compile framework
============================================================
Step 3.
now we are going to add the extra options to the power menu
decompile android.policy
open "com\android\internal\policy\impl\GlobalActions.smali"
the first thing that we need to do is increase the array length by 3
so in method createDialog on line 431 change this
Code:
const/4 v0, 0x3
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
to this
Code:
const/4 v0, 0x6
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
now add the new menu items this is where the resource id's that we added
to framework-res com into play so on line 457 after "aput-object v2, v0, v1"
add this code
Code:
const/4 v1, 0x3
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$7;
const v3, 0x10803aa # reboot icon resource id
const v4, 0x10403c5 # reboot string resource id
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x4
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$8;
const v3, 0x10803ab # recovery icon resource id
const v4, 0x10403c3 # recovery string resource id
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x5
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
const v3, 0x10803ac # download icon resource id
const v4, 0x10403c4 # download string resource id
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
make sure to change the resource id's to match what you added to to framework-res
save and close
next add the code that runs when the menu item is pressed
copy GlobalActions$3.smali and name it GlobalActions$7.smali
open GlobalActions$7 and replace all instances of GlobalActions$3
with GlobalActions$7 then add this code to line 52 before
"invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V"
Code:
const/4 v2, 0x1
sput v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
save and close
copy GlobalActions$3.smali and name it GlobalActions$8.smali
open GlobalActions$8 and replace all instances of GlobalActions$3
with GlobalActions$8 then add this code to line 52 before
"invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V"
Code:
const/4 v2, 0x2
sput v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
save and close
copy GlobalActions$3.smali and name it GlobalActions$9.smali
open GlobalActions$9 and replace all instances of GlobalActions$3
with GlobalActions$9 then add this code to line 52 before
"invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V"
Code:
const/4 v2, 0x3
sput v2, Lcom/android/internal/app/ShutdownThread;->mReboot:I
save and close
compile android.policy
done test on the phone.
flash the attached update.zip with the stock updater.
Anyway to get this in a flashable zip? I don't know how to decompile files
BabyBoi.JN said:
Anyway to get this in a flashable zip? I don't know how to decompile files
Click to expand...
Click to collapse
bump Bump bump please
Nice
Sent from my vibrant
BabyBoi.JN said:
Anyway to get this in a flashable zip? I don't know how to decompile files
Click to expand...
Click to collapse
I second that. I miss that option
where is policy file
how to decompile
i use ubuntu
thx
Sent from my SGH-T959 using XDA App
sounds like a great add-in if could be made flashable
adm1jtg said:
sounds like a great add-in if could be made flashable
Click to expand...
Click to collapse
Either that or a how to for dummies version
Sent from Vibrant Frankin Twiz Update3 JI2 modem.bin jac kernel with voodoo lagfix on XDA app with no fc's FINALLY!
daddysays said:
Either that or a how to for dummies version!
Click to expand...
Click to collapse
EXACTLY!!! That's what I need LOL
untermensch said:
someone asked for this so here it is.
decompile android.policy
make a copy of GlobalActions$3.smali and name it to GlobalActions$7.smali open GlobalActions$7.smali
and replace all instances of GlobalActions$3 with GlobalActions$7
replace method onPress with this
Code:
.method public onPress()V
.registers 3
const-string v0, "Reboot Now"
invoke-static {v0}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
.end method
save and close
now open GlobalActions.smali
and in method createDialog
the first thing that we need to do is increase the array length by 1 so find this
Code:
const/4 v0, 0x3
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
and change to
Code:
const/4 v0, 0x4
new-array v0, v0, [Lcom/android/internal/policy/impl/GlobalActions$Action;
next we add the new menu item so on line 457 we add this next bit of code after "aput-object v2, v0, v1"
Code:
const/4 v1, 0x3 # position in the menu array
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$7;
const v3, 0x1080030 # power icon
const v4, 0x10402af # reboot string
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
framework-res already has a string for reboot so no modifications are needed to framework-res
save and close then compile android.policy
Click to expand...
Click to collapse
Hi,
Thanks so much for this, absolutely fantastic work like always!
For anyone that doesn't know how to decompile/compile apk files search for either APK Manager, or smali/baksmali tutorial/help/etc., it should help you out greatly.
And for those that want a flashable .zip, well, here you go, BUT, I'm lazy, so it requires some conditions:
1) You use a rom based on JI6 that's fully deodexed
2) you have previously flashed (or your custom rom included) the epic/puzzle lockscreen mod (also from untermensch)
3) You disable voodoo (if you use it) prior to flashing since this zip attempts to wipe your dalvik-cache
That said, zip should flash fine from clockwork, and all it does is replace your android.policy.jar with one pre-modded for lockscreen & reboot option support, and it wipes your dalvik-cache since that's the safest thing to do after applying any mod, period.
Cheers, =)
s0niqu3 said:
Hi,
Thanks so much for this, absolutely fantastic work like always!
For anyone that doesn't know how to decompile/compile apk files search for either APK Manager, or smali/baksmali tutorial/help/etc., it should help you out greatly.
And for those that want a flashable .zip, well, here you go, BUT, I'm lazy, so it requires some conditions:
1) You use a rom based on JI6 that's fully deodexed
2) you have previously flashed (or your custom rom included) the epic/puzzle lockscreen mod (also from untermensch)
3) You disable voodoo (if you use it) prior to flashing since this zip attempts to wipe your dalvik-cache
That said, zip should flash fine from clockwork, and all it does is replace your android.policy.jar with one pre-modded for lockscreen & reboot option support, and it wipes your dalvik-cache since that's the safest thing to do after applying any mod, period.
Cheers, =)
Click to expand...
Click to collapse
I was just about to upload the zip...
Oh well, beat me to it
s0niqu3 said:
Hi,
Thanks so much for this, absolutely fantastic work like always!
For anyone that doesn't know how to decompile/compile apk files search for either APK Manager, or smali/baksmali tutorial/help/etc., it should help you out greatly.
And for those that want a flashable .zip, well, here you go, BUT, I'm lazy, so it requires some conditions:
1) You use a rom based on JI6 that's fully deodexed
2) you have previously flashed (or your custom rom included) the epic/puzzle lockscreen mod (also from untermensch)
3) You disable voodoo (if you use it) prior to flashing since this zip attempts to wipe your dalvik-cache
That said, zip should flash fine from clockwork, and all it does is replace your android.policy.jar with one pre-modded for lockscreen & reboot option support, and it wipes your dalvik-cache since that's the safest thing to do after applying any mod, period.
Cheers, =)
Click to expand...
Click to collapse
You sir are a gentleman and a scholar
b0ricuaguerrero said:
You sir are a gentleman and a scholar
Click to expand...
Click to collapse
lol,
Appreciate the thought, but wrong gender, =)
b0ricuaguerrero said:
You sir are a gentleman and a scholar
Click to expand...
Click to collapse
LOL perhaps you meant you maam are a babe and a diva. Either way thanks so much for this.
Very nice, thank's for sharing.
Looks like I'm disabling Voodoo once again.
great job. done
Sent from my SGH-T959 using XDA App
Fyi the reboot after install takes longer than after installing a new rom
Sent from my SGH-T959
Many thanks for the file!
...but because I'm lazy and if I'm reading the file poster's req's correctly her version requires I flash a lockscreen I don't currently have, would any Gentleman or Lady be kind enough to build a .zip file which will work on a Stock Vibrant JI6 install?
Thnx!
I just got done flashing and it works great ty
Sent from bionix 1.9.1 jacs oc/uv vodoo kernel
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?
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?
Here's A New Guide To Add Battery Percentage On Lockscreen
Requirements -:
1. android.policy.jar
2. framework-res.apk
PHP:
First,We Edit "framework-res.apk" present here (system/framework/framework-res.apk)
Decompile framework-res.apk Through Apktool (if you dont know how to decompile,See on XDA How to Decompile,Recompile Or Ask Someone)
After Decompiling -> Go Here
framework-res/res/values/string.xml
PHP:
Open String.xml in Notepad++
After Opening -> Hit These Two Keys (ctrl+f)
And Copy This____ Charging ____ Then Hit Enter
Change The Charging Text To____ Charge Status _____ -> After Changing -> Save it.
Now,Main Work Here in Smali
PHP:
Decompile "android.policy.jar" present here (system/framework/android.policy.jar)
After Decompiling -> Open This smali file Through Notepad++
android.policy/com/android/internal/policy/impl/KeyguardUpdateMonitor.smali
Open KeyguardUpdateMonitor.smali
Search For This Line Through Notepad++ By Hitting Ctrl+f
PHP:
.method public shouldShowBatteryInfo()Z
The Whole Code Looks Like....
PHP:
.method public shouldShowBatteryInfo()Z
.registers 2
.prologue
.line 1000
sget v0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mBatteryInfoState:I
if-eqz v0, :cond_6
const/4 v0, 0x1
:goto_5
return v0
:cond_6
const/4 v0, 0x0
goto :goto_5
.end method
After Editing It Looks Like....
PHP:
.method public shouldShowBatteryInfo()Z
.registers 2
.prologue
.line 1000
sget v0, Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;->mBatteryInfoState:I
if-eqz v0, :cond_6
const/4 v0, 0x1
:goto_5
const/4 v0, 0x1
return v0
:cond_6
const/4 v0, 0x0
goto :goto_5
.end method
ENJOY.......!!!!!!!!!!
Credits - To Me Kartik [email protected]
Thanks Dude , its working 100%
ZindaqI said:
Thanks Dude , its working 100%
Click to expand...
Click to collapse
Adding more stuffs after some tym.
kartik verma said:
Adding more stuffs after some tym.
Click to expand...
Click to collapse
you can change charge icon to battery icon .. also you can make lockscreen transparent
ZindaqI said:
you can change charge icon to battery icon .. also you can make lockscreen transparent
Click to expand...
Click to collapse
sorry sir , but i know all about these things.
nice guide bro. keep it up the good work :good::good:
kartik verma said:
PHP:
First,We Edit "framework-res.apk" present here (system/framework/framework-res.apk)
Decompile framework-res.apk Through Apktool (if you dont know how to decompile,See on XDA How to Decompile,Recompile Or Ask Someone)
After Decompiling -> Go Here
framework-res/res/values/string.xml
PHP:
Open String.xml in Notepad++
After Opening -> Hit These Two Keys (ctrl+f)
And Copy This____ Charging ____ Then Hit Enter
Change The Charging Text To____ Charge Status _____ -> After Changing -> Save it.
Click to expand...
Click to collapse
I didnt Get this mate. Can you explain?
jasper~ said:
I didnt Get this mate. Can you explain?
Click to expand...
Click to collapse
decompile framework-res.apk , open string.xml present in values folder (framework-res/res/values/string.xml)
open it with notepad++ after this Hit 2 button ctrl+f and than type the text "charging" only charging and than hit enter u see an xml line contain charging text change it to "Charge Status"
dont use inverted commas " " there i just use it for highlighting the things
kartik verma said:
decompile framework-res.apk , open string.xml present in values folder (framework-res/res/values/string.xml)
open it with notepad++ after this Hit 2 button ctrl+f and than type the text "charging" only charging and than hit enter u see an xml line contain charging text change it to "Charge Status"
dont use inverted commas " " there i just use it for highlighting the things
Click to expand...
Click to collapse
Oh thanks bro. I have 1 question, is the battery percent still there when I charge my phone?
jasper~ said:
Oh thanks bro. I have 1 question, is the battery percent still there when I charge my phone?
Click to expand...
Click to collapse
it always on your device lockscreen ,if u charge ur device or if not.
kartik verma said:
it always on your device lockscreen ,if u charge ur device or if not.
Click to expand...
Click to collapse
Thanks! How to change charging icon?
jasper~ said:
Thanks! How to change charging icon?
Click to expand...
Click to collapse
decompile framework-res.apk (present in system/framework/framework-res.apk)
after decompiling go here.
framework-res/res/drawable-ldpi/ here is the png
search it and change it.
then recompile and push it to framework folder
tjbearX said:
nice guide bro. keep it up the good work :good::good:
Click to expand...
Click to collapse
how to get lockscreen like this