I've just tried some of the themes available here against the apkmanager tool - decompiling and then compiling the framework-res.apk and twframework-res.apk and all of the custom themes give tons of errors (sometimes won;t even compile back) .. the only one that goes without troubles is the stock framework-res.apk and twframework-res.apk
I'm just wondering whether this is correct or not and where is the issue - is it apkmanager or the themes that are wrong ?
w83 said:
I've just tried some of the themes available here against the apkmanager tool - decompiling and then compiling the framework-res.apk and twframework-res.apk and all of the custom themes give tons of errors (sometimes won;t even compile back) .. the only one that goes without troubles is the stock framework-res.apk and twframework-res.apk
I'm just wondering whether this is correct or not and where is the issue - is it apkmanager or the themes that are wrong ?
Click to expand...
Click to collapse
I never had much luck with APKManager, that's why I use APKTool.
Try v1.3.1 if you can find it, 1.3.2 has problems.
Apk Manager uses apktool too.
@w83
Take a look at log.txt.
I guess it's due to corrupted .9.png.
Solution:
Replace all modded .9.png with original files, decompile, make your changes, compile.
Then you can put in your modded .9.pngs again...
scheichuwe said:
Apk Manager uses apktool too.
@w83
Take a look at log.txt.
I guess it's due to corrupted .9.png.
Solution:
Replace all modded .9.png with original files, decompile, make your changes, compile.
Then you can put in your modded .9.pngs again...
Click to expand...
Click to collapse
Is it really a solution ? .. cause it seems like all of the modded .9.pngs are basically broken
You're right, let's say workaround
For fixing your modded .9.png search for xUltimate draw 9 patcher. I don't know what it's called exactly.
But for editing framework-res.apk the workaround should be acceptable.
I can manage to decompile the theme (usually with some patched pngs messed up) but when I try to compile it (even without any changes) I end up with tons of errors in the form:
apktools/vagreen_frame/res/values/public.xml:3760: error: Public symbol drawable/zzzzz_tw_quickcontact_top_frame declared here is not defined.
(lots of these ones)
any idea what's wrong ?
w83 said:
I can manage to decompile the theme (usually with some patched pngs messed up) but when I try to compile it (even without any changes) I end up with tons of errors in the form:
apktools/vagreen_frame/res/values/public.xml:3760: error: Public symbol drawable/zzzzz_tw_quickcontact_top_frame declared here is not defined.
(lots of these ones)
any idea what's wrong ?
Click to expand...
Click to collapse
Once your 9.pngs are poorly done, errors such as the above would appear. There were only 6 9.png errors and the log generated a loh file size of 130+kb. But once solved, all errors were eliminated.
Sent from my GT-I9000 using XDA App
scheichuwe said:
You're right, let's say workaround
For fixing your modded .9.png search for xUltimate draw 9 patcher. I don't know what it's called exactly.
But for editing framework-res.apk the workaround should be acceptable.
Click to expand...
Click to collapse
I'm either using the android sdk draw9patch to generate the pngs or even GIMP to do it. Just make sure the first and last row/column must be either alpha or black. No other colours are allowed there.
Sent from my GT-I9000 using XDA App
g00ndu said:
I'm either using the android sdk draw9patch to generate the pngs or even GIMP to do it. Just make sure the first and last row/column must be either alpha or black. No other colours are allowed there.
Click to expand...
Click to collapse
Ok so ur saying that after I should correct the patch 9 pngs in the framework and it should compile correctly ? .. so two options: [1] decompile, replace the pngs with correct ones, compile ? .. or .. [2] correct pngs, compile in eclipse, replace in framework, decompile, compile ?
I am pretty sure that I've already tried correcting them using [1] and it didn't help at all .. I was still flooded with errors ..
I guess I'll try to modify things from the bottom up .. take the stock theme with extended menu and play around with it .. are there any significant changes in the .jars inside the /system/framework in most of current themes ?
but still it would be way nicer if I could decompile and compile one of current themes without errors .. I'm so curious how the theme gurus are doing it .. I envy their knowledge
w83 said:
...
but still it would be way nicer if I could decompile and compile one of current themes without errors .. I'm so curious how the theme gurus are doing it .. I envy their knowledge
Click to expand...
Click to collapse
Replace all modded .9.png with original files, decompile, make your changes, compile.
The person who made the theme did it lazily and incorrectly. The first couple versions of my ROM had this problem. Did some research into how .9 PNGs work.
If you want to fix them, I can tell you how. It's a bit tedious.
scheichuwe said:
Replace all modded .9.png with original files, decompile, make your changes, compile.
Click to expand...
Click to collapse
Yep that worked perfectly !! Thx mate for that
I'll try to mod something and see how it works
MikeyMike01 said:
The person who made the theme did it lazily and incorrectly. The first couple versions of my ROM had this problem. Did some research into how .9 PNGs work.
Click to expand...
Click to collapse
Most of the available themes can't be compiled and decompiled without errors
w83 said:
Most of the available themes can't be compiled and decompiled without errors
Click to expand...
Click to collapse
But mine can.
Spent a couple days fixing every .9 PNG one at a time. All you have to do is:
Decompile the unthemed .apk
Copy the broken PNG equivalents from the unthemed .apk
Decompile the themed .apk
Delete the broken .9 PNGs
APK Manager will rename the broken xxxxx.9.png to xxxxx.png
Open the non-broken PNGs in your favorite image editor
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Save
Recompile the themed.apk
MikeyMike01 said:
But mine can.
Spent a couple days fixing every .9 PNG one at a time. All you have to do is:
Decompile the unthemed .apk
Copy the broken PNG equivalents from the unthemed .apk
Decompile the themed .apk
Delete the broken .9 PNGs
APK Manager will rename the broken xxxxx.9.png to xxxxx.png
Open the non-broken PNGs in your favorite image editor
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Save
Recompile the themed.apk
Click to expand...
Click to collapse
Thank you so very much for sharing this info!!!
MikeyMike01 said:
But mine can.
Click to expand...
Click to collapse
Perfect
MikeyMike01 said:
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Click to expand...
Click to collapse
You can just edit the broken png in draw9patch (or gimp or whatever) but sticking to the patch 9 png rules
Thanks for sharing !
Could you briefly explain how the editing in draw9patch is done, please.
MikeyMike01 said:
But mine can.
Spent a couple days fixing every .9 PNG one at a time. All you have to do is:
Decompile the unthemed .apk
Copy the broken PNG equivalents from the unthemed .apk
Decompile the themed .apk
Delete the broken .9 PNGs
APK Manager will rename the broken xxxxx.9.png to xxxxx.png
Open the non-broken PNGs in your favorite image editor
Delete everything but the 1 pixel border
Paste the edited PNG over it, without touching the 1 pixel border
Save
Recompile the themed.apk
Click to expand...
Click to collapse
But lets say I want to change the default blue of 'statusbar_background.9.png' to full plain black. If I leave the 1 pixel border and fill the rest to black, wouldn't I have a blue border in the status bar?
brittosa said:
But lets say I want to change the default blue of 'statusbar_background.9.png' to full plain black. If I leave the 1 pixel border and fill the rest to black, wouldn't I have a blue border in the status bar?
Click to expand...
Click to collapse
No, there's a special one pixel border that has black and transparent pixels that tell the system how to stretch the image without making it look stretched.
That's why you'll note that .9 PNG files are buttons and other things that are used to make different sized objects.
Sent from my Captivate.
Related
I cant seem to find a way to get the 4 lock screens on just a standard theme, its kinda bothering me why nobody made one for the stock theme..
I guess this is impossible to have with the stock SGS theme.
Im starting to understand why there is no 4 lock screen for the stock theme, its not that is hard to make or anything infact the theme template for the 4 lock screen starts with a stock template then is modified.
Reason I think why nobody ever made a stock theme with 4 lock screens is that a lot of people what to use 4 lock screens and just stay with the standard theme this will make a lot of users abandon their current theme infavor of a stock theme with 4 lock screens, smart way of having people use a theme though.
Do it yourself
Take
android.policy.jar
framework.jar
framework-res.apk
Settings.apk
twframework-res.apk
from a theme with 4 lockscreens.
You can take the files out of this ROM
http://forum.xda-developers.com/showthread.php?t=844514
it's not that heavily modified and works quite well with stock images.
Open framework-res.apk and replace the files inside res/drawable-hdpi(-v4) with files from the stock theme. Do the same for twframework-res.apk.
Build an update.zip and install.
There might be a few xml changes to do, but it will be very, very stock already...
Thanks but Im afraid I dont have time to mess around and learn with it, you might be able to do for us here at XDA?
It's just copy&paste.
No hard things to do...
You need
7-zip
framework-res.apk (modded and stock)
twframework-res.apk (modded and stock)
1.
Open stock framework-res.apk with 7-zip and go to res/drawable-hdpi.
Open modded framework-res.apk with 7-zip and go to res/drawable-hdpi(-v4).
Mark all files in stock framework-res.apk/res/drawable-hdpi and copy over to modded framework-res.apk/res/drawable-hdpi(-v4). Drag&drop.
2.
Open stock twframework-res.apk with 7-zip and go to res/drawable-hdpi.
Open modded twframework-res.apk with 7-zip and go to res/drawable-hdpi(-v4).
Mark all files in stock twframework-res.apk/res/drawable-hdpi and copy over to modded twframework-res.apk/res/drawable-hdpi(-v4). Drag&drop.
That's all.
The other files (android.policy.jar, framework.jar, Settings.apk) don't have to be modified.
If I copy over the contents of the modded framework HDPI to the original frame work wont it look like the modded frame work instead?
So the andriod.policy / framework.jar / settings.apk are the core files to have the 4 screens working and not really the framework-res.apk ?
Apart from the other changes, we will need to modify the settings APK...
this is because we want to see the option of selecting one of teh four lockscreens in the settings...
apart from this, the drawable-hdpi folder just has the icons, to add the functionality, we need to modify the classes.dex file which is within the jar file...
not such an easy task for someone new to modding...
msri3here said:
Apart from the other changes, we will need to modify the settings APK...
this is because we want to see the option of selecting one of teh four lockscreens in the settings...
apart from this, the drawable-hdpi folder just has the icons, to add the functionality, we need to modify the classes.dex file which is within the jar file...
not such an easy task for someone new to modding...
Click to expand...
Click to collapse
I have zero experience with theme modding, Im only a kernel/rom flasher and Im pretty good at it ( who isnt ? )
Im currently using a theme, the only one I like that gives the Ginger look w/o the extra bells and whistles of changed icons ( http://forum.xda-developers.com/showthread.php?t=873825 )
Maybe someone can be so kind enough to add the 4 lock screen there ?
msri3here said:
Apart from the other changes, we will need to modify the settings APK...
this is because we want to see the option of selecting one of teh four lockscreens in the settings...
apart from this, the drawable-hdpi folder just has the icons, to add the functionality, we need to modify the classes.dex file which is within the jar file...
not such an easy task for someone new to modding...
Click to expand...
Click to collapse
You don't have to.
scheichuwe said:
...
Take
android.policy.jar
framework.jar
framework-res.apk
Settings.apk
twframework-res.apk
from a theme with 4 lockscreens.
...
Click to expand...
Click to collapse
Please read before posting...
Edit:
@EarlZ
You can try this tool
http://forum.xda-developers.com/showthread.php?t=737526
Lets see if I got this
the 4 lock screen is dependent on the following files
android.policy.jar
framework.jar
Settings.apk
and the UI looks depends on these:
twframework-res.apk
framework-res.apk
So basically I can use any 4 lock screen theme and just overwrite it with the stock twframework and framework on it ?
EDIT:
By just replacing the twframework-res and framework-res the phone is not usable, it does boot and when the home screen loads it vibrates and goes into a endless reloading loop if ever you get a chance to go to the settings to choose the lock screen when you lock then unlock the device theres no lock screen visible.
When you want the clean gingerbread look you should take a 4 lockscreen theme that has these black menu background (when you hit menu-softkey) as your base.
Here are some
http://forum.xda-developers.com/showthread.php?t=898892
http://forum.xda-developers.com/showthread.php?t=899471
http://forum.xda-developers.com/showthread.php?t=854191
http://forum.xda-developers.com/showthread.php?t=864112
Just a few examples, there are more...
I mentioned it before:
There might be some xml edits that have to be done (colors for texts etc.), but the icons will be stock...
EarlZ said:
...
EDIT:
By just replacing the twframework-res and framework-res the phone is not usable, it does boot and when the home screen loads it vibrates and goes into a endless reloading loop if ever you get a chance to go to the settings to choose the lock screen when you lock then unlock the device theres no lock screen visible.
Click to expand...
Click to collapse
That's why I wrote this
scheichuwe said:
...
Take
android.policy.jar
framework.jar
framework-res.apk
Settings.apk
twframework-res.apk
from a theme with 4 lockscreens.
...
Click to expand...
Click to collapse
Hi! I noticed this bug in ock's theme originally and then when I was trying to make my own theme banged heads with it myself.
The issue is that in the browser the combobox button seems to spill over into the text and generally is stretched poorly.
Like this:
I tried at first simply creating a .9.png version and removing the originals and replacing with the .9s. This made the bar vanish completely.
Eventually I got it working with a bit of a work-around, by compiling the .apk twice and extracting the images.
Having to explain that process recently lead me to the real answer though.
combobox_disabled.png and combobox_nohighlight.png ARE .9.pngs even though they do not have the .9.png extension.
apkmanager won't decompile (or compile) them as .9's because they don't have the right extension (and the right extension 'breaks' the theme).
Attatched are my .9.png versions of both images. I added the guidelines from scratch, but they seem to be correct. If your theme has this issue and you need to fix it, just drop the 'compiled' versions into your res/drawable-hdpi and apk-manager should happily compile it and the issue should be resolved.
tried both versions to just replace the ones in my framework-res.apk (didn't decompile the file but just replaced the files) and both didn't solve the problem.
XlAfbk said:
tried both versions to just replace the ones in my framework-res.apk (didn't decompile the file but just replaced the files) and both didn't solve the problem.
Click to expand...
Click to collapse
That -may- not work. That was one of the first things I tried to do - replace with .pngs straight from stock without a decompile/recompile of the whole apk.
The format of the zip file might be slightly ambiguous.
9s - are the raw pngs with draw9patch guidelines.
compiled - are the compiled draw9patch pngs. If you use a draw9patch compiler on the files in the 9s directory you get these.
Even though the pngs are compiled you still need to go through the decompile/recompile procedure with apk manager. (using the 'compiled' pngs).
sargorn, I've tried several times to decompile and recompile the framework with no luck. The new framework is ok, except this damn combo box rendering.
I personally gave up trying :|.
Toss me the framework and I'll give it a shot.
here's mine, based on JVB. thx fo giving it a try
XlAfbk said:
here's mine, based on JVB. thx fo giving it a try
Click to expand...
Click to collapse
Hi,
I tried decompiling and then recompiling your framework and it does not recompile.
zzzzz_tw_quickcontact_slider_btn_pressed.9.png and zzzzz_tw_quickcontact_slider_btn_selected.9.png were both 0 bytes.
If you've just been replacing images this probably won't work
Here it is decompiled and recompiled with stock copies of those two files and the combo box 'fix'.
The filesize seems very 'off' so I'm not sure if it'll work or not.
ro_explorer said:
sargorn, I've tried several times to decompile and recompile the framework with no luck. The new framework is ok, except this damn combo box rendering.
I personally gave up trying :|.
Click to expand...
Click to collapse
I've just de/recompiled JVH's framework-res and the combobox fix still seems to work. (Although maybe it's not needed in JVH, didn't test it!).
I tried it again with JVH and failed again. What I did:
1. decompile framework-res.apk with apkmanager
(2. make some of my changes to some xml files)
3. place the 2 files from compiled in drawable-hdpi-v4
4. recompile the apk
Everything but the comboboxes works as expected.
I'm attaching the apk, maybe you could have a look at it. If you can make it work please tell me what I did wrong. Many thx
XlAfbk said:
I tried it again with JVH and failed again. What I did:
1. decompile framework-res.apk with apkmanager
(2. make some of my changes to some xml files)
3. place the 2 files from compiled in drawable-hdpi-v4
4. recompile the apk
Everything but the comboboxes works as expected.
I'm attaching the apk, maybe you could have a look at it. If you can make it work please tell me what I did wrong. Many thx
Click to expand...
Click to collapse
As im here looking for the fix for my dhd I thought I might be able to help
Looking at your framework I can clearly see that those images in there are not fixed.
Try simply dragging and dropping the fixed pngs straight into your framework
liamstears said:
Try simply dragging and dropping the fixed pngs straight into your framework
Click to expand...
Click to collapse
that won't work, was said before, needs to be compiled in
Try out the jvo rom - I think this issue may be resolved in that framework.
Sent from my GT-I9000 using XDA Premium App
I still have that issue with my JVO theme
Hi there.
Is there any chance to replace stock dialerpad icons on gingerbread with others of mine? I mean,is there a specific directory where I can have a go at replacing them with root explorer or am I supposed to mess up it all???
thanks in advance
If you have deodexed rom, just drop attached png to System/app/ DialerTabActivity.apk / drawable-hdpi folder.
nedooo said:
If you have deodexed rom, just drop attached png to System/app/ DialerTabActivity.apk / drawable-hdpi folder.
Click to expand...
Click to collapse
thanks a lot nedoo,but maybe I just couldn't explain myself very well
I mean,since I fancy "buuf theme" more than any other theme and since adw.buuf.theme can't buuf system icons,I'd like to change dialerpad icons just to pop up somethin' like this:
is that possible to do all by myself???
I'd like to change icons in system/app/DialerTabActivity.apk/res/drawable.hdpi can I simply replacle icons or I gotta modify xml file too??????
Sent from my GT-I9000 using XDA Premium App
nemello said:
I'd like to change icons in system/app/DialerTabActivity.apk/res/drawable.hdpi can I simply replacle icons or I gotta modify xml file too??????
Sent from my GT-I9000 using XDA Premium App
Click to expand...
Click to collapse
You can drop in different images, yes... but don't expect it to decompile or recompile properly if you modify or replace the ".9" PNG's. To edit the ".9" PNG's properly, you have to decompile the normal framework/app, change the PNG and XML, then recompile.
XGX5309 said:
You can drop in different images, yes... but don't expect it to decompile or recompile properly if you modify or replace the ".9" PNG's. To edit the ".9" PNG's properly, you have to decompile the normal framework/app, change the PNG and XML, then recompile.
Click to expand...
Click to collapse
.9 png's??
for example,in drawable.hdpi folder I can see call_contacts_icon_normal.png,I'd like to change it with another one,can I do that???
nemello said:
.9 png's??
for example,in drawable.hdpi folder I can see call_contacts_icon_normal.png,I'd like to change it with another one,can I do that???
Click to expand...
Click to collapse
Yes if you are on deodexed ROM. .9.png is not normal png it is compiled png with dots (invisible when compiled, visible when decompiled)wich are used as guides for streaching graphics.
T gain all the elements you showed on that photo you need to modify Phone.apk,
framework-res.apk, SystemUI.apk.
So do a beckup and experiment
That's not easy at all, more to say it's rather hard, but...
Hey Guys, so I'm working on a theme port (Yes I've Asked Multiple Questions About This) , well, when I change a .9 PNG file, it has errors compiling. How do I compile then? Can I not change .9 PNG files?
alphadog32 said:
Hey Guys, so I'm working on a theme port (Yes I've Asked Multiple Questions About This) , well, when I change a .9 PNG file, it has errors compiling. How do I compile then? Can I not change .9 PNG files?
Click to expand...
Click to collapse
M&S gives a tutorial about it here:
http://forum.xda-developers.com/showthread.php?t=1506177
Personally, I've found that if all you're doing is adjusting the hue or saturation (the color of the image) you can straight make the edit. At least I've had the two changes I've made work without doing anything special.
Sent from my SGH-T989 using xda premium
yoft1 said:
M&S gives a tutorial about it here:
http://forum.xda-developers.com/showthread.php?t=1506177
Personally, I've found that if all you're doing is adjusting the hue or saturation (the color of the image) you can straight make the edit. At least I've had the two changes I've made work without doing anything special.
Sent from my SGH-T989 using xda premium
Click to expand...
Click to collapse
Thanks, but I'm just moving from one theme that I'm porting, to the other, which is the ported one.
alphadog32 said:
Thanks, but I'm just moving from one theme that I'm porting, to the other, which is the ported one.
Click to expand...
Click to collapse
So you're having trouble moving the image to the new .apk or what are you asking?
yoft1 said:
So you're having trouble moving the image to the new .apk or what are you asking?
Click to expand...
Click to collapse
Okay, I have a stock framework, and then I have a bunch of png's from another theme in the i9100 section, if I put a .9 image, it wont compile right. So again, if I put the. 9 from the theme to the stock, it wont compile.
alphadog32 said:
Okay, I have a stock framework, and then I have a bunch of png's from another theme in the i9100 section, if I put a .9 image, it wont compile right. So again, if I put the. 9 from the theme to the stock, it wont compile.
Click to expand...
Click to collapse
As long as you're replacing files with the exact same name and not creating new ones it should compile. Alternatively, you don't even need to uncompile and recompile. Just take your stock framework and open (not extract) it in 7zip. It'll show you all the files. Drag and drop your modified files over into the 7zip window. It shouldn't have to compress them or anything, it'll just replace the files that have the same name. That's how I make all my modifications.
yoft1 said:
As long as you're replacing files with the exact same name and not creating new ones it should compile. Alternatively, you don't even need to uncompile and recompile. Just take your stock framework and open (not extract) it in 7zip. It'll show you all the files. Drag and drop your modified files over into the 7zip window. It shouldn't have to compress them or anything, it'll just replace the files that have the same name. That's how I make all my modifications.
Click to expand...
Click to collapse
That's, ill give it a shot tomorrow.
alphadog32 said:
Okay, I have a stock framework, and then I have a bunch of png's from another theme in the i9100 section, if I put a .9 image, it wont compile right. So again, if I put the. 9 from the theme to the stock, it wont compile.
Click to expand...
Click to collapse
Paste ur error log so I can tell you the problem
M&S
Okay, so I am trying to get the navbar working on the Samsung Galaxy Note 3. Pretty much, I have a feeling that SystemUI is missing the icons for the navbar, which causes it to crash when the build.prop has the line "qemu.hw.mainkeys=0". The SystemUI has all the other files that were required for the S4 sysui mod, except for the icons. Being a noob at this, I went ahead and tried to add the icons, but my apk resulted in "System UI has stopped.".
So I decided maybe I am doing something wrong. So with Android Multitool for windows, I installed framework-res.apk, SystemUI.apk, and twframework-res.apk. Next I select the SystemUI.apk for decompiling, and decompile it. Then I simply select the decompiled directory (didn't modify anything!), and recompile it. I then open the new SystemUI.apk in 7z and add the META-INF and AndroidManifest.xml from the old SystemUI.apk. I then select the newly compiled SystemUI.apk for signing, then I sign it.
This is just decompiling, then building the same thing without modifications. SystemUI.apk before decompiling is 2.7 MB, the newly compiled one is only 2 MB! Something is missing out of the new one, but when I compare them in 7z, the only thing I can see that is different is the packed size; whereas the old one has files and folders that take up more space packed than the new one.
When I try doing this with just apktool and cmd, I get java errors like crazy, and the whole SystemUI.apk ends up only half decompiling.
Any idea what I am doing wrong?
Your best bet would be to copy the log to pastebin, and post it in the apktool support thread. Get more views there for sure. Which version of apktool are you using? Can you decompile and recompile anything? Also, if you want post your systemui up and i could see if I can get it to work, narrow it down to a problem on your end that way.
Sent from my SM-N900T using Xparent Skyblue Tapatalk 2
This is my first time doing this, so of course I make a noob mistake! I thought I had to sign ALL apks, but this is a SYSTEM app, and I don't sign it. All is well! Thanks for the reply. I also updated my apktool to 1.5.2, so that may have helped too.
all you have to do is add a + before the @ sign in the line that is giving you errors....umm depending if it is xml errors....
post the errors.....
gakio12 said:
This is my first time doing this, so of course I make a noob mistake! I thought I had to sign ALL apks, but this is a SYSTEM app, and I don't sign it. All is well! Thanks for the reply. I also updated my apktool to 1.5.2, so that may have helped too.
Click to expand...
Click to collapse
You don't need to sign it? I have also this problem. It gives me error that SystemUI has stopped.