trying (and failing) to change signal pngs - Hero, G2 Touch Q&A, Help & Troubleshooting

i've read quite a bit & was really confident - these are the steps i took:
1. extracted the 5 png files from framework-res.apk (in res/drawable)
2. converted to 16m colours, and edited them.
3. extracted the framework-res.apk from the ROM update.zip
4. opened framework-res.apk in winrar & browsed to the res/drawable folder
5. added the amended pngs (overwrite option in winrar)
6. closed the framework-res.apk in winrar
7. signed framework-res.apk with SignApk_xda_v20100411
8. used adb push to get ramework-res.apk back on the phone.
phone just froze, and wouldn't reboot (even nandroid restore failed ).
suspects are steps 2 (16m colours, maybe shoudl be 256), and/or 7 & 8 - maybe not the right way to get it back on the phone.
any help would be appreciated; i'm using MrBang's 1.5, and just want to make minor customisations to icons & stuff.
cheers
apes

do not resign the apk. just put the files in as you did (not sure about winrar, afaik 7zip is suggested for windows, i use zip -u on linux command line for that job), and put the apk back on the phone. if nandroid restore fails do a complete wipe before the restore and try again.
edit: not sure about the colors, but i would bet my money on "don't change color depth"...

cheers, kept colour depth & got them back on the phone. oddly the icons seem to be positioned slightly lower than before
time to keep messing i guess.

Related

[Q] Need Help. After editing Framework-res, Rom wont boot

