BatteryFull Popup FIXED ? - Galaxy S I9000 Q&A, Help & Troubleshooting

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.

Related

How To Change TouchFlo Default Browser To Opera?

The default browser for the 'Launch Browser' button on my Diamond's TouchFlo Internet tab is Internet Explorer. Is there a way to change it to Opera?
Also, completely different question, is there a way to have programs actually close when you hit the 'x'? Anytime I exit a program it still shows up in the task manager until I close it there.
Thanks for any info.
About closing tasks:
On Home screen tap the tasklist button. Choose the middle icon. A Settings dialog should pop up. Go to the 3rd tab and switch the setting about X button
kosherpig said:
About closing tasks:
On Home screen tap the tasklist button. Choose the middle icon. A Settings dialog should pop up. Go to the 3rd tab and switch the setting about X button
Click to expand...
Click to collapse
Thanks! I looked right at that tab and missed it
Nobody has any ideas on changing the browser? I've found a file in the appplication data/manila folder that has the internet portal as iexplorer.exe but it's and xml file that I can't seem to edit.
you can edit an xml by simply moving it to your comp and opening it in notepad and saving in xml then moving it back... I don't think this is the right file but go for the hold and give it a shot...just change it back if it fails.
You'll probably need freeware Total Commander to move the file though.
bugsykoosh said:
you can edit an xml by simply moving it to your comp and opening it in notepad and saving in xml then moving it back... I don't think this is the right file but go for the hold and give it a shot...just change it back if it fails.
You'll probably need freeware Total Commander to move the file though.
Click to expand...
Click to collapse
Make a copy of the file on your computer to edit, rename the file on your device and copy the edited file back to your device.
Thank you..
editting the xml file worked for me..
Now changed the browser and I also added some links in the internet-tab.
ties said:
Thank you..
editting the xml file worked for me..
Now changed the browser and I also added some links in the internet-tab.
Click to expand...
Click to collapse
Wow, it didn't seem to work for me. All I changed was "iexplorer.exe" to "OperaL.exe", is there something else I needed to change?
I just changed from:
<BrowserExe>\Windows\BrandedBrowser.exe</BrowserExe>
to:
<BrowserExe>\Windows\iexplorer.exe</BrowserExe>
after this a soft reset and it worked for me...
ties said:
I just changed from:
<BrowserExe>\Windows\BrandedBrowser.exe</BrowserExe>
to:
<BrowserExe>\Windows\iexplorer.exe</BrowserExe>
after this a soft reset and it worked for me...
Click to expand...
Click to collapse
I'll try it again. What was your default browser?
Well I tried it again, managed to get rid of some of the unwanted 'favourites' under the globe but it still launches internet explorer instead of opera even after changing the .exe line.
Default was Opera (in a Tmob-rom)..but i can not work with opera..
My complete new xml-file looks like this:
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<BrowserExe>\Windows\iexplore.exe</BrowserExe>
<IncludeUserFavorites>False</IncludeUserFavorites>
<Banner
DefaultImagePath="\Windows\ie7.jpeg"
NavigateUrl=""
Text=""
Width="400"
Height="123" />
<OperatorLinks>
<Link
Text="Startpagina"
NavigateUrl="http://startpagina.mobi/"
ImagePath="" />
</OperatorLinks>
</InternetPortal>
I also changed the picture and added a link: "startpagina"
Thanks for posting that ties.
Here's mine:
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<BrowserExe>\Windows\OperaL.exe</BrowserExe>
<IncludeUserFavorites>False</IncludeUserFavorites>
<Banner DefaultImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner.qtc" SelectedImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner_selected.qtc" NavigateUrl="" Text="Launch Browser" Width="480" Height="215" />
<OperatorLinks>
<Link Text="YouTube" Executable="\windows\youtube.exe" ImagePath="\Windows\HTC\Assets\Images\InternetPortal\youtube.qtc" />
</OperatorLinks>
</InternetPortal>
I guess it's starting Internet Explorer for some other reason since I've changed the target in this file. Weird that the other changes I made worked but the browser change didn't. Oh well, hopefully someone who knows about this sort of thing will chime in.
Finally found out how to get this working, someone on another forum suggested this:
HKCU\Software\HTC\Manila\DefaultBrowserIsIE = 0
I also have the xml file changed as above but not sure if that's required.
I tried just changing "HKCU\Software\HTC\Manila\DefaultBrowserIsIE = 0" and it did not work. I really don't feel comfortable changing the xml file. Is there a simple way of doing this?
micaman said:
I tried just changing "HKCU\Software\HTC\Manila\DefaultBrowserIsIE = 0" and it did not work. I really don't feel comfortable changing the xml file. Is there a simple way of doing this?
Click to expand...
Click to collapse
I just downloaded microsoft xml notepad to my pc (it's free), copied the original file from phone to pc, edited the file on pc, copied it back to the phone, soft reset, tada. Just be sure to keep a copy of the original, unaltered file (I kept a copy in a different directory on the phone).
Here is the file's location on a Rogers branded Touch Diamond:
\Application Data\Manila\InternetPortal-en-CA
Here is the original file contents (on my Rogers Touch Diamond):
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<BrowserExe>\Windows\iexplore.exe</BrowserExe>
<IncludeUserFavorites>False</IncludeUserFavorites>
<Banner
DefaultImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner.qtc"
SelectedImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner_selected.qtc"
NavigateUrl=""
Text="Launch Browser"
Width="480"
Height="215" />
<OperatorLinks>
<Link
Text="YouTube"
Executable="\windows\youtube.exe"
ImagePath="\Windows\HTC\Assets\Images\InternetPortal\youtube.qtc" />
<Link
Text="Do More"
NavigateUrl="http://mymobilehomepage.rogers.com/wmcontent/common/biz/domore/index.jsp"
ImagePath="\Windows\DoMore.qtc" />
<Link
Text="Rogers Mall"
NavigateUrl="http://mymobilehomepage.rogers.com"
ImagePath="\Windows\RogersMall.qtc" />
</OperatorLinks>
</InternetPortal>
Here's the file after I edited it:
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<BrowserExe>\Windows\OperaL.exe</BrowserExe>
<IncludeUserFavorites>False</IncludeUserFavorites>
<Banner DefaultImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner.qtc" SelectedImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner_selected.qtc" NavigateUrl="" Text="Launch Browser" Width="480" Height="215" />
<OperatorLinks>
<Link Text="YouTube" Executable="\windows\youtube.exe" ImagePath="\Windows\HTC\Assets\Images\InternetPortal\youtube.qtc" />
</OperatorLinks>
</InternetPortal>
Note that I also removed some of the carrier provided links that show up under the globe on the internet tab.
To be honest, I don't know what would happen if you screw up the file because it worked without any problems for me.
KevinRmr said:
I just downloaded microsoft xml notepad to my pc (it's free), copied the original file from phone to pc, edited the file on pc, copied it back to the phone, soft reset, tada. Just be sure to keep a copy of the original, unaltered file (I kept a copy in a different directory on the phone).
Here is the file's location on a Rogers branded Touch Diamond:
\Application Data\Manila\InternetPortal-en-CA
Here is the original file contents (on my Rogers Touch Diamond):
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<BrowserExe>\Windows\iexplore.exe</BrowserExe>
<IncludeUserFavorites>False</IncludeUserFavorites>
<Banner
DefaultImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner.qtc"
SelectedImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner_selected.qtc"
NavigateUrl=""
Text="Launch Browser"
Width="480"
Height="215" />
<OperatorLinks>
<Link
Text="YouTube"
Executable="\windows\youtube.exe"
ImagePath="\Windows\HTC\Assets\Images\InternetPortal\youtube.qtc" />
<Link
Text="Do More"
NavigateUrl="http://mymobilehomepage.rogers.com/wmcontent/common/biz/domore/index.jsp"
ImagePath="\Windows\DoMore.qtc" />
<Link
Text="Rogers Mall"
NavigateUrl="http://mymobilehomepage.rogers.com"
ImagePath="\Windows\RogersMall.qtc" />
</OperatorLinks>
</InternetPortal>
Here's the file after I edited it:
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<BrowserExe>\Windows\OperaL.exe</BrowserExe>
<IncludeUserFavorites>False</IncludeUserFavorites>
<Banner DefaultImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner.qtc" SelectedImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner_selected.qtc" NavigateUrl="" Text="Launch Browser" Width="480" Height="215" />
<OperatorLinks>
<Link Text="YouTube" Executable="\windows\youtube.exe" ImagePath="\Windows\HTC\Assets\Images\InternetPortal\youtube.qtc" />
</OperatorLinks>
</InternetPortal>
Note that I also removed some of the carrier provided links that show up under the globe on the internet tab.
To be honest, I don't know what would happen if you screw up the file because it worked without any problems for me.
Click to expand...
Click to collapse
i must have spent the last 2 hrs, with my pc, & total commander searching for this file to edit? in my application data folder i have,
AppToDate
GoogleMaps
HTC
MDS
Microsoft
MusicID
Sounds
Volatile
i cant find the manila folder or the InternetPortal xml, can anyone help me?!?
Same problem for me!! I can't find the xml file...
the opera that came with my touch diamond was the default. everytime i load skyfire it changed it to skyfire... to fix it in the address bar on opera type this opera:config look for something called "install" put a check next to default then click the button labeled default. then click save. completely exit the browser and it should work I know it does for me!
KevinRmr said:
I just downloaded microsoft xml notepad to my pc (it's free), copied the original file from phone to pc, edited the file on pc, copied it back to the phone, soft reset, tada. Just be sure to keep a copy of the original, unaltered file (I kept a copy in a different directory on the phone).
Here is the file's location on a Rogers branded Touch Diamond:
\Application Data\Manila\InternetPortal-en-CA
Here is the original file contents (on my Rogers Touch Diamond):
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<BrowserExe>\Windows\iexplore.exe</BrowserExe>
<IncludeUserFavorites>False</IncludeUserFavorites>
<Banner
DefaultImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner.qtc"
SelectedImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner_selected.qtc"
NavigateUrl=""
Text="Launch Browser"
Width="480"
Height="215" />
<OperatorLinks>
<Link
Text="YouTube"
Executable="\windows\youtube.exe"
ImagePath="\Windows\HTC\Assets\Images\InternetPortal\youtube.qtc" />
<Link
Text="Do More"
NavigateUrl="http://mymobilehomepage.rogers.com/wmcontent/common/biz/domore/index.jsp"
ImagePath="\Windows\DoMore.qtc" />
<Link
Text="Rogers Mall"
NavigateUrl="http://mymobilehomepage.rogers.com"
ImagePath="\Windows\RogersMall.qtc" />
</OperatorLinks>
</InternetPortal>
Here's the file after I edited it:
<?xml version="1.0" encoding="utf-16"?>
<InternetPortal>
<BrowserExe>\Windows\OperaL.exe</BrowserExe>
<IncludeUserFavorites>False</IncludeUserFavorites>
<Banner DefaultImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner.qtc" SelectedImagePath="\Windows\HTC\Assets\Images\InternetPortal\banner_selected.qtc" NavigateUrl="" Text="Launch Browser" Width="480" Height="215" />
<OperatorLinks>
<Link Text="YouTube" Executable="\windows\youtube.exe" ImagePath="\Windows\HTC\Assets\Images\InternetPortal\youtube.qtc" />
</OperatorLinks>
</InternetPortal>
Note that I also removed some of the carrier provided links that show up under the globe on the internet tab.
To be honest, I don't know what would happen if you screw up the file because it worked without any problems for me.
Click to expand...
Click to collapse
I've managed to edit a new copy of the file but I can;t get it back on the phone. I'm getting an error telling me that i don;t have permission to create items when I try to replace the exiting XML file with the new one or an error telling me I don;t have permission to delete the file when I try to delete the file before copying the new one.
So Close!! Please help!
Don't remove the file. Just use Total Commander and go to the file then press the pen/paper icon at the bottom and you can edit it right there. here are the working lines:
Opera:
<BrowserExe>\Windows\OperaL.exe</BrowserExe>
IE is:
<BrowserExe>\Windows\iexplore.exe</BrowserExe>
SkyFire is:
<BrowserExe>\program files\skyfire\skyfire.exe</BrowserExe>
Iris is:
<BrowserExe>\program files\iris browser\irisbrowser.exe</BrowserExe>
Does anyone know how to get NetFront (Access) to work? I get a warning that it's not a trusted or signed certificate. Thanks
By the way, no soft reset is needed after changing the xml- the changes take effect immediately.

[FIX] Show status bar item press (10/28/10)

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.

[HOW TO] Centre clock and icon switch. Update: bottom power control widget!

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

[MOD] Statusbar MOD

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

[MOD] Statusbar MOD

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

Categories

Resources