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.
About :
This is for make CM7 ROM like Jellybean ROM layout on statusbar.
Credits :
- To Cool
- GDX Team
- DCSMS
- big thanks goes to AChep
Contents :
Post one:
-> Set up
-> Make Clock, date and day
-> Make Network speed on statusbar
-> Customize clear button
Tool used :
-> Apk Tool / Apk Manager / ToolAlite
-> SystemUI.apk
-> Notepad++
Screenshot :
{
"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"
}
Click to expand...
Click to collapse
Guide 1.0 : How To Make Date, Time and Day on Status Bar Expanded
1. you need to decompile your SystemUI.apk (please dont tell me how to do that)
2. extract my jelly.zip.. download on attachment below
3. copy 2 files blablablajellyblablabla.smali to SystemUI.apk/smali/com/android/systemui/statusbar/here
4. now you need to modify status_bar_expanded.xml find on SystemUI.apk/res/layout/here
for first you need to find this line :
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/carrier_label_layout" android:layout_width="fill_parent" android:layout_height="wrap_content">
paste this code below :
Code:
<com.android.systemui.statusbar.StatusBarJellyHeaderView android:layout_width="wrap_content" android:layout_height="wrap_content" />
5. now recompile your file and push to system/app
=======================================================================================================
Screenshot :
Click to expand...
Click to collapse
Guide 2.0 : How To Create Network Traffic Speed on Status Bar
1. you need to decompile your SystemUI.apk (please dont tell me how to do that)
2. extract my network.zip.. download on attachment below
3. copy folder smali to SystemUI.apk/here
4. now you need to modify status_bar.xml find on SystemUI.apk/res/layout/here
for first you need to find this line :
Code:
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
paste this code below :
Code:
<LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true">
<in.jmkl.dcsms.statusbargreper.DataTrafik android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
5. now recompile your file and push to system/app
=======================================================================================================
Screenshot :
Click to expand...
Click to collapse
Guide 3.0 : How To Make Customization Your Clear Button
1. you need to decompile your SystemUI.apk (please dont tell me how to do that)
2. extract my clearbutton.zip.. download on attachment below
3. copy 3 files to drawable-xxxx (xxxx is by your phone, mdpi, hdpi, ldpi or xhdpi)
4. now you need to modify xxx.xml (create by your self), styles.xml, status_bar_expanded.xml
for first you need to create clear_button.xml on drawable folder and copy this line to your xml file :
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:state_enabled="true" android:drawable="@drawable/btn_clear_focus" />
<item android:state_window_focused="false" android:state_enabled="false" android:drawable="@drawable/btn_clear" />
<item android:state_pressed="true" android:drawable="@drawable/btn_clear_pressed" />
<item android:state_focused="true" android:state_enabled="true" android:drawable="@drawable/btn_clear_focus" />
<item android:state_enabled="true" android:drawable="@drawable/btn_clear_focus" />
<item android:state_focused="true" android:drawable="@drawable/btn_clear_focus" />
<item android:drawable="@drawable/btn_clear_focus" />
</selector>
now, open the styles.xml on SystemUI.apk/res/values/here and copy this line in the end before </resources> line :
Code:
<style name="Awesome.Button" parent="@android:style/Widget.Button">
<item name="android:textAppearance">?android:textAppearanceSmallInverse</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/clear_button</item>
<item name="android:focusable">true</item>
<item name="android:clickable">true</item>
</style>
note : this line on red colors is pointed to your new xml file
Code:
<item name="android:background">@drawable/[COLOR="Red"]clear_button[/COLOR]</item>
now, open the status_bar_expanded.xml on SystemUI.apk/res/layout/here and find this line :
Code:
<TextView android:layout_gravity="center_vertical" android:id="@id/clear_all_button"
modify the line styles or paste my line like this :
Code:
<TextView android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:paddingLeft="15.0dip" android:paddingRight="15.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginBottom="1.0dip" android:text="@string/status_bar_clear_all_button" style="@style/Awesome.Button" />
5. now recompile your file and push to system/app
Guide 4.0 : How to add settings button on Status Bar Expdanded
1. you need to decompile SystemUI.apk (please dont tell me how to do that)
2. download my zip from here and extract it
3. now you must modify status_bar_expanded.xml
for first you need to find this line :
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
after that line, add this line :
Code:
<ImageView android:layout_gravity="center_vertical" android:id="@id/settings_button" android:paddingLeft="0.0dip" android:paddingTop="0.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:contentDescription="@string/accessibility_settings_button" />
now, you must open string.xml and add this line on bottom :
Code:
<string name="accessibility_settings_button">System settings.</string>
open ids.xml and add this line on bottom :
Code:
<item type="id" name="settings_button">false</item>
now, you must extract settingsshortcut.zip.. extract to your decompiled folder and then compile your SystemUI.apk this is for got public id number.. so after compiled, you must decompile again.
open public.xml and StatusBarService.smali. Find this line on public.xml :
Code:
<public type="id" name="settings_button" id="[COLOR="Red"]0x7f090027[/COLOR]" />
the red color may be different
find this line on StatusBarService.smali :
Code:
.field mScrollView:Landroid/widget/ScrollView
and then add this line below :
Code:
.field mSettingsBut:Landroid/view/View;
.field private mSettingsButListener:Landroid/view/View$. OnClickListener;
now, find this line :
Code:
iput-object v0, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStopTracing:Ljava/lang/Runnable;
and then add this line below :
Code:
.line 1703
new-instance v0, Lcom/android/systemui/statusbar/StatusBarService$8;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/StatusBarService$8;-><init>
(Lcom/android/systemui/statusbar/StatusBarService;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View $OnClickListener;
return-void.
find this line again :
Code:
iput v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I
If not find, change v7 to v8
and then add this line below :
Code:
.line 333
const v7, [COLOR="Red"]0x7f090027[/COLOR]
invoke-virtual {v1, v7}, Lcom/android/systemui/statusba/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v7
iput-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
.line 334
iget-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View $OnClickListener;
invoke-virtual {v7, v8}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
*for the red color on .line 333 you must change to your settings_button on your public.xml
*if your find iput v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mEdgeBorder:I so v7 change to v8. and the line will be like this :
Code:
.line 333
const v8, 0x7f090029
invoke-virtual {v2, v8}, Lcom/android/systemui/statusbar/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v8
iput-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
.line 334
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsBut:Landroid/view/View;
iget-object v9, p0, Lcom/android/systemui/statusbar/StatusBarService;->mSettingsButListener:Landroid/view/View $OnClickListener;
invoke-virtual {v8, v9}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
now, copy StatusBarService$8.smali to SystemUI.apk/smali/com/android/systemui/statusbar/here after that compile and push to system/app.
================================================== ================================================== ===
Guide 5.0 : How to add carrier label on statusbar close on
1. you need to decompile SystemUI.apk (please dont tell me how to do that)
2. now you must modify status_bar_tracking.xml
for first you need to find this line :
Code:
<com.android.systemui.statusbar.CloseDragHandle
and then paste this line below :
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff" android:gravity="center_horizontal" android:paddingBottom="1.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="1.0dip" />
re-compile and push to system/app
for update
Nice tutorial
thanks
ariadelvana95 said:
Nice tutorial
thanks
Click to expand...
Click to collapse
with my pleasure..
I would spam your thanks button if you do this status bar for latest minicm7 2.2.1
Sent from my E15i using xda app-developers app
mantap !!! nice tutorial ! i've been searching for this tutorial and now i found it
what cm7 theme your using can u share?
heheh, that's my jelly bean statusbar
Where have I gone wrong?? Clear text is also displayed along with the image.
Have attached SystemUI.apk after doing all the mods (except network thing)
-------------------EDIT-----------------------------------
solved. Had to edit strings.xml
Now the problem is the clear button won't stay at the right corner. Screenshot attached..
Nice..
I like your guide..
Sent from my GT-S5660 using Tapatalk 2
CWM or AROMA installer???
Mobil cihazdan gönderildi..
aOS 2.3.6 BNC-GIO-R2
MMB-Tweaks_0.9_Fix
m.ali.ozkaya said:
CWM or AROMA installer???
Mobil cihazdan gönderildi..
aOS 2.3.6 BNC-GIO-R2
MMB-Tweaks_0.9_Fix
Click to expand...
Click to collapse
What is the point of your question??
:what:
Sent from my GT-S5660 using Tapatalk 2
Thanks man! nice guide
Next.....!
Guide 4.0 : How To Make Customization Your Setting Button ^0^
---------- Post added at 02:49 AM ---------- Previous post was at 02:47 AM ----------
Xr01d_GT said:
solved. Had to edit strings.xml
Now the problem is the clear button won't stay at the right corner. Screenshot attached..
Click to expand...
Click to collapse
how to edit strings.xml?
thanks
Doesn't work for me unfortunately. CM7 on LG P990. No status bar.
Xr01d_GT said:
Where have I gone wrong?? Clear text is also displayed along with the image.
Have attached SystemUI.apk after doing all the mods (except network thing)
-------------------EDIT-----------------------------------
solved. Had to edit strings.xml
Now the problem is the clear button won't stay at the right corner. Screenshot attached..
Click to expand...
Click to collapse
sorry mate I late for reply just have low connection on Indonesia.. for make dissapear "clear" text on clear button you need to edit string.xml
so, this is guide for it..
Open your string.xml on SystemUI.apk/res/values/here and find this line :
Code:
<string name="blablabla_clear_button">Clear</string>
now, you must modify the syntact like this :
Code:
<string name="blablabla_clear_button"/string>
do the same if you want dissapear the text for Notifications, On Going, No Notifications
Imperticus said:
Doesn't work for me unfortunately. CM7 on LG P990. No status bar.
Click to expand...
Click to collapse
please attach your logcat mate, maybe i can help you
x-dira said:
Thanks man! nice guide
Next.....!
Guide 4.0 : How To Make Customization Your Setting Button ^0^
---------- Post added at 02:49 AM ---------- Previous post was at 02:47 AM ----------
how to edit strings.xml?
thanks
Click to expand...
Click to collapse
Yes i will add this guide, but not now.. so wait for my guide updates..
m.ali.ozkaya said:
CWM or AROMA installer???
Mobil cihazdan gönderildi..
aOS 2.3.6 BNC-GIO-R2
MMB-Tweaks_0.9_Fix
Click to expand...
Click to collapse
This is mod guide, so you can modding systemui.apk by your self.. not flasable.zip
AiphNday said:
Nice..
I like your guide..
Sent from my GT-S5660 using Tapatalk 2
Click to expand...
Click to collapse
thanks mate will update if i not busy
Mockingbird said:
I would spam your thanks button if you do this status bar for latest minicm7 2.2.1
Sent from my E15i using xda app-developers app
Click to expand...
Click to collapse
just attach your systemui.apk
saldymhmd said:
mantap !!! nice tutorial ! i've been searching for this tutorial and now i found it
Click to expand...
Click to collapse
haha.. sama2 master
english : haha.. your welcome master
dredremon said:
what cm7 theme your using can u share?
Click to expand...
Click to collapse
i use my own rom.. not a theme
AChep said:
heheh, that's my jelly bean statusbar
Click to expand...
Click to collapse
yes mate.. hey everyone give thanks to AChep his owner of jelly layout date, time and day.. on updates i will add your name on OP post.. sorry i forget that.. i just remember you're a part of ginger dx team
Got it to work now
petrukgrinder said:
just attach your systemui.apk
Click to expand...
Click to collapse
Can u share systemui.apk
thanks
Hello guys, long time no see and long time to find this source code..
this source code made by Jmkl six and my alien friend Rizaleon give me this source. This source only for Samsung Galaxy Young Phone with stock ROM, but here i has been change some code for working on CM7 ROM. So, here we go!!
First you need to see my screenshot :
{
"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"
}
First Step :
1. you must know how to decompiling/compiling apk
2. knowledge about editing smali/xml
3. you must have apktool/apkmanager
Second Step :
1. Pull your SystemUI.apk and Framework-res.apk
2. Do if framework on apktool/apkmanager
3. Decompile your SystemUI.apk and open statusbarservice.smali
Third Step :
1. Find this line :
Code:
.method getExpandedHeight()I
- And delete this line :
Code:
iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I
move-result v1
sub-int/2addr v0, v1
2. Find this line :
Code:
const v4, 0x20300
- Change this line :
Code:
const/16 v3, 0x7de
- To this line :
Code:
const/16 v3, 0x7d3
3. Find this line :
Code:
method onTrackingViewAttached()V
- Change this line :
Code:
const/16 v4, 0x7de
- To this line :
Code:
const/16 v4, 0x7d3
4. Find this line :
Code:
.method updateExpandedViewPos(I)V
- Look at this line :
Code:
.line 1627
.end local v2 #disph:I
.end local v3 #h:I
:cond_2
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;
invoke-virtual {v8}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I
move-result v8
move v3, v8
- Delete this line :
Code:
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;
invoke-virtual {v8}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I
move-result v8
move v3, v8
- And now paste this line after :cond_2 :
Code:
const/4 v3, 0x0
- So will look like this :
Code:
.line 1627
.end local v2 #disph:I
.end local v3 #h:I
:cond_2
const/4 v3, 0x0
5. Save your smali file and close.
Fourth Step :
1. Open status_bar.xml and find this line :
Code:
<com.android.systemui.statusbar.DateView
- Change the this line :
Code:
android:background="@drawable/xxxxx"
- To this line :
Code:
android:background="@drawable/trans"
- So will look like this :
Code:
<com.android.systemui.statusbar.DateView android:background="@drawable/trans"
2. Save your XML file and Recompile your SystemUI.apk then push it to /system/app
3. Goodluck
Click to expand...
Click to collapse
NB :
1. you must have a transparant picture and rename it to "trans.png" and move it to "drawable-xxxx" folder. look at below for resolution :
hdpi : 480x25 pixels
mdpi : 320x25 pixels
ldpi : 240x25 pixel
Credit :
- Jmkl six
- Rizaleon
- Samsung Galaxy Young Official Group Indonesian
- Alien Inside Themer Team
- Tiny Anastasia Development
petrukgrinder said:
Hello guys, long time no see and long time to find this source code..
this source code made by Jmkl six and my alien friend Rizaleon give me this source. This source only for Samsung Galaxy Young Phone with stock ROM, but here i has been change some code for working on CM7 ROM. So, here we go!!
First you need to see my screenshot :
NB :
1. you must have a transparant picture and rename it to "trans.png" and move it to "drawable-xxxx" folder. look at below for resolution :
hdpi : 480x25 pixels
mdpi : 320x25 pixels
ldpi : 240x25 pixel
Credit :
- Jmkl six
- Rizaleon
- Samsung Galaxy Young Official Group Indonesian
- Alien Inside Themer Team
- Tiny Anastasia Development
Click to expand...
Click to collapse
ohh menn.. your awesome.. !
nice guide.. :thumbup:
Sent from my GT-I8150 using xda premium
---------- Post added at 03:17 PM ---------- Previous post was at 03:16 PM ----------
Hello guys, long time no see and long time to find this source code..<br />
this source code made by Jmkl six and my alien friend Rizaleon give me this source. This source only for <font color="Red">Samsung Galaxy Young Phone with stock ROM</font>, but here i has been change some code for <font color="Red">working on CM7 ROM</font>. So, here we go!!<br />
<br />
<b>First you need to see my screenshot :</b><br />
<br />
<br />
<b>First Step :</b><br />
1. you must know how to decompiling/compiling apk<br />
2. knowledge about editing smali/xml<br />
3. you must have apktool/apkmanager<br />
<br />
<b>Second Step :</b><br />
1. Pull your <font color="Blue">SystemUI.apk</font> and <font color="Blue">Framework-res.apk</font><br />
2. Do <font color="Blue">if framework</font> on apktool/apkmanager<br />
3. Decompile your <font color="Blue">SystemUI.apk</font> and open <font color="Blue">statusbarservice.smali</font><br />
<br />
<b>Third Step :</b><br />
1. Find this line :<br />
.method getExpandedHeight()I
Click to expand...
Click to collapse
<br />
- And delete this line :<br />
iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;<br />
<br />
invoke-virtual {v1}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I<br />
<br />
move-result v1<br />
<br />
sub-int/2addr v0, v1
Click to expand...
Click to collapse
<br />
<br />
2. Find this line :<br />
const v4, 0x20300
Click to expand...
Click to collapse
<br />
- Change this line :<br />
const/16 v3, 0x7de
Click to expand...
Click to collapse
<br />
- To this line :<br />
const/16 v3, 0x7d3
Click to expand...
Click to collapse
<br />
<br />
3. Find this line :<br />
method onTrackingViewAttached()V
Click to expand...
Click to collapse
<br />
- Change this line : <br />
const/16 v4, 0x7de
Click to expand...
Click to collapse
<br />
- To this line : <br />
const/16 v4, 0x7d3
Click to expand...
Click to collapse
<br />
<br />
4. Find this line :<br />
.method updateExpandedViewPos(I)V
Click to expand...
Click to collapse
<br />
- Look at this line :<br />
.line 1627<br />
.end local v2 #disph:I<br />
.end local v3 #h:I<br />
:cond_2<br />
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;<br />
<br />
invoke-virtual {v8}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I<br />
<br />
move-result v8<br />
<br />
move v3, v8
Click to expand...
Click to collapse
<br />
- Delete this line :<br />
iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/CmStatusBarView;<br />
<br />
invoke-virtual {v8}, Lcom/android/systemui/statusbar/CmStatusBarView;->getHeight()I<br />
<br />
move-result v8<br />
<br />
move v3, v8
Click to expand...
Click to collapse
<br />
- And now paste this line after <font color="Blue">:cond_2</font> :<br />
const/4 v3, 0x0
Click to expand...
Click to collapse
<br />
- So will look like this :<br />
.line 1627<br />
.end local v2 #disph:I<br />
.end local v3 #h:I<br />
:cond_2<br />
const/4 v3, 0x0
Click to expand...
Click to collapse
<br />
5. Save your smali file and close.<br />
<br />
<b>Fourth Step :</b><br />
1. Open <font color="Blue">status_bar.xml</font> and find this line :<br />
<com.android.systemui.statusbar.DateView
Click to expand...
Click to collapse
<br />
- Change the this line :<br />
android:background="@drawable/xxxxx"
Click to expand...
Click to collapse
<br />
- To this line :<br />
android:background="@drawable/trans"
Click to expand...
Click to collapse
<br />
- So will look like this :<br />
<com.android.systemui.statusbar.DateView android:background="@drawable/trans"
Click to expand...
Click to collapse
<br />
<br />
2. Save your XML file and Recompile your SystemUI.apk then push it to /system/app<br />
3. Goodluck
Click to expand...
Click to collapse
<br />
<br />
<b>NB :</b><br />
1. you must have a transparant picture and rename it to "trans.png" and move it to "drawable-xxxx" folder. look at below for resolution :<br />
<br />
hdpi : 480x25 pixels<br />
mdpi : 320x25 pixels<br />
ldpi : 240x25 pixel<br />
<br />
<b>Credit :</b><br />
- Jmkl six<br />
- Rizaleon<br />
- Samsung Galaxy Young Official Group Indonesian<br />
- Alien Inside Themer Team<br />
- Tiny Anastasia Development
Click to expand...
Click to collapse
Sent from my GT-I8150 using xda premium
thanks for this useful guide
edit nevermind got it working xD
geva28 said:
thanks for this useful guide
Click to expand...
Click to collapse
your welcome my bro..
SpaceCaker said:
edit nevermind got it working xD
Click to expand...
Click to collapse
what your rom? cm7? if different please tell me.
Send from my fvckin fingers
petrukgrinder said:
your welcome my bro..
what your rom? cm7? if different please tell me.
Send from my fvckin fingers
Click to expand...
Click to collapse
on stock rom
i did this
Remove
Code:
- iget-object v1, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/StatusBarView;
-
- invoke-virtual {v1}, Lcom/android/systemui/statusbar/StatusBarView;->getHeight()I
-
- move-result v1
-
- sub-int/2addr v0, v1
-
change
Code:
const/16 v3, 0x7de
to
Code:
const/16 v3, 0x7d3
chagne
Code:
const/16 v3, 0x7de
to
Code:
const/16 v3, 0x7d3
remove
Code:
- .line 1388
- iget-object v8, p0, Lcom/android/systemui/statusbar/StatusBarService;->mStatusBarView:Lcom/android/systemui/statusbar/StatusBarView;
-
- invoke-virtual {v8}, Lcom/android/systemui/statusbar/StatusBarView;->getHeight()I
-
- move-result v3
-
Code:
.line 1410
:cond_2
add
Code:
const/4 v3, 0x0
so it looks like this
Code:
.line 1410
:cond_2
const/4 v3, 0x0
const/16 v8, -0x2711
i git diffed my changes to my original systemui and this is the diff
https://github.com/spacecaker/git_status_xp/commit/59a39cd9181cf5241960c105e3d3fb607ce9a59a
Could u send me your .png file responsible for background of clock, date and setting button ?
BlackLie said:
Could u send me your .png file responsible for background of clock, date and settings button ?
Click to expand...
Click to collapse
u can do it by your self with knowledge of photoshop or search any psd files with keywords "emboss style". sorry i can't give your png, cause now i don't using a systemui like that and i forgot where i save it.
Send from my fvckin fingers
petrukgrinder said:
u can do it by your self with knowledge of photoshop or search any psd files with keywords "emboss style". sorry i can't give your png, cause now i don't using a systemui like that and i forgot where i save it.
Send from my fvckin fingers
Click to expand...
Click to collapse
Okey dokey, thanks anyway Your tut is great
---------- Post added at 06:20 PM ---------- Previous post was at 05:59 PM ----------
petrukgrinder said:
u can do it by your self with knowledge of photoshop or search any psd files with keywords "emboss style". sorry i can't give your png, cause now i don't using a systemui like that and i forgot where i save it.
Send from my fvckin fingers
Click to expand...
Click to collapse
Ok, I had made it... which file should I replace ? (I tried trans.png, but it does not work)
Sorry for bothering you ;<
Thank brò ! work on cyanogenmod 7.2 !
BlackLie said:
Could u send me your .png file responsible for background of clock, date and setting button ?
Click to expand...
Click to collapse
how did you get the clock and date above the toggles? i'm trying to do that also, but no luck so far
even when i move the time and date layout all the way to the bottom, it doesn't move
mjz2cool said:
how did you get the clock and date above the toggles? i'm trying to do that also, but no luck so far
even when i move the time and date layout all the way to the bottom, it doesn't move
Click to expand...
Click to collapse
It's not my ss, sorry :<
after reading many ICS+ users requests, they want 4.2 lock screen clock.. here it is
{
"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"
}
Things Needed:
* smali & baksmali
* Text Editor
* Your device framework.jar
Step 1 : in lockscreen digital clock, there are actually 2 clock views overlapping one another...
java source :
Code:
CharSequence newTime = DateFormat.format(mFormat, mCalendar);
mTimeDisplayBackground.setText(newTime);
mTimeDisplayForeground.setText(newTime);
mAmPm.setIsMorning(mCalendar.get(Calendar.AM_PM) == 0);
and
Code:
private static final String SYSTEM_FONT_TIME_BACKGROUND = SYSTEM + "AndroidClock.ttf";
private static final String SYSTEM_FONT_TIME_FOREGROUND = SYSTEM + "AndroidClock_Highlight.ttf";
so we just have to use both views to get what we wanted, to do so follow steps,
decompile framework.jar goto : com\android\internal\widget\ , open DigitalClock.smali with a text editor..
search for :
Code:
Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
you will see these lines :
Code:
iget-object v2, p0, Lcom/android/internal/widget/DigitalClock;->mTimeDisplayBackground:Landroid/widget/TextView;
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
iget-object v2, p0, Lcom/android/internal/widget/DigitalClock;->mTimeDisplayForeground:Landroid/widget/TextView;
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
Step 2: below this,
Code:
iget-object v2, p0, Lcom/android/internal/widget/DigitalClock;->mTimeDisplayBackground:Landroid/widget/TextView;
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
add these lines :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, "h"
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
so now we just used second clock view which is add to android at API level 11 (Honeycomb).. but not used after ICS...
Step 3 : last step, by default as i said second clock view visibility is turned off
java source :
Code:
mTimeDisplayBackground = (TextView) findViewById(R.id.timeDisplayBackground);
mTimeDisplayBackground.setTypeface(sBackgroundFont);
mTimeDisplayBackground.setVisibility(View.[COLOR="Red"]INVISIBLE[/COLOR]);
to do so delete this line :
Code:
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
Step 4 : download font in attachments push them to system\fonts\
Step 5 : Save all changes and compile flash/push/do whateva
for those who want to know what is happening study modified AOSP DigitalClock source in attachment (unmodified),
Credits :
* Android for source
* jesusfreke for smali & baksmali Tools
can u plz... provide this mod for micromax a110
arjunsharma said:
can u plz... provide this mod for micromax a110
Click to expand...
Click to collapse
ask any dev in a110 fourms... @BOND1987 @Akhilendra1711 or @khan_frd2002 can do this for you... its easy....
akash akya said:
ask any dev in a110 fourms... @BOND1987 @Akhilendra1711 or @khan_frd2002 can do this for you... its easy....
Click to expand...
Click to collapse
@akash akya I will do after competing the 4.2 Quick panel
after this mod the lockscreen handle goes below its original position
is there any way to get it back to its original position???
Help would be appreciated
Cute Idiot said:
after this mod the lockscreen handle goes below its original position
is there any way to get it back to its original position???
Help would be appreciated
Click to expand...
Click to collapse
lol, nope... it remain untouched...
Can you please tell me what went wrong?
Here's mine. Seems like the 2 fonts overlapped with each other.
joeyhuab said:
Here's mine. Seems like the 2 fonts overlapped with each other.
Click to expand...
Click to collapse
bro you surly missed here :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, [COLOR="Red"]"h"[/COLOR]
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
also give me your keygaurd_unlock_xxx.xml.. just a little correction is there...
akash akya said:
bro you surly missed here :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, [COLOR="Red"]"h"[/COLOR]
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
also give me your keygaurd_unlock_xxx.xml.. just a little correction is there...
Click to expand...
Click to collapse
Nah, I'm sure I copied everything. Here's my files, kindly check them out, thanks!
joeyhuab said:
Nah, I'm sure I copied everything. Here's my files, kindly check them out, thanks!
Click to expand...
Click to collapse
give me DigitalClock.smali also.. i will check once..
akash akya said:
bro you surly missed here :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, [COLOR="Red"]"h"[/COLOR]
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
also give me your keygaurd_unlock_xxx.xml.. just a little correction is there...
Click to expand...
Click to collapse
akash akya said:
give me DigitalClock.smali also.. i will check once..
Click to expand...
Click to collapse
Here you go, this is my DigitalClock.smali from my Stock framework.jar
joeyhuab said:
Here you go, this is my DigitalClock.smali from my Stock framework.jar
Click to expand...
Click to collapse
try this one...
http://www.mediafire.com/?cm6dza6nepkbxjt
Thanks man!
akash akya said:
try this one...
http://www.mediafire.com/?cm6dza6nepkbxjt
Click to expand...
Click to collapse
Although there's something with the hours that doesn't feel right, this one works like a charm! THANKS A LOT!
joeyhuab said:
Although there's something with the hours that doesn't feel right, this one works like a charm! THANKS A LOT!
Click to expand...
Click to collapse
change red code in your keygaurd_screen _tab_unlock.xml
Code:
<com.android.internal.widget.DigitalClock [COLOR="Red"]android:layout_gravity="left"[/COLOR] android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" [COLOR="Blue"]android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"[/COLOR] android:layout_marginBottom="12.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
<TextView android:textSize="14.0sp" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginTop="18.0dip" android:singleLine="true" android:layout_toRightOf="@id/timeDisplayForeground" android:layout_alignBottom="@id/timeDisplayForeground" />
</com.android.internal.widget.DigitalClock>
if it looks odd, then tune blue code....
akash akya said:
change red code in your keygaurd_screen _tab_unlock.xml
Code:
<com.android.internal.widget.DigitalClock [COLOR="Red"]android:layout_gravity="left"[/COLOR] android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" [COLOR="Blue"]android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"[/COLOR] android:layout_marginBottom="12.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
<TextView android:textSize="14.0sp" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginTop="18.0dip" android:singleLine="true" android:layout_toRightOf="@id/timeDisplayForeground" android:layout_alignBottom="@id/timeDisplayForeground" />
</com.android.internal.widget.DigitalClock>
if it looks odd, then tune blue code....
Click to expand...
Click to collapse
LOL THIS happened when I did that. ) No worries, I'll just put it back to the old format, it looks good anyways! THANKS A LOT! :victory:
joeyhuab said:
LOL THIS happened when I did that. ) No worries, I'll just put it back to the old format, it looks good anyways! THANKS A LOT! :victory:
Click to expand...
Click to collapse
oops missed this :silly:
Code:
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" [COLOR="Red"]android:layout_gravity="center" [/COLOR]android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" [COLOR="red"]android:layout_gravity="center" [/COLOR]android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
and as i said you have to tune left margin for cleaner look...
Hey, the files to edit the clock for me are not in framework.jar ): any helps=?
anerik said:
Hey, the files to edit the clock for me are not in framework.jar ): any helps=?
Click to expand...
Click to collapse
its impossible afiak... take look at xxx_framework.jar or framework_xxx.jar
akash akya said:
its impossible afiak... take look at xxx_framework.jar or framework_xxx.jar
Click to expand...
Click to collapse
Ok found it in android/widget in framework.jar, sorry that was my bad, but yet it is too different from yours to try!
Dynamic Status Bar (JB 4.2)
TESTED and is 100% working on GSmart Aku A1 and Stock Rom Lenovo a369i Row Lite S008 Deodexed
Original tutorial here: MOD Edit :- Links Removed
-----------------------------------------------------
Requirements:
Apktool version 1.52
01.DECOMPILE Settings.apk
02.Copy and merge all files from folder Settings in Settings.apk (after decompile)
03.Open and paste the following code in res/values/strings.xml (before </resources>)
<string name="dynamic_status_bar_title">Dynamic status bar</string>
<string name="dynamic_status_bar_color_title">Dynamic status bar color</string>
<string name="dynamic_status_bar_color_summary">Automatically update background color of the status bar</string>
<string name="dynamic_status_bar_gradient_title">Gradient</string>
<string name="dynamic_status_bar_gradient_summary">Overlay a gradient on the status bar</string>
<string name="dynamic_status_bar_filter_title">Darkening</string>
<string name="dynamic_status_bar_filter_summary">Overlay a darkening filter on the status bar</string>
(Save)
04.Open and paste this code in res/xml/display_settings.xml : <PreferenceCategory androidersistent="false" android:title="@string/display_personalize" android:key="display_personalize">
<PreferenceScreen android:title="@string/dynamic_status_bar_title" android:fragment="com.android.settings.oplosandev.DSBSettings" />
</PreferenceCategory>
(Save)
05.RECOMPILE Settings.apk & DECOMPILE again to edit some public ids.
06.Open public.xml in res/values/public.xml and find "deuge_dsb_settings". Copy that id.
07.Open DSBSettings.smali in folder smali/com/android/settings/oplosandev. Find const v0, 0x7f060052 and replace with id which you copied earlier.
08.Save & RECOMPILE
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
09.DECOMPILE SystemUI.apk
10.Merge folder SystemUI with SystemUI.apk (after decompile)
11.Open and paste the following code in res/values/ids.xml (before </resources>)
<item type="id" name="dynamic_status_bar_color">false</item>
<item type="id" name="dynamic_status_bar_filter">false</item>
<item type="id" name="dynamic_status_bar_gradient">false</item>
<item type="id" name="dynamic_status_bar_lockscreen_filter">false</item>
(Save)
12.Open gemini_status_bar in res\layout. Find android:background="@drawable/status_bar_background". Replace this way: android:background="#00000000"
13.Add this code in the begining of the script: xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.fmd.statusbarcolor.color android:id="@id/dynamic_status_bar_color" android:layout_width="fill_parent" android:layout_height="fill_parent">
<View android:id="@id/dynamic_status_bar_filter" android:background="#30000000" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<View android:id="@id/dynamic_status_bar_gradient" android:background="@drawable/dynamic_status_bar_drawable_gradient" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.fmd.statusbarcolor.color>
<View android:id="@id/dynamic_status_bar_lockscreen_filter" android:background="#83000000" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
14.RECOMPILE SystemUI.apk & DECOMPILE again to edit some public ids.
15.DECOMPILE using your ROM framework-res.apk and open public.xml in res/values. Find "status_bar_height" and copy that id. If you can't find it: go to res/values, open dimens.xml, add a new dimension with this id (status_bar_height), set dimension to 25dip (or you will get a buggy tinting, but this number may differ so test more dimensions until it works because this is the height of the part which will be scanned to get the color) then compile and recompile and try to get the id.
16.Open color.smali in systemui/smali/com/fmd/statusbarcolor. Find const v4, 0x105000c and replace with the id which you copied earlier.
17.Open public.xml in res/values. Find and copy this ids:
"dynamic_status_bar_color"
"dynamic_status_bar_filter"
"dynamic_status_bar_gradient"
18.Open color.smali in systemui/smali/com/fmd/statusbarcolor. Find and replace ids:
const v0, 0x7f08012b ("dynamic_status_bar_color") - ada 2 -
const v0, 0x7f08012c ("dynamic_status_bar_filter") - ada 2 -
const v0, 0x7f08012d ("dynamic_status_bar_gradient") - ada 2 -
(Save)
19.RECOMPILE, SIGN, PUSH (Settings.apk & SystemUI.apk) in /system/app & set permissions to rw-r-r & reboot.
20.Go to Dynamic Status Bar opening Settings > Display settings > Dynamic Status Bar.
CREDIT: Alex & rK
http://the-daffi.blogspot.ro/2015/11/guide-tutorial-buat-dinamic-statusbar.html?m=1
Translated by minealex2244 (I'm not Indonesian, I'm Romanian ) from indonesian.
P. S. I added a line in original guide to fix an error and an important note reffering to status_bar_height which is important.
Don't expect miracles I'm only 17 years old
Would give it a shot. I am on TW Samsung rom and I guess the concept is still the same, exept some changes in resources
Sent from my SM-N920I using Tapatalk
Sir would you please make an auto tint guide for gb roms?thanks.
Android小楼阁-QQ群 439637151
来自搭载Android 2.3 GingerBread的华为Y220-T10
hi i cant find oplosandev in my settings.what should i do?'
thanks
pro1001 said:
hi i cant find oplosandev in my settings.what should i do?'
thanks
Click to expand...
Click to collapse
Hi! Sorry but I was inactive a time oplosandev in in attachment, just add it in your settings.
zhaozihanzzh said:
Sir would you please make an auto tint guide for gb roms?thanks.
Android小楼阁-QQ群 439637151
来自搭载Android 2.3 GingerBread的华为Y220-T10
Click to expand...
Click to collapse
Sorry but GB doesn't support auto tinting.
minealex2244 said:
Sorry but GB doesn't support auto tinting.
Click to expand...
Click to collapse
You're welcome.I found another guidehttp://forum.xda-developers.com/android/general/how-to-tinted-status-bar-using-app-t3048978 can tint GB status bar,it needs to replace app package and hex color.
Sorry for my bad english.
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
zhaozihanzzh said:
You're welcome.I found another guidehttp://forum.xda-developers.com/android/general/how-to-tinted-status-bar-using-app-t3048978 can tint GB status bar,it needs to replace app package and hex color.
Sorry for my bad english.
来自华为荣耀畅玩4C CHM-TL00H -天生急性子 Android 小楼阁
Click to expand...
Click to collapse
That's cool. I didn't know that GB got this awesome feature . And your english is very good
cant find This Ids
17.Open public.xml in res/values. Find and copy this ids:
"dynamic_status_bar_color"
"dynamic_status_bar_filter"
"dynamic_status_bar_gradient"
18.Open color.smali in systemui/smali/com/fmd/statusbarcolor. Find and replace ids:
const v0, 0x7f08012b ("dynamic_status_bar_color") - ada 2 -
const v0, 0x7f08012c ("dynamic_status_bar_filter") - ada 2 -
const v0, 0x7f08012d ("dynamic_status_bar_gradient") - ada 2 -
i cant find These Ids and when i compile and decompile i dont find the smali folder
TheBlackCoder7 said:
17.Open public.xml in res/values. Find and copy this ids:
"dynamic_status_bar_color"
"dynamic_status_bar_filter"
"dynamic_status_bar_gradient"
18.Open color.smali in systemui/smali/com/fmd/statusbarcolor. Find and replace ids:
const v0, 0x7f08012b ("dynamic_status_bar_color") - ada 2 -
const v0, 0x7f08012c ("dynamic_status_bar_filter") - ada 2 -
const v0, 0x7f08012d ("dynamic_status_bar_gradient") - ada 2 -
i cant find These Ids and when i compile and decompile i dont find the smali folder
Click to expand...
Click to collapse
Please use Apktool v1.5.2, import framework-res from /system/framework plus mediatek-res.apk.
It's simple to find the IDs, just follow my guide and you will learn something new
how can i immplement or add option or app into SecSettings.apk with android 6.0.1
awadh730 said:
how can i immplement or add option or app into SecSettings.apk with android 6.0.1
Click to expand...
Click to collapse
Adding a new option in TW 6.0 Settings is really hard and I never tested that. There are some tutorials on XDA of how to add (link) an app in Settings and for new options if you search how to add new options in settings on XDA you will find what you need (this task is for devs only because is about adding features). Hope it helps
I'll stop supporting this thread as I no longer have a device to test this feature.