Hex Edit Method for Changing Sprint banner text on Lockscreens OR Notification Menu - EVO 4G Themes and Apps

I wanted to try and see if it were possible to avoid having to hack smali code, or use CDMA Workshop to globally change your phone settings for displaying the carrier name, with the goal of making it easier for someone to change the 'Sprint' banner text on their vanilla lockscreen, HTC Lockscree, or Notifications Window, to something else.
Here's a way if you are interested (see end of post for links for HTC Lockscreen and/or Notification Window):
0. Make a nandroid before attempting this!
1. Download the attached XML file which I have modified to allow this option. The XML file, keyguard_screen_tab_unlock.xml, has been given a .txt extension so that it downloads correctly. After downloading, remove the .txt extension.
2. Open up the compiled binary XML file you just downloaded in your favorite hex editing program, I prefer HxD. It is freeware, and it's what all the kids are using .
3. I have modified the attached XML file to default to say 'HTC EVO' as the banner. This is just so that there is something to search for and replace. In addition, the compiled XML will allow for a replacement string up to 20 characters in length. You CANNOT exceed, or shorten the actual character length of data when hex editing. That is, you cannot delete anything in the file, only replace.
But, you say: "Hey John, 'HTC EVO' is NOT 20 characters in length!" This is correct, it is only 7, and as such, to the left (front) of this text are 13 spaces that I've left empty for you.
4. Search for the hex value of this 20 character string I've inserted into the XML, which is the following sequence:
Code:
20 20 20 20 20 20 20 20 20 20 20 20 20 48 54 43 20 45 56 4F
As you can quickly tell, the hex value '20' represents a space, while the last 7 hex values represent the text 'HTC EVO', as follows:
Code:
20 20 20 20 20 20 20 20 20 20 20 20 20 48 54 43 20 45 56 4F
H T C E V O
5. Figure out the text you want to use for the lockscreen banner, again, up to 20 characters in length, and use the following site to convert your text to hex equivalents:
http://www.string-functions.com/string-hex.aspx
In my example, I will use "John's Phone", which converts to:
Code:
4a 6f 68 6e 27 73 20 50 68 6f 6e 65
6. Since "John's Phone" is only 12 characters in length, I need eight more characters to replace a fixed 20 character length string with another 20 character length string, so I have to append 8 hex equivalent spaces, represented by '20' to the front of my new string:
Code:
20 20 20 20 20 20 20 20 4a 6f 68 6e 27 73 20 50 68 6f 6e 65
7. Now that I have my new string, in the hex editor that I just opened the XML file in, simply search & replace the old hex value (be sure to search for hex, not text):
Code:
20 20 20 20 20 20 20 20 20 20 20 20 20 48 54 43 20 45 56 4F
With the new hex value:
Code:
20 20 20 20 20 20 20 20 4a 6f 68 6e 27 73 20 50 68 6f 6e 65
8. Save the modified XML file.
This XML file's home is in your framework-res.apk file, in the '/res/layout' folder. And you need to replace the default 'keyguard_screen_tab_unlock.xml' with your modified version.
9. Pull the current framework-res.apk file to your working folder via adb:
Code:
adb pull /system/framework/framework-res.apk .
10. Open the .apk file up by using any zip type program, 7zip, winRar, WinZip, etc, navigate to the '/res/layout/' folder and drop in your modified 'keyguard_screen_tab_unlock.xml' file.
11. Close up the file and push back to your phone:
Code:
adb remount
adb push framework-res.apk /system/framework
adb reboot
That's it. No decompiling java code, no hex workshop, just a little elbow grease. Once your phone comes back up, if you followed the steps correctly, you will see your newly modified custom banner on the stock vanilla lockscreen, assuming that this is what you are already running. Note, pushing a live apk file back to your phone may reset your widgets and/or cause you to have to reset up your sync accounts. You can avoid this by creating a flashable zip, or pushing to the phone as soon as it responds to adb remount.
While it seems like a lot of steps, I just wanted to lay this out as explicitly as possible. Anyone who does any sort of themeing or mild work on the phone should be able to pull this off in a few minutes at most.
Reference:
{
"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"
}
EDIT: See Here for similar instructions for the stock HTC LockScreen.
EDIT 2: See Here for instructions for modifying the banner text on the status bar notification window.
EDIT 3: If running CyanogenMod, use the applicable version attached with the .cm6*.txt extension, and be sure to remove everything after the .xml extension.
EDIT 4: If running vanilla locks mod for Sense (rotary, slider, etc), use the applicable version attached with the .vanilla*.txt extension, and be sure to remove everything after the .xml extension.

This is great! Thanks.

nukedukem said:
This is great! Thanks.
Click to expand...
Click to collapse
Sure thing. Would love to see a screen capture by someone who pulls this off successfully, to verify there are no errors in the steps / sequence I posted.

I removed the text completely with 20's, so maybe this isn't the best example, but it worked. Thanks again.

nukedukem said:
I removed the text completely with 20's, so maybe this isn't the best example, but it worked. Thanks again.
Click to expand...
Click to collapse
Nope, great example. I fully expected that some would want to do that. Nice. Thanks for the confirmation.

Similar Solution for Status Bar
Here is an example for doing something similar for the status bar drown down menu, by replacing 'Sprint' with your own text, w/o CDMA Workshop.
This did, however, require some smali edits, which I was trying to avoid...

I am a total newb when it comes hex editing and so forth, but I was able to follow every single step with no problems, however, my lock screen still says "Sprint" following a reboot. I'm on Fresh 3.3.0.1. Any suggestions on what to check?