I've looked through many posts. I am very new to creating my own Rom's, and I am having a problem after editing framework-res.apk. I started by downloading a popular rom for the Evo 3D, and decompiled it, edited framework-res, and after flashing the rom it wouldn't boot past the startup animation. The screen just remained black, but the capacitive buttons remained lit. Heres my process:
1.) Download the rom I desired.
2.) Extract zip
3.) Locate Framework-res.apk, copy, paste on desktop.
4.)Extract framework-res.apk, edited icons to my liking.
5.) Delete Meta-inf.
6.) Compress framework-res back to .zip, then to .apk.
7.)Sign Framework-res.apk.
8.) Replace framework-res.apk in my desired rom.
9.) Go into Meta-inf, delete Cert.RSA, Cert.SF, Manifest.MF (everything but the com folder)
10.) Re-sign .zip
11.) Flash via CWM, reboot, see Android startup animation, black screen?!!?!?
I am 99% I didn't change any dimensions of any of the images, and I re-signed everything perfectly. I know my mistake(s) are probably very noob, but as of now, I can't figure out what I am doing wrong. Any help would be greatly appreciated!
(Before you say anything, I have searched the forums several times, with no luck. I also tried this process several times, only editing one.png in framework-res, and I still get the same result.)
ellisperkins said:
I've looked through many posts. I am very new to creating my own Rom's, and I am having a problem after editing framework-res.apk. I started by downloading a popular rom for the Evo 3D, and decompiled it, edited framework-res, and after flashing the rom it wouldn't boot past the startup animation. The screen just remained black, but the capacitive buttons remained lit. Heres my process:
1.) Download the rom I desired.
2.) Extract zip
3.) Locate Framework-res.apk, copy, paste on desktop.
4.)Extract framework-res.apk, edited icons to my liking.
5.) Delete Meta-inf.
6.) Compress framework-res back to .zip, then to .apk.
7.)Sign Framework-res.apk.
8.) Replace framework-res.apk in my desired rom.
9.) Go into Meta-inf, delete Cert.RSA, Cert.SF, Manifest.MF (everything but the com folder)
10.) Re-sign .zip
11.) Flash via CWM, reboot, see Android startup animation, black screen?!!?!?
I am 99% I didn't change any dimensions of any of the images, and I re-signed everything perfectly. I know my mistake(s) are probably very noob, but as of now, I can't figure out what I am doing wrong. Any help would be greatly appreciated!
(Before you say anything, I have searched the forums several times, with no luck. I also tried this process several times, only editing one.png in framework-res, and I still get the same result.)
Click to expand...
Click to collapse
Are you editing .9.pngs? If you are then you can't edit them the normal way. Also you don't sign anything that goes into the system folder.
Hey you can't do apk editing that way it wont work. You have to decompile the apk use apktool. Then make changes and recompile back.
Sent from my LG-P500 using XDA Premium App
I tryed with the apk tool and gave all green icons a blue color with gimp but after recompiling the framework-res.apk and uploading it to the phone it won't boot anymore. (bootloop)
Does anybody know if I have to sign the apk or do I have to do something different to make this work? (I did'n't change the size of the pictures, only recolored it.)
It's about the png files in the "drawable-hdpi" folder.
I followed the instructions from this site: http://www.miui-au.com/add-ons/apktool/)
Nemesco said:
I tryed with the apk tool and gave all green icons a blue color with gimp but after recompiling the framework-res.apk and uploading it to the phone it won't boot anymore. (bootloop)
Does anybody know if I have to sign the apk or do I have to do something different to make this work? (I did'n't change the size of the pictures, only recolored it.)
It's about the png files in the "drawable-hdpi" folder.
I followed the instructions from this site: http://www.miui-au.com/add-ons/apktool/)
Click to expand...
Click to collapse
You never sign a system apk. You main issue may be your trying to edit a .9.png if that is the case then you can't just recolor them in Gimp. They have to be decompiled and edited a certan way, then ran threw the draw9patch tool from the android sdk.
I believe the framework.apk and rom have to be deoxed to make these modifications
Sent from my HTC HD2 using XDA Premium App
Problemen is half solved. I re-colored all green icons to blue, exept the .9.png
Tryed the .9 patch tool but didn'd manage to change the .9.png without problems.
My ROM is deodexed, so this couldn'd be the problem.
When uploading the framework without recolored .9.png files the ROM works well.
Sent from my HTC Desire using Tapatalk
Nemesco said:
Problemen is half solved. I re-colored all green icons to blue, exept the .9.png
Tryed the .9 patch tool but didn'd manage to change the .9.png without problems.
My ROM is deodexed, so this couldn'd be the problem.
When uploading the framework without recolored .9.png files the ROM works well.
Sent from my HTC Desire using Tapatalk
Click to expand...
Click to collapse
If you're only changing colors you can modify a .9 with PhotoShop or Gimp just do not touch the black patch lines around the edges and they have to be decompiled then recompiled in order for it to work properly. The way I personally do theming of system apks is as follows:
Decompile apk with apktool.
Modify the images I want to change. Compile with apktool.
Copy the new images from newly compiled apk to original apk.
Push apk to proper location to test.
If you make xml changes you will need to copy those as well as the newly compiled resources.arsc file. You only need the resources file if you change xml files though.
Sent from my ADR6300 using XDA App
ellisperkins said:
I've looked through many posts. I am very new to creating my own Rom's, and I am having a problem after editing framework-res.apk. I started by downloading a popular rom for the Evo 3D, and decompiled it, edited framework-res, and after flashing the rom it wouldn't boot past the startup animation. The screen just remained black, but the capacitive buttons remained lit. Heres my process:
1.) Download the rom I desired.
2.) Extract zip
3.) Locate Framework-res.apk, copy, paste on desktop.
4.)Extract framework-res.apk, edited icons to my liking.
5.) Delete Meta-inf.
6.) Compress framework-res back to .zip, then to .apk.
7.)Sign Framework-res.apk.
8.) Replace framework-res.apk in my desired rom.
9.) Go into Meta-inf, delete Cert.RSA, Cert.SF, Manifest.MF (everything but the com folder)
10.) Re-sign .zip
11.) Flash via CWM, reboot, see Android startup animation, black screen?!!?!?
I am 99% I didn't change any dimensions of any of the images, and I re-signed everything perfectly. I know my mistake(s) are probably very noob, but as of now, I can't figure out what I am doing wrong. Any help would be greatly appreciated!
(Before you say anything, I have searched the forums several times, with no luck. I also tried this process several times, only editing one.png in framework-res, and I still get the same result.)
Click to expand...
Click to collapse
Without signing and deleting meta-inf. Just extract it with winzip, past ur png s then rezip it. It should work.
Sent from my GT-I9100 using xda premium
Open rom with 7-zip, open framework inside 7-zip, pull the folder to your desktop and keep 7-zip open, edit your pngs, drag folder back into 7-zip, accept changes, press back til it asks you if you wanna update framework inside the zip, select yes. Flash rom. Profit.
.9 editing (assuming you have eclipse set up, google how to)
Same steps as above until where you edit the pngs, copy the .9 files to a new folder on the desktop, name it 9pngs (or whatever), remove the .9 just make it a png (background.9.png to background.png), edit the colors, open draw9patch, color in the whole right side and bottom all black, then place one black dot in the middle of the top and one black dot in the middle on the left side (this might not work on every one, but it has worked fine on every one ive edited, theres more info on how to use draw9, google is your friend), save the image, this will make it a .9 but it wont be recognized by android til putting it thru eclipse, do the same with all of the images, open Eclipse, start new android project, name it whatever you want, open the project folder, go to res, drag all images to appropriate folder, right click on the project folder, choose android tools, extract unsigned application, open the application you made with 7-zip, drag out the images into your drawable folder, insert folder into framework inside of 7-zip, back out of 7-zip until it asks if you want to update framework inside of zip, select yes, flash rom, profit.

