Modifying a CM12 Theme - Android Themes

I am probably posting this in the wrong section and this question has probably been asked and answered 1000 times but I have been trying for weeks and reading tutorials with no luck. So I'm going to ask..
I am trying to modify a CM12 theme for my own use and I am having issues. I have decompiled the apk with apktool and modified the png images to my liking. I then recomplile the apk using apktool and try to resign the apk. The apk installs but then fails to be recognized by the theme chooser and gets deleted automatically.
I have tried deleting the meta_inf folder and resigning but nothing seems to work.
Anyone feel like helping me out?

bwar85 said:
I am probably posting this in the wrong section and this question has probably been asked and answered 1000 times but I have been trying for weeks and reading tutorials with no luck. So I'm going to ask..
I am trying to modify a CM12 theme for my own use and I am having issues. I have decompiled the apk with apktool and modified the png images to my liking. I then recomplile the apk using apktool and try to resign the apk. The apk installs but then fails to be recognized by the theme chooser and gets deleted automatically.
I have tried deleting the meta_inf folder and resigning but nothing seems to work.
Anyone feel like helping me out?
Click to expand...
Click to collapse
I believe my error is in editing the png images in the apk. I am using good ole photoshop 7 to invert the colors then save. Shouldn't that work?

Here is the modded apk with a log cat

Well solved my problem. Messed up the .9.pngs. I was unware you must keep the black lines unchanged, I inadvertantly inverted them to white. Now everything works great. Guess you admins could delete this thread if you want. Sorry to have wasted the space.

Related

Editing APK's w/ Mac and Betterzip?

Ok so i've been easing into learning how to edit apk's, theming I guess you can call it. I'm in the exploratory early stages, here's my question. I use BetterZip on my Mac to edit the apk's (zips). So I copied the facebook.apk from Super D 1.10.3 (built in?) and move the apk to my sdcard and renamed it with a .zip extension. Edit some png's, save it. Return to Root Explorer and rename with the .apk extension again, and install. Install comes back successful but my image changes do not show up? I havent gotten creative with it because I want to know the steps first before getting creative. So i just turned random icons black and such and they remain the same. It "overwrites" the FB app that is installed initially in system/app, should there not be two apk's around? prob not right? If someone could just briefly tell me their steps, and obviously you'd have to have a mac to help. Thanks.
And for the record, i've checked out other threads about editing apk's on a mac and its just too difficult it seems, creating keystores and whatnot? I feel like my method is pretty close, I'm just missing something.
joe.kerwin said:
Ok so i've been easing into learning how to edit apk's, theming I guess you can call it. I'm in the exploratory early stages, here's my question. I use BetterZip on my Mac to edit the apk's (zips). So I copied the facebook.apk from Super D 1.10.3 (built in?) and move the apk to my sdcard and renamed it with a .zip extension. Edit some png's, save it. Return to Root Explorer and rename with the .apk extension again, and install. Install comes back successful but my image changes do not show up? I havent gotten creative with it because I want to know the steps first before getting creative. So i just turned random icons black and such and they remain the same. It "overwrites" the FB app that is installed initially in system/app, should there not be two apk's around? prob not right? If someone could just briefly tell me their steps, and obviously you'd have to have a mac to help. Thanks.
And for the record, i've checked out other threads about editing apk's on a mac and its just too difficult it seems, creating keystores and whatnot? I feel like my method is pretty close, I'm just missing something.
Click to expand...
Click to collapse
I don't know much about mac's but I'm pretty good at theming. How are you signing your modified .apk files? If you don't sign them then they will fail to install.
Double post - sorry
Have you seen this thread - it's a droplet for your mac to sign apks.....maybe it will help?
yeah I have that droplet app to sign apps. Maybe it's just a bad apk to start with? I used the FB apk and edited it, signed it, and tried installing it on a fresh install of Superfast (facebook isn't included in system apps) and it still says "This program will overwrite a system blah blah blah" So maybe i'm just messing with the wrong apk? I haven't tried anything else, I just really wanted to tweak the FB widget, haha. Any advice?

[Q] apk theming problem....