erikivy said:
I am a total newb when it comes hex editing and so forth, but I was able to follow every single step with no problems, however, my lock screen still says "Sprint" following a reboot. I'm on Fresh 3.3.0.1. Any suggestions on what to check?
Click to expand...
Click to collapse
Are you using the HTC Lockscreen, or the Android Lockscreen? This is specifically for the Android Lockscreen.

JsChiSurf said:
Are you using the HTC Lockscreen, or the Android Lockscreen? This is specifically for the Android Lockscreen.
Click to expand...
Click to collapse
Ahhhhh, that must be it. Thanks for the quick clarification.

erikivy said:
Ahhhhh, that must be it. Thanks for the quick clarification.
Click to expand...
Click to collapse
If you want to verify your work, you can temporarily (or permanently) move the HTC Lockscreen out of the way, just to test.
Via adb, try the following:
Code:
adb remount
adb shell
cd /system/app
mv HtcLockScreen.apk HtcLockScreen.apk.bak
reboot
After rebooting, your phone should come up with the Android lockscreen in place, hopefully, with your custom text.
If you want to go back to your HTC Lockscreen:
Code:
adb remount
adb shell
cd /system/app
mv HtcLockScreen.apk.bak HtcLockScreen.apk
reboot
BTW, if interested, I could take some time and see if I can put together the same mod for the stock HTC Lock as well.

JsChiSurf said:
Here is an example for doing something similar for the status bar drown down menu, by replacing 'Sprint' with your own text, w/o CDMA Workshop.
This did, however, require some smali edits, which I was trying to avoid...
Click to expand...
Click to collapse
I would be very much interested in knowing how you did this as I can't run CDMA workshop in a virtual machine.
JsChiSurf said:
BTW, if interested, I could take some time and see if I can put together the same mod for the stock HTC Lock as well.
Click to expand...
Click to collapse
This may come in handy too

JsChiSurf said:
If you want to verify your work, you can temporarily (or permanently) move the HTC Lockscreen out of the way, just to test.
Via adb, try the following:
Code:
adb remount
adb shell
cd /system/app
mv HtcLockScreen.apk HtcLockScreen.apk.bak
adb reboot
After rebooting, your phone should come up with the Android lockscreen in place, hopefully, with your custom text.
If you want to go back to your HTC Lockscreen:
Code:
adb remount
adb shell
cd /system/app
mv HtcLockScreen.apk.bak HtcLockScreen.apk
adb reboot
BTW, if interested, I could take some time and see if I can put together the same mod for the stock HTC Lock as well.
Click to expand...
Click to collapse
This worked perfectly! Thanks for going the extra mile to help a rookie. I'm a long-time CM6 user just experimenting with Fresh, so I have no love-affair with the HTC lock screen. I'm happy to see the familiar vanilla lock.

nukedukem said:
I would be very much interested in knowing how you did this as I can't run CDMA workshop in a virtual machine.
Click to expand...
Click to collapse
I haven't given up on trying to accomplish this 100% through XML edits. By coupling with a recompiled services.jar, it can be problematic for those who may already have a custom services.jar file for other mods. If I don't find a solution, I'll post what I did for the current method.
nukedukem said:
This may come in handy too
Click to expand...
Click to collapse
I'll take a look. Can't imagine it should be much different that the vanilla lock change.

erikivy said:
This worked perfectly! Thanks for going the extra mile to help a rookie. I'm a long-time CM6 user just experimenting with Fresh, so I have no love-affair with the HTC lock screen. I'm happy to see the familiar vanilla lock.
Click to expand...
Click to collapse
Sweet. The fact that you pulled it off no longer makes you a rookie .

HTC Lock Screen
Okay, attached is the XML file to edit if using the stock HTC Lockscreen, as opposed to the Vanilla Android Lockscreen.
The instructions are virtually the same, with the exception being the name of the attached / applicable file is 'lock_screen_bar.xml'. Again, the attachment has been given a .txt extension for download, be sure to rename by removing the .txt extension prior to editing.
There are a couple of important differences between this mod and the vanilla mod. Since on the HTC Lockscreen the 'Sprint' text is centered, and I wanted to allow for up to 20 characters in the name, you have to center your text across the 20 characters, rather than right align by appending the spaces to the front of your string. Also, I defaulted / hard coded the text in the attached file to be 'Sprint', rather than 'HTC EVO', to make it appear to be more 'stock' in nature.
So, now, when you search for the hex value to replace, which is Sprint surrounded by spaces, you will search for:
Code:
20 20 20 20 20 20 20 53 70 72 69 6E 74 20 20 20 20 20 20 20
S p r i n t
To re-iterate, it is imperative that you try and keep an equal number of spaces to the left/right of your text, to keep it centered on the lockbar. So, using "John's Phone" as the example, which again translates to:
Code:
4a 6f 68 6e 27 73 20 50 68 6f 6e 65
You can see that there are 12 hex characters, since we need 20, I need 8 spaces (20 - 12 = 8), equally distributed to the front and back of the string, or 4 each:
Code:
20 20 20 20 4a 6f 68 6e 27 73 20 50 68 6f 6e 65 20 20 20 20
So, we simply search and replace (in hex mode) the original value:
Code:
20 20 20 20 20 20 20 53 70 72 69 6E 74 20 20 20 20 20 20 20
For the new:
Code:
20 20 20 20 4a 6f 68 6e 27 73 20 50 68 6f 6e 65 20 20 20 20
Then, follow the instructions in the OP to pull/push your file. This time, the file to pull is 'HtcLockScreen.apk' in the '/system/app' folder, and the home for the XML file 'lock_screen_bar.xml' is the '/res/layout' folder of the apk.
And once done, after a reboot, voila:

