Hey all! I sat down today, for hours, trying to figure this out and I finally got it. The solution was actually a little bit easier than I had thought but I had to jump through a lot of hoops, semi-boot loops and more.
Status Bar XML's per a couple requests. Download and pop in an Extracted (NOT decoded) framework-res.apk. These are encoded with light colors. You CAN edit these in a hex editor like HxD, open up the file, then Find 0800001C Make sure "Hex Values" is selected.
EDIT: Currently Making a Windows App to do this and other things. Stay tuned.
First things first:
- Instructions are from a Win 7 x64 PC perspective
- I am NOT liable if you screw something up
- Your phone must be rooted, have froyo (2.2), and be de-odexed.
- This guide assumes you know how to use adb, 7-Zip
- I am not going to explain the above steps, use google or xda's search.
- If you are going to edit any .9.png files like "status_bar_close_on.9.png" you MUST keep the existing transparency and black bars in place. If you don't you will NOT be able to finish the process.
** Quick Trick **
Windows 7: Right click My Computer, Click Properties, Click Advanced System Settings, Click Environment Variables. In user vars and system vars there is a "path" variable. Edit it. Copy paste your SDK path and the SDK\Tools path.
Windows XP: Right click My Computer, Properties, Advanced Tab, Environment Variables. In user vars and system vars there is a "path" variable. Edit it. Copy paste your SDK path and the SDK\Tools path.
This will allow ADB to run without being in the sdk\tools folder.
Instructions:
0. Make a backup of framework-res.apk from /system/framework
- Open the command Prompt
: adb pull /system/framework/framework-res.apk C:\phonetheme\backup\fwbu.apk
: adb pull /system/framework/framework-res.apk C:\phonetheme\working\framework-res.apk
1. Get APKTOOL.
2. Download the top 2 files. Extract the contents of the files to C:\Windows
3. Open the command prompt
: apktool if C:\phonetheme\backup\fwbu.apk droidx (or whatever your device is)
: apktool d -f -t droidx C:\phonetheme\working\framework-res.apk C:\phonetheme\working\framework-decoded\
Optional. Go to C:\phonetheme\working\framework-decoded\res\drawable-hdpi-v4\ and modify images if you wish. You do not have to do it this way, but it can be done. You can just open the apk with 7 zip and extract them/edit them as well.
4. Go to C:\phonetheme\working\framework-decoded\res\layout
5. Open status_bar_latest_event_content.xml in notepad
6. Where ever you see something like this: android:textColor="?textColorSecondaryInverse"
In between the quotes, replace @color/dim_foreground_dark (or whatever) with a 8 char hex string. The format is NORMAL, not BACKWARD like in Hex. So when you are done you should have something like "#FFFFFFFF". The format is #AARRGGBB
The first color changes the heading "Voicemail Messages"
The second changes the descriptor "Dial *86"
The third changes the datetime stamp
So mine is, "#FFFFFFF", then "#FF747c8d", last "#ffbdc8df"
7. Make all your color changes. Save.
8. Open up the command prompt again
: apktool b C:\phonetheme\working\framework-decoded C:\phonetheme\build\framework-res.apk
Now IF you get a LOT of messages, like hundreds. Your .9.png's are not compiling correctly. You may have to load the originals and start over.
If you get WARNINGS but not many (mine were related to a translation message for "en-GB") then you are fine.
9. Browse to C:\phonetheme\working\framework-decoded\build
Ah ha, that wasn't there before!
10. Open C:\phonetheme\working\framework-res.apk in 7-Zip
11. With it open delete the /res directory, AndroidManifest.xml, resources.arsc files from 7-Zip.
LEAVE THE /META-INF and /assets folders!
12. From the C:\phonetheme\working\framework-decoded\build directory, open apk directory. Select and drag the /res folder, AndroidManifest.xml, and resources.arsc to the 7-Zip window so they are in the archive.
13. Backup C:\phonetheme\working\framework-res.apk. Copy to C:\phonetheme\backup\ and name it something like framework-res-new.apk
14. Open the command prompt window
: adb remount
: adb push C:\phonetheme\working\framework-res.apk /sdcard/framework-res.apk
: adb push C:\phonetheme\backup\fwbu.apk /sdcard/fwbu.apk (you only need to do this when you have a new backup!
: adb shell
#: su (if not already #)
[At this point, I always make my screen on and unlocked, you don't have to, but I like to]
#: cp /sdcard/framework-res.apk /system/framework/
At this point, if you try and open anything on your phone, it will lock for a second and droid to the droid text/eye animation for a second. IF it loops! You will notice that you are still connected over ADB.
If and only IF it LOOPS from the eye to the text or if the text animation looks obviously broken. Type the following
#: cp /sdcard/fwbu.apk /system/framework/framework-res.apk
The next time it loops, it will load your backup and start running again. DO NOT REBOOT! Other wise you have to nandroid or SBF it like I did.
#: rm /sdcard/framework-res.apk
#: exit
: adb remount
: adb pull /system/framework/framework-res.apk C:\phonetheme\backup\fwbu.apk
If it comes up normally, and you get to the lock screen, unlock, and open your notification shade. Tada! You are done!
Best part? Because the decoded folder is there, if you want to make changes you just start at Step 7 again, delete the build folder, re-build and so on.
Here's what mine looks like!
{
"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"
}
Last note. If I missed something, let me know, or if you have problems, report them here. I'll try and answer best I can. I worked for hours on this today, so I may have missed something, though I doubt it.
In the XML. Look in the "layout" folder of framework-res.apk. I'm not sure whicl file it is. But try this:
Pull every file from the "layout" folder. Open each XML file in a hex editor, like HxD or Hex Workshop. Now in status_bar.xml if you edit it the right way you can change the color of notification, like when you get a text message or when you connect the phone to a computer. That's for notifications though.
So you might want to try other XML files.
Open an random one (in the hex editor), and look for the values 08 00 00 1C, then you have to change the values AFTER that. The are black so that values are going to be 00 00 00 FF. Change the 0's to the color you want, the color you want has to be a hex value.
If that's confusing. PM, and I'll give you my gTalk.
ghostlypickel said:
In the XML. Look in the "layout" folder of framework-res.apk. I'm not sure whicl file it is. But try this:
Pull every file from the "layout" folder. Open each XML file in a hex editor, like HxD or Hex Workshop. Now in status_bar.xml if you edit it the right way you can change the color of notification, like when you get a text message or when you connect the phone to a computer. That's for notifications though.
So you might want to try other XML files.
Open an random one (in the hex editor), and look for the values 08 00 00 1C, then you have to change the values AFTER that. The are black so that values are going to be 00 00 00 FF. Change the 0's to the color you want, the color you want has to be a hex value.
If that's confusing. PM, and I'll give you my gTalk.
Click to expand...
Click to collapse
Yes. He's correct ^^^. I replied to your question in my theme thread and this correlates with what I stated. Look for other status bar xml's. I know there are more than just status_bar.xml
Sent from my DROIDX using Tapatalk
Doesn't work for FroYo.
The hex string 0800001C doesn't exist in the other status bar xmls. I think I've figured this out though.
This is out of status_bar_extended.xml (plain-text)
Code:
android:textColor="?textColorSecondaryInverse"
Then I found a file in /res/values/styles.xml I see:
Code:
<item name="textColorSecondaryInverse">@color/secondary_text_light</item>
Then in /res/color/secondary_text_light.xml
Code:
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:state_enabled="false" android:color="@color/dim_foreground_light_disabled" />
<item android:state_enabled="false" android:state_selected="true" android:color="@color/dim_foreground_light_disabled" />
<item android:state_enabled="false" android:state_pressed="true" android:color="@color/dim_foreground_light_disabled" />
<item android:state_selected="true" android:color="@color/dim_foreground_dark" />
<item android:state_pressed="true" android:color="@color/dim_foreground_dark" />
<item android:state_enabled="false" android:color="@color/dim_foreground_light_disabled" />
<item android:state_window_focused="false" android:color="@color/dim_foreground_light" />
<item android:color="@color/dim_foreground_light" />
</selector>
Then FINALLY in /res/values/colors.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<color name="darker_gray">#ffaaaaaa</color>
<color name="white">#ffffffff</color>
<color name="black">#ff000000</color>
<color name="transparent">#00000000</color>
<color name="background_dark">#ff000000</color>
<color name="background_light">#ffffffff</color>
<color name="safe_mode_text">#80ffffff</color>
<color name="bright_foreground_dark">#ffffffff</color>
<color name="bright_foreground_dark_disabled">#80ffffff</color>
<color name="bright_foreground_dark_inverse">#ff000000</color>
<color name="dim_foreground_dark">#ffbebebe</color>
<color name="dim_foreground_dark_disabled">#80bebebe</color>
<color name="dim_foreground_dark_inverse">#ff323232</color>
<color name="dim_foreground_dark_inverse_disabled">#80323232</color>
<color name="hint_foreground_dark">#ff808080</color>
<color name="bright_foreground_light">#ff000000</color>
<color name="bright_foreground_light_inverse">#ffffffff</color>
<color name="bright_foreground_light_disabled">#80000000</color>
<color name="dim_foreground_light">#ff323232</color>
<color name="dim_foreground_light_disabled">#80323232</color>
<color name="dim_foreground_light_inverse">#ffbebebe</color>
<color name="dim_foreground_light_inverse_disabled">#80bebebe</color>
<color name="hint_foreground_light">#ff808080</color>
<color name="lighter_gray">#ffdddddd</color>
<color name="perms_dangerous_grp_color">#ffdd6826</color>
<color name="perms_dangerous_perm_color">#ffdd6826</color>
<color name="shadow">#cc222222</color>
<color name="search_url_text_normal">#ff7fa87f</color>
<item type="color" name="search_url_text_selected">@color/black</item>
<item type="color" name="search_url_text_pressed">@color/black</item>
<item type="color" name="search_widget_corpus_item_background">@color/lighter_gray</item>
<item type="color" name="sliding_tab_text_color_active">@color/black</item>
<item type="color" name="sliding_tab_text_color_shadow">@color/black</item>
<color name="keyguard_text_color_normal">#ffffffff</color>
<color name="keyguard_text_color_unlock">#ffa7d84c</color>
<color name="keyguard_text_color_soundoff">#ffffffff</color>
<color name="keyguard_text_color_soundon">#ffe69310</color>
<color name="keyguard_text_color_decline">#fffe0a5a</color>
<color name="config_defaultNotificationColor">#ff00ff00</color>
</resources>
I think I have to hex edit that, and figure out where in the hex it is....I'll test it all out and let you guys know!
Please do... I wanna shade those damn notifications black asap lol.
phimuskapsi said:
Doesn't work for FroYo.
The hex string 0800001C doesn't exist in the other status bar xmls. I think I've figured this out though.
This is out of status_bar_extended.xml (plain-text)
Code:
android:textColor="?textColorSecondaryInverse"
Then I found a file in /res/values/styles.xml I see:
Code:
<item name="textColorSecondaryInverse">@color/secondary_text_light</item>
Then in /res/color/secondary_text_light.xml
Code:
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_window_focused="false" android:state_enabled="false" android:color="@color/dim_foreground_light_disabled" />
<item android:state_enabled="false" android:state_selected="true" android:color="@color/dim_foreground_light_disabled" />
<item android:state_enabled="false" android:state_pressed="true" android:color="@color/dim_foreground_light_disabled" />
<item android:state_selected="true" android:color="@color/dim_foreground_dark" />
<item android:state_pressed="true" android:color="@color/dim_foreground_dark" />
<item android:state_enabled="false" android:color="@color/dim_foreground_light_disabled" />
<item android:state_window_focused="false" android:color="@color/dim_foreground_light" />
<item android:color="@color/dim_foreground_light" />
</selector>
Then FINALLY in /res/values/colors.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<color name="darker_gray">#ffaaaaaa</color>
<color name="white">#ffffffff</color>
<color name="black">#ff000000</color>
<color name="transparent">#00000000</color>
<color name="background_dark">#ff000000</color>
<color name="background_light">#ffffffff</color>
<color name="safe_mode_text">#80ffffff</color>
<color name="bright_foreground_dark">#ffffffff</color>
<color name="bright_foreground_dark_disabled">#80ffffff</color>
<color name="bright_foreground_dark_inverse">#ff000000</color>
<color name="dim_foreground_dark">#ffbebebe</color>
<color name="dim_foreground_dark_disabled">#80bebebe</color>
<color name="dim_foreground_dark_inverse">#ff323232</color>
<color name="dim_foreground_dark_inverse_disabled">#80323232</color>
<color name="hint_foreground_dark">#ff808080</color>
<color name="bright_foreground_light">#ff000000</color>
<color name="bright_foreground_light_inverse">#ffffffff</color>
<color name="bright_foreground_light_disabled">#80000000</color>
<color name="dim_foreground_light">#ff323232</color>
<color name="dim_foreground_light_disabled">#80323232</color>
<color name="dim_foreground_light_inverse">#ffbebebe</color>
<color name="dim_foreground_light_inverse_disabled">#80bebebe</color>
<color name="hint_foreground_light">#ff808080</color>
<color name="lighter_gray">#ffdddddd</color>
<color name="perms_dangerous_grp_color">#ffdd6826</color>
<color name="perms_dangerous_perm_color">#ffdd6826</color>
<color name="shadow">#cc222222</color>
<color name="search_url_text_normal">#ff7fa87f</color>
<item type="color" name="search_url_text_selected">@color/black</item>
<item type="color" name="search_url_text_pressed">@color/black</item>
<item type="color" name="search_widget_corpus_item_background">@color/lighter_gray</item>
<item type="color" name="sliding_tab_text_color_active">@color/black</item>
<item type="color" name="sliding_tab_text_color_shadow">@color/black</item>
<color name="keyguard_text_color_normal">#ffffffff</color>
<color name="keyguard_text_color_unlock">#ffa7d84c</color>
<color name="keyguard_text_color_soundoff">#ffffffff</color>
<color name="keyguard_text_color_soundon">#ffe69310</color>
<color name="keyguard_text_color_decline">#fffe0a5a</color>
<color name="config_defaultNotificationColor">#ff00ff00</color>
</resources>
I think I have to hex edit that, and figure out where in the hex it is....I'll test it all out and let you guys know!
Click to expand...
Click to collapse
08 00 00 1C does exist. That's how I was able to change the colors for my theme.
Make sure the there are spaces, exactly like I typed.
I have gone through all of the other status bar xmls, searched for it with and without spaces. Both work in HxD search. Anyway. My method now.
1. Get apk tool and follow the instructions to install
2. Decode framework-res.apk to a dir of your choosing
3. Now you have xmls you can edit without a hex editor, notepad works.
4. Change the values, re-encode with apktool
5. Pop the new framework on.
I'm out smoking a cig I'll test this method when I go back in. and update with results
Getting errors on build...hrm...
EDIT: Finally got it to build. Making a nandroid backup before copying it back though....
EDIT2: built and then signed (which I shouldn't have done apparently) almost bricked. Apparently my nandroid backup failed too -.- says it can't mount the sdcard. I'll be back, have to SBF to 2.1 then Root, then install 2.2 again.
EDIT3: Whew, after a scare where SBF failed (had to format the ROM!) got it back on. About 15 minutes and I'll try somethin else.
EDIT4: Finally looks like I'm ok...working on nandroid, keep getting an error....
if you edit an xml file can you drop it straight into an unzipped fram folder, rezip it, rename it and install?
No. because the apk is decompiled. It has to be recompiled then I think signed. I've tried a couple methods and every time I copy the recompiled one to system, signed or not I get trapped at a logo loop. Thankfully if you use adb to copy the framework over you can copy a good one back the adb connection stays open. Copy it back and after a few seconds it starts to loaf properly again
Sent from my DROIDX using XDA App
when i decompile it said it couldnt for a few files, so recompiling will give me a bad apk, what if you recompile then pull just the xml files and place them in a good framework.apk . Have you tried that yet?
how many xml's are you changing at once?
bad4u6669 said:
when i decompile it said it couldnt for a few files, so recompiling will give me a bad apk, what if you recompile then pull just the xml files and place them in a good framework.apk . Have you tried that yet?
how many xml's are you changing at once?
Click to expand...
Click to collapse
Just one. The reason I can't just drag and drop to a known good one is that the folder is not in the normal one. There are a bunch of folders missing. Look at the decoded folder vs. what's in the file when opened with 7-zip.
I'm changing /res/values/colors.xml
no luck with status_bar.xml in res/layout ? there is colors in there...
Thought I had it there for a sec....getting much much closer. I can compile now, I get warnings but no errors...
Before when I had a "bad" framework, the droid text wouldn't even animate right, never got to the eye either.
Now I can get to the eye, but it just loops. Can fix by adb'ing the files back.
... Still working on this. Not giving up.,
EDIT: Yes. I'm positive. I've edited all I can in that file.
imma see what i can get out of this
https://docs.google.com/Doc?docid=0AcdxIJRSH9ypZGZzc2pxNDlfMjdnazk4OHNxZA&hl=en
and maybe tinker more with xultimate tool
dont you just love how no one will give a straight answer on how to do this... half threads here and there and still no whole...
I am very...very close.
EDIT:Omg...I got it. I'll edit the front page in a bit with instructions.
phimuskapsi said:
I am very...very close.
EDIT:Omg...I got it. I'll edit the front page in a bit with instructions.
Click to expand...
Click to collapse
hope thats going to come with full command lines you had to type
Proof of concept...the only problem is the way I edited it...well, it's gonna be complicated to get it JUST to effect the notification bar. I'm working on that part now.
phimuskapsi said:
Proof of concept...the only problem is the way I edited it...well, it's gonna be complicated to get it JUST to effect the notification bar. I'm working on that part now.
Click to expand...
Click to collapse
you have exactly what i need for my theme, white verizon , notification text and white date.
Note the Verizon is changed by a services.jar hack. Not this XML editing method.
Anybody know of a way to change it? I have goggled and i have searched these forums up and down and cant find a way to do it if the phone has a sim... It was easy on sprint.
you have to decompile frameworkres and change strings.xml
lfaber06 said:
Anybody know of a way to change it? I have goggled and i have searched these forums up and down and cant find a way to do it if the phone has a sim... It was easy on sprint.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=10365544
So this is Not an option until we have a working fully cwm?
is thera any way to remove carrier name in ics leak rom from top left side of status bar only ....nd not from lockscreen?
GaganPla said:
is thera any way to remove carrier name in ics leak rom from top left side of status bar only ....nd not from lockscreen?
Click to expand...
Click to collapse
You can try it like we did with GB... not sure if it was changed/rearranged in ICS...
-Decompile SystemUI.apk
-Open /res/layout/status_bar.xml with Notepad++ (or similar)
-Look for this line (taken from stock 2.3.6):
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:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
[COLOR="Red"]<TextView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="16.0sp" android:textStyle="bold" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="18" />[/COLOR]
-Change the values in the red highlighted line to look like this:
Code:
<TextView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="0.0sp" android:textStyle="bold" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="0.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="0" />
Note that there are probably other ways to accomplish the same effect (maybe delete that line entirely?) - but this way works by reducing the text to nothingness.
-Save the .xml
-Compile the .apk and...
a. compile with APK Manager and delete the status_bar.xml from the "keep" folder when prompted
b. or compile how you normally would and with 7-zip (or the like) drag and drop the newly edited and compiled status_bar.xml to your old SystemUI.apk
NOTE: For all of the above you will need to set the framework for apktool before you will be able to de/recompile apks.
-Drop copies of framework-res.apk, moto-res.apk, blur-res.apk, and SystemUI.apk into the same folder as apktool (with APK Manager it's the "other" folder)
-Open the command prompt on the folder where apktool is (by right-clicking or holding Shift and right-clicking)
-Type the following for each apk in the command prompt:
Code:
apktool if framework-res.apk
-Hit enter
Code:
apktool if moto-res.apk
-Hit enter, and do the same for the other two apks
-Now you should have no de/recompiling problems (well I shouldn't say no... watch them .9.pngs and check the log for errors)
NOTE: For all of the above you will need to set the framework for apktool before you will be able to de/recompile apks.
-Drop copies of framework-res.apk, moto-res.apk, blur-res.apk, and SystemUI.apk into the same folder as apktool (with APK Manager it's the "other" folder)
-Open the command prompt on the folder where apktool is (by right-clicking or holding Shift and right-clicking)
-Type the following for each apk in the command prompt:
Code:
apktool if framework-res.apk
-Hit enter
Code:
apktool if moto-res.apk
-Hit enter, and do the same for the other two apks
-Now you should have no de/recompiling problems (well I shouldn't say no... watch them .9.pngs and check the log for errors)
Click to expand...
Click to collapse
WHAT DOES NOTE THING SUPPOSE TO MEAN ? CANT I JUST DE COMPILE nd RECOMPILE SYSTEM UI ?is this note thing necessary nd thanks 4 the reply
GaganPla said:
WHAT DOES NOTE THING SUPPOSE TO MEAN ? CANT I JUST DE COMPILE nd RECOMPILE SYSTEM UI ?is this note thing necessary nd thanks 4 the reply
Click to expand...
Click to collapse
You can sure try... but if you have problems decompiling, try the steps in the note thing..
Sent from my phone's mind
Hi people i was wondering if anyone could help me, i want to use Quick Panel in UBKPD ROM, I pulled the apk from XXKPQ to /system/app but itsn't working, should I have to modify something in UBKPD to make it work?
Thanks and sorry for my bad english.
It's not enough, you have to mod /system/app/SystemUI.apk first and copy another apk. If you want there's a guide made by the creator of this mod: http://forum.xda-developers.com/showthread.php?t=1289896.
I followed the guide to port Quick Panel several times and always with the same result, boot loop at boot logo :'(
also tried to port extended power menu following this guide http://forum.xda-developers.com/showthread.php?t=1169443 and the result are the same, boot loop.
I dont kwnow what i am doing wrong, i follow the guides step by step. For compile/decompile apks i am using apktool in archlinux
Man if I uderstood corect you have need this:http://forum.xda-developers.com/showthread.php?t=633246 and
http://forum.xda-developers.com/showthread.php?t=1427959 and this:
http://forum.xda-developers.com/showthread.php?t=695701
The only problem I had when I modded SystemUI.apk was no statusbar, it always booted.
Bootloops usually happen when you mod framework-res.apk. That's because before you recompile it, you must select as compression level 0, otherwise you'll have bootloops.
If you want I can help you, just give me the files.
I think that I made some advances, because phone is booting now but still not working :'( i will explain:
Quick Panel:
I have status bar working after mod SystemUI.apk, but dont have the toogles.
SytemUI.apk and QuickPanelSettings.apk in /system/app, Permisions rw-,r--,r--
lidroid-res.apk in /system/framework, Permisions rw-,r--,r--
Done several times and allways the same result :'(
Extend Power Menu:
Phone now is booting after mod framework-res.apk
so i made the second phase mod android.policy.jar, compile and decompile is fine, after replace original the phone boot normal but when i long press the power button the phone hangs for a few seconds and then reboots, i make the process several thimes and always same result :'(
I want to learn that is why I am doing this over and over again. I compared the codes with the codes in XXKPQ.10lockscreen.14Toggle and are the same that I moded following the instructions in the previous post. Thanks in advice for the understandig and for the bad english
That's weird.
Try apkmanager instead of apktool (linux: http://apkmultitool.com/downloads/apk_manager_linux_5.0.zip). It's just a console script that makes your work easier. Read this guide that explains how to apply the "1% battery mod", you'll understand how to properly decompile and compile system apks (other than applying the "1% battery mod" ) with apkmanager.
Here what I usually do for android.policy.jar.
First of all you need baksmali.jar and smali.jar (download them from here: http://code.google.com/p/smali/downloads/list):
Exract classes.dex from android.policy.jar (jar = zip)
Decompile classes.dex running this command (of course you need to specify the correct path for baksmali.jar and classes.dex etc):
Code:
java -jar path/to/baksmali.jar -o classout/ classes.dex
Do all the changes to the files as explained in the guide
Recompile:
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
Replace classes.dex with new-classes.dex (rename new-classes.dex of course) inside android.policy.jar
I will read the guide for "1% battery mod" it would be usefull too for UBKPD , and also will try apkmanager about smali/baksmali I have allready installed maybe the way to compile was the error, cos i compiled like
Code:
java -jar smali.jar classes.dex
and then replaced in original android.policy.jar
I found the method on enabling the on-screen nav keys and I love them, also easier to use the phone one handed now. However, I'd like to modify it a bit, moving icons around and making it slightly taller. Any idea on how to accomplish this? I'm on CleanROM Lite 5.6, by the way.
dont know about touchwiz, but the customizable nav bar on AOSP adds a great deal of functionality to the phone and has a ton of customization options.
triton302 said:
I found the method on enabling the on-screen nav keys and I love them, also easier to use the phone one handed now. However, I'd like to modify it a bit, moving icons around and making it slightly taller. Any idea on how to accomplish this? I'm on CleanROM Lite 5.6, by the way.
Click to expand...
Click to collapse
Moving the icons around is super simple if you have ADB and APKTOOL set up already.
- Set up ADB and APKTOOL on your computer.
- Download the rom to your computer and extract twframework-res.apk and framework-res.apk (located in /system/framework/) to the folder where ADB and APKTOOL reside. Also extract SystemUI.apk (located in /system/app/) to that same folder.
- Now you have to load the frameworks. Open the terminal (command prompt) and cd to the directory with the files you copied. Once there, type:
apktool if twframework-res.apk
then hit enter. Then type:
apktool if framework-res.apk
then hit enter.
- Now you need to decompile systemui. Type:
apktool d SystemUI.apk sysui
This decompiles systemui to the folder sysui. Leave the terminal open.
- Now you should navigate to and open in a text editor the file called tw_navi_bar.xml (located in /sysui/res/layout/).
- Once you have this file open you will see a bunch of text strings like this:
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/nav_buttons" android:background="@drawable/tw_navigationbar_bg" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="false">
[COLOR="Red"]<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_navigationbar_back" android:layout_weight="1.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/tw_sysbar_highlight" />[/COLOR]
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_navigationbar_home" android:layout_weight="1.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="true" systemui:glowBackground="@drawable/tw_sysbar_highlight" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_navigationbar_recent" android:layout_weight="1.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/tw_sysbar_highlight" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_navigationbar_menu" android:layout_weight="1.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/tw_sysbar_highlight" />
</LinearLayout>
- Each button (back, home, recents and menu) are line of code. To rearrange the buttons simply rearrange the code. The above is button order is back, home, recents then menu. You will have to do this for both portrait and landscape. Once you have made your edits save and close the file.
- Now return to the terminal and type:
apktool b sysui newsysui.apk
- The app will build and you will see a new apk with the name above.
- Now you need to copy the tw_navi_bar.xml file to the original apk. You can accomplish this in linux by opening each apk up in the archive manager and simply dragging the modified a tw_navi_bar.xml to the old SystemUI.apk. In windows you may need to unzip (because apks unzip) and then move the modified file to the unziped original apk. Then you would need to zip it up (as a zip file) then rename it back to an apk. so from SystemUI.zip to SystemUI.apk.
- Once you have dont that you need to get it to your phone in the manner that you see fit. Then you need to replace the old SystemUI.apk on your phone (located in /system/app/) with the modified on you just made.
- Reboot. Then change the permissions of the SystemUI.apk you just copied to whatever the rest of your system apps are.
- Reboot again and profit.
To change the height of the buttons you need to decompile framework res and edit the dimens.xml (located in /<decmpiled folder name>/res/values/).
For L Style Header(EASY) go HERE
For Panel Transparency go HERE
For adding L Style Date/Clock View go HERE
To add Battery/WiFi/Bluetooth/Alarm icons in Header go HERE
Yo guys! Toady I am here with a more perfect guide for Lollipop Style header! No smali work, no Public comparing, only layout game!
For Panel Transparency like mine, go HERE
Let's begin.
Decompile your SystemUI.
Go to res/layout and COPY status_bar_expanded_header.xml [MTK] / tw_status_bar_expanded_header.xml [TouchWiz]
Paste it on your Desktop or in any other directory where you wish to.
Rename that xml to l_bar_expanded_header.xml
Now copy and paste l_bar_expanded_header.xml in your SystemUI/res/layout.
Next, open gemini_status_bar_expanded.xml [MTK] / tw_status_bar_expanded_dual.xml [TouchWiz]
{TIP FOR TOUCHWIZ USERS: IF YOU DON"T HAVE tw_status_bar_dual.xml IN YOUr Samsung's UI, THEN OPEN tw_status_bar_expanded.xml}
Now in the xml, find [MTK]
Code:
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
For TouchWIz[JB], find this:
Code:
<include android:layout_width="fill_parent" android:layout_height="@dimen/tw_notification_panel_header_height" layout="@layout/tw_status_bar_expanded_header" />]
Paste this code below the above line:
Code:
<include layout="@layout/l_bar_expanded_header" />
Save the xml.
Now, go to res/layout and open status_bar_expanded_header.xml [MTK] / tw_status_bar_expanded_header.xml [TouchWiz] and find:
Code:
@id/clock
in the same line, find:
Code:
android:layout_width="blablabla" android:layout_height="blablabla"
Make it look like this:
Code:
android:layout_width="0.0dip" android:layout_height="0.0dip"
Now in the same XML, find,
Code:
@id/date
in the same line find:
Code:
android:layout_width="blablabla" android:layout_height="blablabla"
Make it look like this:
Code:
android:layout_width="0.0dip" android:layout_height="0.0dip"
Now, in second line of the xml find:
Code:
android:background="blablabla"
Make it look like this:
Code:
android:background="#ff374244"
Now, except in second line, make all
Code:
android:background="blablabla"
Look like this
Code:
android:background="#00000000"
in the XMl.
Save the XML.
Download the l_header.9.zip and extract it. COPY and PASTE l_header.9.png to your res/drawable-hdpi folder. [OR drawable-mdpi/ldpi/xhdpi as per your device]
Now, go to res/layout and open l_bar_expanded_header.xml.
Now, in the second line of the xml, find:
Code:
android:background="blablabla"
Make it look like:
Code:
android:background="@drawable/l_header"
In the same line find:
Code:
android:layout_height="blablabla"
Make it look like this:
Code:
android:layout_height="75.0dip"
Now, in the same XML, find:
Code:
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
Now, below this line ^
Search all
Code:
android:layout_width="blablabla" android:layout_height="blablabla"
and make all look like this:
Code:
android:layout_width="0.0dip" android:layout_height="0.0dip"
Save the XML.
RECOMPILE THE UI. SIGN. PUSH TO system/app with permissions 644.
WHAT CAN YOU DO NOW?If you want to add battery meter, or network bar in header, add it in status_bar_expanded_header.xml, and if you want to add potato weather by Sir @mariozawa in header again, add the code in l_statusbar_expanded_header.xml
In short! You made a two tabbed header!
CREDITS:
@Aniruddha_Pathak
You
what code should include to get battery and other stuff?
pranavraut033 said:
what code should include to get battery and other stuff?
Click to expand...
Click to collapse
Will give a tut soon
pranavraut033 said:
what code should include to get battery and other stuff?
Click to expand...
Click to collapse
Here it GOES
thank bro love your work
pranavraut033 said:
thank bro love your work
Click to expand...
Click to collapse
thank you :angel:
something went wrong, no clear and setting buttons
Huncriter said:
something went wrong, no clear and setting buttons
Click to expand...
Click to collapse
Do it again from the first, Sir