Alright so I have themed a few images in the hdpi folder of the gingerbread kb as i wanted it to be green (I'm not a fan of the orange color) and I did this buy unzipping the original apk editing the files rezipping and making the extension .apk... now i need to resign it and ive tried a few methods none of which i could get to work (kept getting a parse error on my phone which i would assume is the sign not working). Could anyone spell it out for me what they use (im on vista, i know ugh...) and how they use it... maybe I'm not theming it right? whatever it is im getting annoyed out of my mind after spending time theming something and it not working =/
Apk Manager is a fine all-in-one collection for modifying apks. You can find it here http://forum.xda-developers.com/showthread.php?t=695701 just follow it's on screen instructions. If all you'll be doing is modifying images then resigning it's easy. As a sidenote, if modifying .xmls within you may need to replace the apktool in apk manager to the older version.

[Q] Bootloop after editing a few XMLs?

So after decompiling framework-res.apk and editing statusbar.xml, statusbarextended.xml, and statusbarlatesteventcontent.xml I get stuck in a bootloop right after installing the ROM fresh from stock and a MC. So what could be the problem? Why would changing the text color of the statusbar cause a bootloop?
ih4ckback said:
So after decompiling framework-res.apk and editing statusbar.xml, statusbarextended.xml, and statusbarlatesteventcontent.xml I get stuck in a bootloop right after installing the ROM fresh from stock and a MC. So what could be the problem? Why would changing the text color of the statusbar cause a bootloop?
Click to expand...
Click to collapse
How did you decompile/recompile? When you recompiled, did you use the same filestructure?
Ex: /framework-res/res/drawable-hdpi instead of /res/drawable-hdpi
Did you keep the same lines and just edit the color codes? You need to give more info to let us know what you did. Any tiny mistake in editing framework-res.apk will result in a bootloop, so your case isn't diagnosable unless you tell us what you did.
.Candy said:
How did you decompile/recompile? When you recompiled, did you use the same filestructure?
Ex: /framework-res/res/drawable-hdpi instead of /res/drawable-hdpi
Did you keep the same lines and just edit the color codes? You need to give more info to let us know what you did. Any tiny mistake in editing framework-res.apk will result in a bootloop, so your case isn't diagnosable unless you tell us what you did.
Click to expand...
Click to collapse
I used apkmanager, decompiled, edited color codes only, recompiled, installed, bootloop and yes the filestructure is the same.
ih4ckback said:
I used apkmanager, decompiled, edited color codes only, recompiled, installed, bootloop and yes the filestructure is the same.
Click to expand...
Click to collapse
How did you install it. Using APK Manager? If so, that's probably the issue. I don't trust certain APK Manager options. To be safe, in the future you should only use it for decompiling, recompiling, and signing if necessary, never for re-install the APK.
Anyway, did you attempt to sign the file? framework-res.apk doesn't need to be signed, and if you do sign it, I believe it will create a boot-loop.
Also, when you recompiled it, did you go through the step that creates the "keep" folder where you delete the files that you edited? If not, then that's probably the issue. If you don't do that step, then your edited file will only contain the files that you edited. At least that's what I understand from my experience.
I copied the apk to my /system/framework folder within my custom rom and flashed the zip. I did sign the file. I'll retry without signing it and yes I did the keep step.
ih4ckback said:
I copied the apk to my /system/framework folder within my custom rom and flashed the zip. I did sign the file. I'll retry without signing it and yes I did the keep step.
Click to expand...
Click to collapse
dont sign system apks
Pirateghost said:
dont sign system apks
Click to expand...
Click to collapse
thats a good tip lol thanks I'll remember that next time I do any modding.

[Q] Changing font color

Can someone tell me where I can change the font of the notifications. They come out in black and don't go with my theme, I'd like to change them to white. Thanks
Also if someone can teach me how to get the words under the icons to show up (wifi, bluetooth, gps ... )
You'll be wanting to read how to theme, there are a few threads if you search. twframework-res.apk and framework-res.apk is what you'll be modifying.
Caution swyping! Read at your own risk.
cappysw10 said:
You'll be wanting to read how to theme, there are a few threads if you search. twframework-res.apk and framework-res.apk is what you'll be modifying.
Caution swyping! Read at your own risk.
Click to expand...
Click to collapse
Thanks, I've modified both those files with all the images I need in those two folders. I just need someone to point me to the right xml file that needs editing for these two questions (and if you'd be so kind to point me to where in the xml file even better), thanks
Can anybody help me out... Pleeaase?
Sent from my SAMSUNG-SGH-I897 using XDA App
I think this is what you're looking for
http://forum.xda-developers.com/showthread.php?t=1007221
CuriousTech said:
I think this is what you're looking for
http://forum.xda-developers.com/showthread.php?t=1007221
Click to expand...
Click to collapse
Ok that somewhat helped. I'm looking at the status_bar_expanded.xml file and the last three are already at #ffffffff for white (which is what I want) but my notifications are still coming up in black
I think that's in framework-res.apk/res/layout/status_bar_latest_event_content.xml
It looks like you're trying to change a heavily modified theme back to original. It would be easiest to look at a stock framework and use those values.
CuriousTech said:
I think that's in framework-res.apk/res/layout/status_bar_latest_event_content.xml
It looks like you're trying to change a heavily modified theme back to original. It would be easiest to look at a stock framework and use those values.
Click to expand...
Click to collapse
That should do it!
CuriousTech said:
I think that's in framework-res.apk/res/layout/status_bar_latest_event_content.xml
It looks like you're trying to change a heavily modified theme back to original. It would be easiest to look at a stock framework and use those values.
Click to expand...
Click to collapse
It's actually status_bar_expanded.xml. I need to change the color from ff000000 to ffffffff, that will change it from black to white. So I decompiled framework-res.apk using apk manager. I edited the file, then when I try to compile, I get an error, even if I answer Yes Yes to the two questions and delete the resources.arsc file plust the xml file I edited. It creates an unsigned package but it's much smaller than the original. What am I doing wrong?
I'd prefer to learn how to change the font color to white, however if anybody knows which is the image file for the background I can also just change that to a white or light color that is not transparent like the current one is
What errors are you getting when you compile it? Are you trying to mod a already moded theme? It is most likely .9.png errors that you are getting and they will need to be fixed before it will recompile. Also make sure you are using apktool 1.3.1 as the newer version is known to cause recompiling issues.
The backgrounds are in framework-res
status_bar_item_background_normal.9.png
status_bar_item_app_background_normal.9.png
One is the title "Ongoing..." I think. The associated "pressed" or for when pressed.
The most significant error is the first one. Usually the ones below that are caused by it. Because of the .9.png errors, I always make xml changes to the original unthemed APK, compile it, then pull the compiled xml files out and drop them into the themed one or keep a copy of the drawable-hdpi folder with all the modified .9s (compiled) and drop them into the new APK each time. It's a pain but works.
Thanks guys. framework was previously themed, I'm trying to add my own flavor into the mix. I'll check into the .9.png files when I get home and report back.
A better explanation is that .9.png files that have an opacity set won't decompile so they're corrupt. They'll show up in the error log or show as default (cone, box, sphere) thumbnails when viewing the folder. So when you recompile, those corrupt files will throw errors.
There are a lot of other ways to get around it like keep a copy of all the problem files, and drop the stock images in the apk before decompiling, then after compiling drop the modified ones back in.
If you need to edit them it can get confusing though. They need to remain the same image size. If they're compiled, take the .9 off before modifying in draw9patch so it will add the 1px border back before compiling. Then it's back to the correct size. And since those aren't corrupt, they'll compile fine.

[Q] Problems trying to theme phone.apk

I’m trying to finish a theme for the Captivate the only thing I have left is the phone.apk thing is all I’m trying to do is swap in some png files no xml edits or editing .9 pngs. But every time I try after flashing I get FC’s from the phone after call is disconnected. This is the first time I’ve tried to theme the phone .apk I have done plenty of other apk png edits in the past just don’t know what’s going on with this apk. Any help on this will be appreciated.
what files, what pic editor software?
I’m trying to replace the jog_tabs, ic_jog _dial_answer and decline and call images. All I’m doing is opening the apk with 7zip replacing the existing images (with the same file name), closing 7zip dropping into the theme zip and flashing
are the replacing files the same size and resolution?
they are the same size not sure about the res how can i check?
Problem solved kept accidentally pulling an xml file from one phone apk to a different apk (two totally different apk's)
Thread closed
Mod can delete if he so wishes
Sent from my GT-I9000 using XDA Premium App

Categories

Resources