WOOOOOOOOOOH 2xThumbs-Up

oops, my bad

Is this doable on the incredible?
Here is the file. You could possibly modify this for me? I see what you did with the HTC EVO banner in the hex, but I don't know where to add that here.

silverxbv2 said:
Is this doable on the incredible?
Here is the file. You could possibly modify this for me? I see what you did with the HTC EVO banner in the hex, but I don't know where to add that here.
Click to expand...
Click to collapse
What does it normally say by default? Verizon?
Hey... This thing makes phone calls too!

Can you use root explorer instead of adb push??

Related

[May 22, 2008] Important! Updated info on Page Pool adjustment

Recently I noticed a few new roms that do not pass the pattern match to find the places in the rom to alter the page pool size.
Kyphur's great PagePool Changer program is based on these patterns, at least partially and because of that may not be able to properly adjust some of these roms!
The premise has been to find 2 instances of the values in the rom and adjust both pairs to make the change.
I just did some testing using the HTC_WWE_3.28.405.0_radio_sign_25.83.40. 02_1.65.16.25_Ship rom. and verified that you only have to change the second sets of number in order to change the page pool size.
Kyphur's PagePool Changer program changes both sets of values when it finds a match to both and though changing the first set doesn't make a difference it does seem to hurt anything either. The second set he changes does the actual page pool adjustment.
The recent problem is with some of the newer hybrids especially the Diamond Roms.
Some of these newer roms do not match the pattern to find the second string. What some cooks have done in lieu of this is only adjust the values in the first match and assume it worked. From what I have tested it does not!
If you want to test the idea out on a rom you need to perform this test with a hex editor. I use XVI32 its freeware and seems to work well.
1) With a hex editor open your rom file. It can be a .nbh or a .nb rom file as it works with both.
2) Search for the pattern
A0 03 00 10 8E 05 03 00 00 0A 40 00 53 E3 06 16 A0 03 00 (for HTC roms)
or
A0 03 00 E0 84 05 03 00 00 0A 40 00 53 E3 06 E6 A0 03 00 for att 3.51 roms.
3) If it finds a match search again to jump to the next set.
If it doesnt find a second match then your are likely trying this on a hybrid rom and page pool changing wont work.
4) On the second set move back (left two bytes and you should see the values you expect (03 05 or 03 E5 for ROM with dynamic pool depending on the rom you use).
These are the value the page pool changer makes. You change the second byte (either 05 or E5) to (06 or E6) respectively. The first byte you change it to the actual value you want in hex. Example changing the two byes from 03 E5 to 12 E6 sets it to static page pool with a fixed size of 18 megs (16 in hex).
Saving the file now and its done!
However I dont see how to change these hybrid roms yet. Perhaps the trick is to examine the original roms (I havent found a diamond rom file yet) using the other pattern I documented in my original article.
http://forum.xda-developers.com/showthread.php?t=389071
Anyhow if anyone else can test the values on the new hybrids show how they are changing the pagepool and test the results. I will be happy to correct the document.
Thanks all,
Tayton

Change Volume Color from Green to differenet color

Hi,
I have searched XDA and I did not see if question was posted here or general theme forum here at XDA.
I'm posting it here to see if any dev's or someone already might have answer this for sense ROM. I like to change the volume color from green to some thing else. I'm not sure which APK to work and not sure if it simple modify a PNG file, XML file or smali file.
pbp
pbp776 said:
Hi,
I have searched XDA and I did not see if question was posted here or general theme forum here at XDA.
I'm posting it here to see if any dev's or someone already might have answer this for sense ROM. I like to change the volume color from green to some thing else. I'm not sure which APK to work and not sure if it simple modify a PNG file, XML file or smali file.
pbp
Click to expand...
Click to collapse
What do you mean by volume color? Are you talking about the modal dialog that comes up when you turning the volume up or down?
ASimmons said:
What do you mean by volume color? Are you talking about the modal dialog that comes up when you turning the volume up or down?
Click to expand...
Click to collapse
Yes, sorry I wasn't clear.
pbp776 said:
Yes, sorry I wasn't clear.
Click to expand...
Click to collapse
you can change the volume icon the bar color and the actual dialog box, by just changing the pngs in the framework-res.
panel_background.9.png in res/drawable-mdpi is the modal dialog background ic_volume.png and ic_volume_off.png are the icons
The dialog background tho is a 9 patch so youll need a decompile version to make edits on and then recompile and and it back.
ASimmons said:
you can change the volume icon the bar color and the actual dialog box, by just changing the pngs in the framework-res.
panel_background.9.png in res/drawable-mdpi is the modal dialog background ic_volume.png and ic_volume_off.png are the icons
The dialog background tho is a 9 patch so youll need a decompile version to make edits on and then recompile and and it back.
Click to expand...
Click to collapse
ASimmons, thanks. I'm sorry if I was not cleared in my first post. I got those PNG replaced and working. However, what I'm looking for or asking is to change the green gauge bar when you press volume up and down. I like to it change from green to black/blue. I changed app_gauge.9.png on setting.apk file assuming that would change it but that didn't. It only change on Battery usage screen.
pbp776 said:
ASimmons, thanks. I'm sorry if I was not cleared in my first post. I got those PNG replaced and working. However, what I'm looking for or asking is to change the green gauge bar when you press volume up and down. I like to it change from green to black/blue. I changed app_gauge.9.png on setting.apk file assuming that would change it but that didn't. It only change on Battery usage screen.
Click to expand...
Click to collapse
Framework-res drawable folder, it's an XML file, progress_horizontal I believe. The file is binary, so you will need to use hxd or similar program to edit with. Search for 0800001c. There are 6 instances, the last 4 control the gradient bar shade. Rgb hex code is 8 digits, last 2 should always be ft. Hope that help. I have several colors already setup for the Eris, if you want to try and use them, send me a pm. Maybe it'll save you some time...
Sent from my VANILLA TAZZ using XDA App
Macrodroid said:
Framework-res drawable folder, it's an XML file, progress_horizontal I believe. The file is binary, so you will need to use hxd or similar program to edit with. Search for 0800001c. There are 6 instances, the last 4 control the gradient bar shade. Rgb hex code is 8 digits, last 2 should always be ft. Hope that help. I have several colors already setup for the Eris, if you want to try and use them, send me a pm. Maybe it'll save you some time...
Sent from my VANILLA TAZZ using XDA App
Click to expand...
Click to collapse
Thanks Macrodroid... This is what I was looking for. I have PM you also.
Apps and resources needed
HxD hex editor can be found here Downloads | mh-nexus .
Color guides to go off of. I use this site for color gradients. #9d9e9d Gradient Color Chart
7-zip for opening .apk files with out changing .zip to extract. 7-Zip
framework-res.apk (after all this file is located in here).
Starting the process
1. Take 7-zip and extract framework-res.apk somewhere on your computer.
2. Navigate with in the new folder called framework-res to /res/drawable.
3. In here you will find the file progress_horizontal.xml
4. Open this file with HxD.
Understanding Hex values
The hex color values are backwards of what they would be in normal xml. The first default value in this xml is 9D 9E 9D FF. People get confused here so we are going to break it down.
The first 9D is for blue (B)
The 9E is for green (G)
The second 9D is for red (R)
Last is FF for alpha (A) - I always leave this value alone.
In normal hex it would be this way FF 9D 9E 9D.
First is FF for alpha (A)
The first 9D is for red (R)
The 9E is for green (G)
Last is the 9D for blue (B)
Do you see the difference? Lets do another example with different hex value. 9D128D is a purple color (just using it as different values).
9D = R
12 = G
8D = B
So in binary, here in Hxd it would be this way 8D 12 9D FF
8D = B
12 = G
9D = R
Now to edit the file
1. Now the file is open in HxD. Hit Ctrl+F to bring up the find box.
2. In this box put 08 00 00 1c in the Search for box. For data-type switch to Hex-values. Search direction should be for forward. Go ahead and click ok.
3. Now 08 00 00 1C will be highlighted. The eight numbers next to it are the color value in hex format. There will be nine of these values in this xml.
Default values in the xml > normal hex format
1. 9D 9E 9D FF --- FF 9D 9E 9D
2. 74 76 74 FF --- FF 74 76 74
3. 5A 5D 5A FF --- FF 5A 5D 5A
4. 00 D3 FF 80 --- 80 FF D3 00
5. 00 CB FF A0 --- A0 FF CB 00
6. 00 B6 FF 80 --- 80 FF B6 00
7. 00 D3 FF FF --- FF FF D3 00
8. 00 CB FF FF --- FF FF CB 00
9. 00 B6 FF FF --- FF FF B6 00
The first three are for the background and the last six are for the foreground (fill progress).
4. Click next to the highlight hex string of 08 00 00 1C. You can edit the 9D 9E 9D FF or leave it alone. I skip the first three since they are the background. These values represent the start, end and middle of the gradient
value 1 = start
value 2 = end
value 3 = middle
Middle is going to be the darkest one.
5. To get from one value to the next hit Ctrl+F again and hit ok. Make sure that you don't have 08 00 00 1C highlighted or it won't go to the next one.
6. Go to value 4 (00 D3 FF 80). In this example I am going to change it to FF00DC (pink). I put that hex color in the website from above. Get color info. Then click the link for color gradient colors. We will look at that in a bit. Back to HxD. I would put it in as DC 00 FF 80. Then hit Ctrl+F and hit ok.
7. We should be on value 5 (00 CB FF A0). When doing this color I go to the gradient chart for the start color to black. I go down 12 colors from FF00DC to CC00B0. That is what I am going to put in for value 5. So in HxD I put in B0 00 CC A0. Then hit Ctrl+F and hit ok.
8. Value 6 (00 B6 FF 80). Back to the chart. I go down 8 colors from CC00B0 to AA0092. This is going to be value 6. In HxD put in 92 00 AA 80. Hit Ctrl+f to go to value 7.
9. Value 7 is going to be the same as 4 but with alpha of FF. (DC 00 FF FF). Ctrl+F to go to value 8.
10. Value 8 is going to be the same as 5 but with alpha of FF. (B0 00 CC FF). Ctrl+F to go to value 9.
11. Value 9 is going to be the same as 6 but with alpha of FF. (92 00 AA FF). This is the last value. Go to file and save. Now you will have a progress_horizontal.xml and a progress_horizontal.bak (the .bak file is the orginal.
Pushing the new file to the system
1. Open the framework-res.apk as an archive with 7-zip. Go to /res/drawable. Take the progress_horizontal.xml we just did and put it in here. Hit the folder up until all the way out of framework-res.apk.
2. Either take the framework-res.apk and put in the tools folder of ADB and push to phone or use Root explorer to do this. I would stay away from doing this with terminal as it usually causes problems. Also with using ADB, you may want to do this while in recovery.
3. Reboot you phone for the changes to take affect. All progress bars should now be the gradient color you just made, enjoy.
YoungSinema said:
Apps and resources needed
HxD hex editor can be found here Downloads | mh-nexus .
Color guides to go off of. I use this site for color gradients. #9d9e9d Gradient Color Chart
7-zip for opening .apk files with out changing .zip to extract. 7-Zip
framework-res.apk (after all this file is located in here).
Starting the process
1. Take 7-zip and extract framework-res.apk somewhere on your computer.
2. Navigate with in the new folder called framework-res to /res/drawable.
3. In here you will find the file progress_horizontal.xml
4. Open this file with HxD.
Understanding Hex values
The hex color values are backwards of what they would be in normal xml. The first default value in this xml is 9D 9E 9D FF. People get confused here so we are going to break it down.
The first 9D is for blue (B)
The 9E is for green (G)
The second 9D is for red (R)
Last is FF for alpha (A) - I always leave this value alone.
In normal hex it would be this way FF 9D 9E 9D.
First is FF for alpha (A)
The first 9D is for red (R)
The 9E is for green (G)
Last is the 9D for blue (B)
Do you see the difference? Lets do another example with different hex value. 9D128D is a purple color (just using it as different values).
9D = R
12 = G
8D = B
So in binary, here in Hxd it would be this way 8D 12 9D FF
8D = B
12 = G
9D = R
Now to edit the file
1. Now the file is open in HxD. Hit Ctrl+F to bring up the find box.
2. In this box put 08 00 00 1c in the Search for box. For data-type switch to Hex-values. Search direction should be for forward. Go ahead and click ok.
3. Now 08 00 00 1C will be highlighted. The eight numbers next to it are the color value in hex format. There will be nine of these values in this xml.
Default values in the xml > normal hex format
1. 9D 9E 9D FF --- FF 9D 9E 9D
2. 74 76 74 FF --- FF 74 76 74
3. 5A 5D 5A FF --- FF 5A 5D 5A
4. 00 D3 FF 80 --- 80 FF D3 00
5. 00 CB FF A0 --- A0 FF CB 00
6. 00 B6 FF 80 --- 80 FF B6 00
7. 00 D3 FF FF --- FF FF D3 00
8. 00 CB FF FF --- FF FF CB 00
9. 00 B6 FF FF --- FF FF B6 00
The first three are for the background and the last six are for the foreground (fill progress).
4. Click next to the highlight hex string of 08 00 00 1C. You can edit the 9D 9E 9D FF or leave it alone. I skip the first three since they are the background. These values represent the start, end and middle of the gradient
value 1 = start
value 2 = end
value 3 = middle
Middle is going to be the darkest one.
5. To get from one value to the next hit Ctrl+F again and hit ok. Make sure that you don't have 08 00 00 1C highlighted or it won't go to the next one.
6. Go to value 4 (00 D3 FF 80). In this example I am going to change it to FF00DC (pink). I put that hex color in the website from above. Get color info. Then click the link for color gradient colors. We will look at that in a bit. Back to HxD. I would put it in as DC 00 FF 80. Then hit Ctrl+F and hit ok.
7. We should be on value 5 (00 CB FF A0). When doing this color I go to the gradient chart for the start color to black. I go down 12 colors from FF00DC to CC00B0. That is what I am going to put in for value 5. So in HxD I put in B0 00 CC A0. Then hit Ctrl+F and hit ok.
8. Value 6 (00 B6 FF 80). Back to the chart. I go down 8 colors from CC00B0 to AA0092. This is going to be value 6. In HxD put in 92 00 AA 80. Hit Ctrl+f to go to value 7.
9. Value 7 is going to be the same as 4 but with alpha of FF. (DC 00 FF FF). Ctrl+F to go to value 8.
10. Value 8 is going to be the same as 5 but with alpha of FF. (B0 00 CC FF). Ctrl+F to go to value 9.
11. Value 9 is going to be the same as 6 but with alpha of FF. (92 00 AA FF). This is the last value. Go to file and save. Now you will have a progress_horizontal.xml and a progress_horizontal.bak (the .bak file is the orginal.
Pushing the new file to the system
1. Open the framework-res.apk as an archive with 7-zip. Go to /res/drawable. Take the progress_horizontal.xml we just did and put it in here. Hit the folder up until all the way out of framework-res.apk.
2. Either take the framework-res.apk and put in the tools folder of ADB and push to phone or use Root explorer to do this. I would stay away from doing this with terminal as it usually causes problems. Also with using ADB, you may want to do this while in recovery.
3. Reboot you phone for the changes to take affect. All progress bars should now be the gradient color you just made, enjoy.
Click to expand...
Click to collapse
Man that is thorough great info, but you know you can decompile the framework apk and you can just use the readable for of xml. The recompile is sometimes hooky but you can recompile and then just use the xml you edited and put that in the new framework res.
ASimmons said:
Man that is thorough great info, but you know you can decompile the framework apk and you can just use the readable for of xml. The recompile is sometimes hooky but you can recompile and then just use the xml you edited and put that in the new framework res.
Click to expand...
Click to collapse
I always have issues decompiling because you can't recompile an already themed framework (at least I seem to never be able to). I don't know why, but when I decompile an original and try to add my theme work into the recompiled framework, I always miss something. Anyways, I'm still learning and read a lot of your posts, you know your stuff.
YoungSinema said:
I always have issues decompiling because you can't recompile an already themed framework (at least I seem to never be able to). I don't know why, but when I decompile an original and try to add my theme work into the recompiled framework, I always miss something. Anyways, I'm still learning and read a lot of your posts, you know your stuff.
Click to expand...
Click to collapse
Yep I have the same issues so I remcompile and then take the compiled files back out of that and take and put it in an untouched apk replacing the files I wanted to change but not decompiling that one.
Its something with apk tool, worse comes to worse I'll do the hexedit.
YoungSinema said:
Apps and resources needed
HxD hex editor can be found here Downloads | mh-nexus .
Color guides to go off of. I use this site for color gradients. #9d9e9d Gradient Color Chart
7-zip for opening .apk files with out changing .zip to extract. 7-Zip
framework-res.apk (after all this file is located in here).
Starting the process
1. Take 7-zip and extract framework-res.apk somewhere on your computer.
2. Navigate with in the new folder called framework-res to /res/drawable.
3. In here you will find the file progress_horizontal.xml
4. Open this file with HxD.
Understanding Hex values
The hex color values are backwards of what they would be in normal xml. The first default value in this xml is 9D 9E 9D FF. People get confused here so we are going to break it down.
The first 9D is for blue (B)
The 9E is for green (G)
The second 9D is for red (R)
Last is FF for alpha (A) - I always leave this value alone.
In normal hex it would be this way FF 9D 9E 9D.
First is FF for alpha (A)
The first 9D is for red (R)
The 9E is for green (G)
Last is the 9D for blue (B)
Do you see the difference? Lets do another example with different hex value. 9D128D is a purple color (just using it as different values).
9D = R
12 = G
8D = B
So in binary, here in Hxd it would be this way 8D 12 9D FF
8D = B
12 = G
9D = R
Now to edit the file
1. Now the file is open in HxD. Hit Ctrl+F to bring up the find box.
2. In this box put 08 00 00 1c in the Search for box. For data-type switch to Hex-values. Search direction should be for forward. Go ahead and click ok.
3. Now 08 00 00 1C will be highlighted. The eight numbers next to it are the color value in hex format. There will be nine of these values in this xml.
Default values in the xml > normal hex format
1. 9D 9E 9D FF --- FF 9D 9E 9D
2. 74 76 74 FF --- FF 74 76 74
3. 5A 5D 5A FF --- FF 5A 5D 5A
4. 00 D3 FF 80 --- 80 FF D3 00
5. 00 CB FF A0 --- A0 FF CB 00
6. 00 B6 FF 80 --- 80 FF B6 00
7. 00 D3 FF FF --- FF FF D3 00
8. 00 CB FF FF --- FF FF CB 00
9. 00 B6 FF FF --- FF FF B6 00
The first three are for the background and the last six are for the foreground (fill progress).
4. Click next to the highlight hex string of 08 00 00 1C. You can edit the 9D 9E 9D FF or leave it alone. I skip the first three since they are the background. These values represent the start, end and middle of the gradient
value 1 = start
value 2 = end
value 3 = middle
Middle is going to be the darkest one.
5. To get from one value to the next hit Ctrl+F again and hit ok. Make sure that you don't have 08 00 00 1C highlighted or it won't go to the next one.
6. Go to value 4 (00 D3 FF 80). In this example I am going to change it to FF00DC (pink). I put that hex color in the website from above. Get color info. Then click the link for color gradient colors. We will look at that in a bit. Back to HxD. I would put it in as DC 00 FF 80. Then hit Ctrl+F and hit ok.
7. We should be on value 5 (00 CB FF A0). When doing this color I go to the gradient chart for the start color to black. I go down 12 colors from FF00DC to CC00B0. That is what I am going to put in for value 5. So in HxD I put in B0 00 CC A0. Then hit Ctrl+F and hit ok.
8. Value 6 (00 B6 FF 80). Back to the chart. I go down 8 colors from CC00B0 to AA0092. This is going to be value 6. In HxD put in 92 00 AA 80. Hit Ctrl+f to go to value 7.
9. Value 7 is going to be the same as 4 but with alpha of FF. (DC 00 FF FF). Ctrl+F to go to value 8.
10. Value 8 is going to be the same as 5 but with alpha of FF. (B0 00 CC FF). Ctrl+F to go to value 9.
11. Value 9 is going to be the same as 6 but with alpha of FF. (92 00 AA FF). This is the last value. Go to file and save. Now you will have a progress_horizontal.xml and a progress_horizontal.bak (the .bak file is the orginal.
Pushing the new file to the system
1. Open the framework-res.apk as an archive with 7-zip. Go to /res/drawable. Take the progress_horizontal.xml we just did and put it in here. Hit the folder up until all the way out of framework-res.apk.
2. Either take the framework-res.apk and put in the tools folder of ADB and push to phone or use Root explorer to do this. I would stay away from doing this with terminal as it usually causes problems. Also with using ADB, you may want to do this while in recovery.
3. Reboot you phone for the changes to take affect. All progress bars should now be the gradient color you just made, enjoy.
Click to expand...
Click to collapse
Im running into this issue after I push the framework-res.apk back and reboot nearly everything on my device is force closing upon booting. Any advice??
p.s EXCELLENT work on the walk through
don_p20906 said:
Im running into this issue after I push the framework-res.apk back and reboot nearly everything on my device is force closing upon booting. Any advice??
p.s EXCELLENT work on the walk through
Click to expand...
Click to collapse
I had the same problem with pushing the phone.apk and ending up with no service. What I did was make a flashable zip instead. Works alot better to me since you get to keep your data that way.
dean.d said:
I had the same problem with pushing the phone.apk and ending up with no service. What I did was make a flashable zip instead. Works alot better to me since you get to keep your data that way.
Click to expand...
Click to collapse
Any time you change an apk, it needs to be signed.... stericson had an autosign batch posted somewhere in the forums. Do a search for autosigner. I've got it on my PC, so if you can't find it, let me know and ill post a link...
Sent from my Floyo Tazz using XDA App
don_p20906 said:
Im running into this issue after I push the framework-res.apk back and reboot nearly everything on my device is force closing upon booting. Any advice??
p.s EXCELLENT work on the walk through
Click to expand...
Click to collapse
Is it signed? If so, try flashing it.

Edit Focused Tab Text Color

I haven't seen this mentioned in other theming guides, so I thought I'd share a little discovery. Also, I'm not sure if this is only for the Droid X, so I'm posting it here instead of the general Android theming thread.
I've seen this issue on a few DX roms. The text blends in with the tab image when selected, making it unreadable and generally ugly. (See attached pic)
This is my method for changing the text color on tabs when they are selected (focused).
In framework-res.apk/res/color open tab_indicator_text_v4.xml in a hex editor and edit this value
Change it to 00 00 00 FF for Black or FF FF FF FF for White (or any inverted hex color). The current value of 80 80 80 FF is the stock gray color.
I'll attach two metamorphs for anyone who wants them (a white & a black), but be warned! Editing the framework-res.apk can cause the device to revert back to the stock wallpaper. Make sure you have a backup. Also, after editing the framework-res.apk, you may need to sign in to your facebook/gmail/twitter/etc again. As always, make a full backup before attempting this.
For this being up for an entire day now, you aren't getting enough praise for this. Thanks a lot man, this was one of my biggest gripes with the Vanilla themed roms.
Very nice, this bugged me as well. Thanks for the fix

[TUTORIAL] Bootanimation creation & tools!

DISCLAIMER:
I am not responsible if you break your phone. You should always do a nandroid backup befor flashing any files. Remember to wipe your dalvik before making a nandroid to save a lot of time and space
Intro
So. Boot animations. Hard to make? At first yes. But I will explain in great detail each step in making a boot animation.
Requirements
-A photo Editing program (GIMP and Photoshop are the best.)
-A text editor besides notepad or wordpad. (Notepad++)
-An archive manager (7-Zip or WinRAR)
My setup:
Photoshop CS5
WinRAR
Notpad++
The Tutorial
Step 1: Folders
So in this step, we need to make folders. The number of folders depends on what type of animation you want. You can name the folders anything you want as long as they are reflected in your desc.txt (we will get more into that later).
If you have a video that you want to repeat, you will need only 1 folder. (Name it anything you want)
If you want an intro (only shown once) and then a repeated set, You will need 2 folders. Most common names: (part0, part1) (intro, repeat)
If you have more then 2 sections of images, then I have no clue what you are doing but good for you for being awesome!
Step 2: Images
So this section will be a generilization of the images. I say this because every video is going to be different.
Each image in the video is called a frame. They usually vary slightly from image to image which sped through makes the illusion of a video.
-Each frame must be 480*800 px (thats 480 pixels wide by 800 pixels tall).
-Each frame must be saved in a .png format. (If you are using Photoshop, File > Save for Web & Devices to reduce the file size drastically.)
-Each frame needs to have some numarical value.
+Recommended would be something like frame0001.png, frame0002.png, frame0003.png, etc.
+Try to keep it under 300 images total
After all of the images are created, we now need to place them in folders.
Step 3: Placing images in folders
This step will vary from user to user. based on what type of animation you are making.
Intro to loop (2 folders):
With this one, you are going to place all of the images that is to be the intro to folder 1.
All looping images will go into folder 2.
Looping video:
All images will go into a single folder.
Step 4: desc.txt
This is the 'script' that tells android what to do.
Open up your text editing program. You have to use something other then notepad/wordpad included with Windows. They add some funky stuff for every new line you make which will ultimately break the script. It is best to use Notepad++.
This is an example of a desc.txt that has 2 folders in it:
480 800 20
p 1 0 intro
p 0 0 repeat
Click to expand...
Click to collapse
Here is what it is telling android to do line by line:
480 800 20 <-- Width of the animation in pixels. This will stay 480 for Evo users Height of the animation. Keep this 800 for Evo Users Frames per second. This is basically your 'speed' of the animation. This will stay in between 10-30 (10 being slower, longer, and choppy; 30 being fast, short, and smooth.)
p 1 0 intro <-- p is telling it to play this folder. It will always be there. Folder is to be played 1 time before moving on to the next folder. Pause the movie for 0 frames after the animation is completed before moving on to the next folder. (This will normally stay 0). Name of the folder to be played. In this case, the folder named "intro" gets played once and then it moves on to the next line.
p 0 0 repeat <-- Play the animation... Folder is to be indefinately played. The 0 is telling it to play this folderover and over. Just keep it 0. Folder "repeat" gets played
And now for an example of a single folder (same thing looping over and over):
480 800 20
p 0 0 part0
Click to expand...
Click to collapse
So same as before... 480px wide by 800px tall at 20 FPS
Play the folder "part0" an indefinate amount with no pause in between.
Why not go funky!:
480 800 20
p 1 0 intro
p 5 0 cookies
p 2 0 cake
p 0 0 mynion
Click to expand...
Click to collapse
Same... 480px wide by 800px tall at 20 FPS
Play "intro" 1 time with no pause
Play "cookies" 5 times with no pause
Play "cake" 2 times with no pause
Play "mynion" indefinately
Ok. So now we save this file with the file name "desc.txt". It must be named that. Case sensitive.
Get it? Good. Let's move on.
Step 5: Packaging
Now we are going to package this sweetness of a custom boot animation!
(this is assuming you are using Windows with WinRAR. Steps may vary from OS and program)
1. Highlight all of your folders and desc.txt and right click > "Add to archive..."
2. On the left side, change the radio buttons from rar to zip
3. Change compression method to "store"
4. Name the file. For now, you can name it anything. Eventually, it will need to be named "bootanimation.zip"
And we are done! Now we just need to set it up on your phone!
Here are 2 methods of doing this:
Root Explorer method:
1. Rename your boot animation to bootanimation
2. Put it on your SD card
3. Open Root Explorer and copy bootanimation.zip to /system/customize/resource. The destination folder may vary from ROM to ROM. I am using Synergy.
4. Reboot your phone
ADB method:
1. Make sure you have downloaded android sdk
2. Put android sdk in C:\
3. Set the directory of command prompt to C:\android-sdk-windows\platform-tools. Click here for a video tutorial.
4. Rename your boot animation to bootanimation and put it in C:\android-sdk-windows\platform-tools
5. Open cmd
6. Type in order:
-adb remount
-adb push bootanimation.zip /system/customize/resource/bootanimation.zip The destination folder may vary from ROM to ROM. I am using Synergy.
-adb reboot
Click to expand...
Click to collapse
This post will be updated with various tools and programs which will aid your awesomeness.
Image Editors
GIMP - Free
Photoshop - $700. Students and teachers can get up to 80% off.
Batch Image Editors
FotoSizer - Free - Batch resize, file name mask, convert image format.
Other Image Tools
GIF Frame Extractor - Free - Extracts frames from an animated GIF and save them as PNG
Video Downloader and Converters
Video to JPG Comverter - Free
Bootanimations from the community:
Skullmonkey|OP|
Andy peeing on Apple
Super Mario Bros
SackBoy
Thank you Bro. Always showing your awesomeness.
Good Info, but these tutorials can be found everywhere on xda
Hmm, I seem to have wandered into the Themes & Apps forum.
github always brings the lulz
Could you use a hex editor??
Sent from my EVO: xda premium
Thanks for the info skull.
"Hell I don't know"
github said:
Hmm, I seem to have wandered into the Themes & Apps forum.
Click to expand...
Click to collapse
I consider this in development because there is a little coding involved. It's not like its my collection of bootanimations in which case I would put in themes and apps.
Amer532 said:
Could you use a hex editor??
Sent from my EVO: xda premium
Click to expand...
Click to collapse
You don't need a hex editor...
EVOlvedAndroid said:
Good Info, but these tutorials can be found everywhere on xda
Click to expand...
Click to collapse
Well.... ?
I found it here . So, Thanks a lot
Yes this info can be found everywhere on XDA... much like most info on XDA, buried in page 2452 of a 5000 page thread about cyanogenmod that everyone insists you read every page of because they have no lives and they read the entire thread.
Nice to see a well organized and consolidated thread, and this info should apply to most Android boot animations on most devices (save for the screen resolutions). Thanks, OP!
Android guy peeing on apple:
{
"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"
}
Download:
http://sm.jcink.com/phone/BAs/bootanimation-android_peeing.zip
Super Mario Bros
http://sm.jcink.com/phone/BAs/bootanimation-SMB.zip
SACKBOY!
http://sm.jcink.com/phone/BAs/bootanimation-sackboy.zip
Love a Post" has a little humor in it, helps me...wake up! Just couple questions if I may,
Step 1. Video to repeat? One folder, would this include sound?
I'm making a video which would be in .wmv ext but would like to hear sound as well in the start-up.
Step 2. Images, said "File > Save for Web & Devices to reduce the file size drastically" and every video is different. Understood the 400x800tall would be the size on the screen, but the pixel's?
Can this be more or higher to give it a clean crystal clear look on start-up screen? what "save" should be best to keep and not loose any clarity on the Origin Image(s)?
Step 4 takes me back to 1 "reflected in your desc.txt"
I am renaming it right, as I save it?
Getting funky and so for, I am going to wait til I get there, and thank you for the knowledge...
is there a way to test the animation before flashing to phone?
EDIT: i have an audio folder and a bootanimation.zip under /system/media and a single bootanimation file under /system/bin. is either of these correct?
I need help I have been trying to get this thing to work for about four hours everything is set up correctly as far as i can see. I used notepad++. compression set to store. it worked with the desc.txt from your mario one but after the first loop it like tripped the speed of the thing. PLEASE HELP!!! http://www.mediafire.com/?df742t4x1kkvl2c
I did all but when I boot phone I get the splash screen and then black screen, no animation... But it boots up.
I saved the desc.txt using notepad++ this is what my desc.txt looks like
480 800 20
P 0 0 funny
When i save it I saved it as "all text files" cause it was not specified in op. Should I have saved it as a script of some kind?
Sent from my ADR6300 using XDA App
eraste said:
I did all but when I boot phone I get the splash screen and then black screen, no animation... But it boots up.
I saved the desc.txt using notepad++ this is what my desc.txt looks like
480 800 20
P 0 0 funny
When i save it I saved it as "all text files" cause it was not specified in op. Should I have saved it as a script of some kind?
Sent from my ADR6300 using XDA App
Click to expand...
Click to collapse
When using Notepad++, you have to go "Edit", "EOL Conversion", and then make sure "UNIX Format" is selected. You must also make sure that under "Encoding", "Encode in ANSI" is also selected. Then just save it as a normal txt file.

[Q] framework-res image counts

just playing around with my notification bar and wondering if i have to replace all 34 images for the charging icons or if i could just remove the ones i dont need. for example i have 34 and want to use 6 do i need to just keep cycling the 6 to make a total of 34 or can i simply remove the 28 i dont need

Categories

Resources