As everyone that frequents this forum knows, I haven't had the Revolution in a while. However, I really loved this community when I did have it and I'm always still stopping by on IRC and posting comments here and there. Well I wrote up a tutorial for modding the statusbar and would like to share it with you guys. So here you go.
Greetings all! Attention devs, themers and whoever else wants to do this lol. This is going to be a long post but I am putting this out there for whoever wants to use it. I cannot take full credit for this as there are quite a few posts that explain how to do this. I just went a lot more in depth and explained things so that even someone who has never done anything like this, can do it too.
This is going to be a tutorial of sorts on modding the statusbar so that you have the following:
Centered Clock
Statusbar Icons on the left
Centered Date
First, let me start by saying that I am in no way an expert on this and if this doesn't work for you, I might not be able to answer too many questions about it.
That being said, let's get started. First, you are going to need some stuff.
apkmanager: http://forum.xda-developers.com/showthread.php?t=695701
Notepad++: http://notepad-plus-plus.org/download/v5.9.6.2.html
The SystemUI.apk from your phone.
Now what you need to do is take that zip file for apkmanager that you downloaded and extract it somewhere that's easy to get to, like your desktop.
Inside the apkmanager folder on your desktop you should have 6 folders and 2 files. It should look like this:
{
"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"
}
NOTE: Do not change the names of any of these files or folders or the process will not work!
What you want to do next is take the SystemUI.apk that you pulled from your phone, either with Root Explorer or via ADB. And put your SystemUI.apk in the folder named "place apk here for modding."
Now double click the "Script" file to run it. A command prompt window will open up that looks like this:
Press "22" and hit the enter key to select your "project." Now press "1" and hit enter to select your SystemUI.apk as your current "project." Now you want to press "9" and hit enter to decompile the apk.
*NOTE: If you are trying to use a heavily themed SystemUI, this process might not work for you and you may have to find a stock SystemUI.apk and use it instead.
Now that the SystemUI is decompiled, go into the "projects" folder and you should see a SystemUI folder now. Open that up, then open the "res" folder and finally open the "layout" folder.
You should now be looking at a bunch of XML files. The one we're going to be editing is named "status_bar." That's the only XML file you're going to need to edit. Right click on that file and select either "Edit with Notepad++" or "Open with Notepad++," either one.
Now you should be looking at something similar to this:
Now comes the fun part!!
Centering the clock:
Open a new tab in your xml editor and paste this into it:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
</LinearLayout>
That's the section that puts the clock in the center of the statusbar. But there's currently no clock element in it yet. Go back to your status_bar.xml and look for the line that starts like this:
Code:
<com.android.systemui.statusbar.Clock
Remember, that clock line doesn't finish until you find the closing ">". Highlight and copy that entire line, then delete it, then go back to your new tab and paste it into the middle of the code snippet above. It should look something like this:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" [COLOR="Red"][B]android:gravity="center"[/B][/COLOR] android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
See the part in the string above that is red? I've highlighted it to show you that you have to change this part of the string from "left|center" to "center."
Now copy that entire string of code above and paste it just above the line the ends like this:
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
This is what you should end up with:
Code:
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textColor="#ffffffff" android:gravity="center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
Now we need to fix some stuff, like making the date centered and making it so that the date and the notifications don't overlap the clock.
To center the date, find the string of code that starts like this:
Code:
<com.android.systemui.statusbar.DateView
And scroll right, across that line until you see this:
Code:
android:gravity="left|center"
Change that part to this:
Code:
android:gravity="center"
Now scroll across that same line a little more, until you find this part:
Code:
android:layout_width="wrap_content"
Change it to this:
Code:
android:layout_width="fill_parent"
Congratulations your date is now centered!!
Now to fix the notification overlap, you need to find the line that starts like this:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/ticker"
Scroll all the way to end of that line and add this to the end:
Code:
android:background="@drawable/statusbar_background">
That entire line should now look like this:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/statusbar_background">
Clock centered, no overlap!!
Setting the icons to the left hand side of the statusbar: (optional)
First, find the line that starts like this:
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons"
Copy that entire line, then delete it and paste it above the line that starts like this:
Code:
<com.android.systemui.statusbar.IconMerger
In that same line, change this part:
Code:
android:layout_alignParentRight="true"
To this:
Code:
android:layout_alignParentLeft="true"
Now find the line that starts like this:
Code:
<com.android.systemui.statusbar.IconMerger
And change this part:
Code:
android:layout_alignParentLeft="true"
To this:
Code:
android:layout_alignParentRight="true"
Guess what? That's it, you're finally done lol! Now let's recompile the SystemUI.apk.
Before you close out of Notepad++, check your edited XML and make sure there are NO GAPS between the lines. What I mean is this, this is kind of what your xml should look like all the way through it:
dfsdfsdfsdfsdfsd
sdfsdfsdf
sdfsdfsdfsdsdfsdfsdfsdf
fsdfsdfsdfs
See, no gaps. It should NOT look like this:
asdasdasdasd
asdasdasdasd
asdasdasd
asdasdasdasd
See what I'm saying?
Close out of Notepad++ and make sure you save all the changes. If you don't, you're back at square one and will have to do everything again lol. You don't want that.
Go back to that command prompt window that opened up for apkmanager. If you closed it, that's fine, just double click the "Script" file again to open it back up.
Press "22" and hit enter to select your "project" again. Press "1" then hit enter to select the SystemUI.apk.
Press "11" to Compile the apk and cross your fingers that you didn't mess anything up. If you did, you will get an error upon compiling the apk and will have to start over again. If you don't get an error, you should get a message that says this:
Code:
Is this a system apk <y/n>
Press "y" and hit enter.
Then you should get:
Code:
Aside from signatures, would you like to copy over any additional files that you did not modify from the original apk in order to ensure least number of errors <y/n>
Press "y" and hit enter.
Next you should get this:
Do as it says and go into the "keep" folder that you now see with all the other folders (place apk here for blah blah blah).
Delete this file:
resources.arsc
And the "status_bar.xml", now go back to the command prompt and hit enter.
Let it run it's course and you should be good to go!!! Now look in the "place apk here for modding" folder and you should see a "unsignedSystemUI.apk"
Yes the file size will be a little different. That's ok!!!
Rename the file to "SystemUI" and either use adb to push it to your phone or place the apk on your sdcard and use Root Explorer to copy/paste it into /system/app
If you use Root Explorer, maybe even if you use adb. You will probably get some force closes after you push or paste the app. Your phone might even freeze up, mine did. That's ok too!!!! Pull the battery and restart your phone.
Now when you first boot up, you might not have a statusbar anymore. That's ok too lol. Using Root Explorer, navigate to /system/app and find the SystemUI.apk. Press and hold on it and select "Permissions." Change the permissions to look like this:
Exit out of Root Explorer and reboot. That's it, you're completely done! As soon as I can perfect it a little better, I will also post a walkthrough on switching around the order of the statusbar icons as well! Final results should look something similar to this:
Enjoy!!!! If you like this post and think it contributes, please press the "Thanks" button.
Very cool, hicks. Props.
How you like your droid charge hicks?
BLITZ Bulletproof ledded AWD SuperCharged GV + Nitro ;p
bhp117 said:
How you like your droid charge hicks?
BLITZ Bulletproof ledded AWD SuperCharged GV + Nitro ;p
Click to expand...
Click to collapse
Liked it at first but got sick of it. Traded it for a D3 which I now also hate lol. Let me tell you, Dual Core doesn't mean s**t. The Revo and the Charge I had were way faster than this piece of crap.
Wow. You took a lot of time for this lol. Good job
Haro912 said:
Wow. You took a lot of time for this lol. Good job
Click to expand...
Click to collapse
Lol yeah it only takes about 15 minutes to do all this but it took me 3 hours to write up haha.
hey spc_hicks09,
I have followed ur step, but couldn't change the position of the clock.
I want the clock and date should be middle of the screen and not the icon to the left
I have attached my systemUI.apk file, please mod the requirement? I am using Samsung galaxy ace
Thanks
ananrocks22 said:
hey spc_hicks09,
I have followed ur step, but couldn't change the position of the clock.
please post the systemui.apk which ur have mod?
I want the clock and date should be middle of the screen and only the icon to the left
I am using Samsung galaxy ace
Thanks
Click to expand...
Click to collapse
This isn't a tutorial for any device other than the LG Revolution.
Sent from my GingerFusion Revo using Tapatalk.
I haven't looked at your SystemUI or looked to see if spc mentioned it but this mod should work on anything as long a you are in gingerbread its just like transparency in the pulldown and status bar.
Sent from my VS910 4G using xda premium
Beamer9408 said:
I haven't looked at your SystemUI or looked to see if spc mentioned it but this mod should work on anything as long a you are in gingerbread its just like transparency in the pulldown and status bar.
Sent from my VS910 4G using xda premium
Click to expand...
Click to collapse
The instructions won't work for a CyanogenMod Based ROM. The framework and systemUI are different.
Sent from my GingerFusion Revo using Tapatalk.
Very true..I wasn't taking that into consideration
Sent from my VS910 4G using xda premium
Related
After reading this :
http://forum.xda-developers.com/showthread.php?t=748400
I had a look into framework-res.apk om my SGS and I found the same file:
res/layout/zzz_battery_alerting_popup.xml
I was wondering if the only way is to repack framework without that file, or is there any other option ?
AXMLPrinter2 output this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="0x00000011"
android:orientation="1"
android:id="@android:0102016C"
>
<TextView
android:textSize="18.0dip"
android:textColor="#FFFFFFFF"
android:gravity="0x00000003"
android:id="@android:0102020A"
android:paddingLeft="19.0dip"
android:layout_width="-1"
android:layout_height="-2"
>
</TextView>
</LinearLayout>
Where that message come from ? this define only layout! id like in-memory patch or hooking parent
husq510 said:
After reading this :
http://forum.xda-developers.com/showthread.php?t=748400
I had a look into framework-res.apk om my SGS and I found the same file:
res/layout/zzz_battery_alerting_popup.xml
I was wondering if the only way is to repack framework without that file, or is there any other option ?
AXMLPrinter2 output this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:gravity="0x00000011"
android:orientation="1"
android:id="@android:0102016C"
>
<TextView
android:textSize="18.0dip"
android:textColor="#FFFFFFFF"
android:gravity="0x00000003"
android:id="@android:0102020A"
android:paddingLeft="19.0dip"
android:layout_width="-1"
android:layout_height="-2"
>
</TextView>
</LinearLayout>
I use ApkManager (http://forum.xda-developers.com/showthread.php?t=695701) to decompile the apk and make code edits then recompile. But if you are looking to remove the xml file all together then just rename the .apk to .zip and open with 7zip in windows or in linux just double click to open. Then navigate to the file you wish to remove and delete it from the zip. This way you never actually extract the zip so everything stays in tact. When your done just rename it back to .apk
*** Just so you know if you remove that file it will remove the popup....but the phone locks up for a minute or two when the phones reaches its full charge. I am working hard on this and when I know more I will let you know.
Click to expand...
Click to collapse
okay, thanks alot. Wish to have good news from your soon.
One very annoying thing about the vibrant status bar (in ALL eclair ROMs) is the lack of visual feedback from selecting a notification item. Usually when you click a notification on stock, the item will turn orange. With the vibrant, this does not happen. The "pressed" state uses the same drawable as normal for notification icons. The same is true for the clear notifications button. I find this extremely annoying.
So, I went poking around in the framework-res.apk and found a typo in a status bar layout file. I fixed it so now it works!
EDIT: Oops! I posted the wrong file. It is actually "status_bar_latest_event.xml"
Sorry about that.
Here is the typo:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="66.0sp"
xmlns:android="http://schemas.android.com/apk/res/android">
<View android:background="@drawable/quick_panel_list_stroke_01" android:layout_width="fill_parent" android:layout_height="1.0sp" />
<com.android.server.status.LatestItemView android:id="@id/content" android:background=[COLOR="Red"]"@drawable/status_bar_item_background_normal"[/COLOR] android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="65.0sp" />
</LinearLayout>
That's the whole file. The "typo" is in red. "@drawable/status_bar_item_background_normal" points to a .9.png file which is why the drawable simply stayed the same ("normal") even when you clicked it.
What the file SHOULD say is this:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="66.0sp"
xmlns:android="http://schemas.android.com/apk/res/android">
<View android:background="@drawable/quick_panel_list_stroke_01" android:layout_width="fill_parent" android:layout_height="1.0sp" />
<com.android.server.status.LatestItemView android:id="@id/content" android:background=[COLOR="Red"]"@drawable/status_bar_item_background"[/COLOR] android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="65.0sp" />
</LinearLayout>
"@drawable/status_bar_item_background" points to an xml file which is a selector that tells the drawable to switch according to the view's state (pressed, selected, normal)
I've looked at several frameworks and they all have the same typo in them. After I found this, I looked at a nexus one framework and that confirmed that this is indeed the way the file should read. Whether this was intentionally done by Samsung or not, I do not know. Although I'm assuming it was a mistake.
To use:
1. Download attachment "status_bar_latest_event.xml.zip" and remove ".zip" (don't unzip)
2. MAKE A BACKUP OF YOUR FRAMEWORK-RES.APK
3. Open framework-res.apk with 7-zip or winrar or whatever (DO NOT unzip it)
4. Copy status_bar_expanded.xml to /res/layout/ and overwrite.
5. Do this:
Code:
adb shell stop
adb push /path/to/framework-res.apk /system/framework/
adb reboot
Enjoy!
I just wanted to say 1up on this... I
'd love to have this figured out.
I've noticed this as well. I'm not sure why out isn't doing it either, but I know it definitely works correctly in froyo.
I think I found it. Testing now.
EDIT: See first post.
Awesome find, adding to the directory now!
matt_stang said:
One very annoying thing about the vibrant status bar (in ALL ROMs) is the lack of visual feedback from selecting a notification item. Usually when you click a notification on stock, the item will turn orange. With the vibrant, this does not happen. The "pressed" state uses the same drawable as normal for notification icons. The same is true for the clear notifications button. I find this extremely annoying.
So, I went poking around in the framework-res.apk and found a typo in a status bar layout file. I fixed it so now it works!
To use:
1. Download attachment "status_bar_expanded.xml.zip" and remove ".zip" (don't unzip)
2. MAKE A BACKUP OF YOUR FRAMEWORK-RES.APK
3. Open framework-res.apk with 7-zip or winrar or whatever (DO NOT unzip it)
4. Copy status_bar_expanded.xml to /res/layout/ and overwrite.
5. Do this:
Code:
adb shell stop
adb push /path/to/framework-res.apk /system/framework/
adb reboot
Enjoy!
Click to expand...
Click to collapse
Hi,
Thanks for figuring this out.
Any chance of posting the typo fix in the OP?
It would make it easier for those of us running our own customized frameworks.
Mostly I'm just lazy and don't want to drop your xml into a file, decompile, diff against stock, diff against my customizations, etc., etc.
Cheers, =)
Did you ever try my ROM? You can't really say that it is missing in ALL ROMS if you haven't tried them all.
It defiantly wasn't missing in my Axura, it was just blue instead of orange
s0niqu3 said:
Hi,
Thanks for figuring this out.
Any chance of posting the typo fix in the OP?
It would make it easier for those of us running our own customized frameworks.
Mostly I'm just lazy and don't want to drop your xml into a file, decompile, diff against stock, diff against my customizations, etc., etc.
Cheers, =)
Click to expand...
Click to collapse
Yeah I'll update the first post in a second. I'm not sure if it was a typo or not but it seems like Samsung would have fixed it in the latest releases and leaks.
Master™ said:
Did you ever try my ROM? You can't really say that it is missing in ALL ROMS if you haven't tried them all.
It defiantly wasn't missing in my Axura, it was just blue instead of orange
Click to expand...
Click to collapse
Sorry! It's only the Eclair ROMs. As mentioned earlier, Froyo ROMs already have this fixed.
Thanks a lot....nice observation to find AND fix the typo
Hey good work! Will be including this in an update.
Hi again,
Quick FYI, if you want the "clear-all" button to show the pressed state, decompile twframework-res.apk and edit /res/layout/status_bar_expanded.xml
change the red highlighted text in the following to:
@drawable/quickpanel_btn_default
Code:
<Button android:textSize="14.0sp" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:background="[COLOR="Red"]@drawable/quick_panel_btn_default_normal[/COLOR]" android:layout_width="75.0dip" android:layout_height="wrap_content" android:layout_marginRight="6.0dip" android:text="@string/status_bar_clear_all_button" />
Then save and recompile.
Cheers everyone, =)
s0niqu3 said:
Hi again,
Quick FYI, if you want the "clear-all" button to show the pressed state, decompile twframework-res.apk and edit /res/layout/status_bar_expanded.xml
change the red highlighted text in the following to:
@drawable/quickpanel_btn_default
Code:
<Button android:textSize="14.0sp" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:background="[COLOR="Red"]@drawable/quick_panel_btn_default_normal[/COLOR]" android:layout_width="75.0dip" android:layout_height="wrap_content" android:layout_marginRight="6.0dip" android:text="@string/status_bar_clear_all_button" />
Then save and recompile.
Cheers everyone, =)
Click to expand...
Click to collapse
Thanks! I looked for that but didn't think to check the twframework again because the other fix was in the regular framework. I noticed in the regular framework the button code was fine but it didn't occur to me it might be in tw.
s0niqu3 said:
Hi again,
Quick FYI, if you want the "clear-all" button to show the pressed state, decompile twframework-res.apk and edit /res/layout/status_bar_expanded.xml
change the red highlighted text in the following to:
@drawable/quickpanel_btn_default
Code:
<Button android:textSize="14.0sp" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/clear_all_button" android:background="[COLOR="Red"]@drawable/quick_panel_btn_default_normal[/COLOR]" android:layout_width="75.0dip" android:layout_height="wrap_content" android:layout_marginRight="6.0dip" android:text="@string/status_bar_clear_all_button" />
Then save and recompile.
Cheers everyone, =)
Click to expand...
Click to collapse
------------------------------
I don't get why when I make changes to the twframework-res.apk file it always breaks the system with force closes.
phone - media - email all force close
I am using bionix 1.1
APK Manager 4.9
If I make any change to twframework-res.apk it ends in FCs.
When I tried to recreate from this tutorial its a no go.
I thought originally it might be a problem when recompiling, so I copied the modified files into the apk (I use winrar) but it still FCs.
The only way for me to have this work on my phone is to install it as it.
Any ideas?
Muffin-Factory said:
------------------------------
I don't get why when I make changes to the twframework-res.apk file it always breaks the system with force closes.
phone - media - email all force close
I am using bionix 1.1
APK Manager 4.9
If I make any change to twframework-res.apk it ends in FCs.
When I tried to recreate from this tutorial its a no go.
I thought originally it might be a problem when recompiling, so I copied the modified files into the apk (I use winrar) but it still FCs.
The only way for me to have this work on my phone is to install it as it.
Any ideas?
Click to expand...
Click to collapse
Hi,
Are your wiping your cache,
Dalvik-cache and fixing permissions before rebooting?
I'd say 95% of the time that solves fc issues for me when modifying system files.
Else I have no clue, I modify twframework-res all the time without issue.
Good luck though, cheers, =)
Help
s0niqu3 said:
Hi again,
Quick FYI, if you want the "clear-all" button to show the pressed state, decompile twframework-res.apk and edit /res/layout/status_bar_expanded.xml
change the red highlighted text in the following to:
@drawable/quickpanel_btn_default
Click to expand...
Click to collapse
Do you think you could post that xml file for us who are not so good at decompiling and using adb.
s0niqu3 said:
Hi,
Are your wiping your cache,
Dalvik-cache and fixing permissions before rebooting?
I'd say 95% of the time that solves fc issues for me when modifying system files.
Else I have no clue, I modify twframework-res all the time without issue.
Good luck though, cheers, =)
Click to expand...
Click to collapse
Ok, I don't quite understand how to edit twframework-res.apk.
If you would, please, a quick run down of options I should be selecting when decompiling and recompiling.
As of right now i have found out that my recompiling is not reencoding the xml files
Muffin-Factory said:
Ok, I don't quite understand how to edit twframework-res.apk.
If you would, please, a quick run down of options I should be selecting when decompiling and recompiling.
As of right now i have found out that my recompiling is not reencoding the xml files
Click to expand...
Click to collapse
Hi,
Do you use apk manager 4.9 to decompile?
If so, a straight decompile (option 9) is all I ever do for twframework-res.apk and it works fine. Now, when recompiling, if you start from something like bionix/hybrid/etc. base, its likely that they "cheated" when they replaced .9.png files for their theme, so you'll get errors when you recompile the framework.
So, here's my process if modding an already themed framework-res/twframework-res apk:
1) decompile apk
2) make my edits, try to recompile, if it errors, then:
3) Check the log, if its an error about a .9.png then:
4) decompile stock, non-themed apk from the rom version I use (JFD or JI6)
5) copy over the entire contents of the drawable-hdpi(-v4) folder to the apk I'm editing.
6) try to re-compile, 99% of the time, this works, since it seems most rom cooks like to cheat with their .9.png edits.
optional - 7) open the newly compiled apk and the original apk with 7zip and copy over the contents of the drawable-hspi(-v4) folder from the original/themed apk to my new compiled apk
8) zipalign apk
9) push apk to /system/framework
10) adb reboot recovery
11) reinstall packages to get into clockwork recovery
12) wipe cache, advanced wipe dalvik-cache and fix permissions
13) reboot
Hope this helps, cheers, =)
Dugorf said:
Do you think you could post that xml file for us who are not so good at decompiling and using adb.
Click to expand...
Click to collapse
Hi,
I don't really want to post my xml file for 2 reasons, (mostly for reason number 1 though.)
1) I made extra edits to it for my own personalized theme, and it might cause display issues for people using anything other than my own specific theme.
2) I'm kind of tired of people using somebody else's work and not giving credit. I see a lot of my battery icons used all over the place, and very rarely do people link back to the thread, or even say thanks in their OP.
I do this purely for fun (well, and to kill boredom time since I'm unemployed currently), but I also don't like people not giving credit to original content authors.
Anyway, sorry about that, cheers, =)
s0niqu3 said:
Hi,
I don't really want to post my xml file for 2 reasons, (mostly for reason number 1 though.)
1) I made extra edits to it for my own personalized theme, and it might cause display issues for people using anything other than my own specific theme.
2) I'm kind of tired of people using somebody else's work and not giving credit. I see a lot of my battery icons used all over the place, and very rarely do people link back to the thread, or even say thanks in their OP.
I do this purely for fun (well, and to kill boredom time since I'm unemployed currently), but I also don't like people not giving credit to original content authors.
Anyway, sorry about that, cheers, =)
Click to expand...
Click to collapse
That is totally understandable. Thank you for the detailed instructions. I am just getting into making my own themes (starting just for me). I have used your battery mod for awhile and love it. I'm looking forwards to learning how to make that kind of thing myself.
Thanks again.
Can you make a MM zip or flashable zip? I don't know exactly how to do this in Fusion 1.2 I don't want to mess anything up, last time I tried it was a fail. I kept getting FCs.
About
A while ago Taine0 posted this thread. He's since vanished from XDA, and I have, at the request of several users, posted this here so that we have an active member in control of the first post. My goal is to write an in-depth guide into how to perform this modification, as well as a few other tidbits that could be of use. I also intend to maintain a list of links to other good guides, as written by other people. That is in the second post. I may well add a few, shorter, guides to some other popular tweaks to the third post if people want
Credits
Taine0 made this first, to the best of my knowledge. I can't stress enough how this thread is just to give coherent support.
ZduneX25: worked out how to stop new notifications from overlapping the clock, as well as re-order the status icons
Randomchars: worked out how to stop new notifications from overlapping the clock, as well as re-order the status icons
If there are others who I've forgotten about, please tell me! It's been a long time since I saw those posts
Contents
Post one:
-> Set up
-> Centring the clock
-> Switching the notification icons with the status icons
Post 2:
-> Other people's guides
Post 3:
-> Power control widget at the bottom of the notification shade (we need a short name for that mod )
-> Re-ordering the status icons
-> Removing power menu blur
A word of warning
If any of you quote this entire post, EVER, I will not help you. At all. I'll even go so far as to try and get a moderator to edit your post. This is a HUGE post, the last thing we need is multiple copies of this post littered throughout the thread. Quote only the bit you're struggling with.
The guide
This guide is written to be as cross compatible as possible. It's worth noting that my operating system of choice is Ubuntu, so thinks like apkmanager don't work too well for me.
Tools used
APKTool
A text editor. In my case it's gedit. On windows I suggest you use Notepad++. Mac users: the default text editor should work fine, but I've not tested it. I rarely, if ever, use macs.
An archiving tool. On Ubuntu the built in archive manager works perfectly. For windows users I'd suggest you get 7Zip, but winrar works too.
ADB. To set it up on Linux see here. If you're using windows see the next section for a quick guide. Mac users: for reasons mentioned above, you're on your own here. Sorry
ADB on windows
Download and extract this to a known location, such as C:\ADB. Now you need to add that to your PATH. See here for info on that. I believe you can also download the Android SDK and it has an automated installer for Windows now, but I'm not 100% sure on that.
Preparation
Set up ADB and APKTool. A guide for setting up APKTool can be found here
Now that you have ADB set up you can plug your phone into your computer, ensuring that you have "USB debugging enabled" (Settings --> Applications --> Development --> USB Debugging on 2.3 || Settings --> Developer options -->USB Debugging on 4.0)
Open up a terminal (CMD on Windows) by doing the following:
Linux: CTRL+ALT+T
Windows: Windows key+R, then type "CMD" (without quotes) and hit ENTER
Mac: No idea. If someone tells me I'll put it here
Now enter the following command to verify that your device is detected:
Code:
adb devices
The output should be something like this:
Code:
[email protected]:~$ adb devices
List of devices attached
3735698AA76400EC device
Yes, my name is Sam. Yes I named my PC Coruscant. Deal with it
Now, change directory to a useful working directory. For example:
Code:
cd ~/Android/Legend/StatusBarMod/Working/
On Windows you can just navigate to your chosen directory in Windows Explorer (the file manager) then hold SHIFT while right clicking, and choose "Open CMD here" (or something like that, I forget. Please confirm)
Next you need to pull SystemUI.apk and framework-res.apk from the device:
Code:
adb pull /system/app/SystemUI.apk
adb pull /system/framework/framework-res.apk
Output looks like this:
Code:
[email protected]:~/Android/Legend/StatusBarMod/Working$ adb pull /system/app/SystemUI.apk
3592 KB/s (1423910 bytes in 0.387s)
[email protected]:~/Android/Legend/StatusBarMod/Working$ adb pull /system/framework/framework-res.apk
4649 KB/s (9245621 bytes in 1.941s)
Now you need to set up APKTool to use your framework-res.apk:
Code:
apktool if framework-res.apk
Output:
Code:
[email protected]:~/Android/Legend/StatusBarMod/Working$ apktool if framework-res.apk
I: Framework installed to: /home/sam/apktool/framework/1.apk
Now you need to decompile SystemUI.apk:
Code:
apktool d SystemUI.apk
Output:
Code:
[email protected]:~/Android/Legend/StatusBarMod/Working$ apktool d SystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: /home/sam/apktool/framework/1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
It might also be an idea to decompile framework-res.apk if you want to change the order of the status icons (signal, wifi etc.):
Code:
apktool d framework-res.apk
Output:
Code:
[email protected]:~/Android/Legend/StatusBarMod/Working$ apktool d framework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Open a file manager and navigate to you working directory. You'll see something like this:
{
"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"
}
Navigate to SystemUI/res/layout
If your ROM is CM, or CM based, you'll see this:
If your ROM is different, don't worry. The only file we're using here is status_bar.xml.
Open status_bar.xml in your text editor (gedit for me, notepad++ for most of you) and try to get familiar with the XML layout. I can't go into all the ins and outs here, but "<" starts a line, and ">" finishes a line. Regardless of whether your text editor wraps the text, that's how it works. A line is NOT finished until you see this: ">". If possible, set your text editor up to NOT wrap text around. You'll end up scrolling left and right a lot, but it's much easier to track what you're doing this way.
Centring the clock
Open a new tab in your text editor (yes, you can do that) and paste this into it:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
</LinearLayout>
That's the section that puts the clock in the centre of the status bar, but it currently doesn't hold the clock element in it. Go back to your status_bar.xml and look for a line that starts like this:
Code:
<com.android.systemui.statusbar.Clock
Remember, that clock line doesn't finish until you find the closing ">". Copy that entire line, then delete it (or just cut it, if you're feeling swish), then go back to your new tab and paste it into the middle of the code snippet above. It should look something like this:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" [COLOR=Red]android:gravity="center"[/COLOR] android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
See the bit that's highlighted in red? It's highlighted because I've changed "right" to "center". You need to do that too. Copy that whole block of code and paste it just below the line that ends like this:
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
So that you end up with something like this:
Code:
<com.android.systemui.statusbar.CmStatusBarView android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
Now we need to fix a few things, like centring the date (to make it look nice) and making it so the date and new notifications don't overlap the clock.
To centre the date:
Find the line that starts like this:
Code:
<com.android.systemui.statusbar.DateView
and scroll across that line until you see this:
Code:
android:gravity="left|center"
Change that bit to this:
Code:
android:gravity="center"
Then scroll across a little more and change this:
Code:
android:layout_width="wrap_content"
to this:
Code:
android:layout_width="fill_parent"
.
That's the date centred!
To fix the notification overlap you need to add a little to this line:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/ticker"
Scroll right to the end of that line and add this
Code:
android:background="@drawable/statusbar_background"
The whole line will look something like this:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/statusbar_background">
Clock centred, no overlap!
Switching the icons around with the notification icons (optional)
It's worth noting that there will be a gap to the right of the notification icons. There's very little we can do that I'm afraid.
First you need to find the line that starts like this:
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons"
and move it to just above this:
Code:
<com.android.systemui.statusbar.IconMerger
Now scroll to the end of the line that starts like this
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons"
and change this:
Code:
android:layout_alignParentRight="true"
to this
Code:
android:layout_alignParentLeft="true"
Then on the line that starts like this:
Code:
<com.android.systemui.statusbar.IconMerger
change this
Code:
android:layout_alignParentLeft="true"
to this
Code:
android:layout_alignParentRight="true"
Now you can save and exit, because we're done there.
Recompiling SystemUI.apk
Go back to your terminal/cmd and enter the following command:
Code:
apktool b SystemUI
Output:
Code:
[email protected]:~/Android/Legend/StatusBarMod/Working$ apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Now go back to your file manager and go up a few levels, until you end up back in your working directory. Open, but don't extract, SystemUI.apk and navigate to res/layout. Put the window to one side and go back to your file manager, then navigate to SystemUI/build/apk/res/layout. You'll see those same XML files, only this time they're binary XML, because they've been compiled.
Simply drag status_bar.xml from the file manager to the archive manager, and it will be copied across. No need to sign or anything.
Go back to CMD, and issue the following command to get rw access on /system:
Code:
adb remount
Output:
Code:
[email protected]:~/Android/Legend/StatusBarMod/Working$ adb remount
remount succeeded
Then issue the following command to push your modified SystemUI.apk to your device:
Code:
adb push SystemUI.apk /system/app/SystemUI.apk
Output:
Code:
[email protected]:~/Android/Legend/StatusBarMod/Working$ adb push SystemUI.apk /system/app/SystemUI.apk
3943 KB/s (1423910 bytes in 0.352s)
Then reboot and enjoy:
Code:
adb reboot
Video
I'll make one that mirrors this guide more accurately over the coming weeks
Further reading
To be completed
Other guides
Nice short guide to centring the clock and making the status bar transparent by Fergie716: http://forum.xda-developers.com/showpost.php?p=19470547&postcount=1061 || If you want to use my trick to avoid signing SystemUI after a smali edit you need to copy the new classes.dex file to SystemUI too.
Fanstastic guide for all your theming needs: http://forum.xda-developers.com/showpost.php?p=9978779&postcount=62
Other tweaks
Things to write here (in no particular order)
Re-organise status icons in notification bar
Remove blur behind power menu
Enable tablet tweaks
Re-organise lockscreen
Power control widget at bottom
The way Taine0 did it is really messy, so I came up with a new way to move the power control widget. Instead of trying to force it to the bottom of the notification shade (this is done by editing status_bar_expanded.xml) realised I could attach it to the grab handle at the bottom, by editing status_bar_tracking.xml:
To apply the mod yourself decompile SystemUI the usual way, then paste this line:
Code:
<com.android.systemui.statusbar.powerwidget.PowerWidget android:id="@id/exp_power_stat" android:layout_width="fill_parent" android:layout_height="wrap_content" android:background="@drawable/title_bar_portrait" />
To just above this line:
Code:
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/status_bar_close_on" android:scaleType="fitXY" />
Now recompile and do the usual trick to avoid signing (copy the compile status_bar_tracking/xml into your old SystemUI.apk).
No further edits are required
Re-organising the status icons
So, these icons are things like signal strength, data connection type etc... If you have your status icons on the left you might find the order they're in mildly irritating. Fear not, my padwans! This section will enlighten you with regard to putting them in the order that you desire.
First things first, decompile framework-res if you haven't already:
Code:
apktool d framework-res.apk
Output:
Code:
[email protected]:~/Android/SGSII/Tweaks/StatusIconTut$ apktool d framework-res.apk I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Then navigate to res/values in the newly created framework-res folder and open up "arrays.xml"
Now you'll want to scroll down until you find the following line
Code:
<string-array name="config_statusBarIcons">
All the lines that appear underneath that are the status bar icons (unsurprisingly) The section ends with
Code:
</string-array>
The order the appear in that list is the order (from left to right) that they appear in the status bar. So to reverse the order of the icons you need to go from this:
Code:
<item>ime</item>
<item>sync_failing</item>
<item>sync_active</item>
<item>gps</item>
<item>bluetooth</item>
<item>nfc</item>
<item>tty</item>
<item>speakerphone</item>
<item>mute</item>
<item>volume</item>
<item>headset</item>
<item>wifi</item>
<item>wimax</item>
<item>cdma_eri</item>
<item>data_connection</item>
<item>phone_evdo_signal</item>
<item>phone_signal</item>
<item>battery</item>
<item>alarm_clock</item>
<item>secure</item>
<item>clock</item>
To this:
Code:
<item>clock</item>
<item>secure</item>
<item>alarm_clock</item>
<item>battery</item>
<item>phone_signal</item>
<item>phone_evdo_signal</item>
<item>data_connection</item>
<item>cdma_eri</item>
<item>wimax</item>
<item>wifi</item>
<item>headset</item>
<item>volume</item>
<item>mute</item>
<item>speakerphone</item>
<item>tty</item>
<item>nfc</item>
<item>bluetooth</item>
<item>gps</item>
<item>sync_active</item>
<item>sync_failing</item>
<item>ime</item>
Pretty simple, eh? I'll leave you to choose the best order for those. Once you've done that you need to save your work, then recompile framework-res:
Code:
apktool b framework-res
Output:
Code:
[email protected]:~/Android/SGSII/Tweaks/StatusIconTut$ apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Now, the usual trick to avoid signing the file again. Go back to the framework-res folder, navigate to build/apk. In there you'll see a file called "resources.arsc". Copy that into your original framework-res.apk (make a backup first!) then push it back using adb:
Notice that I have opened framework-res using my archiving tool, I've not extracted it
Code:
adb push framework-res.apk /system/framework/framework-res.apk
Reboot (and probably re-log into your Google account) and you're done. To avoid being singed out of all your accounts do all the pushing when your phone is in recovery.
Disable power menu blur
As we all know, Android has this nasty habit of putting a live blur behind the power menu, and rendering it with the CPU instead of the GPU. This leads to lags when opening that menu, as well as accessing the more advanced features put in by the CM team. So! To remove it we do the following:
Decompile framework-res.apk:
Code:
apktool d framework-res.apk
Output:
Code:
[email protected]:~/Android/Legend/StatusBarMod/CM-28-11-11$ apktool d framework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Then navigate to res/values
Open up bools.xml and look (near the top) for this line:
Code:
<bool name="config_sf_slowBlur">false</bool>
You need to change the "false" to "true", like this:
Code:
<bool name="config_sf_slowBlur">true</bool>
Save and exit.
Go back to your command window, and recompile framework-res:
Code:
apktool b framework-res
Output:
Code:
[email protected]:~/Android/Legend/StatusBarMod/CM-28-11-11$ apktool b framework-resW: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Now, to avoid signing issues we do the same trick as before, only this time it's the file "resources.arsc" we're copying across (build/apk/). Copy it across to the root of the original framework-res.apk:
Use adb to push it back:
Code:
adb push framework-res.apk /system/framework/framework-res.apk
then reboot
Code:
adb reboot
Done!
Requests
Any other popular theming mods? LEt me know, and I'll see if I can write a guide for it
Cool! Man I've been trying to make some understanding out of this mod for a while now. Thanks for the in-depth explanation of what all the changes do
this is really indepth mann,,thanks mucho now gotta go work this bad boy out.
Just shout if you need more help
Clicked "Thanks." Really appreciate the new write up man! Very nice job!
EDIT: I can't get my notifications to stop overlapping because whenever I try to add this line:
Code:
android:background="@drawable/statusbar_background"
I get an error when I compile. If I take that line out, it compiles fine. Any suggestions? Also, I've seen people have all the statusbar icons on the left except for battery. How do I get JUST my battery to the right hand side?
GrammarFreak-
Thank you so much for putting this guide together!! I have been reaching out to multiple people trying to get a few basic questions regarding theming answered. Though I can already do most of this with the rom I'm running, your guide answered several of my general questions that I can now apply to other mods I want to make.
Just to clarify though- system apps such as framework-res, mms, contacts, etc DO NOT need to be signed and therefore can me modified (replace pngs/edit xml's) without decompiling and then pushed or copied straight back into the rom, correct??? (When I say 'without decompiling', I know they have to be decompiled to make the edits. I'm talking about how you copied the modded xml back into the compiled apk overwriting the old...) I assume this works the same for png's and .9 png's.
Thanks again!! (Thanks button hit a few times!!)
VegasEvo4G said:
GrammarFreak-
Thank you so much for putting this guide together!! I have been reaching out to multiple people trying to get a few basic questions regarding theming answered. Though I can already do most of this with the rom I'm running, your guide answered several of my general questions that I can now apply to other mods I want to make.
Just to clarify though- system apps such as framework-res, mms, contacts, etc DO NOT need to be signed and therefore can me modified (replace pngs/edit xml's) without decompiling and then pushed or copied straight back into the rom, correct??? (When I say 'without decompiling', I know they have to be decompiled to make the edits. I'm talking about how you copied the modded xml back into the compiled apk overwriting the old...) I assume this works the same for png's and .9 png's.
Thanks again!! (Thanks button hit a few times!!)
Click to expand...
Click to collapse
As far as I'm aware, that should work. I can't test myself right now though.
Sent from my Legend using xda premium
Dude I'm not running CM but congratulations!
Really an amazing guide.
Hope n00bs won't flood this thread with *****y questions
Bravo!
Greetings
lippol94
lippol94 said:
Dude I'm not running CM but congratulations!
Really an amazing guide.
Hope n00bs won't flood this thread with *****y questions
Bravo!
Greetings
lippol94
Click to expand...
Click to collapse
Lol. The guide and techniques I go through should work for any 2.3 rom. In my limited testing it would appear that apktool doesn't work with ICS files. Confirmation would be appreciated.
Sent from my Legend using xda premium
TheGrammarFreak said:
Lol. The guide and techniques I go through should work for any 2.3 rom. In my limited testing it would appear that apktool doesn't work with ICS files. Confirmation would be appreciated.
Sent from my Legend using xda premium
Click to expand...
Click to collapse
I know but being on MIUI (if I wanted so) there's extended settings mod to do that with an easy UI
For what concerns ICS, I don't use it as it's too unstable atm
TheGrammarFreak said:
Lol. The guide and techniques I go through should work for any 2.3 rom. In my limited testing it would appear that apktool doesn't work with ICS files. Confirmation would be appreciated.
Sent from my Legend using xda premium
Click to expand...
Click to collapse
Apktool did not work on ICS for me. APKManager neither. And I just lost my statusbar
TheGrammarFreak said:
Lol. The guide and techniques I go through should work for any 2.3 rom.
Click to expand...
Click to collapse
I can't get my notifications to stop overlapping because whenever I try to add this line:
Code:
android:background="@drawable/statusbar_background"
I get an error when I compile. If I take that line out, it compiles fine. Any suggestions? Also, I've seen people have all the statusbar icons on the left except for battery. How do I get JUST my battery to the right hand side?
Thanks for the great (and very detailed) guide!
I would definitely like a guide on how to Disable the system blur (behind power menu)
spc_hicks09 said:
I can't get my notifications to stop overlapping because whenever I try to add this line:
Code:
android:background="@drawable/statusbar_background"
I get an error when I compile. If I take that line out, it compiles fine. Any suggestions? Also, I've seen people have all the statusbar icons on the left except for battery. How do I get JUST my battery to the right hand side?
Click to expand...
Click to collapse
I'd need to see the error and a copy of your XML to help there
Splitting the battery apart requires that you use CM. If you enable the battery percentage option in CMSetting the battery will go back over to the right hand side
creeve4 said:
Thanks for the great (and very detailed) guide!
I would definitely like a guide on how to Disable the system blur (behind power menu)
Click to expand...
Click to collapse
Cool, I'll have it done by next week ish. I'm currently 4 hours away from home visiting a friend
Epic write up mate.. cheers for your work on this and your execution and use of the English language is as eloquent as one has come to expect when noting you are the OP. Thank you.
Well done that man! B-)
Sent from my GT-P1000
nobleskill said:
Epic write up mate.. cheers for your work on this and your execution and use of the English language is as eloquent as one has come to expect when noting you are the OP. Thank you.
Well done that man! B-)
Sent from my GT-P1000
Click to expand...
Click to collapse
Ha ha, cheers man. I did have to edit the post about 15 times to get rid of some of the stupid mistakes though
This thread should help reduce the number of requests in the other thread
Sent by wiggling my big toe
TheGrammarFreak said:
Ha ha, cheers man. I did have to edit the post about 15 times to get rid of some of the stupid mistakes though
Click to expand...
Click to collapse
And its exactly that diligence and attention to detail that has fed the expectations of those familiar with your work. Heh yeah I know I can go on at times, perhaps even sometimes approaching the line where sincerity falls into satire, however my first post stands on the solid foundations of being more of fact than fancy so I also stand by it. This post also has my full and steadfast endorsement and support.
Lol. Ah miss these long winded off topic posts almost like I miss that skin cancer I had cut out of my shoulder just previous to my joining xda ... my work here is done for tonight. Fare thee well folks and adjure... until I next bore you silly with my mastery of twisting grammar and really old words into these fantastic distractions and artworks.. haha sleep now..
Later.
Sent from my GT-I9100
Greetings all! Attention devs, themers and whoever else wants to do this lol. This is going to be a long post but I am putting this out there for whoever wants to use it. I cannot take full credit for this as there are quite a few posts that explain how to do this. I just went a lot more in depth and explained things so that even someone who has never done anything like this, can do it too.
This is going to be a tutorial of sorts on modding the statusbar so that you have the following:
Centered Clock
Statusbar Icons on the left
Centered Date
First, let me start by saying that I am in no way an expert on this and if this doesn't work for you, I might not be able to answer too many questions about it.
That being said, let's get started. First, you are going to need some stuff.
apkmanager: http://forum.xda-developers.com/showthread.php?t=695701
Notepad++: http://notepad-plus-plus.org/download/v5.9.6.2.html
The SystemUI.apk from your phone.
Now what you need to do is take that zip file for apkmanager that you downloaded and extract it somewhere that's easy to get to, like your desktop.
Inside the apkmanager folder on your desktop you should have 6 folders and 2 files. It should look like this:
{
"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"
}
NOTE: Do not change the names of any of these files or folders or the process will not work!
What you want to do next is take the SystemUI.apk that you pulled from your phone, either with Root Explorer or via ADB. And put your SystemUI.apk in the folder named "place apk here for modding."
Now double click the "Script" file to run it. A command prompt window will open up that looks like this:
Press "22" and hit the enter key to select your "project." Now press "1" and hit enter to select your SystemUI.apk as your current "project." Now you want to press "9" and hit enter to decompile the apk.
*NOTE: If you are trying to use a heavily themed SystemUI, this process might not work for you and you may have to find a stock SystemUI.apk and use it instead.
Now that the SystemUI is decompiled, go into the "projects" folder and you should see a SystemUI folder now. Open that up, then open the "res" folder and finally open the "layout" folder.
You should now be looking at a bunch of XML files. The one we're going to be editing is named "status_bar." That's the only XML file you're going to need to edit. Right click on that file and select either "Edit with Notepad++" or "Open with Notepad++," either one.
Now you should be looking at something similar to this:
Now comes the fun part!!
Centering the clock:
Open a new tab in your xml editor and paste this into it:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
</LinearLayout>
That's the section that puts the clock in the center of the statusbar. But there's currently no clock element in it yet. Go back to your status_bar.xml and look for the line that starts like this:
Code:
<com.android.systemui.statusbar.Clock
Remember, that clock line doesn't finish until you find the closing ">". Highlight and copy that entire line, then delete it, then go back to your new tab and paste it into the middle of the code snippet above. It should look something like this:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" [COLOR="Red"][B]android:gravity="center"[/B][/COLOR] android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
See the part in the string above that is red? I've highlighted it to show you that you have to change this part of the string from "left|center" to "center."
Now copy that entire string of code above and paste it just BELOW the line that looks like this:
Code:
xmlns:android="http://schemas.android.com/apk/res/android">
This is what you should end up with:
Code:
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textColor="#ffffffff" android:gravity="center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
Now we need to fix some stuff, like making the date centered and making it so that the date and the notifications don't overlap the clock.
To center the date, find the string of code that starts like this:
Code:
<com.android.systemui.statusbar.DateView
And scroll right, across that line until you see this:
Code:
android:gravity="left|center"
Change that part to this:
Code:
android:gravity="center"
Now scroll across that same line a little more, until you find this part:
Code:
android:layout_width="wrap_content"
Change it to this:
Code:
android:layout_width="fill_parent"
Congratulations your date is now centered!!
Now to fix the notification overlap, you need to find the line that starts like this:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/ticker"
Scroll all the way to end of that line and add this to the end:
Code:
android:background="@drawable/statusbar_background">
That entire line should now look like this:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/statusbar_background">
Clock centered, no overlap!!
Setting the icons to the left hand side of the statusbar: (optional)
First, find the line that starts like this:
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons"
Copy that entire line, then delete it and paste it above the line that starts like this:
Code:
<com.android.systemui.statusbar.IconMerger
In that same line, change this part:
Code:
android:layout_alignParentRight="true"
To this:
Code:
android:layout_alignParentLeft="true"
Now find the line that starts like this:
Code:
<com.android.systemui.statusbar.IconMerger
And change this part:
Code:
android:layout_alignParentLeft="true"
To this:
Code:
android:layout_alignParentRight="true"
Guess what? That's it, you're finally done lol! Now let's recompile the SystemUI.apk.
Before you close out of Notepad++, check your edited XML and make sure there are NO GAPS between the lines. What I mean is this, this is kind of what your xml should look like all the way through it:
dfsdfsdfsdfsdfsd
sdfsdfsdf
sdfsdfsdfsdsdfsdfsdfsdf
fsdfsdfsdfs
See, no gaps. It should NOT look like this:
asdasdasdasd
asdasdasdasd
asdasdasd
asdasdasdasd
See what I'm saying?
Close out of Notepad++ and make sure you save all the changes. If you don't, you're back at square one and will have to do everything again lol. You don't want that.
Go back to that command prompt window that opened up for apkmanager. If you closed it, that's fine, just double click the "Script" file again to open it back up.
Press "22" and hit enter to select your "project" again. Press "1" then hit enter to select the SystemUI.apk.
Press "11" to Compile the apk and cross your fingers that you didn't mess anything up. If you did, you will get an error upon compiling the apk and will have to start over again. If you don't get an error, you should get a message that says this:
Code:
Is this a system apk <y/n>
Press "y" and hit enter.
Then you should get:
Code:
Aside from signatures, would you like to copy over any additional files that you did not modify from the original apk in order to ensure least number of errors <y/n>
Press "y" and hit enter.
Next you should get this:
Do as it says and go into the "keep" folder that you now see with all the other folders (place apk here for blah blah blah).
Delete this file:
resources.arsc
And the "status_bar.xml", now go back to the command prompt and hit enter.
Let it run it's course and you should be good to go!!! Now look in the "place apk here for modding" folder and you should see a "unsignedSystemUI.apk"
Yes the file size will be a little different. That's ok!!!
Rename the file to "SystemUI" and either use adb to push it to your phone or place the apk on your sdcard and use Root Explorer to copy/paste it into /system/app
If you use Root Explorer, maybe even if you use adb. You will probably get some force closes after you push or paste the app. Your phone might even freeze up, mine did. That's ok too!!!! Pull the battery and restart your phone.
Now when you first boot up, you might not have a statusbar anymore. That's ok too lol. Using Root Explorer, navigate to /system/app and "mount as R/W." Now find the SystemUI.apk. Press and hold on it and select "Permissions." Change the permissions to look like this:
Exit out of Root Explorer and reboot. That's it, you're completely done! As soon as I can perfect it a little better, I will also post a walkthrough on switching around the order of the statusbar icons as well! Final results should look something similar to this:
Enjoy!!!! If you like this post and think it contributes, please press the "Thanks" button.
If you are having troubles with the process, take a look at my status_bar.xml and compare it to yours.
status_bar.xml download:
http://www.multiupload.com/7MXI3ME1QR
Reserved for more stuff !
Thanks to share, available for download ah
owen.d said:
Thanks to share, available for download ah
Click to expand...
Click to collapse
Not sure I understand what you're asking.
spc_hicks09 said:
Not sure I understand what you're asking.
Click to expand...
Click to collapse
Im gonna guess he thinks theres a download for the whole process like V6 Supercharger. Just a guess.
ChaoticWeaponry said:
Im gonna guess he thinks theres a download for the whole process like V6 Supercharger. Just a guess.
Click to expand...
Click to collapse
Ah ok, gotchya.
owen.d said:
Thanks to share, available for download ah
Click to expand...
Click to collapse
This isn't a mod that you can download. You have to do all this by yourself.
Oh thats nice I'll be trying this when I get home.
Good work.
-smc
somemadcaaant said:
Oh thats nice I'll be trying this when I get home.
Good work.
-smc
Click to expand...
Click to collapse
Thanks!
Sent from my DROID3 using Tapatalk
OP has been updated!!! If you're having troubles, look at the bottom of Post #1 and find the download link for a copy of my status_bar.xml. You can download this and compare it to your status_bar.xml
[Advice/Reference/Guide] The Definitive APK Modding & Theming Thread... {06/07/13}
{
"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"
}
XperienceD said:
This is why I love Virtuous Ten, as you can install multiple resources.
Click to expand...
Click to collapse
jacknb1ack said:
wow, i didnt know there is tools like that
Click to expand...
Click to collapse
After reading jacknb1ack's comment I felt compelled to re-write this whole thread to accommodate for the various PC Programs that you use to do all of your apk modding which can and do make things a hell of a lot quicker. I've wrote this as something I would have liked to have come across when I first joined because I know there is a lot to take in, and hearing you need to decompile, edit this or that xml, recompile, sign etc etc etc can be off putting for some especially if you struggle to get a program or apktool setup to begin with.
Knowing how to use command prompts will be beneficial in the long run so I've wrote a detailed guide below which covers it from start to finish along with how to Sign and Zipalign your apks, pulling them from the computer and so on. I've also covered some Theming basics with links to everything you're ever going to need, which will be extra handy if you're just getting started.
Minimum Requirements:
A Rooted Phone.
Java SE Runtime Environment
Java SE Development Kit
Any of the apk modifying methods below.
7-Zip or WinRar
Theming Requirements:
Notepad++
Photoshop, GIMP or any other image editing software.
Patience. :silly:
To avoid any java not found issues you need to set up the PATH for it in Environment Variables, you can find a short Guide on how to HERE. This is how mine looks...
Code:
[B]C:\Program Files (x86)\Java\jre6\bin;[/B]
I would advise that you also install the Android SDK but if you don't want to you can download this APK_Mod.zip that you can extract to a folder and place it anywhere you want on your Computer (I recommend C:\APK_Mod) and run any adb, apktool, zipalign or signing command prompts from it. You can find a more detailed guide for this method below.
But first off all here are some of the most common Programs that you can use to modify and theme your apks, and I'll start with one of the best...
Virtuous Ten Studio (VTS)
Virtuous Ten Studio (VTS) is the ultimate solution for the modification of android applications.
This program allows you to manage entire Android projects within an easy to use and familiar environment.
The intended group of users covers anyone from a themer over ROM devs up to the smali gods known for their awesome mods of existing apks.
The modifcation of smali code is one of the biggest features in VTS. You can easily decompile, edit and recompile any apk or jar file.
However, the application is not limited to smali files. You can edit almost any file found inside an apk or jar.
Virtuous Ten Studio is also the official successor to the highly important M10Tools released last year by the Virtuous Team.
You can easily edit any m10 file from Sense apps in order to resize or change them.
Additionally VTS brings support for un- and repacking of boot images (boot.img), a job that previously required a cygwin installation with the dsixda kitchen.
Since VTS' own implementation is a native windows solution, which means you don't need dsixda or cygwin anymore.
VTS has been designed to run on Windows, has been in development for nearly two years and has gone through many stages of testing.
Today VTS is a highly respected full blown Android IDE (Integrated Develoment Environment) suited for all your reverse engineering tasks.
Click to expand...
Click to collapse
- www.virtuous-ten-studio.com
AndroidSuite 2013
AndroidSuite 2013 what it does
Decodes and encodes Dex files
Decodes and encodes APK files (Previously bugged in APKManager)
Gives a console output
Flash boot.img (fastboot)
Flash update.zip (fastboot)
reboot/reboot fastboot mode
Sign unsigned apks
Click to expand...
Click to collapse
- (App) Androidsuite 2013 v117 (01/04/2013) Jelly Bean Support!
Tickle My Android 5.4
Tickle My Android, or TMA for short, is a command line tool for Windows that uses apktool to help you pull and decompile files from your Android phone or tablet.
But it can also:
change the battery icon,
change the WiFi icon,
change the signal icon,
change the emoticons,
change the notification toggles,
change the transparency of the statusbar (if the rom allows it),
add Ice-Cream Sandwich-style transitions
zipalign apk files,
sign new apk files,
sign recompiled apk files in the same way as the original,
deodex apk and jar files,
backup personal data and transfer to a brand new device,
resize and change boot animations,
change fonts,
add sounds from other devices,
create backup-generating flashable zip files
..and now comes in Portuguese and French!!
Click to expand...
Click to collapse
- [TOOL]Tickle My Android 5.4 - DE/RECOMPILE APPS, CHANGE ICONS...AND MORE!!!!
ApkManager V6.1
1. Based on ApkManager 4.9 by Daneshm90 (Big thanks to him)
2. Updated Apktool V1.5.2 by iBotPeaches & Brut.Alll
3. Updated Aapt v0.2
4. Default compression level set to “0?
5. 512Mo as default allowed heap size
6. 3 ready for use fake frameworks : “other\wanam1.apk”… (for Lidroid framework editing)
7. Add a “Decompile all files” feature (option 25)
Click to expand...
Click to collapse
- wanamlite.com
Command Prompt Editing
Basically this is just manually doing what all of the programs above need to do in order to decompile, recompile, sign and zipalign apks so it's worth knowing how to modify apks this way for occasions when the above programs for whatever reason gives you issues.
Use Linux or a Mac?
See the following threads for more information on using apktool on other Operating Systems...
APK Manager for Mac OS X
[Linux][UTILITY][TOOL] APK Multi-Tool
[tutorial] decompiling,recompiling and signing in linux (27-01-2013)
How to install and use Apktool with Ubuntu
Getting APKs To Your PC
You have two options here...
1. Use a file manager on your Phone to copy and paste files to your SD, then connect to your PC and use Windows Explorer to copy and paste to your desired location.
2. ADB. Open a command prompt window in the ADB folder (see below) and type/copy the following command...
Code:
adb pull /system/app/ Original_apps
...which will pull the whole app folder to your computer and create a new folder called Original_apps, which you can then simply copy apps to the main folder ready to be modified (keep the Original_apps folder as a backup). Then do the same for your framework folder...
Code:
adb pull /system/framework/ Original_framework
...want to pull your Phones whole system...
Code:
adb pull /system/ Xperia_Z_System
...you can rename "Xperia_Z_System" to whatever you want.
Further Information: [WINDOWS][TUT]ADB tutorial, setting up ADB, usefull commands, collecting debug info.
This is a zip of the apktool folder I currently use - APK_Mod.zip - which as said above also contains the ADB files needed to pull and push apps from your Phone, or you can check out the following links...
[Tool] ADB Fileexplorer
[TOOL][WINDOWS] Android Apktool
Installing Resources
For apktool to work you need to install the resources needed by your apks for de and recompiling, and those resources are other apks, the first apk regardless of your Phones manufacturer is going to be your framework-res.apk. The second apk you need is dependent on the manufacturer so you need to check your framework folder for another apk such as twframework.apk or SemcGenericUXpres.apk, in some cases it might even be the SystemUI.apk but you would need to check if you have issues with the other two. Put those two apks in the APK_Mod folder to begin with then open a command prompt window. The easiest way for me is holding the shift key then right clicking the mouse and selecting Open command window here, but if you're not able to do that then click your Start button and search for Command Prompt, then open it. You then need to point it to the relevant folder, so type cd then copy and paste the location of the folder (cd C:\APK_Mod) and hit enter.
The install commands are...
Code:
[B]apktool if[/B] framework-res.apk
...and for the second...
Code:
[B]apktool if[/B] SemcGenericUXpres.apk
Decompiling
The command for decompiling is...
Code:
[B]apktool d[/B] framework-res.apk
...and so on for each individual apk you want to modify. A new folder will be created that is named after the apk you are modding, then you can edit xmls, smali files and .9png images. You'll notice that there are a lot more folders when you decompile an apk, that's normal as those folders are from the resources.arsc and where you'll find the xml files you may need to edit to make the changes you want.
Recompiling
When you've done editing it's time to recompile, using the command...
Code:
[B]apktool b[/B] -insert folder name-
...and if you've edited your files correctly then it should compile with no errors and create a folder named dist in the decompiled folder along with a new apk.
Signing
Before using the new apk you will need to sign it, to do this you need to extract (open the apk and simply drag and drop them to the dist folder) from the original apk the resources.arsc (only if you haven't changed anything in the values folder, the AndroidManifest.xml and META-INF folder (if it exists), then copy them into the new apk. In WinRar it will give you the option to choose the compression method, and it's vital that you choose Store as the compression method because if you don't then you WILL BOOT LOOP after restarting your Phone!
NOTE: If you have edited anything in the values folder then extract the resources.arsc from the new apk and copy (drag and drop) it back in the same manner described above.
Alternatively you can use the following command...
Code:
[B]java -jar signapk.jar testkey.x509.pem testkey.pk8[/B] framework-res.apk.apk framework-resS.apk
...notice the extra "S", the output name has to differ from the input name otherwise it will give an error, if done right it will create a new apk called framework-resS.apk, just remember to rename it back to the original before using it on your Phone.
Zipaligning
DISADVANTAGES OF UNALIGNED APKs
Quite understandably, situation would be reserved for unaligned application packages. Resource reading would be slow and memory usage would be on the higher end of the spectrum. It would also depend on how many unaligned applications are present. For example, if less number of applications with an unaligned home application, you’d see slower application launch times. This is the best case scenario. For a worst case scenario, having a number of unaligned applications will result in the system repeatedly starting and killing processes, struggling with lags and huge battery drain.
Click to expand...
Click to collapse
- SOURCE
The command for zipaligning is...
Code:
[B]zipalign -v 4[/B] framework-res.apk ZAframework-res.apk
...notice the "ZA", again that can be anything you want so long as it differs from the original name, I use ZA for an obvious reason, and again don't forget to rename it before using on your Phone.
Getting apks back to your Phone
It's just a reversal of how you got them off your Phone to begin with, use a file explorer and put your apk on your SD Card, then move it to the Phones System folder and change it's permissions to rw-rw-r, then move and replace it with the original. Most apps should continue to work but if you change your framework-res or SystemUI you will most likely need to reboot. Or you can use adb to push and install them. Check the previous link for the commands.
If all the above has worked correctly you should now have your modified apk installed with the changes you've made displayed on your Phone.
Theming & Modifying
This is where the fun begins, once you've got setup to decompile your apks then obviously you're going to want to mod them, so here's a few pointers to clear up what seems like a daunting process to new comers...
To start with you'll probably just want to start with replacing images, so if that's all you want to do for now then here's a quick tip, you DON'T need to decompile or sign your apks!, simply edit and rename your replacment images on you computer, preferably using the same or similar dimensions then drag and drop them back into the right folders in the apk, always using Store as the compression method, but PLEASE NOTE; .9 pngs can be replaced in the same way, but if you want to edit them in Photoshop for example then you need DO need to decompile them.
A few things to note...
Smali code is real Developer territory, it's Matrix code to me , thankfully there's usually a guide to follow so you can simply copy and paste code without having to fully understand how it works, so don't fret about this.
.9pngs are simply png images with a 1 pixel border. You can edit anything within that border but anything on or over will give errors when building. Unless you're creating an image from scratch then you can leave the border as it is, it's that simple! Sure there's a bit more to .9png editing but you can find a few links below that go into more detail about .9s and how they work.
xmls are relatively simple and edited with Notepad++, much simpler to understand than smali and again, there's usually a guide to be found for most mods you may want to make yourself, but if you're feeling brave you can experiment with it when you have a basic understanding of how it works.
Restoring modified files if you mess up is easier and quicker with a CWM.zip, especially if you're modifying any framework apks! Just because an apk might build with no errors doesn't mean it won't give you any when installed to the Phone.
.9png Editing
I hope after reading this explanation you're left wondering what all the fuss is about, as it really is quite simple. I'll use the following two images, btn_default_pressed_holo.9 & status_bar_close_off.9 to illustrate the basic point of the borders...
Decompiled .9pngs:
Recompiled .9pngs:
Those borders control which part of the image is stretched, and we'll use Draw 9-patch which is for editing the borders of decompiled .9pngs and lets you see how the image, when stretched, will be displayed on the Phone. Notice that the borders are different sizes, well that's because I only want/need a certain part of the image to stretch to get the desired look on the Phone.
...in the image below the left side shows the stretched image and desired effect should look on the Phone and the right side shows how it would look if I had edited the borders incorrectly or used none at all...
You can get away by not using a border but you would need to edit your image to specific dimensions to accommodate for the stretching, for example it might look fine for a simple OK button but it might not look right if you used the same .9png for a screen press which stretches the whole length of the screen, so you're better off just using them to begin with, plus you'll more than likely get errors down the line while decompiling or recompiling your apk.
The use of the border is made even more clear when you add text to an image. For my status_bar_close_off.9 I've filled all four sides of the image (except for an empty pixel in all four corners as that is the max amount of border you can use) as I need it to stretch the image just how I've edited it...
...but if I used the same sized left side border as the btn_default_pressed_holo.9 then this is how it would look on the Phone...
...which is obviously not the look I'm trying to achieve, as the left side border is causing the image to stretch incorrectly.
So that's basically it, depending on the image you're editing you can usually leave the borders alone but if you create one from scratch then you might need to play about with them if your images doesn't look quite right when used on the Phone. Here's a few links that will assist you further, especially the batch editing...
How to edit .9.pngs
[TUTO] Create your 9.png !
[UTILITY][TOOL] 9patchPngSuite [Windows&Linux]
How to draw NinePatch images with Photoshop - .9.PNG
[TOOL][Multi-Platform][.9.png][ALL DPIs] Android Resizer Tool
[Tutorial][Commentary] How To Batch Edit .9PNG/PNG Images
Xposed Framework
rovo89 said:
In this thread, I'm presenting a framework which gives you the possibility to modify your ROM - without modifying any APK (developers) or flashing (users)!
...
Advantages:
No need to modify any APKs. This means:
No need to decompile, change things in smali, compile, sign, ...
It will work for odexed and deodexed ROMs.
Your mod is not bound to a specific version of the ROM. Unless there is a major change in the methods called for a certain functionality, your mod will continue to work even when you upgrade your ROM. Hell, it will probably even work with different ROMs.
Multiple mods can be installed at the same time, even if they change the same package. So you can use these battery icons and those quick toggles. Even hooking the same method twice is possible. Of course, this only works properly if the mods are not trying to do incompatible things.
It does its magic at runtime. That means you can implement options to let the user decide if they prefer the bikeshed to be painted in red or blue. Or you can have some extra logic for certain ROMs without building different mod versions.
It can be disabled easily without having to reflash.
It's open source.
Click to expand...
Click to collapse
- [FRAMEWORK ONLY!] Xposed - ROM modding without modifying APKs
[Guide] Porting XTheme themes
[Guide] Xposed Framework/TabletUI (Noob-Friendly)
[INDEX][WiP] List of APPs & MODs that use XPOSED Module
[MOD][XPOSED][4.0+] XThemeEngine beta5 - Theme engine for any rooted phone
And that's pretty much it, the only way you're really going to learn is by reading then putting into practice what you've read and picking stuff up along the way, fortunately this far into the history of Android there are numerous guides for numerous mods and tools to help with a variety of tasks and the following links are going to be a big help...
U.I Modding
Text Color Guide
Tutorial :- Changing App Icons
[TUTORIAL]How to Theme Your MMS
[How-to] Edit the "About Phone" display
[GUIDE][REF]Changing System Text Settings
[TUTORIAL] How to add various framework/Settings mods
[TUTORIAL] Where to find the colors for making a theme
Some Extra Theming and Moving the Power Widget Down
[HOWTO] Integrating/Adding applications to the settings menu
[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie!
[GUIDE][MOD][SYSTEMUI] How to add 0.0K/s meter on statusbar ICS/JB
[GUIDE] How to get Transparent App Drawer [Launcher2.apk or Trebuchet.apk]
[TUT] How To Center The Clock On The Statusbar..And Move Other Icons As Well!
[How-To]Removing Battery Percentage, Adding Toggles,Battery Circles to Statusbar
[GUIDE][Mods][All Devices]How to add/ Change Clocks to Analog/ Digital with Seconds
Various Tools...
[TOOL][BETA]Miui Theme Converter/Convert apk Themes!!!
[TOOL][JAVA]"The Rom Fumbler" aka "The Battery Icon Creator"[V29.0]
[TOOL]Boot Animation Factory-Create,Preview and Manage Boot Animations
Useful Links
findicons.com
colorschemer.com
[GUIDE] Tips for themers
Ultimate Online Theme Kitchen
[GUIDE] Want to learn how to theme?
General Questions about Themes GO HERE!!!!!
[Guide] How to port themes to T-Mobile Theme Chooser
[Collection] ICON SETS | Over *750* different Icon Packs
[DEV/GUIDE]Creating APKs for use with TMobile Theme engine
[GUIDE] T-mobile theme engine for the faint at heart (non-linux users)
[TEMPLATE] Icon Packs/Themes for Apex, Nova, Holo, ADW, and more!!
[INFO] Custom framework-res.apk resources.arsc using vendor overlays
If you feel something more should be added to this thread please feel free to suggest it.
Credits & Thanks:
@_calum_
@Diamondback
@ebs512
@Rizal Lovins
@Ticklefish
@wanam
@rovo89
And not forgetting @iBotPeaches and @Brut.all for making it possible with - [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files
ClockworkMod Recovery...
Flashable Clockwork Mod (CWM) zip
ClockworkMod Recovery zips are used for flashing individual files to whole ROMS and can be a life saver if you push a badly edited apk to your Phone that results in a bootloop. There's also a few programs that can assist you with that too, but if all you're doing is replacing a few files all you really need is a template, then it's just a matter of creating the Phones folder setup in the zip which is simply creating folders: system\app - system\media\audio etc then dragging and dropping your files into it. A basic understanding of the updater script is essential, a ROM.zip will more than likely wipe your Phone whereas a Theme.zip may just replace files but it might delete some also.
See below for a CWM.zip Template but first some helpful links...
[Tool]easy flasher v4 (ur own update.zip)
[TUT] [for NOOB] editing updater-script for noobs!
[TUTORIAL] Making Flashable ZIPs, EDIFY Script, ZIP Signing & Key Creation
[Utility-Tool][DEVandThemers]CWMflashpack.zipCreatorV1{TheCollective}w/EdifyScripting
This is my Theme_CMW_Template.zip which is set up so you can add your own files to the framework and apps folders in the main system location, but you can easily add other folders to it if you want to add things like fonts, tones or anything else, just remember to add folders within folders if that's where the files you want to include are such as tones, media\audio\alarms for example.
If you navigate to META-INF\com\google\android you will find the updater-script which controls how the zip works and the text you see when you run it in CWM. As this zip is just for basically over writing files you don't need to edit anything except for a few lines...
...this is how I've edited it for my Ice Green ResMods theme...
...so just edit it using Notepad++ to your liking.
When adding files to your zip add them using Normal as the Compression Method...
...and that's pretty much it. Remember to remove the text files I've added otherwise they will be flashed to your folders too.
[How To] AOSP Lockscreen...
[MOD][4.2.2][Z] AOSP Lockscreen
1. Decompile your framework-res.apk.
2. Go to your layout folder and open keyguard_screen_tab_unlock.xml then find and change the following lines...
Code:
<com.android.internal.widget.DigitalClock android:layout_gravity="right" android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin" android:layout_marginBottom="12.0dip">
...to...
Code:
<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_gravity="center_horizontal" android:layout_marginTop="100.dip" android:layout_marginBottom="3.0dip">
...then change this...
Code:
<LinearLayout android:layout_gravity="right" android:orientation="horizontal" android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin">
...to this...
Code:
<LinearLayout android:layout_gravity="center_horizontal" android:orientation="horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip">
...also change this...
Code:
<Button android:layout_gravity="right" android:id="@id/emergencyCallButton" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:layout_marginRight="16.0dip" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/lockscreen_emergency_button" android:drawablePadding="4.0dip" style="?android:attr/buttonBarButtonStyle" />
...to this...
Code:
<Button android:layout_gravity="center_horizontal" android:id="@id/emergencyCallButton" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="4.0dip" android:text="@string/lockscreen_emergency_call" android:drawableLeft="@drawable/lockscreen_emergency_button" android:drawablePadding="4.0dip" style="?android:attr/buttonBarButtonStyle" />
...then change this...
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:layout_width="fill_parent" android:weightSum="2.0" style="?android:attr/buttonBarStyle">
...to this...
Code:
<LinearLayout android:gravity="center" android:visibility="gone" android:orientation="horizontal" android:layout_width="fill_parent" android:weightSum="2.0" style="?android:attr/buttonBarStyle">
3. Recompile and sign your framework-res.apk
4. Go to system/app and either delete, rename or remove all permissions for UxpNxtLockScreen.apk.
5. Replace your framework-res.apk on your Phone with the new one, reboot, done....
To also remove the operator logo as I have change this line...
Code:
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:textColor="?textColorSecondary" android:ellipsize="marquee" android:gravity="center_horizontal" android:id="@id/carrier" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="12.0dip" android:singleLine="true" android:layout_alignParentBottom="true" />
...to...
Code:
<TextView android:textAppearance="?textAppearanceMedium" [B][COLOR="Red"]android:visibility="gone"[/COLOR][/B] android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:textColor="?textColorSecondary" android:ellipsize="marquee" android:gravity="center_horizontal" android:id="@id/carrier" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="12.0dip" android:singleLine="true" android:layout_alignParentBottom="true" />
Deodexing...
philos64 said:
The differences between Odex and Deodex Files...
In Android file system, applications come in packages with the extension .apk. These application packages, or APKs contain certain .odex files whose supposed function is to save space The odexed file structure works well as an optimization tool. Since these .odex files contain preliminary load information about each system app, the OS knows what to expect when it’s booting up, and consequently, loads all these apps faster.
On the other hand, it also makes hacking those applications difficult because a part of the coding has already been extracted to another location before execution.
For instance, on a non-rooted device you’ll find
system/app/Phone.apk ===> as well as ===> system/app/Phone.odex
Click to expand...
Click to collapse
- [GUIDE] - The differences between Odex and Deodex Files
[TOOL][WINDOWS]Universal Deodexer[ALL DEVICES!!]
abcdjdj said:
Hi everyone,
Alokbina and I have created a tool which allows users to very easily deodex apks from a rom. This tool is very useful for Rom developers too. For now only windows is supported but we will try our best to make the same tool for linux too and make the tool as user friendly as possible. And, please don't forget to thank alokbina too.
Requirements:-
--->Java installed on your PC
--->system/framework folder from your rom
--->apks from that SAME ROM with the respective .odex file
--->Patience and a calm head (common sense included)
You can watch this video for setting up and using the tool -
- [FIXED][UPDATE - V3][TOOL][WINDOWS]Universal Deodexer[ALL DEVICES!!]
Click to expand...
Click to collapse
[GUIDE] How to DEODEX stock ODEXED ROM using dsixda's kitchen
Random Stuff...
edangel said:
Solution For 70 limit stock SMS Characters...
Well...for people who can't sent 160 sms characters on stock sms messaging app and they are limited to sent 70 characters here is the solution...
Simple...root needed!
with root explorer etc...
go to: /data/data/com.sonyericsson.conversations/shared_prefs
and open the file com.sonyericsson.conversations_preferences.xml.
find the line which says "semc_pref_key_character_conversion"value=false
and set it true..!
save the file and reboot your phone...and happy texting!
if i helped press thanks button!
:laugh:
Click to expand...
Click to collapse
XperienceD said:
cickii said:
can someone please tell me which xml is responsible for the blue / gray colors in the picture below.
Click to expand...
Click to collapse
Finally sussed it. It's LinearColorBar.smali found at Settings\smali\com\android\settings\applications, search for 0x99cc and -0xff6634 and change them for your own colours...
Click to expand...
Click to collapse
XperienceD said:
Hi all.
Just a short write up as a follow on from THIS thread as this is relatively quite simple.
So you want to change your notification background from the plain dark color to something a bit more your style...
...well all you need to do is decompile your SystemUI.apk and navigate to the values folder and open up your drawables.xml and you should see something like this...
Code:
<resources>
<item type="drawable" name="notification_number_text_color">#ffffffff</item>
<item type="drawable" name="notification_item_background_color">#ff111111</item>
<item type="drawable" name="notification_item_background_color_pressed">#ff257390</item>
<item type="drawable" name="ticker_background_color">#ff1d1d1d</item>
<item type="drawable" name="status_bar_background">#ff000000</item>
<item type="drawable" name="status_bar_recents_background_solid">#e5000000</item>
<item type="drawable" name="status_bar_recents_app_thumbnail_background">#88000000</item>
<item type="drawable" name="status_bar_notification_row_background_color">#ff090909</item>
<item type="drawable" name="notification_header_bg">#ff000000</item>
<item type="drawable" name="notification_tracking_bg">#e5000000</item>
<item type="drawable" name="recents_callout_line">#99ffffff</item>
<item type="drawable" name="notification_item_background_legacy_color">#ffaaaaaa</item>
</resources>
Simply change these two lines...
Code:
[B]<item type="drawable" name="notification_item_background_color">#ff111111</item>
<item type="drawable" name="notification_item_background_color_pressed">#ff257390</item>[/B]
to...
Code:
[B]<item type="drawable" name="notification_item_background_color">[COLOR="Red"]@drawable/status_bar_item_background_normal[/COLOR]</item>
<item type="drawable" name="notification_item_background_color_pressed">[COLOR="Red"]@drawable/status_bar_item_background_pressed[/COLOR]</item>[/B]
...then add two .9 png images of the same name, status_bar_item_background_normal and status_bar_item_background_pressed to your drawable-hdpi folder, recompile, zipalign, push to your Phone, done.
Quick Tip: If you can't create a .9 from scratch just edit the first two in drawable_hdpi which in my folder is alert_bar_background_normal.9 and alert_bar_background_pressed.9, just remember not edit over the .9 borders.
Click to expand...
Click to collapse
Hell man no posts from anyone??
Excellent excellent thread man.
dhirend_6d said:
Hell man no posts from anyone??
Click to expand...
Click to collapse
With 1500+ views hopefully it's because it's written that well People don't need to ask anything. :silly:
dhirend_6d said:
Excellent excellent thread man.
Click to expand...
Click to collapse
Thanks.
Thanks for this!
Sent from my SGH-I747 using xda premium
Can you make a tutorial
1. How to port magnify glass to ics devices/mdpi
2.how to port small app to ics devices/mdpi
3. How to add internet speedo meter In pull down menu not in status bar for ics
A million thanks if you make it ......
Sent from my ST21i2 using xda app-developers app