[GUIDE]How to Theme Stock Dialer

This guide will explain how to theme your Dialer for firmwares 2.2 and higher. This will very likely only work on De-Odexedroms. If you're not sure what deodexed is, it is not Dell Stock, if you have a custom ROM check with the Chef.
I will make this as easy as possible. This is for windows. The only tools you should need is 7zip and a good image editor, like Photoshop, Paint.net or GIMP.
I will attach an DialerTheme.zip with custom Contacts.apk and a stock Phone.apk to use.
Theming Contacts.apk, will customize the things you see before placing a call.
Theming Phone.apk, will customize images during or in-call.
For Dialer background in Contacts before calling, I recommend using an 800x800 .png, make sure its not just renamed .png but actually saved as a .png
This can be a photo, picture or solid color, whatever you desire. Name this "custom_dialer_background.png" without quotes and with the underscores.
I will explain how to copy this to the .apk, most will know how to do this, but I will explain. With 7zip installed, right click on my DialerTheme.zip, choose 7zip, then mouseover to ..open archive. then double click on \system folder, then double click \app folder, then double click contacts.apk, double click \res folder, then double click \drawable-long-finger folder. Now simply drag and drop your custom_dialer_background.png into this folder. It will ask you if you want to replace. Say Ok or yes. Don't worry it doesn't move, just copies and keeps your original. Next do the same and copy to \drawable-long-land-finger and also \drawable-mdpi-finger. Now close the window and it should ask yo to update the archive, say Ok or yes. Done. That's it for contacts and the 1st dialer.
The next one is a bit trickier and may take a bit more time. It involves .9.pngs, which are stretchable images and can be difficult to work with. Lets make it easy for our selves. Again open DialerTheme.zip as an archive with 7zip and navigate to Phone.apk\res\drawable-hdpi. we need to copy the first 5 files from here to your desktop, or a folder to make things neater.
These are:
bg_in_call_gradient_bluetooth.9.png,
bg_in_call_gradient_connected.9.png,
bg_in_call_gradient_ended.9.png,
bg_in_call_gradient_on_hold.9.png, and
bg_in_call_gradient_unidentified.9.png
A quick way to do this is to open any one with your photo editor and make your changes, (eg.paste your picture or image). The ones I am using are 480x754, but I think it should be fine using the same 800x800 from before. If you start adding layers to it though it may not save correctly, I find copy/paste works just fine. Now save and it should retain the .9.png extension. You can either do the remaining 4 or just open the 1st one and choose save as: bg_in_call_gradient_connected.9.png,(or even a copy and rename should work) just make sure it naturally retains the .9.png extension which already contains the boundaries and data we need. When you have all 5 looking as you wish with .9.png extension still intact, we can then move these to our zip in the same location( mulit-move by holding CTRL while selecting all 5). It will ask if you want to overwrite say yes. Also copy these 5 files to phone\res\drawable-long-finger, and say ok to overwrite.
Now we need these same 5 for a landscape view in-call. So you either rotate them, if it doesn't compromise your image. These images are also normal .png's, so they will not stretch. You may need to crop them, or expand your canvas. The ones I am using are 802x477 and look just fine. When you have all 5 name them as before except without .9. (I wouldnt recommend just renaming a .9.png to .png, although it would probably work, I suggest opening a.9 and saving it as .png first then copying and renaming should be fine. Same 5 filenames as before without .9
bg_in_call_gradient_bluetooth.png,
bg_in_call_gradient_connected.png,
bg_in_call_gradient_ended.png,
bg_in_call_gradient_on_hold.png, and
bg_in_call_gradient_unidentified.png
copy these like we did before to phone\res\drawable-long-land-finger.
Close the archive when finished and it should ask you to update, say OK. Thats it. Now place on SD Card and flash in recovery.
This doesn't theme anything else, but you can change all the other images yourself in the same manner. Try making the buttons transparent,etc! Just remember to retain the .9.png or it will not display correctly.
Because we have done it this way, if you try to decompile and rebuild it is likely you will get "missing .9.chunk data, etc." But we shouldnt need to decompile again, all images can be drag and dropped.
This method should not have any problems, bootloops, stuck at logos, because were only swapping out .png's, If anything you may get an immediate force close when trying to open phone or contacts, likely becuase an image is missing/named incorrectly or the size is too far from the original.(which I think android will still try to display...up to a point)
There is also a .zip in next post to return to stock phone and contacts.apk
If you need further assistance, search, then post here and we will try to help.
reserved
Update: custom background will now be on all screens!
If no one else makes a transparent buttons-so you can see your whole wallpaper-theme, I may do it when I have time. This theme also doesn't change any background in your contact list, etc. Those will still be black. I can change those as well and may do so in an update. If so, it will use the same image as custom_dialer_background.
::bump::
The secret sauce...
great post
Howdy
I'm glad you posted this, I have been PM'ing peolpe to try and found out how to do this, not to look a gift horse in the mouth, but might you have something similiar for the keyboard??
THanks again for the post.

GUIDE Modify apks

Hi. I just wanted to write a guide on modifying apks. You probably have seen my rom in the ported section.
(I'll make the guide look better when I get home)
Well lets get started.
1.
First. An introduction to what an apk is. An apk is (believe it or not) a zip of files.
2.
So how do you go about editing a zip? I suggest using 7z on your computer or root explorer on your phone.
Second: there are a lot of apks you can edit but for this guide I'll be using the systemui.apk that you find in any rom in the system/app folder.
3.
Ok. So assuming you start with the system ui apk your going to need to extract the apk with 7z on your computer. (or root explorer on your phone. Es file should work also)
4.
Now you should have a new folder where you chose to extract your apk. Open that folder. Your going to see a bunch of files. What your probably going to be interested in is the res folder. Go into that folder and find the drawable hdpi folder. Open it.
Your going to see a lot of icons. Here is where you can change things like wifi icons. You can add 4g icons and so much more. Even edit what your contacts look like.
5.
This is an important step. Make sure your using the system ui apk from the rom your currently on or make sure its compatible with yoir rom.
Ok so now we get to the things like icon changes. Download a theme you've been dying for but couldn't get because it was either for another rom or phone. And the only thing you wanted was a few things from the theme.
Now extract that zip. Then extract the systemui.apk again from the zip you want your icons to look like. MAKE SURE YOU RENAME THE THE SYSTEM UI TO SOMETHING DIFFERENT SO YOU DON'T MIX THEM UP.
6.
So now that you got the system ui apk with whatever you want to use all you need to do is go into the drawable hdpi of the one with the icons you want in it. Copy them and bring them to your roms stock system ui and replace them.
7.
Thats about it. Now zip your roms stock system ui back up and change the ending to .apk. Then put it in system/apps and replace it. Reboot. And boom. Your modded apk is ready.
Hit thanks if I helped.
for step three rename the. apk to .zip its easier
This can only be used for replacing regular images in the APK. There are many images that are .9 images which require decompiling.
There are MANY guides across xda that go into detail and show you the proper way to modify APK's..... There is much more then images.
This one is even in this forum: http://forum.xda-developers.com/showthread.php?t=1388459

[Q] Changing order of widgets

Hi I after a way, mod/app/setting if I've missed it to change the order of the widgets on the notification pull down. For example I'd like wifi/mobile data/sync/power saving to be on the first screen as they are the ones I used the most.
Thanks in advanced,
Steve
Bump!
There is a how to. I think it should work for even the international version:
http://forum.xda-developers.com/showthread.php?t=1770698
Here is some examples that someone else did:
http://forum.xda-developers.com/showthread.php?t=1775235
You will probably just want to change. \YourDirectory\SystemUI\res\values\arrays.xml
Within that file should be a list like <item>GPS<\item> <item>Sound<\item>
Rearrange to your liking.
I think that should do it. You will need to read up quite a bit to get it all. I had no idea how to do this yesterday though. So the information is available.
Here is my own simplified explanation of the first link's how to:
I used only the apktool1.4.4 and it worked for me. I used these steps on both Bean's and NoSympathy's ROMs.
1. apktool if framework-res.apk
2. apktool d SystemUI.apk <-At this point you should get a SystemUI folder with a 'res' subfolder, 'smali' subfolder, and some other stuff.
2_and_a_half). At this point you should be able to edit files to your liking. Once done:
3. apktool b SystemUI <- Make sure it doesn't say SystemUI.apk, leave off the apk, you are telling it the folder at this instance.
4. Copy the "META-INF" and "AndroidManifest.xml" to the SystemUI/build/apk folder. Then run the command a second time:
5. apktool b SystemUI
You should now have the newly build apk in SystemUI/dist/

Flashable zip..

I don't know how to decompile and compile..
If anybody could make this one a flashable zip??.
Thanks a ton..
This is for those of us who preferred the stronger haptic feedback strength of the capacitive buttons that we had from 2.3.5 (and also for those who haven't taken the ICS plunge). The basic steps of this could probably also be used for other changes to the framework-res.apk. These are the steps I used and are by no means the best way to do this (in fact, this probably guarantees it's not the best way  ).
As always, you should be careful when performing any modifications to things like this. I STRONGLY suggest making a nandroid backup and an extra copy of your framework-res.apk in case you want to switch back. Also, you should have cwm on boot enabled so you can always get back to a working condition if you end up in a boot loop. This worked perfectly for me on my first try, but that doesn't mean much . You do all things at your own risk!
You will need:
APK Manager
7zip
Notepad++
Not on ICS!
1. Extract (copy) your framework-res.apk found in \system\framework\
2. Put copy in the "place-apk-here-for-modding" in APK Manager (you may want to re-name the file so you can remember what version/ROM you took it from)
3. Open the APK Manager script and select the apk you want to change
4. I set the compression to 0 and heap size to 512mb (I saw several threads that suggested these settings)
5. De-compile the apk
6. Find the decompiled apk in the "Projects" folder and open it up
7. Navigate to \res\values\arrays.xml and open with Notepad++
8. Find:
And replace with:
9. Save the file
10. Compile the apk. When asked "Is this a system apk?", I said "yes". And then when asked if anything else needs to be copied, I said "no".
11. Using 7zip, open the new apk as an archive found in "place-apk-here-for-modding" folder.
12. Also, open the original apk as an archive with 7zip
13. Drag and drop the "res" folder and "resources.arsc" file from the NEW apk into the ORIGINAL apk
14. Use your favorite method of getting the modified ORIGINAL apk back in your \system\framework\ directory on your phone
-I prefer to hi-jack someone's flashable zip and put my own framework-res.apk--I used AlteredLikeness's "The Stock Monster" http://forum.xda-developers.com/showthread.php?t=1645950 since I'm using stock, odexed 2.3.6. Thanks AlteredLikeness!
I understand there are a dwindling few still using 2.3.6 and the days of GB are numbered for the A2, but I hope this still helps someone! If you have any questions, feel free to post, but try to do some research first (that's how we all learn this stuff  ).
Peace Out!
Sent from my GT-I9100 using Tapatalk 2

Categories

Resources